/* =========================================================================
   Observatório SAGASP — telas de acesso (servicos/acesso/telas)
   Direção aprovada: docs/superpowers/specs/2026-10-14-login-visual.md
   ("Ledger institucional SAGASP"); base = estilo.css da maquete aprovada.
   Só modo claro: o produto não tem modo escuro.
   Mobile-first. Sem estilo inline, sem <style>, sem <script> (CSP default-src 'self').
   ========================================================================= */

/* fontes auto-hospedadas (OFL; origem e sha256 em fontes/LEIA-ME.md) */
@font-face {
  font-family: "DM Sans";
  src: url("fontes/dm-sans-variavel.woff2") format("woff2");
  font-weight: 100 1000; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fontes/fraunces-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  /* superfícies — produto */
  --ink: #060d1c;  --band: #081120;  --paper: #f4f2ea;  --surface: #ffffff;
  /* texto — contraste medido no papel / no branco */
  --text: #12203a;
  --text-muted: #5b6472;
  --on-band: #e8eefb;  --on-band-muted: #93a6c7;
  /* linhas */
  --line: #e6e1d3;  --line-soft: #f0ede4;
  --line-band: rgba(255, 255, 255, .08);
  --control-border: #7d8594;
  /* ação — papel único */
  --brand: #033295;  --brand-hover: #022466;  --brand-tint: #e7eefb;
  --nav-active: #2f66d6;
  /* trigo */
  --wheat: #e6b84a;
  --wheat-text: #8a6514;
  /* semântica, texto escurecido para AA */
  --danger: #a83a2a;  --danger-hover: #8c2f22;  --danger-bg: #fbe9e5;
  --ok-text: #1f7a4d; --ok-bg: #e6f4ec;
  --warn-text: #8a5a12; --warn-bg: #fbf3e2;
  --silver-bg: #eef0f4;
  --row-hover: #faf9f4;
  /* tipografia */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fs-eyebrow: 11px;  --fs-small: 12.5px;  --fs-body: 14.5px;  --fs-input: 16px;
  --fs-section: 19px;  --fs-title: 27px;
  --tracking-caps: .12em;
  /* forma */
  --radius-control: 8px;  --radius-panel: 14px;  --radius-plate: 10px;  --radius-pill: 999px;
  --shadow-panel: 0 1px 2px rgba(18, 32, 58, .04), 0 8px 24px rgba(18, 32, 58, .06);
  /* ritmo */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 28px; --space-7: 40px;
  --gutter: 16px;  --form-max: 400px;  --touch: 44px;
  --sidebar-w: 266px;
  --focus: 2px solid var(--brand);  --focus-on-band: 2px solid var(--wheat);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
::selection { background: var(--wheat); color: var(--ink); }
:focus-visible { outline: var(--focus); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--surface); color: var(--brand); padding: 10px 14px;
  border-radius: var(--radius-control); font-weight: 600;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- tipografia de papel ---------- */
.eyebrow {
  font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 500;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--wheat-text);
}
.title {
  font-family: var(--font-title); font-weight: 500; font-size: 24px;
  letter-spacing: -.02em; line-height: 1.2; color: var(--text); margin-top: 6px;
}
.section-title {
  font-family: var(--font-title); font-weight: 500; font-size: var(--fs-section);
  letter-spacing: -.01em; line-height: 1.3;
}
.lead { color: var(--text-muted); margin-top: var(--space-2); }
.lead strong { color: var(--text); font-weight: 600; }
.muted { color: var(--text-muted); }
.small { font-size: var(--fs-small); }

/* ---------- faixa (telas de entrada) ---------- */
.auth { display: flex; flex-direction: column; }
.band { background: var(--band); color: var(--on-band); border-bottom: 1px solid var(--line-band); }
.band__inner { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: 10px var(--gutter); }
.band :focus-visible { outline: var(--focus-on-band); }
.plate {
  display: flex; align-items: center; flex-shrink: 0;
  height: 38px; padding: 6px 8px; background: #fff; border-radius: var(--radius-plate);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .3);
}
.plate img { height: 100%; width: auto; }
.band__title { font-weight: 600; font-size: 14px; letter-spacing: -.01em; line-height: 1.25; }
.band__eyebrow {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--wheat); margin-top: 2px;
}
.band__foot { display: none; }

