:root{color-scheme:light}body{background:#f5f7fb;color:#17243b}.collection{max-width:1500px;margin:0 auto;padding:14px clamp(16px,3vw,40px) 60px}.back{font-size:14px;color:#506783;text-decoration:none}.hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin:12px 0 14px}.eyebrow{color:#4f6eae;font-size:12px;letter-spacing:.12em;font-weight:700}.hero h1{font-size:30px;margin:7px 0}.muted{color:#66758c;font-size:14px;line-height:1.6}.card{background:#fff;border:1px solid #e7ecf3;border-radius:16px;box-shadow:0 7px 25px #2438580a;margin-bottom:18px}.overview{padding:22px 24px}.overview h2,.list-heading h2{font-size:18px;margin:0 0 8px}.merchant-line{line-height:1.8;margin:8px 0}.post{border-top:1px solid #edf0f5;margin-top:18px;padding-top:18px}.post h3{font-size:16px;margin:0 0 8px}.post-content{white-space:pre-wrap;line-height:1.65;max-height:130px;overflow:auto}.overview details{margin-top:12px;color:#64748b}.overview pre{white-space:pre-wrap;max-height:240px;overflow:auto}.filters{padding:20px 24px}.filter-grid{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:14px;align-items:end}.filter-grid label{display:block;color:#41516a;font-size:13px;font-weight:600}.filter-grid input,.filter-grid select{display:block;margin-top:7px;width:100%;height:42px;padding:0 12px;border:1px solid #dce3ed;border-radius:9px;background:#fff;color:#17243b;font:inherit}.filter-grid button,.pager button{height:42px;padding:0 17px;border:1px solid #dce3ed;border-radius:9px;background:white;color:#334967;cursor:pointer}.filter-note{margin:13px 0 0;font-size:12px;color:#77869b;line-height:1.6}.list-heading{padding:21px 24px 14px;display:flex;justify-content:space-between;align-items:center;gap:12px}.badge{padding:5px 10px;background:#edf3ff;color:#4469ac;border-radius:20px;font-size:12px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;min-width:1050px;font-size:13px}th,td{text-align:left;padding:14px 15px;border-top:1px solid #edf0f5;vertical-align:top;line-height:1.55}th{background:#f8fafd;color:#75849a;font-size:12px;white-space:nowrap}td{color:#34435b;max-width:280px;overflow-wrap:anywhere}.content-cell{min-width:200px;white-space:pre-wrap}.kind{display:inline-block;border-radius:20px;padding:3px 8px;background:#f0f4fa;color:#61728b;white-space:nowrap}.intent{background:#fff4df;color:#956313}.empty{text-align:center;padding:35px;color:#8996a8}.pager{display:flex;align-items:center;gap:12px;padding:16px 24px}.pager button:disabled{opacity:.45;cursor:default}@media(max-width:760px){.hero{align-items:start;flex-direction:column}.filter-grid{grid-template-columns:1fr 1fr}.filter-grid label:first-child{grid-column:1/-1}.collection{padding-top:14px}.hero h1{font-size:25px}.overview,.filters{padding:18px}.list-heading{padding:18px}}

.collection .list-action{border:0;background:transparent;color:#4268a8;cursor:pointer;padding:4px;font:inherit;white-space:nowrap}.collection .list-action:hover{text-decoration:underline}

.merchant-fields{display:grid;grid-template-columns:140px minmax(0,1fr);gap:0;margin:22px 0}.merchant-fields dt,.merchant-fields dd{padding:13px 12px;margin:0;border-top:1px solid #edf0f5;line-height:1.6;overflow-wrap:anywhere}.merchant-fields dt{color:#75849a}.merchant-fields dd{white-space:pre-wrap}@media(max-width:600px){.merchant-fields{grid-template-columns:95px minmax(0,1fr)}}
.account-fields{display:grid;grid-template-columns:140px minmax(0,1fr);gap:0;margin:22px 0}.account-fields dt,.account-fields dd{padding:13px 12px;margin:0;border-top:1px solid #edf0f5;line-height:1.6;overflow-wrap:anywhere}.account-fields dt{color:#75849a}.account-fields dd{white-space:pre-wrap}@media(max-width:600px){.account-fields{grid-template-columns:95px minmax(0,1fr)}}
.merchant-workspace{display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);gap:18px;align-items:start}.merchant-workspace[hidden]{display:none}.merchant-workspace .card{min-width:0}.merchant-workspace table{min-width:680px}.workspace-merchants{padding:0 12px 12px}.workspace-merchant{display:block;width:100%;text-align:left;border:0;border-radius:10px;padding:13px 14px;background:transparent;color:#34435b;cursor:pointer;font:inherit}.workspace-merchant[aria-pressed=true]{background:#edf3ff;color:#315a9a}.workspace-merchant small{display:block;color:#7a8aa2;margin-top:4px}.workspace-posts .list-action{border:0;background:transparent;color:#4268a8;cursor:pointer}.workspace-empty{padding:20px;color:#8996a8}.delete-comments{margin-left:16px;color:#a32b2b;border:1px solid #e1baba;border-radius:8px;background:#fff;padding:7px 12px;cursor:pointer}@media(max-width:760px){.merchant-workspace{grid-template-columns:1fr}.merchant-workspace table{min-width:650px}}

.collection .filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.collection .filter-grid label:first-child{grid-column:span 2}.collection .filter-grid input,.collection .filter-grid select{box-sizing:border-box}@media(max-width:760px){.collection .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:420px){.collection .filter-grid{grid-template-columns:1fr}.collection .filter-grid label:first-child{grid-column:auto}}

/* Post workspace: keep the source, scope and actions visible without crowding the records. */
.post-view .collection{max-width:1600px}.post-view .hero{margin:18px 0 12px;align-items:center}.post-view .hero h1{font-size:24px;letter-spacing:-.02em}.post-view .hero p{margin:4px 0}.post-view #status{max-width:420px;line-height:1.5}.post-view #post-back{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 18px}.post-view #post-back a{color:#456586;font-weight:600;text-decoration:none;font-size:14px}.post-view .delete-comments{margin:0;font-size:13px}.post-summary{padding:26px 28px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;background:linear-gradient(120deg,#fff 62%,#f2f6ff);border-color:#e3eaf6}.post-summary[hidden]{display:none}.post-kicker{color:#7087ab;font-size:12px;letter-spacing:.08em;font-weight:700}.post-summary h2{font-size:22px;line-height:1.4;letter-spacing:-.02em;margin:9px 0;color:#1e304b}.summary-meta,.summary-links{font-size:13px;color:#687b94;line-height:1.6}.summary-links{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin-top:16px;overflow-wrap:anywhere}.summary-links a{color:#3f68ae;font-weight:600}.post-summary details{font-size:13px;color:#526b8c;margin-top:12px}.post-summary details summary{cursor:pointer}.post-summary details p{white-space:pre-wrap;line-height:1.7;color:#455a73;max-height:220px;overflow:auto}.summary-stats{display:flex;align-items:center;gap:0}.summary-stats>div{min-width:115px;padding:4px 24px;border-left:1px solid #dce5f2}.summary-stats span,.summary-stats small{display:block;color:#73859f;font-size:12px;white-space:nowrap}.summary-stats strong{display:block;margin:7px 0;font-size:23px;line-height:1.2;color:#243d62}.post-view .filters{padding:18px 22px}.post-view .filter-grid{grid-template-columns:minmax(220px,2fr) repeat(4,minmax(120px,1fr)) auto}.post-view .filter-grid label:first-child{grid-column:auto}.advanced-filters{margin-top:15px;border-top:1px solid #eef1f6;padding-top:13px}.advanced-filters summary{color:#4a6589;font-size:13px;font-weight:600;cursor:pointer;width:max-content}.advanced-filter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:14px}.advanced-filter-grid label{display:block;color:#41516a;font-size:13px;font-weight:600}.advanced-filter-grid input,.advanced-filter-grid select{display:block;box-sizing:border-box;margin-top:7px;width:100%;height:42px;padding:0 12px;border:1px solid #dce3ed;border-radius:9px;background:#fff;color:#17243b;font:inherit}.post-view .filter-note{margin-top:10px}.post-view #stream-detail .table-scroll{border-top:1px solid #edf0f5}.post-view #stream-detail table{min-width:1180px}.post-view #stream-detail th:nth-child(-n+2),.post-view #stream-detail td:nth-child(-n+2):not(.empty){display:none}.post-view #stream-detail tbody tr:hover{background:#f8fbff}.post-view #stream-detail .content-cell{min-width:240px;max-width:400px;color:#24344e}.post-view .kind{margin-bottom:4px}.post-view .pager{justify-content:flex-end}.post-view button:focus-visible,.post-view a:focus-visible,.post-view summary:focus-visible,.post-view input:focus-visible,.post-view select:focus-visible{outline:3px solid #93b7f4;outline-offset:2px}@media(max-width:1100px){.post-view .filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.post-view .filter-grid label:first-child{grid-column:span 2}}@media(max-width:760px){.post-summary{grid-template-columns:1fr;gap:20px;padding:20px}.summary-stats>div:first-child{border-left:0;padding-left:0}.summary-stats>div{min-width:0;flex:1}.post-view .filter-grid,.advanced-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.post-view #post-back{align-items:flex-start}.post-view .hero{align-items:flex-start}.post-view .delete-comments{white-space:normal}}@media(max-width:420px){.post-view .filter-grid,.advanced-filter-grid{grid-template-columns:1fr}.post-view .filter-grid label:first-child{grid-column:auto}.post-view #post-back{flex-direction:column}}

/* Merchant workspace: keep profile details compact as the post list grows. */
.workspace-profile{margin:4px 24px 20px;padding:18px 20px;background:#f7f9fd;border:1px solid #e8eef7;border-radius:14px}
.workspace-profile h3{margin:0;color:#293e5e;font-size:15px}
.workspace-profile .merchant-fields{display:grid;grid-template-columns:100px minmax(0,1fr) 100px minmax(0,1fr);gap:12px 16px;margin:15px 0 0}
.workspace-profile .merchant-fields dt,.workspace-profile .merchant-fields dd{padding:0;border:0;font-size:13px;line-height:1.55}
.workspace-profile .merchant-fields dt{grid-row:auto;color:#718199}
.workspace-profile .merchant-fields dd{margin:0;color:#253a58;font-weight:600}
.workspace-profile .merchant-fields dt,.workspace-profile .merchant-fields dd{grid-column:span 1}
.workspace-post-tools{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:0 24px 16px}.workspace-post-tools label{display:block;color:#526681;font-size:13px;font-weight:600}.workspace-post-tools label:first-child{flex:1 1 240px;max-width:380px}.workspace-post-tools .comment-status-filter,.workspace-post-tools .pinned-status-filter{flex:0 0 160px}.workspace-post-tools input,.workspace-post-tools select{display:block;box-sizing:border-box;width:100%;height:40px;margin-top:7px;padding:0 12px;border:1px solid #dce3ed;border-radius:9px;background:#fff;color:#17243b;font:inherit}.workspace-pager{justify-content:flex-end;color:#66758c;font-size:13px}.workspace-posts tbody tr:hover{background:#f8fbff}.workspace-posts td a{color:#4268a8;font-weight:600;text-decoration:none;white-space:nowrap}.workspace-posts td a:hover{text-decoration:underline}.merchant-workspace button:focus-visible,.merchant-workspace input:focus-visible,.merchant-workspace select:focus-visible,.merchant-workspace a:focus-visible{outline:3px solid #93b7f4;outline-offset:2px}
@media(max-width:760px){.workspace-profile{margin:0 18px 18px;padding:15px}.workspace-profile .merchant-fields{grid-template-columns:90px minmax(0,1fr)}.workspace-post-tools{padding:0 18px 14px}.workspace-pager{justify-content:center;flex-wrap:wrap}}
.account-flags{margin:16px 24px;padding:18px;background:#fff8ef;border:1px solid #f0dfc7;border-radius:12px}.account-flags h3{margin:0;font-size:15px}.account-flags p{margin:8px 0}.account-flags select,.account-flags button{font:inherit;padding:8px 12px;border:1px solid #d7c9b5;border-radius:8px;background:white;color:#493b29}.account-flags select{max-width:100%;margin:10px 8px 0 0}.account-flags button{cursor:pointer}.account-flags button:disabled{opacity:.5;cursor:default}
.collection-links{display:grid;gap:6px;margin-top:4px}.collection-link-row{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;min-height:30px}.collection-links a,.collection-geo-link{color:#4268a8;font-weight:600}.collection-category-name{flex:0 0 88px;color:#233d63;font-weight:700}.collection-storage-label{color:#7a899d;font-size:12px;font-weight:600}.collection-geo-link{margin-left:8px;white-space:nowrap}.account-list-tools{display:flex;gap:12px;align-items:end;flex-wrap:wrap;padding:0 24px}.account-list-tools label{display:grid;gap:6px;color:#526681;font-size:13px}.account-list-tools input,.account-list-tools select,.account-list-tools button,.account-flags input{font:inherit;padding:8px 10px;border:1px solid #dce3ed;border-radius:8px;background:#fff}.account-list-tools button{cursor:pointer}.account-list-note{margin:12px 24px;color:#74849a;font-size:13px}.account-label-chip{display:inline-block;padding:3px 8px;margin:2px 4px 2px 0;border-radius:8px;background:#fff3d8;color:#805215;font-size:12px}.account-label-chip button{margin-left:6px;padding:0;border:0;background:transparent;cursor:pointer;color:inherit}.account-list-account{display:block;color:#74849a;font-size:12px}.account-label-custom{margin:8px 8px 0 0;max-width:200px}

.workspace-posts .post-list-title{font-weight:600;line-height:1.5}.workspace-posts .post-list-id{margin-top:5px;font-size:12px;line-height:1.5;overflow-wrap:anywhere}.workspace-posts .post-list-id a{color:#74849a;font-weight:400}
@media(min-width:761px){.merchant-workspace{grid-template-columns:minmax(185px,230px) minmax(0,1fr)}.merchant-sidebar .list-heading{padding-left:16px;padding-right:16px}.workspace-merchants{padding-left:8px;padding-right:8px}}
.workspace-posts .post-list-id{color:#74849a;user-select:text}
@media(min-width:1200px){.workspace-profile .merchant-fields{grid-template-columns:80px minmax(0,1fr) 80px minmax(0,1fr) 80px minmax(0,1fr);gap:10px 12px}}
@media(min-width:761px){.collection .hero>div{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:baseline;gap:6px 14px;min-width:0;flex:1}.collection .hero h1,.collection .hero p{margin:0}.collection .hero .collection-links{grid-column:1/-1;width:100%}.collection .hero{align-items:flex-start;margin:12px 0 14px}.collection .hero .eyebrow{white-space:nowrap}}
/* User profile: four label/value pairs per row on wide screens. */
@media(min-width:1200px){.account-fields{grid-template-columns:85px minmax(0,1fr) 85px minmax(0,1fr) 85px minmax(0,1fr) 85px minmax(0,1fr)}}
@media(min-width:761px) and (max-width:1199px){.account-fields{grid-template-columns:110px minmax(0,1fr) 110px minmax(0,1fr)}}

#account-records .account-post-detail{margin-top:5px;font-size:12px}#account-records .account-post-detail a{color:#657d9d}

.comment-account{margin-top:4px;color:#7a8aa2;font-size:12px;overflow-wrap:anywhere}.comment-account-detail{display:block;margin-top:4px;font-size:12px}

.comment-number{color:#8090a6;font-size:12px;margin-right:4px;white-space:nowrap}

/* Keep account and comment columns compact in post details. */
.post-view #stream-detail th:nth-child(4),.post-view #stream-detail td:nth-child(4){width:135px;min-width:110px;max-width:155px}
.post-view #stream-detail .content-cell{width:185px;min-width:150px;max-width:220px;overflow-wrap:anywhere}
.post-view #comments-section th:nth-child(2),.post-view #comments-section td:nth-child(2){width:135px;min-width:110px;max-width:155px}
.post-view #comments-section .content-cell{width:185px;min-width:150px;max-width:220px;overflow-wrap:anywhere}

.comment-date-line{display:block;white-space:nowrap;overflow-wrap:normal;word-break:normal}.comment-date-line + .comment-date-line{margin-top:3px;color:#77869b;font-size:12px}

/* Comment-account workspace */
.account-view .hero{margin:16px 0;align-items:center}.account-view .hero h1{font-size:24px}.account-view #account-detail-page{overflow:hidden}
.account-detail-head{padding:22px 26px;background:linear-gradient(120deg,#fff 55%,#f2f6ff);border-bottom:1px solid #e9eef6}.account-detail-head>a{font-size:13px;color:#526c95;text-decoration:none;font-weight:600}.account-detail-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:18px}.account-kicker{font-size:12px;font-weight:700;letter-spacing:.08em;color:#7187a7}.account-detail-heading h2{margin:6px 0;font-size:22px;line-height:1.35;overflow-wrap:anywhere}.account-detail-heading p{margin:0;font-size:13px}.account-total{padding-left:24px;border-left:1px solid #dce5f2;min-width:110px}.account-total span,.account-total strong{display:block}.account-total span{font-size:12px;color:#718199}.account-total strong{margin-top:7px;font-size:22px;color:#294b78}
.account-detail-body{padding:20px 26px 4px}.account-profile{padding:17px 20px;background:#f7f9fd;border:1px solid #e9eef6;border-radius:12px}.account-profile h3,.account-record-heading h3{margin:0;font-size:15px;color:#293e5e}.account-profile .account-fields{margin:12px 0 0;grid-template-columns:repeat(4,auto minmax(0,1fr));gap:10px 14px}.account-profile .account-fields dt,.account-profile .account-fields dd{border:0;padding:0;font-size:13px;line-height:1.5}.account-profile .account-fields dt{color:#75849a}.account-profile .account-fields dd{color:#263c5d;font-weight:600}
.account-mark-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}.account-mark-grid>div{min-width:0}.account-mark-grid .account-flags{box-sizing:border-box;height:100%;margin:0;padding:16px 18px;background:#fff;border-color:#e9eef6}.account-mark-grid .account-flags h3{font-size:15px;color:#293e5e}.account-mark-grid .account-flags p{font-size:12px;margin:7px 0}.account-mark-grid .account-flags select,.account-mark-grid .account-flags input,.account-mark-grid .account-flags button{font-size:13px;border-color:#dce3ed;color:#34435b}.account-mark-grid .account-flags>button{background:#4268a8;border-color:#4268a8;color:#fff}.account-mark-grid .account-flags [role=status]:empty{display:none}.account-record-heading{margin:24px 0 12px}.account-record-heading p{margin:4px 0 0;font-size:12px}.account-record-table{border:1px solid #e9eef6;border-radius:12px}.account-record-table table{min-width:1050px}.account-record-table th{border-top:0}.account-record-table tbody tr:hover{background:#f8fbff}.account-record-table td:nth-child(2){min-width:190px;white-space:pre-wrap;color:#24344e}.account-detail-body .pager{justify-content:flex-end;padding-right:0}.account-view :is(button,a,select,input):focus-visible{outline:3px solid #93b7f4;outline-offset:2px}
@media(max-width:1000px){.account-profile .account-fields{grid-template-columns:repeat(2,auto minmax(0,1fr))}}@media(max-width:760px){.account-detail-head{padding:18px}.account-detail-body{padding:16px 18px 4px}.account-mark-grid{grid-template-columns:1fr}.account-detail-heading{align-items:flex-start}.account-total{min-width:90px;padding-left:16px}.account-detail-heading h2{font-size:19px}}@media(max-width:460px){.account-profile .account-fields{grid-template-columns:auto minmax(0,1fr)}.account-detail-heading{flex-wrap:wrap}.account-total{border-left:0;padding-left:0}.account-detail-body .pager{justify-content:center}}

/* Keep the collection workspace in place from the first paint. */
.collection-home #collection-content{display:none!important}.collection-home #merchant-workspace[hidden]{display:grid}.workspace-loading{padding:14px;color:#8996a8;font-size:13px}.workspace-profile{min-height:125px;box-sizing:border-box}.workspace-posts .table-scroll{min-height:120px}.workspace-merchants{min-height:85px}

/* Give the merchant and post lists the available window width. */
.collection-home .collection{max-width:none;padding-left:clamp(12px,1.4vw,24px);padding-right:clamp(12px,1.4vw,24px)}
@media(min-width:761px){.collection-home .merchant-workspace{gap:12px}}

/* Keep the merchant context readable while giving the post list more room. */
.collection-home .workspace-profile{min-height:0;margin:3px 24px 10px;padding:10px 14px;border-radius:10px}
.collection-home .workspace-profile h3{font-size:14px;line-height:1.35}
.collection-home .workspace-profile .merchant-fields{margin:7px 0 0;gap:4px 10px}
.collection-home .workspace-profile .merchant-fields dt,.collection-home .workspace-profile .merchant-fields dd{line-height:1.4}
.collection-home #workspace-collection-overview .merchant-fields{grid-template-columns:120px minmax(0,1fr) 120px minmax(0,1fr)}
.collection-home #workspace-collection-overview .merchant-fields dt,.collection-home #workspace-collection-overview .merchant-fields dd{font-size:12px}
.collection-home #workspace-collection-overview p{font-size:12px;line-height:1.4;margin:6px 0 0}
@media(min-width:1200px){.collection-home #workspace-collection-overview .merchant-fields{grid-template-columns:120px minmax(0,1fr) 120px minmax(0,1fr) 120px minmax(0,1fr)}}
@media(max-width:760px){.collection-home .workspace-profile{margin:0 18px 10px;padding:10px 12px}.collection-home #workspace-collection-overview .merchant-fields{grid-template-columns:110px minmax(0,1fr)}}

/* Put the selected merchant's profile beside the merchant heading on wide screens. */
@media(min-width:1200px){
  .collection-home .workspace-posts{display:grid;grid-template-columns:minmax(170px,1fr) minmax(0,3fr);grid-template-areas:"heading profile" "overview overview" "tools tools" "posts posts" "pager pager";align-items:start}
  .collection-home .workspace-posts>.list-heading{grid-area:heading;padding-right:8px}
  .collection-home #workspace-profile{grid-area:profile;margin:12px 24px 8px 0}
  .collection-home #workspace-profile-fields dt:nth-of-type(8),.collection-home #workspace-profile-fields dd:nth-of-type(8){order:1}
  .collection-home #workspace-profile-fields dt:nth-of-type(8){grid-column:1}
  .collection-home #workspace-profile-fields dd:nth-of-type(8){grid-column:2/-1;white-space:normal}
  .collection-home #workspace-collection-overview{grid-area:overview}
  .collection-home .workspace-posts>.workspace-post-tools{grid-area:tools}
  .collection-home .workspace-posts>.table-scroll{grid-area:posts}
  .collection-home .workspace-posts>.workspace-pager{grid-area:pager}
}
.workspace-page-size{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.workspace-page-size select{height:36px;padding:0 8px;border:1px solid #dce3ed;border-radius:8px;background:#fff;color:#334967;font:inherit}
.workspace-page-size select:focus-visible{outline:3px solid #93b7f4;outline-offset:2px}
.collection-home #workspace-post-count{display:none}
.account-avatar{display:block;width:44px;height:44px;border-radius:50%;object-fit:cover;background:#f1f3f5;border:1px solid #e0e3e7}
.account-list-identity-link{display:inline-flex;flex-direction:column;align-items:flex-start;gap:2px;color:inherit;text-decoration:none}
.account-list-identity-link:hover,.account-list-identity-link:focus-visible{color:#315f9f;text-decoration:underline;text-underline-offset:3px}
.account-avatar-link{display:inline-block;max-width:110px;color:#4268a8;text-decoration:none;border-radius:50%;font-size:12px}
.account-avatar-link:hover{text-decoration:underline;text-underline-offset:3px}
.account-avatar-link:focus-visible{outline:3px solid #93b7f4;outline-offset:3px}

/* The account detail gives the saved avatar a stable, prominent position. */
.account-profile .account-fields{grid-template-columns:96px repeat(3,auto minmax(0,1fr));column-gap:18px}
.account-profile .account-fields>dt:last-of-type{display:none}
.account-profile .account-fields>dd:last-of-type{grid-column:1;grid-row:1 / span 2;align-self:start;justify-self:center;max-width:96px;text-align:center;font-size:12px;color:#75849a}
.account-profile .account-avatar{width:80px;height:80px;box-sizing:border-box;border:2px solid #fff;box-shadow:0 2px 12px #294b781c}
.unidentified-results{margin:16px 24px;padding:16px;border:1px solid #eadcbf;border-radius:12px;background:#fffaf0}.unidentified-results[hidden]{display:none}.unidentified-results h3{margin:0;font-size:15px;color:#614b26}.unidentified-results p{margin:6px 0 12px;font-size:12px}.unidentified-results table{min-width:700px;background:#fff}.unidentified-results th,.unidentified-results td{padding:10px 12px}.unidentified-results td:nth-child(2){min-width:160px;white-space:pre-wrap}.unidentified-results a{color:#4268a8;font-weight:600;white-space:nowrap}
.post-filter-notice{display:flex;align-items:center;gap:12px;margin:14px 0 0;color:#805215;font-size:13px}.post-filter-notice[hidden]{display:none}.post-filter-notice button{border:0;background:transparent;color:#4268a8;font:inherit;font-weight:600;cursor:pointer}
@media(max-width:1000px){.account-profile .account-fields{grid-template-columns:96px repeat(2,auto minmax(0,1fr))}.account-profile .account-fields>dd:last-of-type{grid-row:1 / span 3}}
@media(max-width:760px){.unidentified-results{margin:14px 18px;padding:14px}}
@media(max-width:460px){.account-profile .account-fields{grid-template-columns:76px auto minmax(0,1fr);column-gap:12px}.account-profile .account-fields>dd:last-of-type{grid-row:1 / span 6;max-width:76px}.account-profile .account-avatar{width:68px;height:68px}}

.merchant-history{margin-top:10px;border-top:1px solid #e1e8f2;padding-top:8px;font-size:13px}.merchant-history summary{cursor:pointer;color:#315d9b;font-weight:600}.merchant-history-body h4{margin:14px 0 6px}.merchant-history-body p{margin:6px 0}.merchant-history-body table{min-width:670px}.merchant-history-body th,.merchant-history-body td{padding:7px;text-align:left}.merchant-history-body ul{padding-left:20px}.history-pager{display:flex;gap:8px;margin-top:8px}

#collection-protected[hidden],#collection-login[hidden]{display:none!important}#collection-login{max-width:460px;margin:10vh auto;padding:24px}#collection-login-form{display:grid;gap:14px}#collection-login-form label{display:grid;gap:6px}#collection-login-form input{width:100%;box-sizing:border-box}#collection-login-status{color:#a13b32}.collection-viewer .delete-comments{display:none!important}#collection-session-bar{display:flex;justify-content:flex-end;gap:8px;align-items:center;font-size:13px}

/* Keep each date detail on one line and let the table scroll on narrow screens. */
.post-view #stream-detail td:has(> .comment-date-line),.post-view #comments-section td:has(> .comment-date-line){width:230px;min-width:230px;max-width:none}

.account-record-table td:nth-child(4){white-space:nowrap}
.account-record-table .account-comment-index{width:52px;min-width:52px;white-space:nowrap;color:#708099;text-align:center}

.collection-ip-viewer .account-mark-grid,.collection-ip-viewer .delete-comments{display:none!important}

.account-sort-heading{border:0;padding:4px 0;background:transparent;color:inherit;font:inherit;font-weight:inherit;cursor:pointer;white-space:nowrap}.account-sort-heading:hover{color:#4268a8}.account-sort-heading:focus-visible{outline:3px solid #93b7f4;outline-offset:2px}

.post-pinned-badge{display:inline-block;margin-right:6px;padding:1px 6px;border-radius:4px;background:#fff2da;color:#9b5d06;font-size:12px;line-height:1.5;vertical-align:middle}

/* Account detail: keep each label and value together at every width. */
.account-detail-head{padding:18px 26px;background:#f9fbff}
.account-detail-heading{margin-top:12px}
.account-detail-heading h2{margin:4px 0;font-size:21px}
.account-total strong{margin-top:3px}
.account-detail-body{padding-top:16px}
.account-profile{padding:16px 18px;background:#f8fafd}
.account-profile .account-fields{display:grid;grid-template-columns:80px repeat(4,minmax(0,1fr));align-items:start;gap:15px 20px;margin:14px 0 0}
.account-profile .account-fields>.account-profile-avatar{grid-column:1;grid-row:1 / span 3;min-width:0;text-align:center}
.account-profile .account-profile-avatar dt{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.account-profile .account-profile-avatar dd{margin:0;color:#718199;font-size:12px;line-height:1.4;overflow-wrap:anywhere}
.account-profile .account-avatar{display:block;width:72px;height:72px;margin:0 auto;object-fit:cover}
.account-profile .account-field{min-width:0;display:grid;gap:4px;align-content:start}
.account-profile .account-field dt,.account-profile .account-field dd{margin:0;padding:0;border:0;line-height:1.45;overflow-wrap:anywhere}
.account-profile .account-field dt{font-size:12px;color:#76869c;font-weight:400}
.account-profile .account-field dd{font-size:14px;color:#263c5d;font-weight:600;white-space:pre-wrap}
.account-profile .account-field a{color:#4268a8;text-decoration:none}.account-profile .account-field a:hover{text-decoration:underline}
.account-mark-grid .account-flags{padding:14px 16px}
.account-mark-grid .account-flags p{margin:5px 0}
.account-mark-grid .account-flags select,.account-mark-grid .account-flags input{margin-top:8px}
.account-record-heading{margin-top:20px}
.account-record-table td:nth-child(3) .comment-date-line{white-space:nowrap}
@media(max-width:1100px){.account-profile .account-fields{grid-template-columns:80px repeat(3,minmax(0,1fr))}.account-profile .account-fields>.account-profile-avatar{grid-row:1 / span 4}}
@media(max-width:760px){.account-detail-head{padding:16px 18px}.account-profile .account-fields{grid-template-columns:72px repeat(2,minmax(0,1fr));gap:14px}.account-profile .account-fields>.account-profile-avatar{grid-row:1 / span 6}.account-profile .account-avatar{width:64px;height:64px}}
@media(max-width:460px){.account-profile .account-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.account-profile .account-fields>.account-profile-avatar{grid-column:1 / -1;grid-row:auto;justify-self:start;text-align:left}.account-profile .account-avatar{margin:0;width:60px;height:60px}}

/* Account list pagination stays at the lower right. */
#accounts-page .accounts-pager{justify-content:flex-end;flex-wrap:wrap;color:#66758c;font-size:13px}
.accounts-pager label{display:flex;align-items:center;gap:6px;white-space:nowrap}
.accounts-pager select{height:36px;padding:0 9px;border:1px solid #dce3ed;border-radius:8px;background:#fff;color:#334967;font:inherit}
.accounts-pager :is(button,select):focus-visible{outline:3px solid #93b7f4;outline-offset:2px}
@media(max-width:460px){#accounts-page .accounts-pager{gap:8px;padding:14px 16px}.accounts-pager label{width:100%;justify-content:flex-end}}

/* Compact, sequential indexes for merchants and their filtered posts. */
.workspace-merchant{display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:8px;align-items:start}
.workspace-merchant-number{grid-column:1;grid-row:1 / span 3;color:#7a8aa2;font-size:12px;line-height:1.7;text-align:right;font-variant-numeric:tabular-nums}
.workspace-merchant>strong,.workspace-merchant>small{grid-column:2;min-width:0;overflow-wrap:anywhere}
.workspace-posts th:first-child,.workspace-posts td.workspace-row-number{width:32px;min-width:32px;padding-left:6px;padding-right:6px;text-align:center;color:#7a8aa2;font-variant-numeric:tabular-nums}

/* Highlight manually associated merchant flags without changing their meaning. */
.account-flag-summary{display:inline-flex;align-items:center;max-width:100%;margin:4px 0 6px;padding:5px 10px;border:1px solid #f0b8b5;border-radius:7px;background:#fff0ef;color:#a12628;font-size:13px;font-weight:700;line-height:1.4;overflow-wrap:anywhere}
.account-flag-summary[hidden]{display:none}
.account-mark-grid .account-flags.has-merchant-flags{border-color:#efc6c3;background:#fffbfa}
.merchant-flag-mark{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:9px 0;padding:9px 10px;border:1px solid #f1cfcb;border-radius:9px;background:#fff4f2;color:#8e2929}
.merchant-flag-badge{flex:none;padding:3px 7px;border-radius:5px;background:#b93232;color:#fff;font-size:12px;font-weight:700;line-height:1.4}
.merchant-flag-name{min-width:0;flex:1 1 130px;color:#8e2929;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.account-mark-grid .merchant-flag-mark button{margin:0;padding:4px 8px;border-color:#e4a9a5;background:#fff;color:#9a302d;font-size:12px}
.account-mark-grid .merchant-flag-mark button:hover{background:#ffe6e3}
.collection-ip-viewer .account-flag-summary{display:none!important}

/* Comment-account workspace: filters remain readable as the collection grows. */
.accounts-view .collection{max-width:1650px}
.accounts-view .hero{align-items:center;margin:16px 0 20px}
.accounts-view .hero h1{font-size:25px;letter-spacing:-.025em}
.accounts-view .collection-links a{padding:6px 0;text-decoration:none}
.accounts-view .collection-links a[href*="view=accounts"]{color:#254f91;border-bottom:2px solid #476ca8}
.accounts-view #accounts-page{overflow:hidden}
.accounts-heading{padding-bottom:16px}
.accounts-heading h2{font-size:21px;color:#1d304e}
.accounts-heading p{margin:0}
.accounts-view .account-list-tools{display:block;padding:0 24px}
.accounts-primary-filters{display:grid;grid-template-columns:minmax(210px,1.3fr) minmax(130px,.7fr) minmax(110px,.55fr) minmax(145px,.75fr) minmax(200px,1.1fr) auto;gap:12px;align-items:end}
.accounts-view .account-list-tools label{min-width:0;font-weight:600;color:#53657d}
.accounts-view .account-list-tools :is(input,select){box-sizing:border-box;width:100%;height:42px;padding:0 12px;color:#243b59;background:#fff}
.accounts-view .account-list-tools :is(input,select):hover{border-color:#9cb3d1}
.accounts-view .account-list-tools .accounts-search-button{height:42px;padding:0 22px;border-color:#416aab;background:#416aab;color:#fff;font-weight:600}
.accounts-view .account-list-tools .accounts-search-button:hover{background:#315b9a}
.accounts-advanced{margin-top:12px;border:1px solid #e5ebf3;border-radius:10px;background:#fafcff}
.accounts-advanced summary,.accounts-explanation summary{cursor:pointer;color:#506b90;font-size:13px;font-weight:600;list-style:none}
.accounts-advanced summary{padding:11px 14px}
.accounts-advanced summary::-webkit-details-marker,.accounts-explanation summary::-webkit-details-marker{display:none}
.accounts-advanced summary::before,.accounts-explanation summary::before{content:'▸';display:inline-block;margin-right:7px;transition:transform .15s}
.accounts-advanced[open] summary::before,.accounts-explanation[open] summary::before{transform:rotate(90deg)}
.accounts-advanced-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0 14px 14px}
.accounts-filter-summary{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;min-height:34px;padding:13px 0 0}
.accounts-active-filters{display:flex;align-items:center;flex-wrap:wrap;gap:7px;min-width:0}
.accounts-filter-empty{font-size:12px;color:#8290a4;padding:5px 0}
.accounts-view .account-list-tools .accounts-filter-chip{max-width:290px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#edf3fc;border-color:#dbe6f7;color:#345e96;font-size:12px;padding:5px 9px}
.accounts-view .account-list-tools .accounts-filter-chip:hover{background:#e0ebfb}
.accounts-view .account-list-tools .accounts-reset{flex:none;border:0;background:transparent;color:#4268a8;font-size:13px;padding:5px 0}
.accounts-view .account-list-tools .accounts-reset:disabled{color:#a4afbd;cursor:default}
.accounts-explanation{margin:4px 24px 0;border-bottom:1px solid #edf1f6}
.accounts-explanation summary{padding:8px 0 12px;color:#6d7f97;font-weight:500}
.accounts-explanation .account-list-note{margin:0 0 14px;max-width:1000px;line-height:1.65}
.accounts-results-caption{min-height:18px;margin:0;padding:12px 24px;color:#77889c;font-size:12px}
.accounts-table-scroll{border-top:1px solid #edf1f6}
.accounts-view #accounts-list tr:hover{background:#f7faff}
.accounts-view #accounts-list td{vertical-align:middle}
.account-comment-previews{display:block;inline-size:clamp(9rem,17vw,18rem);color:#345e96;line-height:1.55;text-decoration:none}
.account-comment-row{display:flex;align-items:center;gap:.35rem;min-inline-size:0}
.account-comment-line{flex:1 1 auto;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#345e96;text-decoration:none}
.account-comment-line:hover,.account-comment-line:focus-visible{text-decoration:underline;text-underline-offset:2px}
.account-broadcast-button{flex:none;padding:0 .45rem;min-block-size:1.5rem;border:1px solid #c8d6ec;border-radius:999px;background:#fff;color:#2852a6;font-size:.75rem;line-height:1.4;cursor:pointer}
.account-broadcast-button:hover{background:#edf3fc}
.account-broadcast-button:disabled{color:#7a8aa3;cursor:default;background:#f4f6f9}
.account-comment-previews span.account-broadcast-tag{display:inline-block;margin-inline-end:.15rem;padding:0 .35rem;border-radius:999px;background:#e7f6ec;color:#1d7a43;font-size:.75rem;line-height:1.4;vertical-align:1px;text-decoration:none}
#account-comment-history{scroll-margin-top:16px}
.kind.comment-role{padding-inline:0;background:transparent;color:#4e6078;font-weight:600}
.kind.comment-intent{border:1px solid transparent;font-weight:600}
.kind.comment-intent-price{background:#096647;color:#fff}
.comment-intent-price::before{content:"";display:inline-block;width:.42em;height:.42em;margin-inline-end:.48em;vertical-align:.15em;background:currentColor;transform:rotate(45deg)}
.kind.comment-intent-consult{background:#e9f2ff;color:#254f92}
.kind.comment-intent-partner{background:#fff0d8;color:#79520f}
.kind.comment-intent-unknown{border-color:#a3afbe;border-style:dashed;background:transparent;color:#59697e;font-weight:500}
.kind.merchant-badge{border-radius:5px;background:#eee7fa;color:#594080;font-weight:600}
.accounts-view #accounts-list .account-list-identity-link{font-weight:600;color:#2f568f}
.accounts-view #accounts-list .account-list-account{font-weight:400}
.accounts-view #accounts-page[aria-busy="true"] .accounts-table-scroll{opacity:.65}
.accounts-view #accounts-page :is(button,a,input,select,summary):focus-visible,.accounts-table-scroll:focus-visible{outline:3px solid #8cb3ef;outline-offset:2px}
.accounts-view #accounts-page .pager button:not(:disabled):hover{background:#eff5ff;border-color:#b9cbe5}
@media(max-width:1000px){.accounts-primary-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.accounts-query-label{grid-column:span 2}.accounts-advanced-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.accounts-view .hero{align-items:flex-start}.accounts-view .account-list-tools{padding:0 16px}.accounts-heading{padding:18px 16px 14px}.accounts-primary-filters{grid-template-columns:1fr}.accounts-query-label{grid-column:auto}.accounts-view .account-list-tools .accounts-search-button{width:100%}.accounts-advanced-grid{grid-template-columns:1fr 1fr}.accounts-explanation{margin:4px 16px 0}.accounts-results-caption{padding:12px 16px}.accounts-results-caption::after{content:' · 表格可左右滑动'}.accounts-filter-summary{align-items:flex-start}}
@media(max-width:380px){.accounts-advanced-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.accounts-advanced summary::before,.accounts-explanation summary::before{transition:none}}

.collection-nav-count{display:inline-block;margin-left:4px;padding:2px 8px;border-radius:12px;background:#edf2fb;color:#365b90;font-size:12px;white-space:nowrap}.collection-nav-count--media{margin-left:0}@media(max-width:760px){.collection-category-name{flex-basis:100%}.collection-geo-link{display:inline-block;margin:4px 0 0}}
.post-source-data .list-heading{align-items:flex-start}.post-source-fields{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 18px;margin:0}.post-source-fields dt{color:#75859a;font-weight:600}.post-source-fields dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.post-source-links{display:flex;flex-wrap:wrap;gap:9px;margin-top:18px}.post-source-links a{display:inline-flex;padding:7px 11px;border:1px solid #cfdaea;border-radius:8px;background:#f7faff;color:#315b92;text-decoration:none}.post-source-links a:hover{background:#edf4ff}@media(max-width:600px){.post-source-fields{grid-template-columns:1fr;gap:3px}.post-source-fields dd{margin-bottom:9px}}

.post-media-badge{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:4px;font-size:11px;font-weight:600;line-height:1.5;white-space:nowrap;vertical-align:middle}
.post-media-badge--video{background:#e8efff;color:#2f5395}
.post-media-badge--image{background:#e4f4ec;color:#24654a}
.post-source-media{flex:0 0 100%;min-width:0;margin-top:8px}
.post-source-media h3{margin:0 0 8px;font-size:14px}
.post-source-media .table-scroll{border:1px solid #e5ebf4;border-radius:10px}
.post-source-media table{min-width:0;table-layout:auto}
.post-source-media :is(th,td){padding:9px 12px;vertical-align:middle}
.post-source-media :is(th,td):nth-child(n+2){width:19%;white-space:nowrap}
.post-source-media td a{padding:3px 7px;border-radius:5px}
@media(max-width:600px){.post-source-media :is(th,td){padding:7px 6px}}

.post-list-title .post-media-badge{font-weight:600;text-decoration:none}
.post-list-title .post-media-badge:hover{text-decoration:underline}
.post-list-title .post-media-badge:focus-visible,.summary-actions a:focus-visible{outline:2px solid #416da7;outline-offset:3px}
.post-view .hero p{display:none}
.post-view .post-summary{gap:18px;padding:20px 22px;align-items:start}
.post-view .post-summary h2{margin:5px 0 9px;font-size:clamp(20px,2.4vw,26px);overflow-wrap:anywhere}
.post-view .summary-meta{margin:5px 0}
.summary-post-facts{display:flex;flex-wrap:wrap;gap:6px 10px;margin:10px 0}
.summary-post-facts>div{display:flex;gap:5px;align-items:baseline;padding:3px 8px;border-radius:6px;background:#eef3fa;font-size:12px}
.summary-post-facts dt{color:#506781}
.summary-post-facts dd{margin:0;color:#243c5b;font-weight:650}
.post-view .summary-stats{align-items:stretch}
.post-view .summary-stats>div{padding:8px 15px;min-width:88px}
.post-view .summary-stats strong{font-variant-numeric:tabular-nums}
.post-view .summary-links{gap:8px 12px;margin-top:12px}
.summary-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
.summary-actions a{display:inline-flex;align-items:center;padding:6px 9px;border:1px solid #dce5f1;border-radius:7px;background:#f8fbff;color:#315b92;font-size:13px;font-weight:650;text-decoration:none}
.summary-actions a[hidden]{display:none}
.summary-actions a:hover{background:#ecf4ff}
.summary-actions #summary-media-link{background:#e8f0ff;border-color:#cdddf5}
#summary-id,.post-media-meta span:last-child{font-size:12px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.post-view #comment-filters,.post-view #stream-detail{scroll-margin-top:16px}
.post-view #comment-filters .filter-note{font-size:12px}
@media(max-width:760px){
  .post-view .post-summary{padding:15px;gap:10px}
  .post-view .summary-stats{border-top:1px solid #e5ebf4;padding-top:6px}
  .post-view .summary-stats>div{padding:4px 10px;min-width:0}
  .post-view .summary-stats>div:first-child{padding-left:0}
  .post-view .summary-stats strong{font-size:20px;margin:4px 0}
  .post-view #comment-filters{padding:13px}
}
@media(max-width:420px){
  .post-view .filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .post-view .filter-grid label:first-child{grid-column:1/-1}
}
.filter-explainer{margin-top:10px;color:#536c8a;font-size:12px}
.filter-explainer summary{cursor:pointer;width:max-content;font-weight:600}

.post-media-column{min-width:100px;white-space:nowrap}
.post-media-column .post-media-badge{font-weight:600;text-decoration:none}
.post-media-column .post-media-badge:hover{text-decoration:underline}
.post-media-column .post-media-badge:focus-visible{outline:2px solid #416da7;outline-offset:3px}


.collection-receipt-filter:not([hidden]){display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0 0 12px}
.collection-receipt-filter a{display:inline-block;border:1px solid #cddcf1;border-radius:8px;padding:6px 11px;color:#315b92;background:#f8fbff;text-decoration:none;font-size:13px;font-weight:650}
.collection-receipt-filter a:hover,.collection-receipt-filter .receipt-filter-active{background:#e8f0ff}
.collection-receipt-filter .muted{font-size:12px}
.post-media-badge--image.post-media-badge--archived{background:#e4f4ec;color:#24654a}
.post-media-badge--video.post-media-badge--archived{background:#e8efff;color:#2f5395}
.post-media-badge--watermark{background:#f2f3f5;color:#545b65}
.post-media-badge--watermark.is-detected{background:#fff0df;color:#954b13}
.post-media-column .post-media-badge{display:block;width:max-content;margin:2px 0}

.collection-receipt-filter .receipt-category {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: #435c7e;
  font-size: 13px;
}
.receipt-category select { min-width: 110px; }
.receipt-summary {
  margin-bottom: 16px;
  border: 1px solid #dce5f2;
  border-radius: 12px;
  padding: 14px 18px;
  background: #fff;
}
.receipt-summary h2 { margin: 0 0 12px; font-size: 16px; }
.receipt-summary dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0; }
.receipt-summary dl > div { min-width: 0; padding: 9px 12px; border-radius: 8px; background: #f4f7fb; }
.receipt-summary dt { font-size: 12px; color: #526985; }
.receipt-summary dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) {
  .receipt-summary dl { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .collection-receipt-filter .receipt-category { margin-left: 0; }
}

.post-source-previews{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:18px}.post-source-preview{display:block;width:100%;max-height:280px;object-fit:contain;background:#f3f5f8;border-radius:8px}

/* Post detail: one summary, followed by its media and comments. */
.post-view #post-source-data{padding:20px 22px}
.post-view #post-source-data .list-heading{margin-bottom:8px}
.post-view #post-source-data .post-source-fields:empty,.post-view #post-source-data .post-source-links:empty{display:none}
.post-view .post-source-previews{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;margin-top:12px}
.post-view img.post-source-preview{height:210px;max-height:none}
.post-source-player {
  --post-video-max-height: min(65vh, 460px);
  --post-video-ratio: 1.77777778;
  position: relative;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 820px, calc(var(--post-video-max-height) * var(--post-video-ratio)));
  min-width: 0;
}
.post-source-picker {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 32%;
  color: #fff;
  font-size: 12px;
}
.post-source-picker > span { display: none; }
.post-source-picker select {
  min-width: 0;
  max-width: 100%;
  padding: 5px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
}
.post-source-picker option { background: #232c3b; color: #fff; }
.post-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86));
  color: #fff;
}
.post-video-controls[hidden] { display: none; }
.post-video-controls button {
  flex: none;
  border: 0;
  padding: 4px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
.post-video-download { flex:none; color:#fff; text-decoration:none; font-size:12px; white-space:nowrap; }
.post-video-download:focus-visible { outline:2px solid #a9c8f8; outline-offset:2px; }
.post-video-controls button:focus-visible,
.post-video-controls select:focus-visible,
.post-video-timeline:focus-visible {
  outline: 2px solid #a9c8f8;
  outline-offset: 2px;
}
.post-video-timeline { flex: 1 1 80px; min-width: 24px; margin: 0; accent-color: #fff; }
.post-video-time { flex: none; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-source-player:fullscreen { width: 100%; max-width: none; background: #000; }
.post-source-player:fullscreen video.post-source-preview { height: 100%; max-height: none; object-fit: contain; }
@media(max-width: 480px) {
  .post-video-controls { gap: 4px; padding-inline: 5px; }
  .post-video-time { font-size: 10px; }
  .post-source-picker { max-width: 26%; }
}
.post-view video.post-source-preview {
  width: 100%;
  height: auto;
  max-height: var(--post-video-max-height);
  aspect-ratio: var(--post-video-ratio);
  background: #111;
}
@media(max-width:600px){.post-view #post-source-data{padding:15px}.post-view .post-source-previews{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.post-view img.post-source-preview{height:160px}}

/* Keep long Douyin titles inside their column while preserving the full link text. */
.workspace-posts .post-title-column-douyin{width:250px;min-width:180px;max-width:250px}
.workspace-posts .post-title-column-douyin .post-list-title{display:flex;align-items:baseline;min-width:0;max-width:250px}
.workspace-posts .post-title-column-douyin .post-list-title>a{display:block;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-posts .post-title-column-douyin .post-pinned-badge{flex:none}
.post-source-image {
  display: grid;
  place-items: center;
  min-height: 210px;
  overflow: hidden;
  border-radius: 10px;
  background: #eef2f8;
  color: #526b8c;
  font: inherit;
  font-size: 13px;
}
.post-source-image:disabled { cursor: default; }
@media (max-width: 600px) {
  .post-source-image { min-height: 160px; }
}

/* Profile introductions retain line breaks. */
#comments-section tbody td:nth-child(9), #stream-detail tbody td:nth-child(11) { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 150px; max-width: 240px; }

/* Replies are indented under their parent comment, like the platform thread. */
.post-view #stream-detail tr.comment-reply-row{background:#fbfcfe}
.post-view #stream-detail tr.comment-reply-row>td:nth-child(4),.post-view #stream-detail tr.comment-reply-row>td.content-cell{padding-left:44px;position:relative}
.post-view #stream-detail tr.comment-reply-row>td:nth-child(4)::before,.post-view #stream-detail tr.comment-reply-row>td.content-cell::before{content:"";position:absolute;left:24px;top:10px;bottom:10px;border-left:2px solid #dbe3ef}
.comment-reply-target{margin-bottom:4px;color:#7a8aa2;font-size:12px;white-space:normal}
.comment-meta{margin-top:6px;color:#8a97ab;font-size:12px;white-space:normal}
/* Follow the phone list: customer comments stand out, merchant replies recede. */
.post-view #stream-detail tr.comment-user-row>td:nth-child(4)>a:first-child{font-weight:700;color:#1d3a6e}
.post-view #stream-detail tr.comment-user-row>td.content-cell{color:#17243b;font-size:14px;font-weight:500}
.post-view #stream-detail tr.comment-author-row>td{color:#8d99ab;font-size:12px}
.post-view #stream-detail tr.comment-author-row>td a{color:#8d99ab}
.post-view #stream-detail tr.comment-author-row>td.content-cell{color:#8d99ab;font-weight:400}
.post-view #stream-detail tr.comment-author-row .kind.comment-role{color:#9aa6b6;font-weight:500}

/* Compact merchant navigation: keep complete names and metadata readable. */
.collection-home .collection{padding-left:10px;padding-right:10px}
.collection-home .merchant-workspace{gap:10px}
.collection-home .merchant-sidebar .list-heading{padding:12px 10px 8px;gap:6px}
.collection-home .merchant-sidebar .list-heading h2{margin-bottom:2px;font-size:16px}
.collection-home .merchant-sidebar .list-heading .muted{font-size:12px}
.collection-home .workspace-merchants{padding:0 5px 6px}
.collection-home .workspace-merchant{padding:8px 6px;border-radius:7px;grid-template-columns:18px minmax(0,1fr);column-gap:5px;row-gap:2px;line-height:1.35}
.collection-home .workspace-merchant>strong{font-size:13px;line-height:1.4}
.collection-home .workspace-merchant>small{margin:0;font-size:11px;line-height:1.4}
.collection-home .workspace-merchant-number{font-size:11px;line-height:1.65}
.collection-home .workspace-merchant:hover{background:#f3f6fb}
.collection-home .workspace-merchant[aria-pressed=true]{background:#e8f0ff;box-shadow:inset 3px 0 #4268a8}
@media(max-width:760px){.collection-home .collection{padding-left:8px;padding-right:8px}}

/* Merchant heading and category form share one consistent compact layout. */
.collection-home .merchant-sidebar>.list-heading{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 10px;gap:8px}
.collection-home .merchant-sidebar>.list-heading h2{margin:0;font-size:15px;line-height:24px}
.collection-home .merchant-sidebar>.list-heading .muted{display:none}
.collection-home .merchant-sidebar>.list-heading .badge{flex:none;padding:2px 8px;line-height:20px;font-variant-numeric:tabular-nums}
.collection-home .merchant-sidebar>label{display:flex;align-items:center;gap:8px;margin:0 10px 8px;padding:0;color:#66758c;font-size:12px;white-space:nowrap}
.collection-home .merchant-sidebar>label[hidden]{display:none}
.collection-home .merchant-sidebar>label>select{flex:1;min-width:0;width:100%;height:34px;margin:0;padding:0 24px 0 9px;border:1px solid #dce3ed;border-radius:7px;background-color:#f8fafd;color:#243b60;font:inherit;font-weight:600;cursor:pointer}
.collection-home .merchant-sidebar>label>select:focus-visible{outline:2px solid #739ce0;outline-offset:2px}

.merchant-search-tools{padding:0 10px 8px}.merchant-search-tools input{box-sizing:border-box;width:100%;height:34px;padding:0 9px;border:1px solid #dce3ed;border-radius:7px;font:inherit;font-size:12px}.merchant-search-tools small{display:block;font-size:11px;color:#66758c;margin-top:4px}.merchant-search-tools small:empty{display:none}
.workspace-merchant[hidden]{display:none!important}.collection-home .workspace-scan-time{display:none}.merchant-profile-disclosure{margin:0 12px 12px;border:1px solid #e7ecf3;border-radius:8px}.merchant-profile-disclosure>summary{padding:10px 12px;cursor:pointer;color:#4268a8;font-size:13px;font-weight:600}.merchant-profile-disclosure .workspace-profile{margin:0!important;min-height:0;border:0}
.workspace-post-tools .compact-columns-toggle{display:flex;align-items:center;gap:6px;align-self:center;font-weight:400}.workspace-post-tools .compact-columns-toggle input{width:16px;height:16px;margin:0}
.compact-post-columns th:nth-child(9),.compact-post-columns td:nth-child(9),.compact-post-columns th:nth-child(10),.compact-post-columns td:nth-child(10){display:none}
@media(min-width:761px){.collection-home .merchant-sidebar{position:sticky;top:10px;max-height:calc(100vh - 20px);overflow:auto;scrollbar-gutter:stable}.collection-home .compact-post-columns table{min-width:900px}}

@media(min-width:761px){.collection-home .merchant-workspace{grid-template-columns:minmax(180px,var(--merchant-sidebar-width,230px)) 12px minmax(0,1fr);gap:0}.merchant-resizer{align-self:stretch;min-height:100px;cursor:col-resize;touch-action:none;position:relative}.merchant-resizer::after{content:"";position:absolute;top:12px;bottom:12px;left:5px;width:2px;background:#d9e2ef;border-radius:3px}.merchant-resizer:hover::after,.merchant-resizer:focus-visible::after,.merchant-resizer.dragging::after{background:#5685d1;width:4px;left:4px}.merchant-resizer:focus-visible{outline:2px solid #739ce0;outline-offset:-2px}}
@media(max-width:760px){.merchant-resizer{display:none}}


/* ============================================================================
 * 2026-11-23 Flagship UI & UX Polish (collection.html & wedding_category views)
 * ============================================================================ */
:root {
  --c-bg: #f3f6fb;
  --c-surface: #ffffff;
  --c-surface-soft: #f8fafd;
  --c-ink: #16233a;
  --c-ink-2: #334562;
  --c-muted: #64758f;
  --c-line: #e4eaf3;
  --c-line-strong: #cdd8e9;
  --c-brand: #395fd4;
  --c-brand-hover: #2c4ec0;
  --c-brand-soft: #eef3ff;
  --c-brand-border: #c5d5f8;
  --c-green-bg: #e7f6ef;
  --c-green-text: #186b4a;
  --c-amber-bg: #fff4e0;
  --c-amber-text: #945608;
  --c-blue-bg: #e9f2ff;
  --c-blue-text: #2254a1;
  --c-gray-bg: #f1f4f9;
  --c-gray-text: #5f6f86;
  --c-shadow-sm: 0 1px 3px rgba(22, 35, 58, 0.04), 0 6px 18px rgba(22, 35, 58, 0.045);
  --c-shadow-md: 0 4px 14px rgba(22, 35, 58, 0.07), 0 12px 32px rgba(22, 35, 58, 0.06);
}

body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
}

/* Polished login card */
#collection-login {
  max-width: 440px;
  margin: min(10vh, 84px) auto;
  padding: 28px 28px 24px;
  border-radius: 18px;
  border: 1px solid var(--c-line);
  box-shadow: var(--c-shadow-md);
}
#collection-login h1 {
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--c-ink);
}
#collection-login > p {
  color: var(--c-muted);
  font-size: 13.5px;
  line-height: 1.65;
  margin-bottom: 18px;
}
#collection-login-form label,
#collection-register-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink-2);
}
#collection-login-form input,
#collection-register-form input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--c-line-strong);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--c-ink);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
#collection-login-form input:focus,
#collection-register-form input:focus {
  outline: none;
  border-color: var(--c-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(57, 95, 212, 0.14);
}
#collection-login-form button[type="submit"],
#collection-register-form button[type="submit"] {
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--c-brand);
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(57, 95, 212, 0.24);
}
#collection-login-form button[type="submit"]:hover,
#collection-register-form button[type="submit"]:hover {
  background: var(--c-brand-hover);
}
#collection-register {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
}
#collection-register summary {
  cursor: pointer;
  color: var(--c-brand);
  font-weight: 600;
  font-size: 13.5px;
}
#collection-register-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
#collection-register-code {
  height: 40px;
  border: 1px solid var(--c-brand-border);
  border-radius: 10px;
  background: var(--c-brand-soft);
  color: var(--c-brand);
  font-weight: 600;
}

/* Top bar & hero refinement */
#collection-session-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--c-muted);
}
#collection-session-name {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--c-line);
  color: var(--c-ink-2);
  font-weight: 600;
}
#collection-logout {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--c-line-strong);
  background: #fff;
  color: var(--c-ink-2);
  font-size: 12px;
  font-weight: 600;
}
#collection-logout:hover {
  border-color: #d8a9a9;
  color: #a63232;
  background: #fff6f6;
}
.collection > #collection-protected > .back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-muted);
  padding: 2px 0;
}
.collection > #collection-protected > .back:hover {
  color: var(--c-brand);
}
.collection .hero {
  margin: 8px 0 12px;
  gap: 12px;
}
.collection .hero h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--c-ink);
}
.collection .hero .muted {
  font-size: 13px;
  color: var(--c-muted);
}
.collection .collection-geo-link {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--c-brand-soft);
  border: 1px solid var(--c-brand-border);
  color: var(--c-brand);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.collection .collection-geo-link:hover {
  background: #dfe9ff;
}
#status.badge {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--c-line);
  color: var(--c-ink-2);
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(22, 35, 58, 0.04);
}

/* Category Navigation Cards (local / destination / b2b) */
.collection .collection-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.collection .collection-category-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 7px;
  padding: 11px 13px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 13px;
  box-shadow: var(--c-shadow-sm);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.collection .collection-category-row:hover {
  border-color: var(--c-line-strong);
  box-shadow: 0 4px 14px rgba(22, 35, 58, 0.06);
}
.collection .collection-category-row.is-active {
  background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
  border-color: var(--c-brand);
  box-shadow: 0 4px 16px rgba(57, 95, 212, 0.13);
}
.collection .collection-category-name {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  margin-bottom: 3px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef2f8;
}
.collection .collection-category-row.is-active .collection-category-name {
  color: var(--c-brand);
  border-bottom-color: #dce6fa;
}
.collection .collection-category-row.is-active .collection-category-name::after {
  content: "当前分类";
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--c-brand);
  color: #fff;
}
.collection .collection-category-row a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--c-surface-soft);
  color: var(--c-ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.collection .collection-category-row a:hover {
  background: var(--c-brand-soft);
  color: var(--c-brand);
  border-color: var(--c-brand-border);
}
.collection .collection-category-row a.is-current {
  background: var(--c-brand);
  color: #fff;
  border-color: var(--c-brand);
  box-shadow: 0 2px 8px rgba(57, 95, 212, 0.22);
}
.collection .collection-category-row a.is-current .collection-nav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.collection .collection-nav-count {
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e9effa;
  color: #355894;
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.collection .collection-storage-label {
  margin-left: auto;
  font-size: 11px;
  color: #8493a8;
  font-weight: 600;
}
.collection .collection-nav-count--media {
  background: #f1f5fa;
  color: #556781;
  font-size: 11px;
  padding: 2px 7px;
}
@media (max-width: 1180px) {
  .collection .collection-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .collection .collection-category-name {
    flex: 0 0 auto;
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    gap: 6px;
  }
}

/* Unified surface cards */
.card {
  border: 1px solid var(--c-line);
  border-radius: 15px;
  box-shadow: var(--c-shadow-sm);
}

/* Fix wide-screen workspace-posts grid so .merchant-profile-disclosure flows cleanly */
@media (min-width: 1200px) {
  .collection-home .workspace-posts {
    display: flex;
    flex-direction: column;
  }
  .collection-home .workspace-posts > .list-heading {
    padding: 16px 20px 10px;
  }
  .collection-home #workspace-profile {
    margin: 0 !important;
  }
}

/* Compact 4-KPI Overview strip */
.collection-home #workspace-collection-overview {
  margin: 0 20px 10px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fafcff 0%, #f4f7fc 100%);
  border: 1px solid var(--c-line);
  border-radius: 12px;
}
.collection-home #workspace-collection-overview h3 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-muted);
  margin: 0 0 8px;
}
.collection-home #workspace-collection-overview .merchant-fields {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 0 !important;
}
.collection-home .overview-kpi {
  background: #fff;
  border: 1px solid #e6ecf6;
  border-radius: 10px;
  padding: 8px 11px;
  min-width: 0;
}
.collection-home .overview-kpi dt {
  font-size: 11.5px;
  color: var(--c-muted);
  font-weight: 500;
  margin: 0 0 3px;
}
.collection-home .overview-kpi dd {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.collection-home #workspace-collection-overview p {
  margin: 8px 0 0;
  font-size: 11.5px;
  color: #7c8ca3;
}
@media (max-width: 960px) {
  .collection-home #workspace-collection-overview .merchant-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  .collection-home #workspace-collection-overview {
    margin: 0 14px 10px;
  }
}

/* Profile disclosure card */
.collection-home .merchant-profile-disclosure {
  margin: 0 20px 12px;
  border: 1px solid var(--c-line);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.collection-home .merchant-profile-disclosure > summary {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-brand);
  background: #fafcff;
  user-select: none;
}
.collection-home .merchant-profile-disclosure[open] > summary {
  border-bottom: 1px solid var(--c-line);
}
@media (max-width: 760px) {
  .collection-home .merchant-profile-disclosure {
    margin: 0 14px 10px;
  }
}

/* Merchant sidebar & Destination Brand Groups */
.collection-home .merchant-sidebar {
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #d1dceb transparent;
}
.collection-home .merchant-search-tools input {
  height: 36px;
  background: var(--c-surface-soft);
  border: 1px solid var(--c-line-strong);
  border-radius: 9px;
  padding: 0 10px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.collection-home .merchant-search-tools input:focus {
  outline: none;
  background: #fff;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(57, 95, 212, 0.12);
}
.brand-accounts-box {
  margin: 0 10px 8px;
  border: 1px solid #dfe8f7;
  border-radius: 10px;
  background: #f7faff;
  overflow: hidden;
}
.brand-accounts-box > summary {
  padding: 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-brand);
  cursor: pointer;
  user-select: none;
}
.brand-accounts-body {
  padding: 4px 10px 10px;
  max-height: 260px;
  overflow: auto;
  font-size: 12px;
  border-top: 1px solid #e4ecf8;
}
.brand-accounts-body section {
  padding: 6px 0;
  border-bottom: 1px dashed #e2eaf6;
}
.brand-accounts-body section:last-child {
  border-bottom: 0;
}
.brand-accounts-body ul {
  margin: 4px 0 2px;
  padding-left: 16px;
}
.brand-accounts-body .list-action {
  text-align: left;
  white-space: normal;
  font-size: 12px;
  line-height: 1.45;
  padding: 2px 0;
}

/* Merchant sidebar item with crisp right-aligned post-count pill */
.collection-home .workspace-merchant {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  column-gap: 6px;
  row-gap: 2px;
  align-items: center;
  padding: 9px 8px;
  margin-bottom: 2px;
  border-radius: 9px;
  transition: background 0.14s ease, color 0.14s ease;
}
.collection-home .workspace-merchant-number {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  padding-top: 1px;
  color: #8b99ae;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.collection-home .workspace-merchant > strong {
  grid-column: 2;
  grid-row: 1;
  font-size: 13px;
  font-weight: 650;
  color: var(--c-ink);
  line-height: 1.35;
}
.collection-home .workspace-merchant-count-pill {
  grid-column: 3;
  grid-row: 1;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eff3fa;
  color: #4b6182;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.collection-home .workspace-merchant > small {
  grid-column: 2 / span 2;
  grid-row: 2;
  color: var(--c-muted);
  font-size: 11px;
}
.collection-home .workspace-merchant:hover {
  background: #f1f5fc;
}
.collection-home .workspace-merchant[aria-pressed="true"] {
  background: var(--c-brand-soft);
  box-shadow: inset 3px 0 0 var(--c-brand);
}
.collection-home .workspace-merchant[aria-pressed="true"] > strong {
  color: var(--c-brand);
}
.collection-home .workspace-merchant[aria-pressed="true"] .workspace-merchant-count-pill {
  background: var(--c-brand);
  color: #fff;
}

/* Workspace tools bar */
.collection-home .workspace-post-tools {
  padding: 0 20px 14px;
  gap: 10px;
}
.collection-home .workspace-post-tools input,
.collection-home .workspace-post-tools select {
  height: 38px;
  border-radius: 9px;
  border-color: var(--c-line-strong);
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.collection-home .workspace-post-tools input:focus,
.collection-home .workspace-post-tools select:focus {
  outline: none;
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(57, 95, 212, 0.12);
}
.workspace-tool-btn {
  height: 38px;
  padding: 0 13px;
  border: 1px solid var(--c-line-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--c-ink-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.workspace-tool-btn:hover {
  background: var(--c-brand-soft);
  border-color: var(--c-brand-border);
  color: var(--c-brand);
}

/* Sticky Table Header & Enhanced Data Scannability */
.table-scroll {
  scrollbar-width: thin;
  scrollbar-color: #cfdbe9 transparent;
}
.workspace-posts .table-scroll {
  max-height: 74vh;
  border-top: 1px solid var(--c-line);
}
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f6f9fd;
  color: #5b6d87;
  font-weight: 700;
  font-size: 12px;
  box-shadow: inset 0 -1px 0 var(--c-line);
}
.workspace-posts tbody td {
  padding: 12px 12px;
  vertical-align: middle;
  border-top-color: #eef2f8;
}
.workspace-posts tbody tr:hover {
  background: #f5f9ff;
}
.workspace-posts .post-list-title a {
  color: var(--c-ink);
  font-weight: 650;
  line-height: 1.45;
}
.workspace-posts .post-list-title a:hover {
  color: var(--c-brand);
}
.post-copy-id {
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid #d8e2f0;
  border-radius: 5px;
  background: #f8fafd;
  color: #556b8b;
  font-size: 11px;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.14s, background 0.14s, color 0.14s;
}
tr:hover .post-copy-id,
.post-copy-id:focus-visible {
  opacity: 1;
}
.post-copy-id:hover {
  background: var(--c-brand-soft);
  border-color: var(--c-brand-border);
  color: var(--c-brand);
}
.post-type-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.post-type-pill.is-video {
  background: var(--c-blue-bg);
  color: var(--c-blue-text);
}
.post-type-pill.is-note {
  background: var(--c-green-bg);
  color: var(--c-green-text);
}
.post-type-pill.is-unknown {
  background: var(--c-gray-bg);
  color: var(--c-gray-text);
}
.metric-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.metric-cell.is-nonzero {
  font-weight: 700;
  color: var(--c-ink);
}
.broadcast-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--c-green-bg);
  color: var(--c-green-text);
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.scan-status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.scan-status-pill.is-done {
  background: var(--c-green-bg);
  color: var(--c-green-text);
}
.scan-status-pill.is-active {
  background: var(--c-blue-bg);
  color: var(--c-blue-text);
}
.scan-status-pill.is-warn {
  background: var(--c-amber-bg);
  color: var(--c-amber-text);
}
.scan-status-pill.is-muted {
  background: var(--c-gray-bg);
  color: var(--c-gray-text);
}
.date-col,
.activity-col {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  white-space: nowrap;
}
.post-edit-date {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--c-muted);
}
.workspace-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--c-brand-border);
  background: var(--c-brand-soft);
  color: var(--c-brand) !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.workspace-detail-btn:hover {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff !important;
}

/* Floating feedback toast */
.collection-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 999;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(22, 35, 58, 0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.collection-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}


/* === 2026-11-23 Phone Dispatch Workspace === */
.collection-devices-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #f3f0ff;
  border: 1px solid #d5c8fb;
  color: #5b32c2;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.collection-devices-link:hover,
.collection-devices-link.is-current {
  background: #5b32c2;
  border-color: #5b32c2;
  color: #ffffff;
}
.collection-dispatch-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #c6d7fb;
  color: #264cc2;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.collection-dispatch-link:hover,
.collection-dispatch-link.is-current {
  background: #2f57d8;
  border-color: #2f57d8;
  color: #ffffff;
}
.dispatch-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}
.dispatch-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dispatch-refresh-btn,
.dispatch-op-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d2dcf0;
  background: #f6f9ff;
  color: #2849b4;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.dispatch-op-btn.primary {
  border-color: #2f57d8;
  background: #2f57d8;
  color: #ffffff;
}
.dispatch-op-btn.primary:hover {
  background: #2446b8;
}
.dispatch-refresh-btn:hover,
.dispatch-op-btn:hover {
  background: #e9f0ff;
}
.dispatch-op-btn.danger {
  border-color: #f4c6cc;
  background: #fff4f5;
  color: #b42334;
}
.dispatch-op-btn.danger:hover {
  background: #ffe4e8;
}
.dispatch-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.dispatch-device-card {
  text-align: left;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid #e1e8f5;
  background: #fbfdff;
  color: #16233a;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.dispatch-device-card:hover {
  border-color: #9bb5f0;
  background: #ffffff;
}
.dispatch-device-card.is-selected {
  border-color: #2f57d8;
  background: #f4f8ff;
  box-shadow: 0 4px 16px rgba(47, 87, 216, 0.14);
}
.dispatch-device-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dispatch-device-top strong {
  font-size: 15px;
  color: #122038;
}
.dispatch-device-account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #eef3fe;
  font-size: 13px;
}
.dispatch-account-label {
  color: #566b8c;
  font-size: 12px;
  flex: none;
}
.dispatch-account-value {
  font-weight: 600;
  color: #1d3c9c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-device-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  color: #5b6e8c;
}
.dispatch-device-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dispatch-device-progress {
  font-size: 12px;
  color: #465a78;
  background: #f1f5fb;
  border-radius: 8px;
  padding: 5px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.dispatch-pill.ok { background: #e6f6ee; color: #166a47; }
.dispatch-pill.info { background: #e9f1ff; color: #244ec6; }
.dispatch-pill.warn { background: #fff4e0; color: #9a5400; }
.dispatch-pill.danger { background: #ffebee; color: #b42334; }
.dispatch-pill.muted { background: #eef2f7; color: #5f708b; }
.dispatch-empty {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: 12px;
  background: #f7f9fd;
  border: 1px dashed #cfd9eb;
  color: #5a6d8a;
  font-size: 13.5px;
}
.dispatch-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}
.dispatch-form-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
}
.dispatch-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e5d;
}
.dispatch-form select,
.dispatch-form textarea {
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cfd9eb;
  background: #ffffff;
  color: #16233a;
}
.dispatch-form textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.dispatch-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.dispatch-submit-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: #2f57d8;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.dispatch-submit-btn:hover { background: #2446b8; }
.dispatch-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.dispatch-task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 12px;
}
.dispatch-task-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #465a78;
}
.dispatch-task-filters select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  background: #fff;
}
.dispatch-result-cell {
  max-width: 240px;
  font-size: 12.5px;
  color: #4b5e7c;
  word-break: break-word;
}
.dispatch-ops {
  white-space: nowrap;
  display: flex;
  gap: 6px;
}
@media (max-width: 720px) {
  .dispatch-form-row { grid-template-columns: 1fr; }
}


/* === Password visibility toggle on collection login/register === */
#collection-login .password-field {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
#collection-login .password-field > input {
  flex: 1 1 0;
  width: 0;
  min-width: 0;
}
#collection-login .password-toggle {
  flex: none;
  min-width: 58px;
  padding: 0 12px;
  border: 1px solid #d5dfef;
  border-radius: 10px;
  background: #f2f6ff;
  color: #2f55c8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
#collection-login .password-toggle:hover {
  background: #e5eeff;
  border-color: #aac0f5;
}

#collection-login .collection-remember-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #4f6280;
  cursor: pointer;
}
#collection-login .collection-remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: none;
  accent-color: #2f57d8;
}

/* === Device specs grid & inline actions on dispatch cards === */
.dispatch-device-specs {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f5f8fd;
  border: 1px solid #e6edf8;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  font-size: 12px;
}
.dispatch-device-specs > div {
  min-width: 0;
}
.dispatch-device-specs dt {
  color: #6b7d99;
  font-size: 11px;
  margin: 0 0 1px;
}
.dispatch-device-specs dd {
  margin: 0;
  color: #1a2a44;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-device-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e1e8f5;
  margin-top: 2px;
}

/* === 2026-11-24 Merchant Classification Management === */
.collection-merchants-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #edf9f3;
  border: 1px solid #bce4cf;
  color: #156d49;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.collection-merchants-link:hover,
.collection-merchants-link.is-current {
  background: #177b52;
  border-color: #177b52;
  color: #ffffff;
}
.merchants-page {
  margin-top: 12px;
}
.merchants-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 12px;
}
.merchants-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #d5dfef;
  background: #f7f9fd;
  color: #2b3e5c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.merchants-tab strong {
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(20, 40, 80, 0.08);
  font-size: 12px;
}
.merchants-tab:hover {
  background: #edf3ff;
  border-color: #aac0f5;
}
.merchants-tab.is-warn {
  background: #fff8eb;
  border-color: #f3d296;
  color: #8f4e00;
}
.merchants-tab.is-active {
  background: #2f57d8;
  border-color: #2f57d8;
  color: #ffffff;
}
.merchants-tab.is-warn.is-active {
  background: #c26a00;
  border-color: #c26a00;
  color: #ffffff;
}
.merchants-tab.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.merchants-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.merchants-search-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #2b3e5c;
  flex: 1 1 320px;
}
.merchants-search-label input {
  flex: 1;
  min-width: 220px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #cfd9eb;
  font-size: 13.5px;
}
.merchants-history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #485c7a;
  cursor: pointer;
}
.merchants-history-toggle input {
  width: 15px;
  height: 15px;
  accent-color: #2f57d8;
}
.merchants-table tr.merchant-row-doubt {
  background: #fffcf4;
}
.merchant-idx {
  color: #6b7d99;
  font-variant-numeric: tabular-nums;
  width: 44px;
}
.merchant-info-cell {
  min-width: 250px;
  max-width: 360px;
}
.merchant-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.merchant-name-link {
  font-weight: 700;
  color: #162542;
  text-decoration: none;
}
.merchant-name-link:hover {
  color: #2f57d8;
  text-decoration: underline;
}
.merchant-account-code {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #eef3fb;
  color: #365280;
}
.merchant-ip-tag {
  font-size: 11.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #556884;
}
.merchant-company-line {
  margin-top: 4px;
  font-size: 12.5px;
  color: #33496b;
}
.merchant-bio-line {
  margin-top: 3px;
  font-size: 12px;
  color: #687b97;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.merchant-cat-cell {
  min-width: 190px;
}
.merchant-cat-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.merchant-cat-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.merchant-cat-pill.cat-destination {
  background: #e8f0ff;
  color: #224cc2;
}
.merchant-cat-pill.cat-local {
  background: #e3f7ef;
  color: #126d47;
}
.merchant-cat-pill.cat-local_planner {
  background: #fff3e6;
  color: #b45309;
}
.merchant-cat-pill.cat-b2b {
  background: #f3ebff;
  color: #6732b8;
}
.merchant-cat-pill.cat-microfilm {
  background: #fff0f6;
  color: #b82964;
}
.merchant-group-line {
  margin-top: 5px;
  font-size: 12px;
  color: #546885;
}
.merchant-note-line {
  margin-top: 3px;
  font-size: 12px;
  color: #3b4f6e;
}
.merchant-doubt-cell {
  min-width: 210px;
  max-width: 280px;
}
.merchant-doubt-reasons {
  margin: 5px 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: #8f4e00;
  line-height: 1.45;
}
.merchant-suggest-line {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #244ec6;
}
.merchant-stat-cell {
  min-width: 125px;
  font-size: 12.5px;
  color: #2c3e5d;
  white-space: nowrap;
}
.merchant-meta-small {
  margin-top: 3px;
  font-size: 11.5px;
  color: #6c7f9b;
}
.merchant-action-cell {
  min-width: 235px;
}
.merchant-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.merchant-cat-select {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  background: #ffffff;
  color: #16233a;
  font-size: 12.5px;
}
.merchant-save-btn {
  white-space: nowrap;
}
.merchant-row-msg {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

/* === 2026-11-24 Hero V2 & 4-Column Category Bento Navigation === */
.collection .hero.collection-hero-v2 {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 10px 0 16px;
}

.collection .hero.collection-hero-v2 > .hero-top-bar {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  width: 100%;
  min-width: 0;
}

.collection .hero.collection-hero-v2 .hero-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.collection .hero.collection-hero-v2 h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #132036;
}

.collection .hero.collection-hero-v2 .hero-title-group .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #6b7c96;
}

.collection .hero.collection-hero-v2 .hero-right-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}

/* Unified segmented utility rail */
.collection .hero.collection-hero-v2 .collection-tool-rail {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: #edf1f8;
  border: 1px solid #dfe6f2;
}

.collection .hero.collection-hero-v2 .tool-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 0;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #415370;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.collection .hero.collection-hero-v2 .tool-pill:hover {
  background: #ffffff;
  color: #1b3668;
  border-color: #d8e2f3;
  box-shadow: 0 1px 3px rgba(18, 32, 56, 0.06);
}

.collection .hero.collection-hero-v2 .tool-pill.collection-devices-link.is-current {
  background: #5b32c2;
  border-color: #5b32c2;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(91, 50, 194, 0.24);
}

.collection .hero.collection-hero-v2 .tool-pill.collection-dispatch-link.is-current {
  background: #2554d4;
  border-color: #2554d4;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 84, 212, 0.24);
}

.collection .hero.collection-hero-v2 .tool-pill.collection-merchants-link.is-current {
  background: #147a52;
  border-color: #147a52;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 122, 82, 0.24);
}

.collection .hero.collection-hero-v2 .tool-pill.collection-geo-link:hover {
  background: #ffffff;
  color: #2554d4;
}

.collection .hero.collection-hero-v2 #status.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dce4f2;
  color: #3b4f6e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(18, 32, 56, 0.04);
}

/* 5-column responsive category bento grid */
.collection .hero.collection-hero-v2 .collection-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  width: 100%;
}

/* Per-category semantic palette */
.collection .hero.collection-hero-v2 .collection-category-row {
  --cat-accent: #2554d4;
  --cat-soft: #eef4ff;
  --cat-soft-hover: #e2ecff;
  --cat-border: #bfd4ff;
  --cat-ink: #1e42a8;
  --cat-glow: rgba(37, 84, 212, 0.14);

  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 11px 12px 10px;
  background: #ffffff;
  border: 1px solid #e3eaf4;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(19, 32, 54, 0.035);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.collection .hero.collection-hero-v2 .collection-category-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-accent);
  opacity: 0.28;
  transition: opacity 0.16s ease;
}

.collection .hero.collection-hero-v2 .collection-category-row[data-category="local"] {
  --cat-accent: #0f766e;
  --cat-soft: #ecfdf5;
  --cat-soft-hover: #d8f8ea;
  --cat-border: #a7f3d0;
  --cat-ink: #0f6b64;
  --cat-glow: rgba(15, 118, 110, 0.14);
}

.collection .hero.collection-hero-v2 .collection-category-row[data-category="local_planner"] {
  --cat-accent: #c2410c;
  --cat-soft: #fff7ed;
  --cat-soft-hover: #ffedd5;
  --cat-border: #fed7aa;
  --cat-ink: #9a3412;
  --cat-glow: rgba(194, 65, 12, 0.14);
}

.collection .hero.collection-hero-v2 .collection-category-row[data-category="destination"] {
  --cat-accent: #2554d4;
  --cat-soft: #eef4ff;
  --cat-soft-hover: #dfeaff;
  --cat-border: #bfd4ff;
  --cat-ink: #1e42a8;
  --cat-glow: rgba(37, 84, 212, 0.15);
}

.collection .hero.collection-hero-v2 .collection-category-row[data-category="b2b"] {
  --cat-accent: #6d28d9;
  --cat-soft: #f5f0ff;
  --cat-soft-hover: #ebe1ff;
  --cat-border: #d8c6fe;
  --cat-ink: #5b21b6;
  --cat-glow: rgba(109, 40, 217, 0.14);
}

.collection .hero.collection-hero-v2 .collection-category-row[data-category="microfilm"] {
  --cat-accent: #be185d;
  --cat-soft: #fdf2f8;
  --cat-soft-hover: #fbe4f1;
  --cat-border: #f9cbe0;
  --cat-ink: #9d174d;
  --cat-glow: rgba(190, 24, 93, 0.14);
}

.collection .hero.collection-hero-v2 .collection-category-row:hover {
  border-color: var(--cat-border);
  box-shadow: 0 6px 18px rgba(19, 32, 54, 0.065);
  transform: translateY(-1px);
}

.collection .hero.collection-hero-v2 .collection-category-row:hover::before {
  opacity: 0.72;
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active {
  background: linear-gradient(180deg, var(--cat-soft) 0%, #ffffff 52%);
  border-color: var(--cat-accent);
  box-shadow: 0 6px 18px var(--cat-glow);
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active::before {
  opacity: 1;
}

/* Card header */
.collection .hero.collection-hero-v2 .cat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.collection .hero.collection-hero-v2 .collection-category-name {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #16233a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active .collection-category-name {
  color: var(--cat-ink);
  border: 0;
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active .collection-category-name::after {
  content: none;
  display: none;
}

.collection .hero.collection-hero-v2 .cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat-accent);
  flex: none;
  box-shadow: 0 0 0 3px var(--cat-soft);
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active .cat-dot {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 5px var(--cat-border);
}

.collection .hero.collection-hero-v2 .cat-route-tag {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f3f6fb;
  border: 1px solid #e6ecf6;
  color: #64758f;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active .cat-route-tag {
  background: var(--cat-accent);
  border-color: var(--cat-accent);
  color: #ffffff;
}

/* 2x2 action tiles */
.collection .hero.collection-hero-v2 .cat-card-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.collection .hero.collection-hero-v2 .cat-card-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  height: 31px;
  padding: 0 6px;
  border-radius: 8px;
  border: 1px solid #edf1f8;
  background: #f7f9fd;
  color: #344763;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.collection .hero.collection-hero-v2 .cat-card-links a > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.collection .hero.collection-hero-v2 .cat-card-links a:hover {
  background: var(--cat-soft);
  border-color: var(--cat-border);
  color: var(--cat-ink);
}

.collection .hero.collection-hero-v2 .cat-card-links a .collection-nav-count {
  flex: none;
  margin-left: 0;
  padding: 1px 5px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e2e9f5;
  font-size: 10.5px;
  color: var(--cat-ink);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.collection .hero.collection-hero-v2 .cat-card-links a:hover .collection-nav-count {
  border-color: var(--cat-border);
  background: #ffffff;
}

.collection .hero.collection-hero-v2 .cat-card-links a .cat-link-arrow {
  flex: none;
  color: #96a5bc;
  font-size: 11.5px;
  font-weight: 700;
  transition: transform 0.14s ease, color 0.14s ease;
}

.collection .hero.collection-hero-v2 .cat-card-links a:hover .cat-link-arrow {
  color: var(--cat-accent);
  transform: translateX(2px);
}

.collection .hero.collection-hero-v2 .cat-card-links a.is-current {
  background: var(--cat-accent);
  border-color: var(--cat-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--cat-glow);
}

.collection .hero.collection-hero-v2 .cat-card-links a.is-current .collection-nav-count {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.collection .hero.collection-hero-v2 .cat-card-links a.is-current .cat-link-arrow {
  color: rgba(255, 255, 255, 0.9);
}

/* Compact archived media footer */
.collection .hero.collection-hero-v2 .cat-card-media {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid #eef2f8;
}

.collection .hero.collection-hero-v2 .collection-storage-label {
  margin-left: 0;
  font-size: 11px;
  font-weight: 600;
  color: #8494aa;
  white-space: nowrap;
}

.collection .hero.collection-hero-v2 .cat-media-chips {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.collection .hero.collection-hero-v2 .collection-nav-count--media {
  margin-left: 0;
  padding: 1px 7px;
  border-radius: 6px;
  background: #f2f5fa;
  border: 1px solid #e8eef7;
  color: #4f627d;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.collection .hero.collection-hero-v2 .collection-category-row.is-active .cat-card-media {
  border-top-color: var(--cat-border);
}

/* Responsive breakpoints */
@media (max-width: 1460px) {
  .collection .hero.collection-hero-v2 .collection-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 1040px) {
  .collection .hero.collection-hero-v2 .collection-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .collection .hero.collection-hero-v2 .collection-category-name {
    flex: 1 1 auto;
  }
}

@media (max-width: 680px) {
  .collection .hero.collection-hero-v2 .collection-links {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .collection .hero.collection-hero-v2 .hero-right-rail {
    width: 100%;
    justify-content: space-between;
  }
  .collection .hero.collection-hero-v2 .collection-tool-rail {
    width: 100%;
    justify-content: space-between;
  }
  .collection .hero.collection-hero-v2 .tool-pill {
    flex: 1 1 auto;
    padding: 6px 8px;
    font-size: 12px;
  }
}

/* === 2026-11-24 Public Device Whitelist Management === */
.dispatch-device-actions {
  flex-wrap: wrap;
}
.dispatch-device-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 9px;
  background: #f5f7fc;
  border: 1px dashed #d8e1f0;
  font-size: 12.5px;
}
.device-id-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: #1f355c;
  background: #ffffff;
  border: 1px solid #dde6f5;
  border-radius: 6px;
  padding: 2px 7px;
  user-select: all;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-copy-btn {
  flex: none;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #cfdcf2;
  background: #ffffff;
  color: #2c52b8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.device-copy-btn:hover {
  background: #eef4ff;
  border-color: #9fbaf5;
}
.whitelist-form {
  padding: 0 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.whitelist-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
}
.whitelist-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #3d4f6b;
}
.whitelist-form-grid input {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #d4dfef;
  background: #ffffff;
  color: #16233a;
  font: inherit;
  font-size: 13px;
}
.whitelist-form-grid input:focus {
  outline: none;
  border-color: #2554d4;
  box-shadow: 0 0 0 3px rgba(37, 84, 212, 0.12);
}
#whitelist-android-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.whitelist-id-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.whitelist-id-cell .device-copy-btn {
  margin-left: 0;
}
@media (max-width: 960px) {
  .whitelist-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .whitelist-form {
    padding: 0 18px 14px;
  }
  .whitelist-form-grid {
    grid-template-columns: 1fr;
  }
}

/* === 2026-11-24 Notification Review Side-by-Side Comparison === */
.notification-review-card {
  border-color: #f2d7a7;
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 72px);
  overflow: hidden;
}
.notification-review-card details {
  width: 100%;
}
.nr-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 13px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nr-summary::-webkit-details-marker {
  display: none;
}
.nr-summary::before {
  content: "▸";
  display: inline-block;
  color: #b4690e;
  font-size: 13px;
  transition: transform 0.16s ease;
}
.notification-review-card details[open] > .nr-summary::before {
  transform: rotate(90deg);
}
.nr-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: #1c2b44;
}
.nr-summary-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #fff0d1;
  border: 1px solid #f0c97a;
  color: #965300;
  font-size: 12px;
  font-weight: 700;
}
.nr-summary-hint {
  margin-left: auto;
  font-size: 12.5px;
  color: #7c8ca3;
}
.nr-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 0 20px 12px;
  border-bottom: 1px solid #f0e8d8;
}
.nr-toolbar > p {
  margin: 0;
  font-size: 13px;
}
.nr-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nr-refresh-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid #d5dfef;
  background: #ffffff;
  color: #2c4c86;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.nr-refresh-btn:hover {
  background: #f0f5ff;
  border-color: #aac0f5;
}
.nr-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px 20px;
}
.nr-card {
  border: 1px solid #e2e9f4;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px 18px;
  box-shadow: 0 3px 12px rgba(20, 35, 60, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nr-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.nr-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #16243b;
  line-height: 1.4;
}
.nr-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.nr-pill.is-warn {
  background: #fff3da;
  border: 1px solid #f2ca7d;
  color: #935100;
}
.nr-pill.is-info {
  background: #eaf1ff;
  border: 1px solid #bfd4ff;
  color: #2149b8;
}
.nr-pill.is-ok {
  background: #e5f7ee;
  border: 1px solid #a8e2c7;
  color: #136d47;
}
.nr-pill.is-danger {
  background: #ffecee;
  border: 1px solid #f4bcc4;
  color: #b42334;
}
.nr-pill.is-muted {
  background: #eef2f8;
  border: 1px solid #dce4f0;
  color: #546680;
}
.nr-diagnosis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid #e6edf7;
  background: #f7f9fd;
}
.nr-diagnosis.is-warn {
  background: #fffaf0;
  border-color: #f3d79e;
}
.nr-diagnosis.is-info {
  background: #f3f7ff;
  border-color: #c9dafc;
}
.nr-diagnosis-text {
  flex: 1 1 360px;
  min-width: 0;
}
.nr-diagnosis-summary {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #1e2f4a;
  line-height: 1.5;
}
.nr-diagnosis-guide {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #556884;
  line-height: 1.5;
}
.nr-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nr-copy-btn {
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid #cfdcf2;
  background: #ffffff;
  color: #2149b8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nr-copy-btn:hover {
  background: #eef4ff;
  border-color: #98b6f5;
}
.nr-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.nr-col {
  border: 1px solid #e5ecf6;
  border-radius: 11px;
  background: #fbfdff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.nr-col.is-current {
  border-color: #d4e1f9;
  background: #f9fbff;
}
.nr-col-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ebf0f8;
}
.nr-col-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1c2e4a;
}
.nr-quote {
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e7edf7;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}
.nr-quote-label {
  font-size: 11px;
  font-weight: 700;
  color: #7c8ca3;
}
.nr-quote-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #16243b;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}
.nr-fields {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.nr-field {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.45;
}
.nr-field dt {
  color: #71839c;
  font-weight: 600;
}
.nr-field dd {
  margin: 0;
  color: #233550;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.nr-field-val {
  overflow-wrap: anywhere;
}
.nr-diff-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.nr-diff-tag.is-same {
  background: #e5f7ee;
  color: #136d47;
}
.nr-diff-tag.is-diff {
  background: #ffecee;
  color: #b42334;
}
.nr-diff-tag.is-missing {
  background: #fff3da;
  color: #935100;
}
.nr-col-foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e6edf7;
}
.nr-raw-link {
  font-size: 12.5px;
  font-weight: 600;
  color: #2554d4;
  text-decoration: none;
}
.nr-raw-link:hover {
  text-decoration: underline;
}
.nr-empty-side {
  margin: 8px 0;
  font-size: 13px;
  color: #7c8ca3;
}
.nr-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.nr-btn {
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.nr-btn.is-secondary {
  background: #f3f6fb;
  border-color: #d3deef;
  color: #324663;
}
.nr-btn.is-secondary:hover {
  background: #e8effa;
}
.nr-btn.is-primary {
  background: #2554d4;
  border-color: #2554d4;
  color: #ffffff;
}
.nr-btn.is-primary:hover {
  background: #1d44b4;
}
.nr-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 820px) {
  .nr-compare {
    grid-template-columns: 1fr;
  }
  .nr-summary-hint {
    margin-left: 0;
    width: 100%;
  }
}

/* === 2026-11-24 Post Detail View V2 (view=post) === */
.post-view .collection {
  max-width: 1560px;
}

.post-view .hero.collection-hero-v2 {
  margin: 6px 0 12px;
  gap: 8px;
}

.post-view #post-back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.post-view #post-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d7e1f1;
  color: #26457a;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(20, 35, 60, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.post-view #post-back a:hover {
  background: #eff4ff;
  border-color: #a9c1f5;
  color: #1f48b8;
}

.post-view .delete-comments {
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #f0c9cd;
  background: #fff7f8;
  color: #b42334;
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.post-view .delete-comments:hover {
  background: #ffe6e9;
  border-color: #e49aa3;
}

/* Editorial Post Summary Hero Card */
.post-view .post-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 26px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid #dce5f4;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 62%, #f3f7ff 100%);
  box-shadow: 0 6px 22px rgba(22, 38, 66, 0.055);
  margin-bottom: 14px;
}

.post-view .post-summary-main {
  min-width: 0;
}

.post-view .post-kicker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #5b7299;
}

.post-view #summary-merchant {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #cdddfa;
  color: #2149b8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.post-view .post-summary h2 {
  margin: 8px 0 6px;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.38;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #132138;
}

.post-view .summary-meta {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: #60728d;
}

.post-view .summary-post-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 12px;
}

.post-view .summary-post-facts > div {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f3f6fc;
  border: 1px solid #e4ecf8;
  font-size: 12px;
}

.post-view .summary-post-facts dt {
  color: #6b7d97;
  font-weight: 600;
}

.post-view .summary-post-facts dd {
  margin: 0;
  color: #1d3150;
  font-weight: 700;
}

.post-view #summary-body-wrap {
  margin: 0 0 14px;
  border: 1px solid #e3ebf6;
  border-radius: 10px;
  background: #fbfdff;
  overflow: hidden;
}

.post-view #summary-body-wrap > summary {
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #36568a;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.post-view #summary-body-wrap > summary::-webkit-details-marker {
  display: none;
}

.post-view #summary-body-wrap > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s ease;
}

.post-view #summary-body-wrap[open] > summary::before {
  transform: rotate(90deg);
}

.post-view #summary-body-wrap > p {
  margin: 0;
  padding: 0 12px 12px;
  font-size: 13px;
  line-height: 1.7;
  color: #344763;
  max-height: 220px;
  overflow: auto;
  border-top: 1px dashed #e6edf7;
  padding-top: 10px;
}

.post-view .summary-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid #eaf0f8;
}

.post-view .summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-view .summary-actions a,
.post-view .summary-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 33px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid #d4dfef;
  background: #ffffff;
  color: #27477d;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.post-view .summary-actions a:hover {
  background: #eff4ff;
  border-color: #a9c1f5;
  color: #1e46b5;
}

.post-view .summary-actions #summary-media-link {
  background: #2554d4;
  border-color: #2554d4;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 84, 212, 0.22);
}

.post-view .summary-actions #summary-media-link:hover {
  background: #1d44b4;
  border-color: #1d44b4;
  color: #ffffff;
}

.post-view .summary-jump-btn {
  background: #fff5e0;
  border-color: #f0c97a;
  color: #965300;
}

.post-view .summary-jump-btn:hover {
  background: #ffeac0;
  border-color: #e4b14d;
  color: #7c4300;
}

.post-view #summary-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7d97;
}

.post-view .summary-id-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: #24395a;
  background: #f1f5fb;
  border: 1px solid #dde6f4;
  border-radius: 6px;
  padding: 2px 7px;
  user-select: all;
}

.post-view .summary-copy-id {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #d1def2;
  background: #ffffff;
  color: #2a50b5;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.post-view .summary-copy-id:hover {
  background: #eef4ff;
  border-color: #9cb8f4;
}

/* Right-side KPI Stat Cards */
.post-view .summary-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 1fr));
  gap: 10px;
  align-self: start;
}

.post-view .summary-stats > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2eaf6;
  border-left: 1px solid #e2eaf6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(20, 35, 60, 0.03);
}

.post-view .summary-stats > div.summary-stat-intent {
  background: linear-gradient(180deg, #effaf4 0%, #ffffff 100%);
  border-color: #bce6cf;
}

.post-view .summary-stats > div.summary-stat-intent strong {
  color: #0b6b49;
}

.post-view .summary-stats span {
  font-size: 11.5px;
  font-weight: 600;
  color: #6b7d97;
}

.post-view .summary-stats strong {
  margin: 5px 0 3px;
  font-size: 24px;
  font-weight: 800;
  color: #172a49;
  font-variant-numeric: tabular-nums;
}

.post-view .summary-stats small {
  font-size: 11px;
  color: #8595ac;
}

/* Compact Collapsible Media Gallery */
.post-view #post-source-data {
  padding: 16px 20px;
  margin-bottom: 14px;
}

.post-view #post-source-data .list-heading {
  padding: 0;
  margin-bottom: 10px;
}

.post-view #post-source-data .list-heading h2 {
  font-size: 15.5px;
  margin: 0 0 2px;
}

.post-view #post-source-data .post-source-fields {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f5f8fd;
  font-size: 12px;
  margin-bottom: 4px;
}

.post-view .post-source-previews {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.post-view .post-source-previews:not(.is-expanded) .is-extra-image {
  display: none;
}

.post-view .post-source-image {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid #e2eaf5;
  border-radius: 10px;
  overflow: hidden;
  background: #f2f5fa;
  cursor: zoom-in;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.post-view .post-source-image:hover {
  border-color: #9cb8f4;
  box-shadow: 0 6px 16px rgba(22, 38, 66, 0.1);
  transform: translateY(-1px);
}

.post-view img.post-source-preview {
  display: block;
  width: 100%;
  height: 156px;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
  background: #eef2f8;
  transition: transform 0.22s ease;
}

.post-view .post-source-image:hover img.post-source-preview {
  transform: scale(1.03);
}

.post-view .post-source-player {
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
}

.post-view .post-source-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px dashed #c8d7f0;
  background: #f7faff;
  color: #2950b5;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.post-view .post-source-expand-btn:hover {
  background: #edf4ff;
  border-color: #98b6f5;
}

/* Quick Filter Chips & Sleek Filter Bar */
.post-view #comment-filters {
  padding: 16px 20px;
  margin-bottom: 14px;
}

.post-quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f8;
}

.post-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d7e1f1;
  background: #f7f9fd;
  color: #364966;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.post-quick-chip:hover {
  background: #eef4ff;
  border-color: #aac0f5;
  color: #1f48b8;
}

.post-quick-chip-num {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(25, 45, 80, 0.08);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.post-quick-chip.is-active {
  background: #2554d4;
  border-color: #2554d4;
  color: #ffffff;
}

.post-quick-chip.is-price.is-active {
  background: #096647;
  border-color: #096647;
  color: #ffffff;
}

.post-quick-chip.is-active .post-quick-chip-num {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.post-view .filter-grid {
  grid-template-columns: minmax(200px, 1.8fr) repeat(4, minmax(115px, 1fr)) auto;
  gap: 10px 12px;
}

.post-view .filter-grid label,
.post-view .advanced-filter-grid label {
  font-size: 12px;
  color: #556884;
}

.post-view .filter-grid input,
.post-view .filter-grid select,
.post-view .filter-grid button,
.post-view .advanced-filter-grid input,
.post-view .advanced-filter-grid select {
  height: 36px;
  margin-top: 5px;
  font-size: 13px;
  border-radius: 8px;
  border-color: #d5dfef;
}

.post-view .filter-grid button {
  padding: 0 14px;
  font-weight: 600;
  background: #f7f9fd;
  color: #3d5170;
}

.post-view .filter-grid button:hover {
  background: #eef3fc;
  border-color: #b8c9e6;
}

.post-view .advanced-filters {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef2f8;
}

/* High-Scannability Comments Table */
.post-view #stream-detail {
  overflow: hidden;
}

.post-view #stream-detail .list-heading {
  padding: 16px 20px 12px;
}

.post-view #stream-detail .table-scroll {
  max-height: 78vh;
  border-top: 1px solid #e6edf7;
}

.post-view #stream-detail table {
  min-width: 1120px;
  font-size: 13px;
}

.post-view #stream-detail th,
.post-view #stream-detail td {
  padding: 11px 12px;
  border-top-color: #eef2f8;
}

.post-view #stream-detail th:nth-child(4),
.post-view #stream-detail td:nth-child(4) {
  width: 148px;
  min-width: 128px;
  max-width: 170px;
}

.post-view #stream-detail td:nth-child(4) > a {
  font-weight: 700;
  color: #1c3563;
  text-decoration: none;
}

.post-view #stream-detail td:nth-child(4) > a:hover {
  color: #2554d4;
  text-decoration: underline;
}

.post-view #stream-detail .comment-account a {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  color: #5b7399;
  text-decoration: none;
}

.post-view #stream-detail .comment-account a:hover {
  color: #2554d4;
  text-decoration: underline;
}

.post-view #stream-detail .content-cell {
  width: auto;
  min-width: 240px;
  max-width: 380px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #17263f;
}

.post-view #stream-detail .comment-meta {
  margin-top: 5px;
  font-size: 11.5px;
  color: #7c8ca3;
}

.post-view #stream-detail td:has(> .comment-date-line) {
  width: 175px;
  min-width: 165px;
  font-size: 12px;
}

/* Numeric stat columns compact & tabular */
.post-view #stream-detail th:nth-child(12),
.post-view #stream-detail td:nth-child(12),
.post-view #stream-detail th:nth-child(13),
.post-view #stream-detail td:nth-child(13),
.post-view #stream-detail th:nth-child(14),
.post-view #stream-detail td:nth-child(14),
.post-view #stream-detail th:nth-child(15),
.post-view #stream-detail td:nth-child(15) {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: #465a78;
}

.post-view .comment-bio-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 200px;
  font-size: 12px;
  color: #5b6d87;
  line-height: 1.45;
}

/* Semantic Row States: Target Capture / High-Intent / Reply / Author */
.post-view #stream-detail tbody tr.comment-price-row {
  background: #f5fcf8;
  box-shadow: inset 3px 0 0 #096647;
}

.post-view #stream-detail tbody tr.comment-author-row {
  background: #faf8ff;
}

.post-view #stream-detail tbody tr.comment-reply-row .content-cell {
  padding-left: 20px;
  border-left: 2px solid #d3e0f7;
}

.post-view .comment-reply-target {
  display: inline-block;
  margin-bottom: 4px;
  padding: 1px 7px;
  border-radius: 6px;
  background: #eef3fc;
  color: #36578f;
  font-size: 11.5px;
  font-weight: 600;
}

.post-view #stream-detail tbody tr.is-target-capture {
  background: #fff8e6 !important;
  box-shadow: inset 4px 0 0 #d97706;
}

.post-view #stream-detail tbody tr.is-target-capture td {
  border-top-color: #f3d494;
}

@keyframes targetCapturePulse {
  0% { background-color: #ffefc2; }
  100% { background-color: #fff8e6; }
}

.post-view #stream-detail tbody tr.is-target-flash {
  animation: targetCapturePulse 1.4s ease-out;
}

.target-capture-badge {
  display: inline-block;
  margin-bottom: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #d97706;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.comment-dup-warn {
  background: #fff1df;
  color: #9a5100;
  font-weight: 600;
}

@media (max-width: 1180px) {
  .post-view .post-summary {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .post-view .summary-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .post-view .post-source-previews {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .post-view .post-summary {
    padding: 15px 16px;
  }
  .post-view .post-source-previews {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .post-view img.post-source-preview {
    height: 118px;
  }
  .post-view .summary-stats {
    gap: 8px;
  }
  .post-view .summary-stats > div {
    padding: 9px 10px;
  }
  .post-view .summary-stats strong {
    font-size: 20px;
  }
}

/* === 2026-11-24 Accounts, Account Detail & Shared Collection Polish === */
.collection-back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d2ddf2;
  background: rgba(255, 255, 255, 0.94);
  color: #234696;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(20, 35, 65, 0.14);
  backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}
.collection-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.collection-back-top:hover {
  background: #2554d4;
  border-color: #2554d4;
  color: #ffffff;
}

.accounts-view .accounts-table-scroll {
  max-height: 76vh;
}
.accounts-view .account-list-tools :is(input, select) {
  height: 38px;
  border-radius: 9px;
  border-color: #d4dfef;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.accounts-view .account-list-tools :is(input, select):focus {
  outline: none;
  border-color: #2554d4;
  box-shadow: 0 0 0 3px rgba(37, 84, 212, 0.12);
}
.accounts-view .account-list-tools .accounts-search-button {
  height: 38px;
  border-radius: 9px;
  background: #2554d4;
  border-color: #2554d4;
  box-shadow: 0 2px 8px rgba(37, 84, 212, 0.2);
}
.accounts-view .account-list-tools .accounts-search-button:hover {
  background: #1d44b4;
}

#account-detail-page {
  overflow: hidden;
  border-color: #dce5f4;
}
#account-detail-page .account-detail-head {
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  border-bottom: 1px solid #e6edf7;
}
#account-detail-page .account-detail-head > a {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #d5e0f2;
  color: #254886;
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
#account-detail-page .account-detail-head > a:hover {
  background: #eef4ff;
  border-color: #a9c1f5;
}
#account-detail-page .account-total {
  padding: 10px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dfe8f6;
  box-shadow: 0 2px 8px rgba(20, 35, 62, 0.035);
}
#account-detail-page .account-profile {
  border-radius: 13px;
  border: 1px solid #e4ecf8;
}
#account-detail-page .account-record-table {
  max-height: 70vh;
  border-top: 1px solid #e6edf7;
}
#account-detail-page .account-record-table tbody tr:hover {
  background: #f6f9ff;
}

/* Comment row 1-click quick mark buttons (hotel / merchant) */
.comment-quick-marks {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.comment-quick-mark-btn {
  appearance: none;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #d5e0f0;
  background: #f7faff;
  color: #4b5d7a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.comment-quick-mark-btn:hover:not(:disabled) {
  background: #eef4ff;
  border-color: #93b4f5;
  color: #1d4ed8;
}
.comment-quick-mark-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}


/* === 2026-11-24 Dispatch Live Device Monitor & Auto-Pool Queue === */
.dispatch-live-card {
  border-color: #d6e4fb;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 74px);
}
.dispatch-pool-badge.is-warn {
  background: #fff3da;
  color: #9a5400;
}
.dispatch-live-board {
  padding: 0 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dispatch-live-row {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid #e3ebf6;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
.dispatch-live-row:hover {
  border-color: #9fbaf5;
  box-shadow: 0 3px 12px rgba(37, 84, 212, 0.08);
}
.dispatch-live-row.is-running {
  border-color: #b9d1fb;
  background: linear-gradient(90deg, #f5f9ff 0%, #ffffff 42%);
}
.dispatch-live-row.is-offline {
  opacity: 0.72;
  background: #fafbfd;
}
.dispatch-live-row.is-filtered {
  border-color: #2554d4;
  box-shadow: 0 0 0 2px rgba(37, 84, 212, 0.14);
}
.dispatch-live-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.dispatch-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
  background: #9aa7bc;
}
.dispatch-live-dot.is-online {
  background: #16a34a;
}
.dispatch-live-dot.is-running {
  background: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.dispatch-live-name {
  font-size: 13.5px;
  color: #16233a;
}
.dispatch-live-target {
  min-width: 0;
  font-size: 13px;
  color: #1e2f4b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-live-verb {
  color: #5b6d88;
  font-weight: 500;
}
.dispatch-live-acct {
  color: #4f6280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}
.dispatch-live-post {
  margin-left: 4px;
  color: #506483;
}
.dispatch-live-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #f0f4fa;
  color: #6b7c96;
  font-size: 11px;
}
.dispatch-live-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.dispatch-live-seen {
  font-size: 12px;
  color: #77879f;
  white-space: nowrap;
}
.dispatch-live-filter-tag {
  font-size: 12px;
  font-weight: 600;
  color: #2c57c8;
  white-space: nowrap;
}
.dispatch-device-live {
  margin: 8px 0 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f4f8ff;
  border: 1px solid #dfe9fb;
  font-size: 12.5px;
  line-height: 1.45;
  color: #1f3252;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 900px) {
  .dispatch-live-board {
    padding: 0 16px 14px;
  }
  .dispatch-live-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .dispatch-live-target {
    white-space: normal;
  }
  .dispatch-live-right {
    justify-content: flex-start;
  }
}


/* === 2026-11-24 Invite Code Onboarding & XHS Login Alerts === */
.dispatch-invite-card {
  border-color: #cfe0fc;
  background: linear-gradient(180deg, #f6faff 0%, #ffffff 80px);
}
.whitelist-form-grid select {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #d4dfef;
  background: #ffffff;
  color: #16233a;
  font: inherit;
  font-size: 13px;
}
.invite-latest-banner {
  margin: 0 24px 16px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #b6cffb;
  background: #eef5ff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.invite-banner-label {
  font-size: 12.5px;
  color: #3d5680;
}
.invite-banner-code {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 6px;
  color: #183d9e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.invite-code-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  background: #eef4ff;
  border: 1px solid #cfe0fc;
  color: #183d9e;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.dispatch-live-row.is-alert {
  border-color: #f4b8bf;
  background: linear-gradient(90deg, #fff5f6 0%, #ffffff 48%);
}
.dispatch-live-alert {
  color: #b42334;
  font-weight: 600;
}


/* === Account Selection & Batch Dispatch (2026-11-24) === */
.dispatch-form-row {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1.15fr);
}
@media (max-width: 820px) {
  .dispatch-form-row { grid-template-columns: 1fr; }
}
.dispatch-pill.scope-all {
  background: #fff3e0;
  color: #b45309;
  border: 1px solid #f7c98b;
  margin-top: 4px;
}
.merchants-dispatch-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  border: 1px solid #d5e2f7;
  background: #f5f9ff;
}
.merchants-dispatch-left,
.merchants-dispatch-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.merchants-dispatch-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #2b3e5c;
}
.merchants-dispatch-field select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  background: #ffffff;
  font: inherit;
  font-weight: 400;
  color: #16233a;
  max-width: 240px;
}
.merchants-dispatch-status {
  flex: 1 0 100%;
  font-size: 12.5px;
}
.merchants-dispatch-status:empty { display: none; }
.merchants-check-col {
  width: 38px;
  text-align: center;
}
.merchants-check-col input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #395fd4;
}
.merchants-table tr.is-selected {
  background: #eef4ff;
}
.workspace-sidebar-head-actions,
.workspace-post-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.workspace-dispatch-bar {
  margin: 0 10px 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #d4e1f7;
  background: #f5f9ff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.workspace-dispatch-bar[hidden] { display: none; }
.workspace-dispatch-top,
.workspace-dispatch-quick,
.workspace-dispatch-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.workspace-dispatch-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.workspace-dispatch-controls select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  background: #ffffff;
  font-size: 12.5px;
  color: #16233a;
}
.workspace-dispatch-actions .dispatch-submit-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 12.5px;
}
.workspace-dispatch-status {
  font-size: 12px;
  line-height: 1.4;
}
.workspace-dispatch-status:empty { display: none; }
.workspace-merchant-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
}
.workspace-merchant-row.is-selected {
  background: #eef4ff;
}
.workspace-merchant-row .workspace-merchant {
  flex: 1;
  min-width: 0;
}
.workspace-merchant-check {
  display: none;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  cursor: pointer;
  accent-color: #395fd4;
}
.workspace-merchants.is-select-mode .workspace-merchant-check {
  display: inline-block;
}
.brand-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.brand-group-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.brand-mini-btn {
  border: 1px solid #cfd9eb;
  background: #ffffff;
  color: #2b4474;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.brand-mini-btn:hover { background: #edf3ff; }
.brand-mini-btn.primary {
  background: #395fd4;
  border-color: #395fd4;
  color: #ffffff;
}
.brand-mini-btn.primary:hover { background: #2d4fb9; }
.brand-mini-btn:disabled { opacity: 0.55; cursor: not-allowed; }


.dispatch-scope-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  flex: 1 0 100%;
}
.dispatch-inline-tip {
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
}


/* === Post Cutoff Date Picker (2026-11-24) === */
.dispatch-scope-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dispatch-scope-inline select { flex: 1 1 160px; }
.dispatch-scope-inline input[type="date"],
.merchants-dispatch-field input[type="date"],
.workspace-dispatch-controls input[type="date"] {
  font: inherit;
  font-weight: 400;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  background: #ffffff;
  color: #16233a;
}
.dispatch-scope-inline input[type="date"] {
  padding: 9px 10px;
  border-radius: 10px;
  flex: 1 1 140px;
}
.workspace-dispatch-controls input[type="date"] {
  width: 100%;
  font-size: 12.5px;
}

/* === Live Monitor Dedicated Screen & Compact Dispatch Strip (2026-11-24) === */
.collection-monitor-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  flex: none;
}
.collection-monitor-link.is-current .tool-live-dot {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35);
}

.monitor-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
html.collection-monitor-mode .collection .hero.collection-hero-v2 .collection-links {
  display: none;
}
html.collection-monitor-mode .collection .hero.collection-hero-v2 {
  padding-bottom: 14px;
  margin-bottom: 14px;
}
.monitor-hero-card {
  border-color: #d6e4fb;
  background: linear-gradient(180deg, #f6faff 0%, #ffffff 96px);
}
.monitor-updated-at {
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.monitor-head-actions .dispatch-refresh-btn.is-active {
  background: #eef7f2;
  border-color: #b7e3cc;
  color: #166534;
}
.monitor-primary-link {
  background: #edf4ff;
  border-color: #bdd4fb;
  color: #1d4ed8;
  font-weight: 600;
}
.monitor-primary-link:hover {
  background: #dfecff;
  border-color: #93b8f7;
}
.monitor-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 0 24px 20px;
}
.monitor-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid #e4ecf8;
  background: #f9fbff;
}
.monitor-kpi.is-running {
  border-color: #cfe0fc;
  background: #f3f8ff;
}
.monitor-kpi.is-warn {
  border-color: #f6dcab;
  background: #fffaf0;
}
.monitor-kpi.is-danger {
  border-color: #f5c2c7;
  background: #fff5f6;
}
.monitor-kpi.is-ok {
  border-color: #bfe6cf;
  background: #f3fbf6;
}
.monitor-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #5b6d8a;
}
.monitor-kpi-value {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #132238;
  font-variant-numeric: tabular-nums;
}
.monitor-kpi.is-danger .monitor-kpi-value {
  color: #b91c1c;
}
.monitor-kpi.is-warn .monitor-kpi-value {
  color: #9a5400;
}
.monitor-kpi.is-ok .monitor-kpi-value {
  color: #166534;
}
.monitor-kpi-sub {
  font-size: 11.5px;
  color: #74859e;
}

.monitor-device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 16px;
}
.monitor-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid #dfe8f6;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(18, 35, 64, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.monitor-card.is-running {
  border-color: #bfd7fb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
}
.monitor-card.is-alert {
  border-color: #f2b4bc;
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 72px);
}
.monitor-card.is-offline {
  opacity: 0.84;
  background: #fafbfd;
}
.monitor-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.monitor-card-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.monitor-card-title-wrap .dispatch-live-dot {
  margin-top: 6px;
  flex: none;
}
.dispatch-live-dot.is-alert {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}
.monitor-card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #132238;
  line-height: 1.35;
}
.monitor-card-hw {
  margin-top: 2px;
  font-size: 12px;
  color: #6b7c96;
}
.monitor-card-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.monitor-focus-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 11px;
  background: #f6f9ff;
  border: 1px solid #e2ecfb;
}
.monitor-card.is-offline .monitor-focus-box {
  background: #f3f5f9;
  border-color: #e4e8f0;
}
.monitor-focus-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}
.monitor-focus-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
}
.monitor-focus-merchant {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 14.5px;
  color: #132238;
}
.monitor-acct-copy {
  appearance: none;
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid #d2dff4;
  background: #ffffff;
  color: #36507a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.monitor-acct-copy:hover {
  background: #edf4ff;
  border-color: #93b8f7;
  color: #1d4ed8;
}
.monitor-src-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e9effa;
  color: #4f6484;
}
.monitor-focus-post-wrap {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.monitor-focus-post {
  font-size: 13.5px;
  line-height: 1.5;
  color: #243754;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.monitor-post-seq {
  display: inline-block;
  margin-right: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: #e5efff;
  border: 1px solid #bfd7fb;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
.monitor-post-link {
  color: #1b3664;
  text-decoration: none;
  font-weight: 500;
}
.monitor-post-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.monitor-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.monitor-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #dce6f7;
  color: #5b6e8c;
  font-size: 11.5px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.monitor-meta-chip b {
  color: #172a46;
  font-weight: 600;
}
.monitor-meta-chip.is-seq {
  background: #eff6ff;
  border-color: #c8ddfc;
  color: #2c5282;
}
.monitor-meta-chip.is-seq b {
  color: #1d4ed8;
}
.monitor-meta-chip.is-pending {
  color: #8c9cb3;
  border-style: dashed;
}
.monitor-meta-chip.is-pending b {
  color: #8c9cb3;
  font-weight: 500;
}
.monitor-meta-chip.is-muted-post {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
  font-weight: 600;
}
.monitor-mute-btn {
  appearance: none;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #f3c8cd;
  background: #fff5f6;
  color: #b42318;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.monitor-mute-btn:hover:not(:disabled) {
  background: #ffe8eb;
  border-color: #e99aa4;
}
.monitor-mute-btn.is-muted {
  border-color: #cfd9eb;
  background: #ffffff;
  color: #4b5d7a;
}
.monitor-mute-btn.is-muted:hover:not(:disabled) {
  background: #f1f5fc;
  border-color: #a6bce6;
}
.monitor-mute-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.monitor-idle-text {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}
.monitor-alert-box {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: #b91c1c;
}
.monitor-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #eef2f8;
}
.monitor-health-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}
.monitor-health-item {
  font-weight: 600;
}
.monitor-health-item.is-ok {
  color: #15803d;
}
.monitor-health-item.is-warn {
  color: #b45309;
}
.monitor-heartbeat {
  color: #6b7c96;
  font-variant-numeric: tabular-nums;
}
.monitor-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.monitor-pool-card h3 {
  margin: 0;
  font-size: 15.5px;
  color: #132238;
}
.monitor-pool-list {
  padding: 0 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.monitor-pool-empty,
.monitor-pool-more {
  font-size: 13px;
  color: #64748b;
  padding: 6px 0;
}
.monitor-pool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 13px;
  border-radius: 10px;
  border: 1px solid #e6edf8;
  background: #fbfdff;
}
.monitor-pool-idx {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  min-width: 26px;
  font-variant-numeric: tabular-nums;
}
.monitor-pool-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  min-width: 0;
  font-size: 13.5px;
  color: #16233a;
}
.monitor-pool-acct {
  font-size: 12px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef3fb;
  color: #42597d;
}
.monitor-pool-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

/* Compact Live Strip on Dispatch View */
.dispatch-live-compact {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dispatch-live-compact-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.dispatch-live-compact-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dispatch-live-compact-title {
  font-size: 14px;
  font-weight: 700;
  color: #16233a;
}
.dispatch-live-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.dispatch-mini-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #d7e3f6;
  background: #f8fbff;
  color: #1e3150;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.dispatch-mini-chip:hover {
  background: #edf4ff;
  border-color: #9bbbf5;
}
.dispatch-mini-chip.is-running {
  border-color: #bfd7fb;
  background: #f1f7ff;
}
.dispatch-mini-chip.is-filtered {
  border-color: #2563eb;
  background: #e8f1ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.14);
}
.dispatch-mini-chip.is-alert {
  border-color: #f2b4bc;
  background: #fff5f6;
  color: #991b1b;
}
.dispatch-mini-chip.is-offline {
  opacity: 0.72;
  background: #f5f7fa;
  border-color: #e0e5ee;
}
.dispatch-mini-name {
  font-weight: 600;
  white-space: nowrap;
}
.dispatch-mini-sep {
  color: #94a3b8;
}
.dispatch-mini-target {
  color: #475569;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dispatch-mini-chip.is-alert .dispatch-mini-target {
  color: #b91c1c;
  font-weight: 600;
}
.dispatch-mini-check {
  color: #1d4ed8;
  font-weight: 700;
}

@media (max-width: 900px) {
  .monitor-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 16px 16px;
  }
  .monitor-device-grid {
    grid-template-columns: 1fr;
  }
  .monitor-pool-list {
    padding: 0 16px 14px;
  }
  .monitor-focus-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.brand-all-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #dfe8f6;
}
.merchant-xhs-link {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid #dbe4f3;
  background: #f6f9ff;
  color: #425a82;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.merchant-xhs-link:hover {
  background: #e9f2ff;
  border-color: #9ec0f8;
  color: #1d4ed8;
}
.merchant-xhs-link.is-direct {
  border-color: #f6c7cf;
  background: #fff5f6;
  color: #cf2340;
}
.merchant-xhs-link.is-direct:hover {
  background: #ffe8ec;
  border-color: #eb93a2;
  color: #a91630;
}
.merchant-xhs-link.is-douyin {
  border-color: #d5dce8;
  background: #f4f6fa;
  color: #161823;
}
.merchant-xhs-link.is-douyin:hover {
  background: #e6ebf5;
  border-color: #9ba8c0;
  color: #0f172a;
}
.merchant-xhs-link.is-douyin.is-direct {
  border-color: #9ce0e8;
  background: #effbfc;
  color: #0e7490;
}
.merchant-xhs-link.is-douyin.is-direct:hover {
  background: #dcf5f8;
  border-color: #67cad6;
  color: #155e75;
}
.workspace-xhs-link {
  margin-left: 8px;
  font-size: 12px;
  padding: 2px 9px;
}


/* ========== Merchant Analytics Dashboard (?view=analytics) ========== */
.analytics-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analytics-header-card {
  padding-bottom: 18px;
}
.analytics-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 24px 16px;
}
.analytics-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}
.analytics-controls-row label {
  display: grid;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4f6380;
}
.analytics-controls-row select,
.analytics-controls-row input {
  height: 38px;
  padding: 0 11px;
  border: 1px solid #d7e1ef;
  border-radius: 9px;
  background: #ffffff;
  color: #16243d;
  font: inherit;
  font-size: 13px;
}
.analytics-search-label {
  flex: 1 1 240px;
  min-width: 200px;
}
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 0 24px;
}
.analytics-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 13px 14px 12px;
  border-radius: 13px;
  border: 1px solid #e3ebf6;
  background: #fbfdff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.analytics-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--kpi-accent, #2554d4);
}
.analytics-kpi-card.is-blue { --kpi-accent: #2554d4; }
.analytics-kpi-card.is-teal { --kpi-accent: #0f766e; }
.analytics-kpi-card.is-rose { --kpi-accent: #e11d48; }
.analytics-kpi-card.is-violet { --kpi-accent: #7c3aed; }
.analytics-kpi-card.is-amber { --kpi-accent: #d97706; }
.analytics-kpi-card.is-warn { --kpi-accent: #dc2626; background: #fff9f9; border-color: #fbd5d5; }
.analytics-kpi-card.is-slate { --kpi-accent: #475569; }
.analytics-kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: #5b6e8a;
}
.analytics-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: #13233f;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.analytics-kpi-sub {
  font-size: 11.5px;
  color: #6c7f9b;
  line-height: 1.4;
}

.analytics-brands-section {
  padding-bottom: 18px;
}
.analytics-brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0 24px;
}
.analytics-brand-card {
  border: 1px solid #e1eaf6;
  border-radius: 13px;
  padding: 13px 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.analytics-brand-card:hover {
  border-color: #b7cef4;
  box-shadow: 0 6px 16px rgba(19, 35, 63, 0.06);
}
.analytics-brand-card.is-selected {
  border-color: #2554d4;
  background: #f5f8ff;
  box-shadow: 0 4px 14px rgba(37, 84, 212, 0.12);
}
.analytics-brand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.analytics-brand-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #162540;
}
.analytics-mini-pill {
  padding: 2px 7px;
  border-radius: 999px;
  background: #edf3ff;
  color: #274fb5;
  font-size: 11px;
  font-weight: 700;
}
.analytics-brand-actions {
  display: flex;
  gap: 6px;
}
.analytics-brand-bar {
  height: 6px;
  border-radius: 999px;
  background: #eef3fa;
  overflow: hidden;
}
.analytics-brand-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #e11d48);
}
.analytics-brand-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  font-size: 12px;
  color: #364b6b;
}
.analytics-brand-accounts {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed #d8e3f3;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.analytics-brand-acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #e4ecf8;
  border-radius: 8px;
  background: #f8fbff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: left;
  color: #1b2f4f;
}
.analytics-brand-acc-row:hover {
  background: #eaf2ff;
  border-color: #a6c3f6;
}
.analytics-brand-acc-row .acc-stat {
  color: #5b6f8c;
  white-space: nowrap;
}

.analytics-insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}
.analytics-insight-card {
  padding: 18px 22px;
}
.analytics-insight-card h3 {
  margin: 0 0 12px;
  font-size: 15.5px;
  color: #162540;
}
.analytics-insight-card h4 {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #5c708e;
}
.analytics-svg-chart {
  width: 100%;
  height: auto;
  display: block;
}
.analytics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  font-size: 11.5px;
  color: #4f6483;
}
.analytics-chart-legend .legend-item.is-rose {
  color: #be123c;
}
.analytics-dual-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.analytics-bar-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 12px;
}
.analytics-bar-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #243857;
  font-weight: 600;
}
.analytics-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #edf2f9;
  overflow: hidden;
}
.analytics-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}
.analytics-bar-fill.is-teal {
  background: linear-gradient(90deg, #0d9488, #14b8a6);
}
.analytics-bar-val {
  text-align: right;
  font-size: 11.5px;
  color: #4a5f7d;
}

.analytics-quick-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 12px;
}
.analytics-sort-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.analytics-sort-btn.is-active {
  color: #1d4ed8;
}
.analytics-table td {
  vertical-align: top;
}
.analytics-rank-cell {
  text-align: center;
  white-space: nowrap;
}
.analytics-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf2f9;
  color: #3b4f6e;
  font-size: 12px;
  font-weight: 800;
}
.analytics-rank-badge.is-top {
  background: #fff1f2;
  color: #be123c;
}
.analytics-score-pill {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #2554d4;
}
.analytics-merchant-cell {
  min-width: 230px;
  max-width: 310px;
}
.analytics-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.analytics-name-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #173668;
  cursor: pointer;
  text-align: left;
}
.analytics-name-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.analytics-brand-chip {
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}
.analytics-brand-chip.is-candidate {
  background: #f3f4f6;
  color: #4b5563;
}
.analytics-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
}
.analytics-company-line {
  margin-top: 3px;
  font-size: 11.5px;
}
.analytics-cell-main {
  font-weight: 700;
  color: #182a47;
  white-space: nowrap;
}
.analytics-cell-main.is-rose,
.is-rose {
  color: #be123c;
}
.analytics-cell-sub {
  margin-top: 3px;
  font-size: 11.5px;
  white-space: nowrap;
}
.analytics-cell-sub.is-warn,
.is-warn {
  color: #c2410c;
  font-weight: 600;
}
.analytics-mini-bar {
  margin-top: 5px;
  height: 5px;
  width: 88px;
  border-radius: 999px;
  background: #f1e6ea;
  overflow: hidden;
}
.analytics-mini-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #e11d48;
}
.analytics-topic-cell {
  min-width: 150px;
  max-width: 210px;
}
.analytics-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.analytics-loc-tag,
.analytics-scene-tag {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.analytics-loc-tag {
  background: #eff6ff;
  color: #1e40af;
}
.analytics-scene-tag {
  background: #ecfdf5;
  color: #065f46;
}
.analytics-act-cell {
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Slide-over single-merchant drawer */
.analytics-drawer[hidden] {
  display: none;
}
.analytics-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
}
.analytics-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}
.analytics-drawer-panel {
  position: relative;
  width: min(760px, 94vw);
  height: 100%;
  background: #ffffff;
  box-shadow: -12px 0 36px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.analytics-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #e4ebf5;
  background: #f8fbff;
}
.analytics-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  color: #13233f;
}
.analytics-drawer-close {
  width: 32px;
  height: 32px;
  border: 1px solid #d7e1ef;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 15px;
  cursor: pointer;
}
.analytics-drawer-close:hover {
  background: #eef4ff;
}
.analytics-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analytics-drawer-loading {
  padding: 36px 0;
  text-align: center;
}
.drawer-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer-meta-tags,
.drawer-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.drawer-bio-box {
  padding: 10px 13px;
  border-radius: 10px;
  background: #f8fafd;
  border: 1px solid #e6edf7;
  font-size: 12.5px;
  line-height: 1.55;
}
.drawer-company {
  font-weight: 700;
  color: #1f3559;
  margin-bottom: 3px;
}
.drawer-diag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.diag-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.diag-pill.is-good { background: #ecfdf5; color: #047857; }
.diag-pill.is-warn { background: #fff7ed; color: #c2410c; }
.diag-pill.is-muted { background: #f1f5f9; color: #475569; }
.drawer-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.drawer-stat-box {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #e3ebf6;
  background: #fbfdff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.drawer-stat-box strong {
  font-size: 17px;
  color: #13233f;
}
.drawer-section h4 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #1b2f50;
}
.drawer-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.drawer-posts-table {
  width: 100%;
  font-size: 12.5px;
}
.drawer-post-title {
  font-weight: 600;
  color: #182b49;
  line-height: 1.4;
}
.drawer-post-sub {
  font-size: 11.5px;
  margin-top: 2px;
}
.drawer-leads-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.drawer-lead-item {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5edf8;
  background: #fbfdff;
}
.drawer-lead-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin-bottom: 5px;
}
.lead-intent-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.lead-intent-pill.is-price { background: #ffe4e6; color: #be123c; }
.lead-intent-pill.is-consult { background: #e0f2fe; color: #0369a1; }
.drawer-lead-user {
  font-weight: 700;
  color: #1e3a6d;
  text-decoration: none;
}
.drawer-lead-user:hover {
  text-decoration: underline;
}
.drawer-lead-text {
  font-size: 13px;
  color: #13233f;
  line-height: 1.5;
}
.drawer-lead-post {
  font-size: 11.5px;
  margin-top: 4px;
}
body.analytics-drawer-open {
  overflow: hidden;
}

@media (max-width: 1360px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .analytics-insights-grid,
  .analytics-dual-bars,
  .drawer-split-grid {
    grid-template-columns: 1fr;
  }
  .drawer-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-filter-bar,
  .analytics-kpi-grid,
  .analytics-brands-grid,
  .analytics-quick-tabs {
    padding-left: 14px;
    padding-right: 14px;
  }
}


/* === Dispatch View UX Optimization (2026-11-25) === */
.dispatch-live-tip {
  font-size: 12px;
}
.dispatch-live-dot.is-resting {
  background: #168a72;
  box-shadow: 0 0 0 3px rgba(22, 138, 114, 0.22);
}
.dispatch-mini-chip.is-resting {
  border-color: #a6dfd0;
  background: #effaf7;
}
.dispatch-date-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d7e3f8;
  background: #f5f9ff;
}
.dispatch-date-bar[hidden] { display: none; }
.dispatch-date-picker-label {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0;
}
.dispatch-date-picker-label input[type="date"] {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #c4d3ee;
  background: #ffffff;
  font: inherit;
  color: #16233a;
}
.dispatch-date-presets {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dispatch-preset-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cfdcf2;
  background: #ffffff;
  color: #2b4a8c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.dispatch-preset-btn:hover {
  background: #e9f1ff;
  border-color: #9cb8ee;
}
.dispatch-date-hint {
  font-size: 12px;
}
.dispatch-input-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dispatch-input-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dispatch-input-title {
  font-size: 13px;
  font-weight: 600;
  color: #2c3e5d;
  margin: 0;
}
.dispatch-input-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.dispatch-line-count {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5fc;
}
.dispatch-line-count.is-over {
  background: #ffebee;
  color: #b42334;
  font-weight: 600;
}
.dispatch-picker-panel {
  border: 1px solid #d4e1f7;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dispatch-picker-panel[hidden] { display: none; }
.dispatch-picker-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.dispatch-picker-bar input[type="search"] {
  flex: 1 1 200px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  font-size: 13px;
  background: #ffffff;
}
.dispatch-picker-bar select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  font-size: 13px;
  background: #ffffff;
}
.dispatch-picker-list {
  max-height: 220px;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 6px;
  padding-right: 2px;
}
.dispatch-picker-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #e2eaf8;
  background: #ffffff;
  font-size: 12.5px !important;
  font-weight: 400 !important;
  cursor: pointer;
}
.dispatch-picker-item:hover {
  border-color: #a4bdf0;
  background: #f4f8ff;
}
.dispatch-picker-item.is-selected {
  border-color: #2f57d8;
  background: #ebf2ff;
}
.dispatch-picker-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #2f57d8;
  flex: none;
}
.dispatch-picker-name {
  font-weight: 600;
  color: #16233a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.dispatch-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 10px;
}
.dispatch-status-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d6e0f2;
  background: #f7faff;
  color: #364b6e;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.dispatch-status-tab strong {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(34, 62, 128, 0.08);
  font-size: 11.5px;
}
.dispatch-status-tab:hover { background: #edf3ff; }
.dispatch-status-tab.is-active {
  background: #2f57d8;
  border-color: #2f57d8;
  color: #ffffff;
}
.dispatch-status-tab.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.dispatch-status-tab.is-warn:not(.is-active) { border-color: #f3d098; background: #fff9ef; color: #8c4d00; }
.dispatch-status-tab.is-danger:not(.is-active) { border-color: #f3c4cb; background: #fff5f6; color: #b42334; }
.dispatch-status-tab.is-ok:not(.is-active) { border-color: #bce4cf; background: #f2fbf6; color: #166a47; }
.dispatch-search-label {
  flex: 1 1 240px;
}
.dispatch-search-label input[type="search"] {
  flex: 1;
  min-width: 180px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cfd9eb;
  font-size: 13px;
  background: #ffffff;
}
.dispatch-target-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dispatch-target-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.dispatch-acct-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #355180;
  background: #eef3fc;
  padding: 1px 5px;
  border-radius: 5px;
}
.dispatch-mini-copy {
  padding: 1px 6px !important;
  font-size: 11px !important;
}
.dispatch-cat-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.dispatch-time-cell {
  font-size: 12.5px;
  white-space: nowrap;
}
.dispatch-tasks-table td {
  vertical-align: top;
}


/* ========== Brand Yearly/Monthly Trends & Single-Merchant Detail Page ========== */
.analytics-overview-view[hidden],
.analytics-merchant-detail-page[hidden] {
  display: none;
}
.analytics-overview-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analytics-seg-group {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: #edf2f9;
  border: 1px solid #dce6f4;
  gap: 2px;
}
.analytics-seg-btn {
  border: 0;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b6180;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease;
}
.analytics-seg-btn:hover {
  color: #162540;
}
.analytics-seg-btn.is-active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.analytics-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.analytics-insight-head h3 {
  margin: 0;
}
.analytics-brand-trend-panel {
  padding: 0 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.analytics-brand-trend-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.analytics-inline-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #4f6380;
}
.analytics-inline-select select,
.detail-trend-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  color: #16243d;
  font: inherit;
  font-size: 12.5px;
}
.analytics-brand-trend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.brand-trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #d9e3f2;
  background: #f8fbff;
  color: #526785;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.68;
  transition: all 0.14s ease;
}
.brand-trend-chip:hover {
  opacity: 0.92;
  border-color: #9cb9ee;
}
.brand-trend-chip.is-active {
  opacity: 1;
  background: #ffffff;
  border-color: #3b82f6;
  color: #13233f;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.12);
}
.brand-trend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 8px;
}
.analytics-brand-matrix-wrap {
  border: 1px solid #e3ebf6;
  border-radius: 11px;
  background: #ffffff;
}
.brand-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.brand-matrix-table th,
.brand-matrix-table td {
  padding: 7px 9px;
  border-bottom: 1px solid #edf2f9;
  text-align: center;
  white-space: nowrap;
}
.brand-matrix-table th {
  background: #f7faff;
  color: #4a5f7d;
  font-weight: 700;
}
.brand-matrix-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #ffffff;
  text-align: left;
  min-width: 148px;
  border-right: 1px solid #e6eef8;
}
.brand-matrix-table th.sticky-col {
  background: #f7faff;
}
.brand-matrix-table tr.is-highlighted .sticky-col {
  background: #f5f9ff;
}
.matrix-brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}
.matrix-num-cell {
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}
.matrix-num-cell.is-zero {
  color: #cbd5e1;
}
.matrix-total-cell {
  font-weight: 800;
  color: #13233f;
  background: #f8fafd;
  border-left: 1px solid #e6eef8;
}
.analytics-brand-expanded {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #d8e3f3;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand-year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.brand-year-pill {
  padding: 2px 8px;
  border-radius: 7px;
  background: #f1f5fb;
  color: #334e73;
  font-size: 11.5px;
  font-weight: 600;
}
.brand-mini-trend {
  padding: 4px 2px 0;
}

