/* Analytics uses Tradalvo's shared light/dark identity tokens. */
.an-screen { display:grid; gap:24px; min-width:0; --an-radius:18px; }
.an-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; }
.an-heading h2 { font-size:clamp(24px,2.5vw,34px); margin:7px 0 8px; letter-spacing:-.035em; }
.an-heading p { margin:0; color:var(--muted); line-height:1.6; }
.an-heading .eyebrow { color:var(--brand); letter-spacing:.12em; font-size:10px; }
.an-controls { border:1px solid var(--line); background:var(--surface); border-radius:var(--an-radius); padding:18px 20px; }
.an-control-top { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.an-segments { display:inline-flex; align-items:center; gap:4px; flex-wrap:wrap; padding:4px; border-radius:11px; background:var(--surface-soft); }
.an-segments button { color:var(--muted); background:transparent; border:1px solid transparent; border-radius:8px; padding:8px 12px; font-size:12px; font-weight:600; cursor:pointer; }
.an-segments button.active { background:var(--brand); color:var(--brand-on,#fff); box-shadow:0 2px 5px #0000000c; }
.an-filters { display:flex; align-items:end; gap:14px; flex-wrap:wrap; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }
.an-filters label { display:grid; gap:6px; font-size:11px; font-weight:600; color:var(--muted); min-width:170px; }
.an-filters :is(input,select) { min-height:39px; color:var(--text,var(--foreground)); background:var(--surface); border:1px solid var(--line); padding:8px 10px; border-radius:9px; font:inherit; font-size:12px; }
.an-filter-note { margin-left:auto; font-size:11px; color:var(--muted); padding-bottom:10px; }
.an-data-note { display:flex; align-items:flex-start; gap:10px; color:var(--muted); font-size:12px; line-height:1.7; }
.an-data-note svg { width:18px; height:18px; flex:none; margin-top:2px; color:var(--brand); }
.an-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 14px; }
.an-section-title h3 { font-size:16px; margin:0; letter-spacing:-.02em; }
.an-section-title > span { color:var(--muted); font-size:11px; }
.an-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.an-metric { border:1px solid var(--line); border-radius:var(--an-radius); padding:19px 20px; background:var(--surface); min-width:0; display:flex; flex-direction:column; gap:12px; box-shadow:0 3px 12px #00000004; }
.an-metric > div { display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; font-weight:600; }
.an-metric svg { width:16px; height:16px; flex:none; color:var(--brand); }
.an-metric strong { font-size:clamp(22px,2vw,30px); font-variant-numeric:tabular-nums; letter-spacing:-.04em; line-height:1.2; overflow-wrap:anywhere; font-family:'Cascadia Code','SFMono-Regular',Consolas,monospace; }
.an-metric small { color:var(--muted); font-size:10px; line-height:1.5; margin-top:auto; }
.an-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; align-items:start; }
.an-screen .an-panel { margin:0; border-radius:var(--an-radius); padding:22px; min-width:0; border:1px solid var(--line); background:var(--surface); }
.an-panel.an-full { grid-column:1 / -1; }
.an-panel:is([data-an-section="hour"],[data-an-section="session"]) .an-panel-header { min-height:150px; }
.an-panel-header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:20px; flex-wrap:wrap; }
.an-panel-header h3 { font-size:15px; font-weight:650; margin:0; display:flex; align-items:center; gap:9px; letter-spacing:-.015em; }
.an-panel-header h3 svg { width:18px; height:18px; color:var(--brand); flex:none; }
.an-panel-header p { color:var(--muted); font-size:11px; margin:8px 0 0; line-height:1.6; max-width:650px; }
.an-panel-actions { display:grid; gap:8px; justify-items:end; margin-left:auto; }
.an-panel-actions .an-segments button { padding:6px 9px; font-size:10px; }
.an-split { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; }
.an-chart-scroll { width:100%; overflow-x:auto; padding:4px 0; }
.an-chart-scroll svg { min-width:100%; width:100%; display:block; height:250px; }
.an-chart-scroll svg.an-bars { min-width:0; }
.an-line svg { display:block; width:100%; height:250px; }
.an-screen svg text { font-family:'Segoe UI Variable','Segoe UI',system-ui,sans-serif; font-size:11px; fill:var(--muted); }
.an-screen .an-gridline { fill:none; stroke:var(--line); stroke-width:1; stroke-dasharray:3 4; }
.an-screen .an-zero { fill:none; stroke:var(--muted); stroke-width:1; opacity:.6; }
.an-bar { transition:opacity .15s; }
.an-bar:hover { opacity:.7; }
.an-distribution { display:grid; justify-items:center; padding:0 10px; min-height:258px; }
.an-distribution svg { width:220px; height:220px; }
.an-screen svg .an-donut-value { font-size:29px; font-weight:700; fill:var(--foreground); letter-spacing:-1px; }
.an-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:14px; font-size:11px; color:var(--muted); }
.an-legend > span { display:flex; gap:5px; align-items:center; }
.an-legend i { width:8px; height:8px; border-radius:2px; }
.an-legend b { color:var(--foreground); }
.an-table-wrap { overflow-x:auto; margin-top:18px; border-top:1px solid var(--line); }
.an-table-wrap table { width:100%; border-collapse:collapse; font-size:11px; }
.an-screen .an-table-wrap :is(th,td) { padding:12px 9px; border-bottom:1px solid var(--line); white-space:nowrap; text-align:right; font-variant-numeric:tabular-nums; }
.an-screen .an-table-wrap :is(th,td):first-child { text-align:left; }
.an-screen .an-table-wrap thead th { color:var(--muted); font-size:10px; background:transparent; font-weight:600; }
.an-screen .an-table-wrap tbody th { font-weight:500; background:transparent; }
.an-table-wrap tbody tr:last-child > * { border-bottom:0; }
.an-empty { min-height:240px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--muted); text-align:center; padding:25px; }
.an-empty svg { width:36px; height:36px; opacity:.35; }
.an-empty p { font-size:12px; max-width:270px; line-height:1.7; }
.an-screen .button svg { width:17px; height:17px; }
.an-screen .button { display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.an-footer { text-align:center; color:var(--muted); font-size:11px; padding:5px 15px 20px; line-height:1.7; }
.an-screen :is(button,select,input,[tabindex]):focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
@media(min-width:1700px) { .an-metrics { gap:18px; } .an-metric { padding:24px; } }
@media(max-width:1100px) { .an-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .an-grid { grid-template-columns:minmax(0,1fr); } .an-panel.an-full { grid-column:auto; } }
@media(max-width:650px) { .an-screen { gap:18px; } .an-heading { align-items:flex-start; flex-direction:column; } .an-heading .button { align-self:flex-end; } .an-controls { padding:14px; } .an-filters label { flex:1; min-width:135px; } .an-filter-note { margin-left:0; } .an-section-title > span { display:none; } .an-metrics { gap:9px; } .an-metric { padding:15px 12px; } .an-metric strong { font-size:22px; } .an-screen .an-panel { padding:17px 14px; } .an-segments button { padding:7px 9px; } .an-panel-actions { margin-left:0; justify-items:start; } }
@media(prefers-reduced-motion:reduce) { .an-screen * { transition:none!important; } }
@media(max-width:1100px) { .an-panel:is([data-an-section="hour"],[data-an-section="session"]) .an-panel-header { min-height:0; } }
