:root{--bg:#f4f5f7;--ink:#202d36;--muted:#79858d;--green:#1b6554;--line:#e4e8e8}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font:14px -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft Yahei",sans-serif}aside{position:fixed;inset:0 auto 0 0;width:224px;background:#fff;border-right:1px solid var(--line);padding:40px 24px}.brand{text-decoration:none;color:var(--green);font-size:42px;font-weight:850;letter-spacing:-3px}.brand span{display:block;font-size:9px;letter-spacing:2px;color:var(--muted);margin-top:8px}.nav-label{font-size:11px;color:#9aa2a8;letter-spacing:2px;margin:60px 12px 18px}.nav{display:block;padding:16px 14px;margin:5px 0;border-radius:10px;text-decoration:none;color:#66737b}.nav.active{background:#edf4f0;color:var(--green);font-weight:650}.aside-foot{position:absolute;bottom:36px;font-size:12px;line-height:2;color:#596c64}.aside-foot small{color:#9aa49f;margin-left:14px}.dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#4d9b79;margin-right:6px}main{margin-left:224px;padding:42px 38px 22px;max-width:2000px}header{display:flex;justify-content:space-between;align-items:center;gap:20px}.eyebrow{font-size:10px;color:var(--green);letter-spacing:2px;font-weight:700}h1{font-size:29px;letter-spacing:-1px;font-weight:650;margin:14px 0 10px}p{color:var(--muted);line-height:1.7;font-size:12px;margin:6px 0}h2{font-size:17px;margin:0;font-weight:650}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-decoration:none;border:1px solid #dce3df;color:#34584b;background:white;padding:10px 16px;border-radius:7px;font:inherit;font-size:12px;white-space:nowrap}.button:hover{background:#edf4f0}.button:disabled{opacity:.5;cursor:wait}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover{background:#124a3e}.status-strip{display:flex;gap:12px;align-items:center;margin:28px 0 20px;font-size:11px;flex-wrap:wrap}.pill{border-radius:5px;padding:5px 8px;background:#fff0d8;color:#9b6c19;font-size:10px;white-space:nowrap}.pill.ok{background:#e5f2e9;color:var(--green)}.pill.error{background:#fdebe8;color:#a34636}.pill.light{background:#f1f4f2;color:#718077}.muted{color:var(--muted)}#lastSync{margin-left:auto}.filters{display:flex;align-items:center;gap:22px;flex-wrap:wrap;background:#fff;padding:16px 20px;border:1px solid var(--line);border-radius:10px}.filters>div{display:flex;gap:10px;align-items:center}.filters label{color:#8b9498;font-size:11px}select{border:1px solid #e1e6e4;background:#fdfefe;color:#34483e;padding:7px 25px 7px 10px;border-radius:5px;font:inherit;font-size:12px}.filter-note{margin-left:auto;color:var(--muted);font-size:11px}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.kpi{background:#fff;border:1px solid var(--line);padding:24px;border-radius:10px}.kpi:first-child{background:var(--green);border-color:var(--green);color:#fff}.kpi label{font-size:12px;opacity:.72}.kpi strong{font-size:31px;display:block;margin:18px 0 12px;letter-spacing:-1px;font-weight:600;font-variant-numeric:tabular-nums}.kpi small{font-size:10px;opacity:.6}.card{background:white;border:1px solid var(--line);border-radius:10px;overflow:hidden}.charts{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr);gap:20px}.card-head{padding:23px 24px 16px;display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.trend{height:240px;padding:5px 22px 20px}.trend svg{width:100%;height:100%;overflow:visible}.account-bars{padding:5px 24px 10px}.account-row{margin:14px 0 25px}.account-label{display:flex;justify-content:space-between;font-size:12px;margin-bottom:9px}.account-label small{color:var(--muted);font-size:10px}.bar-track{height:7px;background:#f0f3f1;border-radius:4px;overflow:hidden}.bar-fill{height:100%;background:var(--green);border-radius:4px}.insight{margin:0 24px 22px;padding:12px;background:#f7f8f4;border-radius:7px;font-size:11px;line-height:1.8;color:#748074}.details{margin-top:24px}.table-wrap{overflow:auto;max-height:620px}table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;font-size:12px;font-variant-numeric:tabular-nums}th,td{padding:16px 18px;border-bottom:1px solid #eff1ef;text-align:right;white-space:nowrap}th{background:#f8faf8;color:#7a887e;font-weight:500;font-size:11px;position:sticky;top:0;z-index:2}td:first-child,th:first-child{position:sticky;left:0;background:#fff;text-align:left;z-index:1;min-width:145px;border-right:1px solid #edf1ec}th:first-child{z-index:3;background:#f8faf8}tbody tr:hover td{background:#f9fcf8}td small{display:block;font-size:10px;color:#9aa39d;margin-top:5px}.money{font-weight:650;color:var(--green)}.badge{background:#edf4ed;color:#51765a;font-size:10px;border-radius:4px;padding:5px 7px}.table-note{padding:15px 24px;margin:0;font-size:10px;background:#fdfefd}.sync{margin-top:24px}.sync-actions{padding:0 24px 12px;display:flex;gap:10px;flex-wrap:wrap}.login-guide{padding:0 24px 15px;font-size:11px}.run{margin:0 24px;padding:12px 0;border-top:1px solid var(--line);font-size:11px;display:flex;gap:18px;color:#7a867e}.run:last-child{margin-bottom:15px}.run span:last-child{color:#455b4d}footer{display:flex;justify-content:space-between;margin-top:25px;color:#9aa49d;font-size:10px;line-height:2}dialog{border:1px solid var(--line);border-radius:14px;max-width:440px;width:90%;padding:28px}dialog::backdrop{background:#102d254f}dialog label{display:block;margin-top:18px;font-size:12px}dialog input,dialog select{display:block;width:100%;padding:10px;margin-top:7px;border:1px solid var(--line);border-radius:5px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);padding:14px 22px;background:#193f32;color:#fff;border-radius:8px;box-shadow:0 8px 30px #0002;display:none;z-index:10;max-width:90%;font-size:13px}.empty{padding:60px;text-align:center;color:var(--muted)}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #86bc9c;outline-offset:3px}@media(min-width:1700px){main{padding-left:55px;padding-right:55px}.kpi strong{font-size:38px}.trend{height:280px}}@media(max-width:1100px){aside{width:174px;padding:32px 18px}main{margin-left:174px;padding:30px 22px}h1{font-size:23px}.kpi{padding:20px 16px}.kpi strong{font-size:26px}.charts{grid-template-columns:1fr 1fr}.filters{gap:12px}}@media(max-width:760px){aside{position:static;width:100%;padding:15px 20px;display:flex;align-items:center;gap:18px;border-right:0}.brand{font-size:27px}.brand span,.nav-label,.aside-foot{display:none}.nav{font-size:11px;padding:8px;margin:0}.nav.active{margin-left:auto}main{margin:0;padding:24px 14px}h1{font-size:21px;line-height:1.5}.eyebrow{font-size:8px}header{align-items:flex-start}header .button{font-size:10px;padding:8px}header p{font-size:11px}.kpis{grid-template-columns:1fr 1fr;gap:10px}.kpi strong{font-size:28px}.charts{grid-template-columns:1fr}.filters{padding:12px;gap:12px}.filters label{display:none}.filter-note{width:100%}.card-head{padding:20px}.trend{height:220px}.sync-actions{padding:0 20px 12px}.sync-actions .button{font-size:11px}.run{display:block;line-height:1.8}.run span{display:block}footer{display:block}footer span{display:block}#lastSync{margin-left:0}.table-note{padding:15px}}

[hidden]{display:none!important}

.details-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0}
.details-toolbar h1{margin:6px 0 0}
body.details-page{overflow:hidden}
.details-page aside,.details-page #overview,.details-page .kpis,.details-page .charts,.details-page footer{display:none}
.details-page main{margin:0;padding:22px 26px;max-width:none;width:100%;height:100vh;height:100dvh;display:flex;flex-direction:column;gap:16px;overflow:hidden}
.details-page .filters{flex-shrink:0}
.details-page .details{margin:0;flex:1;min-height:0;display:flex;flex-direction:column}
.details-page .details .card-head{flex-shrink:0;padding:16px 22px}
.details-page .table-wrap{flex:1;min-height:0;max-height:none;overscroll-behavior:contain}
.details-page .table-note{flex-shrink:0;max-height:80px;overflow:auto;padding:10px 22px}
@media(max-width:760px){.details-page main{padding:14px 10px;gap:10px}.details-toolbar{gap:10px}.details-toolbar h1{font-size:22px}.details-toolbar .button{padding:9px;font-size:11px}.details-page .details .card-head{padding:12px}.details-page .table-note{max-height:60px;padding:8px 12px}}

