/* Hallmark · shape: app screen · genre: modern-minimal · theme: Coral (deal manual, palette pulled to esmalte by user ask)
 * nav: sidebar from 60rem (8 destinations), top bar + bottom tabs on the phone · signature: the day strip, appointments laid on a time ruler with the now line · states: loading, empty, error, offline, read-only (plan expired)
 * axes: light/grotesk-sans/warm · posture: restrained · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P3 H3 E3 S3 R2 V3 · weakest: R, eight destinations share one shell, so the strip and the money figure carry the character */
/* answered: 25 the login aside line is a display line, not prose · 41 .col.folga is a light nude band, text colour inherits ink · F4 only .btn is filled, the rest are outline or quiet · F7 every input shares one recipe on purpose (one form language) */
@import url("./tokens.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--color-rule-2) var(--color-paper); }
body { margin: 0; background: var(--color-paper); color: var(--color-ink); font-family: var(--font-body); font-size: var(--text-md); line-height: 1.5; -webkit-font-smoothing: antialiased; caret-color: var(--color-accent); min-height: 100dvh; }
::selection { background: color-mix(in oklab, var(--color-accent) 22%, transparent); color: var(--color-ink); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
h1, h2, h3 { margin: 0; font-weight: 650; overflow-wrap: break-word; min-width: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: var(--text-2xl); letter-spacing: var(--tracking-display); font-weight: var(--display-weight); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--color-muted); }
.pequeno { font-size: var(--text-sm); }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 44px; padding: 0 var(--space-md); border-radius: var(--radius-btn); border: 1px solid transparent; background: var(--color-accent); color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-md); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--color-accent-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-2 { background: var(--color-surface); color: var(--color-ink); border-color: var(--color-rule-2); }
.btn-2:hover { background: var(--color-paper-2); border-color: var(--color-muted); }
.btn-q { background: transparent; color: var(--color-ink); border-color: transparent; padding: 0 var(--space-sm); }
.btn-q:hover { background: var(--color-paper-2); }
.btn-perigo { background: transparent; color: var(--color-error); border-color: color-mix(in oklab, var(--color-error) 40%, transparent); }
.btn-perigo:hover { background: color-mix(in oklab, var(--color-error) 8%, transparent); }
.btn-wa { background: var(--color-surface); color: var(--color-ink); border-color: var(--color-rule-2); }
.btn-wa svg { color: var(--color-ok); }
.btn-wa:hover { background: var(--color-ok-soft); border-color: var(--color-ok); }
.btn-larga { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 var(--space-sm); font-size: var(--text-sm); border-radius: 10px; }
@media (pointer: coarse) { .btn { min-height: 48px; } .btn-sm { min-height: 40px; } }
.icone { width: 20px; height: 20px; flex: none; }

/* ---------- Campos ---------- */
.campo { display: grid; gap: var(--space-xs); min-width: 0; }
.campo > span, .rotulo { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink-2); }
.campo small { font-size: var(--text-sm); color: var(--color-muted); min-height: 1lh; }
.input, .campo input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-ink); font-size: 16px; transition: border-color var(--dur-micro) var(--ease-out);
}
.campo textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.input:hover, .campo input:hover, .campo select:hover, .campo textarea:hover { border-color: var(--color-muted); }
.input:focus-visible, .campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.campo input:disabled, .campo select:disabled, .campo textarea:disabled { opacity: 0.55; cursor: not-allowed; }
.campo [aria-invalid="true"] { border-color: var(--color-error); }
.erro-campo { color: var(--color-error); font-size: var(--text-sm); }
.linha-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--space-sm); }
.check { display: flex; align-items: flex-start; gap: var(--space-sm); min-height: 44px; padding: var(--space-sm) 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--color-accent); flex: none; cursor: pointer; }
.check input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.check span { line-height: 1.35; }

