:root {
  --bg: #EEF1F4; --surface: #FFFFFF; --ink: #13202C; --muted: #5B6B79; --line: #D8DFE6;
  --accent: #1F4FD8; --accent-ink: #FFFFFF; --soft: #E3EAFB; --taken: #E9ECF0;
  --ok: #1B7F4B; --ok-soft: #DDF2E6; --bad: #B4322A; --bad-soft: #FBE4E1; --warn: #8A5A00; --warn-soft: #FDF0D5;
  --f-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E151C; --surface: #16202A; --ink: #E8EDF2; --muted: #93A3B2; --line: #26323E;
    --accent: #6E95FF; --accent-ink: #0B1220; --soft: #1C2A45; --taken: #1C2530;
    --ok: #5ACB8C; --ok-soft: #173326; --bad: #FF8A80; --bad-soft: #3A1C1A; --warn: #F5C46B; --warn-soft: #3A2E14;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--f-display); letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(24px, 4vw, 32px); line-height: 1.1; }
h2 { font-size: 19px; font-weight: 600; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin: 0; }
.note { font-size: 13px; color: var(--muted); margin: 0; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 16px; }
.top-in { max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.top-in.wide, main.wide { max-width: 1040px; }
.top nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top nav a:not(.btn), .link { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.top nav form { margin: 0; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 22px; color: var(--ink); text-decoration: none; letter-spacing: -.03em; }
.brand span { color: var(--accent); }
main { max-width: 560px; margin: 0 auto; padding: 24px 16px 56px; display: flex; flex-direction: column; gap: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 15px var(--f-body); border-radius: 12px; padding: 12px 18px;
  cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 7px 12px; font-size: 13.5px; border-radius: 10px; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.narrow { max-width: 440px; width: 100%; margin: 12px auto 0; }
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 13.5px; }
.field small { color: var(--muted); font-size: 12.5px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-width: 0; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
.flash { margin: 0; padding: 11px 14px; border-radius: 12px; font-size: 14px; }
.flash.err { background: var(--bad-soft); color: var(--bad); }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.banner { padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner-pay { margin: 6px 0 0; font-weight: 500; }
.banner a { color: inherit; font-weight: 700; }

/* Landing */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 24px 0 12px; }
.hero h1 { font-size: clamp(34px, 6vw, 58px); font-weight: 800; letter-spacing: -.035em; line-height: 1; margin: 10px 0 16px; }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 52ch; margin: 0 0 22px; }
.hero .note { margin-top: 12px; }
.phone { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 24px 60px -30px rgba(19, 32, 44, .35); max-width: 340px; justify-self: center; width: 100%; }
.ph-shop { display: flex; gap: 10px; align-items: center; padding-bottom: 6px; }
.ph-shop small { display: block; color: var(--muted); font-size: 12px; }
.ph-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 800 15px var(--f-display); }
.ph-opt { display: flex; justify-content: space-between; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 14px; }
.ph-opt small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.ph-opt.sel { border-color: var(--accent); background: var(--soft); }
.ph-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ph-slots i { font: 500 13px var(--f-mono); font-style: normal; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 0; }
.ph-slots i.off { background: var(--taken); color: var(--muted); border-color: transparent; text-decoration: line-through; }
.ph-slots i.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ph-btn { background: var(--accent); color: var(--accent-ink); text-align: center; border-radius: 12px; padding: 11px; font-weight: 600; font-size: 14px; }
.how { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; }
.how h2 { font-size: 28px; font-weight: 800; }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: s; }
.steps-list li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.steps-list li::before { content: counter(s); font: 800 26px var(--f-display); color: var(--accent); }
.steps-list span { color: var(--muted); font-size: 14px; }
.cta-band { margin-top: 24px; background: var(--ink); color: var(--bg); border-radius: 22px; padding: 32px 28px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-band h2 { font-size: 26px; font-weight: 800; max-width: 22ch; }

/* Panel */
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.share { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 0 1 460px; }
.share label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.copy { display: flex; gap: 6px; }
.copy input { font-family: var(--f-mono); font-size: 13px; padding: 8px 10px; }
.setup ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.setup li { display: flex; gap: 10px; align-items: center; }
.setup li a { color: var(--ink); font-weight: 500; }
.setup li.done a { color: var(--muted); text-decoration: line-through; }
.tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ok); }
.setup li.done .tick { background: var(--ok-soft); border-color: transparent; }
.day-group { display: flex; flex-direction: column; gap: 10px; }
.day-group h2 { font-size: 17px; }
.list-card { padding: 4px 20px; gap: 0; }
.appt { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.appt:first-child { border-top: 0; }
.appt-main { min-width: 0; display: flex; flex-direction: column; }
.appt-main small { color: var(--muted); overflow-wrap: anywhere; }
.appt.cancel { opacity: .55; }
.appt.cancel strong { text-decoration: line-through; }
.cancel-form { margin: 0; }
.pill { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--taken); color: var(--muted); white-space: nowrap; }
.empty p { margin: 0; color: var(--muted); }

/* Configurar */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.svc-row, .staff-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.svc-row > input { flex: 1 1 180px; }
.staff-row > input { flex: 1 1 160px; }
.svc-row.add, .staff-row.add { padding-top: 12px; border-top: 1px dashed var(--line); }
.mini { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); font-weight: 600; gap: 2px; width: 88px; }
.mini input { padding: 9px 8px; }
.hour-row { display: grid; grid-template-columns: 88px auto 1fr auto 1fr; gap: 8px; align-items: center; }
.hour-row input[type=time] { padding: 8px; }
.day-name { font-weight: 600; font-size: 14px; }
.chk { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.prefix { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); overflow: hidden; }
.prefix span { padding-left: 12px; color: var(--muted); font: 13px var(--f-mono); white-space: nowrap; }
.prefix input { border: 0; padding-left: 2px; font-family: var(--f-mono); font-size: 13.5px; }

/* Página pública de reservas */
.book { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.shop { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; gap: 16px; align-items: center; }
.shop p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.shop .desc { color: var(--ink); }
.logo { flex: none; width: 60px; height: 60px; border-radius: 14px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 800 22px var(--f-display); }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--accent); }
.list { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.opt:hover { border-color: var(--accent); }
.opt strong { display: block; font-weight: 600; }
.opt small { color: var(--muted); }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.day { flex: none; width: 58px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; border-radius: 12px; padding: 8px 0; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.day b { font: 600 20px/1.1 var(--f-display); }
.day small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day[aria-pressed="true"] small { color: var(--accent-ink); }
.day:disabled { opacity: .4; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { font-size: 14px; border: 1.5px solid var(--line); background: var(--surface); color: inherit; border-radius: 10px; padding: 9px 0; cursor: pointer; }
.slot:hover { border-color: var(--accent); background: var(--soft); }
.summary { background: var(--soft); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; margin: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.done { align-items: flex-start; }
.done form { margin: 0; }
.check { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 26px; font-weight: 700; }
.foot { text-align: center; font-size: 12.5px; color: var(--muted); }
.foot a { color: var(--ink); font-family: var(--f-display); font-weight: 800; text-decoration: none; }

.table-wrap { overflow-x: auto; padding: 8px 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
td form { margin: 0; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .steps-list { grid-template-columns: 1fr 1fr; }
  .config-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps-list { grid-template-columns: 1fr; }
  .hour-row { grid-template-columns: 1fr auto; }
  .hour-row .muted { display: none; }
  .hour-row input[type=time] { grid-column: span 1; }
  .appt { grid-template-columns: 50px 1fr; }
  .appt > form, .appt > .pill { grid-column: 2; justify-self: start; }
  .cta-band { padding: 24px 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .opt, .slot, .day { transition: border-color .15s, background .15s; }
}
.rubros { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rubros li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 500; }
.rubros li:last-child { background: var(--soft); border-color: transparent; color: var(--accent); }
/* Celular de la portada: los ejemplos se apilan en la misma celda y rotan cada 4 s (4 ejemplos = 16 s) */
.ph-deck { display: grid; }
.ph-card { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; opacity: 0; }
.ph-card:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .ph-card { animation: ph-rotate 16s infinite; animation-delay: calc(var(--i) * 4s - 16s); }
  .ph-card:first-child { animation-delay: 0s; }
}
@keyframes ph-rotate { 0%, 22% { opacity: 1; } 25%, 97% { opacity: 0; } 100% { opacity: 1; } }
/* Reserva a mano (panel) */
.manual { padding: 14px 18px; }
.manual summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.manual summary::-webkit-details-marker { display: none; }
.manual[open] summary { margin-bottom: 14px; }
.manual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.manual-grid .wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .manual-grid { grid-template-columns: 1fr; } }
/* Bloqueos */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.appt.block { opacity: .8; }
.appt.block strong { color: var(--muted); }
.block-list { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 8px; }
.block-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.block-list small { display: block; color: var(--muted); }
.block-list form { margin: 0; }
[hidden] { display: none !important; }
.appt-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.appt-actions form { margin: 0; }
@media (max-width: 560px) { .appt > .appt-actions { grid-column: 2; justify-content: flex-start; } }
.winback-stats { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.winback-stats b { color: var(--ink); }
.demo-note { background: var(--soft); color: var(--ink); border-radius: 14px; padding: 12px 16px; font-size: 14px; }
.demo-note a { font-weight: 700; }
.ref-note { background: var(--ok-soft); color: var(--ink); border-radius: 12px; padding: 10px 14px; margin: 0; }
.invite .copy { margin: 12px 0 0; }
.invite .copy { flex-wrap: wrap; } .invite .copy input { flex: 1 1 220px; min-width: 0; }
