/* ==========================================================================
   Central de Acesso — folha de estilo
   Paleta: neutros de viés aço, acento teal-petróleo, semânticas independentes
   ========================================================================== */

:root {
  /* superfícies e tinta */
  --ground: #eaeef1;
  --surface: #ffffff;
  --surface-2: #f4f7f9;
  --surface-3: #e8edf1;
  --line: #d5dde3;
  --line-strong: #bcc8d0;
  --ink: #0e181e;
  --ink-2: #4a5b65;
  --ink-3: #77878f;

  /* acento */
  --accent: #0d5c70;
  --accent-2: #0a4859;
  --accent-ink: #ffffff;
  --accent-wash: #e2eff3;
  --accent-line: #a9cbd6;

  /* semânticas (independentes do acento) */
  --ok: #1c7a4c;
  --ok-wash: #e2f2e9;
  --ok-line: #a9d6be;
  --warn: #96600a;
  --warn-wash: #fbefda;
  --warn-line: #e3c489;
  --danger: #a32318;
  --danger-wash: #fbe8e6;
  --danger-line: #e7b0aa;
  --info: #2b5ba8;
  --info-wash: #e6edf9;
  --info-line: #b1c5e6;
  --idle: #64757e;
  --idle-wash: #eceff1;
  --idle-line: #cdd5da;

  /* sinal físico do equipamento (LED verde / vermelho) */
  --led-on: #21a05c;
  --led-off: #cf3a2c;

  --shadow-1: 0 1px 2px rgba(14, 24, 30, .06), 0 1px 3px rgba(14, 24, 30, .04);
  --shadow-2: 0 8px 24px rgba(14, 24, 30, .12), 0 2px 6px rgba(14, 24, 30, .06);

  --r-sm: 4px;
  --r-md: 7px;
  --r-lg: 12px;

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --sidebar-w: 248px;
  --header-h: 60px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0b1216;
    --surface: #131c22;
    --surface-2: #18232a;
    --surface-3: #1f2c34;
    --line: #26343d;
    --line-strong: #35474f;
    --ink: #e7eef2;
    --ink-2: #a3b4bd;
    --ink-3: #7c8d97;

    --accent: #4fb3cc;
    --accent-2: #7ccbdf;
    --accent-ink: #06222c;
    --accent-wash: #123039;
    --accent-line: #22525f;

    --ok: #56c08a;
    --ok-wash: #122c20;
    --ok-line: #255c41;
    --warn: #dda54a;
    --warn-wash: #2f2512;
    --warn-line: #634c1d;
    --danger: #ef8578;
    --danger-wash: #331714;
    --danger-line: #6b2f27;
    --info: #85aae8;
    --info-wash: #16223a;
    --info-line: #2d436e;
    --idle: #92a3ac;
    --idle-wash: #1c262c;
    --idle-line: #313f47;

    --led-on: #3ecb7d;
    --led-off: #ff6a58;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #0b1216;
  --surface: #131c22;
  --surface-2: #18232a;
  --surface-3: #1f2c34;
  --line: #26343d;
  --line-strong: #35474f;
  --ink: #e7eef2;
  --ink-2: #a3b4bd;
  --ink-3: #7c8d97;

  --accent: #4fb3cc;
  --accent-2: #7ccbdf;
  --accent-ink: #06222c;
  --accent-wash: #123039;
  --accent-line: #22525f;

  --ok: #56c08a;
  --ok-wash: #122c20;
  --ok-line: #255c41;
  --warn: #dda54a;
  --warn-wash: #2f2512;
  --warn-line: #634c1d;
  --danger: #ef8578;
  --danger-wash: #331714;
  --danger-line: #6b2f27;
  --info: #85aae8;
  --info-wash: #16223a;
  --info-line: #2d436e;
  --idle: #92a3ac;
  --idle-wash: #1c262c;
  --idle-line: #313f47;

  --led-on: #3ecb7d;
  --led-off: #ff6a58;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.012em;
  text-wrap: balance;
  margin: 0;
}

a { color: var(--accent); }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --------------------------------------------------------------- esqueleto */

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

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  min-height: var(--header-h);
}

.brand-mark {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -.02em;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 14.5px;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 10.5px;
  color: var(--ink-3);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }

.nav-group-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 14px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: none;
  border-radius: var(--r-md);
  color: var(--ink-2);
  cursor: pointer;
  text-align: left;
  font-size: 13.5px;
  position: relative;
}

.nav-item:hover { background: var(--surface-2); color: var(--ink); }

