/* Escalas — tokens. GERADO por scripts/build.mjs a partir de tokens/tokens.json; não edite à mão. */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e5e8ee;
  --border-strong: #d4d9e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --subtle: #94a3b8;
  --neutral-soft: #f1f5f9;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff4ff;
  --primary-border: #d6e3ff;
  --primary-ring: rgba(37, 99, 235, 0.18);
  --on-primary: #ffffff;
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --ok-border: #c7ecd5;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --bad-border: #f6d0d0;
  --danger-border: #f3c7c7;
  --warn: #a16207;
  --warn-soft: #fefce8;
  --warn-border: #f5dca8;
  --tooltip: #1e293b;
  --font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-label: 550;
  --font-weight-semibold: 600;
  --font-weight-heading: 650;
  --font-weight-bold: 700;
  --font-size-2xs: 0.72rem;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.82rem;
  --font-size-md: 0.88rem;
  --font-size-control: 0.92rem;
  --font-size-base: 15px;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.35rem;
  --font-size-2xl: 1.6rem;
  --font-line-height-tight: 1.2;
  --font-line-height-heading: 1.25;
  --font-line-height-body: 1.5;
  --font-letter-spacing-heading: -0.01em;
  --font-letter-spacing-overline: 0.06em;
  --font-letter-spacing-table-head: 0.04em;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-1-5: 6px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-tile: 10px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-card: 0px 1px 2px 0px rgba(15, 23, 42, 0.04);
  --shadow-popover: 0px 8px 24px 0px rgba(15, 23, 42, 0.08);
  --shadow-focus: 0px 0px 0px 3px var(--primary-ring);
  --duration-fast: 150ms;
  --duration-spin: 800ms;
  --size-control: 42px;
  --size-control-sm: 32px;
  --size-icon-btn: 34px;
  --size-icon: 18px;
  --size-avatar: 32px;
  --size-topbar: 56px;
  --size-sidebar: 232px;
  --size-content: 960px;
  --size-content-wide: 1180px;
  --size-content-narrow: 420px;

  /* apelidos usados pelo app (apps/web/public/css/app.css) */
  --radius: var(--radius-md);
  --shadow: var(--shadow-card);
  --topbar-h: var(--size-topbar);
  --sidebar-w: var(--size-sidebar);
  color-scheme: light;
}

/* estilos de texto (tokens "typography") */
.text-h1 { font-family: var(--font-family-sans); font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); line-height: var(--font-line-height-heading); letter-spacing: var(--font-letter-spacing-heading); }
.text-h2 { font-family: var(--font-family-sans); font-size: var(--font-size-lg); font-weight: var(--font-weight-heading); line-height: var(--font-line-height-heading); letter-spacing: var(--font-letter-spacing-heading); }
.text-h3 { font-family: var(--font-family-sans); font-size: 0.95rem; font-weight: var(--font-weight-heading); line-height: var(--font-line-height-heading); letter-spacing: var(--font-letter-spacing-heading); }
.text-body { font-family: var(--font-family-sans); font-size: var(--font-size-base); font-weight: var(--font-weight-regular); line-height: var(--font-line-height-body); letter-spacing: 0em; }
.text-label { font-family: var(--font-family-sans); font-size: var(--font-size-md); font-weight: var(--font-weight-label); line-height: var(--font-line-height-body); letter-spacing: 0em; }
.text-button { font-family: var(--font-family-sans); font-size: var(--font-size-control); font-weight: var(--font-weight-semibold); line-height: var(--font-line-height-body); letter-spacing: 0em; }
.text-caption { font-family: var(--font-family-sans); font-size: var(--font-size-sm); font-weight: var(--font-weight-regular); line-height: var(--font-line-height-body); letter-spacing: 0em; }
.text-overline { font-family: var(--font-family-sans); font-size: var(--font-size-2xs); font-weight: var(--font-weight-semibold); line-height: var(--font-line-height-body); letter-spacing: var(--font-letter-spacing-overline); text-transform: uppercase; }
.text-stat { font-family: var(--font-family-sans); font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); line-height: var(--font-line-height-tight); letter-spacing: 0em; }

