/* Silva's Grill — identidade visual
   Vermelho Silva's #C51F2C · Vinho Brasa #99151C · Creme Fogo #F4E7D1 · Carvão #211B19 */
:root {
  --red: #C51F2C;
  --red-deep: #AF1E26;
  --wine: #99151C;
  --wine-dark: #6E0E14;
  --cream: #F4E7D1;
  --cream-2: #EADBC0;
  --cream-3: #FBF4E8;
  --coal: #211B19;
  --coal-2: #3A302C;
  --muted: #7A6A5E;
  --ok: #2F7A3E;
  --warn: #C27A12;
  --radius: 14px;
  --shadow: 0 2px 0 rgba(33, 27, 25, .08), 0 10px 24px -12px rgba(33, 27, 25, .35);
  --display: 'Oswald', 'Bebas Neue', Impact, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--coal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.45;
}
/* textura de papel */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .4 0 0 0 0 .3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#app, main, header, footer, .sheet, .modal { position: relative; z-index: 1; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, .display {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; margin: 0; line-height: 1.05; font-weight: 700;
}
.kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: .22em; font-size: .82rem; font-weight: 500; }
.muted { color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 4px 0; }
.price { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--red); }

/* faixa listrada da marca */
.stripes {
  height: 14px;
  background: repeating-linear-gradient(-55deg, var(--red) 0 8px, transparent 8px 16px);
}
.stripes.cream { background: repeating-linear-gradient(-55deg, var(--cream) 0 8px, transparent 8px 16px); opacity: .9; }

.num-badge {
  display: inline-grid; place-items: center; background: var(--red); color: var(--cream);
  font-family: var(--display); font-weight: 700; padding: 4px 10px; font-size: 1.1rem;
}

/* botões */
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: var(--display); text-transform: uppercase;
  letter-spacing: .12em; font-weight: 600; font-size: 1rem; padding: 14px 22px; border-radius: 999px;
  background: var(--red); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .08s ease, background .15s ease, opacity .15s; text-decoration: none; min-height: 48px;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn svg { width: 22px; height: 22px; }
.btn:hover { background: var(--wine); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.cream { background: var(--cream); color: var(--red); }
.btn.cream:hover { background: #fff6e6; }
.btn.ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.btn.ghost:hover { background: rgba(197, 31, 44, .08); }
.btn.dark { background: var(--coal); color: var(--cream); }
.btn.ok { background: var(--ok); }
.btn.sm { padding: 8px 14px; font-size: .85rem; min-height: 36px; }
.btn.block { width: 100%; }
.icon-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer; width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center; color: inherit;
}
.icon-btn:hover { background: rgba(0, 0, 0, .06); }

/* formulários */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; margin-bottom: 6px; color: var(--coal-2); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--coal); background: var(--cream-3); border: 2px solid var(--cream-2);
  border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--red); }
textarea { resize: vertical; min-height: 70px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

.seg { display: flex; background: var(--cream-2); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 10px 12px; border-radius: 999px; cursor: pointer;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: var(--coal-2);
}
.seg button.on { background: var(--red); color: var(--cream); }

.card { background: var(--cream-3); border-radius: var(--radius); box-shadow: var(--shadow); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .75rem;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
  background: var(--cream-2); color: var(--coal-2);
}
.pill.red { background: var(--red); color: var(--cream); }
.pill.wine { background: var(--wine); color: var(--cream); }
.pill.ok { background: var(--ok); color: #fff; }
.pill.warn { background: var(--warn); color: #fff; }
.pill.dark { background: var(--coal); color: var(--cream); }

/* toast */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast {
  background: var(--coal); color: var(--cream); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow);
  animation: toastIn .25s ease; font-size: .95rem;
}
.toast.err { background: var(--wine); }
.toast.ok { background: var(--ok); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* modal / folha inferior */
.backdrop { position: fixed; inset: 0; background: rgba(33, 27, 25, .55); z-index: 50; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(94vw, 560px);
  max-height: 90vh; overflow: auto; background: var(--cream); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
}
.modal h3 { font-size: 1.6rem; color: var(--red); margin-bottom: 14px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.spinner { width: 22px; height: 22px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 10px; color: var(--cream-2); }

/* mapa */
.map { height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--cream-2); }
.driver-pin {
  width: 42px; height: 42px; border-radius: 50%; background: var(--red); border: 3px solid var(--cream);
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.35);
}
.driver-pin svg { width: 22px; height: 22px; color: var(--cream); }
.map-pin { width: 36px; height: 36px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 3px solid var(--cream); box-shadow: 0 4px 10px rgba(0,0,0,.35); overflow: hidden; }
.map-pin > * { transform: rotate(45deg); }
.map-pin.store { background: var(--red); }
.map-pin.store img { width: 30px; height: 30px; }
.map-pin.home { background: var(--coal); color: var(--cream); }
.map-pin.home svg { width: 18px; height: 18px; }
.loc-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.geo-results { display: grid; gap: 6px; margin-top: 8px; }
.geo-results button { text-align: left; border: 2px solid var(--cream-2); background: var(--cream-3); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; }
.geo-results button:hover { border-color: var(--red); }
.dist-info { margin: 10px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--cream-2); font-size: .92rem; }
.dist-info.ok { background: #E3F1E5; color: #1F5A2B; }
.dist-info.bad { background: #FBE1E1; color: var(--wine); }
.pulse { position: relative; }
.pulse::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--red); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(.8); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }

/* status do pedido */
.steps { display: grid; gap: 0; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; position: relative; padding-bottom: 18px; }
.step:not(:last-child)::before { content: ''; position: absolute; left: 19px; top: 38px; bottom: 0; width: 2px; background: var(--cream-2); }
.step.done:not(:last-child)::before { background: var(--red); }
.step .dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream-2); color: var(--muted); }
.step.done .dot { background: var(--red); color: var(--cream); }
.step.now .dot { background: var(--red); color: var(--cream); box-shadow: 0 0 0 6px rgba(197, 31, 44, .2); animation: glow 1.4s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 0 0 10px rgba(197, 31, 44, .08); } }
.step .dot svg { width: 20px; height: 20px; }
.step h4 { font-size: 1.15rem; margin-top: 8px; }
.step.todo h4 { color: var(--muted); }
.step small { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