/* Single-Merchant Full Detail Page */
.analytics-merchant-detail-page {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.analytics-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.analytics-detail-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analytics-detail-loading {
  padding: 42px 24px;
  text-align: center;
}
.detail-hero-card {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.detail-hero-left {
  flex: 1 1 420px;
  min-width: 0;
}
.detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-title-row h2 {
  margin: 0;
  font-size: 22px;
  color: #13233f;
}
.detail-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
}
.detail-hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-siblings-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f5f9ff;
  border: 1px solid #dbe7fa;
}
.detail-siblings-label {
  font-size: 12px;
  font-weight: 600;
}
.detail-sibling-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cfe0f8;
  background: #ffffff;
  color: #214073;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.detail-sibling-pill:hover {
  background: #eaf2ff;
  border-color: #8eb3f2;
}
.detail-sibling-pill.is-active {
  background: #2554d4;
  border-color: #2554d4;
  color: #ffffff;
  cursor: default;
}
.detail-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.detail-trend-card {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.detail-trend-head h3 {
  margin: 0 0 4px;
  font-size: 16.5px;
  color: #13233f;
}
.detail-trend-head p {
  margin: 0;
  font-size: 12.5px;
}
.detail-trend-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.detail-trend-chart-box {
  padding: 6px 4px;
}
.detail-trend-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5edf8;
  border-radius: 10px;
}
.detail-period-table th,
.detail-period-table td {
  padding: 8px 12px;
  white-space: nowrap;
}
.detail-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}
.detail-list-card {
  padding: 18px 22px;
}
.detail-list-card h3 {
  margin: 0 0 12px;
  font-size: 15.5px;
  color: #162540;
}