.auth__main { flex: 1; min-width: 0; max-width: 100%; padding: var(--space-5) var(--gutter) var(--space-7); }

/* painel: contêiner do formulário (único card justificado) */
.panel {
  max-width: var(--form-max);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-panel); box-shadow: var(--shadow-panel);
  padding: var(--space-5) var(--space-4) var(--space-6);
}
.panel--wide { max-width: 640px; }
.panel__foot {
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--line-soft); font-size: var(--fs-small); color: var(--text-muted);
}

/* ---------- formulário ---------- */
.form { margin-top: var(--space-2); }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: var(--space-5); }
.field__label { font-weight: 600; font-size: 13.5px; }
.field__hint { font-size: var(--fs-small); color: var(--text-muted); }
.field__error {
  color: var(--danger); font-size: 13px; font-weight: 500;
  background: var(--danger-bg); border-radius: 6px; padding: 8px 10px;
}
.input, .select {
  width: 100%; min-height: var(--touch);
  font: inherit; font-size: var(--fs-input); color: var(--text);
  background: var(--surface); border: 1px solid var(--control-border);
  border-radius: var(--radius-control); padding: 10px 12px;
}
.input:focus-visible, .select:focus-visible { outline: var(--focus); outline-offset: 1px; border-color: var(--brand); }
.input[aria-invalid="true"] { border: 2px solid var(--danger); padding: 9px 11px; }
.input[readonly] { background: var(--paper); }
.input--code {
  font-family: var(--font-mono); font-size: 22px; letter-spacing: .35em;
  max-width: 220px; padding-left: 14px;
}
.input--mono { font-family: var(--font-mono); font-size: 15px; }
.select, .input[type="date"] { height: var(--touch); padding-top: 0; padding-bottom: 0; }
.select { padding-right: 32px; }

.check { display: flex; align-items: flex-start; gap: 10px; margin-top: var(--space-5); min-height: var(--touch); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.check span { font-weight: 600; }

.radio-list { display: grid; gap: var(--space-2); border: 0; margin: var(--space-5) 0 0; padding: 0; }
.radio-list legend { font-weight: 600; font-size: 13.5px; padding: 0; margin-bottom: 6px; }
.radio {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--control-border); border-radius: var(--radius-control);
  background: var(--surface); cursor: pointer;
}
.radio input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex-shrink: 0; }
.radio strong { display: block; font-weight: 600; }
.radio small { display: block; color: var(--text-muted); font-size: var(--fs-small); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.actions--stack { flex-direction: column; align-items: stretch; }
.links { display: flex; flex-direction: column; gap: 2px; margin-top: var(--space-4); }
.links a, .link-touch { display: inline-flex; align-items: center; min-height: var(--touch); }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 18px;
  font: inherit; font-size: var(--fs-body); font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--radius-control);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--control-border); }
