/* Zenstra AI console — stylesheet.
 *
 * Follows the operating system's light or dark setting. Both share one layout: a
 * navy navigation rail, a neutral work area, white (or slate) cards with soft
 * shadows, and one brand blue for every action, link and focus ring.
 *
 * `--teal` is the ACCENT token (the name predates the rebrand; renaming it would
 * touch every rule for no visual gain). `--amber` stays the warning colour.
 *
 * No build step, no CSS framework, no remote fonts (the console's CSP allows
 * none): the system font stack is Segoe UI on Windows, SF Pro on macOS.
 */

:root {
  --bg: #0b1220;
  --panel: #111a2b;
  --panel-2: #152036;
  --raised: #1b2840;
  --sunk: #0d1626;

  --ink: #e6ebf5;
  --ink-2: #c3cde0;
  --muted: #8a99b4;
  --faint: #66758f;

  --line: #1e2a3f;
  --line-2: #2a3954;

  --amber: #f0b429;
  --teal: #3ea6ff;
  --green: #3ecf8e;
  --red: #f26d6d;
  --violet: #a78bfa;

  --amber-dim: rgba(240, 180, 41, .14);
  --teal-dim: rgba(62, 166, 255, .15);
  --green-dim: rgba(62, 207, 142, .14);
  --red-dim: rgba(242, 109, 109, .14);
  --violet-dim: rgba(167, 139, 250, .14);

  /* Brand and navigation rail — the same in both themes. */
  --brand: #0b6ee6;
  --brand-2: #3ea6ff;
  --on-brand: #fff;
  --rail: #141a26;
  --rail-2: #171f2e;
  --rail-ink: #cdd6e6;
  --rail-muted: #8593ab;
  --rail-line: rgba(255, 255, 255, .07);

  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 16px 40px -16px rgba(0,0,0,.65);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.25);
  --shadow-md: 0 2px 4px rgba(0,0,0,.25), 0 8px 24px -8px rgba(0,0,0,.45);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6fb; --panel: #fff; --panel-2: #f8fafd; --raised: #eef2f8; --sunk: #f1f4f9;
    --ink: #0f172a; --ink-2: #334155; --muted: #5b6b82; --faint: #8796ab;
    --line: #e4e9f1; --line-2: #d3dbe7;
    --amber: #b45309; --teal: #0b6ee6; --green: #15803d; --red: #c8313b; --violet: #6d4ee0;
    --amber-dim: rgba(180,83,9,.08); --teal-dim: rgba(11,110,230,.08);
    --green-dim: rgba(21,128,61,.08); --red-dim: rgba(200,49,59,.08);
    --violet-dim: rgba(109,78,224,.08);
    --shadow: 0 1px 3px rgba(16,24,40,.08), 0 18px 40px -18px rgba(16,24,40,.22);
    --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.04);
    --shadow-md: 0 2px 4px rgba(16,24,40,.06), 0 10px 24px -8px rgba(16,24,40,.14);
  }
}

/* ---------------------------------------------------------------------------
 * The `hidden` attribute must actually hide.
 *
 * `hidden` works through a UA default of `[hidden] { display: none }`, and ANY
 * author rule that sets `display` on the same element wins — author styles beat
 * UA styles. So `.drawer { display: flex }` silently defeated `<aside hidden>`,
 * leaving the detail panel permanently open over every page while the JS happily
 * reported it as closed.
 *
 * This must stay ABOVE the component rules and carry !important, because those
 * rules set `display` themselves. Every element in this app that toggles via
 * `hidden` (drawer, scrim, filter bar, toast, pair card, views) depends on it.
 * --------------------------------------------------------------------------- */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.015em; }
h1 { font-size: 1.35rem; }
h2 { font-size: .95rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.small { font-size: .8rem; }
button { font: inherit; }

/* ---------------------------------------------------------------------------
 * Inline navigation links.
 *
 * The console navigates almost entirely through clickable rows and cards, so
 * these are the only true anchors in it: the device drawer's "see all sessions"
 * escape hatch, and the session drawer's route back to the machine it happened
 * on. There was no `a` rule of any kind in this file, so both inherited the
 * user agent's #0000EE — close to illegible on the dark ground, and ignoring
 * the palette entirely on the light one.
 *
 * Underlined on hover rather than always: these sit inside muted helper text,
 * where a permanent rule would read heavier than the content it points at.
 */
.link {
  color: var(--teal); text-decoration: none; cursor: pointer; border-radius: var(--r-sm);
}
.link:hover { text-decoration: underline; }

/* Install paths and Store package folders are long and unbroken; let them wrap
   inside the drawer instead of forcing the whole list to scroll sideways. */
.installed-list .sub { overflow-wrap: anywhere; word-break: break-all; }
.link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ------------------------------------------------------------ layout */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px; flex: 0 0 232px; background: var(--panel);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.logo { display: flex; align-items: center; gap: .7rem; padding: 1.1rem 1.15rem; border-bottom: 1px solid var(--line); }
.logo-mark { font-size: 1.35rem; color: var(--amber); line-height: 1; }
.logo-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -.02em; }
.logo-sub { font-size: .68rem; color: var(--faint); text-transform: uppercase; letter-spacing: .09em; }