/* Full-width details: one page, all columns, no nested scroll pane. */
body.details-page{overflow:auto}
.details-page main{height:auto;min-height:100dvh;overflow:visible;padding:18px 16px;gap:12px}
.details-page .details{display:block;overflow:visible}
.details-page .table-wrap{overflow:visible;max-height:none}
.details-page table{width:100%;min-width:0;table-layout:fixed;font-size:12px}
.details-page th,.details-page td{padding:12px 4px;text-align:center;white-space:normal;overflow-wrap:anywhere}
.details-page th{font-size:14px;font-weight:700;line-height:1.55;color:#344b44;vertical-align:middle;border-bottom:2px solid #d5e4dd}
.details-page th:first-child,.details-page td:first-child{width:8%;min-width:0;left:auto;text-align:center}
.details-page td:first-child{position:static}
.details-page td{line-height:1.55}
.details-page td small{font-size:10px;line-height:1.5;color:#73817c}
.details-page .badge{display:inline-block;padding:4px;white-space:normal}
.details-page th:nth-child(6),.details-page td:nth-child(6){background:#fff3e3;color:#a95008;font-weight:750;width:6%}
.details-page th:nth-child(7),.details-page td:nth-child(7){background:#edf5ff;color:#2359a1;font-weight:700}
.details-page th:nth-child(8),.details-page td:nth-child(8){background:#eaf7f3;color:#126c57;font-weight:700}
.details-page th:nth-child(11),.details-page td:nth-child(11),.details-page th:nth-child(20),.details-page td:nth-child(20),.details-page th:nth-child(21),.details-page td:nth-child(21){background:#f3efff;color:#6743a3;font-weight:700}
@media(min-width:1700px){.details-page table{font-size:14px}.details-page th{font-size:16px}.details-page td small{font-size:11px}.details-page th,.details-page td{padding:14px 6px}}
@media(max-width:1050px){
 .details-page table,.details-page tbody{display:block;width:100%}
 .details-page thead{display:none}
 .details-page tbody tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:2px solid #d5e4dd;padding:10px;gap:6px}
 .details-page tbody td,.details-page tbody td:first-child,.details-page tbody td:nth-child(6){display:block;width:auto;min-width:0;border:0;border-radius:5px;padding:10px 6px;text-align:left;font-size:14px}
 .details-page tbody td:first-child{grid-column:1/-1;background:#f3f6f4}
 .details-page td::before{content:attr(data-label);display:block;font-size:13px;font-weight:700;color:#52665d;margin-bottom:6px}
 .details-page .empty{grid-column:1/-1}.details-page .empty::before{content:none}
}

/* Keep viewer and purchaser counts neutral; emphasize only the funnel conversion. */
.details-page th:nth-child(8),.details-page td:nth-child(8),.details-page th:nth-child(11),.details-page td:nth-child(11){background:#fff;color:var(--ink);font-weight:400}
.details-page th:nth-child(8),.details-page th:nth-child(11){background:#f8faf8;color:#344b44;font-weight:700}
.details-page th:nth-child(18),.details-page td:nth-child(18){background:#f3efff;color:#6743a3;font-weight:700}

/* Separate exposure totals from the conversion funnel across the entire table. */
#details th:nth-child(11),#details td:nth-child(11){border-left:1px solid #b8bfbb}

.details-page table{font-size:14px}
.details-page th{font-size:16px;line-height:1.5}
.details-page td{padding:17px 4px;line-height:1.65}
.details-page td small{font-size:12px;line-height:1.5}
.details-page .badge{font-size:12px}
@media(min-width:1700px){.details-page table{font-size:16px}.details-page th{font-size:18px}.details-page td{padding:18px 6px}.details-page td small{font-size:13px}.details-page .badge{font-size:13px}}
@media(max-width:760px){.details-page tbody td,.details-page tbody td:first-child,.details-page tbody td:nth-child(6){font-size:16px}}

@media(min-width:1051px){.details-page tbody tr{height:max(86px,calc((100dvh - 300px) / 8))}}

body:not(.details-page) #details{display:none}
.charts{grid-template-columns:1fr}
.trend{height:auto!important;padding:0 20px 20px;min-width:0}
.trend-summary{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:0 5px 16px;color:#799084;font-size:12px}
.trend-summary b{color:#315e4b;margin-left:6px}
.trend-scroll{overflow-x:auto;overflow-y:hidden;max-width:100%;scrollbar-width:thin;scrollbar-color:#bacfc2 transparent}
.trend-scroll svg{height:330px;max-width:none;display:block;overflow:visible}
.trend-line{stroke-dasharray:1;stroke-dashoffset:0;animation:draw-trend 1.1s ease-out}
@keyframes draw-trend{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.trend-point{cursor:pointer;outline:none}.trend-guide{opacity:0;transition:opacity .2s}.point-halo{transition:opacity .2s,r .2s}
.trend-point.selected .trend-guide,.trend-point:hover .trend-guide,.trend-point:focus .trend-guide{opacity:1}
.trend-point.selected .point-halo,.trend-point:hover .point-halo,.trend-point:focus .point-halo{opacity:.3;r:15}
.trend-point:focus .point-amount{text-decoration:underline}
.trend-detail{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:20px;padding:18px 22px;background:#f3f8f5;border:1px solid #e1eee6;border-radius:10px;min-height:84px}
.trend-detail small{display:block;color:#7a9284;font-size:11px;margin:3px 0 7px}.trend-detail strong{font-size:17px;color:#345b48;font-variant-numeric:tabular-nums}.trend-detail .highlight-gmv{color:#b0701d}
.account-bars{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:28px}.account-row{margin:8px 0 22px}
@media(max-width:760px){.trend{padding:0 12px 14px}.trend-detail{grid-template-columns:1fr 1fr;padding:14px;gap:12px}.trend-detail strong{font-size:15px}.trend-summary{gap:12px}.account-bars{grid-template-columns:1fr;gap:6px}}
@media(prefers-reduced-motion:reduce){.trend-line{animation:none}.point-halo,.trend-guide{transition:none}}
.charts{grid-template-columns:minmax(0,1fr)}.charts>.card{min-width:0}
