﻿:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; color-scheme: light;
  --bg: #f8f9fc; --surface: #fff; --ink: #222b40; --muted: #737f94;
  --border: #e9ecf2; --soft: #f3f5f9; --tint: #edf2ff; --accent: #3867e8;
  --button: #3867e8; --green: #6b8bef; --shadow: 0 3px 12px #192f5807;
  background: var(--bg); color: var(--ink);
}
:root[data-theme=dark] {
  color-scheme: dark; --bg: #131923; --surface: #1a2230; --ink: #e9eef8;
  --muted: #9ba8bd; --border: #2b3546; --soft: #212c3e; --tint: #263652;
  --accent: #8eaeff; --green: #7398f7; --shadow: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #91afff; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.75; }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100dvh; max-width: 1800px; margin: auto; }
aside { position: sticky; top: 0; height: 100dvh; overflow-y: auto; padding: 28px 18px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 23px; font-weight: 750; letter-spacing: -.9px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; background: var(--tint); color: var(--accent); border-radius: 11px; }
.brand-mark .icon { width: 24px; height: 24px; }
.brand-dot { color: var(--accent); }
.workspace { display: flex; align-items: center; gap: 8px; margin: 34px 12px 18px; color: var(--muted); font-size: 11px; font-weight: 550; letter-spacing: .6px; }
.workspace .icon { width: 16px; height: 16px; }
nav { display: grid; gap: 5px; }
nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); }
nav a:hover { color: var(--ink); background: var(--soft); }
nav a.active { background: var(--tint); color: var(--accent); font-weight: 600; }
nav a.active::before { content: ''; position: absolute; left: -18px; height: 18px; width: 3px; border-radius: 0 2px 2px 0; background: var(--accent); }
.aside-bottom { margin-top: auto; padding: 26px 10px 0; font-size: 11px; color: var(--muted); }
.aside-bottom p { font-size: 13px; margin: 14px 0 22px; max-width: 150px; }
.back-apps { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); padding-top: 18px; font-size: 13px; }
.back-apps .icon { width: 16px; height: 16px; }
.local-dot { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: #67a687; margin-right: 6px; }
main { min-width: 0; padding: 0 36px 20px; }
header { height: 80px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.breadcrumb { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--ink); font-weight: 550; }
.header-actions { display: flex; gap: 12px; align-items: center; }
select { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; color: var(--muted); font-size: 12px; padding: 8px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 32px 0 24px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 1.5px; color: var(--accent); margin: 0 0 10px; }
h1 { font-size: clamp(26px, 2.7vw, 36px); font-weight: 650; letter-spacing: -1.3px; line-height: 1.25; margin: 0 0 10px; }
.page-heading p:last-child { font-size: 14px; color: var(--muted); max-width: 620px; margin: 0; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.35px; margin: 0; }
.primary, .secondary, .danger { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 10px; padding: 10px 15px; min-height: 40px; font-size: 13px; font-weight: 550; white-space: nowrap; flex-shrink: 0; }
.primary { background: var(--button); color: white; border: 1px solid var(--button); box-shadow: 0 4px 10px #3867e818; }
.primary:hover { background: #2f5dd9; }
.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.secondary:hover { background: var(--soft); }
.secondary .icon { height: 16px; width: 16px; }
.danger { color: #d04d63; background: transparent; border: 1px solid #d04d6340; }
.icon-button { display: inline-grid; place-items: center; min-width: 34px; height: 34px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 9px; }
.text-button { background: transparent; border: 0; color: var(--accent); font-size: 13px; font-weight: 550; padding: 8px; }
.live-strip { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.status-copy { display: flex; align-items: center; gap: 14px; }
.status-copy strong { font-size: 14px; font-weight: 600; }
.status-copy p { font-size: 12px; margin: 3px 0 0; color: var(--muted); }
.status-dot { width: 9px; height: 9px; flex-shrink: 0; border-radius: 50%; background: #9ba8bd; box-shadow: 0 0 0 5px var(--soft); }
.status-dot.on { background: #46a487; box-shadow: 0 0 0 5px #46a48715; }
.date-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 18px; }
.date-toolbar > div { display: flex; align-items: center; gap: 7px; }
.date-toolbar > span { font-size: 12px; color: var(--muted); }
input[type=date] { color: var(--ink); border: 1px solid var(--border); border-radius: 9px; background: var(--surface); padding: 7px 10px; font-size: 13px; min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stats article, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.stats article { padding: 20px 22px; }
.stat-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-label > span:first-child { font-size: 10px; font-weight: 650; letter-spacing: 1px; color: var(--muted); }
.stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--accent); background: var(--tint); }
.stats article:nth-child(2) .stat-icon { background: #e8f4ef; color: #48846a; }
.stats article:nth-child(3) .stat-icon { background: #f1edfb; color: #8c6abd; }
:root[data-theme=dark] .stats article:nth-child(2) .stat-icon { background: #253c36; color: #89c3a7; }
:root[data-theme=dark] .stats article:nth-child(3) .stat-icon { background: #352e48; color: #bca3ee; }
.stats strong { display: block; font-size: 34px; font-weight: 650; letter-spacing: -1px; margin: 10px 0 5px; font-variant-numeric: tabular-nums; }
.stats p { font-size: 12px; color: var(--muted); margin: 0; }
.insights-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.card { min-width: 0; padding: 22px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-heading p { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.legend { display: flex; gap: 7px; align-items: center; font-size: 11px; color: var(--muted); }
.legend i { height: 7px; width: 7px; border-radius: 2px; background: var(--green); }
.chart { height: 205px; display: grid; grid-template-columns: repeat(24, minmax(0,1fr)); align-items: end; gap: 5px; border-bottom: 1px solid var(--border); margin: 28px 0 10px; background: repeating-linear-gradient(to top, transparent 0, transparent 50px, var(--border) 51px); }
.bar { background: var(--border); min-width: 0; border-radius: 4px 4px 0 0; }
.bar.used { background: var(--green); }
.chart-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.breakdown .section-heading { align-items: flex-start; flex-wrap: wrap; }
.tabs { display: flex; padding: 3px; border: 1px solid var(--border); background: var(--soft); border-radius: 9px; }
.tabs button { padding: 6px 10px; font-size: 11px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.tabs button[aria-pressed=true] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px #192f5810; }
.muted { font-size: 12px; color: var(--muted); }
.usage-row { display: grid; grid-template-columns: 34px minmax(0,1fr) 72px; gap: 11px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--border); }
.usage-row:last-child { border-bottom: 0; }
.app-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-size: 11px; font-weight: 650; color: var(--accent); background: var(--tint); }
.row-name { font-size: 13px; overflow-wrap: anywhere; }
.row-progress { height: 4px; background: var(--soft); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.row-fill { display: block; height: 100%; background: var(--green); border-radius: 4px; }
.row-time { text-align: right; font-size: 12px; font-weight: 550; font-variant-numeric: tabular-nums; }
.row-time small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.empty { padding: 24px 10px 16px; text-align: center; }
.empty-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; background: var(--soft); color: var(--muted); border-radius: 14px; }
.empty h3 { font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
.empty p { font-size: 12px; color: var(--muted); max-width: 330px; margin: auto; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 22px 0; }
.setup-grid h2 { margin-bottom: 14px; }
.setup-grid p, .setup-grid ol { font-size: 13px; color: var(--muted); line-height: 1.8; }
.setup-grid ol { padding-left: 20px; }
.setup-grid li { padding-left: 4px; margin-bottom: 8px; }
.connection { color: var(--accent) !important; font-weight: 550; }
#pairing label { display: block; font-size: 12px; margin: 18px 0 6px; }
.key-row { display: flex; gap: 8px; }
.key-row input { width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: 9px; background: var(--soft); color: var(--ink); padding: 9px; font-family: monospace; font-size: 11px; }
details { margin: 18px 0; color: var(--muted); font-size: 12px; }
summary { cursor: pointer; }
code { display: block; margin: 12px 0; overflow-wrap: anywhere; user-select: all; }
footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); margin-top: 28px; padding: 16px 0; font-size: 12px; color: var(--muted); }
.error { border: 1px solid #d04d6340; border-radius: 10px; background: #d04d6310; color: #d04d63; padding: 14px; margin: 16px 0; overflow-wrap: anywhere; }
dialog { max-width: min(440px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 100px #0c183640; }
dialog::backdrop { background: #0c183666; }
dialog p { font-size: 13px; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; padding: 12px; background: var(--surface); border: 1px solid var(--accent); border-radius: 9px; }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }
@media (min-width: 1600px) { main { padding-inline: 52px; } }
@media (max-width: 1150px) { main { padding-inline: 24px; } .insights-grid { grid-template-columns: 1fr; } .chart { height: 180px; } }
@media (max-width: 760px) {
  .shell { display: block; } aside { position: static; height: auto; padding: 18px; border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
  .workspace, .aside-bottom { display: none; } .brand { padding: 0; font-size: 21px; } .brand-mark { height: 32px; width: 32px; }
  nav { display: flex; gap: 4px; } nav a { padding: 9px; } nav a .icon { width: 18px; height: 18px; } nav a span { display: none; } nav a.active::before { display: none; }
  main { padding: 0 18px 12px; } header { height: 65px; } .breadcrumb { gap: 10px; } .header-actions { gap: 8px; }
  .page-heading { margin: 24px 0 20px; align-items: flex-start; } .page-heading .secondary { font-size: 11px; padding: 9px; min-width: 36px; } .page-heading .secondary .icon { display: none; }
  h1 { font-size: 28px; letter-spacing: -.9px; } .page-heading p:last-child { font-size: 13px; } .page-heading .eyebrow { font-size: 9px; }
  .live-strip { padding: 15px; gap: 10px; } .live-strip .primary { padding: 9px 12px; font-size: 12px; } .status-copy { gap: 11px; } .status-copy p { font-size: 11px; }
  .date-toolbar > span { display: none; } .date-toolbar > div { width: 100%; justify-content: space-between; gap: 4px; } input[type=date] { max-width: 150px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; } .stats article { padding: 16px; } .stats article:first-child { grid-column: 1 / -1; } .stats strong { font-size: 30px; } .stats article:first-child strong { font-size: 36px; }
  .stat-label > span:first-child { font-size: 9px; letter-spacing: .5px; } .stat-icon { width: 28px; height: 28px; } .stat-icon .icon { width: 16px; height: 16px; } .stats p { font-size: 11px; }
  .card { padding: 19px; } .chart { height: 150px; gap: 3px; } .section-heading { gap: 10px; } .setup-grid { grid-template-columns: 1fr; gap: 18px; }
  .key-row { flex-wrap: wrap; } .key-row input { flex-basis: 100%; } footer { align-items: flex-start; gap: 8px; font-size: 11px; } footer .text-button { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.auth-card .brand { padding: 0; margin-bottom: 30px; } .auth-card h1 { font-size: 28px; }
.auth-card > p { color: var(--muted); font-size: 13px; }
.auth-card label { display: block; font-size: 12px; font-weight: 600; margin-top: 16px; }
.auth-card input { width: 100%; padding: 11px; margin: 6px 0; border: 1px solid var(--border); border-radius: 9px; color: var(--ink); background: var(--bg); }
.auth-card .primary { width: 100%; margin-top: 18px; } .auth-card > a:last-child { display: inline-block; margin-top: 20px; color: var(--accent); }
.devices { list-style: none; padding: 0; margin: 16px 0; } .devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); padding: 8px 0; font-size: 12px; }
.view-panel > .live-strip { margin-bottom: 22px; }
.settings-view { max-width: 880px; }
.settings-view p, .settings-view ol { color: var(--muted); font-size: 14px; line-height: 1.85; }
.settings-view ol { padding-left: 22px; margin: 20px 0; }
.settings-view li { padding-left: 5px; margin-bottom: 10px; }
.devices-heading { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.data-owner { margin: 22px 0; padding: 16px; background: var(--soft); border-radius: 12px; }
.data-owner > span { color: var(--muted); font-size: 11px; } .data-owner code { margin: 6px 0 0; }
.data-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.brand img { border-radius: 10px; flex-shrink: 0; }
.domain-icon { position: relative; background: hsl(var(--domain-hue) 55% 93%); color: hsl(var(--domain-hue) 45% 35%); overflow: hidden; }
.domain-icon img { position: absolute; inset: 0; margin: auto; padding: 3px; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
:root[data-theme=dark] .domain-icon { background: hsl(var(--domain-hue) 30% 24%); color: hsl(var(--domain-hue) 65% 78%); }
#panel-websites .usage-row { grid-template-columns: 40px minmax(0,1fr) 100px; padding: 20px 0; }
#panel-websites .app-badge { width: 40px; height: 40px; border-radius: 12px; }
#panel-websites .row-name { font-size: 14px; } #panel-websites .row-progress { height: 5px; max-width: 640px; }
@media (max-width: 420px) { aside { padding: 14px; gap: 8px; } .brand { font-size: 19px; gap: 7px; } .brand img { width: 30px; height: 30px; } nav a { padding: 7px; } }