.btn--secondary:hover { background: var(--row-hover); color: var(--text); }
.btn--danger { background: var(--danger); color: #fff; white-space: normal; text-align: center; }
.btn--danger:hover { background: var(--danger-hover); color: #fff; }
/* confirmação de admin: Cancelar é o destaque; o destrutivo fica com contorno vermelho */
.btn--danger-quiet { background: var(--surface); color: var(--danger); border-color: var(--danger); white-space: normal; text-align: center; }
.btn--danger-quiet:hover { background: var(--danger-bg); color: var(--danger-hover); }
.btn--block { width: 100%; }
.btn--compact { padding: 8px 14px; font-size: 13.5px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- pílula de conta ---------- */
.account-pill {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  margin-top: var(--space-4); padding: 6px 14px 6px 6px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-pill);
  font-size: 13.5px; overflow-wrap: anywhere;
}
.account-pill__mark {
  display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px;
  border-radius: var(--radius-pill); background: var(--band); color: var(--wheat);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .04em;
}

/* ---------- blocos de aviso (N26: borda fina, fundo tingido) ---------- */
.notice {
  margin-top: var(--space-5); padding: 12px 14px;
  border: 1px solid; border-radius: var(--radius-control); font-size: 13.5px;
}
.notice__title { font-weight: 600; margin-bottom: 4px; }
.notice ul { padding-left: 18px; margin-top: 6px; display: grid; gap: 4px; }
.notice--warn { background: var(--warn-bg); border-color: rgba(138, 90, 18, .35); }
.notice--warn .notice__title { color: var(--warn-text); }
.notice--danger { background: var(--danger-bg); border-color: rgba(168, 58, 42, .35); }
.notice--danger .notice__title { color: var(--danger); }
.notice--ok { background: var(--ok-bg); border-color: rgba(31, 122, 77, .35); }
.notice--ok .notice__title { color: var(--ok-text); }
.notice--info { background: var(--brand-tint); border-color: rgba(3, 50, 149, .22); }
.notice--info .notice__title { color: var(--brand); }

/* banner pós-ação (PRG + role=status) */
.flash { margin: 0 0 var(--space-5); }
/* erro devolvido pelo servidor (role=alert) */
.notice.erro { color: var(--danger); font-weight: 500; }

/* ---------- tags ---------- */
.tag {
  display: inline-block; padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle;
}
.tag--ok { background: var(--ok-bg); color: var(--ok-text); }
.tag--warn { background: var(--warn-bg); color: var(--warn-text); }
.tag--danger { background: var(--danger-bg); color: var(--danger); }
.tag--navy { background: var(--brand-tint); color: var(--brand); }
.tag--silver { background: var(--silver-bg); color: var(--text-muted); }

/* ---------- passos do autenticador ---------- */
.steps { list-style: none; counter-reset: step; margin-top: var(--space-5); }
.steps > li { counter-increment: step; position: relative; padding: 0 0 var(--space-6) 44px; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -3px; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: var(--radius-pill);
  border: 1px solid var(--control-border); background: var(--surface);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
}
.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 15px; top: 32px; bottom: 6px; border-left: 1px solid var(--line);
}
.step__title { font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.step__text { color: var(--text-muted); margin-top: 4px; }

.totp { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
/* QR gerado pelo servidor (SVG em data:), sobre branco para a câmera ler */
.qr {
  width: 176px; height: 176px; padding: var(--space-2);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-control);
}
.secret {
  display: block; margin-top: 6px; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 15px; font-weight: 500; letter-spacing: .08em; word-spacing: .25em;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-control);
  overflow-wrap: anywhere; user-select: all;
}
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin-top: var(--space-3); font-size: var(--fs-small); }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-family: var(--font-mono); overflow-wrap: anywhere; }

.recovery-codes {
  list-style: none; counter-reset: rc; margin-top: var(--space-4);
  display: grid; grid-template-columns: 1fr; gap: 10px 16px;
  padding: var(--space-4); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-control);
  font-family: var(--font-mono); font-size: 15px; font-weight: 500; letter-spacing: .06em;
}
.recovery-codes li { counter-increment: rc; display: flex; gap: 10px; align-items: baseline; }
.recovery-codes code { font: inherit; white-space: nowrap; }  /* código inteiro numa linha */
.recovery-codes li::before {
  content: counter(rc, decimal-leading-zero); font-size: 10.5px; color: var(--text-muted); letter-spacing: 0;
}

/* ---------- link de uso único ---------- */
.one-time-link {
  display: block; margin-top: 6px; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
  background: var(--paper); border: 1px solid var(--control-border); border-radius: var(--radius-control);
  overflow-wrap: anywhere; user-select: all;
}

