/* =========================================================
   MARIA CAKES — base compartilhada (site + gestão)
   Paleta tirada do catálogo 2026/27: lilás → roxo profundo,
   rosa chiclete e bege-areia.
   ========================================================= */
:root {
  /* Paleta da logo Maria Cakes: vinho do aro, dourado do letreiro,
     rosa aquarela do fundo. (Nomes antigos mantidos para não mexer no resto.) */
  --roxo-900: #3a1f1c;   /* cacau profundo */
  --roxo-800: #5e2c2d;   /* vinho escuro */
  --roxo-700: #8e3f45;   /* vinho do aro da logo */
  --roxo-500: #b0787b;   /* rosé queimado */
  --lilas-300: #ecc8c1;  /* rosa aquarela */
  --lilas-100: #fbefeb;  /* rosa névoa */
  --rosa-500: #a64d55;   /* botão principal */
  --rosa-600: #8e3f45;
  --rosa-100: #fbe8e4;
  --areia-400: #c39a52;  /* dourado */
  --areia-200: #efe1c6;
  --ouro: #b88a3e;
  --ouro-escuro: #7d5326;
  --creme: #fffaf7;
  --tinta: #2f1d1a;
  --tinta-2: #6e5550;
  --linha: #f1e0db;
  --ok: #3e8e6a;
  --erro: #b4464b;
  --raio: 16px;
  --raio-sm: 10px;
  --sombra: 0 12px 32px -14px rgba(94, 44, 45, .28);
  --f-script: "Great Vibes", cursive;
  --f-titulo: "Cormorant Garamond", Georgia, serif;
  --f-ui: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--f-ui); color: var(--tinta); background: var(--creme); line-height: 1.55; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--roxo-700); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .8em 1.4em; cursor: pointer;
  background: var(--rosa-500); color: #fff; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; transition: transform .15s, background .15s, box-shadow .15s;
  box-shadow: 0 6px 16px -8px rgba(142, 63, 69, .55);
}
.btn:hover { background: var(--rosa-600); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-roxo { background: var(--roxo-700); box-shadow: 0 6px 16px -8px rgba(94, 44, 45, .6); }
.btn-roxo:hover { background: var(--roxo-800); }
.btn-ghost { background: transparent; color: var(--roxo-700); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: var(--lilas-100); }
.btn-claro { background: #fff; color: var(--roxo-800); }
.btn-claro:hover { background: var(--lilas-100); }
.btn-whats { background: #1faa59; box-shadow: 0 6px 16px -8px rgba(31, 170, 89, .8); }
.btn-whats:hover { background: #178a48; }
.btn-sm { padding: .5em 1em; font-size: .85rem; }
.btn-bloco { width: 100%; }
.btn-icone { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ---------- chips ---------- */
.chip {
  --c: var(--roxo-500);
  display: inline-flex; align-items: center; gap: .35em; padding: .25em .7em; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, white); border: 1px solid color-mix(in srgb, var(--c) 30%, white);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* ---------- formulários ---------- */
.campo { display: grid; gap: .35rem; margin-bottom: .9rem; }
.campo label, .rotulo { font-size: .8rem; font-weight: 600; color: var(--tinta-2); }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: .7em .9em; border-radius: var(--raio-sm); border: 1.5px solid var(--linha);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--roxo-500); box-shadow: 0 0 0 4px rgba(166, 77, 85, .15);
}
.campo textarea { min-height: 80px; resize: vertical; }
.campo small { color: var(--tinta-2); font-size: .75rem; }
.linha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 520px) { .linha-2 { grid-template-columns: 1fr; } }

.opcoes { display: flex; flex-wrap: wrap; gap: .4rem; }
.opcao { position: relative; }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao span {
  display: inline-block; padding: .45em .85em; border-radius: 999px; border: 1.5px solid var(--linha);
  background: #fff; font-size: .82rem; cursor: pointer; transition: all .15s; user-select: none;
}
.opcao input:checked + span { background: var(--roxo-700); border-color: var(--roxo-700); color: #fff; }
.opcao input:focus-visible + span { box-shadow: 0 0 0 3px rgba(139, 92, 196, .35); }
.opcao input:disabled + span { opacity: .4; cursor: not-allowed; }
.opcao span em { font-style: normal; font-size: .72em; opacity: .8; }

/* ---------- stepper de quantidade ---------- */
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--linha); border-radius: 999px; background: #fff; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--roxo-700); }
.stepper button:hover { background: var(--lilas-100); }
.stepper input { width: 64px; text-align: center; border: 0; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }

/* ---------- modais ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60; display: none; align-items: flex-end; justify-content: center;
  background: rgba(30, 12, 50, .55); backdrop-filter: blur(3px); padding: 0;
}
.modal.aberto { display: flex; animation: fade .2s ease; }
.modal-caixa {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 24px 24px 0 0; padding: 1.4rem 1.2rem 1.6rem; position: relative;
  animation: sobe .25s cubic-bezier(.2, .8, .2, 1);
}
.modal-caixa.larga { max-width: 760px; }
@media (min-width: 700px) {
  .modal { align-items: center; padding: 1.5rem; }
  .modal-caixa { border-radius: 24px; padding: 1.8rem; }
}
.modal-fechar {
  position: absolute; top: .8rem; right: .8rem; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--lilas-100); color: var(--roxo-800); font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.modal h2 { margin: 0 2.5rem .3rem 0; font-size: 1.25rem; color: var(--roxo-800); }
@keyframes fade { from { opacity: 0; } }
@keyframes sobe { from { transform: translateY(30px); opacity: 0; } }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 99; display: grid; gap: .5rem; pointer-events: none; }
.toast {
  background: var(--roxo-900); color: #fff; padding: .7em 1.2em; border-radius: 999px; font-size: .88rem;
  box-shadow: var(--sombra); animation: sobe .25s ease; transition: opacity .4s, transform .4s; text-align: center;
}
.toast-erro { background: var(--erro); }
.toast-ok { background: var(--ok); }
.toast.sai { opacity: 0; transform: translateY(10px); }

/* ---------- recibo ---------- */
.recibo { font-size: .88rem; color: var(--tinta); }
.rc-topo { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding-bottom: 1rem; border-bottom: 2px dashed var(--linha); }
.rc-marca { display: flex; align-items: center; gap: .5rem; }
.rc-logo { font-family: var(--f-script); font-size: 2rem; color: var(--roxo-700); line-height: 1; display: block; }
.rc-logo2 { font-size: .7rem; letter-spacing: .35em; color: var(--ouro); font-weight: 700; display: block; }
.rc-meta { text-align: right; }
.rc-meta h3 { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--tinta-2); }
.rc-meta p { margin: .15rem 0 0; }
.rc-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin: .9rem 0; }
.rc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem 1.2rem; margin-bottom: 1rem; }
.rc-grid h5 { margin: 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--rosa-600); }
.rc-grid p { margin: .2rem 0 0; }
.rc-tabela { width: 100%; border-collapse: collapse; margin-bottom: .8rem; }
.rc-tabela th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); border-bottom: 1px solid var(--linha); padding: .4rem .3rem; }
.rc-tabela td { padding: .55rem .3rem; border-bottom: 1px solid var(--linha); vertical-align: top; }
.rc-tabela small { display: block; color: var(--tinta-2); font-size: .75rem; }
.rc-tabela .num { text-align: right; white-space: nowrap; }
.rc-totais { margin-left: auto; max-width: 280px; }
.rc-totais div { display: flex; justify-content: space-between; padding: .2rem 0; }
.rc-totais .desc { color: var(--ok); }
.rc-totais .total { font-size: 1.15rem; font-weight: 800; color: var(--roxo-800); border-top: 2px solid var(--roxo-700); margin-top: .3rem; padding-top: .5rem; }
.rc-obs { background: var(--lilas-100); padding: .7rem .9rem; border-radius: var(--raio-sm); }
.rc-pix { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; padding: 1rem; border-radius: var(--raio); background: linear-gradient(135deg, var(--lilas-100), var(--rosa-100)); }
.rc-pix-vazio { justify-content: center; text-align: center; }
.rc-pix h4 { margin: 0 0 .3rem; color: var(--roxo-800); }
.rc-pix p { margin: .2rem 0; }
.rc-pix small { color: var(--tinta-2); display: block; margin-top: .4rem; }
.rc-qr { flex: none; background: #fff; border-radius: 12px; padding: 4px; }
.rc-qr svg { display: block; width: 140px; height: 140px; }
.rc-pix-btns { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.sel { user-select: all; word-break: break-all; }
.rc-rodape { margin-top: 1.2rem; padding-top: .8rem; border-top: 2px dashed var(--linha); text-align: center; color: var(--tinta-2); font-size: .78rem; }
.rc-rodape p { margin: .3rem 0; }
@media (max-width: 520px) {
  .rc-pix { flex-direction: column; text-align: center; }
  .rc-pix-btns { justify-content: center; }
  .rc-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- impressão do recibo ---------- */
@media print {
  body.imprimindo > *:not(#area-impressao) { display: none !important; }
  #area-impressao { display: block !important; padding: 0; }
  .no-print { display: none !important; }
  .rc-pix { background: none; border: 1px solid #ddd; }
  .chip { border: 1px solid #999; }
}
#area-impressao { display: none; }

/* ---------- confirmação ---------- */
.confirma-fundo { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(30, 12, 50, .5); animation: fade .15s; }
.confirma { background: #fff; border-radius: var(--raio); padding: 1.3rem; max-width: 360px; width: 100%; box-shadow: var(--sombra); animation: sobe .2s; }
.confirma p { margin: 0 0 1rem; font-weight: 600; color: var(--tinta); }
.confirma-botoes { display: flex; justify-content: flex-end; gap: .5rem; }

/* ---------- recibo para PDF / JPG ---------- */
.recibo-export { position: fixed; left: -10000px; top: 0; width: 620px; padding: 32px 30px; background: #fff; color: var(--tinta); font-family: var(--f-ui); }
.recibo-export .rc-qr svg { width: 150px; height: 150px; }
.rc-baixar { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
/* o gerador de PDF/JPG não entende color-mix(): cores fixas só no arquivo */
.recibo-export .chip { background: #faf2ef; border-color: #efdcd6; color: var(--c); }
.recibo-export .chip { display: inline-block; padding: .35em .85em; line-height: 1.25; vertical-align: middle; }
.recibo-export .chip::before { display: inline-block; vertical-align: middle; margin: -2px .4em 0 0; }
.recibo-export .rc-logo { line-height: 1.15; padding-bottom: .1em; }
.recibo-export .rc-logo2 { margin-top: .15em; }
.recibo-export .chip { display: inline; padding: 0; border: 0; background: none; font-size: .85rem; margin-right: 1rem; }
