/* Hallmark · genre: modern-minimal · macrostructure: Workbench · design-system: design.md · designed-as-app */
/* Central · base do sistema de design: reset, tipografia, utilitários, casca (dock, cabeçalho, barra inferior),
   botões, formulários, abas e segmentos, cartões, tabelas, selos, avisos, estados (vazio, carregando, erro),
   diálogos, toasts e entrada. Só variáveis de tokens.css; sem estilos embutidos (CSP). */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--fs-base); line-height: var(--lh-body); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.lock { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); font-style: normal; min-width: 0; overflow-wrap: anywhere; }
::selection { background: var(--mint); color: var(--deep); }
.sprite { position: absolute; width: 0; height: 0; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.s { width: 18px; height: 18px; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm); z-index: 200; font-weight: 700; }
.skip:focus { left: 8px; }
/* só para leitores de tela (todas as variações usadas pelas telas) */
.sr-only, .f-sr, .cl-sr, .rg-sr, .rb-sr, .en-sr, .pr-sr, .sy-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* tipografia: título de tela, seção, cartão, texto de apoio */
.eyebrow { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.h1 { font-weight: 600; font-size: var(--fs-title); letter-spacing: -.03em; line-height: var(--lh-tight); text-wrap: balance; margin: 0; }
.h1.small { font-size: var(--fs-2xl); }
.h2 { font-weight: 600; font-size: 24px; letter-spacing: -.025em; line-height: var(--lh-snug); margin: 0; }
.h3 { font-weight: 600; font-size: var(--fs-md); letter-spacing: -.01em; line-height: var(--lh-snug); margin: 0; }
.lead { font-size: var(--fs-lg); font-weight: 600; margin-top: var(--sp-1); }
.sub { color: var(--muted); font-size: var(--fs-sm); }
.mini { color: var(--on-hero-soft); font-size: var(--fs-sm); font-weight: 600; }
.num-ok { color: var(--brand-2); } .num-bad { color: var(--coral-ink); }
.right { text-align: right; }
.block { display: block; }
.grow { flex: 1 1 0; min-width: 0; }
kbd { font: inherit; font-size: var(--fs-xs); font-weight: 800; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; color: var(--muted); }

/* layout e espaços (escala de 4 e 8) */
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.row.center { justify-content: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; }
.col { display: grid; gap: var(--sp-3); }
.pad { padding: 14px; }
.mt8 { margin-top: var(--sp-2); } .mt12 { margin-top: var(--sp-3); } .mt16 { margin-top: var(--sp-4); }
.mb8 { margin-bottom: var(--sp-2); } .mb12 { margin-bottom: var(--sp-3); } .mb16 { margin-bottom: var(--sp-4); }
.sep { height: 1px; background: var(--line); margin: var(--sp-4) 0; }

/* casca: dock (desktop), cabeçalho de tela, barra inferior (celular) */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100%; }
.app > .dock { background: var(--nav-bg); border-right: 1px solid var(--nav-line); color: var(--nav-ink); }
.dock { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-6); padding: var(--sp-6) var(--sp-4) var(--sp-4); }
.brand-lockup { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 var(--sp-4) var(--sp-6); min-width: 0; }
.brand-symbol { width: 34px; height: 34px; color: var(--nav-ink); grid-column: 1; grid-row: 1; }
.brand-lockup .logo { flex: none; width: 42px; height: 42px; border-radius: var(--r-sm); background: var(--paper-white); display: grid; place-items: center; padding: var(--sp-1); }
.brand-lockup .logo img, .brand-lockup .logo svg { display: block; width: 100%; height: auto; }
.brand-product { color: var(--nav-ink); font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -.04em; }
.brand-company { display: block; width: 160px; max-width: 100%; height: auto; padding: 0; border-radius: var(--r-xs); background: var(--logo-bg); }
.dock-caption { color: var(--nav-muted); font-size: 10px; grid-column: 1 / -1; letter-spacing: .06em; text-transform: uppercase; }
.nav { display: grid; align-content: start; gap: var(--sp-2); width: 100%; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.nav-group { display: grid; gap: 2px; }
.nav-label { color: var(--nav-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; padding: 0 var(--sp-3) var(--sp-2); }
.nb { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: var(--sp-3); min-height: 54px; padding: var(--sp-3) var(--sp-4); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--nav-ink); font-size: var(--fs-base); font-weight: 500; line-height: 1.25; text-align: left; transition: background-color var(--dur-1), color var(--dur-1); }
.nb .ic { width: 22px; height: 22px; stroke-width: 1.7; }
.nb:hover { background: var(--nav-active); color: var(--nav-ink); }
.nb:active { background: var(--nav-line); }
.nb[aria-current="page"] { background: var(--nav-active); color: var(--nav-ink); font-weight: 700; }
.dock .nb[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: var(--r-xs); background: var(--brand); }
.dock .nb:focus-visible, .dock .round:focus-visible { outline-color: var(--nav-ink); }
.bdg { position: absolute; top: 4px; right: 12px; min-width: 18px; height: 18px; border-radius: var(--r-xs); background: var(--coral); color: var(--on-coral); font-size: 11px; font-weight: 800; display: grid; place-items: center; padding: 0 5px; line-height: 1; }
.dock .bdg { position: static; margin-left: auto; background: var(--mint); color: var(--deep); }
.dock-end { margin-top: auto; display: grid; gap: var(--sp-3); border-top: 1px solid var(--nav-line); padding-top: var(--sp-4); }
.dock-profile { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; padding: var(--sp-2); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--nav-ink); text-align: left; }
.dock-profile:hover { background: var(--nav-active); }
.profile-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--mint); color: var(--deep); font-weight: 700; }
.profile-copy { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.profile-copy b { font-size: var(--fs-sm); font-weight: 650; }
.profile-copy > span { font-size: var(--fs-xs); color: var(--nav-muted); }
.dock-actions { display: flex; gap: var(--sp-2); }
.round { width: var(--hit-sm); height: var(--hit-sm); border-radius: var(--r-sm); border: 1px solid var(--control-border); background: var(--surface); display: grid; place-items: center; color: var(--muted); transition: background-color var(--dur-1), color var(--dur-1), border-color var(--dur-1); }
.round:hover { background: var(--surface-2); color: var(--ink); border-color: var(--control-border-hover); }
.dock .round { background: transparent; border-color: var(--nav-muted); color: var(--nav-muted); }
.dock .round:hover { background: var(--nav-active); color: var(--nav-ink); border-color: var(--nav-ink); }
.stage { --stage-pad: clamp(24px, 3vw, 40px); min-width: 0; padding: 0 var(--stage-pad) 64px; max-width: 1800px; width: 100%; margin-inline: auto; outline: 0; container-type: inline-size; container-name: workspace; }
.utilitybar { padding: var(--sp-4) var(--stage-pad); margin: 0 calc(-1 * var(--stage-pad)) var(--sp-8); border-bottom: 1px solid var(--line); background: var(--surface); }
.utilitybar .top-tools { display: flex; justify-content: flex-end; gap: var(--sp-3); width: 100%; flex-wrap: wrap; }
.utilitybar .top-tools .searchbtn { margin-right: auto; flex: 0 1 420px; min-height: 48px; background: var(--surface-2); border-color: var(--line-strong); box-shadow: none; }
.utilitybar .searchbtn:hover { border-color: var(--control-border-hover); color: var(--ink); }
.stage[data-current-view="hoje"] .h1 { font-size: clamp(34px, 3.4vw, 52px); }
.stage[data-current-view="hoje"] .top { border: 0; padding-bottom: 0; margin-bottom: var(--sp-5); }
.stage > .view, .stage > .top { width: 100%; max-width: 1480px; margin-inline: auto; }
#v-hoje, #v-automacao, #v-regua, #v-portal, #v-sistema { max-width: 1280px; }
#v-propostas { max-width: 1400px; }
.top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: var(--sp-6); padding-bottom: var(--sp-6); border-bottom: 1px solid var(--line); }
.top-tools { display: flex; align-items: center; justify-content: flex-end; flex: 0 1 auto; gap: var(--sp-2); min-width: 0; }
.top-tools .searchbtn { flex-basis: 200px; }
.top-tools .chip { white-space: nowrap; padding-inline: var(--sp-3); }
.ttl { flex: 1 1 240px; min-width: 0; display: grid; gap: var(--sp-3); }
.ttl .h1:focus { outline: 0; }
.searchbtn { display: flex; align-items: center; gap: 10px; min-height: var(--hit); padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); color: var(--muted); min-width: 0; flex: 0 1 250px; transition: border-color var(--dur-1), box-shadow var(--dur-1), color var(--dur-1); }
.searchbtn:hover { border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-1); }
.searchbtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.searchbtn kbd { margin-left: auto; border-color: var(--line); white-space: nowrap; }
.searchbtn, .round { border-color: var(--control-border); }
.searchbtn:hover, .round:hover { border-color: var(--control-border-hover); }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-md); padding: 0 14px; min-height: var(--hit-sm); font-size: var(--fs-xs); font-weight: 700; background: var(--surface); border: 1px solid var(--line); color: var(--muted); min-width: 0; transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1); }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip:not(.pilotchip) { border-color: var(--control-border); }
.chip:not(.pilotchip):hover { border-color: var(--control-border-hover); }
.chip[aria-pressed="true"] { background: var(--mint-soft); color: var(--brand-2); border-color: var(--brand); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.pilotchip { color: var(--ink); background: var(--mint-soft); border-color: transparent; }
.pilotchip:hover { border-color: var(--brand); }
.pilotchip .dot { animation: none; }
.pilotchip.off { background: var(--coral-soft); }
.pilotchip.off .dot { background: var(--coral); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--ring); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.view { animation: fade var(--dur-2) var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }

/* selos e etiquetas */
.tag { display: inline-flex; align-items: center; border-radius: var(--r-xs); padding: 3px 10px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; line-height: 1.35; }
.tag.g { background: var(--mint-soft); color: var(--brand-2); } .tag.c { background: var(--coral-soft); color: var(--coral-ink); } .tag.s { background: var(--sun-soft); color: var(--ink); }
.tag.b { background: var(--sky-soft); color: var(--sky); } .tag.n { background: var(--surface-2); color: var(--muted); }

/* cartões: um só desenho (fundo, borda, raio, sombra) para a família inteira */
.card, .ap, .safe-bar, .lane, .pc, .cl-card, .rg-stage, .sy-card, .pt-inv { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); min-width: 0; }
.card { padding: var(--sp-5); }
.card h2 { font-weight: 700; font-size: var(--fs-lg); letter-spacing: -.015em; line-height: var(--lh-snug); }
.card.flat, .rb-cmpcard.card, .rb-person.card { box-shadow: none; background: var(--surface-2); }
.skel { color: var(--muted); }

