/* Reservas para barberías — premium oscuro, mobile-first. Un único archivo para web pública y panel.
   Tokens de marca en :root (se adaptan por cliente). Contraste WCAG AA sobre fondo oscuro. */
@font-face { font-family: "Oswald"; src: url("../fonts/oswald.woff2?v=20261010") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2?v=20261010") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0f0e0d;
  --bg-2: #161412;
  --surface: #1c1916;
  --surface-2: #25211d;
  --line: #3a342d;
  --line-2: #4d453b;
  --ink: #f2ede4;
  --muted: #b5ab9c;
  --brand: #c9a35b;
  --brand-hover: #d9b770;
  --brand-ink: #15110b;
  --ok: #7fd6a2;
  --warn: #f2c14e;
  --err: #ff8f80;
  --wa: #25d366;
  --wa-ink: #04210f;
  --radius: 6px;
  --head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .15em; }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: .01em; line-height: 1.15; margin: 0 0 .75rem; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); text-transform: uppercase; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: .1rem .35rem; border-radius: 4px; font-size: .9em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--bg); padding: .5rem .8rem; z-index: 100; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; }
.break { overflow-wrap: anywhere; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .7rem 1.25rem;
  border: 1px solid var(--brand); border-radius: var(--radius); background: var(--brand); color: var(--brand-ink);
  font: 600 .95rem/1.1 var(--font); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-ink); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1rem; }