.nav { padding: .7rem .6rem; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  background: none; border: none; color: var(--muted); text-align: left;
  padding: .55rem .65rem; border-radius: var(--r-sm); cursor: pointer; font-size: .89rem;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--panel-2); color: var(--ink); }
.nav-item.active { background: var(--raised); color: var(--ink); font-weight: 500; }
.nav-item.active .nav-ico { color: var(--amber); }
.nav-ico { width: 1.1em; text-align: center; opacity: .9; }
.nav-badge {
  margin-left: auto; font-family: var(--mono); font-size: .7rem; color: var(--faint);
  background: var(--sunk); padding: .05rem .35rem; border-radius: 4px;
}
/* Open alerts. Red only when one of them means monitoring stopped (severity
   high); amber for the rest, so the badge does not cry wolf over a re-enable. */
.nav-badge.alarm { background: var(--red-dim); color: var(--red); }
.nav-badge.notice { background: var(--amber-dim); color: var(--amber); }

.sidebar-foot { padding: .9rem 1.15rem; border-top: 1px solid var(--line); }
.conn { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); }
.conn-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.conn.bad .conn-dot { background: var(--red); }
.conn.bad { color: var(--red); }
.conn-meta { font-size: .68rem; color: var(--faint); margin-top: .3rem; word-break: break-all; }

.content { flex: 1; min-width: 0; padding: 1.3rem 1.6rem 4rem; max-width: 1680px; }

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.page-sub { margin: .2rem 0 0; color: var(--muted); font-size: .86rem; }
.page-actions { display: flex; gap: .5rem; align-items: center; }

/* ------------------------------------------------------------ cards */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1rem 1.15rem; margin-bottom: 1rem;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.card-note { font-size: .75rem; color: var(--faint); }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1080px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------ KPIs */
.kpi-row { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); margin-bottom: 1rem; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: .85rem .95rem; position: relative; overflow: hidden;
}
.kpi::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--line-2); }
.kpi.amber::after { background: var(--amber); }
.kpi.teal::after { background: var(--teal); }
.kpi.green::after { background: var(--green); }
.kpi.red::after { background: var(--red); }
.kpi-n { font-size: 1.65rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; letter-spacing: -.025em; }
.kpi-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); margin-top: .25rem; }
.kpi-sub { font-size: .74rem; color: var(--muted); margin-top: .2rem; }

/* ------------------------------------------------------------ charts */
.chart-holder { min-height: 120px; }
.chart-holder svg { display: block; width: 100%; height: auto; }
.chart-empty { color: var(--faint); font-size: .84rem; padding: 2rem 0; text-align: center; }

.bars { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; gap: .7rem; align-items: center; }
.bar-label { font-size: .84rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--sunk); border-radius: 3px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--teal); min-width: 2px; transition: width .35s ease; }
.bar-fill.amber { background: var(--amber); }
.bar-fill.red { background: var(--red); }
.bar-fill.violet { background: var(--violet); }
.bar-val { font-family: var(--mono); font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .855rem; }
.tbl th {
  text-align: left; padding: .45rem .65rem; font-family: var(--mono); font-weight: 500;
  font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--faint);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--panel-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; font-family: var(--mono); font-size: .8rem; }
.cell-2 { line-height: 1.25; }
.cell-2 .sub { font-size: .74rem; color: var(--faint); }
.empty-row { padding: 2.5rem 1rem; text-align: center; color: var(--faint); }
.empty-row strong { display: block; color: var(--ink-2); margin-bottom: .3rem; font-weight: 500; }