/* grupo de escolha (status, forma de pagamento, dia/semana/mês) */
.escolha { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.escolha button, .escolha label { min-height: 40px; padding: 0 var(--space-md); border-radius: var(--radius-pill); border: 1px solid var(--color-rule-2); background: var(--color-surface); color: var(--color-ink); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out); }
.escolha button:hover, .escolha label:hover { border-color: var(--color-muted); }
.escolha button:focus-visible, .escolha label:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.escolha [aria-pressed="true"], .escolha label:has(input:checked) { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.escolha input { position: absolute; opacity: 0; pointer-events: none; }
@media (pointer: coarse) { .escolha button, .escolha label { min-height: 44px; } }

/* ---------- Casca do app ---------- */
.casca { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.lateral { display: none; }
.topo { display: flex; align-items: center; gap: var(--space-sm); min-height: 56px; padding: 0 var(--space-md); padding-top: env(safe-area-inset-top); background: color-mix(in oklab, var(--color-paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-rule); }
@media (max-width: 59.99rem) { .topo { position: sticky; top: 0; z-index: var(--z-sticky); } }
.marca { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-display); font-weight: 650; font-size: var(--text-lg); letter-spacing: -0.01em; text-decoration: none; color: var(--color-ink); }
.marca svg { width: 28px; height: 28px; color: var(--color-accent); }
.topo .espaco { flex: 1; }
.sinc { font-size: var(--text-sm); color: var(--color-muted); display: inline-flex; align-items: center; gap: var(--space-xs); }
.sinc[data-estado="offline"] { color: var(--color-warn); }
.sinc[data-estado="erro"] { color: var(--color-error); }
.conteudo { padding: var(--space-lg) var(--space-md) calc(var(--space-3xl) + env(safe-area-inset-bottom)); width: 100%; max-width: 1120px; margin-inline: auto; min-width: 0; }
.abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--color-surface); border-top: 1px solid var(--color-rule); padding-bottom: env(safe-area-inset-bottom); }
.abas a { display: grid; justify-items: center; align-content: center; gap: var(--space-2xs); min-height: 62px; font-size: 0.78rem; font-weight: 600; color: var(--color-muted); text-decoration: none; position: relative; -webkit-tap-highlight-color: transparent; transition: color var(--dur-micro) var(--ease-out); }
.abas a svg { width: 24px; height: 24px; }
@media (hover: hover) { .abas a:hover { color: var(--color-ink); } }
.abas a[aria-current="page"] { color: var(--color-accent); }
.abas a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--color-accent); }
.abas .bolha, .menu-lateral .bolha { min-width: 20px; height: 20px; padding: 0 var(--space-xs); border-radius: 10px; background: var(--color-accent); color: var(--color-accent-ink); font-size: 0.72rem; font-weight: 700; display: inline-grid; place-items: center; }
.abas .bolha { position: absolute; top: 6px; left: calc(50% + 6px); }

@media (min-width: 60rem) {
  .casca { grid-template-columns: minmax(0, 1fr); padding-left: 248px; }
  .lateral { display: flex; flex-direction: column; gap: var(--space-lg); position: fixed; inset: 0 auto 0 0; width: 248px; z-index: var(--z-nav); overflow-y: auto; padding: var(--space-lg) var(--space-md); background: var(--color-paper-2); border-right: 1px solid var(--color-rule); }
  .lateral .marca { padding: 0 var(--space-sm); }
  .menu-lateral { display: grid; gap: var(--space-3xs); }
  .menu-lateral a { display: flex; align-items: center; gap: var(--space-sm); min-height: 44px; padding: 0 var(--space-sm); border-radius: 10px; color: var(--color-ink-2); text-decoration: none; font-weight: 500; transition: background-color var(--dur-micro) var(--ease-out); }
  .menu-lateral a svg { width: 20px; height: 20px; color: var(--color-muted); }
  .menu-lateral a:hover { background: var(--color-paper-3); }
  .menu-lateral a[aria-current="page"] { background: var(--color-surface); color: var(--color-ink); font-weight: 650; box-shadow: inset 3px 0 0 var(--color-accent); }
  .menu-lateral a[aria-current="page"] svg { color: var(--color-accent); }
  .menu-lateral .bolha { margin-left: auto; }
  .lateral .rodape-lateral { margin-top: auto; padding: 0 var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); display: grid; gap: var(--space-2xs); }
  .topo .marca { display: none; }
  .abas { display: none; }
  .conteudo { padding: var(--space-lg) var(--space-xl) var(--space-2xl); }
}