/* ---------- casca administrativa (sidebar do produto) ---------- */
.app { display: flex; flex-direction: column; }
.sidebar { background: var(--band); color: var(--on-band); border-bottom: 1px solid var(--line-band); }
.sidebar__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.sidebar__nav { grid-column: 1 / -1; }
.sidebar :focus-visible { outline: var(--focus-on-band); }
.sidebar__top .plate { height: 44px; }
.sidebar__top { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: 10px var(--gutter); }
.sidebar__title { font-weight: 600; font-size: 13.5px; letter-spacing: -.01em; line-height: 1.25; }
.sidebar__title span { display: block; color: var(--on-band-muted); font-weight: 400; font-size: 11.5px; margin-top: 1px; }
.sidebar__nav { padding: 0 var(--space-3) var(--space-2); }
.sidebar__group {
  display: none; font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--on-band-muted); padding: 6px 12px 8px;
}
.sidebar__list { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; }
.sidebar__item {
  display: flex; align-items: center; min-height: var(--touch); padding: 0 12px; border-radius: 9px;
  color: var(--on-band-muted); text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.sidebar__item:hover { background: rgba(255, 255, 255, .06); color: var(--on-band); }
.sidebar__item[aria-current="page"] { background: var(--nav-active); color: #fff; }
.sidebar__foot {
  grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--gutter) 10px 0; font-size: 12px; color: var(--on-band-muted);
}
.sidebar__who { display: none; min-width: 0; overflow-wrap: anywhere; }
.sidebar__who strong { display: none; color: var(--on-band); font-weight: 600; font-size: 13px; }
.sidebar__links { display: flex; align-items: center; gap: var(--space-2); }
.sidebar__links a { color: var(--on-band-muted); display: none; }
.sidebar__links a:hover { color: var(--on-band); }
.sidebar__logout {
  min-height: var(--touch); padding: 0 12px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--on-band); background: transparent; border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-control); cursor: pointer;
}
.sidebar__logout:hover { background: rgba(255, 255, 255, .06); }

.app__main { flex: 1; min-width: 0; max-width: 100%; }
.topbar { border-bottom: 1px solid var(--line); padding: var(--space-5) var(--gutter) 18px; }
.crumb {
  font-family: var(--font-mono); font-size: var(--fs-eyebrow); font-weight: 500;
  letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--wheat-text);
}
.crumb a { color: inherit; }
.topbar__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-3); }
.topbar__desc { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; max-width: 72ch; }
.content { padding: var(--space-5) var(--gutter) 64px; max-width: 1180px; }
.content--narrow { max-width: 760px; }

/* ---------- filtros (form GET) ---------- */
.filters {
  display: grid; gap: var(--space-3); margin-bottom: var(--space-4);
  padding-bottom: var(--space-4); border-bottom: 1px solid var(--line);
}
.filters .field { margin-top: 0; }
.filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.result-count { font-size: var(--fs-small); color: var(--text-muted); margin-bottom: var(--space-2); }
.result-count .mono { color: var(--text); }

/* ---------- tabela (table.data do produto) — base = blocos no celular ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 0 var(--space-4); }
.table-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) 0; border-bottom: 1px solid var(--line);
}
.table-head__title { font-weight: 600; font-size: 13.5px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data caption { text-align: left; }
table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
table.data, table.data tbody, table.data tr, table.data td { display: block; }
table.data tr { padding: var(--space-3) 0; border-bottom: 1px solid var(--line-soft); }
table.data tbody tr:last-child { border-bottom: 0; }
table.data td { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: 3px 0; overflow-wrap: anywhere; }
table.data td::before {
  content: attr(data-label); font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
table.data td.is-empty-mobile { display: none; }
table.data td > * { justify-self: start; }
table.data td.num, table.data td .ip-link { white-space: nowrap; }
.cell-name { font-weight: 600; color: var(--text); }
.cell-name small { display: block; font-weight: 400; color: var(--text-muted); font-size: var(--fs-small); }
.cell-you { font-weight: 400; color: var(--text-muted); font-size: var(--fs-small); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cell-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cell-actions form { margin: 0; }
.ip-link { font-family: var(--font-mono); }
/* aviso curto logo abaixo de um bloco (ações, lista de códigos) */
.after-note { margin-top: var(--space-3); }
/* navegador (user-agent cru): pode quebrar em qualquer ponto para a tabela caber no cartão */
table.data td.cell-ua { font-size: var(--fs-small); color: var(--text-muted); overflow-wrap: anywhere; }
.table-wrap + .settings { margin-top: var(--space-6); }

