/* ABOMBAR design system -- the single stylesheet for every page.
   Built from the 2026-08-08 design brief (palette A: black + gold).

   Rules that are not negotiable and are enforced here, not by habit:
   - the red family (--diff) means "money does not add up" or "this
     destroys something". It is never brand, never a link, never decor;
   - a divergence always carries THREE signals: colour + a 4px left bar
     + the word DIVERGENCIA. Sunlight, cheap screens and colour blindness
     each defeat colour alone;
   - gold is the brand: primary action, active nav. It is NOT "success";
   - no shadows anywhere. Depth comes from surface colour + 1px lines;
   - every interactive element keeps a visible focus ring and a 44px
     touch target (52px when it moves money).

   Font: the system stack first (Apple devices render real SF), Inter
   self-hosted as a subset for everyone else. No CDN, no font host. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter-700.woff2") format("woff2");
}

:root {
  /* surfaces -- warm & light (2026-08-14: unificação com a montra
     pública; a mesma linguagem calorosa, próxima do WhatsApp). Antes:
     preto + ouro. Profundidade continua a vir de cor de superfície + 1px,
     nunca de sombras. */
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --raised: #F0ECE3;
  --line: #E5E0D5;
  --inverse: #FFFFFF;
  /* brand + text -- verde de confiança (próximo do WhatsApp) substitui o
     ouro como acção primária / nav activa / ligação. */
  --accent: #12905A;
  --accent-deep: #0C6B43;
  --text-hi: #17231C;
  --text-mid: #4C5A50;
  /* support text must clear >=4.5:1 on BOTH --bg and --surface (cheap
     screens, Luanda sunlight). #63705F measures ~4.8:1 on #F6F4EE and
     ~5.3:1 on #FFFFFF. */
  --text-low: #63705F;
  /* Decoration only -- borders, disabled states, dividers. Never text. */
  --text-off: #C7C1B3;
  /* money semantics -- hues kept, but darkened so each works as TEXT on a
     light surface (the bright dark-theme values fail the contrast bar
     there). --diff (money does not add up) stays an unmistakable strong
     red. */
  --ok: #12905A;
  --warn: #9A6400;
  --diff: #C62828;
  --info: #1F6FEB;
  /* spacing scale */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 56px;
  /* radii */
  --r-field: 8px;
  --r-card: 14px;
  --r-sheet: 20px;
  --r-pill: 999px;
  /* layout */
  --largura-max: 640px;
  --barra-topo: 56px;
  --barra-nav: 72px;
  --tempo: 180ms;
}

/* ------------------------------------------------------------------ */
/* Base                                                                */
/* ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-hi);
  font-family: -apple-system, BlinkMacSystemFont, Inter, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--text-hi);
}

img,
svg {
  max-width: 100%;
}

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

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ------------------------------------------------------------------ */
/* Typography scale                                                    */
/* ------------------------------------------------------------------ */

.ab-display {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.045em;
}

.ab-title {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ab-section {
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ab-body {
  font-size: 17px;
  line-height: 1.5;
}

.ab-support {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-mid);
}

.ab-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mid);
}

.ab-mid {
  color: var(--text-mid);
}

.ab-low {
  color: var(--text-low);
}

/* Amounts. Tabular figures and no wrapping: a Kz value must never
   break across lines, at 360px or anywhere else. The unit rides one
   step smaller and quieter than the number it belongs to. */
