/* ===== Rainha dos Salgados — base compartilhada (site + painel) ===== */
:root {
  --cream: #fff8ec;
  --cream-2: #fff0d2;
  --cream-3: #ffe6b3;
  --paper: #fffdf8;
  --ink: #2b1608;
  --ink-2: #6b4a2e;
  --ink-3: #9a7b5c;
  --gold: #ffc21a;
  --gold-2: #ffd75a;
  --orange: #ff8a1f;
  --red: #e8461e;
  --line: rgba(74, 37, 8, .12);
  --line-2: rgba(74, 37, 8, .2);
  --wa: #1faf55;
  --wa-2: #178f45;
  --danger: #c8341a;
  --ok: #1f8f4a;
  --brand-grad: linear-gradient(100deg, #ffb000 0%, #ff8a1f 48%, #e8461e 100%);
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(74, 37, 8, .06), 0 2px 8px rgba(74, 37, 8, .05);
  --shadow: 0 2px 4px rgba(74, 37, 8, .05), 0 10px 28px rgba(74, 37, 8, .09);
  --shadow-lg: 0 6px 14px rgba(74, 37, 8, .08), 0 22px 50px rgba(74, 37, 8, .16);
  --glass: rgba(255, 251, 242, .66);
  --glass-line: rgba(255, 255, 255, .7);
  --font-display: 'Lilita One', 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(255, 138, 31, .55); outline-offset: 2px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Fundo quente com manchas — dá profundidade ao vidro (glass) */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.bg-blobs i:nth-child(1) { width: 420px; height: 420px; background: #ffd75a; top: -140px; left: -120px; }
.bg-blobs i:nth-child(2) { width: 380px; height: 380px; background: #ffb36b; top: 30%; right: -160px; opacity: .4; }
.bg-blobs i:nth-child(3) { width: 360px; height: 360px; background: #ffe39a; bottom: -160px; left: 10%; opacity: .45; }

/* Vidro (glassmorphism) */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: saturate(170%) blur(16px);
  backdrop-filter: saturate(170%) blur(16px);
  border: 1px solid var(--glass-line);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 251, 242, .96); }
}

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: .2px; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .18s var(--spring), box-shadow .2s var(--ease), background .2s, opacity .2s;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-brand { color: #fff; background: var(--brand-grad); box-shadow: 0 6px 16px rgba(232, 70, 30, .28), inset 0 1px 0 rgba(255, 255, 255, .35); text-shadow: 0 1px 1px rgba(120, 30, 0, .25); }
.btn-dark { color: #fff; background: var(--ink); box-shadow: 0 6px 16px rgba(43, 22, 8, .25); }
.btn-wa { color: #fff; background: var(--wa); box-shadow: 0 6px 18px rgba(31, 175, 85, .32), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, .7); border: 1.5px solid var(--line-2); }
.btn-soft { color: var(--ink); background: var(--cream-2); }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
@media (hover: hover) {
  .btn:not([disabled]):hover { transform: translateY(-2px); }
  .btn-brand:not([disabled]):hover { box-shadow: 0 10px 24px rgba(232, 70, 30, .36), inset 0 1px 0 rgba(255, 255, 255, .35); }
  .btn-wa:not([disabled]):hover { background: var(--wa-2); box-shadow: 0 10px 24px rgba(31, 175, 85, .4); }
  .btn-ghost:hover { background: #fff; border-color: var(--orange); }
  .btn-soft:hover { background: var(--cream-3); }
}

/* Stepper de quantidade */
.stepper {
  display: inline-flex; align-items: center; height: 42px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--line-2); box-shadow: var(--shadow-sm);
}
.stepper button {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  transition: background .15s, transform .15s var(--spring);
}
.stepper button svg { width: 18px; height: 18px; }
.stepper button:active { transform: scale(.88); }
.stepper .plus { background: var(--brand-grad); color: #fff; margin: -1.5px; width: 45px; height: 45px; box-shadow: 0 3px 8px rgba(232, 70, 30, .3); }
.stepper input {
  width: 42px; height: 100%; border: 0; background: transparent; text-align: center;
  font-weight: 900; font-size: 1.05rem; padding: 0; -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; background: var(--cream-2); border-radius: 8px; }
@media (hover: hover) {
  .stepper .minus:hover { background: var(--cream-2); }
  .stepper .plus:hover { filter: brightness(1.06); }
}

/* Campos */
.field { display: grid; gap: 6px; }
.field > span, .label { font-weight: 800; font-size: .92rem; color: var(--ink); }
.field small, .hint { color: var(--ink-3); font-size: .82rem; font-weight: 600; }
.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  background: #fff; border: 1.5px solid var(--line-2); font-weight: 600;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input::placeholder { color: #b9a185; font-weight: 600; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255, 138, 31, .16); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(200, 52, 26, .12); }

/* Segmentado / chips de opção */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; flex: 1 1 0; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 8px 12px;
  border-radius: 14px; background: #fff; border: 1.5px solid var(--line-2); font-weight: 800; font-size: .93rem;
  text-align: center; cursor: pointer; transition: all .18s var(--ease);
}
.seg span svg { width: 18px; height: 18px; flex: none; }
.seg input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 4px 12px rgba(43, 22, 8, .2); }
.seg input:focus-visible + span { outline: 3px solid rgba(255, 138, 31, .55); outline-offset: 2px; }
@media (hover: hover) { .seg input:not(:checked) + span:hover { border-color: var(--orange); transform: translateY(-1px); } }

/* Interruptor */
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i {
  position: absolute; inset: 0; border-radius: 999px; background: #e3d4bf; transition: background .2s;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(43, 22, 8, .25); transition: transform .25s var(--spring);
}
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 3px solid rgba(255, 138, 31, .55); outline-offset: 2px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 200;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: .92rem;
  box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); text-align: center;
  transition: transform .3s var(--spring), opacity .2s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.raise { bottom: calc(108px + env(safe-area-inset-bottom)); }

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