/* ------------------------------------------------------------ pills */
.pill {
  display: inline-block; font-family: var(--mono); font-size: .655rem; font-weight: 500;
  letter-spacing: .05em; text-transform: uppercase; padding: .14rem .42rem;
  border-radius: 4px; white-space: nowrap;
}
.pill.teal { background: var(--teal-dim); color: var(--teal); }
.pill.amber { background: var(--amber-dim); color: var(--amber); }
.pill.green { background: var(--green-dim); color: var(--green); }
.pill.red { background: var(--red-dim); color: var(--red); }
.pill.violet { background: var(--violet-dim); color: var(--violet); }
.pill.grey { background: var(--raised); color: var(--muted); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.live { background: var(--green); box-shadow: 0 0 0 3px var(--green-dim); }
.dot.idle { background: var(--faint); }

/* ------------------------------------------------------------ toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-bottom: .9rem; }
.search { position: relative; flex: 0 1 320px; }
.search-ico { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: .95rem; }
.search input, .sel {
  width: 100%; background: var(--panel); border: 1px solid var(--line-2); color: var(--ink);
  padding: .45rem .7rem .45rem 1.9rem; border-radius: var(--r-sm); font-size: .875rem;
}
.sel { padding-left: .7rem; width: auto; }
.search input:focus, .sel:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.chip {
  background: var(--panel); border: 1px solid var(--line-2); color: var(--muted);
  padding: .42rem .8rem; border-radius: 999px; cursor: pointer; font-size: .82rem;
}
.chip:hover { color: var(--ink); }
.chip[data-on="true"] { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.count { font-size: .8rem; margin-left: auto; }

/* ------------------------------------------------------------ devices */
.device-grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dev {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1rem 1.05rem; cursor: pointer; transition: border-color .14s, transform .14s;
}
.dev:hover { border-color: var(--teal); transform: translateY(-1px); }
.dev-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.dev-host { font-weight: 600; font-size: .95rem; }
.dev-id { font-family: var(--mono); font-size: .7rem; color: var(--faint); }
.dev-meta { display: flex; gap: .4rem; flex-wrap: wrap; margin: .7rem 0; }
.dev-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.dev-stat .v { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.dev-stat .l { font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.cap { display: flex; align-items: center; gap: .4rem; }
.cap-bar { width: 46px; height: 5px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.cap-fill { height: 100%; background: var(--green); }
.cap-fill.warn { background: var(--amber); }
.cap-fill.bad { background: var(--red); }

/* ------------------------------------------------------------ deploy */
.deploy-lead { color: var(--ink-2); margin: 0 0 .9rem; }
.platform-row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.plat {
  display: flex; flex-direction: column; gap: .2rem; align-items: flex-start; text-align: left;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--ink);
  padding: .75rem .9rem; border-radius: var(--r-sm); cursor: pointer; position: relative;
}
.plat:hover { border-color: var(--teal); }
.plat.on { border-color: var(--amber); background: var(--amber-dim); }
.plat.off { opacity: .45; cursor: not-allowed; }
.plat-name { font-weight: 600; font-size: .9rem; }
.plat-meta { font-family: var(--mono); font-size: .68rem; color: var(--faint); }
.plat-tag {
  position: absolute; top: .5rem; right: .6rem; font-size: .6rem; text-transform: uppercase;
  letter-spacing: .07em; color: var(--teal); background: var(--teal-dim); padding: .1rem .3rem; border-radius: 3px;
}

.cmd-box { display: flex; gap: .6rem; align-items: stretch; }
.cmd {
  flex: 1; margin: 0; background: var(--sunk); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: .8rem .9rem; font-family: var(--mono);
  font-size: .8rem; color: var(--ink); overflow-x: auto; white-space: pre;
}
/* A new console key is shown once: wrap it so all of it is visible, not scrolled out of view. */
#pfKeyValue { min-width: 0; white-space: pre-wrap; word-break: break-all; }
.btn-primary {
  background: var(--teal); color: var(--bg); border: none; border-radius: var(--r-sm);
  padding: 0 1.1rem; font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap;
}
.btn-primary:hover { filter: brightness(1.08); }
.deploy-note { font-size: .8rem; margin: .7rem 0 0; }

.pair { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .9rem; }
.pair.done { color: var(--green); }
.spinner { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; flex: 0 0 auto; }
.pair.done .spinner { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto; width: min(820px, 96vw);
  background: var(--panel); border-left: 1px solid var(--line-2);
  z-index: 60; display: flex; flex-direction: column; box-shadow: var(--shadow);
  animation: slide .18s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--panel);
}
.drawer-sub { margin: .2rem 0 0; font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.btn-icon { background: none; border: none; color: var(--muted); font-size: 1.05rem; cursor: pointer; padding: .2rem .4rem; border-radius: 4px; }
.btn-icon:hover { color: var(--ink); background: var(--raised); }
.drawer-body { overflow-y: auto; padding: 1.1rem 1.2rem 4rem; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .5rem; margin-bottom: 1.1rem; }
.fact { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .65rem; }
.fact .k { font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.fact .v { font-size: .87rem; margin-top: .15rem; word-break: break-word; }

.section-label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); margin: 1.3rem 0 .6rem; display: flex; align-items: center; gap: .6rem;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.banner { border-radius: var(--r-sm); padding: .6rem .8rem; font-size: .84rem; margin-bottom: .8rem; border: 1px solid; }
.banner.warn { background: var(--amber-dim); border-color: var(--amber); color: var(--amber); }
.banner.red { background: var(--red-dim); border-color: var(--red); color: var(--red); }
.banner.info { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }

/* ---------------------- transcript (the demo centrepiece) ------------ */
.turns { display: flex; flex-direction: column; gap: .7rem; }
.turn { display: flex; gap: .6rem; max-width: 92%; }
.turn.out { align-self: flex-start; }
.turn.in { align-self: flex-end; flex-direction: row-reverse; }

.avatar {
  width: 27px; height: 27px; flex: 0 0 auto; border-radius: 7px;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  font-family: var(--mono);
}
.turn.out .avatar { background: var(--amber-dim); color: var(--amber); }
.turn.in .avatar { background: var(--teal-dim); color: var(--teal); }

.bubble { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .8rem; min-width: 0; }
.turn.out .bubble { border-left: 2px solid var(--amber); }
.turn.in .bubble { border-right: 2px solid var(--teal); }
.bubble.blocked { border-color: var(--red); background: var(--red-dim); }

.bubble-head { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .35rem; }
.bubble-when { font-family: var(--mono); font-size: .68rem; color: var(--faint); margin-left: auto; }
.bubble-text { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .87rem; line-height: 1.55; }
.bubble-foot { margin-top: .45rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.trunc { font-size: .72rem; color: var(--faint); font-style: italic; }

.event-line {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .4rem .7rem; background: var(--sunk); border: 1px dashed var(--line-2);
  border-radius: var(--r-sm); font-size: .8rem; color: var(--muted);
}
.event-line .when { margin-left: auto; font-family: var(--mono); font-size: .68rem; color: var(--faint); }

/* ------------------------------------------------------------ misc */
.toast {
  position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  background: var(--raised); border: 1px solid var(--line-2); color: var(--ink);
  padding: .55rem 1rem; border-radius: 999px; font-size: .85rem; z-index: 90; box-shadow: var(--shadow);
}
.skeleton { background: linear-gradient(90deg, var(--panel-2) 25%, var(--raised) 50%, var(--panel-2) 75%);
  background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: var(--r-sm); }
@keyframes sh { to { background-position: -200% 0; } }
.sk-kpi { height: 76px; }

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; flex-direction: row; align-items: center; overflow-x: auto; }
  .logo { border-bottom: none; border-right: 1px solid var(--line); }
  .nav { flex-direction: row; padding: .5rem; }
  .nav-item { white-space: nowrap; }
  .sidebar-foot { display: none; }
  .content { padding: 1rem; }
}

/* ------------------------------------------------------------ auth gate */
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: var(--bg);
}
.gate-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 2rem 2.2rem; width: min(360px, 92vw); text-align: center; box-shadow: var(--shadow);
}
.gate-mark { font-size: 2rem; color: var(--amber); line-height: 1; }
.gate-card h2 { margin: .4rem 0 .3rem; font-size: 1.25rem; }
.gate-card p { margin: 0 0 1.2rem; }
.gate-input {
  width: 100%; background: var(--sunk); border: 1px solid var(--line-2); color: var(--ink);
  padding: .6rem .75rem; border-radius: var(--r-sm); font-size: .9rem; font-family: var(--mono);
}
.gate-input:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.gate-btn { width: 100%; margin-top: .7rem; padding: .6rem 0; }
.gate-err { color: var(--red); font-size: .8rem; min-height: 1.1em; margin: .6rem 0 0 !important; }

