:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --sunken: #f4f4f2;
  --hover: #f6f6f4;
  --line: #e7e6e3;
  --line-strong: #d6d5d1;
  --text: #0c0c0b;
  --dim: #6f6e69;
  --faint: #a3a29d;
  --accent: #ef5a24;
  --ok: #1f9d63;
  --warn: #c98a12;
  --bad: #d4421b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #111110;
    --sunken: #0d0d0c;
    --hover: #161615;
    --line: #1f1f1d;
    --line-strong: #2c2c29;
    --text: #ededeb;
    --dim: #8e8d87;
    --faint: #5c5b56;
    --accent: #ff6a35;
    --ok: #35c27f;
    --warn: #e0a83a;
    --bad: #ff6a4a;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
code, kbd, .mono, td code, .tree, .meta dd, .drawer h3, .env-mode, .updated { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
code { font-size: 0.86em; padding: 0.1em 0.35em; border-radius: 4px; background: var(--sunken); border: 1px solid var(--line); }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.dim { color: var(--dim); }

kbd {
  font-size: 10.5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--dim);
  margin-left: 6px;
}

/* ---------- header ---------- */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; font-size: 15px; }
.brand-glyph { width: 11px; height: 16px; border: 2px solid currentColor; border-radius: 3px; position: relative; }
.brand-glyph::after { content: ''; position: absolute; left: 50%; bottom: 1.5px; width: 3px; height: 1.5px; transform: translateX(-50%); background: var(--accent); border-radius: 1px; }
.slash { color: var(--line-strong); font-size: 20px; font-weight: 300; }
.env { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
.env-mode { font-size: 11px; color: var(--dim); padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.updated { font-size: 11.5px; color: var(--faint); }

.tabs { display: flex; gap: 4px; padding: 0 16px; }
.tab {
  position: relative;
  padding: 10px 10px 12px;
  font-size: 13.5px;
  color: var(--dim);
  cursor: pointer;
}
.tab:not(.disabled):hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.tab.disabled { color: var(--faint); cursor: not-allowed; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 12px;
  border-radius: 7px;
  font: 500 13px 'Geist', sans-serif;
  border: 1px solid transparent;
  background: var(--text); color: var(--bg);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-line { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--text); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); width: 100%; height: 36px; }
.btn-danger:hover { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn:focus-visible, .tab:focus-visible, .filter button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 24px;
  font-size: 13px; color: var(--dim);
  background: var(--sunken);
  border-bottom: 1px solid var(--line);
}
.banner-tag { font-size: 11px; font-weight: 600; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); padding: 1px 7px; border-radius: 999px; }