/* faixa de plano vencido */
.faixa-vencido { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) var(--space-md); background: var(--color-warn-soft); color: var(--color-ink); border-bottom: 1px solid color-mix(in oklab, var(--color-warn) 35%, transparent); font-weight: 600; }
.faixa-vencido a:not(.btn) { color: var(--color-ink); font-weight: 700; }
.faixa-vencido .btn { min-height: 40px; }
body.leitura .edita { display: none !important; }

/* ---------- Cabeçalho de tela ---------- */
.cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-sm) var(--space-md); margin-bottom: var(--space-lg); }
.cab .sub { color: var(--color-muted); margin-top: var(--space-2xs); }
.cab .acoes { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.secao { margin-top: var(--space-lg); }
@media (min-width: 60rem) { .secao { margin-top: var(--space-xl); } }
.secao > h2 { margin-bottom: var(--space-sm); display: flex; align-items: baseline; gap: var(--space-sm); }
.cab-secao { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-sm); margin-bottom: var(--space-sm); }
.duas-colunas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 var(--space-xl); }
@media (min-width: 72rem) { .duas-colunas { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; } .duas-colunas { margin-top: var(--space-xl); } .duas-colunas > .secao, .duas-colunas > div > .secao:first-child { margin-top: 0; } }

/* ---------- Listas (linhas, não cartões) ---------- */
.lista { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.lista > li { border-bottom: 1px solid var(--color-rule); }
.linha { display: flex; align-items: center; gap: var(--space-sm); min-height: 60px; padding: var(--space-sm) var(--space-2xs); width: 100%; text-align: left; background: none; border: 0; color: inherit; text-decoration: none; cursor: pointer; transition: background-color var(--dur-micro) var(--ease-out); }
a.linha:hover, button.linha:hover { background: var(--color-paper-2); }
.linha .meio { flex: 1; min-width: 0; display: block; }
.linha .titulo, .linha .detalhe, .fita .bloco .titulo, .fita .bloco .detalhe, .fita .bloco .meio { display: block; }
.linha .titulo { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha .detalhe { font-size: var(--text-sm); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linha .valor { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.linha .hora { font-weight: 700; font-variant-numeric: tabular-nums; width: 3.2em; flex: none; }
.vazio { padding: var(--space-lg) var(--space-md); border: 1px dashed var(--color-rule-2); border-radius: var(--radius-row); color: var(--color-muted); display: grid; gap: var(--space-sm); justify-items: start; }
.vazio strong { color: var(--color-ink); }
.carregando { display: grid; gap: var(--space-sm); }
.carregando span { height: 56px; border-radius: 12px; background: var(--color-paper-2); }

/* status: texto com contorno, sem bolinha */
.st { display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-xs); border-radius: 7px; font-size: 0.78rem; font-weight: 650; border: 1px solid currentColor; white-space: nowrap; }
.st-agendado { color: var(--color-ink-2); }
.st-confirmado { color: var(--color-ok); }
.st-concluido { color: var(--color-muted); }
.st-faltou { color: var(--color-warn); }
.st-cancelado { color: var(--color-muted); text-decoration: line-through; }
.st-bloqueio { color: var(--color-muted); border-style: dashed; }
.etiqueta-exemplo { font-size: 0.72rem; font-weight: 700; color: var(--color-warn); border: 1px solid currentColor; border-radius: 6px; padding: 1px var(--space-xs); vertical-align: 2px; }

/* ---------- A fita do dia (assinatura) ---------- */
.fita { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); border-top: 1px solid var(--color-rule); }
.fita .horas { position: relative; }
.fita .horas span { position: absolute; right: 10px; transform: translateY(-50%); font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.fita .trilho { position: relative; background: repeating-linear-gradient(to bottom, var(--color-rule) 0 1px, transparent 1px var(--hora-px)); border-left: 1px solid var(--color-rule); }
.fita .bloco { position: absolute; left: 8px; right: 4px; display: flex; gap: var(--space-sm); align-items: flex-start; padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-md); border-radius: 10px; background: var(--color-surface); border: 1px solid var(--color-rule-2); color: inherit; text-align: left; cursor: pointer; overflow: hidden; font: inherit; transition: border-color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out); }
.fita .bloco::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--cor-st, var(--color-accent)); border-radius: 10px 0 0 10px; }
.fita .bloco:hover { border-color: var(--color-muted); }
.fita .bloco .meio { min-width: 0; flex: 1; }
.fita .bloco .titulo { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fita .bloco .detalhe { font-size: var(--text-sm); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fita .bloco.curto { align-items: center; padding-top: var(--space-2xs); padding-bottom: var(--space-2xs); }
.fita .bloco.curto .detalhe { display: none; }
.fita .bloco[data-st="confirmado"] { --cor-st: var(--color-ok); }
.fita .bloco[data-st="agendado"] { --cor-st: var(--color-accent); }
.fita .bloco[data-st="concluido"] { --cor-st: var(--color-rule-2); background: var(--color-paper-2); }
.fita .bloco[data-st="faltou"] { --cor-st: var(--color-warn); }
.fita .bloco[data-st="bloqueio"] { --cor-st: transparent; background: repeating-linear-gradient(135deg, var(--color-paper-2) 0 8px, var(--color-paper-3) 8px 16px); border-style: dashed; }
.fita .agora { position: absolute; left: -6px; right: 0; height: 0; border-top: 2px solid var(--color-accent); z-index: var(--z-raised); pointer-events: none; }
.fita .agora::before { content: attr(data-hora); position: absolute; left: -46px; top: -11px; padding: 1px var(--space-xs); border-radius: 6px; background: var(--color-accent); color: var(--color-accent-ink); font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* pedidos do link */
.pedido { display: grid; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--radius-row); background: var(--color-accent-soft); border: 1px solid color-mix(in oklab, var(--color-accent) 25%, transparent); }
.pedido + .pedido { margin-top: var(--space-sm); }
.pedido .quem { font-weight: 700; font-size: var(--text-lg); }
.pedido .o-que { color: var(--color-ink-2); }
.pedido .acoes { display: flex; flex-wrap: wrap; gap: var(--space-xs); }

/* resumo do dia */
.resumo-dia { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin-top: var(--space-sm); }
.resumo-dia div { display: grid; }
.resumo-dia dt { font-size: var(--text-sm); color: var(--color-muted); }
.resumo-dia dd { margin: 0; font-weight: 700; font-size: var(--text-xl); font-variant-numeric: tabular-nums; }

/* ---------- Agenda ---------- */
.barra-agenda { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); }
.barra-agenda .navega { display: flex; align-items: center; gap: var(--space-2xs); }
.barra-agenda .periodo { font-weight: 650; min-width: 0; }
.barra-agenda .escolha { margin-left: auto; }
.btn-icone { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--color-rule-2); background: var(--color-surface); display: inline-grid; place-items: center; cursor: pointer; color: var(--color-ink); transition: background-color var(--dur-micro) var(--ease-out); }
.btn-icone:hover { background: var(--color-paper-2); }
.semana-lista .dia-sem { padding: var(--space-md) 0 var(--space-xs); display: flex; align-items: baseline; gap: var(--space-sm); }
.semana-lista .dia-sem.hoje h3 { color: var(--color-accent); }
.semana-lista .dia-sem .muted { font-size: var(--text-sm); }
.grade-semana { display: none; }
@media (min-width: 60rem) {
  .semana-lista { display: none; }
  .grade-semana { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border: 1px solid var(--color-rule); border-radius: var(--radius-row); background: var(--color-surface); overflow: hidden; }
  .grade-semana .cab-dia { padding: var(--space-sm) var(--space-xs); border-bottom: 1px solid var(--color-rule); border-left: 1px solid var(--color-rule); font-size: var(--text-sm); display: grid; text-decoration: none; color: inherit; }
  .grade-semana .cab-dia b { font-size: var(--text-xl); font-variant-numeric: tabular-nums; font-weight: 650; line-height: 1.1; }
  .grade-semana .cab-dia.hoje b { color: var(--color-accent); }
  .grade-semana .canto { border-bottom: 1px solid var(--color-rule); }
  .grade-semana .col { position: relative; border-left: 1px solid var(--color-rule); background: repeating-linear-gradient(to bottom, var(--color-rule) 0 1px, transparent 1px var(--hora-px)); }
  .grade-semana .col.folga { background-color: var(--color-paper-2); }
  .grade-semana .horas { position: relative; }
  .grade-semana .horas span { position: absolute; right: 8px; transform: translateY(-50%); font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; }
  .grade-semana .bloco { position: absolute; left: 3px; right: 3px; padding: var(--space-2xs) var(--space-xs) var(--space-2xs) var(--space-xs); border-radius: 8px; background: var(--color-paper-2); border: 1px solid var(--color-rule-2); font-size: var(--text-xs); line-height: 1.25; overflow: hidden; cursor: pointer; text-align: left; color: inherit; font-family: inherit; }
  .grade-semana .bloco::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cor-st, var(--color-accent)); }
  .grade-semana .bloco:hover { border-color: var(--color-muted); }
  .grade-semana .bloco b { display: block; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .grade-semana .bloco[data-st="confirmado"] { --cor-st: var(--color-ok); }
  .grade-semana .bloco[data-st="concluido"] { --cor-st: var(--color-rule-2); }
  .grade-semana .bloco[data-st="faltou"] { --cor-st: var(--color-warn); }
  .grade-semana .bloco[data-st="bloqueio"] { --cor-st: transparent; background: repeating-linear-gradient(135deg, var(--color-paper-2) 0 7px, var(--color-paper-3) 7px 14px); border-style: dashed; }
}
.mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--space-2xs); }
.mes .dsem { font-size: var(--text-sm); color: var(--color-muted); text-align: center; padding: var(--space-2xs) 0; }
.mes a { display: grid; align-content: start; gap: var(--space-2xs); min-height: 64px; padding: var(--space-xs); border-radius: 10px; border: 1px solid var(--color-rule); background: var(--color-surface); text-decoration: none; color: inherit; transition: border-color var(--dur-micro) var(--ease-out); }
.mes a:hover { border-color: var(--color-muted); }
.mes a.fora { opacity: 0.45; }
.mes a.hoje { border-color: var(--color-accent); box-shadow: inset 0 0 0 1px var(--color-accent); }
.mes a b { font-variant-numeric: tabular-nums; font-weight: 650; }
.mes a .qtd { font-size: 0.75rem; font-weight: 700; color: var(--color-accent); }
@media (min-width: 60rem) { .mes a { min-height: 96px; } }