/* ------------------------------------------------- device card footer */
.dev-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line);
}
.dev-cta { font-size: .8rem; color: var(--teal); font-weight: 500; }
.dev-details {
  background: none; border: 1px solid var(--line-2); color: var(--muted);
  padding: .22rem .6rem; border-radius: 5px; font-size: .78rem; cursor: pointer;
}
.dev-details:hover { color: var(--ink); border-color: var(--muted); }
.dev:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ------------------------------------------------- active filter bar */
.filter-bar {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  background: var(--teal-dim); border: 1px solid var(--teal);
  border-radius: var(--r-sm); padding: .5rem .8rem; margin-bottom: .8rem; font-size: .85rem;
}
.fb-label { color: var(--muted); }
.filter-bar strong { color: var(--ink); }
.fb-clear, .fb-link {
  background: none; border: 1px solid var(--teal); color: var(--teal);
  padding: .18rem .6rem; border-radius: 5px; font-size: .78rem; cursor: pointer;
}
.fb-clear { margin-left: auto; }
.fb-link { border-color: var(--line-2); color: var(--muted); }
.fb-clear:hover, .fb-link:hover { filter: brightness(1.15); }

/* The signed-in user on a device card. Sits between the hostname and the id:
   more prominent than the id (an analyst looks for the person, not the uuid),
   less prominent than the hostname. */