.nav-item[aria-current="page"] {
  background: var(--accent-wash);
  color: var(--accent);
  font-weight: 600;
}

.nav-item svg { flex: 0 0 16px; width: 16px; height: 16px; }

.nav-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--warn-wash);
  color: var(--warn);
  border: 1px solid var(--warn-line);
  border-radius: 99px;
  padding: 0 6px;
  line-height: 16px;
}

.sidebar-foot {
  border-top: 1px solid var(--line);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--ink-2);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 12px;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  min-height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 22px;
  position: sticky;
  top: 0;
  z-index: 30;
  flex-wrap: wrap;
}

.topbar h1 { font-size: 18px; }
.topbar .crumb {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
}

.topbar-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.content { padding: 22px; flex: 1; }

.menu-toggle { display: none; }

@media (max-width: 940px) {
  .sidebar {
    position: fixed;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: var(--shadow-2);
  }
  .shell[data-nav="open"] .sidebar { transform: none; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
}

/* ----------------------------------------------------------------- botões */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 7px 13px;
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease;
}

.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-2); border-color: var(--accent-2); }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .btn-danger, :root:not([data-theme="light"]) .btn-danger { color: #2a0d0a; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .btn-danger { color: #fff; } }

.btn-ghost { border-color: transparent; background: none; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); border-color: transparent; }

.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: var(--r-sm); }
.btn-icon { padding: 6px; width: 30px; height: 30px; }

/* ----------------------------------------------------------------- cartões */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-head h2, .card-head h3 { font-size: 14px; letter-spacing: -.005em; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 16px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.grid { display: grid; gap: 16px; }

.section-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------- métricas */

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.metric {
  background: var(--surface);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  cursor: pointer;
  text-align: left;
  border: 0;
  border-left: 3px solid transparent;
  color: inherit;
  font: inherit;
}
.metric:hover { background: var(--surface-2); }
.metric[data-tone="warn"] { border-left-color: var(--warn); }
.metric[data-tone="danger"] { border-left-color: var(--danger); }
.metric[data-tone="ok"] { border-left-color: var(--ok); }
.metric[data-tone="accent"] { border-left-color: var(--accent); }

@media (max-width: 900px) { .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .metric-strip { grid-template-columns: 1fr; } }

.metric-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.metric-label {
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1.3;
}

/* ---------------------------------------------------------------- tabelas */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

table.data td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; text-align: right; }
table.data td.mono, table.data td .mono { font-family: var(--font-mono); font-size: 12px; }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data td.tight { width: 1%; white-space: nowrap; }

.cell-main { font-weight: 550; }
.cell-sub { font-size: 11.5px; color: var(--ink-3); }

.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--ink-3);
}
.empty strong { display: block; color: var(--ink-2); font-weight: 600; margin-bottom: 4px; }

/* ------------------------------------------------------------------ pills */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 550;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--idle-line);
  background: var(--idle-wash);
  color: var(--idle);
  white-space: nowrap;
  line-height: 1.5;
}
.pill[data-tone="ok"] { background: var(--ok-wash); color: var(--ok); border-color: var(--ok-line); }
.pill[data-tone="warn"] { background: var(--warn-wash); color: var(--warn); border-color: var(--warn-line); }
.pill[data-tone="danger"] { background: var(--danger-wash); color: var(--danger); border-color: var(--danger-line); }
.pill[data-tone="info"] { background: var(--info-wash); color: var(--info); border-color: var(--info-line); }
.pill[data-tone="accent"] { background: var(--accent-wash); color: var(--accent); border-color: var(--accent-line); }

.pill::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 99px;
  background: currentColor;
  flex: 0 0 5px;
}
.pill.no-dot::before { display: none; }

.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* LED do equipamento — eco do retorno visual do próprio controlador */
.led {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-2);
}
.led i {
  width: 8px; height: 8px; border-radius: 99px;
  background: var(--led-off);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--led-off) 22%, transparent);
  flex: 0 0 8px;
}
.led[data-on="1"] i { background: var(--led-on); box-shadow: 0 0 0 2px color-mix(in srgb, var(--led-on) 22%, transparent); }

/* ------------------------------------------------------------ formulários */

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.field > label {
  font-size: 12px;
  font-weight: 550;
  color: var(--ink-2);
}
.field .hint { font-size: 11.5px; color: var(--ink-3); }
.field .err { font-size: 11.5px; color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 7px 10px;
  font-size: 13.5px;
  min-width: 0;
}
.textarea { resize: vertical; min-height: 64px; font-family: inherit; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-wash); outline-offset: 0; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--ink-3); }
.input.mono { font-family: var(--font-mono); letter-spacing: .04em; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid .span-2 { grid-column: span 1; } }