@media (max-width: 1320px) {
  .detail-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .detail-bottom-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .detail-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-brand-trend-panel,
  .detail-hero-card,
  .detail-trend-card,
  .detail-list-card {
    padding-left: 14px;
    padding-right: 14px;
  }
}


/* ========== Noise Toggle, Suspect Risk Badge & Water-Army Audit Drawer ========== */
.analytics-noise-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid #cbd9ee;
  background: #f4f8ff;
  color: #1c3a6e;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.analytics-noise-toggle input {
  margin: 0;
  accent-color: #2554d4;
  cursor: pointer;
}
.suspect-risk-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #c2410c;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s ease, border-color 0.14s ease;
}
.suspect-risk-btn:hover {
  background: #ffedd5;
  border-color: #fb923c;
}
.analytics-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 22px;
  border-top: 1px solid #e4ebf5;
  background: #f8fbff;
}
.analytics-drawer-footer[hidden] {
  display: none;
}
.drawer-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.suspect-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6edf8;
}
.suspect-toolbar-left,
.suspect-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.suspect-search-input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  font: inherit;
  font-size: 12.5px;
  min-width: 170px;
}
.suspect-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.suspect-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid #e3ebf6;
  background: #fbfdff;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.suspect-item.is-selected {
  border-color: #fb923c;
  background: #fffaf5;
}
.suspect-item input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #ea580c;
  cursor: pointer;
}
.suspect-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.suspect-conf-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.suspect-conf-pill.is-high {
  background: #ffedd5;
  color: #c2410c;
}
.suspect-conf-pill.is-medium {
  background: #f1f5f9;
  color: #475569;
}
.suspect-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: #536885;
}
.suspect-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.suspect-reason-tag {
  padding: 1px 7px;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 600;
}
.suspect-reason-tag.is-only-here {
  background: #fff7ed;
  color: #c2410c;
}
.suspect-samples {
  margin-top: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: #f4f7fc;
  font-size: 12px;
  color: #2c405e;
  line-height: 1.5;
}