/* menu "Mais" sem JS (no celular abre na própria linha; >= 720px vira lista flutuante) */
.row-menu { position: relative; display: inline-block; }
.row-menu__list form { margin: 0; }
.row-menu__list button {
  display: flex; align-items: center; width: 100%; min-height: var(--touch); padding: 0 12px;
  font: inherit; font-size: 13.5px; color: var(--text); text-align: left;
  background: transparent; border: 0; border-radius: 6px; cursor: pointer;
}
.row-menu__list button:hover { background: var(--row-hover); }
.row-menu > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: var(--touch); padding: 0 12px; border: 1px solid var(--control-border);
  border-radius: var(--radius-control); background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer;
}
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary::after { content: "▾"; font-size: 11px; color: var(--text-muted); }
.row-menu[open] > summary { background: var(--row-hover); }
.row-menu__list {
  list-style: none; margin-top: 4px;
  padding: 6px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-panel);
}
.row-menu__list a {
  display: flex; align-items: center; min-height: var(--touch); padding: 0 12px;
  border-radius: 6px; color: var(--text); text-decoration: none; font-size: 13.5px;
}
.row-menu__list a:hover { background: var(--row-hover); }
.row-menu__list a.is-danger { color: var(--danger); font-weight: 600; }
.row-menu__list a.is-danger:hover { background: var(--danger-bg); }
.row-menu__sep { border-top: 1px solid var(--line); margin: 6px 0; }

/* paginação por link */
.pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) 0; border-top: 1px solid var(--line); font-size: 13px;
}
.pagination__links { display: flex; align-items: center; gap: var(--space-2); }
.pagination__links a, .pagination__links span[aria-disabled] {
  display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 12px;
  border: 1px solid var(--control-border); border-radius: var(--radius-control);
  text-decoration: none; font-weight: 600; color: var(--text); background: var(--surface);
}
.pagination__links span[aria-disabled] { color: var(--text-muted); border-color: var(--line); background: transparent; }

/* ---------- seções empilhadas (Minha conta) ---------- */
.settings { border-top: 1px solid var(--line); padding: var(--space-6) 0; display: grid; gap: var(--space-4); }
.settings--first { border-top: 0; padding-top: var(--space-2); }
.settings__desc { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; }
.settings__body { min-width: 0; }
.settings__body .form { max-width: var(--form-max); margin-top: 0; }
.settings__body .form .field:first-child { margin-top: 0; }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }

/* ---------- confirmação destrutiva ---------- */
.target {
  display: grid; gap: 2px; margin-top: var(--space-5); padding: var(--space-4) 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.target__name { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.target__email { font-size: 15px; overflow-wrap: anywhere; }
.target__meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: var(--fs-small); color: var(--text-muted); }
.target__meta .num { color: var(--text); }
.confirm-email { font-family: var(--font-mono); font-weight: 500; color: var(--text); overflow-wrap: anywhere; }


/* =========================================================================
   >= 720px — tabela volta a ser tabela
   ========================================================================= */
@media (min-width: 720px) {
  table.data { display: table; font-size: 12.5px; }
  table.data thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
  table.data tbody { display: table-row-group; }
  table.data tr { display: table-row; padding: 0; border-bottom: 0; }
  table.data th {
    text-align: left; font-family: var(--font-mono); font-size: 10px; font-weight: 500;
    letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
    padding: 10px 9px; border-bottom: 1px solid var(--line); white-space: nowrap;
  }
  table.data td {
    display: table-cell; padding: 8px 9px; border-bottom: 1px solid var(--line-soft); vertical-align: middle;
    overflow-wrap: normal;
  }
  table.data .link-touch { white-space: nowrap; }
  table.data td::before { content: none; }
  /* o Chrome aplica justify-self também em bloco: sem isto, .cell-actions encolhe e não alinha à direita */
  table.data td > * { justify-self: auto; }
  table.data td.is-empty-mobile { display: table-cell; }
  table.data tbody tr:last-child td { border-bottom: 0; }
  table.data tbody tr:hover { background: var(--row-hover); }
  table.data th.is-num, table.data td.is-num { text-align: right; }
  table.data th:first-child, table.data td:first-child { padding-left: 0; }
  table.data th:last-child, table.data td:last-child { padding-right: 0; }
  .table-wrap { padding: 0 var(--space-5); }
  .cell-actions { flex-wrap: nowrap; justify-content: flex-end; }
  table.data th.is-actions { text-align: right; }
  .row-menu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; margin-top: 0; min-width: 232px; }
  .row-menu__list a, .row-menu__list button { white-space: nowrap; }

  .filters { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
  .filters__actions { grid-column: 1 / -1; }
  .totp { grid-template-columns: 176px minmax(0, 1fr); align-items: start; gap: var(--space-5); }
  .recovery-codes { grid-template-columns: 1fr 1fr; }
  .panel { padding: var(--space-6) var(--space-6) var(--space-6); }
  .title { font-size: var(--fs-title); }
}

/* =========================================================================
   >= 768px — faixa vira coluna lateral nas telas de entrada
   ========================================================================= */
@media (min-width: 768px) {
  .auth { flex-direction: row; align-items: stretch; }
  .band { width: clamp(280px, 32vw, 400px); flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--line-band); }
  .band__inner {
    position: sticky; top: 0; height: 100vh;
    flex-direction: column; align-items: flex-start; gap: var(--space-5); padding: var(--space-7) 36px;
  }
  .plate { height: 52px; padding: 8px 12px; }
  .band__eyebrow { letter-spacing: var(--tracking-caps); }
  .band__title { font-size: 19px; margin-top: var(--space-2); }
  .band__eyebrow { font-size: var(--fs-eyebrow); margin-top: var(--space-2); }
  .band__foot {
    display: block; margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--line-band);
    font-size: var(--fs-small); color: var(--on-band-muted); line-height: 1.5;
  }
  .auth__main { padding: clamp(40px, 12vh, 112px) clamp(24px, 7vw, 104px) 64px; }

  .settings { grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-7); }
  .topbar { padding: var(--space-5) 32px 18px; }
  .content { padding: var(--space-6) 32px 72px; }
}

/* =========================================================================
   >= 1100px — casca administrativa ganha a sidebar fixa do produto
   ========================================================================= */
@media (min-width: 1100px) {
  .app { flex-direction: row; }
  .sidebar { width: var(--sidebar-w); flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--line-band); }
  .sidebar__inner { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
  .sidebar__top { flex-direction: column; align-items: flex-start; padding: 20px 20px 16px; border-bottom: 1px solid var(--line-band); }
  .sidebar__top .plate { height: 52px; padding: 8px 12px; }
  .sidebar__nav { padding: 12px; flex: 1; }
  .sidebar__group { display: block; margin-top: var(--space-4); }
  .sidebar__group:first-child { margin-top: 4px; }
  .sidebar__list { flex-direction: column; flex-wrap: nowrap; }
  .sidebar__foot { flex-direction: column; align-items: stretch; gap: var(--space-3); padding: 14px 20px 18px; border-top: 1px solid var(--line-band); }
  .sidebar__who { display: block; }
  .sidebar__who strong { display: block; }
  .sidebar__links { justify-content: space-between; }
  .sidebar__links a { display: inline-flex; align-items: center; min-height: var(--touch); }
  .topbar { padding: var(--space-5) 40px 18px; }
  .content { padding: var(--space-6) 40px 72px; }
}

/* ---------- movimento só para quem não pediu redução ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .sidebar__item, .row-menu > summary, .row-menu__list a, .row-menu__list button, .pagination__links a {
    transition: background-color .12s ease, color .12s ease;
  }
}

/* ---------- impressão: na página dos códigos de recuperação, só eles ---------- */
@media print {
  body:has(.recovery-print) * { visibility: hidden !important; }
  .recovery-print, .recovery-print * { visibility: visible !important; }
  .recovery-print { position: absolute; left: 0; top: 0; width: 100%; }
}