/* breakpoints (não viram variável: @media não aceita var())
   sm: 640px — Campos lado a lado
   md: 720px — Estatísticas em 4 colunas
   lg: 900px — Menu lateral substitui a barra inferior
   xl: 1400px
*/
/* Escalas — base: reset, tipografia e elementos nativos (campos, botões, tabelas).
   Estiliza tags direto (button, input, table…), como o app. Requer tokens.css. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--font-size-base)/var(--font-line-height-body) var(--font-family-sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .75rem; }
h1, h2, h3 { margin: 0 0 .75rem; line-height: var(--font-line-height-heading); letter-spacing: var(--font-letter-spacing-heading); text-wrap: balance; }
h1 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); color: var(--primary); }
h2 { font-size: var(--font-size-lg); font-weight: var(--font-weight-heading); margin-top: 1.75rem; }
h3 { font-size: .95rem; font-weight: var(--font-weight-heading); }
ul, ol { padding-left: 1.2rem; margin: 0 0 .75rem; }
small, .muted { color: var(--muted); font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
code { font-family: var(--font-family-mono); font-size: .9em; letter-spacing: .04em; }
.icon { flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

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

form { margin: 0; }
label { display: block; font-size: var(--font-size-md); font-weight: var(--font-weight-label); color: var(--text-2); margin-bottom: 1rem; }
label > input, label > select, label > textarea { margin-top: .35rem; }
label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: .55rem; font-weight: var(--font-weight-medium); }
input, select, textarea {
  display: block; width: 100%; min-height: var(--size-control);
  padding: .55rem .75rem; font: inherit; font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
select {
  appearance: none; padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
input[type="checkbox"], input[type="radio"] { display: inline-block; width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--primary); }
input[type="checkbox"][role="switch"] {
  appearance: none; width: 38px; height: 22px; border-radius: var(--radius-pill); background: var(--border-strong);
  border: 0; position: relative; cursor: pointer; transition: background var(--duration-fast);
}
input[type="checkbox"][role="switch"]::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); transition: transform var(--duration-fast); box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}
input[type="checkbox"][role="switch"]:checked { background: var(--primary); }
input[type="checkbox"][role="switch"]:checked::after { transform: translateX(16px); }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-size: var(--font-size-md); font-weight: var(--font-weight-label); color: var(--text-2); margin-bottom: .45rem; padding: 0; }
fieldset label { margin: 0; }
.field-hint { display: block; margin-top: .35rem; font-size: .8rem; color: var(--muted); font-weight: var(--font-weight-regular); }

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

button, [role="button"], .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: var(--size-control); padding: .55rem 1.1rem;
  font: inherit; font-size: var(--font-size-control); font-weight: var(--font-weight-semibold);
  color: var(--on-primary); background: var(--primary); border: 1px solid var(--primary); border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none; transition: background var(--duration-fast), border-color var(--duration-fast);
}
button:hover, [role="button"]:hover, .btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); text-decoration: none; }
button:focus-visible, [role="button"]:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

.secondary, .outline { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.secondary:hover, .outline:hover { background: var(--surface-2); border-color: var(--border-strong); }
.outline:not(.secondary) { color: var(--primary); }
.danger { background: var(--surface); color: var(--bad); border-color: var(--danger-border); }
.danger:hover { background: var(--bad-soft); border-color: var(--danger-border); }
.mini { min-height: var(--size-control-sm); padding: .3rem .7rem; font-size: var(--font-size-sm); }
.icon-btn { min-height: var(--size-icon-btn); width: var(--size-icon-btn); padding: 0; background: transparent; border-color: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--surface-2); color: var(--bad); border-color: transparent; }
.link { min-height: 0; padding: 0; background: none; border: 0; color: var(--primary); font-weight: var(--font-weight-medium); }
.link:hover { background: none; text-decoration: underline; }
.ghost { background: transparent; border-color: transparent; color: var(--primary); padding-left: .4rem; padding-right: .4rem; }
.ghost:hover { background: var(--primary-soft); border-color: transparent; }

/* ---------- tabelas e blocos ---------- */

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: var(--font-size-md); }
th, td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th {
  font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--muted);
  text-transform: uppercase; letter-spacing: var(--font-letter-spacing-table-head); background: var(--surface-2); white-space: nowrap;
}
tbody tr:last-child > * { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

details { margin: 0 0 12px; }
details > summary { cursor: pointer; }
pre { white-space: pre-wrap; word-break: break-word; font-family: var(--font-family-mono); font-size: .8rem; max-height: 24rem; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; }
/* Escalas — componentes. Requer tokens.css e base.css.
   Mobile-first: no celular, barra inferior de abas; a partir de 900px, menu lateral fixo. */

/* ---------- moldura: topo, menu lateral, conteúdo, barra inferior ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--size-topbar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: var(--font-weight-bold); font-size: 1.05rem; color: var(--text); }
.brand:hover { text-decoration: none; }
/* marca: quadrado azul com um anel branco interno (alvo) */
.brand-mark {
  width: 24px; height: 24px; border-radius: 7px; background: var(--primary);
  box-shadow: inset 0 0 0 6px var(--primary), inset 0 0 0 9px var(--surface);
}

.avatar {
  width: var(--size-avatar); height: var(--size-avatar); border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: var(--font-weight-bold); font-size: .85rem;
}
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: 4px; border-radius: var(--radius-pill); }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-name { font-size: .9rem; color: var(--text-2); }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-popover); padding: 6px;
}
.menu a, .menu .menu-item {
  display: flex; align-items: center; gap: .5rem; width: 100%;
  padding: .5rem .6rem; border-radius: var(--radius-xs); color: var(--text-2); font: inherit;
  background: none; border: 0; cursor: pointer; text-align: left;
}
.menu a:hover, .menu .menu-item:hover { background: var(--surface-2); text-decoration: none; }

