:root {
  color-scheme: light;
  font-family: 'Inter', system-ui, sans-serif;
  color: #17252b;
  background: #f1f4f2;
  line-height: 1.45;
  --ink: #17252b;
  --muted: #586861;
  --panel: #fff;
  --line: #d9e2dd;
  --accent: #235e4d;
  --sidebar: #141e26;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #aabbb1;
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}
button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px 15px;
  cursor: pointer;
  font-weight: 600;
}
button:disabled { opacity: .65; cursor: default; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #bb7a11;
  outline-offset: 3px;
}
label { display: grid; gap: 6px; font-size: .93rem; font-weight: 600; }
h1 { font-size: clamp(1.85rem, 4vw, 2.5rem); margin: 0 0 24px; line-height: 1.15; letter-spacing: -.03em; }
h2 { margin: 0; font-size: 1.13rem; }
p { margin: 0; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; text-decoration: none; }
.login-screen { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.login-card {
  width: min(100%, 432px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(21px, 5vw, 37px);
  box-shadow: 0 16px 48px #16291d14;
}
.login-card .brand { margin-bottom: 34px; }
.login-card form { display: grid; gap: 14px; }
.login-card input { width: 100%; }
.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.message { font-size: .93rem; color: #973f32; }
.message:empty { display: none; }
.dashboard { min-height: 100dvh; display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; gap: 26px; padding: 26px 16px; background: var(--sidebar); color: #f1f7f3; }
.sidebar a { color: inherit; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; min-height: 44px; border-radius: 8px; padding: 8px 12px; text-decoration: none; }
.sidebar nav a:hover { background: #29393b; }
.sidebar nav a[aria-current] { color: #e8f9ee; background: #2b4b42; font-weight: 650; }
.sidebar .logout { align-self: start; margin-top: auto; color: #f1f7f3; background: transparent; border-color: #536464; }
main { min-width: 0; padding: clamp(18px, 5vw, 52px); }
.view-content { max-width: 1180px; margin: 0 auto; }
.surface { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.device:first-child { padding-top: 0; }
.device ~ .device { border-top: 1px solid var(--line); }
.device p { color: var(--muted); font-size: .9rem; }
.device h2 { overflow-wrap: anywhere; }
.empty { color: var(--muted); }
.connection-status { position: fixed; z-index: 2; bottom: 12px; left: 12px; padding: 10px 14px; background: #303c42; color: #fff; border-radius: 8px; }
@media (max-width: 650px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .sidebar nav { grid-row: 2; grid-column: span 2; display: flex; justify-content: space-between; gap: 1px; }
  .sidebar nav a { justify-content: center; flex: 1; padding: 6px; }
  .sidebar .logout { margin: 0; }
  .surface { padding: 13px; }
}