/* ---------- page ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  margin-bottom: 24px;
}
.stat { background: var(--surface); padding: 16px 20px 18px; }
.stat-label { font-size: 12.5px; color: var(--dim); margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; min-height: 30px; }
.stat-value .unit { font-size: 13px; color: var(--faint); font-weight: 400; letter-spacing: 0; }
.meter { height: 4px; border-radius: 4px; background: var(--sunken); margin-top: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.meter span { display: block; height: 100%; width: 0; background: var(--text); border-radius: 4px; transition: width .4s ease; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 14px; font-weight: 600; margin: 0; }
.filter { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--sunken); border: 1px solid var(--line); }
.filter button { all: unset; font-size: 12px; padding: 4px 10px; border-radius: 6px; color: var(--dim); cursor: pointer; }
.filter button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px var(--line); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: 12px; color: var(--dim); padding: 9px 20px; background: var(--sunken); border-bottom: 1px solid var(--line); }
td { padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr.row { cursor: pointer; transition: background .1s; }
tbody tr.row:hover { background: var(--hover); }
td code { background: none; border: none; padding: 0; font-size: 12.5px; }
.sess { display: flex; align-items: center; gap: 10px; }
.surface { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.surface svg { width: 14px; height: 14px; color: var(--dim); }
.owner .tenant { color: var(--faint); }
.mode { font-size: 12px; color: var(--dim); font-family: 'Geist Mono', monospace; }
.row-actions { text-align: right; white-space: nowrap; }
.icon-btn { all: unset; cursor: pointer; color: var(--faint); padding: 4px; border-radius: 5px; display: inline-flex; }
.icon-btn:hover { color: var(--text); background: var(--sunken); }
.icon-btn svg { width: 14px; height: 14px; }
.chev { color: var(--faint); margin-left: 6px; }

.empty { padding: 48px 20px 52px; text-align: center; }
.empty h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.empty p { margin: 0 0 18px; color: var(--dim); font-size: 13.5px; }
.empty .cmd {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Geist Mono', monospace; font-size: 12.5px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 10px 9px 14px;
  max-width: 100%;
}
.empty .cmd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.skeleton { background: var(--sunken); border-radius: 6px; color: transparent !important; animation: pulse 1.4s ease-in-out infinite; }
.skeleton.line { height: 12px; width: 70%; }
.skeleton.line.short { width: 45%; }
.stat-value.skeleton { width: 60%; height: 30px; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10,10,10,.28); opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 20; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 8px; right: 8px; bottom: 8px;
  width: min(460px, calc(100vw - 16px));
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.35);
  z-index: 21;
  display: flex; flex-direction: column;
  transform: translateX(calc(100% + 24px));
  visibility: hidden;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 18px 14px 20px; }
.drawer-kicker { font-size: 12px; color: var(--dim); margin-bottom: 2px; }
.drawer h3 { margin: 0; font-size: 15px; font-weight: 500; }
.drawer-tabs { display: flex; gap: 4px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.drawer-tabs button { all: unset; position: relative; padding: 8px 8px 10px; font-size: 13px; color: var(--dim); cursor: pointer; }
.drawer-tabs button.active { color: var(--text); }
.drawer-tabs button.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.dpanel { display: none; }
.dpanel.active { display: block; }
.drawer-foot { padding: 14px 20px 18px; border-top: 1px solid var(--line); }

.device { width: 250px; margin: 4px auto 0; padding: 9px; border-radius: 34px; background: #121211; box-shadow: 0 0 0 1px #2a2a27, 0 18px 40px -20px rgba(0,0,0,.4); }
.device-screen { aspect-ratio: 9 / 19.5; border-radius: 26px; background: #0d0d0c; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #7d7c76; font-size: 12.5px; text-align: center; padding: 0; }
.device-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.device-screen .msg { padding: 0 24px; line-height: 1.5; }

.tree { list-style: none; margin: 0; padding: 0; font-size: 12.5px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tree li { display: grid; grid-template-columns: 38px 76px 1fr; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); align-items: baseline; }
.tree li:first-child { border-top: none; }
.tree .r { color: var(--accent); }
.tree .role { color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.tree .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .label i { font-style: normal; color: var(--faint); }
.tree .tags { color: var(--faint); margin-left: 6px; }
.tree-empty { color: var(--dim); font-size: 13px; }

.meta { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.meta div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 13px; }
.meta div:first-child { border-top: none; }
.meta dt { color: var(--dim); font-family: 'Geist', sans-serif; }
.meta dd { margin: 0; text-align: right; word-break: break-all; font-size: 12.5px; }

@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .updated { display: none; }
  /* Hide App, Mode and the chevron columns; tighten cell padding so the table fits a phone. */
  th:nth-child(3), td:nth-child(3), th:nth-child(5), td:nth-child(5), th:nth-child(6), td:nth-child(6) { display: none; }
  th, td { padding-left: 14px; padding-right: 14px; }
  .page { padding: 20px 16px 48px; }
  /* The header doesn't fit one row on a phone — let it wrap instead of widening the page. */
  .top-row { padding: 9px 16px; height: auto; flex-wrap: wrap; row-gap: 8px; }
  .top-right { gap: 8px; }
}