/* ---------- Clientes / ficha ---------- */
.busca { position: relative; margin-bottom: var(--space-md); }
.busca svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--color-muted); pointer-events: none; }
.busca input { padding-left: 44px !important; }
.inicial { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--color-paper-3); color: var(--color-ink-2); font-weight: 700; }
.ficha-topo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-md); }
.ficha-topo .inicial { width: 56px; height: 56px; font-size: var(--text-xl); background: var(--color-accent-soft); color: var(--color-accent); }
.ficha-num { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-xl); margin: var(--space-lg) 0 0; }
.ficha-num div { display: grid; }
.ficha-num dt { font-size: var(--text-sm); color: var(--color-muted); }
.ficha-num dd { margin: 0; font-weight: 700; font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.alerta-anamnese { padding: var(--space-sm) var(--space-md); border-radius: 12px; background: var(--color-warn-soft); color: var(--color-ink); border: 1px solid color-mix(in oklab, var(--color-warn) 45%, transparent); margin-top: var(--space-md); }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 132px), 1fr)); gap: var(--space-xs); }
.fotos figure { margin: 0; position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--color-paper-3); }
.fotos img { width: 100%; height: 100%; object-fit: cover; }
.fotos figcaption { position: absolute; left: 6px; bottom: 6px; padding: var(--space-3xs) var(--space-xs); border-radius: 6px; background: var(--color-overlay); color: var(--color-overlay-ink); font-size: 0.75rem; font-weight: 650; }
.fotos .apagar-foto { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--color-overlay); color: var(--color-overlay-ink); display: grid; place-items: center; cursor: pointer; }
.medidor { height: 8px; border-radius: 4px; background: var(--color-paper-3); overflow: hidden; margin-top: var(--space-xs); }
.medidor i { display: block; height: 100%; background: var(--color-accent); transform-origin: left; }
.tabela { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.tabela th { text-align: left; font-size: var(--text-sm); font-weight: 600; color: var(--color-muted); padding: var(--space-xs) var(--space-xs) var(--space-xs) 0; border-bottom: 1px solid var(--color-rule-2); white-space: nowrap; }
.tabela td { padding: var(--space-sm) var(--space-xs) var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); vertical-align: top; }
.tabela td.num, .tabela th.num { text-align: right; padding-right: 0; }
@media (max-width: 40rem) {
  .tabela.empilha thead { display: none; }
  .tabela.empilha tr { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3xs) var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
  .tabela.empilha td { border: 0; padding: 0; }
  .tabela.empilha td:first-child { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-muted); }
}