.fieldset {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  margin: 0;
}
.fieldset > legend {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 6px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  background: var(--surface);
}
.check:hover { background: var(--surface-2); }
.check input { margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.check[data-checked="1"] { border-color: var(--accent-line); background: var(--accent-wash); }
.check .ck-main { font-weight: 550; font-size: 13px; display: block; }
.check .ck-sub { font-size: 11.5px; color: var(--ink-3); display: block; margin-top: 1px; }
.check.disabled { opacity: .55; cursor: not-allowed; }

.filters {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filters .field { flex: 1 1 150px; max-width: 230px; }
.filters .field.search { flex: 2 1 220px; max-width: 340px; }

/* ------------------------------------------------------------------ modal */

.modal-scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 16, 20, .55);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  width: 100%;
  max-width: 640px;
  margin: auto;
}
.modal.wide { max-width: 920px; }
.modal.narrow { max-width: 440px; }

.modal-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-head h2 { font-size: 16px; }
.modal-head .sub { font-size: 12px; color: var(--ink-3); }
.modal-body { padding: 18px; }
.modal-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: var(--surface-2);
}
.modal-foot .left { margin-right: auto; }

/* ------------------------------------------------------------------ toast */

.toasts {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 36px));
}

.toast {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  padding: 11px 14px;
  font-size: 13px;
}
.toast[data-tone="ok"] { border-left-color: var(--ok); }
.toast[data-tone="danger"] { border-left-color: var(--danger); }
.toast[data-tone="warn"] { border-left-color: var(--warn); }
.toast strong { display: block; font-size: 12.5px; margin-bottom: 2px; }

/* ------------------------------------------------------------------ notas */

.note {
  display: flex;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--info-line);
  background: var(--info-wash);
  color: var(--info);
  font-size: 12.5px;
  line-height: 1.45;
}
.note[data-tone="warn"] { border-color: var(--warn-line); background: var(--warn-wash); color: var(--warn); }
.note[data-tone="danger"] { border-color: var(--danger-line); background: var(--danger-wash); color: var(--danger); }
.note[data-tone="ok"] { border-color: var(--ok-line); background: var(--ok-wash); color: var(--ok); }
.note strong { font-weight: 650; }
.note .note-body { min-width: 0; }

/* ------------------------------------------------------------------ abas */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.tab {
  border: 0;
  background: none;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-2);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ------------------------------------------------------- lista descritiva */

.dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 13px 18px;
}
.dl > div { min-width: 0; }
.dl dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.dl dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; }

/* -------------------------------------------------------- barra / gráfico */

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-track { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 99px; }
.bar-row .n { font-variant-numeric: tabular-nums; color: var(--ink-2); font-family: var(--font-mono); font-size: 11.5px; }

/* ------------------------------------------------------------ passo a passo */

.steps { counter-reset: step; display: flex; flex-direction: column; gap: 0; }
.step {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.step:last-child { border-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 11px;
  width: 22px; height: 22px;
  border-radius: 99px;
  background: var(--accent-wash);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 600;
}
.kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--surface);
  margin: 0 1px;
}

/* ------------------------------------------------------------------ login */

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1100px 520px at 50% -10%, var(--accent-wash), transparent 65%),
    var(--ground);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.login-head { padding: 26px 26px 6px; }
.login-head .brand-mark { width: 38px; height: 38px; flex-basis: 38px; font-size: 15px; margin-bottom: 14px; }
.login-head h1 { font-size: 21px; }
.login-head p { color: var(--ink-2); font-size: 13px; margin: 6px 0 0; }
.login-body { padding: 18px 26px 26px; display: flex; flex-direction: column; gap: 14px; }
.login-foot {
  padding: 13px 26px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: .04em;
}

/* ----------------------------------------------------------------- utils */

.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }
.scroll-y { max-height: 340px; overflow-y: auto; }
.sep { height: 1px; background: var(--line); border: 0; margin: 0; }
.divider-v { width: 1px; background: var(--line); align-self: stretch; }

.spinner {
  width: 15px; height: 15px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 99px;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
}

.op-target {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.report-layout {
  display: grid;
  grid-template-columns: minmax(210px, 250px) 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 820px) { .report-layout { grid-template-columns: 1fr; } }

@media print {
  .sidebar, .topbar-actions, .btn, .filters { display: none !important; }
  body { background: #fff; }
  .card { break-inside: avoid; }
}
