/* New House — sistema de pedidos. Visual "app de banco": campo azul-marinho no
   topo, blocos brancos de borda fina, números grandes e sóbrios. Sem cartão
   flutuando, sem degradê, sem brilho colorido. Regras completas em DESIGN.md. */
:root {
  --brand: #2A528A;
  --brand-deep: #1E3F6E;
  --brand-tint: #E8EEF7;
  --brand-soft: #F3F6FB;
  --brand-text: #24538F;
  --navy: #0A1A38;
  --navy-2: #14284E;
  --on-navy: #FFFFFF;
  --on-navy-muted: #B4C1D9;
  --surface: #FFFFFF;
  --surface-alt: #F5F7FA;
  --ink: #0C1626;
  --muted: #566173;
  --hairline: #E3E7ED;
  --hairline-forte: #CBD2DC;
  --success: #1A7A4C;
  --success-tint: #E3F2EA;
  --aviso: #8A4B00;
  --aviso-tint: #FBF0DD;
  --error: #B3261E;
  --error-tint: #FBE9E7;
  --page: #E6EAF0;
  --card: #FFFFFF;
  /* O bloco precisa se soltar do fundo: borda mais firme e uma sombra curta. */
  --bloco-borda: #CAD2DE;
  --bloco-sombra: 0 1px 2px rgba(12, 22, 38, .07), 0 2px 8px rgba(12, 22, 38, .05);
  --font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bitter', Georgia, serif;
  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 9999px;
  /* Sombra só no que flutua de verdade: folhas, diálogos, menus e avisos. */
  --e2: 0 2px 6px rgba(12, 22, 38, .06), 0 8px 20px rgba(12, 22, 38, .10);
  --e3: 0 12px 24px rgba(12, 22, 38, .12), 0 28px 56px rgba(12, 22, 38, .20);
  --anel: rgba(42, 82, 138, .24);
  --t: 160ms cubic-bezier(.2, .7, .3, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #3C6CB0;
  --brand-deep: #4A7CC2;
  --brand-tint: #18294A;
  --brand-soft: #131F38;
  --brand-text: #A3C3EF;
  --navy: #0B1528;
  --navy-2: #17253F;
  --on-navy-muted: #A6B3CB;
  --surface: #111A2B;
  --surface-alt: #172236;
  --ink: #E9EDF4;
  --muted: #9CA8BC;
  --hairline: #222D42;
  --hairline-forte: #313E58;
  --success: #5CC792;
  --success-tint: rgba(92, 199, 146, .15);
  --aviso: #F5C27A;
  --aviso-tint: rgba(245, 194, 122, .15);
  --error: #F2867E;
  --error-tint: rgba(242, 134, 126, .15);
  --page: #0A111E;
  --card: #111A2B;
  --bloco-borda: #2A3650;
  --bloco-sombra: none;
  --e2: 0 2px 6px rgba(0, 0, 0, .34), 0 12px 28px rgba(0, 0, 0, .34);
  --e3: 0 12px 24px rgba(0, 0, 0, .40), 0 32px 60px rgba(0, 0, 0, .46);
  --anel: rgba(120, 164, 230, .34);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand-text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-sm); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
[hidden] { display: none !important; }

/* Superfícies que o navegador desenha também são nossas. */
::selection { background: var(--brand-tint); color: var(--brand-deep); }
:root[data-theme="dark"] ::selection { background: #2A4C86; color: #fff; }
input, textarea, [contenteditable] { caret-color: var(--brand); }
* { scrollbar-color: var(--hairline-forte) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: var(--r-pill); background: var(--hairline-forte); background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

/* Dinheiro, datas e contagens alinham em coluna. */
.tabela, .tile-valor, .saldo-num, .saldo-sub, .kpi strong, .g-val, .num, .espaco-linha strong, .ex-dir, .ex-mes span, .conta,
.resumo-linha span:last-child, .ll-dir, .cal-dia, .sb-num, .cab-valor {
  font-variant-numeric: tabular-nums;
}
.carregando { min-height: 100vh; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* Zoom travado: sem duplo toque; campos com 16px no celular (o iPhone dá zoom abaixo disso) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 899px) {
  input, select, textarea, .input, .busca input, .senha-caixa input, .linha-campo .nome, .linha-campo .valor, .linha-prod .preco input { font-size: 16px !important; }
}

/* ---------- Tela de abertura / carregamento ---------- */
.abertura { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: #0A1A38; color: #fff; }
.abertura-caixa { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.abertura-selo { width: 88px; height: 88px; border-radius: 9999px; margin-bottom: 12px; }
.abertura-marca { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 30px; line-height: 36px; }
.abertura-sub { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: #B4C1D9; }
.abertura-barra { position: relative; width: 160px; height: 3px; margin-top: 28px; border-radius: 9999px; background: rgba(255,255,255,.16); overflow: hidden; }
.abertura-barra span { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 9999px; background: #fff; animation: abertura-corre 1.2s ease-in-out infinite; }
.abertura-msg { margin-top: 12px; font-size: 14px; color: #D5DDE8; min-height: 20px; }
@keyframes abertura-corre { 0% { left: -40%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .abertura-barra span { animation: none; left: 30%; } }

/* ---------- Botões e campos ---------- */
.btn { height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--hairline-forte); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; transition: background var(--t), border-color var(--t), color var(--t), transform var(--t); }
.btn:hover { background: var(--surface-alt); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn-primario { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primario:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn-contorno { border-color: var(--brand-text); color: var(--brand-text); background: var(--card); }
.btn-contorno:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-text); }
.btn-perigo { color: var(--error); }
.btn-perigo:hover { background: var(--error-tint); border-color: var(--error); color: var(--error); }
.btn-fantasma { border-color: transparent; background: transparent; color: var(--muted); height: 48px; }
.btn-fantasma:hover { background: var(--surface-alt); border-color: transparent; color: var(--ink); }
.btn-grande { height: 52px; font-size: 16px; width: 100%; }
.btn-tracejado { height: 48px; width: 100%; border: 1.5px dashed var(--hairline-forte); background: transparent; color: var(--brand-text); border-radius: var(--r-md); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background var(--t), border-color var(--t); }
.btn-tracejado:hover { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.btn-icone { width: 44px; height: 44px; padding: 0; border-radius: var(--r-md); border: 1px solid var(--hairline-forte); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; flex: none; transition: background var(--t), border-color var(--t), color var(--t); }
.btn-icone:hover { background: var(--surface-alt); border-color: var(--muted); }
.btn-icone.redondo { border-radius: var(--r-pill); }
.btn:disabled { opacity: .5; cursor: default; }
.btn:disabled:hover { background: var(--card); border-color: var(--hairline-forte); transform: none; }
.btn-primario:disabled:hover { background: var(--brand); border-color: var(--brand); }
/* Link em forma de botão ("alterar", "Ver todos"). */
.link { padding: 0; border: none; background: none; color: var(--brand-text); font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color var(--t); }
.link:hover { text-decoration-color: currentColor; }
/* Área de toque maior que o texto, sem mexer no alinhamento. */
.link { position: relative; }
.link::after { content: ''; position: absolute; inset: -12px -8px; }

.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > label, .rotulo { font-size: 13.5px; font-weight: 600; }
.campo small { color: var(--muted); font-size: 12.5px; }
.input { height: 48px; width: 100%; padding: 0 14px; border: 1px solid var(--hairline-forte); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font-size: 15px; transition: border-color var(--t), box-shadow var(--t), background var(--t); }
.input:hover:not(:focus):not(:disabled) { border-color: var(--muted); }
.input:disabled { background: var(--surface-alt); color: var(--muted); }
textarea.input { height: auto; padding: 12px 14px; line-height: 22px; resize: vertical; }
select.input { padding-right: 8px; }
/* Menu suspenso do sistema (lista + texto livre) */
.combo { position: relative; width: 100%; }
.combo .input[role="combobox"] { padding-right: 38px; }
.combo-seta { position: absolute; top: 2px; right: 2px; bottom: 2px; width: 36px; border: none; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.combo-seta svg { transition: transform .15s; }
.combo.aberto .combo-seta svg { transform: rotate(180deg); }
.combo.aberto .input[role="combobox"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--anel); }
.combo-lista { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: max(100%, 200px); max-height: 264px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--e3); }
.combo.acima .combo-lista { top: auto; bottom: calc(100% + 4px); }
.item .combo .input[role="combobox"] { padding-right: 24px; }
.item .combo-seta { width: 22px; }
.combo-lista li { min-height: 44px; padding: 10px 12px; border-radius: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; line-height: 20px; color: var(--ink); cursor: pointer; }
.combo-lista li:hover, .combo-lista li.ativo { background: var(--brand-tint); }
.combo-lista li[aria-selected="true"] { color: var(--brand-text); font-weight: 600; }
.combo-lista li svg { flex: none; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--anel); }
.grade-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grade-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .grade-2 { grid-template-columns: 1fr; } }

/* Bloco: a unidade de tudo. Borda fina, sem sombra. */
.cartao { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cartao h2 { margin: 0; font-size: 15px; font-weight: 700; }
.cartao-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sutil { color: var(--muted); font-size: 13px; }
.ok { color: var(--success); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }

/* Status: etiqueta pequena; a bolinha dá a leitura antes da palavra. */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 8px 3px 7px; border-radius: 6px; white-space: nowrap; line-height: 16px; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: var(--r-pill); background: currentColor; flex: none; }
.st-orcamento { background: var(--surface-alt); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hairline); }
.st-aprovado { background: var(--aviso-tint); color: var(--aviso); }
.st-producao, .st-agendado { background: var(--brand-tint); color: var(--brand-text); }
.st-instalado { background: var(--success-tint); color: var(--success); }
.st-atrasado { background: var(--error-tint); color: var(--error); }
.st-atrasado::before { display: none; }
.tag-tipo { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--hairline-forte); color: var(--muted); white-space: nowrap; }
.tag-tipo.online { border-color: transparent; color: var(--brand-text); background: var(--brand-tint); }

.filtros { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }
.filtro { flex: none; height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--hairline-forte); background: var(--card); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; transition: background var(--t), border-color var(--t), color var(--t); }
.filtro:hover { border-color: var(--brand-text); color: var(--brand-text); }
.filtro.ativo { background: var(--ink); border-color: var(--ink); color: var(--card); font-weight: 600; }

.busca { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1px solid var(--hairline-forte); border-radius: var(--r-md); background: var(--surface); color: var(--muted); transition: border-color var(--t), box-shadow var(--t); }
.busca:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--anel); }
.busca input { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; font-size: 15px; color: var(--ink); }
.busca kbd { font-family: inherit; font-size: 11px; font-weight: 600; padding: 3px 7px; border: 1px solid var(--hairline-forte); border-radius: 6px; background: var(--surface-alt); color: var(--muted); }

.vazio { padding: 36px 16px; text-align: center; color: var(--muted); }

/* ---------- Estrutura (celular primeiro) ---------- */
.shell { min-height: 100vh; display: flex; }
.lateral { display: none; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
/* O topo azul-marinho é o que diz "aplicativo": logo branco, tema e perfil. */
.topo-cel { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--navy); color: var(--on-navy); }
.topo-cel a { display: flex; align-items: center; min-height: 44px; }
.topo-cel img { height: 30px; width: auto; }
.topo-cel .acoes { display: flex; gap: 8px; align-items: center; }
.topo-cel .btn-icone { width: 40px; height: 40px; border-color: transparent; background: rgba(255, 255, 255, .10); color: #fff; }
.topo-cel .btn-icone:hover { background: rgba(255, 255, 255, .18); border-color: transparent; }
.topo-cel .avatar { width: 40px; height: 40px; background: #fff; color: var(--navy); }
.topo-pc { display: none; }
.conteudo { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 1280px; }
.titulo-pagina { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.titulo-pagina h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; }
.avatar { width: 44px; height: 44px; border-radius: var(--r-pill); border: none; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex: none; }

.nav-cel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-around; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); border-top: 1px solid var(--hairline); background: var(--surface); }
.nav-cel a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 68px; height: 56px; font-size: 11.5px; font-weight: 500; color: var(--muted); text-decoration: none; border-radius: var(--r-md); transition: color var(--t); }
.nav-cel a.ativo { color: var(--brand-text); font-weight: 700; }
.nav-cel a.fab { width: 54px; height: 54px; margin-top: -22px; border-radius: var(--r-pill); background: var(--brand); color: #fff; box-shadow: 0 0 0 5px var(--surface); transition: background var(--t), transform var(--t); }
.nav-cel a.fab:active { transform: scale(.94); background: var(--brand-deep); }

/* Menu do celular: uma lista só, com divisórias. */
.menu-cel { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.menu-cel a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 16px; border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; font-weight: 500; transition: background var(--t); }
.menu-cel a:first-child { border-top: none; }
.menu-cel a:active { background: var(--surface-alt); }
.menu-cel a .esq { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-cel a .esq svg { flex: none; color: var(--brand-text); }

@media (min-width: 900px) {
  .lateral { display: flex; flex: 0 0 240px; position: sticky; top: 0; height: 100vh; background: var(--navy); color: #fff; padding: 22px 12px 16px; flex-direction: column; gap: 24px; }
  .lateral img { height: 38px; width: auto; align-self: flex-start; margin-left: 10px; }
  .lateral nav { display: flex; flex-direction: column; gap: 2px; }
  .lateral nav a { height: 44px; padding: 0 12px; border-radius: var(--r-sm); display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 500; color: var(--on-navy-muted); text-decoration: none; transition: background var(--t), color var(--t); }
  .lateral nav a svg { flex: none; }
  .lateral nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
  .lateral nav a.ativo { background: #fff; color: var(--navy); font-weight: 700; }
  :root[data-theme="dark"] .lateral nav a.ativo { background: var(--brand); color: #fff; }
  .lateral .usuario { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); background: var(--navy-2); }
  .lateral .usuario .avatar { width: 36px; height: 36px; font-size: 14px; background: #fff; color: var(--navy); }
  .lateral .usuario span { display: flex; flex-direction: column; font-size: 13px; min-width: 0; }
  .lateral .usuario .usuario-nome { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; flex: 1; padding: 2px 4px; margin: -2px -4px; border: none; border-radius: 6px; background: transparent; color: #fff; font-size: 13px; text-align: left; }
  .lateral .usuario .usuario-nome:hover { background: rgba(255,255,255,.08); }
  .lateral .usuario .usuario-nome strong { flex: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lateral .usuario .usuario-nome em { flex: none; font-style: normal; color: var(--on-navy-muted); font-size: 12px; white-space: nowrap; }
  .lateral .usuario .usuario-nome + button { margin-left: 0; }
  .lateral .usuario em { font-style: normal; color: var(--on-navy-muted); }
  .lateral .usuario button { margin-left: auto; background: transparent; border: none; color: var(--on-navy-muted); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }
  .lateral .usuario button:hover { color: #fff; }
  .principal { padding-bottom: 0; }
  .topo-cel, .nav-cel { display: none; }
  .topo-pc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--hairline); position: sticky; top: 0; z-index: 10; }
  .topo-pc .busca { flex: 1 1 320px; max-width: 520px; height: 44px; }
  .topo-pc .acoes { display: flex; gap: 10px; }
  .conteudo { padding: 24px 28px 32px; gap: 18px; }
  .titulo-pagina h1 { font-size: 26px; line-height: 32px; }
  .so-cel { display: none !important; }
}
@media (max-width: 899px) { .so-pc { display: none !important; } }

/* ---------- Ações rápidas: ícone redondo + rótulo ---------- */
.acoes-rapidas { display: flex; gap: 4px; }
.acao-r { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 2px; border: none; background: none; color: var(--ink); font-size: 12px; line-height: 15px; font-weight: 600; text-align: center; text-decoration: none; border-radius: var(--r-md); }
.acao-r .ic { width: 48px; height: 48px; border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand-text); display: flex; align-items: center; justify-content: center; flex: none; transition: background var(--t), color var(--t), transform var(--t); }
.acao-r:hover .ic { background: var(--brand); color: #fff; }
.acao-r:active .ic { transform: scale(.94); }
.no-escuro .acao-r { color: #fff; }
.no-escuro .acao-r .ic { background: rgba(255, 255, 255, .12); color: #fff; }
.no-escuro .acao-r:hover .ic { background: #fff; color: var(--navy); }
.no-escuro .acao-r:focus-visible { outline-color: #fff; }

/* ---------- Início: o "saldo" do mês ---------- */
.saldo { margin: -16px -16px 0; padding: 6px 16px 18px; background: var(--navy); color: var(--on-navy); border-radius: 0 0 var(--r-xl) var(--r-xl); display: flex; flex-direction: column; gap: 18px; }
.saldo-ola h1 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 700; }
.saldo-ola span { font-size: 13.5px; color: var(--on-navy-muted); }
.saldo-valor { display: flex; flex-direction: column; gap: 2px; }
.saldo-rotulo { display: flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--on-navy-muted); }
.olho-saldo { width: 44px; height: 40px; margin: -10px 0; border: none; background: none; color: var(--on-navy-muted); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.olho-saldo:hover { color: #fff; }
.olho-saldo:focus-visible { outline-color: #fff; }
.saldo-num { font-size: 34px; line-height: 42px; font-weight: 700; letter-spacing: -.02em; }
.saldo-sub { font-size: 13.5px; color: var(--on-navy-muted); }
.atalhos-cel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.atalhos-cel a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 6px; background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.atalhos-cel a svg { flex: none; color: var(--brand-text); }
.atalhos-cel a:active { background: var(--surface-alt); }
@media (min-width: 900px) {
  .saldo { margin: 0; padding: 24px 28px; border-radius: var(--r-lg); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ola acoes" "valor acoes"; align-items: center; gap: 14px 40px; }
  .saldo-ola { grid-area: ola; }
  .saldo-valor { grid-area: valor; }
  .saldo .acoes-rapidas { grid-area: acoes; gap: 12px; }
  .saldo .acao-r { flex: none; width: 96px; font-size: 13px; line-height: 17px; }
  .saldo .acao-r .ic { width: 56px; height: 56px; }
  .saldo-num { font-size: 40px; line-height: 48px; }
}

/* Faixa de números: um bloco só, dividido por linhas (não vários cartões). */
.faixa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
@media (min-width: 700px) { .faixa { grid-template-columns: repeat(4, minmax(0, 1fr)); } .faixa-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .faixa-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tile { background: var(--card); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); transition: background var(--t); }
a.tile:hover { background: var(--brand-soft); }
.tile-rotulo { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tile-valor { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; }
.tile-valor small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tile-sub { font-size: 12.5px; color: var(--muted); }
.tile-alerta .tile-rotulo, .tile-alerta .tile-valor { color: var(--error); }

.painel-grade { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; align-items: start; }
.lista-simples { display: flex; flex-direction: column; }
.lista-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 8px; margin: 0 -8px; border-top: 1px solid var(--hairline); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); transition: background var(--t); }
.lista-linha:first-child { border-top: none; }
a.lista-linha:hover { background: var(--brand-soft); }
.ll-esq { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: var(--ink); }
.ll-esq strong { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ll-esq span { font-size: 13px; color: var(--muted); }
.ll-esq .prazo { margin-top: 4px; }
.ll-dir { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; font-size: 13px; }
.ll-data { font-weight: 700; color: var(--brand-text); }
.ll-valor { font-size: 15px; font-weight: 700; }
.conta { min-width: 32px; height: 28px; padding: 0 8px; border-radius: var(--r-sm); background: var(--surface-alt); color: var(--ink); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.conta.ruim { background: var(--error-tint); color: var(--error); }
.conta.atencao { background: var(--aviso-tint); color: var(--aviso); }
.tudo-certo { margin: 0; padding: 6px 0; display: flex; align-items: center; gap: 8px; color: var(--success); font-size: 14px; font-weight: 600; }

.grafico { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; padding-top: 24px; margin-bottom: 22px; border-bottom: 1px solid var(--hairline); }
.g-col { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; outline-offset: 2px; border-radius: 6px; cursor: default; }
.g-col:hover .g-barra, .g-col:focus .g-barra { background: var(--brand-deep); }
.g-barra { width: min(100%, 36px); background: var(--brand); border-radius: 3px 3px 0 0; transition: background var(--t); }
:root[data-theme="dark"] .g-barra { background: #9DB8E3; }
:root[data-theme="dark"] .g-col:hover .g-barra, :root[data-theme="dark"] .g-col:focus .g-barra { background: #C4D5F0; }
.g-val { font-size: 13px; font-weight: 700; color: var(--ink); min-height: 16px; }
.g-rot { font-size: 12px; color: var(--muted); margin-bottom: -22px; height: 16px; }
.g-rot.atual { color: var(--ink); font-weight: 700; }
.g-tip { position: absolute; top: -6px; background: var(--ink); color: var(--card); font-size: 12px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none; }
.status-barras { display: flex; flex-direction: column; gap: 6px; }
.sb-linha { display: grid; grid-template-columns: 96px minmax(0, 1fr) 40px; align-items: center; gap: 12px; min-height: 40px; padding: 0 8px; margin: 0 -8px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-size: 14px; transition: background var(--t); }
.sb-linha:hover { background: var(--brand-soft); }
.sb-trilho { height: 10px; background: var(--surface-alt); border-radius: 3px; overflow: hidden; }
.sb-barra { display: block; height: 100%; background: var(--brand); }
:root[data-theme="dark"] .sb-barra { background: #9DB8E3; }
.sb-num { text-align: right; }

/* ---------- Extrato: listas do celular, um bloco por mês ---------- */
.extrato { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.extrato + .extrato { margin-top: 12px; }
.ex-mes { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface-alt); border-bottom: 1px solid var(--hairline); }
.ex-mes h2 { margin: 0; font-size: 13px; font-weight: 700; }
.ex-mes span { font-size: 12.5px; color: var(--muted); text-align: right; }
.ex-linha { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 14px; border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; transition: background var(--t); }
.ex-mes + .ex-linha { border-top: none; }
.ex-linha:active { background: var(--surface-alt); }
.ex-esq { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; flex: 1; }
.ex-esq > strong { font-size: 15px; line-height: 20px; font-weight: 600; overflow-wrap: anywhere; }
.ex-esq > span:not(.prazo) { font-size: 13px; line-height: 18px; color: var(--muted); }
.ex-esq .prazo { margin-top: 4px; }
.ex-dir { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; max-width: 46%; text-align: right; }
.ex-dir > strong { font-size: 15px; line-height: 20px; font-weight: 700; }
.ex-data { font-size: 12.5px; color: var(--muted); }

/* ---------- Lista de pedidos (PC) ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.kpi { background: var(--card); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; transition: background var(--t); }
.kpi:hover { background: var(--brand-soft); }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi strong { font-size: 26px; line-height: 32px; letter-spacing: -.02em; }

.tabela-box { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.tabela-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--hairline); }
.tabela-cab h2 { margin: 0; font-size: 16px; font-weight: 700; }
.tabela-rolagem { overflow-x: auto; }
table.tabela { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; padding: 10px 18px; background: var(--surface-alt); border-bottom: 1px solid var(--hairline); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tabela td { padding: 12px 18px; border-top: 1px solid var(--hairline); }
.tabela tbody tr:first-child td { border-top: none; }
.tabela tr.clicavel { cursor: pointer; }
.tabela tr.clicavel:hover td { background: var(--brand-soft); }
.tabela .num { font-weight: 700; color: var(--brand-text); text-decoration: none; }
.tabela .num:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn-lixo { width: 38px; height: 38px; color: var(--muted); }
.btn-lixo:hover { color: var(--error); border-color: var(--error); }
.btn-editar { color: var(--brand-text); text-decoration: none; }
.btn-editar:hover { border-color: var(--brand-text); color: var(--brand-text); }

/* ---------- Folha "O que você quer criar?" ---------- */
.sobreposicao { position: fixed; inset: 0; z-index: 50; background: rgba(10, 26, 56, .55); display: flex; align-items: flex-end; justify-content: center; }
.folha { width: 100%; max-width: 480px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; box-shadow: var(--e3); }
.folha .alca { align-self: center; width: 40px; height: 4px; border-radius: 9999px; background: var(--hairline-forte); }
.folha h1 { margin: 0; font-size: 20px; line-height: 26px; }
.folha-topo p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.opcoes-novo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opcao-tipo { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 132px; padding: 14px; border: 1px solid var(--hairline-forte); border-radius: var(--r-md); background: var(--card); color: var(--ink); font: inherit; text-align: left; text-decoration: none; transition: border-color var(--t), background var(--t); }
.opcao-tipo:hover, .opcao-tipo:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.opcao-tipo:active { background: var(--brand-tint); }
.opcao-tipo .ic { width: 40px; height: 40px; margin-bottom: 6px; border-radius: var(--r-md); background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.opcao-tipo strong { font-size: 15px; line-height: 20px; }
.opcao-tipo > span:last-child { font-size: 13px; line-height: 18px; color: var(--muted); }
@media (min-width: 900px) { .sobreposicao { align-items: center; } .folha { border-radius: var(--r-lg); padding: 20px; } .folha .alca { display: none; } }

/* ---------- Formulários de pedido ---------- */
.cab-form { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: calc(8px + env(safe-area-inset-top)) 8px 12px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; z-index: 10; }
.cab-form .linha { display: flex; align-items: center; gap: 4px; }
.cab-form .titulo { display: flex; flex-direction: column; min-width: 0; }
.cab-form .titulo strong { font-size: 17px; line-height: 22px; }
.cab-form .titulo span { font-size: 13px; color: var(--muted); }
.voltar { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--ink); flex: none; border-radius: var(--r-md); }
.etapas { list-style: none; margin: 0; padding: 0 8px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.etapas button { width: 100%; min-height: 40px; background: none; border: none; padding: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.etapas button::before { content: ''; height: 4px; border-radius: 9999px; background: var(--hairline); }
.etapas button.feita::before, .etapas button.atual::before { background: var(--brand); }
.etapas button.feita { color: var(--ink); }
.etapas button.atual { color: var(--brand-text); font-weight: 700; }
.corpo-form { padding: 16px; display: flex; flex-direction: column; gap: 14px; max-width: 760px; width: 100%; margin: 0 auto; }
.rodape-form { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--hairline); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; z-index: 10; }
.rodape-form .direita { display: flex; gap: 10px; margin-left: auto; }
.form-pagina { min-height: 100vh; display: flex; flex-direction: column; background: var(--page); }
.form-pagina .corpo-form { flex: 1; }

.item { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: border-color var(--t); }
.item.aberto { border-color: var(--brand); }
.item-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item-topo .esq { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 44px; background: none; border: none; padding: 0; text-align: left; color: var(--ink); flex: 1; }
.bolinha { width: 28px; height: 28px; border-radius: 9999px; background: var(--brand-tint); color: var(--brand-text); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.item.aberto .bolinha { background: var(--brand); color: #fff; }
.item-topo .esq span span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .grade-3 label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.item .grade-3 .input { height: 44px; padding: 0 10px; }
.mini { height: 36px; padding: 0 12px; font-size: 13px; }

.foto-caixa { min-height: 200px; border-radius: var(--r-md); border: 1.5px dashed var(--hairline-forte); background: var(--surface-alt); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); position: relative; overflow: hidden; text-align: center; padding: 12px; }
.foto-caixa img { max-width: 100%; max-height: 320px; border-radius: var(--r-sm); }
.foto-caixa .remover { position: absolute; top: 8px; right: 8px; }

.resumo-linha { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; font-size: 14px; padding-top: 10px; border-top: 1px solid var(--hairline); color: var(--ink); text-decoration: none; }
.resumo-linha span:first-child { flex: 1 1 auto; min-width: 0; color: var(--muted); }
.resumo-linha:first-of-type { border-top: none; padding-top: 0; }
.resumo-linha span:last-child { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
h2 + .resumo-linha { border-top: none; padding-top: 0; }

/* ---------- Detalhe do pedido ---------- */
.cab-detalhe { background: var(--navy); color: var(--on-navy); padding: calc(6px + env(safe-area-inset-top)) 8px 18px; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.cab-detalhe .interno { width: 100%; max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.cab-detalhe .linha { display: flex; align-items: center; gap: 2px; }
.cab-voltar { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none; border-radius: var(--r-md); }
.cab-voltar:hover { background: rgba(255, 255, 255, .10); }
.cab-rotulo { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--on-navy-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cab-detalhe .btn-claro { height: 40px; padding: 0 14px; margin-right: 8px; gap: 6px; border-radius: var(--r-md); border: 1px solid rgba(255, 255, 255, .34); background: transparent; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; flex: none; transition: background var(--t); }
.cab-detalhe .btn-claro:hover { background: rgba(255, 255, 255, .12); }
.cab-detalhe a:focus-visible, .cab-detalhe button:focus-visible { outline-color: #fff; }
.cab-detalhe .info { padding: 0 8px; display: flex; flex-direction: column; gap: 4px; }
.cab-detalhe h1 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; overflow-wrap: anywhere; }
.cab-valor { font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.02em; }
.cab-detalhe .st { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13.5px; color: var(--on-navy-muted); flex-wrap: wrap; }
.cab-detalhe .st .chip { background: #fff; color: var(--navy); }
.cab-detalhe .acoes-rapidas { padding: 4px 4px 0; }
.detalhe-corpo { padding: 14px 16px 24px; display: grid; gap: 12px; max-width: 1100px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) {
  .cab-detalhe { padding: 16px 28px 22px; border-radius: 0; }
  .cab-detalhe .acoes-rapidas { justify-content: flex-start; gap: 8px; }
  .cab-detalhe .acao-r { flex: none; width: 88px; }
  .detalhe-corpo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; padding: 24px 28px; }
  .detalhe-corpo .largo { grid-column: 1 / -1; }
}
.redondo-tint { width: 44px; height: 44px; border-radius: 9999px; background: var(--brand-tint); color: var(--brand-text); display: flex; align-items: center; justify-content: center; text-decoration: none; flex: none; transition: background var(--t), color var(--t), transform var(--t); }
.redondo-tint:hover { background: var(--brand); color: #fff; }
.redondo-tint:active { transform: scale(.94); }
.anexos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 700px) { .anexos { grid-template-columns: repeat(auto-fill, minmax(110px, 130px)); } }
.anexo { aspect-ratio: 1 / 1; border-radius: var(--r-md); background: var(--surface-alt); border: 1px solid var(--hairline); color: var(--brand-text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; overflow: hidden; position: relative; text-decoration: none; }
.anexo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.anexo.doc { background: var(--navy); border-color: var(--navy); color: #fff; }
.anexo-add { aspect-ratio: 1 / 1; border-radius: var(--r-md); border: 1.5px dashed var(--hairline-forte); background: transparent; color: var(--brand-text); display: flex; align-items: center; justify-content: center; transition: border-color var(--t), background var(--t); }
.anexo-add:hover { border-color: var(--brand); background: var(--brand-soft); }
.progresso { display: flex; flex-direction: column; gap: 6px; }
.progresso .txt { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); gap: 8px; }
.progresso .barra { height: 6px; border-radius: 9999px; background: var(--brand-tint); overflow: hidden; }
.progresso .barra div { height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.etapas-status { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.etapas-status li { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.etapas-status li::before { content: ''; height: 4px; border-radius: 9999px; background: var(--hairline); }
.etapas-status li.feita::before { background: var(--brand); }
.etapas-status li.atual { color: var(--brand-text); font-weight: 700; }
.acoes-rodape { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--hairline); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.acoes-rodape .btn { height: 48px; font-size: 15px; }
@media (min-width: 900px) { .acoes-rodape { position: static; border: none; background: transparent; padding: 0 28px 28px; max-width: 1100px; margin: 0 auto; width: 100%; display: flex; justify-content: flex-end; } }

/* ---------- Orçamento ---------- */
.orc-corpo { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.orc-campos { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.orc-previa { flex: 1 1 320px; max-width: 556px; min-width: 0; display: flex; flex-direction: column; gap: 10px; position: sticky; top: 90px; }
.previa-caixa { width: 100%; overflow: hidden; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: #fff; box-shadow: var(--e2); }
.previa-caixa > .a4 { transform-origin: top left; }
.linha-campo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.linha-campo.oculto { opacity: .55; }
.linha-campo .nome { flex: 1 1 150px; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--surface-alt); font-size: 13px; font-weight: 600; color: var(--muted); }
.linha-campo .valor { flex: 2 1 200px; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--hairline-forte); border-radius: var(--r-sm); background: var(--card); font-size: 15px; }
.linha-campo .olho.on { background: var(--brand-tint); color: var(--brand-text); }
.linha-campo .x { color: var(--error); }
.linha-campo.fixo .nome { background: var(--brand-tint); color: var(--brand-text); border-color: transparent; }
.linha-prod { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.linha-prod .n { width: 72px; font-size: 12.5px; font-weight: 600; color: var(--brand-text); }
.linha-prod .pnome { flex: 3 1 220px; min-width: 0; }
.linha-prod .preco { flex: 1 1 130px; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--hairline-forte); border-radius: var(--r-sm); background: var(--card); display: flex; align-items: center; gap: 6px; }
.linha-prod .preco input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 15px; font-weight: 600; text-align: right; }
.linha-prod .preco:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--anel); }
.linha-campo .nome, .linha-campo .valor, .linha-prod .preco, .campo-orc .valor, .senha-caixa { transition: border-color var(--t), box-shadow var(--t), background var(--t); }
.linha-campo .valor:focus, .campo-orc .valor:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--anel); }
.segmento { display: flex; padding: 4px; border-radius: var(--r-md); background: var(--surface-alt); border: 1px solid var(--hairline); }
.segmento button { height: 40px; padding: 0 12px; border: none; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: background var(--t), color var(--t); }
.segmento button:hover[aria-pressed="false"] { color: var(--ink); }
.segmento button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--hairline-forte); }
.obrig { color: var(--error); margin-left: 3px; }
.fixo-info { flex: none; font-size: 12.5px; font-weight: 600; color: var(--brand-text); padding: 0 6px; width: 96px; text-align: center; }
.linha-campo .valor.invalido-suave, .campo-orc .valor.invalido-suave { border-color: #E9A39E; }
.linha-campo .valor.invalido, .campo-orc .valor.invalido, .input.invalido { border-color: var(--error) !important; box-shadow: 0 0 0 3px rgba(179, 38, 30, .18) !important; }
@media (max-width: 760px) {
  .linha-campo { padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
  .linha-campo .nome { flex: 1 1 100%; height: 36px; background: transparent; border-color: transparent; padding: 0 2px; }
  .linha-campo.fixo .nome { background: transparent; }
  .fixo-info { width: auto; }
  .linha-prod .n { flex: 1 1 100%; width: auto; }
  .linha-prod .pnome { flex: 1 1 100%; }
  .segmento { width: 100%; } .segmento button { flex: 1; }
  .orc-previa { position: static; }
}
.desconto { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px dashed var(--hairline-forte); border-radius: var(--r-md); }
.desconto.ativo { border-style: solid; border-color: var(--brand-text); background: var(--surface-alt); }
.salvo-status { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); }
.salvo-status.ok { color: var(--success); }
.salvo-status.erro { color: var(--error); }
.chips-amb { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-amb { height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px dashed var(--brand-text); background: transparent; color: var(--brand-text); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: background var(--t), border-color var(--t); }
.chip-amb:hover, .chip-amb:focus-visible { background: var(--brand-tint); border-style: solid; }
#sec-pecas .item { padding: 12px; }
.modo-explica { margin: 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-alt); color: var(--muted); font-size: 13px; line-height: 18px; }
.modo-explica strong { color: var(--ink); }
/* Campos por catálogo */
.campo-orc { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--hairline); }
.campo-orc:last-of-type { border-bottom: none; }
.campo-orc.oculto { opacity: .5; }
.campo-orc .rot { grid-column: 1 / -1; display: flex; align-items: center; gap: 4px; min-height: 28px; font-size: 13px; font-weight: 600; color: var(--muted); }
.campo-orc .rot button { width: 36px; height: 36px; margin: -4px 0; border: none; background: transparent; color: var(--brand-text); display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); cursor: pointer; }
.campo-orc .rot button:hover { background: var(--brand-tint); }
.campo-orc .valor { grid-column: 1; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--hairline-forte); border-radius: var(--r-sm); background: var(--card); color: var(--ink); font-size: 15px; width: 100%; }
.campo-orc .olho.on { background: var(--brand-tint); color: var(--brand-text); }
.campo-orc .x { color: var(--error); }
.campo-orc .obrig-tag { font-size: 12px; font-weight: 600; color: var(--brand-text); background: var(--brand-tint); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.onde-sai { margin: 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-alt); color: var(--muted); font-size: 12.5px; line-height: 17px; }
.chips-campo { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-campo { height: 36px; padding: 0 12px; border-radius: var(--r-sm); border: 1px dashed var(--hairline-forte); background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; transition: background var(--t), border-color var(--t), color var(--t); }
.chip-campo:hover, .chip-campo:focus-visible { border-style: solid; border-color: var(--brand-text); background: var(--brand-tint); color: var(--brand-text); }
.chips-rot { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-right: 2px; }

/* ---------- Documento A4 ---------- */
/* O documento é medido ao milímetro: não herda nada da tipografia do app. */
.a4 { width: 794px; height: 1123px; flex: none; box-sizing: border-box; padding: 48px 56px 32px; background: #fff; color: #06102F; font-family: 'Inter', system-ui, sans-serif; font-size: 12px; letter-spacing: normal; display: flex; flex-direction: column; gap: 20px; line-height: 1.35; overflow: hidden; }
.a4 * { box-sizing: border-box; }
.a4 .marca { font-family: var(--display); font-style: italic; font-weight: 800; color: #2A528A; }
.a4 .cap { font-size: 8.5px; letter-spacing: .2em; color: #55607A; }
.a4 .cap-forte { font-size: 8.5px; font-weight: 700; letter-spacing: .25em; color: #2A528A; }
.doc-pagina { min-height: 100vh; background: #5A6477; display: flex; flex-direction: column; align-items: center; }
:root[data-theme="dark"] .doc-pagina { background: #141C31; }
.doc-barra { position: sticky; top: 0; z-index: 5; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--surface); border-bottom: 1px solid var(--hairline); }
.doc-titulo { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; }
.doc-titulo strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-barra .acoes { display: flex; gap: 8px; flex: none; }
/* A moldura tem o tamanho que se vê; a folha dentro dela é só reduzida. */
.doc-folha-caixa { width: 100%; padding: 16px 12px 24px; overflow-x: auto; }
.doc-escala { margin: 0 auto; overflow: hidden; background: #fff; box-shadow: 0 8px 28px rgba(0, 0, 0, .32); }
.doc-escala .a4 { transform-origin: top left; }
.doc-zoom { position: fixed; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 6; height: 44px; padding: 0 16px; border: none; border-radius: var(--r-pill); background: var(--navy); color: #fff; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--e2); }
/* Campos do recibo, acima da folha */
.doc-painel { width: calc(100% - 24px); max-width: 794px; margin: 12px 0 0; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.doc-painel .onde-sai { margin: 0; }
.doc-painel select.input { height: 48px; }
@media (max-width: 899px) {
  /* No celular as ações do documento ficam embaixo, ao alcance do polegar. */
  .doc-pagina { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .doc-barra .acoes { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--hairline); }
  .doc-barra .acoes .btn { height: 56px; padding: 0 4px; flex-direction: column; gap: 3px; font-size: 12.5px; }
}

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body * { visibility: hidden; }
  .imprimir, .imprimir * { visibility: visible; }
  .imprimir { position: absolute; left: 0; top: 0; transform: none !important; box-shadow: none !important; margin: 0 !important; }
  .doc-barra, .doc-zoom, .doc-painel { display: none !important; }
  .doc-pagina { min-height: 0; display: block; padding: 0 !important; }
  .doc-folha-caixa { padding: 0; height: 1123px !important; overflow: hidden; }
  .doc-escala { width: auto !important; height: auto !important; overflow: visible !important; box-shadow: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: flex; justify-content: center; background: var(--surface); }
.login-caixa { width: 100%; max-width: 440px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.login-topo { background: var(--navy); padding: calc(44px + env(safe-area-inset-top)) 28px 36px; border-radius: 0 0 var(--r-xl) var(--r-xl); }
.login-topo img { display: block; width: 172px; height: auto; }
.login-corpo { flex: 1; padding: 32px 28px 24px; display: flex; flex-direction: column; gap: 28px; }
.login-corpo h1 { margin: 0; font-size: 24px; line-height: 30px; }
.login-corpo p { margin: 0; color: var(--muted); }
.login-rodape { padding: 0 28px calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px; line-height: 19px; }
.login-rodape p { margin: 0; }
.senha-caixa { display: flex; align-items: center; height: 52px; border: 1px solid var(--hairline-forte); border-radius: var(--r-md); padding: 0 4px 0 16px; background: var(--surface); }
.senha-caixa:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--anel); }
.senha-caixa input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 15px; }
.erro { color: var(--error); font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }
@media (min-width: 900px) {
  .login { background: var(--page); align-items: center; }
  .login-caixa { min-height: 0; border: 1px solid var(--hairline); border-radius: var(--r-lg); overflow: hidden; }
  .login-topo { border-radius: 0; padding: 36px 28px 30px; }
}

/* ---------- Telas com cabeçalho próprio dentro do layout ---------- */
.shell.pagina .principal { padding-bottom: 0; }
.shell.pagina .form-pagina { min-height: 100vh; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Janela de confirmação ---------- */
.dialogo-fundo { align-items: center; padding: 16px; }
.dialogo { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--e3); }
.dialogo h2 { margin: 0; font-size: 18px; line-height: 24px; }
.dialogo p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 14px; }
.dialogo-ic { width: 44px; height: 44px; border-radius: 9999px; background: var(--brand-tint); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }
.dialogo-ic.perigo { background: var(--error-tint); color: var(--error); }
.dialogo-acoes { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.btn-perigo-cheio { background: #B3261E; border-color: #B3261E; color: #fff; }
.btn-perigo-cheio:hover { background: #8C1D17; border-color: #8C1D17; }

/* ---------- Clientes: uma linha por cliente, que abre ao tocar ---------- */
.clientes-lista { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); overflow: hidden; }
.cliente { border-top: 1px solid var(--hairline); }
.cliente:first-child { border-top: none; }
.cliente summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; cursor: pointer; list-style: none; transition: background var(--t); }
.cliente summary::-webkit-details-marker { display: none; }
.cliente summary:hover { background: var(--brand-soft); }
.cliente summary:focus-visible { outline-offset: -2px; }
.cliente-av { width: 40px; height: 40px; font-size: 14px; background: var(--brand-tint); color: var(--brand-text); }
.cliente-seta { flex: none; display: flex; color: var(--muted); transition: transform var(--t); }
.cliente[open] .cliente-seta { transform: rotate(90deg); }
.cliente[open] summary { background: var(--surface-alt); }
.cliente-corpo { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--hairline); }
.cliente-corpo .acoes-rapidas { margin-bottom: 4px; max-width: 420px; }
.cliente-ped { display: inline-flex; align-items: center; gap: 8px; }
a.resumo-linha { min-height: 44px; align-items: center; }
a.resumo-linha:hover span:first-child { color: var(--brand-text); }

/* ---------- Agenda ---------- */
.agenda-grade { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1000px) { .agenda-grade { grid-template-columns: 360px minmax(0, 1fr); } .calendario { position: sticky; top: 84px; } }
.cal-topo { display: flex; align-items: center; justify-content: space-between; }
.cal-titulo { font-size: 16px; }
.cal-semana, .cal-grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal-semana span { font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-dia { position: relative; aspect-ratio: 1 / 1; min-height: 40px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 14px; padding: 0; transition: background var(--t), color var(--t); }
.cal-dia:hover { background: var(--surface-alt); }
.cal-dia.passado { color: var(--muted); }
.cal-dia.tem { background: var(--brand-tint); font-weight: 700; color: var(--ink); }
.cal-dia.hoje { border-color: var(--brand-text); }
.cal-dia.sel { background: var(--brand); color: #fff; }
.cal-dia.atrasado .cal-qtd { background: #B3261E; }
.cal-qtd { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; }
.cal-dia.sel .cal-qtd { background: #fff; color: var(--brand); }
.cal-dia.nao-util:not(.sel) .cal-n { color: var(--muted); opacity: .7; }
.cal-dia.feriado:not(.sel) { background: repeating-linear-gradient(135deg, transparent 0 5px, var(--surface-alt) 5px 7px); }
.cal-dia.feriado:not(.sel) .cal-n { text-decoration: underline dotted; }
.ag-lista { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ag-grupo { display: flex; flex-direction: column; gap: 8px; }
.ag-dia { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ag-item { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-md); padding: 12px; }
/* A hora é o bloco que marca o item — não uma tarja colorida na borda. */
.ag-hora { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; align-self: stretch; padding: 8px 6px; border-radius: var(--r-sm); background: var(--brand-tint); font-size: 13px; font-weight: 600; color: var(--brand-text); text-align: center; }
.ag-item.alerta .ag-hora { background: var(--error-tint); color: var(--error); }
.ag-info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.ag-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-nome { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.ag-nome:hover { text-decoration: underline; text-underline-offset: 3px; }
.ag-info .sutil { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-end { font-size: 13px; color: var(--ink); }
.ag-acoes { display: flex; gap: 8px; align-items: center; }
@media (max-width: 560px) {
  /* No celular a hora vira uma etiqueta no topo: o texto fica com a largura toda. */
  .ag-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "hora hora" "info acoes"; gap: 8px 12px; padding: 12px 14px; }
  .ag-hora { grid-area: hora; flex-direction: row; gap: 8px; justify-self: start; align-self: auto; padding: 4px 10px; border-radius: 6px; }
  .ag-info { grid-area: info; }
  .ag-acoes { grid-area: acoes; flex-direction: column; align-self: center; }
}

/* ---------- Configurações ---------- */
.barra-salvar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 15; max-width: 820px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-md); background: var(--navy); color: #fff; box-shadow: var(--e3); }
.barra-salvar > span:first-child { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.barra-salvar .btn:not(.btn-primario) { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
@media (min-width: 900px) { .barra-salvar { bottom: 16px; } }
.espaco { display: flex; flex-direction: column; gap: 8px; }
.espaco-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.espaco-linha strong { font-size: 20px; }
.espaco-trilho { height: 10px; border-radius: 3px; background: var(--surface-alt); border: 1px solid var(--hairline); overflow: hidden; }
.espaco-trilho span { display: block; height: 100%; background: var(--brand); }
:root[data-theme="dark"] .espaco-trilho span { background: #9DB8E3; }
.espaco.alerta .espaco-trilho span { background: #B3261E; }
.espaco-aviso { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--error); }

/* ---------- Prazo em dias úteis ---------- */
/* Pode quebrar em duas linhas: em telas estreitas ele não vaza do bloco. */
.prazo { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; max-width: 100%; font-size: 12px; line-height: 16px; font-weight: 600; padding: 3px 8px; border-radius: 6px; text-align: left; }
.prazo svg { flex: none; }
.tabela .prazo { white-space: nowrap; }
.prazo-neutro { background: var(--surface-alt); color: var(--muted); box-shadow: inset 0 0 0 1px var(--hairline); }
.prazo-ok { background: var(--success-tint); color: var(--success); }
.prazo-atencao { background: var(--aviso-tint); color: var(--aviso); }
.prazo-ruim { background: var(--error-tint); color: var(--error); }

#toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 100; background: var(--navy); color: #fff; padding: 12px 18px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; box-shadow: var(--e3); opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity var(--t), transform var(--t); max-width: calc(100% - 32px); }
:root[data-theme="dark"] #toast { background: #E9EDF4; color: #0C1626; }
#toast.mostrar { opacity: 1; transform: translate(-50%, 0); }
#toast.erro { background: #9E2019; color: #fff; }

/* ---------- Assinatura do cliente ---------- */
.assinar-folha { max-width: 720px; }
.assinar-quadro { position: relative; width: 100%; border: 1.5px dashed var(--hairline-forte); border-radius: var(--r-md); background: #fff; overflow: hidden; }
.assinar-quadro canvas { display: block; width: 100%; aspect-ratio: 1000 / 340; touch-action: none; cursor: crosshair; }
.assinar-linha { position: absolute; left: 8%; right: 8%; bottom: 22%; height: 1px; background: #C9D3E2; pointer-events: none; }
.assinar-dica { position: absolute; left: 8%; bottom: calc(22% + 6px); font-size: 13px; color: #8490A6; pointer-events: none; }
.assin-feita { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface-alt); }
.assin-feita img { height: 56px; max-width: 220px; object-fit: contain; background: #fff; border-radius: var(--r-sm); padding: 4px 8px; }
.assin-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 140px; }
.assin-info strong { font-size: 14px; }
.assin-info .sutil { font-size: 12.5px; }
.assin-acoes { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Página do cliente: assinar o pedido pelo link ---------- */
.assinar-pagina { min-height: 100vh; min-height: 100dvh; background: var(--page); display: flex; flex-direction: column; }
.assinar-topo { background: var(--navy); padding: calc(18px + env(safe-area-inset-top)) 20px 18px; border-radius: 0 0 var(--r-xl) var(--r-xl); display: flex; justify-content: center; }
.assinar-topo img { height: 38px; width: auto; }
.assinar-corpo { flex: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.assinar-intro h1 { margin: 0 0 4px; font-size: 24px; line-height: 30px; }
.assinar-intro p { margin: 0; color: var(--muted); max-width: 62ch; }
.assinar-espera { margin: 40px 0; text-align: center; color: var(--muted); }
.assinar-estado { margin: 24px auto 0; max-width: 460px; padding: 28px 24px; background: var(--card); border: 1px solid var(--bloco-borda); border-radius: var(--r-lg); box-shadow: var(--bloco-sombra); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.assinar-estado h1 { margin: 0; font-size: 20px; line-height: 26px; }
.assinar-estado p { margin: 0; color: var(--muted); line-height: 1.5; }
.assinar-estado .dialogo-ic:not(.perigo) { background: var(--success-tint); color: var(--success); }
.assinar-doc { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--r-sm); background: var(--surface-alt); }
.assinar-doc .doc-escala { box-shadow: none; }
.aviso-local .link { color: inherit; font-size: inherit; font-weight: 700; text-decoration-color: currentColor; }
.aviso-local { padding: 10px 12px; border-radius: var(--r-sm); background: var(--aviso-tint); color: var(--aviso); font-size: 13px; line-height: 18px; font-weight: 500; }
.assin-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; padding-top: 4px; }
.assinar-li { align-items: flex-start; color: var(--ink); font-weight: 600; }
.assinar-li input { margin-top: 1px; flex: none; }

/* ---------- Blocos: destaque sobre o fundo ---------- */
/* Todo bloco de conteúdo usa a mesma borda e a mesma sombra curta, para se
   separar do fundo da página (principalmente no tema claro). */
.cartao, .extrato, .faixa, .kpis, .atalhos-cel, .menu-cel, .tabela-box, .clientes-lista, .ag-item, .item, .doc-painel {
  border-color: var(--bloco-borda); box-shadow: var(--bloco-sombra);
}
.item.aberto { border-color: var(--brand); }
.cartao h2 { font-size: 16px; }
.cartao-topo, .cartao > h2:first-child { padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.cartao-topo h2 { padding: 0; border: none; }
.ag-dia { font-size: 15px; }

/* Campo Produto com lista (orçamento): o menu suspenso ocupa o lugar do campo. */
.linha-prod .combo { flex: 3 1 220px; width: auto; min-width: 0; }
@media (max-width: 760px) { .linha-prod .combo { flex: 1 1 100%; } }

/* Dedo no lugar do mouse: alvos de toque com pelo menos 40px. */
@media (pointer: coarse) {
  .mini { height: 40px; }
  .chip-campo { height: 40px; }
  .cal-dia { min-height: 44px; }
}

/* Folhas e diálogos entram em resposta ao toque — única animação de entrada. */
@keyframes sobe-folha { from { transform: translateY(16px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes aparece-dialogo { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes clareia { from { opacity: 0; } to { opacity: 1; } }
.sobreposicao { animation: clareia 140ms ease-out; }
.folha { animation: sobe-folha 200ms cubic-bezier(.2, .7, .3, 1); }
.dialogo { animation: aparece-dialogo 160ms cubic-bezier(.2, .7, .3, 1); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