/* Buttons the customer console adds */
.btn-dark { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-dark:hover { opacity: 0.9; }
.btn-block { width: 100%; justify-content: center; }
.meter span.over { background: var(--bad); }

/* Dashboard refinements */
.stat-sub { font-size: 11.5px; color: var(--faint); margin-top: 10px; }
.headcount { font-weight: 400; color: var(--faint); font-size: 12.5px; margin-left: 8px; letter-spacing: 0; }

/* minmax(0,1fr): let the column (and the code card's long line) shrink instead of widening the page. */
.card-body { padding: 18px 20px 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.code-card { min-width: 0; }
.field-label { font-size: 12px; font-weight: 500; color: var(--dim); margin-bottom: 9px; }
.field-hint { font-size: 12px; color: var(--faint); margin: 10px 0 0; }

.keychip { display: flex; align-items: center; gap: 10px; background: var(--sunken); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px 8px 14px; flex-wrap: wrap; }
.keychip code { font-size: 13px; background: none; border: 0; padding: 0; color: var(--text); }
.keychip .tenant-id { margin-left: auto; }

.code-card { position: relative; background: #0e0e0d; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.code-card pre { margin: 0; padding: 14px 16px; overflow-x: auto; color: #e9e8e4; font: 12.5px/1.75 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.code-copy { position: absolute; top: 8px; right: 8px; height: 26px; padding: 0 11px; font: 500 12px 'Geist', sans-serif; color: #c9c8c3; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); border-radius: 6px; cursor: pointer; transition: background .12s, color .12s; }
.code-copy:hover { color: #fff; background: rgba(255,255,255,.16); }
.code-copy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Auth (sign up / key) and the key reveal */
.auth { max-width: 460px; margin: 8vh auto 0; padding: 0 20px 48px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; }
.auth-tabs { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); margin-bottom: 18px; }
.auth-tabs button { border: 0; background: none; font: inherit; font-size: 13px; color: var(--dim); padding: 6px 14px; border-radius: 7px; cursor: pointer; }
.auth-tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.apanel { display: none; }
.apanel.active { display: block; }
.auth-lede { color: var(--dim); font-size: 13.5px; margin: 0 0 18px; }
.auth label { display: block; font-size: 12.5px; color: var(--dim); margin-bottom: 14px; }
.auth input[type=email], .auth input[type=text], .set-label input { width: 100%; margin-top: 6px; height: 38px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.auth input:focus, .set-label input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.auth label.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--text); }
.auth label.check input { width: auto; height: auto; margin-top: 3px; }
.auth-msg { font-size: 12.5px; color: var(--dim); margin: 12px 0 0; min-height: 1em; }
.auth-msg.err { color: var(--bad); }
.auth-msg.warn { color: var(--accent); }
.auth-fine { font-size: 12px; color: var(--dim); margin: 12px 0 0; }
.auth-fine a { color: var(--dim); text-decoration: underline; }
.google-slot { display: flex; justify-content: center; min-height: 40px; color-scheme: light; }
.google-slot.hidden { display: none; }
.reveal-h { margin: 0 0 6px; font-size: 18px; }
.keybox { display: flex; align-items: center; gap: 8px; background: var(--code-bg, #0e0e0d); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; margin: 14px 0; }
.keybox code { flex: 1; color: var(--code-text, #e9e8e4); background: none; border: 0; padding: 0; font-size: 12.5px; word-break: break-all; }
.keyrow { display: flex; align-items: center; gap: 12px; padding: 14px 20px; flex-wrap: wrap; }
.keyrow code { font-size: 13px; }
.tenant-id { color: var(--dim); font-size: 12.5px; margin-left: auto; }
.drawer.narrow { width: min(420px, 94vw); }
.set-label { display: block; font-size: 13px; color: var(--dim); line-height: 1.5; }
.set-label input { margin: 10px 0 16px; }

/* ============================ Sidebar app ============================ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; padding: 18px 20px 14px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; flex: 1; }
.nav-item {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--dim); cursor: pointer;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--sunken); color: var(--text); }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
.side-acct { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; min-width: 0; }
.acct-email { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-tenant { font-size: 11.5px; color: var(--faint); font-family: 'Geist Mono', monospace; }
.side-actions { display: flex; gap: 8px; }
.side-actions .btn { flex: 1; }

.main { flex: 1; min-width: 0; overflow-x: hidden; }
.panel { display: none; max-width: 1080px; margin: 0 auto; padding: 26px 28px 64px; }
.panel.active { display: block; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.panel-title { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.panel-sub { margin: 4px 0 0; color: var(--dim); font-size: 13.5px; }
.panel-actions { display: flex; align-items: center; gap: 12px; }
.panel-note { color: var(--faint); font-size: 12.5px; margin: 14px 2px 0; }
.select { height: 32px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 500 13px 'Geist', sans-serif; }

/* Device cards */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.device-card {
  all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 14px;
  transition: border-color .12s, box-shadow .12s, transform .08s;
}
.device-card:hover { border-color: var(--line-strong); box-shadow: 0 6px 20px -12px rgba(0,0,0,.25); }
.device-card:active { transform: translateY(1px); }
.device-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dc-top { display: flex; align-items: center; gap: 8px; }
.dc-top code { background: none; border: 0; padding: 0; font-size: 13px; }
.dc-surface { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--dim); }
.dc-surface svg { width: 15px; height: 15px; }
.dc-meta { font-size: 12.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-meta code { font-size: 12px; }
.dc-open { margin-top: 2px; font-size: 12.5px; font-weight: 500; color: var(--accent); }
.dc-open span { transition: transform .12s; display: inline-block; }
.device-card:hover .dc-open span { transform: translateX(3px); }

/* Live view */
.live-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.live-title { margin: 0; font-size: 15px; font-weight: 500; font-family: 'Geist Mono', monospace; }
.live-status { font-size: 12px; color: var(--faint); font-family: 'Geist Mono', monospace; }
.live-status.ok { color: var(--ok); }
.live-status.warn { color: var(--warn); }
.live-bar .btn-danger { margin-left: auto; width: auto; height: 30px; padding: 0 12px; }
.live-body { display: flex; gap: 30px; align-items: flex-start; }
.live-stage { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone-shell { padding: 10px; border-radius: 34px; background: #121211; box-shadow: 0 0 0 1px #2a2a27, 0 24px 50px -24px rgba(0,0,0,.5); }
.phone-live { position: relative; touch-action: none; user-select: none; cursor: crosshair; border-radius: 26px; overflow: hidden; background: #0d0d0c; }
.phone-live #live-img { display: block; max-height: 70vh; max-width: min(340px, 78vw); width: auto; height: auto; }
.live-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #7d7c76; font-size: 13px; min-width: 240px; min-height: 480px; }
.live-controls { display: flex; gap: 12px; }
.ctrl { all: unset; box-sizing: border-box; width: 44px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--dim); cursor: pointer; background: var(--surface); }
.ctrl:hover { color: var(--text); border-color: var(--text); }
.ctrl svg { width: 18px; height: 18px; }
.live-info { flex: 1; min-width: 0; max-width: 340px; }
.type-row { display: flex; gap: 8px; }
.type-row input { flex: 1; min-width: 0; height: 32px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: 13px; }
.type-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* Apps */
.pkg-list { max-height: 460px; overflow-y: auto; }
.pkg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.pkg:last-child { border-bottom: none; }
.pkg code { font-size: 12.5px; background: none; border: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; }
.pkg-loading { padding: 20px; color: var(--dim); font-size: 13px; }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 6px; color: var(--dim); }
.dropzone.disabled { opacity: .7; }
.dropzone strong { font-weight: 500; font-size: 13.5px; color: var(--dim); }
.dropzone .soon { font-size: 11.5px; color: var(--faint); }
.field-hint.err { color: var(--bad); }

/* Activity */
.act-t { color: var(--dim); font-family: 'Geist Mono', monospace; font-size: 12.5px; white-space: nowrap; }

@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; align-items: center; gap: 6px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .side-brand { padding: 12px 14px; }
  .side-nav { flex-direction: row; flex: 1; padding: 8px; gap: 2px; }
  .nav-item { padding: 8px 10px; white-space: nowrap; }
  .side-foot { border-top: 0; padding: 10px 12px; }
  .side-acct { display: none; }
  .panel { padding: 20px 16px 48px; }
  .live-body { flex-direction: column; }
  .live-info { max-width: none; width: 100%; }
}