.suspect-risk-btn.is-neutral {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}
.suspect-risk-btn.is-neutral:hover {
  background: #eef2f7;
  border-color: #94a3b8;
}
.suspect-primary-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e4ebf6;
  padding-bottom: 8px;
}
.suspect-primary-tab {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #d7e2f2;
  background: #f8fafd;
  color: #3a506f;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.suspect-primary-tab.is-active {
  background: #1f48b8;
  border-color: #1f48b8;
  color: #ffffff;
}
.suspect-conf-pill.is-ignored {
  background: #ecfdf5;
  color: #047857;
}
.suspect-reason-tag.is-cross-shop {
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
}
.suspect-reason-tag.is-brand-hit {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.suspect-inline-btn {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.suspect-inline-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.suspect-inline-btn.is-undo {
  border-color: #fca5a5;
  color: #b91c1c;
  background: #fff5f5;
}
.suspect-inline-btn.is-undo:hover {
  background: #fee2e2;
}
.drawer-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lead-noise-pill {
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.lead-noise-pill.is-water {
  background: #fee2e2;
  color: #b91c1c;
}
.lead-noise-pill.is-peer {
  background: #fef3c7;
  color: #b45309;
}

/* === Interactive Chart Hover Tooltip === */
.analytics-chart-stage {
  position: relative;
  width: 100%;
}
.analytics-chart-tooltip {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  min-width: 190px;
  max-width: 300px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.24);
  backdrop-filter: blur(6px);
  font-size: 12px;
  line-height: 1.45;
  transition: left 0.06s ease-out, top 0.06s ease-out;
}
.analytics-chart-tooltip[hidden] {
  display: none !important;
}
.chart-tip-title {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  padding-bottom: 5px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  white-space: nowrap;
}
.chart-tip-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chart-tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 6px;
}
.chart-tip-row.is-focus {
  background: rgba(255, 255, 255, 0.13);
}
.chart-tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.chart-tip-name {
  color: #cbd5e1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 128px;
}
.chart-tip-row.is-focus .chart-tip-name {
  color: #ffffff;
  font-weight: 600;
}
.chart-tip-val {
  margin-left: auto;
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
}
.chart-tip-sub {
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
}

/* === Device XHS Login Account Profile Card & Edit Modal === */
.device-xhs-card {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f4d2da;
  background: linear-gradient(180deg, #fff8fa 0%, #ffffff 100%);
}
.device-xhs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.device-xhs-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.device-xhs-kicker {
  font-size: 12px;
  font-weight: 700;
  color: #be123c;
}
.device-xhs-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.device-xhs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin: 0;
}
.device-xhs-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.device-xhs-grid > div.is-wide {
  grid-column: 1 / -1;
}
.device-xhs-grid dt {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.device-xhs-grid dd {
  margin: 0;
  font-size: 12.5px;
  color: #1e293b;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  word-break: break-word;
}
.device-xhs-phone {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: #0f172a;
}
.device-xhs-bio {
  color: #475569;
  line-height: 1.45;
}
.device-xhs-note {
  color: #1d4ed8;
  font-weight: 600;
}
.device-xhs-updated {
  margin-top: 6px;
  font-size: 11px;
}
.device-xhs-empty {
  font-size: 12px;
  line-height: 1.5;
}
.device-xhs-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.device-xhs-modal {
  width: min(580px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  padding: 20px 22px;
}
.device-xhs-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.device-xhs-modal-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.device-xhs-modal-head p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.device-xhs-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.device-xhs-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.device-xhs-form-grid label.is-wide {
  grid-column: 1 / -1;
}
.device-xhs-form-grid input,
.device-xhs-form-grid textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-family: inherit;
}
.device-xhs-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.device-xhs-modal-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Device workload & active duration strip (devices & monitor views) ===== */
.device-workload-box {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.device-workload-box.is-high {
  border-color: #fed7aa;
  background: #fff7ed;
}
.device-workload-box.is-mid {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.device-workload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 12px;
}
.device-workload-title {
  font-weight: 600;
  color: #1e293b;
}
.device-workload-window {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.device-workload-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  font-size: 12px;
}
.device-workload-metrics > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.device-workload-metrics span {
  color: #64748b;
  font-size: 11px;
}
.device-workload-metrics strong {
  color: #0f172a;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.device-workload-strip.is-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 8px 0 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.device-workload-strip.is-compact.is-high {
  background: #fff7ed;
  border-color: #fed7aa;
}
.device-workload-strip.is-compact .workload-tag strong {
  color: #0f172a;
}

/* ===== Dispatch Batch Progress Panel ===== */
.dispatch-batch-label-input {
  min-width: 210px;
  max-width: 280px;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
}
.dispatch-batches-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.dispatch-batch-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dispatch-batch-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}
.dispatch-batch-card.is-selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
  background: #f8fbff;
}
.dispatch-batch-card.is-done {
  background: #fcfdfd;
}
.dispatch-batch-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.dispatch-batch-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.dispatch-batch-title {
  font-size: 14px;
  color: #0f172a;
}
.dispatch-batch-pct {
  white-space: nowrap;
  font-size: 13px;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.dispatch-batch-pct strong {
  color: #0f172a;
  font-size: 14px;
}
.dispatch-batch-bar {
  display: flex;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  margin: 10px 0 8px;
}
.batch-seg.is-done { background: #16a34a; }
.batch-seg.is-running { background: #2563eb; }
.batch-seg.is-failed { background: #dc2626; }
.dispatch-batch-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  font-size: 12px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.batch-stat.is-done { color: #15803d; font-weight: 600; }
.batch-stat.is-running { color: #1d4ed8; font-weight: 600; }
.batch-stat.is-warn { color: #b45309; }
.batch-stat.is-danger { color: #b91c1c; font-weight: 600; }
.batch-stat.is-muted { color: #94a3b8; }
.dispatch-batch-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.dispatch-batch-foot-left {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.batch-eta {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.batch-eta.is-active { color: #1d4ed8; }
.batch-eta.is-done { color: #15803d; }
.batch-eta.is-muted { color: #64748b; }
.dispatch-batch-devs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.batch-dev-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
}
.dispatch-batch-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ===== Dispatch Task Row Timing & Collector Account ===== */
.dispatch-dev-xhs-tag {
  font-size: 11px;
  color: #0f766e;
  margin-top: 2px;
}
.dispatch-time-created,
.dispatch-time-span {
  font-size: 12px;
  line-height: 1.45;
  color: #334155;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dispatch-time-span .is-live-text {
  color: #1d4ed8;
  font-weight: 600;
}
.dispatch-time-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.dispatch-output-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* ===== Merchants Pool Freshness Coverage Bar ===== */
.merchants-freshness-bar {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.merchants-freshness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.merchants-freshness-title {
  font-weight: 600;
  color: #0f172a;
}
.merchants-freshness-track {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
  margin: 8px 0 10px;
}
.fresh-seg.is-recent { background: #16a34a; }
.fresh-seg.is-aging { background: #f59e0b; }
.fresh-seg.is-stale { background: #ef4444; }
.merchants-freshness-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fresh-pill {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.fresh-pill:hover {
  border-color: #94a3b8;
}
.fresh-pill.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.fresh-pill.is-recent.is-active { background: #15803d; border-color: #15803d; }
.fresh-pill.is-aging.is-active { background: #b45309; border-color: #b45309; }
.fresh-pill.is-stale.is-active { background: #b91c1c; border-color: #b91c1c; }
.merchant-stat-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.fresh-pill.is-running.is-active { background: #1d4ed8; border-color: #1d4ed8; }
.fresh-pill.is-queued.is-active { background: #b45309; border-color: #b45309; }
.merchant-prog-row {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.merchant-done-line {
  margin-top: 4px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.monitor-stale-box {
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12.5px;
  line-height: 1.45;
}
.monitor-stale-box strong {
  color: #b91c1c;
}

/* === 2026-11-25 Clickable Media Chips & Archived Media Library === */
.collection .hero.collection-hero-v2 a.collection-nav-count--media {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}
.collection .hero.collection-hero-v2 a.collection-nav-count--media:hover {
  background: var(--cat-soft, #eff6ff);
  border-color: var(--cat-accent, #2563eb);
  color: var(--cat-ink, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.collection .hero.collection-hero-v2 a.collection-nav-count--media.is-current {
  background: var(--cat-accent, #2563eb);
  border-color: var(--cat-accent, #2563eb);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--cat-glow, rgba(37, 99, 235, 0.28));
}

.media-library-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ml-toolbar-card {
  padding-bottom: 16px;
}
.ml-head {
  padding-bottom: 14px;
  align-items: flex-start;
  gap: 14px;
}
.ml-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.ml-title-row h2 {
  margin: 0;
}
.ml-summary-pill {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
}
.ml-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex: none;
}
.ml-kind-tabs {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 11px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  gap: 3px;
}
.ml-kind-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.ml-kind-tab:hover {
  color: #0f172a;
}
.ml-kind-tab.is-active {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #dbeafe;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.ml-tab-count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-variant-numeric: tabular-nums;
}
.ml-kind-tab.is-active .ml-tab-count {
  background: #dbeafe;
  color: #1d4ed8;
}
.ml-view-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  gap: 2px;
}
.ml-view-btn {
  padding: 5px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ml-view-btn.is-active {
  background: #0f172a;
  color: #ffffff;
}

.ml-filter-panel {
  padding: 12px 24px 0;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ml-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.ml-pill-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.ml-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #dce5f2;
  background: #ffffff;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.ml-filter-pill:hover {
  background: #f1f5ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ml-filter-pill.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.ml-filter-pill em {
  font-style: normal;
  font-size: 11px;
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}
.ml-dedup-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.ml-controls-row {
  gap: 8px;
}
.ml-search-box {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}
.ml-search-box input {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  padding: 0 30px 0 12px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
}
.ml-search-box input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.ml-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.ml-select {
  height: 36px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 600;
}
.ml-active-merchant-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 9px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  font-size: 12.5px;
  color: #1e40af;
}
.ml-hot-merchants {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
}
.ml-hot-label {
  color: #64748b;
  font-weight: 600;
  margin-right: 2px;
}
.ml-merchant-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.ml-merchant-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ml-merchant-chip.is-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}
.ml-merchant-chip em {
  font-style: normal;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.ml-grid-status {
  font-size: 12.5px;
  color: #64748b;
  padding: 0 4px;
}
.ml-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  align-items: stretch;
}
.ml-grid.is-video {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.ml-grid.is-grouped {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.ml-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ml-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 12px 24px -10px rgba(15, 23, 42, 0.15);
}
@keyframes mlShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.ml-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(110deg, #edf2f7 25%, #f8fafc 45%, #e5ecf5 65%);
  background-size: 220% 100%;
  animation: mlShimmer 1.45s ease-in-out infinite;
  overflow: hidden;
  cursor: pointer;
}
.ml-thumb-wrap::before,
.ml-collage-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  opacity: 0.42;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 36px 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2.5'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.5'/%3E%3Cpath d='m21 16-5.2-5.2a1.5 1.5 0 0 0-2.1 0L6 18.5'/%3E%3C/svg%3E");
  transition: opacity 0.2s ease;
}
.ml-thumb-wrap.is-loaded,
.ml-thumb-wrap.is-error,
.ml-collage-cell.is-loaded,
.ml-collage-cell.is-error {
  animation: none;
  background: #f1f5f9;
}
.ml-thumb-wrap.is-loaded::before,
.ml-thumb-wrap.is-error::before,
.ml-collage-cell.is-loaded::before,
.ml-collage-cell.is-error::before {
  opacity: 0;
}
.ml-card.is-video .ml-thumb-wrap {
  aspect-ratio: 4 / 3;
  background: linear-gradient(110deg, #111c30 25%, #1e2d47 45%, #0f172a 65%);
  background-size: 220% 100%;
}
.ml-card.is-video .ml-thumb-wrap::before {
  display: none;
}
.ml-card.is-video .ml-thumb-wrap.is-loaded,
.ml-card.is-video .ml-thumb-wrap.is-error {
  background: #0f172a;
}
.ml-grid.is-video.is-ori-portrait .ml-card.is-video .ml-thumb-wrap {
  aspect-ratio: 4 / 5;
}
.ml-grid.is-video.is-ori-landscape .ml-card.is-video .ml-thumb-wrap {
  aspect-ratio: 16 / 10;
}
.ml-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.25s ease;
}
.ml-thumb-img.is-loaded {
  opacity: 1;
}
.ml-thumb-img.is-error {
  opacity: 0;
  pointer-events: none;
}
.ml-card:hover .ml-thumb-img.is-loaded {
  transform: scale(1.03);
}
.ml-img-error {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
}
.ml-card.is-video .ml-img-error {
  background: #0f172a;
  color: #94a3b8;
}
.ml-img-error-icon {
  font-size: 20px;
  line-height: 1;
  opacity: 0.78;
}
.ml-img-retry-btn {
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.ml-img-retry-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.ml-skeleton-card {
  pointer-events: none;
}
.ml-skeleton-thumb {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(110deg, #edf2f7 25%, #f8fafc 45%, #e5ecf5 65%);
  background-size: 220% 100%;
  animation: mlShimmer 1.45s ease-in-out infinite;
}
.ml-grid.is-video .ml-skeleton-thumb {
  aspect-ratio: 4 / 3;
}
.ml-grid.is-video.is-ori-portrait .ml-skeleton-thumb {
  aspect-ratio: 4 / 5;
}
.ml-grid.is-video.is-ori-landscape .ml-skeleton-thumb {
  aspect-ratio: 16 / 10;
}
.ml-grid.is-grouped .ml-skeleton-thumb {
  aspect-ratio: 4 / 3;
}
.ml-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(110deg, #edf2f7 25%, #f8fafc 45%, #e5ecf5 65%);
  background-size: 220% 100%;
  animation: mlShimmer 1.45s ease-in-out infinite;
}
.ml-skeleton-line.is-short { width: 62%; height: 10px; }
.ml-skeleton-line.is-mid { width: 84%; }
.ml-scroll-sentinel {
  width: 100%;
  height: 1px;
  pointer-events: none;
}
.ml-auto-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 6px 0;
}
.ml-auto-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
}
.ml-auto-status.is-done {
  color: #059669;
  font-weight: 600;
}
.ml-auto-status.is-err {
  color: #dc2626;
}
@keyframes mlSpin {
  to { transform: rotate(360deg); }
}
.ml-auto-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  border-top-color: #2563eb;
  animation: mlSpin 0.75s linear infinite;
  flex: none;
}
.ml-load-more-btn,
.ml-auto-toggle-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ml-load-more-btn {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}
.ml-load-more-btn:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}
.ml-auto-toggle-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.ml-back-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 900;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(6px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.ml-back-top:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}
.ml-video-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  font-size: 12px;
}
.ml-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.2);
  transition: background 0.15s ease;
}
.ml-card:hover .ml-play-overlay {
  background: rgba(15, 23, 42, 0.34);
}
.ml-play-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding-left: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.ml-badges-tl {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  pointer-events: none;
}
.ml-badges-tr {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}
.ml-badges-bl {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  pointer-events: none;
}
.ml-badge-chip {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  backdrop-filter: blur(4px);
}
.ml-badge-chip.is-comment { background: rgba(217, 119, 6, 0.92); }
.ml-badge-chip.is-live { background: rgba(124, 58, 237, 0.88); }
.ml-badge-chip.is-video { background: rgba(37, 99, 235, 0.88); }
.ml-badge-chip.is-douyin { background: rgba(15, 23, 42, 0.86); }

/* Grouped 2x2 collage */
.ml-collage {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  background: #e2e8f0;
  position: relative;
  cursor: pointer;
}
.ml-collage.is-single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.ml-collage.is-two {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}
.ml-collage-cell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(110deg, #edf2f7 25%, #f8fafc 45%, #e5ecf5 65%);
  background-size: 220% 100%;
  animation: mlShimmer 1.45s ease-in-out infinite;
}
.ml-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.ml-collage img.is-loaded {
  opacity: 1;
}
.ml-collage img.is-error {
  opacity: 0;
}

.ml-card-body {
  padding: 10px 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.ml-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}
.ml-card-title:hover {
  color: #1d4ed8;
}
.ml-comment-snippet {
  font-size: 11.5px;
  line-height: 1.4;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 7px;
  padding: 4px 7px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ml-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  margin-top: auto;
}
.ml-merchant-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.ml-merchant-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}
.ml-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 11.5px;
}
.ml-card-link {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.ml-card-link:hover {
  text-decoration: underline;
}

.ml-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 20px;
}

/* 2-Column Detail Lightbox Modal */
.ml-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.ml-modal {
  width: min(1220px, 100%);
  height: min(860px, calc(100vh - 36px));
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45);
}
.ml-modal-stage {
  background: #0b1120;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  position: relative;
}
.ml-stage-canvas {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 16px 52px;
  user-select: none;
}
.ml-stage-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.ml-stage-media.is-loading::after {
  content: '正在加载原图…';
  position: absolute;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-size: 12.5px;
  pointer-events: none;
}
.ml-stage-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ml-stage-img.is-loaded {
  opacity: 1;
}
.ml-stage-media .ml-img-error {
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  border-radius: 10px;
}
.ml-stage-img.is-zoom-anim {
  transition: transform 0.16s ease-out;
}
.ml-stage-img.is-zoomed-in {
  cursor: grab;
}
.ml-stage-img.is-dragging {
  cursor: grabbing;
}
.ml-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ml-stage-video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #000000;
}
.ml-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.ml-nav-arrow:hover {
  background: rgba(37, 99, 235, 0.9);
}
.ml-nav-arrow.is-prev { left: 10px; }
.ml-nav-arrow.is-next { right: 10px; }
.ml-nav-arrow:disabled { opacity: 0.25; cursor: not-allowed; }
.ml-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 12px;
}
.ml-speed-group {
  display: inline-flex;
  gap: 4px;
}
.ml-speed-btn {
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #cbd5e1;
  font-size: 11px;
  cursor: pointer;
}
.ml-speed-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.ml-filmstrip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #070b15;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}
.ml-film-thumb {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 7px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #1e293b;
  cursor: pointer;
  position: relative;
}
.ml-film-thumb.is-active {
  border-color: #3b82f6;
}
.ml-film-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ml-film-thumb img.is-loaded {
  opacity: 1;
}
.ml-film-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  font-size: 9px;
  padding: 0 3px;
  border-radius: 3px;
}

.ml-modal-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid #e2e8f0;
  background: #ffffff;
}
.ml-side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f8;
}
.ml-side-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ml-side-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
}
.ml-side-excerpt {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #475569;
  white-space: pre-wrap;
  word-break: break-word;
}
.ml-side-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.ml-side-meta-grid dt {
  font-size: 11px;
  color: #64748b;
}
.ml-side-meta-grid dd {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ml-side-comment-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ml-side-comment-box strong {
  font-size: 12.5px;
  color: #92400e;
}
.ml-side-comment-box p {
  margin: 0;
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.5;
}
.ml-side-actions {
  padding: 14px 16px;
  border-top: 1px solid #eef2f8;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}
.ml-side-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.ml-side-action-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ml-side-action-btn.is-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.ml-side-action-btn.is-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}
.ml-side-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 960px) {
  .ml-modal {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 52vh) 1fr;
    height: calc(100vh - 20px);
  }
  .ml-modal-side {
    border-left: none;
    border-top: 1px solid #e2e8f0;
  }
}
@media (max-width: 640px) {
  .ml-filter-panel {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ml-dedup-toggle {
    margin-left: 0;
  }
  .ml-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
/* === END: Archived Media Library === */

/* === 2026-11-25 Media 6-Dim Visual Element Tags & GLM-4V-Flash Admin Panel === */
.ml-elements-row {
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  gap: 6px;
}
.ml-elements-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  margin-right: 2px;
}
.ml-tag-select {
  height: 32px;
  font-size: 12px;
  padding: 0 8px;
  max-width: 155px;
}
.ml-tag-select.has-value {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
.ml-ai-only-toggle {
  margin-left: 4px;
}
.ml-vision-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ml-vision-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ml-vision-btn.is-active {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}
.ml-vision-btn.is-setup {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #b45309;
}
.ml-active-tags-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 9px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  font-size: 12px;
}
.ml-active-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #6d28d9;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.ml-active-tag-chip:hover {
  background: #5b21b6;
}
.ml-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.ml-card-tag-btn {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.45;
}
.ml-card-tag-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ml-card-tag-btn.dim-region { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.ml-card-tag-btn.dim-scenery { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.ml-card-tag-btn.dim-style { background: #fdf2f8; border-color: #fbcfe8; color: #be185d; }
.ml-card-tag-btn.dim-weather,
.ml-card-tag-btn.dim-lighting { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.ml-card-tag-btn.dim-subject { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.ml-card-tag-btn.dim-color { background: #f0fdfa; border-color: #99f6e4; color: #0f766e; }

.ml-side-tags-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ml-side-tags-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
}
.ml-side-caption {
  font-size: 12px;
  color: #1e293b;
  line-height: 1.45;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 6px 8px;
}
.ml-side-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ml-side-tag-list .ml-card-tag-btn {
  font-size: 11.5px;
  padding: 2px 8px;
}

/* Vision config modal */
.ml-vision-modal {
  max-width: 580px;
}
.device-action-modal-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.device-action-modal-body label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}
.device-action-modal-body input {
  width: 100%;
  box-sizing: border-box;
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
}
.device-action-modal-body input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.device-modal-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.device-preset-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.device-preset-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.ml-vision-progress-box {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ml-vision-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.ml-vision-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #10b981);
  transition: width 0.3s ease;
}
.ml-vision-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: #475569;
  font-variant-numeric: tabular-nums;
}
.ml-vision-test-result {
  padding: 10px 12px;
  border-radius: 9px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  color: #065f46;
  line-height: 1.5;
}
.ml-manual-tag-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 55vh;
  overflow-y: auto;
  padding: 14px 20px;
}
.ml-manual-dim-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ml-manual-dim-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.ml-manual-dim-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ml-manual-pill {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ml-manual-pill.is-picked {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
/* === END: Media Visual Element Tags === */

/* === 2026-11-25 Media Card Engagement Strip === */
.ml-card-eng {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.ml-eng-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.ml-eng-item.is-like.is-hot { color: #e11d48; }
.ml-eng-item.is-fav.is-hot { color: #d97706; }
.ml-eng-item.is-cmt.is-hot { color: #2563eb; }
.ml-eng-item.is-zero { opacity: 0.45; font-weight: 500; }

/* Media library pro vision filters & badges (image_type / quality / venue / price_hint) */
.ml-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
  white-space: nowrap;
}
.ml-quick-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.ml-quick-pill.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}
.ml-card-tag-btn.dim-venue {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #6d28d9;
}
.ml-card-tag-btn.dim-price {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
  font-weight: 600;
}
.ml-card-tag-btn.dim-quality {
  background: #fefce8;
  border-color: #fde047;
  color: #a16207;
  font-weight: 700;
  cursor: default;
}
.ml-card-tag-btn.dim-junk {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: default;
}
.ml-side-pro-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.ml-pro-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}
.ml-pro-pill.is-star {
  background: #fefce8;
  color: #a16207;
  border-color: #fde047;
}
.ml-side-price-box {
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px;
  line-height: 1.45;
}

/* Merged from post-trend-20261125 */
.post-metrics-trend {
  margin-top: 14px;
}
.post-metrics-head {
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.post-metrics-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.post-metrics-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #d5dfec;
  background: #f8fafd;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.post-metrics-pill:hover:not(:disabled) {
  border-color: var(--pill-color, #395fd4);
  color: #0f172a;
}
.post-metrics-pill.is-active {
  background: #fff;
  border-color: var(--pill-color, #395fd4);
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.post-metrics-pill:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.post-metrics-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pill-color, #395fd4);
  opacity: 0.35;
}
.post-metrics-pill.is-active .post-metrics-pill-dot {
  opacity: 1;
}
.post-metrics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}
.post-metrics-chip {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e4eaf3;
  border-left: 3px solid var(--chip-accent, #395fd4);
  background: #f9fbfe;
}
.post-metrics-chip-label {
  display: block;
  font-size: 12px;
  color: #64758f;
  margin-bottom: 4px;
}
.post-metrics-chip-val {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.post-metrics-chip-val strong {
  font-size: 18px;
  line-height: 1.2;
  color: #16233a;
  font-variant-numeric: tabular-nums;
}
.post-metrics-delta {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.post-metrics-delta.is-up {
  background: #e7f6ef;
  color: #15803d;
}
.post-metrics-delta.is-down {
  background: #fee2e2;
  color: #b91c1c;
}
.post-metrics-delta.is-flat {
  background: #f1f5f9;
  color: #64748b;
}
.post-metrics-chart-wrap {
  margin-top: 6px;
}
.post-metrics-svg-stage {
  position: relative;
  width: 100%;
  border: 1px solid #e6ecf5;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px 6px 4px;
  box-sizing: border-box;
}
.post-metrics-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  user-select: none;
  touch-action: pan-y;
}
.post-metrics-tooltip {
  position: absolute;
  top: 12px;
  z-index: 6;
  min-width: 176px;
  max-width: 240px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
}
.post-metrics-tip-head {
  font-weight: 600;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.post-metrics-tip-dev {
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.post-metrics-tip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.post-metrics-tip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
}
.post-metrics-tip-label i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.post-metrics-tip-val {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}
.post-metrics-tip-val strong {
  color: #ffffff;
}
.post-metrics-tooltip .post-metrics-delta.is-up {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}
.post-metrics-tooltip .post-metrics-delta.is-down {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.post-metrics-tooltip .post-metrics-delta.is-flat {
  background: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}
.post-metrics-chart-hint {
  margin-top: 8px;
  font-size: 12px;
}
.post-metrics-single-note {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafd;
  border: 1px dashed #cbd5e1;
  color: #475569;
  font-size: 13px;
}
.post-metrics-table-details {
  margin-top: 12px;
  border-top: 1px solid #e8eef6;
  padding-top: 10px;
}
.post-metrics-table-details > summary {
  cursor: pointer;
  color: #395fd4;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.post-metrics-table th,
.post-metrics-table td {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.post-metrics-num-cell {
  font-weight: 600;
}


.analytics-bar-fill.is-amber {
  background: linear-gradient(90deg, #d97706, #f59e0b);
}
.analytics-format-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.analytics-format-tile {
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.analytics-format-tile.is-note {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.analytics-format-tile.is-video {
  border-color: #99f6e4;
  background: #f0fdfa;
}
.analytics-format-head {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.analytics-format-lpp {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 4px 0 3px;
}
.analytics-format-sub {
  font-size: 11.5px;
}
.analytics-format-verdict {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 6px 10px;
}
.analytics-reedit-strip {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.analytics-reedit-title {
  font-size: 12px;
  font-weight: 600;
  color: #92400e;
}
.analytics-reedit-stats {
  font-size: 12px;
  color: #475569;
}
.analytics-fair-90d {
  color: #1d4ed8;
  font-weight: 600;
}
.analytics-reedit-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  vertical-align: middle;
}
.analytics-reedit-leads {
  color: #047857;
  font-weight: 600;
}
@media (max-width: 680px) {
  .analytics-format-grid {
    grid-template-columns: 1fr;
  }
}

/* Destination insights panel & Analytics layout fixes */
.analytics-brands-grid[hidden],
.analytics-brand-trend-panel[hidden],
.analytics-dest-overview-grid[hidden],
.analytics-dest-unspec[hidden] {
  display: none !important;
}
.analytics-bar-fill.is-rose {
  background: linear-gradient(90deg, #e11d48, #fb7185);
}
.analytics-bar-row.has-sub {
  grid-template-columns: 62px minmax(0, 1fr) auto;
}
.analytics-bar-row.has-sub .analytics-bar-val {
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
}
.analytics-bar-direct {
  font-size: 10.5px;
  font-weight: 500;
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  padding: 0 5px;
  line-height: 1.45;
}
.analytics-scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}
.analytics-detail-tri-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.analytics-destinations-section {
  padding-bottom: 18px;
}
.analytics-dest-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 20px;
  padding: 4px 24px 6px;
  align-items: start;
}
.analytics-dest-col {
  min-width: 0;
}
.analytics-dest-col h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}
.analytics-dest-subblock + .analytics-dest-subblock {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}
/* Destination bars use stacked (head + track) layout instead of the 3-col inline grid */
#analytics-destinations-section .analytics-bar-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-bottom: 9px;
  font-size: 12px;
}
#analytics-destinations-section .analytics-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
#analytics-destinations-section .analytics-bar-label {
  font-weight: 600;
  color: #243857;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
#analytics-destinations-section .analytics-bar-val {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
  color: #334155;
}
#analytics-destinations-section .analytics-bar-track {
  width: 100%;
  height: 7px;
}
.analytics-dest-unspec {
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
}
.dest-bar-direct-tag {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
}
#analytics-dest-ip-matrix {
  max-width: 100%;
  overflow-x: auto;
}
#analytics-dest-ip-matrix .brand-matrix-table .sticky-col {
  min-width: 72px;
  font-weight: 600;
  color: #1e293b;
}
.matrix-heat-cell {
  color: #1e293b;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.matrix-zero-cell {
  color: #cbd5e1;
}
@media (max-width: 980px) {
  .analytics-dest-overview-grid,
  .analytics-scene-grid,
  .analytics-detail-tri-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .analytics-dest-overview-grid {
    padding: 4px 16px 6px;
  }
}

/* Merchant Profile Directory & Brand Sets */
.merchants-directory-card { margin-top: 16px; }
.merchants-dir-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.mdir-brand-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mdir-brand-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.mdir-brand-name { font-weight: 700; font-size: 14px; color: #0f172a; }
.mdir-brand-meta { font-size: 12px; color: #475569; }
.mdir-brand-ev { font-size: 11.5px; color: #64748b; line-height: 1.4; }
.mdir-brand-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.mdir-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.mdir-pill.is-active { background: #dcfce7; color: #166534; }
.mdir-pill.is-warm { background: #fef9c3; color: #854d0e; }
.mdir-pill.is-dormant { background: #f1f5f9; color: #64748b; }
.mdir-pill.is-unknown { background: #e0f2fe; color: #075985; }
.mdir-brand-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
}

/* === Media Quick Sort Pills 2026-11-26 === */
.ml-sort-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}
.ml-sort-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-right: 2px;
}
.ml-sort-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
  white-space: nowrap;
}
.ml-sort-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.ml-sort-pill.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.14);
}
.ml-eng-item.is-sort-active {
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
  opacity: 1 !important;
}
.ml-eng-item.is-like.is-sort-active {
  background: #fff1f2;
  color: #e11d48;
  box-shadow: inset 0 0 0 1px #fecdd3;
}
.ml-eng-item.is-fav.is-sort-active {
  background: #fffbeb;
  color: #b45309;
  box-shadow: inset 0 0 0 1px #fde68a;
}
.ml-eng-item.is-cmt.is-sort-active {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}
@media (max-width: 900px) {
  .ml-sort-pills { margin-left: 0; }
}


/* Monthly post-cohort comment yield line chart on analytics page */
.analytics-cohort-card { margin-bottom: 16px; }
.analytics-cohort-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.analytics-cohort-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cohort-date-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; font-weight: 600; }
.cohort-date-label input[type="date"] { height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #16233a; font-size: 12px; }
.analytics-cohort-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.cohort-kpi-chip { padding: 10px 12px; border-radius: 10px; border: 1px solid #e4eaf3; border-left: 3px solid var(--chip-accent, #395fd4); background: #f9fbfe; }
.cohort-kpi-label { display: block; font-size: 12px; color: #64758f; }
.cohort-kpi-val { display: block; margin-top: 3px; font-size: 19px; color: #16233a; font-variant-numeric: tabular-nums; }
.cohort-kpi-sub { display: block; margin-top: 2px; font-size: 11.5px; color: #64758f; font-variant-numeric: tabular-nums; }
.cohort-svg { max-height: 320px; }


/* Water-army (shill) badge & subtle highlight on post/comments/accounts views */
.comment-nick-line {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.comment-water-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  text-decoration: none !important;
  white-space: nowrap;
  vertical-align: middle;
}
a.comment-water-badge:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #9f1239;
}
.account-list-identity-link .comment-water-badge {
  margin-left: 5px;
}
.kind.comment-water-flag {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-weight: 600;
}
.post-view #stream-detail tbody tr.comment-water-row,
#stream-detail tbody tr.comment-water-row {
  background: #fff9fa;
}
.post-view #stream-detail tbody tr.comment-water-row:hover,
#stream-detail tbody tr.comment-water-row:hover {
  background: #fff1f3;
}
.post-view #stream-detail tbody tr.comment-water-row > td:nth-child(3) {
  box-shadow: inset 3px 0 0 #f43f5e;
}
.comment-quick-mark-btn.is-water {
  color: #be123c;
  border-color: #fecdd3;
  background: #fff5f6;
}
.comment-quick-mark-btn.is-water:hover:not(:disabled) {
  background: #ffe4e6;
  border-color: #fda4af;
}