/* avisos e faixas: acento lateral + cor suave */
.banner { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; background: var(--coral-soft); border-left: 4px solid var(--coral); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4); font-weight: 600; }
.banner.warn { background: var(--sun-soft); border-left-color: var(--sun); }
.notice { border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-base); background: var(--sky-soft); border-left: 4px solid var(--sky); }
.notice.bad { background: var(--coral-soft); border-left-color: var(--coral); } .notice.warn { background: var(--sun-soft); border-left-color: var(--sun); } .notice.info { background: var(--sky-soft); border-left-color: var(--sky); }

/* botões: 48 px (padrão) e 40 px (.sm); estados hover, pressionado, foco e desabilitado */
.btn { white-space: normal; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); min-height: var(--hit); padding: 10px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: var(--fs-base); line-height: 1.25; text-decoration: none; color: var(--ink); transition: background-color var(--dur-1), border-color var(--dur-1), box-shadow var(--dur-1), transform var(--dur-1), filter var(--dur-1); }
.btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow-action); }
.btn.pri:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.mint { background: var(--mint); border-color: var(--mint); color: var(--deep); }
.btn.mint:hover { filter: brightness(1.04); background: var(--mint); border-color: var(--mint); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.warn, .btn.danger { background: var(--coral); border-color: var(--coral); color: var(--on-coral); }
.btn.warn:hover, .btn.danger:hover { background: var(--coral-hover); border-color: var(--coral-hover); }
.btn.sm { min-height: var(--hit-sm); padding: 8px 14px; font-size: var(--fs-sm); }
.btn.block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn kbd { color: var(--muted); }
.btn.pri kbd, .btn.mint kbd, .btn.warn kbd { color: inherit; opacity: .85; }

/* formulários */
.fl { display: grid; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.inp { width: 100%; min-height: var(--hit); border-radius: var(--r-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-base); padding: 0 14px; transition: border-color var(--dur-1), box-shadow var(--dur-1), background-color var(--dur-1); }
.inp:hover { border-color: var(--control-border-hover); }
.inp:focus, .inp:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--ring); }
.inp::placeholder, .field input::placeholder { color: var(--muted); opacity: 1; }
.inp[disabled], .inp[readonly] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.inp[aria-invalid="true"] { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.inp.big { min-height: 52px; font-size: var(--fs-md); }
.inp.area { height: auto; min-height: 84px; padding: var(--sp-3) 14px; resize: vertical; line-height: 1.45; }
select.inp { padding-right: var(--sp-2); }
.field { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; min-height: var(--hit); padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--control-border); background: var(--surface); color: var(--muted); transition: border-color var(--dur-1), box-shadow var(--dur-1); }
.field:hover { border-color: var(--control-border-hover); }
.field:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-color: var(--focus-ring); box-shadow: 0 0 0 3px var(--ring); }
.field input { border: 0; background: transparent; font: inherit; font-size: var(--fs-base); color: var(--ink); width: 100%; min-height: 40px; outline: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; min-height: var(--hit); }
.toolbar .field { min-height: var(--hit-sm); }
.toolbar .btn.sm { margin-left: auto; }
input[type=range] { margin-inline: 0; width: 100%; accent-color: var(--brand); height: var(--hit-sm); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.chk { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; min-height: var(--hit-sm); }
.chk.sm { font-size: var(--fs-sm); color: var(--muted); }
.fgrid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sortsel { width: auto; min-height: var(--hit-sm); }

/* abas e segmentos: .seg agrupa .pill[aria-pressed]; selecionado = tinta cheia */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { min-height: var(--hit-sm); padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: var(--fs-sm); line-height: 1.2; color: var(--muted); transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1); }
.pill:hover { border-color: var(--line-strong); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--mint-soft); border-color: var(--brand); color: var(--brand-2); }
.pill.xs { padding: 6px 12px; font-size: var(--fs-xs); }
.ins { gap: 6px; }
.modes { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface-2); padding: 3px; align-self: start; }
.modes button { border: 0; background: transparent; border-radius: var(--r-pill); min-height: var(--hit-sm); padding: 0 14px; font-weight: 700; font-size: var(--fs-xs); color: var(--muted); transition: background-color var(--dur-1), color var(--dur-1); }
.modes button:hover { color: var(--ink); }
.modes button[aria-pressed="true"] { background: var(--ink); color: var(--bg); } .modes button.auto[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); } .modes button[disabled] { opacity: .5; cursor: not-allowed; }
.opts { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.opt { border-radius: var(--r-md); min-height: var(--hit-sm); padding: 8px 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; transition: border-color var(--dur-1), background-color var(--dur-1); }
.opt:hover { border-color: var(--line-strong); }
.opt[aria-pressed="true"] { border-color: var(--brand); background: var(--mint-soft); }
.pill:not([aria-pressed="true"]), .opt:not([aria-pressed="true"]) { border-color: var(--control-border); }
.pill:not([aria-pressed="true"]):hover, .opt:not([aria-pressed="true"]):hover { border-color: var(--control-border-hover); }
.steps { display: flex; gap: 6px; } .steps i { flex: 1; height: 6px; border-radius: var(--r-pill); background: var(--line); } .steps i.on { background: var(--brand); }

/* interruptor */
.sw { position: relative; width: 54px; height: 32px; border-radius: var(--r-pill); border: 0; background: var(--control-border); flex: none; transition: background-color var(--dur-2); }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-white); transition: left var(--dur-2) var(--ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.sw::before { content: ""; position: absolute; inset: -4px -2px; }
.sw[aria-checked="true"] { background: var(--brand); } .sw[aria-checked="true"]::after { left: 26px; } .sw[disabled] { opacity: .5; cursor: not-allowed; }

/* tabelas: cabeçalho legível, linhas com hover (só desktop) */
.scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.tbl th { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: var(--sp-2) 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.tbl td { padding: var(--sp-3) 10px; border-bottom: 1px solid var(--line); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; }
@media (hover: hover) and (min-width: 821px) { .tbl tbody tr:hover td { background: var(--surface-2); } }

/* detalhes expansíveis: um só gesto, com seta */
details > summary { cursor: pointer; list-style: none; border-radius: var(--r-sm); min-height: var(--hit-sm); display: flex; align-items: center; font-weight: 700; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--dur-2) var(--ease); flex: none; vertical-align: 2px; }
details[open] > summary::before { transform: rotate(45deg); }
details > summary:hover { color: var(--brand-2); }

/* estados: carregando, vazio, erro */
.skeleton { display: grid; gap: 14px; }
.skeleton .card { display: grid; gap: var(--sp-3); }
.skeleton i { display: block; height: 16px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.skeleton i:first-child { height: 26px; width: 46%; } .skeleton i:nth-child(2) { width: 80%; } .skeleton i:nth-child(3) { width: 62%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 32px var(--sp-4); color: var(--muted); }
.empty .ic { width: 56px; height: 56px; padding: 15px; border-radius: 50%; background: var(--mint-soft); color: var(--brand-2); margin-bottom: var(--sp-2); }
.empty b { color: var(--ink); font-size: var(--fs-md); }
.empty .sub { max-width: 46ch; }
.card:has(> h2 + p + .btn[id$="-retry"]) { border-left: 4px solid var(--coral); }

/* diálogos: entrada suave; no celular viram folha inferior */
.modal { position: fixed; inset: 0; z-index: 80; background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: grid; place-items: center; padding: var(--sp-4); animation: fade var(--dur-2) var(--ease) both; }
.mc { background: var(--surface-3); border: 1px solid var(--line); border-radius: var(--r-xl); padding: var(--sp-6); max-width: 480px; width: 100%; display: grid; gap: var(--sp-3); box-shadow: var(--shadow-modal); max-height: 92vh; max-height: 92dvh; overflow: auto; animation: pop var(--dur-3) var(--ease) both; }
.mc.wide { max-width: 640px; }
.preview { background: var(--surface-2); border-radius: var(--r-md); padding: 14px; font-size: var(--fs-base); white-space: pre-wrap; overflow-wrap: anywhere; }
.modal.pal { align-items: start; padding-top: 12vh; }
.pal .mc { max-width: 560px; padding: 14px; }
.pl { display: grid; gap: 2px; max-height: 50vh; overflow: auto; }
.pi { display: flex; gap: var(--sp-3); align-items: center; min-height: var(--hit); padding: 8px 10px; border-radius: var(--r-md); border: 0; background: transparent; text-align: left; width: 100%; }
.pi:hover, .pi.on { background: var(--mint-soft); }
.pi .k { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); width: 64px; flex: none; }
.more-list { display: grid; gap: 14px; max-height: 60vh; overflow: auto; }
.more-group { display: grid; gap: 4px; }
.more-item { display: flex; align-items: center; gap: var(--sp-3); width: 100%; min-height: 52px; padding: 8px var(--sp-3); border: 0; border-radius: var(--r-md); background: transparent; text-align: left; transition: background-color var(--dur-1); }
.more-item:hover, .more-item:focus-visible { background: var(--surface-2); }
.more-item .ic { color: var(--brand-2); }
.checks { display: grid; gap: var(--sp-2); }
.ck { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-base); }
.ck i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand); color: var(--brand-ink); font-style: normal; font-weight: 800; font-size: var(--fs-xs); }
.ck.no i { background: var(--coral); color: var(--on-coral); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface-2); border-radius: var(--r-md); padding: var(--sp-3); } .tile b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1; } .tile span { font-size: var(--fs-xs); color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-5); font-weight: 700; font-size: var(--fs-base); z-index: 99; transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease); width: max-content; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow-pop); }
.toast.on { opacity: 1; transform: translate(-50%, 0); } .toast.act { pointer-events: auto; }
.tbtn { margin-left: 10px; min-height: var(--hit-sm); border: 0; background: var(--mint); color: var(--deep); border-radius: var(--r-pill); padding: 4px 16px; font-weight: 800; }

/* entrada */
.login { min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-6) var(--sp-4); background: var(--bg); }
.login-card { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 32px 28px 28px; display: grid; gap: var(--sp-4); box-shadow: var(--shadow-pop); animation: pop var(--dur-3) var(--ease) both; }
.login-logo { width: 200px; max-width: 70%; height: auto; background: var(--paper-white); border-radius: var(--r-md); padding: 8px 14px; justify-self: center; margin-bottom: var(--sp-1); }
.login-card .eyebrow, .login-card .h1 { text-align: center; }
.login-card .h1 { margin-top: -10px; }
.login-card .chk.sm { min-height: var(--hit-sm); }
.login-sub { text-align: center; margin-top: -8px; }

.tabbar { display: none; }
.t2 b.num, .rows .r b { white-space: nowrap; }
.banner:has(#offline), #offline { background: var(--coral-soft); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