.dev-user {
  font-size: .84rem;
  color: var(--ink-2);
  margin-top: .12rem;
}
.dev-user:empty { display: none; }

/* ===================================================== plugin form */

.plugin-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: .95rem 1.1rem;
  margin-top: .9rem;
}
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
/* The endpoint list and the notes read as one long line, so they span. */
.field-wide { grid-column: 1 / -1; }
.field label { font-size: .82rem; color: var(--ink-2); }

.field input, .field textarea {
  width: 100%; background: var(--sunk); border: 1px solid var(--line-2); color: var(--ink);
  padding: .5rem .7rem; border-radius: var(--r-sm); font-size: .875rem;
  font-family: var(--sans);
}
.field textarea { font-family: var(--mono); font-size: .82rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: -1px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }

.field-hint { margin: .1rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.field-error { margin: .1rem 0 0; font-size: .78rem; color: var(--red); }
/* A red ring, never colour alone: the message underneath carries the meaning. */
.field input.invalid, .field textarea.invalid { border-color: var(--red); }

.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: .8rem; }
.form-msg { font-size: .82rem; color: var(--muted); }
.form-msg.good { color: var(--green); }
.form-msg.bad { color: var(--red); }

/* A disabled plugin stays legible — it is configuration an operator will come
   back to — but must not read as active. */
.row-off td { opacity: .55; }
.row-actions { display: flex; align-items: center; gap: .4rem; justify-content: flex-end; }

/* ------------------------------------------------- extension download tiles
 *
 * Three install routes side by side, because which one you need depends on the
 * machine in front of you rather than on a preference: the .zip for anything
 * unmanaged, the signed .crx for policy, and Safari — which cannot be installed
 * from either and says so.
 *
 * Same column sizing as .platform-row above, so the two cards in this view line
 * up instead of each inventing a grid. Tiles carry numbered steps, so they are
 * taller than the platform buttons and align at the top rather than stretching.
 */
