/* ==========================================================================
   Quentinhas da Sih · sistema visual
   Inspirado no painel CSAT: vidro fosco, manchas de cor no fundo, títulos
   fortes em Albert Sans, texto em DM Sans, pílulas e cartões bem arredondados.
   Cores da marca: vinho/vermelho da logo + dourado da tigela do banner.
   ========================================================================== */

/* Fontes hospedadas no próprio site (licença OFL) */
@font-face { font-family: 'Albert Sans'; font-weight: 500; font-display: swap; src: url('/fonts/albert-500.woff2') format('woff2'); }
@font-face { font-family: 'Albert Sans'; font-weight: 600; font-display: swap; src: url('/fonts/albert-600.woff2') format('woff2'); }
@font-face { font-family: 'Albert Sans'; font-weight: 700; font-display: swap; src: url('/fonts/albert-700.woff2') format('woff2'); }
@font-face { font-family: 'Albert Sans'; font-weight: 800; font-display: swap; src: url('/fonts/albert-800.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/fonts/dmsans-400.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/fonts/dmsans-500.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 600; font-display: swap; src: url('/fonts/dmsans-600.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/fonts/dmsans-700.woff2') format('woff2'); }

:root {
  color-scheme: light;
  /* Paletas: coolors 780000-c1121f-fdf0d5-003049-669bbc
              e 001219-005f73-0a9396-94d2bd-e9d8a6-ee9b00-ca6702-bb3e03-ae2012-9b2226
     Só essas cores (e transparências delas). */
  --navy: #003049;     --navy-escuro: #001219;
  --vermelho: #c1121f; --vinho: #780000;
  --creme: #fdf0d5;    --areia: #e9d8a6;
  --azul: #669bbc;
  --petroleo: #005f73; --teal: #0a9396; --menta: #94d2bd;
  --ambar: #ee9b00;    --laranja: #ca6702; --ferrugem: #bb3e03; --tijolo: #ae2012; --bordo: #9b2226;

  /* Papéis */
  --primary: var(--navy);              /* títulos, seleção, navegação */
  --primary-mid: var(--vermelho);      /* sobretítulos */
  --brand: var(--vermelho);            /* botão principal */
  --brand-hover: var(--vinho);
  --brand-light: rgba(193, 18, 31, .35);
  --primary-tint: rgba(0, 48, 73, .06);
  --primary-card: rgba(0, 48, 73, .1);
  --primary-light: rgba(0, 48, 73, .18);
  --gold: var(--ambar);
  --gold-tint: rgba(238, 155, 0, .12);
  --good: var(--teal);   --good-tint: rgba(10, 147, 150, .12);
  --warn: var(--laranja); --warn-tint: rgba(202, 103, 2, .12);
  --bad: var(--bordo);   --bad-tint: rgba(155, 34, 38, .1);
  /* Neutros: fundo branco limpo, bordas e textos tirados do navy */
  --bg: #f5f6f7; --surface: #ffffff;
  --borda-painel: 1px solid rgba(0, 48, 73, .14); /* contorno suave dos painéis e cartões */
  --sombra-painel: 0 1px 2px rgba(0, 18, 25, .04), 0 6px 16px rgba(0, 18, 25, .05);
  --sombra-destaque: 0 10px 24px rgba(0, 48, 73, .16);
  --bg-alt: rgba(0, 48, 73, .05); --border: rgba(0, 48, 73, .12);
  --ink: #001219; --muted: rgba(0, 48, 73, .62); --quote: rgba(0, 18, 25, .8);
  /* Tipografia */
  --font-display: 'Albert Sans', Inter, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'DM Sans', Inter, 'Segoe UI', system-ui, sans-serif;
  /* Vidro fosco */
  --vidro-cor: 255, 255, 255; --vidro-sombra-cor: 0, 18, 25;
  --vidro-blur: 20px; --vidro-blur-fino: 9px;
  --vidro-opacidade: .62; --vidro-opacidade-solida: .94; --vidro-raio: 24px;
  --mancha-1: transparent; --mancha-2: transparent; --mancha-3: transparent; /* fundo branco limpo, sem manchas */

  /* Nomes antigos (usados nas outras folhas de estilo) apontando pros novos */
  --creme-2: var(--bg-alt); --papel: var(--surface);
  --telha: var(--brand); --telha-escura: var(--brand-hover); --telha-clara: var(--primary-tint);
  --mostarda: var(--gold); --folha: var(--good); --folha-clara: var(--good-tint);
  --cafe: var(--ink); --cafe-2: var(--muted); --linha: var(--border); --erro: var(--bad);
  --raio: 20px;
  --sombra: 0 8px 12px rgba(var(--vidro-sombra-cor), .06);
  --sombra-forte: 0 18px 50px rgba(var(--vidro-sombra-cor), .16);
  --fonte-titulo: var(--font-display); --fonte: var(--font-body);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; position: relative; min-height: 100vh;
}
/* Manchas de cor atrás do vidro */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 420px at 8% 4%, var(--mancha-1), transparent 70%),
    radial-gradient(560px 460px at 96% 22%, var(--mancha-2), transparent 70%),
    radial-gradient(620px 520px at 40% 104%, var(--mancha-3), transparent 70%);
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
.oculto { display: none !important; }
.muted { color: var(--muted); }
.preco { font-family: var(--font-display); font-weight: 800; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.overline { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--primary-mid); }
::selection { background: var(--primary-light); }

/* ---------- Vidro fosco ---------- */
.vidro, .cartao {
  background: rgba(var(--vidro-cor), var(--vidro-opacidade));
  -webkit-backdrop-filter: blur(var(--vidro-blur)) saturate(160%); backdrop-filter: blur(var(--vidro-blur)) saturate(160%);
  box-shadow: var(--sombra-painel); border: var(--borda-painel);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .vidro, .cartao { background: rgba(var(--vidro-cor), var(--vidro-opacidade-solida)); }
}
@media (prefers-reduced-transparency: reduce) {
  .vidro, .cartao { background: rgba(var(--vidro-cor), var(--vidro-opacidade-solida)); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.cartao { border-radius: var(--vidro-raio); padding: 22px 24px; }

/* ---------- Botões ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 13px 22px; font-family: var(--font-body); font-weight: 700; font-size: 15px; text-decoration: none;
  background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s; box-shadow: 0 6px 16px rgba(193, 18, 31, .22);
}
.btn:hover { background: var(--brand-hover); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 2px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.bloco { width: 100%; }
.btn.secundario { background: rgba(var(--vidro-cor), .7); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.btn.secundario:hover { background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary-light); }
.btn.verde { background: var(--teal); box-shadow: 0 6px 16px rgba(10, 147, 150, .22); }
.btn.verde:hover { background: var(--petroleo); }
.btn.escuro { background: var(--ink); box-shadow: none; }
.btn.pequeno { padding: 8px 14px; font-size: 13.5px; box-shadow: none; }
.btn-icone {
  width: 36px; height: 36px; border-radius: 999px; border: 0; background: rgba(var(--vidro-cor), .7); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border); font-size: 18px; font-weight: 600; display: inline-grid; place-items: center; line-height: 1; transition: background .15s;
}
.btn-icone:hover:not(:disabled) { background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary-light); }
.btn-icone:disabled { opacity: .4; }

/* ---------- Formulários ---------- */
label.campo { display: block; margin-bottom: 14px; }
label.campo > span { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--quote); }
.input, input[type=text], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=time], textarea, select {
  width: 100%; border: none; background: rgba(var(--vidro-cor), .75); box-shadow: inset 0 0 0 1px var(--border);
  border-radius: 14px; padding: 12px 14px; font-size: 15px; outline: none; transition: box-shadow .15s;
}
input:focus, textarea:focus, select:focus { box-shadow: inset 0 0 0 1.5px var(--primary); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; min-height: 70px; }
select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}