/* ---------- Financeiro ---------- */
.saldo { display: grid; gap: var(--space-2xs); padding: var(--space-lg) 0 var(--space-md); border-bottom: 1px solid var(--color-rule); }
.saldo dt { color: var(--color-muted); font-weight: 600; }
.saldo dd { margin: 0; font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 650; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.saldo dd.negativo { color: var(--color-error); }
.numeros { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 0; margin: 0; }
.numeros > div { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: 1px solid var(--color-rule); }
.numeros dt { font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; }
.numeros dd { margin: var(--space-3xs) 0 0; font-weight: 700; font-size: var(--text-xl); font-variant-numeric: tabular-nums; }
.barras { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-sm); }
.barras li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-sm); }
.barras .trilha { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--color-paper-3); overflow: hidden; }
.barras .trilha i { display: block; height: 100%; width: 100%; background: var(--color-accent); transform-origin: left; }

/* ---------- Meu link ---------- */
.link-caixa { display: grid; gap: var(--space-sm); padding: var(--space-md); border-radius: var(--radius-row); background: var(--color-paper-2); border: 1px solid var(--color-rule); }
.link-caixa .url { font-weight: 700; font-size: var(--text-lg); word-break: break-all; color: var(--color-accent); }
.link-caixa .acoes { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.slug-linha { display: flex; align-items: stretch; border: 1px solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-surface); overflow: hidden; }
.slug-linha span { display: grid; place-items: center; padding: 0 var(--space-2xs) 0 var(--space-md); color: var(--color-muted); white-space: nowrap; font-size: var(--text-sm); }
.slug-linha input { border: 0 !important; min-width: 0; flex: 1; padding-left: 0 !important; }
.slug-linha:focus-within { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.slug-linha input:focus-visible { outline: none !important; }
.dias-trabalho { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-rule); }
.dias-trabalho li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); align-items: center; gap: var(--space-xs) var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
.dias-trabalho .faixas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.dias-trabalho input[type="time"] { min-height: 44px; padding: var(--space-xs) var(--space-xs); border: 1px solid var(--color-rule-2); border-radius: 10px; background: var(--color-surface); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.dias-trabalho input[type="time"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; }
.dias-trabalho input[type="time"]:disabled { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 40rem) { .dias-trabalho li { grid-template-columns: 1fr; } }
.previa { position: sticky; top: 24px; display: none; }
@media (min-width: 72rem) { .previa { display: block; } }
.previa iframe { width: 100%; height: 720px; border: 1px solid var(--color-rule-2); border-radius: 24px; background: var(--color-paper); }
.publicado { font-size: var(--text-sm); color: var(--color-muted); }

/* ---------- Mensagens ---------- */
.vars { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.vars code { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; padding: var(--space-3xs) var(--space-xs); border-radius: 6px; background: var(--color-paper-2); border: 1px solid var(--color-rule); }
.modelo + .modelo { margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); }

/* ---------- Folha (dialog) ---------- */
dialog.folha { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92dvh; border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-sheet); }
dialog.folha::backdrop { background: var(--color-scrim); }
dialog.folha[open] { animation: subir var(--dur-short) var(--ease-out); }
@keyframes subir { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 40rem) { dialog.folha { margin: auto; border-radius: var(--radius-sheet); } }
.folha-corpo { display: grid; gap: var(--space-md); padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 92dvh; }
.folha-cab { display: flex; align-items: flex-start; gap: var(--space-sm); }
.folha-cab h2 { flex: 1; font-size: var(--text-xl); font-family: var(--font-display); letter-spacing: -0.01em; }
.folha-rodape { display: flex; flex-wrap: wrap; gap: var(--space-xs); justify-content: flex-end; padding-top: var(--space-2xs); }
.folha-rodape .btn { flex: 1 1 auto; }
.aviso-conflito { padding: var(--space-sm) var(--space-md); border-radius: 12px; background: color-mix(in oklab, var(--color-error) 9%, var(--color-surface)); border: 1px solid color-mix(in oklab, var(--color-error) 45%, transparent); color: var(--color-ink); }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: var(--z-toast); transform: translateX(-50%); max-width: calc(100% - 32px); padding: var(--space-sm) var(--space-md); border-radius: 12px; background: var(--color-ink); color: var(--color-paper); font-weight: 600; box-shadow: var(--shadow-pop); animation: subir var(--dur-short) var(--ease-out); }
@media (min-width: 60rem) { .toast { bottom: 28px; left: calc(50% + 124px); } }