.ext-grid {
  display: grid; gap: .7rem; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.ext-tile {
  display: flex; flex-direction: column; gap: .5rem;
  background: var(--panel-2); border: 1px solid var(--line-2);
  padding: .85rem .9rem; border-radius: var(--r-sm);
}
/* A route that cannot be completed from here reads as present but inert —
   dimmed like .row-off rather than hidden, because the reason is the content. */
.ext-tile.off { background: var(--sunk); border-style: dashed; }

.ext-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ext-name { font-weight: 600; font-size: .88rem; }
.ext-for { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }

.ext-dl { text-align: center; text-decoration: none; padding: .45rem .7rem; font-size: .84rem; }
.ext-blocked {
  text-align: center; padding: .45rem .7rem; font-size: .84rem;
  color: var(--amber); background: var(--amber-dim);
  border: 1px dashed var(--amber); border-radius: var(--r-sm);
}

.ext-steps {
  margin: .1rem 0 0; padding-left: 1.15rem;
  color: var(--ink-2); font-size: .81rem; line-height: 1.5;
}
.ext-steps li { margin-bottom: .3rem; }

/* Commands and update URLs are long and must not widen the grid column. */
.ext-cmd {
  margin: 0; font-size: .72rem; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .45rem .55rem; color: var(--ink-2);
}

@media (max-width: 720px) {
  .plugin-form { grid-template-columns: 1fr; }
  .ext-grid { grid-template-columns: 1fr; }
}

/* ===================================================== prompt controls ===
 *
 * The control centre. Its visual job is different from the rest of the console:
 * every other page reports, this one decides. So the emphasis is on making the
 * consequence of each control visible next to the control itself — the effective
 * action beside each data type, the counts in the status strip, and an
 * unmissable difference between "saved" and "in force".
 */

.ctl-status {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 1.4rem;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.1rem;
  margin-bottom: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.ctl-status-main { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ctl-status-counts { font-size: .85rem; color: var(--muted); }
.ctl-status-counts b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ctl-status-side { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .82rem; }
.ctl-warn { color: var(--amber); font-weight: 500; }
.ctl-ok { color: var(--green); font-weight: 500; }

/* Posture */
.ctl-modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .7rem;
  margin-bottom: 1.1rem;
}
.ctl-mode {
  text-align: left;
  padding: .85rem .95rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--ink-2);
  cursor: pointer;
  font: inherit;
}
.ctl-mode:hover { border-color: var(--line-2); }
.ctl-mode.on { border-color: var(--teal); background: var(--teal-dim); color: var(--ink); }
.ctl-mode:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.ctl-mode-title { font-weight: 600; font-size: .92rem; margin-bottom: .25rem; }
.ctl-mode-sub { font-size: .78rem; color: var(--muted); line-height: 1.45; }

.ctl-threshold {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.ctl-threshold .sel { width: 100%; }
/* In card 3 the default leads the list it applies to: ruled off below, not above. */
.ctl-threshold.ctl-default {
  padding-top: 0;
  border-top: 0;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

/* Data types */
.ctl-toolbar { flex-wrap: wrap; }
.ctl-bulk { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-left: auto; font-size: .8rem; }

.ctl-group { margin-bottom: 1.2rem; }
.ctl-group-head h3 {
  margin: 0 0 .45rem;
  font-size: .74rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.ctl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  padding: .7rem .2rem;
  border-bottom: 1px solid var(--line);
}
.ctl-row:last-child { border-bottom: none; }
.ctl-row-main { min-width: 0; }
.ctl-row-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ctl-row-label { font-weight: 500; color: var(--ink); font-size: .9rem; }
.ctl-row-blurb { margin: .25rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.5; max-width: 72ch; }
.ctl-row-foot { display: flex; align-items: center; gap: .8rem; margin-top: .35rem; flex-wrap: wrap; }
.ctl-sample {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: .76rem;
  color: var(--teal);
  cursor: pointer;
  text-decoration: underline dotted;
}
.ctl-sample:hover { color: var(--ink); }
.ctl-detectors { font-size: .7rem; opacity: .65; }
.ctl-row-action { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.ctl-action { min-width: 9.5rem; }
.ctl-effect { display: flex; align-items: center; gap: .3rem; font-size: .74rem; }

/* Scope */
.ctl-scope { display: flex; flex-direction: column; gap: .9rem; }
.ctl-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem; align-items: start; cursor: pointer; }
.ctl-check input { margin-top: .25rem; accent-color: var(--teal); }
.ctl-check b { display: block; font-size: .88rem; font-weight: 500; color: var(--ink); }
.ctl-check em { display: block; font-style: normal; font-size: .78rem; color: var(--muted); margin-top: .15rem; line-height: 1.45; }

/* AI apps (card 2) */
.ctl-app-modes { margin-bottom: .9rem; }
.ctl-app-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.ctl-app-groupctl { display: flex; align-items: center; gap: .35rem; margin-left: auto; font-size: .78rem; }
.ctl-app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .45rem; }
.ctl-app {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .55rem; align-items: start;
  padding: .55rem .65rem; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
}
.ctl-app:hover { border-color: var(--line-2); }
.ctl-app:has(input:checked) { border-color: var(--teal); background: var(--teal-dim); }
.ctl-app.off { cursor: default; opacity: .7; }
.ctl-app input { margin-top: .2rem; accent-color: var(--teal); }
.ctl-app-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.ctl-app-label { font-size: .86rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.ctl-app-meta { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; font-size: .72rem; }
.ctl-app-note { font-size: .72rem; line-height: 1.4; }
p.ctl-app-note { margin: 0 0 .6rem; font-size: .8rem; }
.ctl-suspects { margin: 0 0 1rem; }
.ctl-suspects-none { margin: 0; font-size: .8rem; }
.ctl-suspect { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .45rem 0; border-bottom: 1px solid var(--line); font-size: .82rem; }
.ctl-suspect-host { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.ctl-suspect .chip { margin-left: auto; }

/* Impact */
.ctl-impact-lead { margin: 0 0 .9rem; font-size: .88rem; color: var(--ink-2); }
.ctl-impact-lead b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ctl-impact-bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .7rem; }
.ctl-impact-bar { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: .75rem .9rem; }
.ctl-impact-n { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ctl-impact-n.red { color: var(--red); }
.ctl-impact-n.violet { color: var(--violet); }
.ctl-impact-n.amber { color: var(--amber); }
.ctl-impact-n.grey { color: var(--muted); }
.ctl-impact-k { font-size: .76rem; color: var(--muted); margin-top: .2rem; }
.ctl-drivers { margin-top: 1.1rem; }
.ctl-driver { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; font-size: .82rem; border-bottom: 1px solid var(--line); }
.ctl-driver:last-child { border-bottom: none; }
.ctl-driver-label { flex: 1; color: var(--ink-2); }
.ctl-driver b { font-variant-numeric: tabular-nums; }
.ctl-basis { margin: .9rem 0 0; font-size: .74rem; line-height: 1.5; }

/* Publish */
.ctl-diff { margin-bottom: 1rem; }
.ctl-changes { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.ctl-changes li { font-size: .84rem; }
.ctl-change-label { color: var(--ink); }
.btn-ghost {
  padding: .5rem .9rem;
  background: var(--raised);
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.btn-ghost:hover:not(:disabled) { color: var(--ink); border-color: var(--teal); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost.sm { padding: .3rem .6rem; font-size: .78rem; }
/* Destructive actions (Remove device). Red at rest so it is never mistaken for
   a neutral control, and the click still asks for confirmation. */
.btn-ghost.danger { color: var(--red); border-color: var(--red-dim); }
.btn-ghost.danger:hover:not(:disabled) { color: var(--red); border-color: var(--red); }
.device-actions { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .2rem; flex-wrap: wrap; }

/* ---------------------- intune ---------------------------------------- */
.field select {
  background: var(--sunk); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  color: var(--ink); padding: .5rem .6rem; font: inherit; font-size: .86rem;
}
.check-row { display: flex; flex-wrap: wrap; gap: 1.1rem; font-size: .86rem; color: var(--ink-2); margin-top: .2rem; }
.check-row label { display: flex; align-items: center; gap: .4rem; white-space: nowrap; }
/* .field input styles text boxes full-width; a checkbox must keep its own size. */
.field .check-row input[type="checkbox"], .intune-group input[type="checkbox"] { width: auto; padding: 0; margin: 0; flex: none; }
.intune-groups { display: flex; flex-direction: column; gap: .25rem; margin-top: .4rem; max-height: 220px; overflow-y: auto; }
.intune-groups:empty { display: none; }
.intune-group {
  display: flex; align-items: center; gap: .55rem; padding: .4rem .55rem; border-radius: var(--r-sm);
  background: var(--panel-2); border: 1px solid var(--line); font-size: .85rem; cursor: pointer;
}
.intune-group:hover { border-color: var(--teal); }
.intune-selected { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.intune-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .4rem; }
.intune-feature { padding: .7rem .8rem; margin-top: .5rem; border-radius: var(--r-sm); background: var(--panel-2); border: 1px solid var(--line); }
.intune-feature-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.intune-feature p { margin: .3rem 0; }
.form-msg.bad { color: var(--red); }
.ctl-active-row td { background: var(--green-dim); }

@media (max-width: 760px) {
  .ctl-threshold { grid-template-columns: minmax(0, 1fr); }
  .ctl-row { grid-template-columns: minmax(0, 1fr); }
  .ctl-row-action { align-items: flex-start; }
  .ctl-bulk { margin-left: 0; }
}
.ctl-caveat { color: var(--amber); font-weight: 500; }

/* =====================================================================
 * Zenstra AI — enterprise layer (2026-11-20).
 *
 * Kept as one block after every component rule so the rebrand reads as a
 * single, reviewable change: a navy navigation rail with SVG icons, a page
 * header with a rule under it, softer elevated cards, sans-serif table and
 * label type, rounded pills, and the brand blue on every primary action.
 * ===================================================================== */

body { background: var(--bg); font-size: 14px; letter-spacing: -.003em; }
h1 { font-size: 1.55rem; font-weight: 650; letter-spacing: -.02em; }
h2 { font-size: 1rem; font-weight: 600; }

/* ---------- navigation rail ---------- */
.sidebar {
  width: 248px; flex-basis: 248px; border-right: none;
  background: linear-gradient(180deg, var(--rail) 0%, var(--rail-2) 100%);
  color: var(--rail-ink);
}
.logo { padding: 1.2rem 1.25rem 1.15rem; border-bottom: 1px solid var(--rail-line); gap: .75rem; }
.logo-mark-img { width: 30px; height: auto; display: block; flex: 0 0 auto; }
.logo-text { display: flex; flex-direction: column; gap: .42rem; min-width: 0; }
.logo-word { width: 140px; height: auto; display: block; }
.logo-sub { color: var(--brand-2); font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

.nav { padding: 1rem .75rem; gap: 3px; }
.nav-label {
  font-size: .64rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rail-muted); opacity: .8; padding: .9rem .75rem .35rem;
}
.nav-label:first-child { padding-top: .1rem; }
.nav-item {
  position: relative; color: var(--rail-ink); font-size: .9rem;
  padding: .58rem .75rem; border-radius: 8px; gap: .75rem;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(11,110,230,.34), rgba(11,110,230,.1));
  color: #fff; font-weight: 600;
}
.nav-item.active::before {
  content: ''; position: absolute; left: -.75rem; top: .5rem; bottom: .5rem;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-2);
}
.nav-ico { display: inline-flex; width: 18px; height: 18px; color: var(--rail-muted); opacity: 1; flex: 0 0 auto; }
.nav-ico svg { width: 18px; height: 18px; }
.nav-item:hover .nav-ico, .nav-item.active .nav-ico { color: #fff; }
.nav-badge {
  font-family: var(--sans); font-weight: 600; font-size: .68rem;
  background: rgba(255,255,255,.09); color: var(--rail-ink); padding: .08rem .45rem; border-radius: 999px;
}
.nav-badge:empty { display: none; }
.nav-badge.alarm { background: rgba(242,109,109,.22); color: #ffc2c2; }
.nav-badge.notice { background: rgba(240,180,41,.2); color: #ffd98a; }

.sidebar-foot { border-top: 1px solid var(--rail-line); padding: 1rem 1.25rem; }
.conn { color: var(--rail-ink); font-size: .78rem; }
.conn-dot { box-shadow: 0 0 0 3px rgba(62,207,142,.18); }
.conn.bad { color: #ffb0b0; }
.conn-meta { color: var(--rail-muted); }
.conn-meta:empty { display: none; }

/* ---------- work area ---------- */
.content { padding: 1.7rem 2.2rem 4rem; }
.page-head {
  align-items: center; padding-bottom: 1.1rem; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.page-sub { font-size: .9rem; margin-top: .3rem; }

.card { border-radius: var(--r); padding: 1.2rem 1.35rem; margin-bottom: 1.15rem; box-shadow: var(--shadow-sm); }
.card-head { margin-bottom: 1rem; }
.card-note { font-size: .76rem; color: var(--muted); }
.grid-2 { gap: 1.15rem; }

.kpi-row { gap: 1rem; margin-bottom: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { border-radius: var(--r); padding: 1.05rem 1.15rem 1rem; box-shadow: var(--shadow-sm); }
.kpi::after { inset: 0 0 auto 0; width: auto; height: 3px; }
.kpi-n { font-size: 1.9rem; font-weight: 700; }
.kpi-k { font-size: .72rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; margin-top: .35rem; }

/* ---------- tables ---------- */
.table-wrap { border-radius: var(--r-sm); }
.tbl { font-size: .875rem; }
.tbl th {
  font-family: var(--sans); font-weight: 600; font-size: .7rem; letter-spacing: .06em;
  color: var(--muted); background: var(--panel-2); padding: .65rem .8rem;
}
.tbl td { padding: .72rem .8rem; }
.tbl tbody tr.click:hover { background: var(--teal-dim); }

/* ---------- pills, chips, inputs, buttons ---------- */
.pill {
  font-family: var(--sans); font-weight: 600; font-size: .66rem; letter-spacing: .04em;
  border-radius: 999px; padding: .16rem .55rem;
}
.chip[data-on="true"] { background: var(--teal-dim); border-color: var(--teal); color: var(--teal); }
.search input, .sel, .field input, .field textarea, .field select, .gate-input {
  border-radius: var(--r-sm); background: var(--panel);
}
.search input:focus, .sel:focus, .field input:focus, .field textarea:focus, .gate-input:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim);
}
.btn-primary {
  background: var(--brand); color: var(--on-brand);
  border-radius: var(--r-sm); min-height: 2.3rem; box-shadow: 0 1px 2px rgba(16,24,40,.12);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-radius: var(--r-sm); background: var(--panel); }
.btn-ghost:hover:not(:disabled) { border-color: var(--teal); color: var(--teal); }

/* ---------- devices, drawer, misc ---------- */
.dev { border-radius: var(--r); box-shadow: var(--shadow-sm); transition: border-color .14s, box-shadow .14s, transform .14s; }
.dev:hover { box-shadow: var(--shadow-md); }
.drawer { border-left: 1px solid var(--line); }
.drawer-head { padding: 1.15rem 1.35rem; }
.section-label { font-family: var(--sans); font-weight: 600; color: var(--muted); }
.scrim { background: rgba(10, 18, 36, .45); backdrop-filter: blur(2px); }
.banner { border-radius: var(--r-sm); }
.toast { box-shadow: var(--shadow-md); }
.ctl-status { box-shadow: var(--shadow-sm); }
.ctl-mode.on { box-shadow: 0 0 0 1px var(--teal) inset; }

/* ---------- sign-in gate ---------- */
/* The sign-in gate mirrors the Zenstra AI login page: navy ground, white card. */
.gate { background: radial-gradient(1100px 600px at 15% 0%, rgba(11,110,230,.22), transparent 60%), var(--rail); }
.gate-card { border-radius: 16px; padding: 2.2rem 2.4rem; background: #fff; color: #0f172a; border: none; }
.gate-card .muted { color: #5b6b82; }
.gate-card h2 { color: #0f172a; font-size: 1.15rem; margin-top: .9rem; }
.gate-mark-img { width: 44px; height: auto; display: block; margin: 0 auto .7rem; }
.gate-word { width: 200px; height: auto; display: block; margin: 0 auto; }
.gate-card .gate-input { background: #fff; color: #0f172a; border-color: #d3dbe7; }

@media (max-width: 860px) {
  .sidebar { width: 100%; flex: none; }
  .nav-label { display: none; }
  .nav-item.active::before { display: none; }
  .content { padding: 1rem; }
}