.ab-kz {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ab-kz__unidade {
  font-size: 0.72em;
  font-weight: 500;
  color: var(--text-mid);
  margin-left: 0.22em;
}

.ab-kz--diff {
  color: var(--diff);
}

.ab-kz--ok {
  color: var(--ok);
}

/* ------------------------------------------------------------------ */
/* Layout shell                                                        */
/* ------------------------------------------------------------------ */

.ab-pagina {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ab-conteudo {
  width: 100%;
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: var(--s5) var(--s4) calc(var(--s6) + env(safe-area-inset-bottom));
  flex: 1;
}

/* Pages with the bottom navigation leave room for it. */
.ab-conteudo--com-nav {
  padding-bottom: calc(var(--barra-nav) + var(--s5) + env(safe-area-inset-bottom));
}

.ab-topo {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--barra-topo);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.ab-topo__interno {
  height: 100%;
  max-width: var(--largura-max);
  margin: 0 auto;
  padding: 0 var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.ab-topo__marca {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}

.ab-topo__marca img {
  height: 22px;
  width: auto;
  display: block;
}

.ab-topo__loja {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Navegação do topo (2026-08-10, revisão da superfície web — o dono
   disse «não percebo onde carregar»: /conciliacao e /painel só existiam
   por URL directo. Três ligações, tamanho 13px para caber em telemóveis
   baratos; a página actual leva aria-current e a cor de marca. */
/* O guião de boas-vindas do /demo: os três passos da visita guiada. */
.ab-guiao {
  margin: 10px 0 14px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.ab-topo__nav {
  display: flex;
  gap: 14px;
  margin-left: auto;
  margin-right: 14px;
  white-space: nowrap;
}
.ab-topo__nav a {
  color: var(--text-mid);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.ab-topo__nav a:hover { color: var(--text-hi); }
.ab-topo__nav a[aria-current="page"] { color: var(--accent); }

.ab-topo__fim {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.ab-rodape {
  border-top: 1px solid var(--line);
  padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  justify-content: center;
}

.ab-rodape a {
  color: var(--text-low);
  font-size: 15px;
}

/* ------------------------------------------------------------------ */
/* Bottom navigation (becomes a top row from 640px)                    */
/* ------------------------------------------------------------------ */

.ab-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  height: calc(var(--barra-nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
}

.ab-nav__item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--s2) 2px;
  color: var(--text-low);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: color var(--tempo) ease-out;
}

.ab-nav__item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ab-nav__item:hover {
  color: var(--text-mid);
}

.ab-nav__item--activo,
.ab-nav__item--activo:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Cards, sections, list rows                                          */
/* ------------------------------------------------------------------ */

.ab-cartao {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s4);
}

.ab-cartao + .ab-cartao {
  margin-top: var(--s4);
}

.ab-cartao__cabecalho {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.ab-pilha > * + * {
  margin-top: var(--s4);
}

.ab-linha {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 44px;
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}

.ab-linha:last-child {
  border-bottom: 0;
}

.ab-linha__texto {
  min-width: 0;
  flex: 1;
}

.ab-linha__titulo {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ab-linha__apoio {
  font-size: 15px;
  color: var(--text-mid);
}

.ab-linha__fim {
  margin-left: auto;
  text-align: right;
}

/* Initials avatar for staff rows -- no images anywhere in this product. */
.ab-iniciais {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-mid);
}

/* ------------------------------------------------------------------ */
/* KPI tile + hero amount                                              */
/* ------------------------------------------------------------------ */

.ab-kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--s4);
}

.ab-kpi__rotulo {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mid);
  margin-bottom: var(--s2);
}

.ab-kpi__valor {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ab-kpi__apoio {
  margin-top: var(--s2);
  font-size: 15px;
  color: var(--text-mid);
}

.ab-kpi__grelha {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.ab-kpi__grelha .ab-kpi__valor {
  font-size: 24px;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------------ */
/* Badges and pills                                                    */
/* ------------------------------------------------------------------ */

.ab-selo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ab-selo--dono {
  color: var(--accent);
  border-color: rgba(18, 144, 90, 0.4);
  background: rgba(18, 144, 90, 0.12);
}

.ab-selo--ok {
  color: var(--ok);
  border-color: rgba(47, 191, 113, 0.4);
  background: rgba(47, 191, 113, 0.12);
}

.ab-selo--warn {
  color: var(--warn);
  border-color: rgba(245, 166, 35, 0.4);
  background: rgba(245, 166, 35, 0.12);
}

.ab-selo--diff {
  color: var(--diff);
  border-color: rgba(255, 77, 77, 0.45);
  background: rgba(255, 77, 77, 0.12);
}

/* Filter pills (Hoje / 7 dias / Mes). */
.ab-taburetes {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  padding-bottom: 2px;
}

.ab-taburete {
  min-height: 44px;
  padding: 0 var(--s4);
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-mid);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--tempo) ease-out, background var(--tempo) ease-out;
}

.ab-taburete--activo {
  background: rgba(18, 144, 90, 0.14);
  border-color: rgba(18, 144, 90, 0.45);
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Alerts. A divergence is colour + bar + word, never colour alone.    */
/* ------------------------------------------------------------------ */

.ab-alerta {
  position: relative;
  border: 1px solid var(--line);
  border-left: 4px solid var(--text-low);
  border-radius: var(--r-card);
  background: var(--surface);
  padding: var(--s3) var(--s4);
}

.ab-alerta__marca {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: var(--s1);
  color: var(--text-mid);
}

.ab-alerta__texto {
  font-size: 17px;
}

.ab-alerta--ok {
  border-left-color: var(--ok);
}

.ab-alerta--ok .ab-alerta__marca {
  color: var(--ok);
}

.ab-alerta--warn {
  border-left-color: var(--warn);
}

.ab-alerta--warn .ab-alerta__marca {
  color: var(--warn);
}

.ab-alerta--diff {
  border-left-color: var(--diff);
  background: rgba(255, 77, 77, 0.07);
}

.ab-alerta--diff .ab-alerta__marca {
  color: var(--diff);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.ab-botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;
  padding: 0 var(--s5);
  border: 1px solid transparent;
  border-radius: var(--r-field);
  background: var(--accent);
  color: var(--bg);
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--tempo) ease-out, color var(--tempo) ease-out,
    opacity var(--tempo) ease-out;
}

.ab-botao:hover {
  background: var(--accent-deep);
  color: var(--inverse);
}

.ab-botao:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Anything that moves money gets the taller target. */
.ab-botao--dinheiro {
  min-height: 52px;
}

.ab-botao--largo {
  width: 100%;
}

.ab-botao--secundario {
  background: transparent;
  border-color: var(--line);
  color: var(--text-hi);
}

.ab-botao--secundario:hover {
  background: var(--raised);
  color: var(--text-hi);
}

.ab-botao--destrutivo {
  background: transparent;
  border-color: rgba(255, 77, 77, 0.5);
  color: var(--diff);
}

.ab-botao--destrutivo:hover {
  background: rgba(255, 77, 77, 0.12);
  color: var(--diff);
}

/* ------------------------------------------------------------------ */
/* Forms                                                               */
/* ------------------------------------------------------------------ */

.ab-campo {
  display: block;
  margin-bottom: var(--s4);
}

.ab-campo__rotulo {
  display: block;
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: var(--s2);
}

.ab-campo__entrada,
.ab-campo select,
.ab-campo textarea {
  width: 100%;
  min-height: 44px;
  padding: var(--s3);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  color: var(--text-hi);
  font-family: inherit;
  font-size: 17px;
  transition: border-color var(--tempo) ease-out;
}

.ab-campo__entrada:hover {
  border-color: var(--text-off);
}

.ab-campo__entrada::placeholder {
  color: var(--text-low);
}

.ab-campo__entrada--erro {
  border-color: var(--diff);
}

.ab-campo__ajuda {
  margin-top: var(--s2);
  font-size: 15px;
  color: var(--text-mid);
}

.ab-campo__erro {
  margin-top: var(--s2);
  font-size: 15px;
  color: var(--diff);
}

.ab-caixa-verificacao {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  min-height: 44px;
  padding: var(--s2) 0;
  font-size: 15px;
  color: var(--text-mid);
  cursor: pointer;
}

/* Two fields side by side (Numerário/Multicaixa, Preço/Unidade…). Its
   own class rather than a borrowed KPI grid: these are inputs, and the
   pair collapses to one column when a field needs the width. */
.ab-campo-par {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

/* Grid and flex children default to min-width:auto, so a wide input (or
   a long placeholder) pushes the column past the viewport instead of
   shrinking. This one line is what keeps the money screens from
   scrolling sideways on a 390px phone. */
.ab-campo-par > *,
.ab-kpi__grelha > * {
  min-width: 0;
}

/* The native file button renders light-on-light inside a dark page --
   the one control the browser paints for us, so it needs explicit
   colours instead of inheriting nothing. */
.ab-campo__entrada[type="file"] {
  padding: var(--s2);
  font-size: 15px;
  color: var(--text-mid);
  line-height: 28px;
}

.ab-campo__entrada[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: var(--s3);
  padding: 0 var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  background: var(--raised);
  color: var(--text-hi);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.ab-caixa-verificacao input {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Table (money matrix). Real <th scope> markup, mobile-scrollable.    */
/* ------------------------------------------------------------------ */

.ab-tabela-envolvente {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ab-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ab-tabela th,
.ab-tabela td {
  padding: var(--s3) var(--s2);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.ab-tabela thead th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mid);
}

.ab-tabela td.ab-numero,
.ab-tabela th.ab-numero {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ab-tabela tbody tr:last-child td {
  border-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Meters (package usage)                                              */
/* ------------------------------------------------------------------ */

.ab-medidor + .ab-medidor {
  margin-top: var(--s4);
}

.ab-medidor__topo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s2);
  font-size: 15px;
}

.ab-medidor__numeros {
  color: var(--text-mid);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ab-medidor__pista {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--raised);
  border: 1px solid var(--line);
  overflow: hidden;
}

.ab-medidor__enchimento {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width var(--tempo) ease-out;
}

/* Full package is a WARNING, never a divergence: going over costs money
   but nothing is wrong -- the service keeps running (PRODUTO.md §4). */
.ab-medidor__enchimento--cheio {
  background: var(--warn);
}

.ab-medidor__nota {
  margin-top: var(--s2);
  font-size: 15px;
  color: var(--text-mid);
}

/* ------------------------------------------------------------------ */
/* Small utilities the pages actually needed                           */
/* ------------------------------------------------------------------ */

/* A field and its action on one line (chat composer, phone gate). Both
   keep the 44px target; the button never shrinks below its label. */
.ab-fila {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.ab-fila > .ab-campo__entrada {
  flex: 1;
  min-width: 0;
}

.ab-fila > .ab-botao {
  flex: 0 0 auto;
}

/* Chart marks: the hit target for hover/tap/focus on a column. The
   focus ring itself comes from the global :focus-visible. */
.ab-grafico__coluna {
  cursor: pointer;
}

.ab-grafico__coluna:hover path,
.ab-grafico__coluna:focus path {
  opacity: 0.82;
}

/* Anchor for anything that must float over content (the chart tooltip). */
.ab-relativo {
  position: relative;
}

.ab-flutuante {
  position: absolute;
  z-index: 10;
  max-width: min(240px, calc(100% - 8px));
  padding: var(--s2) var(--s3);
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--r-field);
  color: var(--text-hi);
  font-size: 15px;
  line-height: 1.35;
  pointer-events: none;
}

/* Legal prose keeps its bullets: the base reset strips list markers for
   navigation lists, but a privacy policy reads as a list of items. */
.ab-lista {
  list-style: disc;
  padding-left: var(--s5);
  color: var(--text-mid);
}

.ab-lista li + li {
  margin-top: var(--s2);
}

/* Confirmation text ("Guardado.") -- success is --ok, never the brand. */
.ab-texto-ok {
  color: var(--ok);
}

/* A block that is present but not contracted/active. */
.ab-mudo {
  opacity: 0.55;
}

/* Status modifiers for the pill filters. They live AFTER .ab-taburete on
   purpose: a modifier must win over the base, and cascade order is what
   decides that when specificity ties. */
.ab-taburete--ok {
  color: var(--ok);
  border-color: rgba(47, 191, 113, 0.4);
  background: rgba(47, 191, 113, 0.12);
}

.ab-taburete--diff {
  color: var(--diff);
  border-color: rgba(255, 77, 77, 0.45);
  background: rgba(255, 77, 77, 0.12);
}

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

.ab-veu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(7, 9, 15, 0.72);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.ab-veu[hidden] {
  display: none;
}

.ab-folha {
  width: 100%;
  max-width: var(--largura-max);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: var(--s5) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
}

.ab-folha__cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

/* ------------------------------------------------------------------ */
/* Code block (one-time invite code)                                   */
/* ------------------------------------------------------------------ */

.ab-codigo {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: var(--s4);
  border: 1px dashed var(--line);
  border-radius: var(--r-card);
  background: var(--raised);
  color: var(--accent);
}

/* ------------------------------------------------------------------ */
/* Empty states                                                        */
/* ------------------------------------------------------------------ */

.ab-vazio {
  padding: var(--s6) var(--s4);
  text-align: center;
  color: var(--text-mid);
  font-size: 15px;
}

.ab-oculto {
  display: none !important;
}

/* Screen-reader-only text: labels that must exist for assistive tech
   but would clutter a small screen. */
.ab-so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------ */
/* From 640px: the bottom bar becomes a row inside the top bar         */
/* ------------------------------------------------------------------ */

@media (min-width: 640px) {
  .ab-display {
    font-size: 46px;
  }

  .ab-conteudo--com-nav {
    padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom));
  }

  .ab-nav {
    position: static;
    height: auto;
    padding: 0;
    background: transparent;
    border-top: 0;
    border-bottom: 1px solid var(--line);
    justify-content: center;
    gap: var(--s2);
  }

  .ab-nav__item {
    flex: 0 0 auto;
    flex-direction: row;
    gap: var(--s2);
    padding: var(--s3) var(--s4);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: 2px solid transparent;
  }

  .ab-nav__item--activo {
    border-bottom-color: var(--accent);
  }

  .ab-kpi__grelha {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ------------------------------------------------------------------ */
/* Motion policy: everything above degrades to nothing                 */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