/* ---------- Entrada ---------- */
.entrada { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.entrada .lado { display: none; }
.entrada .form-lado { display: grid; align-content: center; justify-items: center; padding: var(--space-xl) var(--space-md); }
.entrada form, .entrada .caixa { width: 100%; max-width: 24rem; display: grid; gap: var(--space-md); }
.entrada h1 { font-size: var(--text-3xl); }
.entrada .marca { margin-bottom: var(--space-lg); }
.entrada .links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs); }
.entrada .links button { background: none; border: 0; padding: var(--space-sm) 0; min-height: 44px; color: var(--color-ink-2); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.entrada .links button:hover { color: var(--color-accent); }
.entrada .ainda-nao { margin-top: var(--space-md); text-align: center; }
.entrada .ainda-nao a { color: var(--color-accent); font-weight: 600; }
.msg-erro { color: var(--color-error); font-weight: 600; min-height: 1lh; }
.msg-ok { color: var(--color-ok); font-weight: 600; }
@media (min-width: 60rem) {
  .entrada { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .entrada .lado { display: grid; align-content: end; padding: var(--space-2xl); background: var(--color-paper-2); border-right: 1px solid var(--color-rule); }
  .entrada .lado p { font-family: var(--font-display); font-size: var(--text-3xl); line-height: 1.1; letter-spacing: -0.02em; max-width: 28ch; font-weight: 600; }
  .entrada .lado .fita-mini { margin-bottom: var(--space-xl); max-width: 360px; }
}
.fita-mini { display: grid; gap: var(--space-xs); }
.fita-mini div { display: grid; grid-template-columns: 3.2em 1fr; gap: var(--space-sm); align-items: center; }
.fita-mini span { font-size: var(--text-sm); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.fita-mini b { display: block; padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md); border-radius: 10px; background: var(--color-surface); border: 1px solid var(--color-rule-2); font-weight: 600; position: relative; overflow: hidden; }
.fita-mini b::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--color-accent); }
.fita-mini b.ok::before { background: var(--color-ok); }

/* ---------- Mais (menu no celular) ---------- */
.menu-mais { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--color-rule); }
.menu-mais li { border-bottom: 1px solid var(--color-rule); }
.menu-mais a { display: flex; align-items: center; gap: var(--space-md); min-height: 60px; padding: 0 var(--space-2xs); text-decoration: none; color: inherit; font-weight: 600; }
.menu-mais a svg { width: 22px; height: 22px; color: var(--color-muted); }
.menu-mais a:hover { background: var(--color-paper-2); }

details.ajuda { border-top: 1px solid var(--color-rule); }
details.ajuda:last-of-type { border-bottom: 1px solid var(--color-rule); }
details.ajuda summary { min-height: 52px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
details.ajuda summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
details.ajuda ol { margin: 0 0 var(--space-md); padding-left: 1.3em; display: grid; gap: var(--space-xs); }
.chamado { padding: var(--space-md) 0; border-bottom: 1px solid var(--color-rule); display: grid; gap: var(--space-xs); }
.chamado .msg { padding: var(--space-sm) var(--space-sm); border-radius: 12px; background: var(--color-paper-2); max-width: 46ch; white-space: pre-wrap; }
.chamado .msg.suporte { background: var(--color-accent-soft); justify-self: end; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