.btn-sm { min-height: 38px; padding: .45rem .8rem; font-size: .8rem; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }
.btn-secondary { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--line); color: var(--ink); border-color: var(--line-2); }
.btn-danger { background: transparent; color: var(--err); border-color: var(--err); }
.btn-danger:hover { background: var(--err); color: var(--brand-ink); border-color: var(--err); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); cursor: pointer; text-decoration: underline; min-height: 32px; }
.link-danger { color: var(--err); }
.link-btn { color: var(--brand); font-weight: 600; text-decoration: none; padding: .4rem; }
.inline { display: inline; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: .9rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; }
.form label.check, label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #12100e; border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: .65rem .75rem; min-height: 46px; }
input::placeholder, textarea::placeholder { color: #8d8478; }
input[type="checkbox"] { width: 1.25rem; min-height: 1.25rem; height: 1.25rem; margin-top: .15rem; flex: none; accent-color: var(--brand); }
input[type="file"] { padding: .5rem; }
input[aria-invalid="true"] { border-color: var(--err); }
input[readonly], textarea[readonly] { opacity: .75; }
.error { color: var(--err); margin: -.5rem 0 0; font-size: .9rem; }
.note { background: var(--surface); border-left: 3px solid var(--brand); padding: .7rem .9rem; border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink); font-size: .92rem; }
.flash { padding: .75rem 1rem; border-radius: var(--radius); margin: 1rem 0; border: 1px solid; }
.flash-ok { background: #13261b; border-color: #2f6b47; color: var(--ok); }
.flash-info { background: #1a1f29; border-color: #3b4a66; color: #b9cdf2; }
.flash-error { background: #2a1512; border-color: #7a3a31; color: var(--err); }
.grid-2, .grid-3 { display: grid; gap: .9rem; grid-template-columns: 1fr; }

/* ---------- Badges ---------- */
.badge { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .03em; padding: .18rem .55rem; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); white-space: nowrap; }
.badge-ok { color: var(--ok); border-color: #2f6b47; }
.badge-off { color: var(--muted); }
.badge-warn { color: var(--warn); border-color: #6f5a24; }
.badge-block { color: var(--muted); border-style: dashed; }
.canal-web { color: var(--brand); border-color: #6b5631; }
.canal-whatsapp { color: var(--wa); border-color: #1d6b3d; }
.canal-manual { color: #c7bfb3; }
.estado-enviado { color: var(--ok); }
.estado-simulado { color: #b9cdf2; }
.estado-error { color: var(--err); }
.pill { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--err); color: var(--brand-ink); font-size: .75rem; font-weight: 700; text-align: center; }
.tag { display: inline-block; margin-left: .4rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-ink); background: var(--muted); padding: .05rem .4rem; border-radius: 3px; }
.demo-bar { background: var(--brand); color: var(--brand-ink); text-align: center; font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: .3rem 1rem; }

/* ---------- Marca ---------- */
.pub-brand-mark { display: inline-block; width: 12px; height: 26px; border-radius: 6px; margin-right: .55rem; vertical-align: -6px; flex: none;
  background: repeating-linear-gradient(135deg, var(--brand) 0 5px, var(--ink) 5px 10px); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2); }

/* =================================================================== */
/* WEB PÚBLICA                                                          */
/* =================================================================== */
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 680px; }
.pub-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .7rem 16px; background: rgba(15, 14, 13, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.pub-brand { display: flex; align-items: center; min-width: 0; color: var(--ink); text-decoration: none; font: 600 1.15rem/1 var(--head);
  text-transform: uppercase; letter-spacing: .06em; }
.pub-nav { display: flex; align-items: center; gap: 1rem; flex: none; }
.pub-link { display: none; color: var(--ink); text-decoration: none; font-size: .9rem; letter-spacing: .04em; }
.pub-link:hover { color: var(--brand); }
.pub-main { min-height: 60vh; }
body.has-wa .pub-main { padding-bottom: 76px; }

.hero { position: relative; display: flex; align-items: flex-end; min-height: min(88vh, 760px); padding: 6rem 0 3rem;
  background: #0b0a09 url("../img/hero-m.webp?v=20261010") center / cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15, 14, 13, .55) 0%, rgba(15, 14, 13, .7) 45%, rgba(15, 14, 13, .97) 100%); }
.hero-inner { max-width: 1140px; }
.eyebrow { font: 600 .8rem/1.2 var(--font); letter-spacing: .22em; text-transform: uppercase; color: var(--brand); margin-bottom: .6rem; }
.hero-title { font-size: clamp(2.6rem, 1.6rem + 6vw, 5.6rem); line-height: .95; text-transform: uppercase; letter-spacing: .02em; margin-bottom: .8rem; overflow-wrap: anywhere; }
.hero-lead { font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem); color: var(--ink); max-width: 36rem; }
.rating { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; font-size: 1rem; margin: 1rem 0; }
.rating a { color: var(--ink); text-decoration: none; }
.stars { color: var(--brand); letter-spacing: .1em; }
.hero-facts { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .35rem; color: var(--ink); }
.hero-facts li { display: flex; gap: .55rem; align-items: flex-start; }
.ico { flex: none; width: 18px; height: 18px; margin-top: .2rem; border: 2px solid var(--brand); }
.ico-pin { border-radius: 50% 50% 50% 0; transform: rotate(-45deg) scale(.85); }
.ico-clock { border-radius: 50%; background: linear-gradient(var(--brand), var(--brand)) 50% 30% / 2px 40% no-repeat; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-cta .btn { flex: 1 1 220px; }
.hero-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }

.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 1.6rem; }
.section-title { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.5rem); text-transform: uppercase; }

.catalog { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.svc { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.svc-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: saturate(.85) contrast(1.05); background: var(--surface-2); }
.svc-body { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.2rem; flex: 1; }
.svc-name { font-size: 1.35rem; text-transform: uppercase; margin: 0; }
.svc-desc { color: var(--muted); font-size: .93rem; margin: 0; }
.svc-meta { display: flex; justify-content: space-between; align-items: baseline; margin: auto 0 .3rem; padding-top: .6rem; border-top: 1px dashed var(--line-2); color: var(--muted); }
.svc-price { font: 600 1.6rem/1 var(--head); color: var(--brand); }
.svc-cond { font-size: .82rem; color: var(--muted); margin: 0; }

.steps-row { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 1rem; }
.steps-row li { display: grid; gap: .2rem; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps-row strong { font: 600 1.15rem/1.2 var(--head); text-transform: uppercase; }
.steps-row span:last-child { color: var(--muted); font-size: .92rem; }
.step-n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand); font: 600 1rem/1 var(--head); }

.visit { display: grid; gap: 2rem; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: .7rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours th { color: var(--muted); padding-right: 1rem; }
.big { font-size: 1.15rem; }

.pub-foot { background: #0a0908; border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--muted); font-size: .92rem; }
.foot-grid { display: grid; gap: 1.6rem; }
.foot-grid p { margin: 0 0 .35rem; }
.foot-brand { font: 600 1.2rem/1.2 var(--head); text-transform: uppercase; color: var(--ink); letter-spacing: .05em; }
.foot-title { color: var(--ink); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.pub-foot a { color: var(--ink); }

.wa-float { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 52px; padding: .7rem 1rem; border-radius: 999px; background: var(--wa); color: var(--wa-ink); font-weight: 700; font-size: .92rem;
  text-decoration: none; box-shadow: var(--shadow); }
.wa-float:hover { color: var(--wa-ink); filter: brightness(1.06); }
.wa-float span { display: none; }

/* ---------- Motor de reserva ---------- */
.booking { padding-top: 1.5rem; }
.stepper { list-style: none; display: flex; gap: .5rem; margin: 0 0 1.4rem; padding: 0; counter-reset: s; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding-top: .3rem; border-top: 3px solid var(--line-2); color: var(--muted); font-size: .78rem; text-align: center; }
.stepper li .step-n { width: 1.7rem; height: 1.7rem; font-size: .85rem; border-color: var(--line-2); color: var(--muted); }
.stepper li.done { border-top-color: var(--brand); }
.stepper li.done .step-n { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stepper li.current { border-top-color: var(--brand); color: var(--ink); font-weight: 600; }
.stepper li.current .step-n { border-color: var(--brand); color: var(--brand); }

.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.pick { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .7rem; min-height: 80px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.pick:hover { border-color: var(--brand); color: var(--ink); }
.pick-img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.pick-body { display: grid; gap: .15rem; min-width: 0; }
.pick-name { font: 600 1.1rem/1.2 var(--head); text-transform: uppercase; }
.pick-meta { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.pick-price { font: 600 1.25rem/1 var(--head); color: var(--brand); white-space: nowrap; }

.summary { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .7rem; margin-bottom: 1.2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.summary p { margin: 0; }
.summary-name { font: 600 1.05rem/1.25 var(--head); text-transform: uppercase; }
.summary-when { color: var(--ink); }

.days { list-style: none; margin: 0 0 1.2rem; padding: 0 0 .5rem; display: flex; gap: .45rem; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; -webkit-overflow-scrolling: touch; }
.days li { flex: 0 0 64px; scroll-snap-align: start; }
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05rem; min-height: 72px; padding: .4rem .2rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; line-height: 1.1; }
.day:hover { border-color: var(--brand); color: var(--ink); }
.day.is-on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.day.is-off { opacity: .4; text-decoration: line-through; }
.day-w { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.day-n { font: 600 1.35rem/1 var(--head); }
.day-m { font-size: .72rem; }
.slots-title { font-size: 1.1rem; text-transform: uppercase; }
.slots-group { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin: 1rem 0 .4rem; }
.slot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .45rem; }
.slot { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--bg-2); }
.slot:hover, .slot:focus-visible { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.slots[aria-busy="true"] { opacity: .5; }

.done { text-align: center; margin-bottom: 1.4rem; }
.done-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 2rem; font-weight: 700; margin-bottom: .8rem; }
.ticket { margin: 0 0 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1rem; }
.ticket div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; padding: .55rem 0; border-bottom: 1px dashed var(--line-2); }
.ticket div:last-child { border-bottom: 0; }
.ticket dt { color: var(--muted); }
.ticket dd { margin: 0; overflow-wrap: anywhere; }
.ticket.is-cancelled dd { text-decoration: line-through; color: var(--muted); }
.cancel-box { margin: 1.4rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.legal h2 { margin-top: 1.6rem; }
.legal ul { padding-left: 1.2rem; }

/* =================================================================== */
/* PANEL                                                                */
/* =================================================================== */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 16px;
  background: #0a0908; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; color: var(--ink); font: 600 1.05rem/1 var(--head); text-transform: uppercase; letter-spacing: .06em; text-decoration: none; min-width: 0; }
.nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; align-items: center; }
.nav a, .nav .link { color: var(--ink); text-decoration: none; opacity: .85; font-size: .93rem; }
.nav a[aria-current="page"] { opacity: 1; color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.nav-toggle { display: none; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 1.25rem 16px 3rem; }
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 16px; }
.footer a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: 0 0 1rem; min-width: 0; }
.card.highlight { border-color: var(--brand); }
.card > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.card > summary::-webkit-details-marker { display: none; }
.card > summary::before { content: "+"; color: var(--brand); font-weight: 700; width: 1rem; }
.card[open] > summary::before { content: "−"; }
.card[open] > summary { margin-bottom: 1rem; }
.inline-h { display: inline; margin: 0; font-size: 1.1rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { margin: 0; }
.stats { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 1rem; }
.stat { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.stat-n { font: 600 1.6rem/1.1 var(--head); color: var(--brand); overflow-wrap: anywhere; }
.stat-l { color: var(--muted); font-size: .85rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; padding: .65rem 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list li.is-off { opacity: .6; }
.list li.is-alert { background: #2a1d10; margin: 0 -.6rem; padding-left: .6rem; padding-right: .6rem; border-radius: var(--radius); }
.plain { padding-left: 1.2rem; }
.steps-list { padding-left: 1.2rem; }
.split { display: grid; gap: 1rem; }
.search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.search input { flex: 1 1 220px; width: auto; }
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin-top: 1rem; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.seg a { padding: .5rem .9rem; color: var(--ink); text-decoration: none; font-size: .9rem; min-height: 40px; display: inline-flex; align-items: center; }
.seg a[aria-current="true"] { background: var(--brand); color: var(--brand-ink); font-weight: 600; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
td.actions { white-space: nowrap; }
td.actions > * + * { margin-left: .9rem; }
.preview td { white-space: nowrap; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.map-grid { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.map-col { color: var(--brand); font-family: var(--head); text-transform: uppercase; letter-spacing: .03em; overflow-wrap: anywhere; }

/* Calendario */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.cal-toolbar .seg { margin: 0; }
.cal-nav { display: flex; gap: .4rem; }
.cal-jump { display: flex; gap: .4rem; align-items: center; }
.cal-jump input { width: auto; min-height: 38px; padding: .35rem .5rem; }
.cal-title { margin: .4rem 0 .3rem; }
.live { color: var(--muted); font-size: .85rem; }
.live.is-new { color: var(--ok); }
.legend { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.agenda { display: grid; gap: .75rem; }
.agenda-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .7rem; min-width: 0; }
.agenda-day.is-today { border-color: var(--brand); }
.agenda-date { font-size: 1rem; text-transform: uppercase; margin: 0 0 .5rem; }
.agenda-date a { color: var(--ink); text-decoration: none; }
.agenda-date span { color: var(--brand); }
.agenda-empty { color: var(--muted); font-size: .85rem; margin: 0; }
.agenda-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ev { display: grid; gap: .2rem; padding: .5rem .6rem; border-radius: 4px; background: var(--bg-2); border-left: 3px solid var(--brand); font-size: .9rem; min-width: 0; }
.ev-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.ev-main { display: grid; gap: .1rem; min-width: 0; overflow-wrap: anywhere; }
.ev-main > a:first-child { color: var(--ink); font-weight: 600; }
.ev-svc { color: var(--muted); }
.ev-tel { color: var(--muted); font-size: .85rem; }
.ev-note { color: var(--warn); font-size: .82rem; }
.ev-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.ev-actions { margin: 0; }
.ev-cancelada { opacity: .55; border-left-color: var(--line-2); }
.ev-cancelada .ev-time, .ev-cancelada .ev-main > a:first-child { text-decoration: line-through; }
.ev-conflict { border-left-color: var(--warn); }
.ev-block { border-left: 3px dashed var(--muted); background: repeating-linear-gradient(135deg, #1b1916 0 8px, #201d1a 8px 16px); color: var(--muted); }
.ev.is-new { animation: flashin 2.5s ease-out; }
@keyframes flashin { from { background: #3b3220; } to { background: var(--bg-2); } }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50; max-width: calc(100% - 32px);
  background: var(--ok); color: var(--brand-ink); font-weight: 600; padding: .7rem 1.1rem; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Horario */
.schedule input { min-width: 6.5rem; }
.schedule th[scope="row"] { color: var(--ink); text-transform: none; font-size: .95rem; letter-spacing: 0; }

/* Chat / bot */
.chat-card { padding: 0; overflow: hidden; }
.phone-frame { max-width: 520px; }
.chat { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; min-height: 280px; max-height: 60vh; overflow-y: auto;
  background: #0d1512 radial-gradient(circle at 20% 20%, rgba(37, 211, 102, .05), transparent 60%); }
.chat-empty { margin: auto; max-width: 22rem; }
.bubble { max-width: 85%; padding: .5rem .7rem .35rem; border-radius: 10px; font-size: .93rem; line-height: 1.45; position: relative; overflow-wrap: anywhere; }
.bubble-cliente { align-self: flex-end; background: #1f5c3a; color: #f1fff6; border-bottom-right-radius: 2px; }
.bubble-bot, .bubble-equipo { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 2px; }
.bubble-equipo { border: 1px solid var(--brand); }
.bubble-who { display: block; font-size: .72rem; color: var(--brand); font-weight: 700; text-transform: uppercase; }
.bubble-time { display: block; text-align: right; font-size: .7rem; opacity: .7; margin-top: .15rem; }
.card .bubble-bot { max-width: 100%; margin: 0 0 1rem; }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); background: var(--surface); align-items: flex-end; }
.chat-form input, .chat-form textarea { flex: 1; width: auto; min-width: 0; }
.faq-q { font-weight: 600; flex: 1 1 12rem; }
.convs .conv-last { flex-basis: 100%; color: var(--muted); font-size: .88rem; }

/* Acceso */
body.auth { display: grid; min-height: 100vh; place-items: center; padding: 16px; background: var(--bg) radial-gradient(circle at 50% 0%, #241f19, transparent 60%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin: 1rem auto; }
.auth-card .brand { margin: 0 0 1.2rem; }
.auth-card h1 { font-size: 1.5rem; }

/* ---------- Tablet y escritorio ---------- */
@media (min-width: 600px) {
  .catalog { grid-template-columns: repeat(2, 1fr); }
  .steps-row { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .span-2, .span-3 { grid-column: 1 / -1; }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .wa-float span { display: inline; }
  .pick { grid-template-columns: 80px 1fr auto; }
  .pick-img { width: 80px; height: 80px; }
}
@media (min-width: 900px) {
  .pub-link { display: inline; }
  .hero { background-image: url("../img/hero.webp?v=20261010"); align-items: center; padding: 7rem 0 5rem; }
  .catalog { grid-template-columns: repeat(3, 1fr); }
  .visit { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .section { padding: 5rem 0; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .span-2 { grid-column: span 2; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .agenda-semana { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
  .agenda-semana .agenda-day { padding: .5rem .45rem; }
  .agenda-semana .ev { font-size: .8rem; padding: .4rem .45rem; }
  .agenda-dia .agenda-list { gap: .6rem; }
  .agenda-dia .ev { grid-template-columns: 7rem minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; font-size: .95rem; }
}

/* ---------- Móvil: menú del panel y tablas como tarjetas ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; background: transparent; color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--radius);
    padding: .4rem .8rem; min-height: 40px; font: inherit; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: .5rem 0; gap: .7rem; }
  .nav.open { display: flex; }
  table:not(.hours) thead { display: none; }
  table:not(.hours), table:not(.hours) tbody, table:not(.hours) tr, table:not(.hours) td, table:not(.hours) th[scope="row"] { display: block; width: 100%; }
  table:not(.hours) tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .75rem; padding: .4rem .7rem; background: var(--bg-2); }
  table:not(.hours) td { border: 0; padding: .3rem 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .5rem; overflow-wrap: anywhere; }
  table:not(.hours) td::before { content: attr(data-label); color: var(--muted); font-size: .82rem; font-weight: 600; }
  table:not(.hours) td.actions { display: flex; flex-wrap: wrap; gap: .5rem 1rem; white-space: normal; }
  table:not(.hours) td.actions::before { content: none; }
  td.actions > * + * { margin-left: 0; }
  .preview td { max-width: none; white-space: normal; }
  .schedule th[scope="row"] { border: 0; padding: .3rem 0; font-family: var(--head); text-transform: uppercase; }
  .schedule input { min-width: 0; }
  .chat-form { flex-wrap: wrap; }
  .chat-form .btn { flex: 1 1 100%; }
}
@media (max-width: 380px) {
  .pub-brand { font-size: 1rem; }
  .pub-nav .btn-sm { padding: .45rem .6rem; font-size: .74rem; }
  .ticket div { grid-template-columns: 1fr; gap: .1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ev.is-new { animation: none; }
}
