:root { color-scheme: dark; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
* { box-sizing: border-box; }
body {
  --bg: #091426; --bg-2: #0d2036; --surface: #14243a; --surface-2: #182c45;
  --line: #2a3d56; --text: #f3f7ff; --muted: #9eafc6; --accent: #83dbba;
  --accent-2: #57acdc; --pill: rgba(53,209,157,.12); --pill-text: #7ce6b5;
  color: var(--text); background: var(--bg); margin: 0; min-height: 100vh;
  display: flex; flex-direction: column; position: relative;
}
body.theme-forest {
  --bg: #0d191a; --bg-2: #102a2a; --surface: #18302f; --surface-2: #1d3a35;
  --line: #305049; --text: #f3fff8; --muted: #a5c3b7; --accent: #c4dd85;
  --accent-2: #4fceb0; --pill: rgba(169,222,120,.12); --pill-text: #c4ec9d;
}
body.theme-sunset {
  color-scheme: light;
  --bg: #f7f5f2; --bg-2: #fffaf1; --surface: #ffffff; --surface-2: #fff9f1;
  --line: #e8e0d6; --text: #283548; --muted: #697689; --accent: #b36d54;
  --accent-2: #b36d54; --pill: #e9f7ef; --pill-text: #286e4e;
}
.page-glow { position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse 65% 52% at 94% -9%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 72%),
              radial-gradient(ellipse 46% 40% at -10% 52%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 80%);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.site-header { display:flex; justify-content: space-between; align-items: center; gap: 18px; padding: 25px clamp(20px,4.6vw,76px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark, .login-card-mark { display: grid; place-items:center; color: #071b27; background: linear-gradient(145deg,var(--accent),var(--accent-2)); font-weight: 850; font-size: 22px; border-radius: 13px; width: 46px; height: 46px; box-shadow: 0 12px 36px color-mix(in srgb,var(--accent) 15%, transparent); flex: 0 0 46px; }
.brand-name { font-size: 20px; line-height: 1; font-weight: 760; letter-spacing: -.8px; }
.brand-name b { color: var(--accent); font-weight: 730; }
.brand-name small { display: block; margin-top: 6px; font-weight: 450; color: var(--muted); font-size: 10px; letter-spacing: .9px; text-transform: uppercase; }
.top-nav { display:flex; align-items:center; justify-content:end; gap: 22px; font-size: 13px; }
.nav-link { color: var(--muted); white-space: nowrap; transition: color .2s; }
.nav-link:hover { color: var(--text); }
.user-chip { padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; display: flex; align-items:center; gap: 8px; color: var(--text); max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.user-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.logout-form { margin: 0; }
.logout-button { background: none; border:0; padding: 8px 0; }
.header-help { color: var(--muted); }
.main-content { width: min(1250px,calc(100% - 56px)); margin: 0 auto; flex: 1; padding: 49px 0 80px; }
.site-footer { border-top: 1px solid var(--line); padding: 23px clamp(20px,4.6vw,76px); color: var(--muted); font-size: 12px; display:flex; justify-content:space-between; gap: 14px; }
.eyebrow { color: var(--accent); letter-spacing: 2.2px; font-size: 11px; font-weight: 780; display: inline-flex; align-items:center; gap: 10px; }
.eyebrow-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 15px var(--accent); }
h1,h2,p { margin-top: 0; }
h1 { letter-spacing: -2.1px; font-weight: 770; }
h2 { letter-spacing: -.5px; }
.intro-block { margin: 38px 0 39px; }
.intro-block h1 { font-size: clamp(32px,5vw,55px); margin: 16px 0 12px; }
.intro-block p { color: var(--muted); font-size: 16px; }
.devices-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; }
.device-card { border:1px solid var(--line); border-radius: 19px; background: var(--surface); padding: 28px; min-height: 260px; display:flex; flex-direction:column; transition:transform .2s,border-color .2s,box-shadow .2s; }
.device-card:hover { transform: translateY(-3px); border-color:var(--accent-2); box-shadow: 0 15px 50px #0002; }
.device-card-head { display:flex; align-items: center; justify-content:space-between; margin-bottom: 24px; }
.icon-tile { background:var(--surface-2); font-size:29px; color:var(--accent); border-radius: 10px; width: 43px; height:43px; display:grid; place-items:center; }
.device-id { font-variant-numeric:tabular-nums; color:var(--muted); font-size: 12px; letter-spacing: 1px; }
.device-card h2 { font-size: 23px; margin-bottom:7px; }
.device-card p { color:var(--muted); font-size:13px; }
.open-link { margin-top:auto; padding-top:18px; display:flex; justify-content:space-between; font-size:13px; font-weight:750; color:var(--accent); }
.panel { background: var(--surface); border:1px solid var(--line); border-radius: 20px; }
.empty-panel { padding:80px 24px; text-align:center; }
.empty-icon { font-size:58px; color:var(--accent); }
.empty-panel h2 { margin-top: 14px; font-size: 24px; }
.empty-panel p { color:var(--muted); }
.breadcrumb { font-size:12px; color:var(--muted); display:flex; align-items:center; gap:13px; margin: 0 0 34px; }
.breadcrumb a:hover { color:var(--accent); }
.device-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom: 32px; }
.device-hero h1 { font-size: clamp(34px,5vw,56px); margin:15px 0 9px; }
.hero-sub { display:flex; gap:10px; align-items:center; color:var(--muted); font-size:14px; }
.dot-divider { color: var(--accent); }
.connection-chip { border-radius:100px; white-space:nowrap; display:inline-flex; align-items:center; gap:10px; padding:12px 16px; font-weight:720; font-size:13px; margin-bottom:9px; }
.connection-chip.status-online { background:var(--pill); color:var(--pill-text); border:1px solid color-mix(in srgb,var(--accent) 28%,transparent); }
.connection-chip.status-stale { background:#a163241b; color:#e6b179; border:1px solid #aa71364a; }
.connection-chip.status-waiting { background:var(--surface-2); color:var(--muted); border:1px solid var(--line); }
.status-ring { border-radius:50%; width:8px; height:8px; background:currentColor; box-shadow:0 0 0 3px color-mix(in srgb,currentColor 12%,transparent); }
.stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:17px; margin-bottom:27px; }
.stat-card { min-width:0; border-radius:17px; padding:24px; border:1px solid var(--line); background:var(--surface); display:flex; flex-direction:column; gap:12px; }
.stat-icon { color:var(--accent); font-size:26px; line-height:1; }
.stat-label { color:var(--muted); font-size:12px; font-weight:630; }
.stat-value { font-size: clamp(20px,2.4vw,28px); letter-spacing:-.9px; font-variant-numeric: tabular-nums; font-weight:730; }
.unit { font-size: 17px; color:var(--muted); font-weight:520; }
.stat-detail { color:var(--muted); font-size:11px; }
.table-panel { overflow:hidden; }
.panel-heading { padding:27px 30px 23px; display:flex; justify-content:space-between; align-items:center; gap:15px; }
.panel-eyebrow { color:var(--accent); letter-spacing:1.7px; font-size:10px; font-weight:760; }
.panel-heading h2 { font-size:23px; margin:9px 0 8px; }
.panel-heading p { font-size:13px; color:var(--muted); margin:0; }
.demo-badge { background:#c0944c18; border:1px solid #c0944c66; color:#d6aa73; padding:8px 11px; border-radius:20px; font-size:10px; letter-spacing:1px; font-weight:760; }
.hidden { display:none!important; }
.table-scroller { width:100%; overflow-x:auto; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:14px; }
th { color:var(--muted); background:var(--surface-2); border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:16px 30px; white-space:nowrap; font-weight:700; font-size:11px; letter-spacing:.8px; text-transform:uppercase; }
td { border-bottom:1px solid var(--line); padding:19px 30px; color:var(--text); font-variant-numeric:tabular-nums; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background: color-mix(in srgb,var(--accent) 3%,transparent); }
.row-label { font-weight:660; }
.placeholder-cell { color:var(--muted); }
.panel-foot { display:flex; gap:14px; justify-content:space-between; padding:18px 30px; background:color-mix(in srgb,var(--surface-2) 45%,var(--surface)); border-top:1px solid var(--line); font-size:11px; color:var(--muted); }
.secure-foot { color:var(--accent); }
.privacy-note { color:var(--muted); font-size:12px; margin:23px 0 0; }
/* Login */
.login-layout { display:grid; grid-template-columns: 1fr minmax(330px,435px); align-items:center; column-gap:clamp(24px,8vw,120px); min-height:540px; }
.login-intro { max-width:590px; }
.login-spark { font-size:48px; color:var(--accent); opacity:.75; margin-bottom:43px; }
.login-intro h1 { font-size:clamp(40px,5.5vw,68px); line-height:1.1; margin:23px 0; letter-spacing:-3.4px; }
.accent-period { color:var(--accent); }
.login-intro > p { color:var(--muted); font-size:16px; line-height:1.8; max-width:480px; }
.login-points { display:flex; flex-wrap:wrap; gap:13px 24px; color:var(--muted); font-size:12px; margin-top:45px; }
.login-card { padding:39px; background:var(--surface); border:1px solid var(--line); border-radius:24px; box-shadow:0 38px 90px #0002; }
.login-card-mark { width:54px; height:54px; font-size:25px; margin-bottom:26px; }
.form-eyebrow { color:var(--accent); font-weight:800; font-size:10px; letter-spacing:1.5px; margin-bottom:9px; }
.login-card h2 { font-size:31px; margin:0 0 8px; }
.form-help { color:var(--muted); font-size:13px; line-height:1.65; margin-bottom:25px; }
.login-card label { display:block; font-size:12px; font-weight:750; margin:17px 0 9px; }
.login-card input { display:block; width:100%; padding:13px 16px; border-radius:9px; border:1px solid var(--line); color:var(--text); background:var(--bg-2); font-size:14px; }
.login-card input::placeholder { color:var(--muted); opacity:.8; }
.primary-button { margin-top:25px; width:100%; border:0; background:linear-gradient(135deg,var(--accent),var(--accent-2)); border-radius:10px; padding:14px 18px; color:#0a2631; font-weight:800; display:flex; justify-content:space-between; align-items:center; font-size:14px; }
.primary-button:hover { filter:brightness(1.08); }
.login-small { text-align:center; color:var(--muted); font-size:11px; margin:23px 0 0; }
.form-error { background:#8f3c3426; color:#ffb0a5; border:1px solid #b34f4a; padding:12px; border-radius:10px; font-size:13px; }
@media (max-width:860px) { .login-layout { grid-template-columns:1fr; gap:34px; max-width:600px; margin:auto; }.login-spark { margin-bottom:10px; }.login-intro h1 { font-size:46px; }.login-points { margin-top:22px; }.main-content { padding-top:30px; }.stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.stat-grid .stat-card:last-child { grid-column:1/-1; } }
@media (max-width:560px) { .main-content { width:calc(100% - 32px); padding-bottom:48px; }.site-header { padding:17px 16px; }.brand-name { font-size:18px; }.brand-mark { width:39px;height:39px;flex-basis:39px; }.user-chip { display:none; }.top-nav { gap:12px; }.site-footer { padding:17px 16px; flex-direction:column; }.device-hero { align-items:flex-start; flex-direction:column; gap:8px; }.connection-chip { align-self:flex-start; }.stat-grid { grid-template-columns:1fr; }.stat-grid .stat-card:last-child { grid-column:auto; }.stat-card { padding:19px; }.panel-heading { padding:23px 18px; }.panel-foot { padding:16px 18px; flex-direction:column; }.login-card { padding:28px 22px; }.login-intro h1 { font-size:39px; letter-spacing:-2px; }.login-intro > p { font-size:14px; } th,td { padding:15px 18px; }.breadcrumb { margin-bottom:20px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

.viewer-caption { margin-top: -2px; margin-bottom: 12px; color: var(--muted); font-size:13px; }

.test-banner { padding: 11px 20px; color: var(--accent); background: var(--surface-2); text-align: center; font-size: 12px; letter-spacing: .3px; border-bottom: 1px solid var(--line); }