.sidebar { display: none; }
.content { max-width: var(--size-content); margin: 0 auto; padding: 20px 16px 96px; }
.content.wide { max-width: var(--size-content-wide); }
.no-nav .content { max-width: var(--size-content-narrow); padding-top: 48px; }

.nav-link {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: var(--font-size-control); font-weight: var(--font-weight-medium);
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--primary-soft); color: var(--primary); }
.nav-group {
  margin: 1.25rem .75rem .4rem; font-size: var(--font-size-2xs); font-weight: var(--font-weight-semibold);
  text-transform: uppercase; letter-spacing: var(--font-letter-spacing-overline); color: var(--muted);
}

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar .nav-link { flex-direction: column; gap: 2px; font-size: .7rem; padding: .35rem .5rem; min-width: 64px; }
.tabbar .nav-link[aria-current="page"] { background: none; }

@media (min-width: 900px) {
  .topbar { padding: 0 24px; }
  .sidebar {
    display: block; position: fixed; top: var(--size-topbar); bottom: 0; left: 0; width: var(--size-sidebar);
    padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
  }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; }
  .has-nav .content { margin-left: var(--size-sidebar); margin-right: 0; padding: 32px 40px 48px; }
  .has-nav .content.wide { max-width: none; }
  .tabbar { display: none; }
}

/* ---------- cabeçalho de página ---------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 1.25rem; }
.page-head h1 { margin-bottom: .25rem; }
.subtitle { color: var(--muted); margin: 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.row-actions form { margin: 0; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ---------- cartão ---------- */

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow-card);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  font-weight: var(--font-weight-heading); margin: 0 0 .9rem;
}
.card-head .muted { font-weight: var(--font-weight-regular); }
.card-title { font-weight: var(--font-weight-heading); }
details.card > summary { list-style: none; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: var(--font-weight-heading); }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }

/* ---------- estatísticas ---------- */

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; align-items: center; gap: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.stat-label { margin: 0; font-size: var(--font-size-sm); color: var(--muted); }
.stat-value { margin: 0; font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); line-height: var(--font-line-height-tight); font-variant-numeric: tabular-nums; }

/* quadradinho de ícone (estatística, linha) com tom */
.stat-icon, .row-icon {
  flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--muted);
}
.stat-icon { width: 36px; height: 36px; border-radius: var(--radius-tile); }
.row-icon { width: 32px; height: 32px; border-radius: 9px; }

/* ---------- tons (ok / bad / warn / primary / neutral) ---------- */

