:root { --visitor-bg: #090d16; --visitor-card: rgba(30, 41, 59, 0.7); --visitor-border: rgba(51, 65, 85, 0.8); --visitor-text: #f8fafc; --visitor-muted: #94a3b8; --visitor-blue: #38bdf8; --visitor-glow: rgba(56, 189, 248, 0.15); }

* { box-sizing: border-box; }

body { min-height: 100vh; margin: 0; padding: 1.5rem 1rem 2rem; background: var(--visitor-bg); background-image: radial-gradient(circle at 50% 0%, #111c38 0%, var(--visitor-bg) 70%); color: var(--visitor-text); font-family: 'Inter', system-ui, sans-serif; }

.shell { width: min(100%, 1360px); margin: 0 auto; }

.shell > header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 0 0 1.25rem; border-bottom: 1px solid var(--visitor-border); }
.shell > header h1 { margin: 0; color: var(--visitor-text); font-size: 1.875rem; font-weight: 700; letter-spacing: 0; }
.shell > header .muted, .section-note, .tracker-status { color: var(--visitor-muted); }
.shell > header .muted { margin: 0.45rem 0 0; }
.shell > header .actions { display: flex; align-items: center; }
.tracker-status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.status-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12); }

.overview-section { margin-top: 1rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.section-heading h2 { margin: 0.2rem 0 0; color: var(--visitor-text); font-size: 1rem; }
.section-kicker { color: var(--visitor-blue); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.section-note { font-size: 0.75rem; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.glass-card { border: 1px solid var(--visitor-border); border-radius: 0.75rem; background: var(--visitor-card); box-shadow: none; backdrop-filter: blur(12px); }
.stat-card { display: flex; align-items: center; gap: 1rem; min-height: 6rem; padding: 1rem 1.25rem; }
.stat-card:first-child { border-color: rgba(56, 189, 248, 0.4); }
.stat-icon { display: grid; flex: 0 0 2.75rem; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.6rem; background: var(--visitor-glow); font-size: 1.3rem; }
.stat-content h3 { margin: 0 0 0.35rem; color: var(--visitor-muted); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.stat-content h2, .stat-card:first-child .stat-content h2 { margin: 0; color: var(--visitor-text); font-size: 1.8rem; font-weight: 700; letter-spacing: 0; }

.chart-section, .breakdown-section { margin-top: 0.75rem; padding: 1rem 1.25rem; }
.chart-section h2::before, .breakdown-section h2::before { display: inline-block; width: 0.45rem; height: 0.45rem; margin: 0 0.55rem 0.1rem 0; border-radius: 50%; background: var(--visitor-blue); content: ''; }
.chart-container { position: relative; width: 100%; height: 220px; }
.breakdown-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.6rem; }
.app-stat-card { padding: 0.75rem; border: 1px solid var(--visitor-border); border-radius: 0.6rem; background: rgba(15, 23, 42, 0.42); }
.app-stat-card h4 { margin: 0 0 0.5rem; color: var(--visitor-blue); font-size: 0.85rem; }
.app-stat-card .app-cost { margin-bottom: 0.2rem; color: var(--visitor-text); font-size: 1.1rem; font-weight: 700; }
.app-stat-card .app-tokens { color: var(--visitor-muted); font-size: 0.75rem; }
.app-stat-card .app-model { margin-top: 0.65rem; padding-top: 0.55rem; border-top: 1px solid var(--visitor-border); color: var(--visitor-text); font-size: 0.72rem; line-height: 1.45; overflow-wrap: anywhere; }
.app-stat-card .app-model span { display: block; margin-bottom: 0.15rem; color: var(--visitor-muted); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.empty-state { width: 100%; margin: 0; padding: 0.8rem; border: 1px dashed var(--visitor-border); border-radius: 0.5rem; color: var(--visitor-muted); text-align: center; }
.visitor-breakdown { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; }
.visitor-stat-card { padding: 0.8rem; border: 1px solid rgba(56, 189, 248, 0.28); border-radius: 0.6rem; background: rgba(15, 23, 42, 0.48); }
.visitor-card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.visitor-card-top h4 { margin: 0; color: var(--visitor-blue); font-size: 0.85rem; }
.visitor-card-top span { color: var(--visitor-muted); font-size: 0.7rem; white-space: nowrap; }
.visitor-cost { margin-top: 0.7rem; color: var(--visitor-text); font-size: 1.1rem; font-weight: 700; }
.visitor-tokens { color: var(--visitor-muted); font-size: 0.75rem; }
.visitor-detail { margin-top: 0.55rem; padding-top: 0.45rem; border-top: 1px solid var(--visitor-border); color: var(--visitor-text); font-size: 0.72rem; line-height: 1.4; overflow-wrap: anywhere; }
.visitor-detail span { display: block; margin-bottom: 0.1rem; color: var(--visitor-muted); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

@media (min-width: 1200px) { body { padding-top: 1rem; } .chart-container { height: 190px; } .chart-section, .breakdown-section { padding-top: 0.75rem; padding-bottom: 0.75rem; } }
@media (max-width: 640px) { body { padding: 1rem 0.75rem 2rem; } .shell > header { display: block; } .shell > header .actions { margin-top: 1rem; } .dashboard-grid { grid-template-columns: 1fr; } .section-heading { align-items: flex-start; flex-direction: column; } }

/* Per-site overview */
.site-subheading { margin-top: 1.25rem; }
.site-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.6rem; }
.site-stat-card { padding: 0.85rem 1rem; transition: border-color 0.2s; }
.site-stat-card:hover { border-color: rgba(56, 189, 248, 0.5); }
.site-card-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.55rem; }
.site-icon { font-size: 1rem; flex-shrink: 0; }
.site-name { flex: 1; color: var(--visitor-blue); font-size: 0.85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-calls { color: var(--visitor-muted); font-size: 0.68rem; white-space: nowrap; }
.site-cost { color: var(--visitor-text); font-size: 1.15rem; font-weight: 700; }
.site-tokens { color: var(--visitor-muted); font-size: 0.72rem; margin-bottom: 0.6rem; }
.site-bar-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.08); overflow: hidden; margin-bottom: 0.55rem; }
.site-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #38bdf8, #818cf8); transition: width 0.5s ease; }
.site-apps-label { color: var(--visitor-text); font-size: 0.7rem; line-height: 1.4; overflow-wrap: anywhere; }
.site-apps-label span { display: block; margin-bottom: 0.1rem; color: var(--visitor-muted); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }

