/* ===== Sistema de Reservas — área pública (mobile-first) ===== */
:root {
  --primary: #7c2d3a;
  --primary-dark: #5e1f2a;
  --accent: #c9a227;
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #2d2a26;
  --muted: #8a8378;
  --border: #e8e2d8;
  --free: #2e9e5b;
  --free-bg: #d9f2e4;
  --occupied: #d64545;
  --occupied-bg: #f6d5d5;
  --held: #d98c1f;
  --held-bg: #f7e6c9;
  --unsuitable: #b7b2a8;
  --unsuitable-bg: #eceae5;
  --selected: #2b6cb0;
  --selected-bg: #d3e5f8;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(45, 42, 38, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.container { max-width: 900px; margin: 0 auto; padding: 0 16px; }

/* Header / footer */
.site-header { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 1.15rem; font-weight: 700; }
.brand-logo { height: 36px; width: auto; border-radius: 6px; }
.site-nav a { color: #f4dfe3; text-decoration: none; margin-left: 16px; font-size: .95rem; }
.site-nav a:hover { color: #fff; text-decoration: underline; }
.main-content { padding: 24px 16px 48px; }
.site-footer { background: #2d2a26; color: #cfc9bf; padding: 20px 0; font-size: .85rem; text-align: center; }

.welcome-box { background: var(--card); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px; box-shadow: var(--shadow); }

/* Ficha do restaurante (topo da página de reserva) */
.rest-header { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.rest-title { margin: 0 0 10px; font-size: 1.5rem; }
.rest-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.pill { display: inline-block; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: .82rem; font-weight: 600; }
.pill-star { background: #fdf3d6; border-color: #f0dfa8; color: #9a7b0c; }
.rest-location { color: var(--muted); font-size: .9rem; margin: 0 0 8px; }
.rest-desc { color: var(--text); font-size: .95rem; margin: 8px 0 0; }
.availability-badge { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 22px; font-size: .9rem; font-weight: 700; }
.availability-badge .av-hint { font-weight: 400; }
.av-free { background: var(--free-bg); color: #14532d; }
.av-full { background: var(--held-bg); color: #92600c; }
.av-closed { background: var(--unsuitable-bg); color: var(--muted); }
.reviews-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin-top: 20px; }
.reviews-section h2 { font-size: 1.2rem; margin: 0 0 14px; }
.review-item { border-bottom: 1px dashed var(--border); padding: 12px 0; }
.review-item:last-child { border-bottom: none; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: .9rem; flex-wrap: wrap; }
.review-stars { color: var(--star, #e8a90c); letter-spacing: 1px; }
.review-item p { margin: 0; color: var(--text); }

/* Wizard */
.wizard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.steps-nav { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 22px; }
.steps-nav li { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); padding: 4px 8px; border-radius: 20px; }
.steps-nav li span { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--border); font-weight: 700; font-size: .7rem; }
.steps-nav li.active { color: var(--primary); font-weight: 700; background: #f7ecee; }
.steps-nav li.active span { background: var(--primary); color: #fff; }
.steps-nav li.done { color: var(--free); }
.steps-nav li.done span { background: var(--free); color: #fff; }

.step-panel h2 { margin: 0 0 14px; font-size: 1.3rem; }
.step-context { color: var(--muted); margin: -6px 0 14px; font-weight: 600; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: .9rem; }

/* Calendário */
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-head strong { font-size: 1.05rem; text-transform: capitalize; }
.btn-icon { border: 1px solid var(--border); background: #fff; border-radius: 8px; width: 38px; height: 38px; font-size: 1.2rem; cursor: pointer; }
.btn-icon:hover { background: var(--bg); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-span { grid-column: 1 / -1; }
.cal-wd { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day { aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: .95rem; cursor: pointer; color: var(--text); }
.cal-available:hover { background: var(--free-bg); border-color: var(--free); }
.cal-available { border-color: var(--free); background: #f2fbf6; font-weight: 600; }
.cal-full { background: var(--occupied-bg); color: var(--occupied); cursor: not-allowed; }
.cal-closed, .cal-blocked, .cal-unavailable { background: var(--unsuitable-bg); color: var(--muted); cursor: not-allowed; }
.cal-past { background: transparent; color: #d4cec4; cursor: not-allowed; border-color: transparent; }
.calendar-legend { display: flex; gap: 16px; margin-top: 12px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.dot-free { background: var(--free); }
.dot-full, .dot-occupied { background: var(--occupied); }
.dot-closed { background: var(--unsuitable); }
.dot-unsuitable { background: var(--unsuitable); }
.dot-selected { background: var(--selected); }

/* Pessoas */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; margin-bottom: 14px; }
.party-btn { padding: 14px 0; font-size: 1.1rem; font-weight: 700; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.party-btn:hover, .party-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Horários */
.shift-name { font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
.slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.slot-btn { padding: 10px 0; font-size: .95rem; font-weight: 600; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; }
.slot-btn:hover:not(:disabled), .slot-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.slot-btn:disabled { background: var(--unsuitable-bg); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.waitlist-callout { margin-top: 18px; padding: 14px; background: #fdf6e5; border: 1px solid #eeddb0; border-radius: var(--radius); }

/* Mapa de mesas */
.map-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.area-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.area-tab { padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; background: #fff; cursor: pointer; font-size: .88rem; }
.area-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.map-wrap { border-radius: var(--radius); overflow: hidden; }
.table-map { width: 100%; height: auto; display: block; }
.map-bg { fill: #f3efe7; stroke: var(--border); }
.deco { pointer-events: none; }
.map-wall { fill: #e8e1d3; stroke: #c9b89a; stroke-width: 2; }
.map-zone { fill: #efe9dd; stroke: #c4b393; stroke-width: 1.5; }
.map-zone-text { text-anchor: middle; font-weight: 700; fill: #8a7a5f; text-transform: uppercase; letter-spacing: .05em; }
.map-ref { font-weight: 700; fill: #9a8c72; text-transform: uppercase; letter-spacing: .04em; }
.tbl ellipse, .tbl rect { stroke-width: 2; }
.tbl-free ellipse, .tbl-free rect { fill: var(--free-bg); stroke: var(--free); }
.tbl-occupied ellipse, .tbl-occupied rect { fill: var(--occupied-bg); stroke: var(--occupied); }
.tbl-held ellipse, .tbl-held rect { fill: var(--held-bg); stroke: var(--held); }
.tbl-unsuitable ellipse, .tbl-unsuitable rect { fill: var(--unsuitable-bg); stroke: var(--unsuitable); }
.tbl-mine ellipse, .tbl-mine rect, .tbl-selected ellipse, .tbl-selected rect { fill: var(--selected-bg); stroke: var(--selected); stroke-width: 3; }
.tbl-clickable { cursor: pointer; }
.tbl-clickable:hover ellipse, .tbl-clickable:hover rect { filter: brightness(.94); }
.tbl-label { text-anchor: middle; font-size: 15px; font-weight: 700; fill: var(--text); pointer-events: none; }
.tbl-cap { text-anchor: middle; font-size: 11px; fill: var(--muted); pointer-events: none; }
.combos-box { margin-top: 14px; padding: 14px; background: #eef4fb; border: 1px solid #c9dcf2; border-radius: var(--radius); }
.combos-box .btn { margin: 4px 6px 0 0; }

/* Formulários */
.form-field { margin-bottom: 14px; }
.form-field label, .form-field legend { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff;
}
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }
.form-row { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
fieldset.form-field { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.quick-notes { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 10px; }
.quick-notes label { display: flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 400; cursor: pointer; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; margin: 14px 0; cursor: pointer; }
.consent input { margin-top: 3px; }
.policy-box { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: .85rem; margin: 14px 0; }
.policy-box p { margin: 6px 0 0; color: var(--muted); }
.form-error { background: var(--occupied-bg); color: #8f1f1f; padding: 10px 14px; border-radius: 10px; margin: 12px 0; font-size: .9rem; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* Botões */
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; border: 1px solid transparent; text-decoration: none; text-align: center; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #f7ecee; }
.btn-danger { background: var(--occupied); color: #fff; }
.btn-danger:hover { background: #b93a3a; }
.btn-lg { padding: 14px 30px; font-size: 1.1rem; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: .95rem; padding: 8px 0; text-decoration: underline; }

/* Hold banner */
.hold-banner { background: #fdf6e5; border: 1px solid #eeddb0; border-radius: 10px; padding: 10px 14px; margin-bottom: 16px; font-size: .9rem; }
.hold-banner strong { color: var(--held); font-variant-numeric: tabular-nums; }

/* Revisão */
.review-list { margin: 0 0 10px; }
.review-list div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.review-list dt { color: var(--muted); font-size: .88rem; }
.review-list dd { margin: 0; font-weight: 600; text-align: right; }

/* Sucesso */
.success-box { text-align: center; padding: 26px 10px; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--free); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; }
.done-code { font-size: 1.2rem; }
.done-code strong { letter-spacing: .12em; color: var(--primary); }

/* Cartões / alerts */
.narrow-card { max-width: 560px; margin: 0 auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 14px; font-size: .92rem; }
.alert-success { background: var(--free-bg); color: #14532d; }
.alert-error { background: var(--occupied-bg); color: #8f1f1f; }

.reservation-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; position: relative; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.badge-pending { background: var(--held-bg); color: #92600c; }
.badge-confirmed { background: var(--free-bg); color: #14532d; }
.badge-seated { background: var(--selected-bg); color: #1e4a7a; }
.badge-completed { background: var(--unsuitable-bg); color: #57534e; }
.badge-cancelled { background: var(--occupied-bg); color: #8f1f1f; }
.badge-no_show { background: #3f3f46; color: #fff; }
.res-status-badge { margin-bottom: 12px; }
.reconfirm-box { background: #fdf6e5; border: 1px solid #eeddb0; border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.reconfirm-box p { margin: 0 0 10px; }
.reconfirm-box.reconfirm-done { background: var(--free-bg); border-color: #b9e4cb; }
.reconfirm-box.reconfirm-done p { margin: 0; }
.manage-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.reschedule-panel { margin-top: 20px; border-top: 2px solid var(--border); padding-top: 18px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(30, 25, 20, .55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.modal { background: #fff; border-radius: var(--radius); padding: 22px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; }
.modal h3 { margin-top: 0; }

@media (min-width: 700px) {
  .wizard { padding: 30px; }
  .steps-nav li { font-size: .85rem; }
}

/* ===== Fila presencial (walk-in): acompanhamento pelo celular ===== */
.queue-track { text-align: center; }
.queue-hero { margin-bottom: 22px; }
.queue-restaurant { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem;
  color: var(--primary); font-weight: 700; margin: 0 0 4px; }
.queue-hero h2 { margin: 0 0 2px; }
.queue-state { padding: 8px 0 6px; }
.queue-big { display: flex; flex-direction: column; align-items: center; margin: 10px 0 6px; }
.queue-pos { font-size: 5rem; line-height: 1; font-weight: 800; color: var(--primary); }
.queue-pos-label { text-transform: uppercase; letter-spacing: .15em; font-size: .72rem;
  color: var(--muted); margin-top: 2px; }
.queue-ahead { font-size: 1.05rem; margin: 10px 0 2px; }
.queue-wait { font-size: 1.05rem; margin: 0 0 12px; }
.queue-wait strong, .queue-ahead strong { color: var(--primary); }
.queue-hint { font-size: .88rem; max-width: 320px; margin: 12px auto; }
.queue-live { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem;
  color: var(--muted); margin-top: 6px; }
.queue-live .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--free);
  box-shadow: 0 0 0 0 rgba(46,158,91,.6); animation: queue-pulse 1.8s infinite; }
@keyframes queue-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,158,91,.5); }
  70% { box-shadow: 0 0 0 10px rgba(46,158,91,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,158,91,0); }
}
.queue-called { background: var(--free-bg); border-radius: var(--radius); padding: 26px 18px; }
.queue-ready { font-size: 3.4rem; margin-bottom: 6px; }
.queue-called h3 { color: var(--free); margin: 0 0 8px; }

/* ===== Barra de compartilhamento (SEO social) ===== */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 6px 0 18px; font-size: .86rem; }
.share-label { color: var(--muted); font-weight: 600; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--card);
  color: var(--text); cursor: pointer; text-decoration: none; font-size: .84rem;
  transition: transform .08s, box-shadow .12s; }
.share-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.share-wa { border-color: #25d366; color: #128c3e; }
.share-fb { border-color: #1877f2; color: #1877f2; }
.share-x { border-color: #111; color: #111; }
.share-native, .share-copy { border-color: var(--primary); color: var(--primary); font-weight: 600; }