/* Pílulas de escolha */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: rgba(var(--vidro-cor), .7); box-shadow: inset 0 0 0 1px var(--border); font-weight: 600; font-size: 13.5px; cursor: pointer; user-select: none;
}
.chip input:checked + span { background: var(--primary-tint); box-shadow: inset 0 0 0 1px var(--primary-light); color: var(--primary); text-decoration: line-through; }
.chip input[type=radio]:checked + span { background: var(--primary); box-shadow: none; color: #fff; text-decoration: none; }
.chip input:focus-visible + span { outline: 3px solid var(--primary-light); outline-offset: 2px; }

/* Controle segmentado (igual ao .seg do CSAT) */
.segmento { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(var(--vidro-cor), .6); box-shadow: inset 0 0 0 1px var(--border); }
.segmento button { border: 0; background: transparent; padding: 9px 12px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); transition: .15s; }
.segmento button.ativo { background: var(--primary); color: #fff; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: rgba(0, 18, 25, .92); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: all .25s ease; z-index: 100; pointer-events: none; max-width: 90vw; text-align: center;
}
#toast.mostrar { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.erro { background: var(--bad); }

/* ---------- Folhas que sobem de baixo ---------- */
.fundo-sheet { position: fixed; inset: 0; background: rgba(0, 18, 25, .4); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 50; }
.fundo-sheet.aberto { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 92vh; z-index: 51;
  background: rgba(var(--vidro-cor), var(--vidro-opacidade-solida)); -webkit-backdrop-filter: blur(var(--vidro-blur)) saturate(160%); backdrop-filter: blur(var(--vidro-blur)) saturate(160%);
  border-radius: var(--vidro-raio) var(--vidro-raio) 0 0; transform: translateY(105%);
  display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; box-shadow: var(--sombra-forte);
  visibility: hidden; transition: transform .3s cubic-bezier(.2, .9, .3, 1), visibility 0s .3s;
}
.sheet.aberto { transform: translateY(0); visibility: visible; transition: transform .3s cubic-bezier(.2, .9, .3, 1); }
a.btn { text-decoration: none; }
.sheet-topo { padding: 10px 22px 6px; position: relative; }
.sheet-topo::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 9px; background: var(--border); margin: 0 auto 12px; }
.sheet-fechar { position: absolute; right: 16px; top: 18px; }
.sheet-corpo { padding: 6px 22px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-rodape { padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: rgba(var(--vidro-cor), .6); }
.sheet h3 { font-size: 22px; color: var(--primary); }
.sheet .secao-titulo { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 20px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.sheet .secao-titulo small { font-family: var(--font-body); font-weight: 600; font-size: 11.5px; color: var(--primary); background: var(--primary-tint); padding: 2px 9px; border-radius: 999px; }

/* Quantidade (− 1 +) */
.qtd { display: inline-flex; align-items: center; gap: 10px; background: rgba(var(--vidro-cor), .7); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--border); }
.qtd b { min-width: 22px; text-align: center; font-family: var(--font-display); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { .sheet, .fundo-sheet, #toast, .btn { transition: none; } }

/* Ícones de linha (substituem os emojis) */
.ico { width: 1.05em; height: 1.05em; display: inline-block; vertical-align: -.16em; flex: none; }
