@font-face{font-family:Be Vietnam;src:url('./fonts/be-vietnam-pro-vietnamese-400-normal.woff2')}@font-face{font-family:Be Vietnam;src:url('./fonts/be-vietnam-pro-vietnamese-600-normal.woff2');font-weight:600}@font-face{font-family:Be Vietnam;src:url('./fonts/be-vietnam-pro-latin-400-normal.woff2');unicode-range:U+0000-00FF}@font-face{font-family:Be Vietnam;src:url('./fonts/be-vietnam-pro-latin-600-normal.woff2');font-weight:600;unicode-range:U+0000-00FF}
:root{--paper:#f6f7fb;--white:#fff;--ink:#202a3a;--muted:#738094;--line:#e5e8f0;--blue:#4856cb;--lavender:#eef0ff;--green:#217d69;--purple:#a18fc7}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--paper);color:var(--ink);font:13px/1.6 'Be Vietnam',sans-serif}button,input,select{font:inherit}button,a,input,select{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}a{color:var(--blue);text-decoration:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #adb6ff;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:29px;letter-spacing:-1px;font-weight:600;line-height:1.4}h2{font-size:15px;font-weight:600}h3{font-size:13px;margin:24px 0 8px}button{border:0;background:none;color:inherit}input,select{border:1px solid var(--line);background:white;border-radius:7px;padding:10px 12px;color:var(--ink);min-height:42px}input[type=date]{min-width:140px}select{padding-right:28px;max-width:100%}.brand{font-family:Georgia,serif;letter-spacing:4px;font-size:23px}.eyebrow{font-size:10px;font-weight:600;letter-spacing:1.8px;color:var(--blue);margin-bottom:8px}.muted{color:var(--muted)}.primary{background:var(--blue);color:white;border-radius:7px;padding:13px 20px;font-weight:600}.primary span{margin-left:20px}.secondary{display:inline-block;border:1px solid var(--line);background:white;border-radius:7px;padding:9px 14px;white-space:nowrap}.secondary:hover{border-color:#bac3df;background:#fafbff}.quiet{color:var(--muted);padding:8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.topbar{height:78px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 40px;background:white}.identity,.header-tools{display:flex;align-items:center;gap:22px}.identity>span:last-child{font-size:13px;color:var(--muted)}.divider{height:24px;width:1px;background:var(--line)}.header-tools{gap:24px;font-size:12px}.page-heading{display:flex;justify-content:space-between;align-items:center;padding:30px 40px 22px}.page-heading p{color:var(--muted);font-size:11px;margin-top:8px}.filter-bar,.period-label,.metrics,.insights,.products,footer,.notice{margin-left:40px;margin-right:40px}.filter-bar{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border-top:1px solid var(--line)}.period-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.segments{display:flex;background:#e9ecf4;border-radius:8px;padding:4px}.segments button{padding:8px 14px;font-size:12px;border-radius:5px;white-space:nowrap}.segments .selected{background:white;color:var(--blue);box-shadow:0 1px 4px #202a3a12}.category-control{display:flex;align-items:center;gap:10px}.category-control label{color:var(--muted);font-size:12px}#custom-dates{display:flex;gap:8px;align-items:center}.period-label{color:var(--muted);font-size:11px;margin-bottom:15px}.notice{border:1px solid #e3d5b7;border-radius:7px;padding:11px 14px;color:#84662b;background:#fffaf0;font-size:12px;margin-bottom:15px}.metrics{display:grid;grid-template-columns:1fr 1fr .85fr .85fr 1.3fr;border:1px solid var(--line);border-radius:12px;background:white;overflow:hidden}.metrics article{padding:22px 24px;min-width:0}.metrics article+article{border-left:1px solid var(--line)}.metrics article>span{font-size:12px;color:var(--muted);display:block}.metrics article>strong{display:block;font-size:27px;font-weight:600;letter-spacing:-.9px;margin:10px 0 3px;white-space:nowrap;font-variant-numeric:tabular-nums}.metrics article>small{font-size:10px;color:var(--muted)}.status-card>span{display:flex!important;justify-content:space-between}.status-card>span b{color:var(--ink);font-size:14px}.status-counts{display:flex;justify-content:space-between;margin-top:8px;gap:12px}.status-counts strong{font-size:25px;font-weight:600;display:block}.status-counts small{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:10px;white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;background:var(--muted);flex-shrink:0}.dot.active{background:var(--green)}.dot.paused{background:#aab0bd}.dot.other{background:#c59743}.dot.spend{background:#dc2626}.dot.sales{background:#15803d}.insights{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(280px,1fr);gap:20px;margin-top:20px;margin-bottom:28px}.chart-panel,.category-panel{background:white;border:1px solid var(--line);border-radius:12px;padding:20px 24px}.panel-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;gap:10px}.legend{display:flex;gap:14px;font-size:10px;color:var(--muted)}.legend span{display:flex;gap:5px;align-items:center}#chart svg{display:block;width:100%;height:185px}#chart svg text{font:10px 'Be Vietnam',sans-serif;fill:var(--muted)}.gridline{stroke:var(--line);stroke-dasharray:4 4}.sales-line,.spend-line{fill:none;stroke-width:2.5;stroke-linejoin:round}.sales-line{stroke:#15803d}.spend-line{stroke:#dc2626}.sales-point{fill:#15803d;stroke:white;stroke-width:2}.spend-point{fill:#dc2626;stroke:white;stroke-width:2}#category-summary{height:185px;overflow-y:auto;scrollbar-width:thin}.category-row{width:100%;display:grid;grid-template-columns:1fr auto;gap:3px 16px;text-align:left;padding:6px 0;font-size:11px}.category-row strong{font-weight:400}.category-row progress{grid-column:1/-1;width:100%;height:3px;border:0;border-radius:4px;appearance:none}.category-row progress::-webkit-progress-bar{background:#f0f1f6}.category-row progress::-webkit-progress-value{background:#a6aedf}.category-row progress::-moz-progress-bar{background:#a6aedf}.category-row:hover{color:var(--blue)}.chart-empty{height:185px;display:grid;place-items:center;color:var(--muted)}
.products{background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}.products-heading{display:flex;align-items:center;justify-content:space-between;padding:23px 24px 16px;gap:12px}.products-heading p{color:var(--muted);font-size:11px;margin-top:4px}.count-badge{background:var(--lavender);color:var(--blue);border-radius:5px;font-size:11px;padding:3px 8px;margin-left:7px;vertical-align:middle}.table-controls{display:flex;align-items:center;gap:10px;padding:0 24px 20px}.table-controls select{font-size:11px}.search{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:7px;padding-left:12px;flex:1;min-width:200px}.search>span{font-size:22px;color:var(--muted);line-height:1}.search input{border:0;min-width:0;width:100%;background:transparent;font-size:12px}.table-scroll{width:100%;overflow:auto;scrollbar-width:thin}table{border-collapse:collapse;width:100%;white-space:nowrap;font-size:12px}th{background:#f8f9fc;font-size:10px;font-weight:400;color:var(--muted);text-align:right;padding:12px 16px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}td{text-align:right;padding:11px 16px;border-bottom:1px solid #eef0f5;font-variant-numeric:tabular-nums}th:first-child,td:first-child{text-align:left;padding-left:24px}th:nth-child(2),td:nth-child(2){text-align:left}.product-button{display:flex;align-items:center;gap:13px;text-align:left;max-width:310px;padding:0}.product-button img{object-fit:cover;border-radius:5px;background:var(--paper);flex-shrink:0}.product-button b{font-weight:600;display:block;white-space:normal;min-width:140px;line-height:1.4}.product-button small{font-size:9px;display:block;color:var(--muted);margin-top:5px;white-space:normal}.image-placeholder{width:44px;height:58px;background:var(--lavender);color:#8c94b4;border-radius:5px;display:grid;place-items:center;font:19px Georgia;flex-shrink:0}.status-pill{padding:4px 7px;border-radius:4px;font-size:9px;background:#f1f3f7;color:#7d8797}.status-pill.active{background:#edf7f3;color:var(--green)}.status-pill.other{background:#fbf5e9;color:#946e2e}.budget{font-size:10px;color:#778298}.spend-cell{font-weight:600;color:#4757a8}.ratio{font-size:11px}.ratio.high{color:#ab6d60}.reconcile-row{background:#fcfbf7}.reconcile-row .product-button b{font-size:11px}.pagination{display:flex;justify-content:space-between;align-items:center;padding:17px 24px;color:var(--muted);font-size:11px}.pagination>div{display:flex;gap:8px}.empty{text-align:center;padding:45px 20px;color:var(--muted)}footer{padding:25px 0 32px;color:var(--muted);font-size:10px;line-height:1.9}footer p{margin-bottom:7px;max-width:1180px}footer>span{display:block;letter-spacing:2px;font-size:9px;margin-top:18px}.preserve{white-space:pre-line;color:var(--muted);font-size:12px}dialog{border:1px solid var(--line);border-radius:14px;max-width:720px;width:calc(100% - 32px);padding:26px;color:var(--ink);max-height:85vh}dialog::backdrop{background:#202a3a75;backdrop-filter:blur(3px)}.detail-head{display:flex;justify-content:space-between;align-items:center}.detail-head h2{font-size:20px}.detail-totals{display:flex;justify-content:space-between;padding:22px 0;border-bottom:1px solid var(--line);gap:12px}.detail-totals>div{font-size:11px;color:var(--muted)}.detail-totals strong{display:block;font-size:18px;color:var(--ink);margin-top:5px}#detail-body>a{margin-top:22px}.login-shell{min-height:100dvh;display:grid;grid-template-columns:1fr 1fr;padding:60px 10%;align-items:center;gap:50px;background:linear-gradient(120deg,#f3f5fb 50%,#fff 50%)}.login-brand{align-self:start;margin-top:35px;display:flex;flex-direction:column;gap:18px}.login-brand .brand{font-size:40px;letter-spacing:8px}.login-brand>span:last-child{font-size:10px;letter-spacing:3px;color:var(--muted)}.login-card{max-width:410px;width:100%;margin:80px auto}.login-card h1{font-size:35px;line-height:1.5;letter-spacing:-1.3px;margin-bottom:15px}.login-card>p{font-size:12px;color:var(--muted);margin-bottom:35px}.login-card label{display:block;font-size:11px;margin-bottom:8px}.login-card input{width:100%;height:50px}.login-card .primary{width:100%;margin-top:8px}.login-card small{display:block;text-align:center;margin-top:32px;font-size:9px;letter-spacing:2px;color:var(--muted)}.login-card #login-error{color:#ad5149;font-size:11px;margin:8px 0 0;min-height:18px}
@media(min-width:1600px){main{max-width:1680px;margin:auto}.metrics article>strong{font-size:32px}}@media(max-width:1150px){.metrics{grid-template-columns:1fr 1fr}.metrics article:nth-child(3){border-left:0;border-top:1px solid var(--line)}.metrics article:nth-child(4){border-top:1px solid var(--line)}.table-controls{flex-wrap:wrap}.search{flex-basis:100%}.filter-bar{align-items:flex-start}.category-control{flex-direction:column;align-items:flex-start;gap:3px}.insights{grid-template-columns:1.5fr 1fr}.metrics article>strong{font-size:27px}.login-shell{padding:50px 7%}.login-card h1{font-size:30px}}
@media(max-width:760px){.topbar{height:64px;padding:0 18px}.identity{gap:12px}.brand{font-size:19px;letter-spacing:3px}.identity>span:last-child{display:none}.divider{display:none}.header-tools{gap:8px;font-size:10px}.page-heading{padding:24px 18px 18px;gap:10px;align-items:flex-start}h1{font-size:23px}.page-heading .secondary{font-size:10px;padding:7px 10px}.page-heading p{font-size:10px;max-width:250px}.eyebrow{font-size:8px;letter-spacing:1.4px}.filter-bar,.period-label,.metrics,.insights,.products,footer,.notice{margin-left:16px;margin-right:16px}.filter-bar{flex-direction:column;gap:12px;padding:13px 0}.period-controls{gap:10px;width:100%}.segments{width:100%;justify-content:space-between}.segments button{padding:8px 12px;font-size:11px}.category-control{flex-direction:row;align-items:center;width:100%}.category-control select{flex:1}.period-label{font-size:9px;line-height:1.9}.metrics article{padding:17px 15px}.metrics article>span{font-size:10px}.metrics article>strong{font-size:20px;letter-spacing:-.7px}.metrics article>small{font-size:9px}.status-card>span b{font-size:12px}.status-counts{gap:6px}.status-counts strong{font-size:21px}.status-counts small{font-size:8px;gap:3px}.dot{width:5px;height:5px}.insights{grid-template-columns:1fr;gap:14px;margin-top:14px;margin-bottom:18px}.chart-panel,.category-panel{padding:18px 15px}.panel-heading h2{font-size:13px}#chart svg{height:auto;min-height:145px}#category-summary{height:auto;max-height:170px}.category-row{padding:7px 0}.products-heading{padding:18px 15px 14px}.products-heading h2{font-size:13px}.products-heading p{font-size:9px}.products-heading button{font-size:10px}.table-controls{padding:0 15px 15px;gap:8px}.table-controls select{flex:1;min-width:120px;font-size:10px}.table-controls #sort{flex-basis:100%}.product-button{min-width:190px;max-width:240px;gap:9px}.product-button b{font-size:11px}.product-button img,.image-placeholder{width:36px;height:48px}.product-button small{font-size:8px}td,th{padding:10px 12px}td:first-child,th:first-child{padding-left:15px}th:first-child,td:first-child{position:sticky;left:0;background:white;z-index:1;box-shadow:2px 0 4px #202a3a08}th:first-child{background:#f8f9fc}.reconcile-row td:first-child{background:#fcfbf7}.pagination{padding:15px;font-size:10px}.pagination button{font-size:10px;padding:7px 10px}footer{font-size:9px}.login-shell{display:block;padding:35px 24px;min-height:100dvh;background:linear-gradient(160deg,#f1f3fb 0%,white 65%)}.login-brand{margin:10px 0 60px;gap:12px}.login-brand .brand{font-size:28px;letter-spacing:5px}.login-brand>span:last-child{font-size:8px}.login-card{margin:0 auto 30px;max-width:420px}.login-card h1{font-size:31px}.login-card>p{margin-bottom:26px}.detail-totals strong{font-size:15px}.detail-totals{flex-wrap:wrap}dialog{padding:20px}.notice{font-size:10px}#custom-dates{gap:5px;font-size:10px}#custom-dates input{min-width:0;width:135px;font-size:11px;padding:8px}}
@media(prefers-reduced-motion:no-preference){button,a{transition:background .15s,color .15s,border-color .15s}}

.primary-nav{display:flex;align-items:center;gap:5px}.primary-nav a{padding:9px 12px;border-radius:7px;color:var(--muted);font-size:12px}.primary-nav a[aria-current="page"]{background:#eef0fa;color:var(--blue);font-weight:600}
.customer-page{padding-bottom:30px}.customer-page .page-heading{padding-top:30px}.customer-controls{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 40px 8px;padding:14px 0;border-top:1px solid var(--line)}.customer-controls .segments button{font-size:12px}.customer-group-filter{display:flex;align-items:center;gap:9px;margin-left:auto;color:var(--muted);font-size:12px}.customer-group-filter select{min-width:170px}.customer-controls #customer-custom-dates{display:flex;align-items:center;gap:8px;font-size:12px}.customer-controls #customer-custom-dates[hidden]{display:none}.customer-controls input[type=date]{width:145px}.customer-page .period-label,.customer-page .notice{margin-left:40px;margin-right:40px}.customer-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:15px 40px 20px}.customer-metrics article,.customer-panel{background:#fff;border:1px solid var(--line);border-radius:12px}.customer-metrics article{padding:18px 22px;min-width:0}.customer-metrics article>span,.customer-metrics article>small{display:block;color:var(--muted);font-size:11px}.customer-metrics article>strong{display:block;margin:9px 0 3px;font-size:25px;letter-spacing:-.6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.customer-panel{margin:0 40px 18px;overflow:hidden}.customer-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 22px}.customer-panel-heading h2{font-size:15px}.customer-panel-heading p{font-size:11px;color:var(--muted);margin-top:5px}.customer-groups{display:flex;gap:10px;padding:0 22px 18px;overflow-x:auto}.customer-group-card{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:170px;padding:12px 14px;border:1px solid var(--line);border-radius:9px;background:#fff;text-align:left}.customer-group-card.selected,.customer-group-card:hover{border-color:#8d9ae0;background:#f7f8ff}.customer-group-card>span{font-size:12px;font-weight:600}.customer-group-card>strong{font-size:11px}.customer-group-card>small{font-size:10px;color:var(--muted)}.customer-table-heading{padding-bottom:14px}.customer-table-controls{padding:0 22px 15px}.customer-table-controls .search{max-width:600px}.customer-panel table{min-width:1050px}.customer-panel th:nth-child(2),.customer-panel td:nth-child(2){text-align:left}.customer-panel td{vertical-align:top}.customer-panel td:first-child{min-width:190px}.customer-panel td:first-child strong{display:block;white-space:normal}.customer-code{display:block;color:var(--muted);font-size:10px;margin-top:4px}.customer-tag{display:inline-block;padding:4px 8px;border-radius:20px;background:#f1f2f8;color:#58627b;font-size:10px}.customer-sales{font-weight:600;color:#34437a}.customer-products{white-space:normal;min-width:280px;max-width:440px;text-align:left!important;font-size:11px;line-height:1.65}.customer-products>span{display:block}.customer-products small{color:var(--muted);white-space:nowrap}.customer-panel .pagination{padding:13px 22px}.customer-panel .empty{padding:24px}
@media(max-width:760px){.topbar .identity{gap:7px}.primary-nav{gap:1px}.primary-nav a{padding:8px 7px;font-size:10px;white-space:nowrap}.customer-page .page-heading{padding:22px 16px 17px}.customer-controls,.customer-page .period-label,.customer-page .notice{margin-left:16px;margin-right:16px}.customer-controls{gap:9px;align-items:flex-start;flex-direction:column;padding:12px 0}.customer-controls .segments{width:100%;justify-content:space-between}.customer-controls .segments button{padding:8px 9px;font-size:10px}.customer-group-filter{margin:0;width:100%;justify-content:space-between}.customer-group-filter select{flex:1;max-width:70%}.customer-controls #customer-custom-dates{flex-wrap:wrap}.customer-controls input[type=date]{flex:1;min-width:120px}.customer-metrics{grid-template-columns:1fr;margin:12px 16px 16px;gap:8px}.customer-metrics article{padding:13px 15px}.customer-metrics article>strong{font-size:20px;margin:5px 0 2px}.customer-panel{margin:0 16px 14px}.customer-panel-heading{padding:15px}.customer-groups{padding:0 15px 15px}.customer-group-card{min-width:150px}.customer-table-controls{padding:0 15px 12px}.customer-panel table{min-width:960px}.customer-panel th,.customer-panel td{padding:10px 11px;font-size:10px}.customer-panel td:first-child{min-width:160px}.customer-products{min-width:240px}.customer-panel .pagination{padding:12px 15px}}

/* Daily comparison grid: fixed identity, grouped dates, totals across every filtered page. */
.table-view-bar{display:flex;align-items:center;gap:18px;padding:0 24px 18px}.table-view-bar p{font-size:11px;color:var(--muted)}.daily-scroll{max-height:650px;scrollbar-width:auto}.daily-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%}.daily-table th,.daily-table td{text-align:right;min-width:140px;padding:12px 16px}.daily-table .day-start{border-left:2px solid #d5dae8}.daily-table thead th{position:sticky;z-index:3}.daily-table .day-groups th{top:0;height:44px;text-align:center;background:#e9edf8;color:#38477a;font-weight:600;font-size:13px;border-bottom:0}.daily-table .day-labels th{top:44px;height:60px;background:#f2f4fb;color:#596783;line-height:1.5}.daily-table .day-labels th:nth-child(6n+4){min-width:130px}.daily-table td:first-child,.daily-table .product-heading,.daily-table .daily-totals th{position:sticky;left:0;width:280px;min-width:280px;max-width:280px;text-align:left;background:white;z-index:2;box-shadow:3px 0 5px #202a3a0c}.daily-table .product-heading{z-index:5;background:#e9edf8!important}.daily-table .product-button{max-width:248px}.daily-table .daily-totals th,.daily-table .daily-totals td{background:#46557c;color:white;font-weight:600;border-bottom:1px solid #46557c;position:sticky;top:104px;z-index:3;height:65px}.daily-table .daily-totals th{z-index:4}.daily-totals small{display:block;font-size:9px;font-weight:400;opacity:.8}.daily-totals .ratio.high{color:inherit}.daily-table .period-total{background:#f5f6fc}.daily-table tbody tr:not(.daily-totals):hover td{background:#f0f3fc}.daily-table .reconcile-row td:first-child{background:#fcfbf7}.daily-table td{height:82px}.daily-table .daily-totals .day-start{border-left-color:#657498}
@media(max-width:760px){.table-view-bar{padding:0 15px 15px;align-items:flex-start;flex-direction:column;gap:8px}.table-view-bar .segments{width:auto}.table-view-bar p{font-size:9px}.daily-scroll{max-height:70vh}.daily-table td:first-child,.daily-table .product-heading,.daily-table .daily-totals th{width:190px;min-width:190px;max-width:190px;padding-left:12px;padding-right:10px}.daily-table .product-button{min-width:0;max-width:168px}.daily-table .product-button b{min-width:0}.daily-table .product-button img,.daily-table .image-placeholder{display:none}.daily-table th,.daily-table td{min-width:125px;padding:10px 12px}}

.daily-table .orders-cell,.daily-table .orders-heading{min-width:85px;width:85px}.orders-cell{font-variant-numeric:tabular-nums}

/* Pin the entire period block alongside the product identity when space permits. */
.daily-table tbody td.freeze-column{position:sticky;z-index:2;background:#f5f6fc}
.daily-table thead th.freeze-column{z-index:5}
.daily-table .daily-totals td.freeze-column{z-index:4;background:#46557c}
.daily-table tbody td.freeze-column:nth-child(8),.daily-table .day-labels th.freeze-column:nth-child(6),.daily-table .period-group.freeze-column{box-shadow:4px 0 5px #202a3a15;border-right:2px solid #c6cede}

.daily-table .messages-cell,.daily-table .messages-heading,.daily-table .closing-cell,.daily-table .closing-heading{min-width:115px;width:115px}.detail-totals{flex-wrap:wrap}

/* Compact numeric columns and a full, readable grid. */
#product-table{font-size:11px}
#product-table th,#product-table td{padding:9px 10px;border-right:1px solid #d8dde7;border-bottom:1px solid #d8dde7}
#product-table thead th{line-height:1.45}
#product-table.daily-table th,#product-table.daily-table td{min-width:0}
#product-table.daily-table .day-labels th{min-width:110px;width:110px}
#product-table.daily-table .day-labels th:nth-child(6n+3),#product-table.daily-table .orders-cell{min-width:60px;width:60px}
#product-table.daily-table .day-labels th:nth-child(6n+4){min-width:90px;width:90px}
#product-table.daily-table .messages-cell,#product-table.daily-table .messages-heading{min-width:90px;width:90px}
#product-table.daily-table .closing-cell,#product-table.daily-table .closing-heading{min-width:80px;width:80px}
#product-table.daily-table td:first-child,#product-table.daily-table .product-heading,#product-table.daily-table .daily-totals th{width:220px;min-width:220px;max-width:220px;padding-left:12px}
#product-table.daily-table .product-button{max-width:196px;gap:9px}
#product-table.daily-table .product-button b{min-width:0;font-size:11px}
#product-table.daily-table .product-button small{font-size:8px}
#product-table.daily-table td{height:74px}
#product-table.daily-table .daily-totals td,#product-table.daily-table .daily-totals th{height:65px;border-color:#7581a0}
#product-table.daily-table .day-groups th{border-bottom:1px solid #cdd5e5}
#product-table.daily-table .day-start{border-left:2px solid #bbc5d9}
@media(max-width:760px){#product-table.daily-table td:first-child,#product-table.daily-table .product-heading,#product-table.daily-table .daily-totals th{width:150px;min-width:150px;max-width:150px}#product-table.daily-table .product-button{max-width:128px}}

/* Size every numeric column from its actual values rather than a preset width. */
#product-table.daily-table{width:max-content;min-width:0}
#product-table.daily-table .day-labels th,#product-table.daily-table tbody td:not(:first-child){min-width:0!important;width:auto!important;padding-left:6px;padding-right:6px}
#product-table.daily-table td:first-child,#product-table.daily-table .product-heading,#product-table.daily-table .daily-totals th{width:190px;min-width:190px;max-width:190px;padding-left:8px;padding-right:8px}
#product-table.daily-table .product-button{max-width:172px;gap:7px}
#product-table.daily-table .product-button img,#product-table.daily-table .image-placeholder{width:32px;height:44px}
#product-table.daily-table .day-labels th{font-size:9px}
#product-table .ratio{font-size:10px}
.products{margin-bottom:24px}
@media(max-width:760px){#product-table.daily-table td:first-child,#product-table.daily-table .product-heading,#product-table.daily-table .daily-totals th{width:130px;min-width:130px;max-width:130px}#product-table.daily-table .product-button{max-width:112px}}

/* Current inventory stays beside product identity; it is not historical daily stock. */
#product-table.daily-table .stock-column{position:sticky;left:190px;text-align:right;z-index:2;background:white;border-right:1px solid #bbc5d9}
#product-table.daily-table .stock-heading{z-index:5;background:#e9edf8;text-align:center;font-size:11px;min-width:68px;width:68px}
#product-table.daily-table .daily-totals .stock-column{z-index:4;background:#46557c;color:white}
#product-table.daily-table .reconcile-row .stock-column{background:#fcfbf7}
@media(max-width:760px){#product-table.daily-table .stock-column{left:130px}#product-table.daily-table .stock-heading{min-width:62px;width:62px}}

.forecast-cell{min-width:125px!important;width:125px;max-width:150px;white-space:normal!important;text-align:center!important;line-height:1.45;}

/* Five overview cards: CRM and Meta ratios remain adjacent on smaller screens. */
@media(max-width:1400px){.metrics{grid-template-columns:1fr 1fr}.metrics article:nth-child(n+3){border-top:1px solid var(--line)}.metrics article:nth-child(odd){border-left:0}.metrics .status-card{grid-column:1/-1}}

/* Audience summary is intentionally small; no additional product-grid work on search. */
.audience-panel{margin:0 40px 24px;background:white;border:1px solid var(--line);border-radius:12px;overflow:hidden}
.audience-heading{padding:20px 24px 16px;display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.audience-heading p,#audience-note{font-size:11px}
#audience-table th,#audience-table td{padding:12px 14px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);text-align:right}
#audience-table th:first-child{text-align:left;padding-left:24px}
#audience-table tbody th{background:white;font-size:12px;color:var(--ink);font-weight:400}
#audience-table .audience-total th,#audience-table .audience-total td{background:#eef0f8;font-weight:600}
#audience-table .audience-empty{text-align:center;color:var(--muted);padding:24px}
#audience-note{padding:12px 24px;line-height:1.6}
@media(max-width:760px){.audience-panel{margin:0 16px 20px}.audience-heading{padding:18px 15px 12px}.audience-heading p,#audience-note{font-size:10px}#audience-note{padding:12px 15px}#audience-table th,#audience-table td{font-size:11px;padding:10px 12px}#audience-table th:first-child{padding-left:15px;position:sticky;left:0;z-index:1;box-shadow:2px 0 4px #202a3a08}#audience-table thead th:first-child{background:#f8f9fc}}

.audience-link{padding:0;text-align:left;color:var(--blue);font-weight:600;text-decoration:underline;text-decoration-color:#bcc3e5;text-underline-offset:3px}.audience-link span{margin-left:5px;font-size:10px}.audience-link:hover{text-decoration-color:currentColor}
#audience-detail{max-width:1100px}.campaign-scope{margin:16px 0;line-height:1.8}.campaign-table td,.campaign-table th{border:1px solid var(--line);padding:12px;text-align:left}.campaign-table td:first-child{min-width:240px;max-width:390px;white-space:normal}.campaign-table small{display:block;font-size:10px;color:var(--muted);margin-top:5px;white-space:normal}.campaign-table a{font-weight:600}.campaign-empty{padding:24px 0}
@media(max-width:760px){#audience-detail{padding:18px}#audience-detail .detail-head h2{font-size:18px}.campaign-table td:first-child,.campaign-table th:first-child{position:static;min-width:200px;box-shadow:none}.campaign-table td{font-size:11px}}

.chart-heading{margin-bottom:12px}.chart-meta{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-bottom:8px}.chart-meta p{margin:0;font-size:10px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}.chart-meta .legend{flex-shrink:0}
.row-trend{display:block;width:100%;max-width:172px;padding:0;margin:7px 0 0;text-align:left;border-radius:3px}.row-trend svg{display:block;width:100%;height:auto;max-height:52px}.row-trend svg text{font:9px 'Be Vietnam',sans-serif;fill:var(--muted)}.row-trend .sales-line,.row-trend .spend-line{stroke-width:1.7}.row-trend .sales-point,.row-trend .spend-point{stroke-width:.6}.row-trend:hover{background:#f1f3fb}.row-trend:focus-visible{outline:2px solid var(--blue);outline-offset:3px}.row-trend-guide{display:flex;flex-wrap:wrap;align-items:center;gap:7px 14px;padding:0 24px 14px;font-size:10px;color:var(--muted)}.row-trend-guide>span{display:flex;align-items:center;gap:5px}.row-trend-guide>span:last-child{color:var(--muted)}.pagination>div[hidden]{display:none}
@media(max-width:760px){.chart-meta{align-items:flex-start}.chart-meta p{width:100%}.row-trend-guide{padding:0 15px 12px;font-size:9px;gap:6px 10px}}

#detail>.detail-head{align-items:flex-start;gap:12px}#detail-product{display:flex;align-items:center;gap:18px;min-width:0}.detail-product-info{min-width:0}.detail-product-info h2{overflow-wrap:anywhere}.detail-product-info p{margin:7px 0 14px;font-size:12px;overflow-wrap:anywhere}.detail-photo{width:96px;height:128px;flex-shrink:0;background:#f6f7fb;border:1px solid var(--line);border-radius:7px;overflow:hidden}.detail-photo img{display:block;width:100%;height:100%;object-fit:contain}.detail-photo-empty{display:grid;place-items:center;height:100%;font-size:11px;color:var(--muted);text-align:center}.detail-fanpage{display:inline-flex;align-items:center;font-size:12px}#close-detail{flex-shrink:0}
@media(max-width:760px){#detail-product{gap:12px}.detail-photo{width:72px;height:96px}#detail-product h2{font-size:17px}.detail-product-info p{font-size:10px;margin:6px 0 10px}.detail-fanpage{font-size:10px;padding:7px 8px}#detail>.detail-head{gap:6px}}

#meta-legend{display:flex;flex-wrap:wrap;gap:8px;padding:0 24px 14px;font-size:11px}#meta-legend[hidden],.row-trend-guide[hidden]{display:none}#meta-legend span{padding:5px 9px;border-radius:5px}.meta-good{background:#e1f3e8;color:#17623c}.meta-warning{background:#fff1c7;color:#795800}.meta-bad{background:#fbe3e3;color:#a12b2b}.meta-missing{background:#f1f3f6;color:#778298}#product-table.meta-table{border-collapse:separate;border-spacing:0;width:100%;min-width:max-content}#product-table.meta-table th,#product-table.meta-table td{padding:12px 16px;min-width:90px;text-align:center;border-right:1px solid #e4e8f0}#product-table.meta-table thead th{position:sticky;top:0;z-index:3;height:52px;background:#e9edf8;font-weight:600;color:#38477a}#product-table.meta-table th:first-child,#product-table.meta-table td:first-child{position:sticky;left:0;min-width:220px;width:220px;max-width:220px;text-align:left;background:white;z-index:2}#product-table.meta-table thead th:first-child{z-index:5;background:#e9edf8}#product-table.meta-table .product-button{max-width:188px}#product-table.meta-table .meta-totals th,#product-table.meta-table .meta-totals td{position:sticky;top:52px;z-index:3;font-weight:600;border-bottom:2px solid #aebbd2}#product-table.meta-table .meta-totals th:first-child{z-index:4;background:#e9edf8}#product-table.meta-table .meta-totals td:nth-child(2){background:#e9edf8}#product-table.meta-table .meta-totals small{display:block;font-size:9px;font-weight:400;margin-top:5px}#product-table.meta-table .meta-heat{font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}#product-table.meta-table .meta-period{border-right:2px solid #aebbd2}.table-view-bar .segments{flex-wrap:wrap}
@media(max-width:760px){#meta-legend{padding:0 15px 12px;font-size:10px}#product-table.meta-table th,#product-table.meta-table td{min-width:72px;padding:10px}#product-table.meta-table th:first-child,#product-table.meta-table td:first-child{min-width:140px;width:140px;max-width:140px}#product-table.meta-table .product-button{min-width:0;max-width:120px}#product-table.meta-table .product-button b{min-width:0}#product-table.meta-table .product-button img,#product-table.meta-table .image-placeholder{display:none}#product-table.meta-table .meta-heat{font-size:12px}}

#meta-legend button{padding:5px 9px;border-radius:5px;border:2px solid transparent;font-size:inherit}#meta-legend .meta-all{background:#f1f3f6;color:#48556d}#meta-legend button.selected{border-color:currentColor;font-weight:600}#meta-legend button:hover{box-shadow:inset 0 0 0 1px currentColor}

#meta-legend .meta-no-spend{background:#ede8fa;color:#624394}

#product-table.crm-sales-table .crm-sales-cell{text-align:right;min-width:118px;font-size:12px;font-variant-numeric:tabular-nums}#product-table.crm-sales-table .meta-period{background:#f4f1fa;font-weight:600}#product-table.crm-sales-table .meta-totals .crm-sales-cell{background:#e9edf8}

.sales-sort-bar{padding:0 24px 16px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;font-size:12px;color:var(--muted,#64748b)}
.sales-sort-bar>span{font-weight:600;color:#334155}.sales-sort-buttons{display:flex;flex-wrap:wrap;gap:6px}
.sales-sort-buttons button{border:1px solid #dce1ef;background:#fff;color:#465570;border-radius:7px;padding:7px 11px;font:inherit;cursor:pointer}
.sales-sort-buttons button:hover{background:#f1f3fc}.sales-sort-buttons button.selected{background:#eef0ff;border-color:#777bea;color:#4549c9;font-weight:600}
.sales-sort-buttons button:focus-visible{outline:2px solid #6366f1;outline-offset:2px}
#sales-sort-note{flex-basis:100%;margin:0;font-size:11px;line-height:1.5}
@media(max-width:600px){.sales-sort-bar{padding:0 16px 14px}.sales-sort-buttons{width:100%}}
/* Product workspace: compact controls, readable rows, progressive details. */
.products .products-heading{padding:12px 16px 8px;align-items:center}.products-heading h2{font-size:14px}.products-heading #product-period-title{margin:3px 0 0;font-size:11px;color:#4b5872}
.products .table-controls{padding:0 16px 8px;gap:8px}.products .table-controls input,.products .table-controls select{padding-top:8px;padding-bottom:8px}
.product-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;padding:0 16px 10px}
.product-toolbar .sales-sort-bar,.product-toolbar .table-view-bar{padding:0;margin:0;gap:8px;flex-direction:row;align-items:center}
.product-toolbar .sales-sort-bar>span{display:none}.product-toolbar .sales-sort-buttons{width:auto;gap:4px}
.product-toolbar .sales-sort-buttons button{font-size:11px;padding:7px 9px;min-height:34px}
.product-toolbar .segments{width:auto;flex-wrap:nowrap;padding:3px}.product-toolbar .segments button{font-size:11px;padding:7px 10px;min-height:32px}
.table-actions{display:flex;gap:6px;margin-left:auto;align-items:center}.table-popover{position:relative;font-size:12px}
.table-popover summary{display:flex;align-items:center;justify-content:center;cursor:pointer;list-style:none;min-height:36px;padding:7px 10px;border:1px solid #cdd5e5;border-radius:6px;color:#394765;background:white}
.table-popover summary::-webkit-details-marker{display:none}.table-popover summary:hover{background:#f2f4fb}.table-popover summary:focus-visible{outline:2px solid #565cda;outline-offset:2px}
.table-popover[open] summary{background:#eef0ff;border-color:#777bea}.popover-body{position:absolute;right:0;top:calc(100% + 5px);z-index:20;width:260px;max-width:calc(100vw - 48px);max-height:65vh;overflow:auto;padding:12px;background:#fff;border:1px solid #cdd5e5;border-radius:8px;color:#394765;line-height:1.6}
.popover-body p{margin:0 0 10px}.popover-body p:last-child{margin:0}#column-options label{display:flex;align-items:center;gap:9px;min-height:34px;cursor:pointer}#column-options input{width:16px;height:16px;accent-color:#565cda}#reset-columns{margin-top:8px;padding:6px 10px;background:#eef0ff;color:#4549c9;border-radius:5px}
.products #meta-legend{padding:0 16px 8px;gap:6px}.products .pagination{padding:8px 16px}
#product-scroll{max-height:76vh}#product-table [hidden]{display:none!important}
#product-table tbody tr:not(.daily-totals):not(.meta-totals)>td{height:62px;padding-top:6px;padding-bottom:6px}
#product-table .product-button{min-width:0;max-width:180px;gap:8px;text-align:left}#product-table .product-button b{font-size:11px;line-height:1.4;white-space:normal}#product-table .product-button small{font-size:9px;line-height:1.4;color:#52617b}
#product-table .product-button img,#product-table .image-placeholder{display:block;width:30px;height:40px;flex-shrink:0;object-fit:cover}
.product-category{display:block}#product-table.daily-table .day-groups th{height:32px;font-size:12px}#product-table.daily-table .day-labels th{top:32px;height:44px;padding-top:5px;padding-bottom:5px;font-size:10px;color:#465570}
#product-table.daily-table .daily-totals th,#product-table.daily-table .daily-totals td{top:76px;height:42px;padding-top:6px;padding-bottom:6px}
#product-table.meta-table thead th{height:40px}#product-table.meta-table .meta-totals th,#product-table.meta-table .meta-totals td{top:40px;height:42px;padding-top:6px;padding-bottom:6px}
.detail-trend{margin-bottom:18px}.detail-trend p{font-size:12px;color:#52617b}.detail-trend svg{width:100%;height:auto;max-height:230px}.detail-trend .sales-line{stroke:#15803d}.detail-trend .spend-line{stroke:#dc2626}
@media(max-width:760px){.products .products-heading{padding:10px 12px 6px}.products .table-controls{padding:0 12px 8px;gap:6px}.product-toolbar{padding:0 12px 8px;gap:6px}.product-toolbar .sales-sort-bar{width:100%}.product-toolbar .sales-sort-buttons button{min-height:40px;padding:8px;font-size:10px}.product-toolbar .segments button{padding:7px;font-size:10px;min-height:36px}.table-actions{margin-left:0}.table-popover summary{min-height:40px;padding:7px 9px}.table-help .popover-body{position:fixed;top:auto;bottom:16px;right:16px;width:310px}.table-popover:not(.table-help) .popover-body{position:fixed;top:auto;bottom:16px;right:16px;width:270px}#product-table.daily-table td:first-child,#product-table.daily-table .product-heading,#product-table.daily-table .daily-totals th{width:160px;min-width:160px;max-width:160px}#product-table .product-button{max-width:144px}#product-table.meta-table th:first-child,#product-table.meta-table td:first-child{width:160px;min-width:160px;max-width:160px}.products #meta-legend{padding:0 12px 8px}}

#product-table.daily-table .day-groups th{padding-top:4px;padding-bottom:4px}
#product-table.daily-table .daily-totals th,#product-table.daily-table .daily-totals td,#product-table.meta-table .meta-totals th,#product-table.meta-table .meta-totals td{top:var(--table-header-height,76px)}

#product-table.crm-sales-table .orders-heading,#product-table.crm-sales-table .orders-cell{min-width:52px;width:52px;padding-left:10px;padding-right:10px}#product-table.crm-sales-table .meta-totals .orders-cell{background:#e9edf8}

.revenue-sort-heading{font:inherit;color:inherit;text-align:inherit;line-height:inherit;padding:0;cursor:pointer}.revenue-sort-heading:hover{color:var(--blue)}.revenue-sort-heading:focus-visible{outline:2px solid var(--blue);outline-offset:4px;border-radius:2px}

#product-table.crm-sales-table .ads-trial-heading,#product-table.crm-sales-table .ads-trial-cell{min-width:108px;padding-left:10px;padding-right:10px}#product-table.crm-sales-table .ads-trial-yes{background:#dcfce7;color:#166534;font-weight:600}#product-table.crm-sales-table .meta-totals .ads-trial-cell{background:#e9edf8}

.customer-phone,.customer-code{display:block;color:var(--muted);font-size:11px;margin-top:3px}.customer-phone{color:#405064}

.customer-purchase-dates{display:block;max-width:170px;line-height:1.65;font-size:11px}.customer-purchase-dates>span{display:block}.customer-purchase-dates>.latest{font-weight:700}

.customer-page-size{display:inline-flex;align-items:center;gap:7px;color:var(--muted);font-size:11px}.customer-page-size select{border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:#fff;color:var(--ink)}

.customer-pagination-tools{display:inline-flex;align-items:center;gap:8px}.pagination .customer-pagination-tools{margin-left:auto}.customer-pagination-tools .customer-page-size{white-space:nowrap}

.customer-group-definition{margin:0;padding:0 20px 14px;color:var(--muted);font-size:11px;line-height:1.5}

.product-report-actions{display:flex;gap:8px;align-items:center}#product-report-table{width:100%;border-collapse:collapse;min-width:780px}#product-report-table th,#product-report-table td{padding:12px 14px;border-bottom:1px solid #e8ebf2;text-align:left;vertical-align:middle}#product-report-table th{position:sticky;top:0;background:#f7f8fb;color:#687186;font-size:12px;white-space:nowrap}#product-report-table td strong{display:block;color:#222a3a}#product-report-table td small{display:block;color:#758096;margin-top:4px;font-size:11px}#product-report-table .product-report-number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}@media(max-width:760px){.product-report-actions{gap:5px}.product-report-actions button{padding:8px}}

.product-report-identity{display:flex;align-items:center;gap:12px;min-width:220px}.product-report-identity>img,.product-report-identity>.image-placeholder{display:block;width:44px;height:58px;flex:0 0 44px;object-fit:cover;border-radius:6px;background:#edf0f6}.product-report-identity>span:last-child{display:flex;flex-direction:column;gap:4px;min-width:0}.product-report-identity strong{font-weight:600}.product-report-identity small{color:var(--muted);font-size:12px}
.product-group-rules{padding:0 22px 16px;color:var(--muted);font-size:11px;line-height:1.6}.product-group-rules strong{color:#36436a}@media(max-width:760px){.product-group-rules{padding:0 15px 14px}}
#product-report-table{width:100%;max-width:1040px;min-width:780px;table-layout:fixed}#product-report-table th,#product-report-table td{padding:8px 10px;font-size:11px}#product-report-table th:nth-child(1){width:48px}#product-report-table th:nth-child(2){width:280px}#product-report-table th:nth-child(3){width:100px}#product-report-table th:nth-child(4){width:150px}#product-report-table th:nth-child(5){width:82px}#product-report-table th:nth-child(6){width:82px}#product-report-table th:nth-child(7){width:125px}.product-report-identity{gap:8px;min-width:0}.product-report-identity>img,.product-report-identity>.image-placeholder{width:32px;height:42px;flex-basis:32px;border-radius:4px}.product-report-identity strong{font-size:11px;line-height:1.35}.product-report-identity small{font-size:9px!important;margin-top:2px!important;line-height:1.3}#product-report-table tbody tr{height:52px}@media(max-width:760px){#product-report-table{max-width:none;min-width:760px}#product-report-table th,#product-report-table td{padding:7px 8px}#product-report-table th:nth-child(2){width:230px}}
.product-forecast-method{display:block;margin-top:5px;color:var(--muted);font-size:10px;line-height:1.45;max-width:760px}#product-report-table{max-width:1160px;min-width:1140px}#product-report-table th:nth-child(1){width:42px}#product-report-table th:nth-child(2){width:245px}#product-report-table th:nth-child(3){width:82px}#product-report-table th:nth-child(4){width:130px}#product-report-table th:nth-child(5){width:68px}#product-report-table th:nth-child(6){width:68px}#product-report-table th:nth-child(7){width:105px}#product-report-table th:nth-child(8){width:95px}#product-report-table th:nth-child(9){width:110px}#product-report-table th:nth-child(10){width:105px}#product-report-table th:nth-child(11){width:90px}@media(max-width:760px){#product-report-table{min-width:1140px}}
#product-report-table{width:1400px!important;min-width:1400px!important;max-width:none!important;table-layout:fixed!important}#product-report-table th:nth-child(1){width:48px!important}#product-report-table th:nth-child(2){width:300px!important}#product-report-table th:nth-child(3){width:100px!important}#product-report-table th:nth-child(4){width:150px!important}#product-report-table th:nth-child(5){width:80px!important}#product-report-table th:nth-child(6){width:80px!important}#product-report-table th:nth-child(7){width:130px!important}#product-report-table th:nth-child(8){width:120px!important}#product-report-table th:nth-child(9){width:140px!important}#product-report-table th:nth-child(10){width:150px!important}#product-report-table th:nth-child(11){width:102px!important}#product-report-table th,#product-report-table td{box-sizing:border-box;white-space:nowrap}@media(max-width:760px){#product-report-table{width:1400px!important;min-width:1400px!important}}
@media(min-width:761px){#product-report-table{width:100%!important;min-width:0!important;max-width:none!important;table-layout:fixed!important}#product-report-table th:nth-child(1){width:3%!important}#product-report-table th:nth-child(2){width:22%!important}#product-report-table th:nth-child(3){width:8%!important}#product-report-table th:nth-child(4){width:12%!important}#product-report-table th:nth-child(5){width:6%!important}#product-report-table th:nth-child(6){width:6%!important}#product-report-table th:nth-child(7){width:10%!important}#product-report-table th:nth-child(8){width:8%!important}#product-report-table th:nth-child(9){width:8%!important}#product-report-table th:nth-child(10){width:8%!important}#product-report-table th:nth-child(11){width:9%!important}#product-report-table th,#product-report-table td{padding:7px 6px;white-space:normal!important;overflow-wrap:anywhere;font-size:10px}#product-report-table th{text-align:center;line-height:1.35}#product-report-table td:first-child{text-align:center}.product-report-identity{min-width:0;gap:6px}.product-report-identity>img,.product-report-identity>.image-placeholder{width:28px;height:36px;flex-basis:28px}.product-report-identity>span:last-child{min-width:0}.product-report-identity strong{font-size:10px;overflow-wrap:anywhere}.product-report-identity small{font-size:8px!important;overflow-wrap:anywhere}.product-report-number{font-size:10px!important}}

.product-groups-panel .customer-groups{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));overflow:visible}.product-groups-panel .customer-group-card{min-width:0;width:100%}

@media(min-width:761px){#product-report-table th:nth-child(1){width:3%!important}#product-report-table th:nth-child(2){width:20%!important}#product-report-table th:nth-child(3){width:7%!important}#product-report-table th:nth-child(4){width:11%!important}#product-report-table th:nth-child(5){width:5%!important}#product-report-table th:nth-child(6){width:8%!important}#product-report-table th:nth-child(7){width:5%!important}#product-report-table th:nth-child(8){width:9%!important}#product-report-table th:nth-child(9){width:7%!important}#product-report-table th:nth-child(10){width:8%!important}#product-report-table th:nth-child(11){width:8%!important}#product-report-table th:nth-child(12){width:9%!important}}

@media(min-width:761px){#product-report-table th:nth-child(3){width:5%!important}#product-report-table th:nth-child(4){width:7%!important}#product-report-table th:nth-child(5){width:11%!important}#product-report-table th:nth-child(6){width:5%!important}#product-report-table th:nth-child(7){width:8%!important}#product-report-table th:nth-child(8){width:9%!important}#product-report-table th:nth-child(9){width:7%!important}}

#product-report-table .product-sort-button{display:inline-flex;align-items:center;justify-content:center;gap:4px;width:100%;padding:0;border:0;background:transparent;color:inherit;font:inherit;line-height:1.35;white-space:normal;cursor:pointer}#product-report-table .product-sort-button span{flex:none;color:#5666c7;font-size:12px;font-weight:700}#product-report-table .product-sort-button:hover{color:#4353b3}#product-report-table .product-sort-button:focus-visible{outline:2px solid #7786df;outline-offset:2px;border-radius:3px}

#product-table .message-cost-cell,#product-table .message-cost-heading{min-width:92px;width:92px}

.ads-warning{display:inline-flex;align-items:center;padding:3px 7px;border-radius:99px;font-size:11px;font-weight:700;white-space:nowrap}.ads-warning.ok{color:#267052;background:#e5f5ed}.ads-warning.watch{color:#8a5a00;background:#fff2cf}.ads-warning.high{color:#a33b32;background:#fde8e6}.ads-warning.unknown{color:#667085;background:#edf0f4}.ads-warning-cell,.ads-days-cell{text-align:center;white-space:nowrap}#product-table .ads-warning-heading,#product-table .ads-days-heading,#product-table .ads-warning-cell,#product-table .ads-days-cell{min-width:112px;width:112px}

/* Product report column preferences */
.product-column-controls{display:flex;flex-wrap:wrap;align-items:start;gap:12px}
.product-column-controls>.search{flex:1;min-width:220px}
#product-report-column-picker{margin-left:auto;max-width:100%}
.product-column-panel{overflow:visible}
#product-report-column-picker summary{width:max-content;max-width:100%}
#product-report-column-options{z-index:30}
#product-report-column-options label{display:flex;align-items:center;gap:9px;min-height:36px;font-weight:400;cursor:pointer}
#product-report-column-options input{width:16px;height:16px;min-height:16px;margin:0;padding:0;flex:none;accent-color:var(--blue)}
#product-report-column-options button{justify-self:start;align-self:center}
/* Reserve identity and stock widths; share remaining space among visible metrics. */
#product-report-table.product-columns-reduced{width:100%!important;min-width:0!important;table-layout:fixed!important}
#product-report-table.product-columns-reduced th:nth-child(n+4){width:auto!important}
#product-report-table.product-columns-reduced th:nth-child(1){width:3%!important}
#product-report-table.product-columns-reduced th:nth-child(2){width:20%!important}
#product-report-table.product-columns-reduced th:nth-child(3){width:5%!important}
@media(max-width:760px){
#product-report-table.product-columns-reduced{min-width:760px!important}
#product-report-table.product-columns-reduced th:nth-child(1){width:40px!important}
#product-report-table.product-columns-reduced th:nth-child(2){width:230px!important}
#product-report-table.product-columns-reduced th:nth-child(3){width:70px!important}
#product-report-table.product-columns-reduced .product-report-identity{max-width:230px}
}

/* Ads table column picker */
#column-options input{min-height:16px;padding:0;flex:none;accent-color:var(--blue)}
.column-picker-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
#column-options .column-picker-actions button{margin:0;padding:7px 10px;background:#eef0ff;color:#4549c9;border-radius:5px}

#product-report-column-options .column-picker-actions button{margin:0;padding:7px 10px;background:#eef0ff;color:#4549c9;border-radius:5px}

#product-report .customer-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:1000px){#product-report .customer-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){#product-report .customer-metrics{grid-template-columns:1fr}}

/* Product Ads VAT column: widths for the 13-column product report. */
@media(min-width:761px){#product-report-table th:nth-child(1){width:3%!important}#product-report-table th:nth-child(2){width:20%!important}#product-report-table th:nth-child(3){width:5%!important}#product-report-table th:nth-child(4){width:7%!important}#product-report-table th:nth-child(5){width:10%!important}#product-report-table th:nth-child(6){width:10%!important}#product-report-table th:nth-child(7){width:4%!important}#product-report-table th:nth-child(8){width:7%!important}#product-report-table th:nth-child(9){width:8%!important}#product-report-table th:nth-child(10){width:6%!important}#product-report-table th:nth-child(11){width:7%!important}#product-report-table th:nth-child(12){width:7%!important}#product-report-table th:nth-child(13){width:6%!important}}

/* Product report Ads ratios: preserve identity widths and share metric space. */
@media(min-width:761px){#product-report-table th:nth-child(1){width:3%!important}#product-report-table th:nth-child(2){width:20%!important}#product-report-table th:nth-child(3){width:5%!important}#product-report-table th:nth-child(4){width:5%!important}#product-report-table th:nth-child(5){width:8%!important}#product-report-table th:nth-child(6){width:8%!important}#product-report-table th:nth-child(7){width:6%!important}#product-report-table th:nth-child(8){width:6%!important}#product-report-table th:nth-child(9){width:4%!important}#product-report-table th:nth-child(10){width:6%!important}#product-report-table th:nth-child(11){width:7%!important}#product-report-table th:nth-child(12){width:5%!important}#product-report-table th:nth-child(13){width:6%!important}#product-report-table th:nth-child(14){width:6%!important}#product-report-table th:nth-child(15){width:5%!important}}

/* Product thumbnail preview, outside the scrolling table. */
#product-report-table .product-image-preview-trigger{cursor:zoom-in}
#product-report-table .product-image-preview-trigger:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
#product-image-preview{position:fixed;z-index:1000;pointer-events:none;margin:0;padding:10px;width:min(340px,calc(100vw - 24px));background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 40px #202a3a33}
#product-image-preview img{display:block;width:100%;height:min(420px,calc(100dvh - 110px));object-fit:contain;border-radius:6px;background:var(--paper)}
#product-image-preview figcaption{margin-top:8px;font-size:12px;line-height:1.5;color:var(--ink);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

/* Ads campaign budget editing */
#ads-budget-dialog{width:min(860px,94vw);max-width:860px;max-height:92vh;overflow:auto}
#ads-budget-dialog form{display:block;margin-top:18px}
#ads-budget-dialog label{display:flex;flex-direction:column;gap:7px;margin:12px 0;font-size:13px}
#ads-budget-dialog input,#ads-budget-dialog select{width:100%;min-width:0;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);color:inherit;font:inherit}
#ads-budget-dialog .budget-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
#ads-budget-dialog .budget-checkbox{flex-direction:row;align-items:center}
#ads-budget-dialog .budget-checkbox input{width:18px;height:18px}
#ads-budget-dialog [data-budget-confirm]{padding:16px;background:var(--soft,#f4f6ff);border:1px solid var(--line);border-radius:10px;margin-top:16px}
#ads-budget-dialog .budget-change{font-size:20px}
#ads-budget-dialog [data-budget-message]{white-space:pre-wrap;line-height:1.6}
#ads-budget-dialog .budget-history{border-top:1px solid var(--line);margin-top:24px;padding-top:12px}
#ads-budget-dialog .budget-job{padding:12px 0;border-bottom:1px solid var(--line)}
#ads-budget-dialog .budget-job p{margin:7px 0;font-size:13px;line-height:1.6}
#ads-budget-dialog [hidden]{display:none!important}
#ads-view .campaign-table [data-budget-campaign],.campaign-table [data-budget-campaign]{white-space:normal;min-width:140px}
@media(max-width:600px){#ads-budget-dialog{padding:16px}#ads-budget-dialog h2{font-size:18px}#ads-budget-dialog .budget-grid{grid-template-columns:1fr}}

/* Inline campaign disclosure in the Ads audience table. */
#audience-table > tbody > .audience-campaigns-row[hidden]{display:none}
#audience-table > tbody > .audience-campaigns-row > td{padding:0;text-align:left;white-space:normal;background:#f7f8fc}
.audience-campaigns{padding:4px 20px 20px;max-width:100%;min-width:0}
.audience-campaigns .table-scroll{border:1px solid var(--line);border-radius:8px;background:#fff}
#audience-table .audience-campaigns .campaign-table{width:100%;min-width:780px}
#audience-table .audience-campaigns .campaign-table th,#audience-table .audience-campaigns .campaign-table td{text-align:left;padding:12px;position:static;box-shadow:none}
#audience-table .audience-campaigns .campaign-table th{background:#eef0f8;font-weight:600}
#audience-table .audience-campaigns .campaign-table td:first-child{min-width:240px;max-width:390px;white-space:normal}
#audience-table .audience-link[aria-expanded="true"]{text-decoration:none}
@media(max-width:760px){.audience-campaigns{padding:4px 12px 12px}#audience-table .audience-campaigns .campaign-table th,#audience-table .audience-campaigns .campaign-table td{padding:10px;font-size:11px}}
.meta-token-panel{margin:12px 40px 18px;padding:12px 16px;background:white;border:1px solid var(--line);border-radius:10px}.meta-token-panel summary{cursor:pointer;color:var(--blue);font-weight:600;font-size:12px}.meta-token-panel form{max-width:720px;padding:14px 0 2px}.meta-token-panel label{display:block;margin-bottom:6px;font-size:11px;color:var(--muted)}.meta-token-entry{display:flex;gap:8px}.meta-token-entry input{flex:1;min-width:0;font-family:monospace}.meta-token-entry .primary{padding:9px 14px;white-space:nowrap}.meta-token-panel form p{margin-top:8px;color:var(--muted);font-size:10px}.meta-token-panel form p[data-error=true]{color:#a23b36}@media(max-width:760px){.meta-token-panel{margin:8px 16px 14px;padding:11px 13px}.meta-token-entry{align-items:stretch;flex-direction:column}.meta-token-entry .primary{align-self:flex-start}}