.stat-icon.ok, .row-icon.ok, .badge.ok { background: var(--ok-soft); color: var(--ok); }
.stat-icon.bad, .row-icon.bad, .badge.bad { background: var(--bad-soft); color: var(--bad); }
.stat-icon.warn, .row-icon.warn, .badge.warn { background: var(--warn-soft); color: var(--warn); }
.stat-icon.primary, .row-icon.primary, .badge.primary { background: var(--primary-soft); color: var(--primary); }
.badge.neutral { background: var(--neutral-soft); color: var(--muted); }
.stat-value.ok { color: var(--ok); }
.stat-value.bad { color: var(--bad); }
.stat-value.primary { color: var(--primary); }

/* ---------- lista de linhas ---------- */

.rows { list-style: none; padding: 0; margin: 0; }
.rows > li { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--border); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-weight: var(--font-weight-semibold); font-size: var(--font-size-control); }
.row-sub { display: block; color: var(--muted); font-size: .85rem; }
.row-side { flex: none; text-align: right; }

/* ---------- destaque, vazio, layout em duas colunas ---------- */

.highlight { background: var(--primary-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 1rem; }
.highlight .label { margin: 0; font-size: .78rem; color: var(--primary); font-weight: var(--font-weight-semibold); }
.highlight .big { margin: .1rem 0 .35rem; font-size: 1.5rem; font-weight: var(--font-weight-bold); }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.empty strong { display: block; color: var(--text); margin-bottom: .2rem; }

.two-col { display: grid; gap: 16px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.grid { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .grid { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: .75rem; }

/* ---------- avisos e selos ---------- */

.flash { display: flex; align-items: flex-start; gap: .6rem; padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: var(--font-size-control); border: 1px solid transparent; }
.flash p { margin: 0; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.flash.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-border); }
.flash.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }

.info-box { display: flex; gap: .75rem; background: var(--primary-soft); border: 1px solid var(--primary-border); color: var(--text-2); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 16px; font-size: .9rem; }
.info-box > .icon { color: var(--primary); margin-top: 2px; }
.info-box p { margin: 0 0 .35rem; }
.info-box p:last-child { margin: 0; }

.badge { display: inline-flex; align-items: center; padding: .12rem .55rem; border-radius: var(--radius-pill); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); white-space: nowrap; }

/* ---------- pílulas (filtros/abas) e chips (seleção múltipla) ---------- */

.pills { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 1rem; }
.pills a {
  padding: .3rem .75rem; border-radius: var(--radius-pill); font-size: var(--font-size-sm); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
}
.pills a:hover { text-decoration: none; border-color: var(--primary); }
.pills a[aria-current="page"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips label { display: inline-flex; margin: 0; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span {
  display: inline-block; padding: .4rem .8rem; border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  font-size: .85rem; font-weight: var(--font-weight-medium); color: var(--text-2); cursor: pointer; user-select: none;
}
.chips input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chips input:focus-visible + span { box-shadow: var(--shadow-focus); }

/* ---------- dica flutuante (inclusive em botão desabilitado) ---------- */

.tip { position: relative; display: inline-block; outline: none; }
.tip > button:disabled { pointer-events: none; }
.tip::after {
  content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 30;
  width: max-content; max-width: 260px; padding: .45rem .7rem; border-radius: var(--radius-sm);
  background: var(--tooltip); color: var(--on-primary); font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); line-height: 1.35;
  opacity: 0; visibility: hidden; transition: opacity var(--duration-fast);
}
.tip:hover::after, .tip:focus::after, .tip:focus-within::after { opacity: 1; visibility: visible; }
.tip:focus-visible > button { box-shadow: var(--shadow-focus); }

/* ---------- carregando, linha do tempo, senha ---------- */

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: spin var(--duration-spin) linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.timeline { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.timeline li { padding: .45rem 0; border-top: 1px solid var(--border); }
.timeline li:first-child { border-top: 0; }
.timeline .t { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: .5rem; }
.timeline li.milestone { font-weight: var(--font-weight-semibold); color: var(--primary); }
.timeline li.error { color: var(--bad); }
.timeline li.warn { color: var(--warn); }

.password-field { position: relative; display: flex; }
.password-field input { flex: 1; padding-right: 2.8rem; }
.password-field .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.password-field .icon-btn.on { color: var(--primary); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0s !important; }
  .spinner { animation: spin 2s linear infinite !important; }
}
