:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #e9ebf2;
  background: #1a1d26;
  --panel: #1e212c;
  --line: #2f3342;
  --muted: #8d93a3;
  --purple: #8069ff;
  --mint: #53d6bf;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 50% -20%, #292a4a 0, #1a1d26 34%); }
button, input, select { font: inherit; }
button { color: inherit; }
.topbar { height: 72px; padding: 0 4vw; border-bottom: 1px solid #2a2e3a; display: flex; align-items: center; justify-content: space-between; background: rgba(26,29,38,.88); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 11px; color: #f5f6fa; text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.brand-mark { width: 54px; height: 54px; object-fit: contain; border-radius: 11px; box-shadow: 0 8px 28px rgba(128,105,255,.3); }
.header-actions, .viewer, .live-pill { display: flex; align-items: center; }
.header-actions { gap: 18px; }
.live-pill { gap: 7px; color: #a9adba; font-size: 12px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.demo-pill { padding: 6px 9px; border: 1px solid #574b97; color: #c9c2ff; border-radius: 7px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.viewer { gap: 10px; padding-left: 17px; border-left: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #17151e; background: #cfcaef; font-size: 11px; font-weight: 800; }
.viewer > span:last-child { display: grid; gap: 2px; }
.viewer b { font-size: 12px; }.viewer small { color: #747a89; font-size: 10px; }
.dashboard { width: min(1440px, 94vw); margin: 0 auto; padding: 54px 0 80px; }
.hero { display: flex; justify-content: space-between; align-items: end; margin-bottom: 27px; }
.eyebrow { margin: 0 0 8px; color: #8174d7; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(32px, 5vw, 51px); line-height: 1; letter-spacing: -2px; }
.hero-copy { margin: 0; color: var(--muted); }
.hero-note { max-width: 310px; padding: 13px 15px; border: 1px solid #292640; border-radius: 12px; background: #151323; }
.hero-note span { color: #a99dff; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.hero-note p { margin: 5px 0 0; color: #9692aa; font-size: 11px; line-height: 1.5; }
.summary-strip { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr; border: 1px solid var(--line); border-radius: 17px; overflow: hidden; background: var(--panel); }
.token-overview { min-height: 180px; padding: 25px; display: flex; align-items: center; gap: 24px; }
.donut-wrap { position: relative; }
.donut { width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--purple) 0 74%, var(--mint) 74% 100%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: var(--panel); }
.donut span { z-index: 1; color: #c6bdff; font-size: 18px; }
.token-copy { display: grid; }.token-copy > strong { font-size: 33px; letter-spacing: -1px; }.token-copy > span { color: var(--muted); font-size: 12px; }
.token-counts { display: flex; gap: 15px; margin-top: 18px; }
.token-counts span, .legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.token-counts b { color: #dfe2ea; }
.input-dot, .output-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--purple); }
.output-dot { background: var(--mint); }
.signal-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.signal-grid article { min-width: 0; padding: 25px 12px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; border-right: 1px solid var(--line); text-align: center; }
.signal-grid article:last-child { border-right: 0; }.signal-grid span { color: var(--muted); font-size: 10px; }.signal-grid strong { font-size: 25px; }.signal-icon { color: #9f92f8 !important; font-size: 18px !important; }
.period-panel { padding: 25px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.period-title { display: flex; align-items: center; gap: 9px; color: #c9ccd5; font-size: 12px; }
.date-control { display: flex; align-items: end; gap: 10px; }.date-control label { flex: 1; }.date-control label span { display: block; margin-bottom: 6px; color: #666c7b; font-size: 9px; text-transform: uppercase; }
.date-control input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; color: #d9dbe3; background: #171a22; font-size: 11px; }
.date-control i { width: 8px; height: 1px; margin-bottom: 16px; background: #5a5f6d; }
.usage-panel, .conversations-panel { margin-top: 22px; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 24px; }
.section-heading h2 { margin: 0; font-size: 20px; }
.scope-control { display: flex; align-items: center; gap: 12px; }.scope-control > span { color: #6f7584; font-size: 10px; }
select { padding: 9px 32px 9px 11px; border: 1px solid #3a3e4d; border-radius: 9px; color: #dfe2e9; background: #20232e; }
.chart-wrap { position: relative; padding-top: 25px; overflow: hidden; }
.axis-labels { position: absolute; top: 2px; left: 165px; right: 55px; display: flex; justify-content: space-between; color: #5e6472; font-size: 9px; }
.user-chart { display: grid; gap: 7px; background-image: linear-gradient(90deg, transparent calc(25% - 1px), #363a4a 25%, transparent calc(25% + 1px), transparent calc(50% - 1px), #363a4a 50%, transparent calc(50% + 1px), transparent calc(75% - 1px), #363a4a 75%, transparent calc(75% + 1px)); }
.user-row { width: 100%; min-height: 25px; padding: 3px 0; display: grid; grid-template-columns: 150px 1fr 45px; gap: 14px; align-items: center; border: 0; background: transparent; cursor: pointer; }
.user-row:hover .user-name, .user-row.selected .user-name { color: #c8c0ff; }.user-row.selected { background: #8069ff0d; }
.user-row.faded { opacity: .35; cursor: default; }.user-name { overflow: hidden; color: #d6d9e1; font-size: 11px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; display: flex; align-items: stretch; }.bar-track i { display: block; }
.input-bar { border-radius: 4px 0 0 4px; background: var(--purple); }.output-bar { border-radius: 0 4px 4px 0; background: var(--mint); }.bar-total { color: #707686; font-size: 9px; text-align: right; }
.legend { display: flex; gap: 15px; padding: 18px 0 0 164px; }.legend small { margin-left: auto; color: #5e6472; font-size: 9px; }
.conversation-controls { display: flex; gap: 9px; }
.search-box { min-width: 290px; padding: 0 11px; display: flex; align-items: center; gap: 7px; border: 1px solid #3a3e4d; border-radius: 9px; color: #6d7382; background: #20232e; }
.search-box input { width: 100%; padding: 9px 0; border: 0; outline: 0; color: #e4e6ed; background: transparent; font-size: 11px; }
.filter-chips { margin: -8px 0 16px; }.filter-chips:empty { display: none; }.filter-chips button { padding: 6px 9px; border: 1px solid #5c5194; border-radius: 20px; color: #c5bdff; background: #2a2540; font-size: 10px; cursor: pointer; }.filter-chips span { margin-left: 7px; }
.conversation-list { border-top: 1px solid var(--line); }
.conversation-card { width: 100%; padding: 18px 7px; display: grid; grid-template-columns: 37px 1fr 20px; gap: 13px; align-items: start; border: 0; border-bottom: 1px solid #2a2e3a; text-align: left; background: transparent; cursor: pointer; transition: background .15s; }
.conversation-card:hover { background: #ffffff08; }.conversation-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #3d3852; border-radius: 9px; color: #a99dff; background: #262238; }
.conversation-body { min-width: 0; display: grid; gap: 7px; }.conversation-title-row { display: flex; justify-content: space-between; gap: 20px; }.conversation-title-row strong { color: #e6e8ee; font-size: 13px; }.conversation-title-row time { flex: 0 0 auto; color: #696f7e; font-size: 9px; }
.summary { overflow: hidden; color: #9298a7; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.conversation-footer { display: flex; align-items: center; gap: 8px; color: #696f7e; font-size: 9px; }.user-label { color: #b6bac6; }.tag { padding: 3px 6px; border-radius: 5px; color: #9f95dd; background: #262137; }.tokens { margin-left: auto; color: #85cdbc; }.card-arrow { align-self: center; color: #555b69; font-size: 23px; }
.load-more { display: block; margin: 22px auto 0; padding: 9px 15px; border: 1px solid #43485a; border-radius: 9px; color: #b9bdc8; background: #22242f; cursor: pointer; }
.empty-state { padding: 55px; color: #686e7c; text-align: center; }.empty-state > span { font-size: 25px; }.empty-state h3 { margin: 10px 0 6px; color: #bfc2cb; }.empty-state p { font-size: 11px; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 50; background: #000a; }.drawer-backdrop[hidden] { display: none; }.drawer { width: min(540px, 94vw); height: 100%; margin-left: auto; padding: 55px 42px; overflow-y: auto; border-left: 1px solid #3d4152; background: var(--panel); box-shadow: -30px 0 90px #0008; }
.drawer-close { position: absolute; top: 20px; right: 22px; width: 34px; height: 34px; border: 1px solid #3d4152; border-radius: 50%; color: #bfc2ca; background: #22242f; font-size: 20px; cursor: pointer; }
.drawer h2 { padding-right: 20px; font-size: 28px; line-height: 1.2; }.drawer h3 { margin: 28px 0 10px; color: #868c9b; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: #747a89; font-size: 10px; }.drawer-summary { margin: 28px 0; color: #b8bcc8; line-height: 1.7; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }.tags span { padding: 6px 9px; border: 1px solid #4a4268; border-radius: 6px; color: #b6aaff; background: #2a2540; font-size: 10px; }.tags.bright span { border-color: #316057; color: #81d5c2; background: #1e332f; }
.action-list { padding: 0; list-style: none; }.action-list li { display: flex; gap: 9px; margin: 10px 0; color: #afb3bf; font-size: 12px; }.action-list li span { color: var(--mint); }
.token-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }.token-split div { padding: 15px; display: flex; justify-content: space-between; border: 1px solid var(--line); border-radius: 10px; }.token-split span { color: var(--muted); font-size: 11px; }.token-split strong { font-size: 13px; }
.drawer-open { overflow: hidden; }
footer { padding: 20px; border-top: 1px solid #262a36; color: #555b69; text-align: center; font-size: 9px; letter-spacing: .04em; }

@media (max-width: 900px) {
  .summary-strip { grid-template-columns: 1fr 1fr; }.period-panel { grid-column: 1/-1; }.hero, .section-heading { align-items: flex-start; flex-direction: column; }.conversation-controls { width: 100%; }.search-box { flex: 1; }
}
@media (max-width: 620px) {
  .dashboard { width: auto; padding: 35px 16px 60px; }.topbar { padding: 0 16px; }.live-pill, .viewer > span:last-child, .hero-note { display: none; }.summary-strip { grid-template-columns: 1fr; }.signal-grid { border: 1px solid var(--line); }.usage-panel, .conversations-panel { padding: 18px 13px; }.scope-control, .conversation-controls { width: 100%; flex-direction: column; align-items: stretch; }.search-box { min-width: 0; }.axis-labels { display: none; }.user-row { grid-template-columns: 90px minmax(180px, 1fr) 38px; }.user-chart { min-width: 390px; }.chart-wrap { overflow-x: auto; }.legend { min-width: 390px; padding-left: 104px; }.legend small { display: none; }.conversation-card { grid-template-columns: 34px 1fr; }.card-arrow { display: none; }.conversation-title-row { display: grid; gap: 4px; }.summary { white-space: normal; }.conversation-footer { flex-wrap: wrap; }.tokens { margin-left: 0; }.drawer { padding: 50px 23px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
