:root {
  --bg: #f6f1e7; --card: #ffffff; --ink: #1f2a24; --muted: #5d6b63; --line: #e2dccd;
  --green: #2e7d57; --green-ink: #ffffff; --soft: #e6f2ec; --warn: #fff1d6; --warn-ink: #7a4b00;
  --bad: #b3261e; --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #15201a; --card: #1e2b24; --ink: #eef3ef; --muted: #a6b5ac; --line: #33443a; --soft: #21402f; --warn: #4a3a15; --warn-ink: #ffd994; --bad: #ff8a80; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; margin: 0; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.15rem; }
section { margin-top: 20px; }
[hidden] { display: none !important; }
a { color: var(--green); }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.muted { color: var(--muted); font-size: .9rem; }
.center { text-align: center; margin-top: 40vh; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.day { font-weight: 600; } .time { font-size: 1.5rem; font-family: Georgia, serif; }
.week-head { display: flex; justify-content: space-between; align-items: baseline; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
button { font: inherit; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--green); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); font-weight: 600; }
button.danger { color: var(--bad); }
button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }
input, select { font: inherit; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 100%; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; white-space: nowrap; }
.chip.ok { background: var(--soft); color: var(--green); } .chip.todo { background: var(--warn); color: var(--warn-ink); }
.note, .hint { font-size: .9rem; margin: 10px 0 0; } .hint { color: var(--muted); }
.error { color: var(--bad); min-height: 1.2em; }
.offer { border-color: var(--green); background: var(--soft); }
.login { margin-top: 18vh; } .login form { display: grid; gap: 10px; margin-top: 12px; }
.login input { text-align: center; letter-spacing: .08em; font-size: 1.2rem; }
.option { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; text-align: left; min-height: 52px; }
footer { margin-top: 28px; text-align: center; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; z-index: 20; max-width: 90vw; }
.toast.bad { background: var(--bad); color: #fff; }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { border-radius: 18px; } }
@media (prefers-reduced-motion: no-preference) { .toast { animation: up .2s ease-out; } @keyframes up { from { opacity: 0; transform: translate(-50%, 8px); } } }

/* Recepción */
body.admin main { max-width: 1280px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button[aria-selected="true"] { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.daycol h3 { margin: 0 0 6px; font-family: Georgia, serif; font-size: 1rem; }
.slot { width: 100%; text-align: left; display: block; height: auto; padding: 8px 10px; margin-top: 6px; }
.slot .meta { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.slot .names { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.slot.full { border-color: #d98c1f; } .slot.cancelled { opacity: .5; text-decoration: line-through; }
.g-E { border-left: 5px solid #7a5cc0; } .g-P { border-left: 5px solid #1f6f9c; }
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; } .toolbar input, .toolbar select { width: auto; flex: 1 1 180px; }
.formgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.qr { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 8px; }
.code { font: 1.6rem/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .1em; }
@media print { body * { visibility: hidden; } .printable, .printable * { visibility: visible; } .printable { position: absolute; inset: 0; background: #fff; color: #000; padding: 24px; } }
