/* Dining Memories — shared base: tokens, type, buttons, fields, login, public pages.
   The staff panel adds panel.css (shell, calendar, Más) and panel-pages.css (Hoy, Reservas).
   Plain CSS, mobile-first. */

:root {
  --ink: #16221F;
  --muted: #5F6B68;
  --bg: #F6F3EC;
  --surface: #FFFFFF;
  --line: #E3DED3;
  --line-soft: #EEEBE3;
  --brand: #0F5C55;
  --brand-strong: #0B3F3A;
  --brand-soft: #E4EFEB;
  --gold: #E7C27A;

  --open: #1A6A42;     --open-bg: #E2F3E8;
  --full: #B23A2F;     --full-bg: #FBE5E2;
  --nochef: #8A5A10;   --nochef-bg: #FBF0DC;  --nochef-dot: #D9A441;
  --blocked: #5F6B68;  --blocked-bg: #E8E5DD;
  --late: #5F6B68;     --late-bg: #EEEBE3;
  --error: #B23A2F;    --error-bg: #FBE5E2;

  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Fraunces, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --topbar-h: 56px;
  --tabbar-h: 64px;
  --side-w: 232px;
  --stripes: repeating-linear-gradient(135deg, var(--blocked-bg) 0 6px, #F1EEE7 6px 12px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 500; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0; }
a { color: var(--brand); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}
@media (min-width: 900px) { h1 { font-size: 34px; } }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
[x-cloak] { display: none !important; }
.center { text-align: center; }
.cap-first::first-letter { text-transform: uppercase; }
.warn-text { color: var(--full); }
.ok-text { color: var(--open); font-weight: 600; }
.pre { white-space: pre-line; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Status = coloured dot + text on a tinted pill. Never a coloured stripe. */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.status {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  background: var(--late-bg); color: var(--muted);
}
.status-confirmed, .status-in_progress { background: var(--open-bg); color: var(--open); }
.status-confirmed .dot, .status-in_progress .dot { background: var(--open); }
.status-provisional { background: var(--nochef-bg); color: var(--nochef); }
.status-provisional .dot { background: var(--nochef-dot); }
.status-lead { background: var(--brand-soft); color: var(--brand-strong); }
.status-lead .dot { background: var(--brand); }
.status-completed { background: var(--late-bg); color: var(--late); }
.status-expired, .status-cancelled { background: var(--full-bg); color: var(--full); }
.status-expired .dot, .status-cancelled .dot { background: var(--full); }

/* Buttons: primary, secondary (.btn / .btn-ghost), danger */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-danger { background: var(--error); border-color: var(--error); color: #fff; }
.btn-danger:hover { background: #8F2E25; border-color: #8F2E25; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: .88rem; }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); text-decoration: underline; font-weight: 400; cursor: pointer; font: inherit; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.field input, .field textarea, .field select {
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.field input, .field select { min-height: 46px; padding: 0 12px; }
.field textarea { padding: 10px 12px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field.narrow { max-width: 220px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; line-height: 1.35; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand); }
.check.strong { font-weight: 650; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.choices legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; padding: 0; }
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain:disabled input, fieldset.plain:disabled textarea { background: var(--bg); }
.grid-2, .grid-3 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.alert { padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; }
.alert.small { font-size: .85rem; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-ok { background: var(--open-bg); color: var(--open); }
.alert-warn { background: var(--nochef-bg); color: var(--nochef); }
.alert-info { background: var(--brand-soft); color: var(--brand-strong); }
.pill {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; vertical-align: 1px; background: var(--late-bg); color: var(--muted);
}
.pill-ok { background: var(--open-bg); color: var(--open); }
.pill-warn { background: var(--nochef-bg); color: var(--nochef); }
.pill-block { background: var(--blocked-bg); color: var(--blocked); }
.pill-lang { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.pill-host { background: var(--brand-soft); color: var(--brand-strong); }
fieldset.lang-pick { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
fieldset.lang-pick legend { padding: 0; margin-bottom: 4px; }
.lang-warn { margin: 6px 0 0; }

/* Login */
body.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.auth-card {
  width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; gap: 18px;
}
.auth-card h1 { font-size: 24px; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--brand); }

/* Blocks shared by the panel and the public page */
.legend {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .8rem; color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 6px; }
.pick-row { display: flex; gap: 8px; align-items: center; }
.pick-row select, .pick-row input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 10px; font: inherit; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pick-row .qty { flex: 0 0 72px; }
.course { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.course:first-of-type { border-top: 0; padding-top: 0; }
.course h3 { font-size: .95rem; }
.quote { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.quote td { padding: 5px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.quote td.num { text-align: right; white-space: nowrap; padding-left: 10px; }
.quote .quote-total td { font-weight: 700; font-size: 1.05rem; border-bottom: 0; }
.checklist ul { margin: 4px 0; padding-left: 18px; color: var(--full); }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 0; font-size: .95rem; }
.facts dt { color: var(--muted); font-size: .85rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts-money { grid-template-columns: 1fr auto; font-variant-numeric: tabular-nums; }
.facts-money dd { text-align: right; }

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

/* ---- Public booking page (layout unchanged) ---- */
body.public { --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; background: #f6f4ef; }
.pub-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.pub-header-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.pub-brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.pub-brand span { color: var(--brand); }
.pub-lang { font-size: .9rem; font-weight: 600; text-decoration: none; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.pub-main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.pub-hero h1 { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1.15; }
.pub-hero p { color: var(--muted); font-size: 1.05rem; margin-top: 6px; max-width: 60ch; }
.pub-grid { display: grid; gap: 20px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .pub-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
.pub-steps { display: flex; flex-direction: column; gap: 16px; }
.pub-step {
  background: var(--surface); border-radius: 14px; padding: 20px 18px;
  box-shadow: 0 1px 2px rgba(40, 30, 10, .05), 0 4px 16px rgba(40, 30, 10, .05);
  display: flex; flex-direction: column; gap: 14px;
}
.pub-step h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.step-n {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font: 700 .9rem var(--font);
}
.pub-aside { position: sticky; top: 16px; }
.pub-submit { min-height: 52px; font-size: 1.05rem; }
.pub-errors ul { margin: 0; padding-left: 18px; }
.pub-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .95rem; }
.pub-facts dt { color: var(--muted); }
.pub-facts dd { margin: 0; }
.menu-cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .menu-cards { grid-template-columns: 1fr 1fr; } }
.menu-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
}
.menu-card input { position: absolute; opacity: 0; pointer-events: none; }
.menu-card.is-selected, .menu-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.menu-card:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); }
.menu-card-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.menu-card-desc { color: var(--muted); font-size: .9rem; }
.service-cards .menu-card { padding: 20px; min-height: 120px; }
.service-cards .menu-card-name { font-size: 1.35rem; }
.svc-tag { display: inline-block; font-size: .7rem; font-weight: 650; line-height: 1; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.svc-delivery { border-color: var(--brand); color: var(--brand-strong); background: var(--brand-soft); }
.chip .svc-tag { font-size: .6rem; padding: 2px 5px; margin-left: 4px; }
.menu-card-price { font-weight: 650; color: var(--brand-strong); font-size: .95rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pub-narrow { max-width: 680px; margin: 0 auto; width: 100%; }
.not-confirmation {
  font-weight: 800; letter-spacing: .04em; color: var(--full); background: var(--full-bg);
  padding: 10px 14px; border-radius: 8px; text-align: center;
}
.pub-narrow h1 { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.pub-ref { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 12px 14px; border: 1px dashed var(--brand); border-radius: 10px; }
.pub-ref strong { font-size: 1.3rem; letter-spacing: .04em; }
.pub-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }

/* Two-step verification */
.code-input { font-size: 1.5rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { background: #fff; padding: 8px; border-radius: var(--radius-sm); align-self: flex-start; line-height: 0; }
.qr svg { width: 300px; height: 300px; }
.secret { font-size: 1rem; letter-spacing: .08em; word-break: break-all; }
.steps { margin: 0; padding-left: 20px; }
.recovery-codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recovery-codes li { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .06em; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-align: center; }
a.who, a.avatar { text-decoration: none; }
