/* ============ Órbita Dental ============ */
:root {
  --navy: #1C2F5E;
  --navy-2: #13233F;
  --teal: #23999A;
  --teal-dark: #1B7C7D;
  --teal-soft: #E5F4F3;
  --bg: #F6FAFA;
  --white: #FFFFFF;
  --ink: #13233F;
  --muted: #5D6A7C;
  --line: #DFE7EB;
  --amber: #D98E1E;
  --amber-soft: #FCF1DE;
  --red: #C2443A;
  --red-soft: #FBE7E5;
  --green: #2E8B57;
  --green-soft: #E3F3EA;
  --f-display: 'Outfit', system-ui, sans-serif;
  --f-body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  --max: 1220px;
  --r: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--navy); color: #fff; padding: 8px 14px; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.accent { color: var(--teal); }
.eyebrow { font: 600 .78rem/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.lead { color: var(--muted); font-size: 1.06rem; }
.pill { display: inline-flex; align-self: start; justify-self: start; padding: 7px 14px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-weight: 600; font-size: .85rem; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 600; font-size: .95rem; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .15s; }
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn.big { padding: 15px 26px; font-size: 1rem; }
.btn.small { padding: 8px 14px; font-size: .85rem; border-radius: 10px; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { border-color: var(--line); color: var(--navy); background: var(--white); }
.btn-ghost:hover { border-color: var(--navy); }
.link-btn { background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: .88rem; }
.link-btn.light { color: rgba(255, 255, 255, .7); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Barra de demostración y navegación ---------- */
.demo-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding: 8px 16px; background: #0C0B0E; color: #D9D2C4; font-size: .78rem; text-align: center; }
.demo-bar a { color: #E2B34E; font-weight: 600; text-underline-offset: 3px; }
.demo-bar .demo-brand { text-decoration: none; }
.nav-bar { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 74px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 52px; height: auto; }
.logo span { font: 500 1.35rem/1 var(--f-display); color: var(--navy); letter-spacing: -.01em; }
.logo b { font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--muted); }
.nav-links a:hover { color: var(--navy); }
.nav-links .nav-cta { color: #fff; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; margin: auto; }

/* ---------- Secciones ---------- */
section { padding: clamp(72px, 9vw, 112px) 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 44px; max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.hero { padding-top: clamp(40px, 6vw, 72px); background: linear-gradient(180deg, var(--teal-soft), var(--white) 85%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-copy { display: grid; gap: 22px; }
.hero-copy > p { font-size: 1.12rem; color: var(--muted); max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 28px; }
.hero-facts li { display: grid; }
.hero-facts b { font: 600 1.3rem/1.2 var(--f-display); color: var(--navy); }
.hero-facts span { font-size: .85rem; color: var(--muted); }
.hero-media { position: relative; }
.hero-media img { border-radius: 28px; aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; box-shadow: 0 30px 60px -36px rgba(19, 35, 63, .55); }
.hero-card { position: absolute; left: -24px; bottom: 28px; display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: 16px; padding: 14px 18px; box-shadow: 0 20px 40px -20px rgba(19, 35, 63, .45); }
.hero-card:empty { display: none; }
.hero-card small { display: block; font-size: .78rem; color: var(--muted); }
.hero-card b { display: block; font-family: var(--f-display); font-size: 1.05rem; }
.hero-card b::first-letter, .book-done dd::first-letter, .view-head p::first-letter { text-transform: uppercase; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); flex: none; }

.services { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.service { padding: 26px 22px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 10px; align-content: start; background: var(--white); transition: transform .25s, box-shadow .25s, border-color .25s; }
.service:hover { transform: translateY(-4px); border-color: transparent; box-shadow: 0 24px 40px -26px rgba(19, 35, 63, .4); }
.service .icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-dark); }
.service .icon svg { width: 26px; height: 26px; }
.service p { color: var(--muted); font-size: .92rem; }
.service a { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-dark); font-weight: 600; font-size: .9rem; text-decoration: none; margin-top: 4px; }
.service a svg { width: 16px; height: 16px; }

.promos-sec { background: var(--bg); }
.promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.promo { background: var(--white); border-radius: 22px; overflow: hidden; border: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; }
.promo img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: #F1F3F4; }
.promo > div { padding: 22px; display: grid; gap: 10px; align-content: start; }
.promo p { color: var(--muted); font-size: .93rem; }
.promo-price { display: flex; align-items: baseline; gap: 10px; }
.promo-price b { font: 700 1.7rem/1 var(--f-display); color: var(--teal-dark); }
.promo-price s { color: var(--muted); }
.promo small { color: var(--muted); font-size: .82rem; }
.promo .btn { margin-top: 6px; }

/* ---------- Reserva ---------- */
.booking { background: linear-gradient(180deg, var(--white), var(--teal-soft)); }
.book, .book-done { max-width: 860px; margin-inline: auto; background: var(--white); border-radius: 26px; border: 1px solid var(--line); padding: clamp(22px, 4vw, 40px); display: grid; gap: 28px; box-shadow: 0 30px 60px -44px rgba(19, 35, 63, .5); }
.book-step { display: grid; gap: 14px; min-width: 0; }
.book { grid-template-columns: minmax(0, 1fr); }
.book-step h3 { display: flex; align-items: center; gap: 12px; font-size: 1.25rem; }
.book-step h3 span { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.svc-choices { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.svc, .day, .slot { position: relative; }
.svc input, .day input, .slot input { position: absolute; opacity: 0; pointer-events: none; }
.svc span { display: grid; justify-items: center; gap: 8px; padding: 16px 8px; text-align: center; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 500; font-size: .88rem; cursor: pointer; transition: all .2s; height: 100%; }
.svc svg { width: 26px; height: 26px; color: var(--teal-dark); }
.svc input:checked + span { border-color: var(--teal); background: var(--teal-soft); color: var(--navy); font-weight: 600; }
.svc input:focus-visible + span, .day input:focus-visible + span, .slot input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.day { flex: none; scroll-snap-align: start; }
.day span { display: grid; justify-items: center; width: 70px; padding: 10px 0; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; transition: all .2s; text-transform: capitalize; }
.day b { font: 600 1.4rem/1.1 var(--f-display); }
.day small { font-size: .74rem; color: var(--muted); }
.day input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.day input:checked + span small { color: rgba(255, 255, 255, .75); }
.day.full span { opacity: .4; cursor: not-allowed; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot span { display: block; text-align: center; padding: 10px 0; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; transition: all .2s; }
.slot span:hover { border-color: var(--teal); }
.slot input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.slot-msg { color: var(--muted); font-size: .88rem; }
.book-summary { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--teal-soft); color: var(--navy); }
.book-summary:empty { display: none; }
.book-summary svg { width: 22px; height: 22px; color: var(--teal-dark); flex: none; margin-top: 2px; }
.book-done { justify-items: center; text-align: center; gap: 18px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.done-icon svg { width: 32px; height: 32px; }
.book-done h3 { font-size: 1.6rem; outline: none; }
.book-done dl { margin: 0; width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: left; }
.book-done dl div { background: var(--white); padding: 12px 14px; }
.book-done dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.book-done dd { margin: 0; font-weight: 600; }
.book-done > p { color: var(--muted); }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--navy); }
.field label { font-size: .88rem; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--white); font-weight: 400; font-size: .97rem; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(35, 153, 154, .15); }
.field.inline { grid-template-columns: auto 1fr; align-items: center; gap: 12px; max-width: 420px; }
.field.invalid input { border-color: var(--red); }
.field-error { display: none; font-size: .8rem; font-weight: 400; color: var(--red); }
.field.invalid .field-error { display: block; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row.three { grid-template-columns: repeat(3, 1fr); }

/* ---------- Equipo, clínica y ubicación ---------- */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.member { margin: 0; display: grid; gap: 14px; }
.member img { border-radius: 22px; aspect-ratio: 1; object-fit: cover; background: var(--teal-soft); }
.member figcaption { display: grid; gap: 2px; }
.member b { font: 600 1.1rem/1.3 var(--f-display); }
.member span { color: var(--muted); font-size: .9rem; }
.member small { color: var(--teal-dark); font-size: .78rem; font-weight: 600; }
.clinic { background: var(--bg); }
.clinic-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 14px; }
.clinic-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; }
.clinic-grid .big { grid-column: span 2; grid-row: span 2; }
.location-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: stretch; }
.location-info { display: grid; gap: 18px; align-content: center; }
.info-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.info-list li { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-list svg { width: 24px; height: 24px; color: var(--teal); flex: none; }
.info-list div { display: grid; }
.info-list small { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.info-list a { text-decoration: none; font-weight: 600; }
.map { border-radius: 22px; overflow: hidden; min-height: 360px; border: 1px solid var(--line); background: var(--bg); }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

footer { background: var(--navy-2); color: rgba(255, 255, 255, .72); padding: 56px 0 36px; }
.footer { display: grid; justify-items: center; gap: 14px; text-align: center; font-size: .92rem; }
.footer img { width: 170px; height: auto; }
.footer .staff { color: #9FE0DE; font-weight: 600; text-underline-offset: 3px; }
.credit { font-size: .8rem; color: rgba(255, 255, 255, .5); }
.credit a { text-decoration: none; }
.credit b { color: #E2B34E; }

.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .45); transition: transform .2s; }
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; }
.to-top { position: fixed; right: 27px; bottom: 94px; z-index: 60; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 24px -12px rgba(19, 35, 63, .5); opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity .3s, transform .3s, visibility .3s, background-color .2s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--navy); color: #fff; }
.to-top svg { width: 20px; height: 20px; }
.panel-body .to-top { bottom: 22px; right: 22px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ Panel de recepción ============ */
.panel-body { background: var(--bg); }
.login { min-height: calc(100vh - 40px); display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); background: var(--white); border-radius: 24px; border: 1px solid var(--line); padding: 32px; display: grid; gap: 16px; text-align: center; box-shadow: 0 30px 60px -40px rgba(19, 35, 63, .5); }
.login-card img { width: 170px; justify-self: center; }
.login-card h1 { font-size: 1.6rem; }
.login-card .field { text-align: left; }
.demo-creds { font-size: .85rem; background: var(--amber-soft); color: #8A5A10; padding: 10px; border-radius: 10px; }
.login-error { color: var(--red); font-size: .88rem; min-height: 1.2em; }

.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 36px); }
.side { background: var(--navy-2); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100vh; }
.side-logo img { width: 130px; margin: 0 auto; }
.side-nav { display: grid; gap: 6px; }
.side-nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 0; background: transparent; color: rgba(255, 255, 255, .75); font-weight: 500; cursor: pointer; text-align: left; }
.side-nav button svg { width: 20px; height: 20px; }
.side-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-nav button[aria-current] { background: var(--teal); color: #fff; }
.side-foot { margin-top: auto; display: grid; gap: 4px; justify-items: start; }
.user { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 8px; }
.avatar-mini { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; font-size: .85rem; }

.main { padding: clamp(20px, 3vw, 36px); min-width: 0; }
.main .view { padding: 0; }
.view-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.view-head h1 { font-size: 2rem; }
.view-head p { color: var(--muted); }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.seg { display: inline-flex; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.date-nav { display: flex; align-items: center; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 4px; border-left: 4px solid var(--teal); }
.stat.amber { border-left-color: var(--amber); }
.stat.navy { border-left-color: var(--navy); }
.stat small { color: var(--muted); font-size: .82rem; }
.stat b { font: 700 1.9rem/1 var(--f-display); }
.toolbar { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.toolbar .field.inline { font-size: .85rem; }
.toolbar select { padding: 8px 12px; }

.day-list { display: grid; gap: 10px; }
.appt { display: grid; grid-template-columns: 70px 1fr auto auto; gap: 16px; align-items: center; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 14px; padding: 14px 16px; }
.appt.pend { border-left-color: var(--amber); }
.appt.aten { border-left-color: var(--navy); }
.appt.canc { border-left-color: var(--red); opacity: .65; }
.appt-time { font: 700 1.2rem/1 var(--f-display); color: var(--navy); }
.appt-main { display: grid; gap: 2px; min-width: 0; }
.appt-main span { color: var(--muted); font-size: .9rem; }
.appt-main small { color: var(--teal-dark); font-size: .82rem; }
.appt-meta { display: grid; justify-items: end; gap: 4px; text-align: right; }
.appt-meta small { color: var(--muted); font-size: .78rem; }
.appt-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; min-width: 200px; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.badge.conf { background: var(--teal-soft); color: var(--teal-dark); }
.badge.pend { background: var(--amber-soft); color: #8A5A10; }
.badge.aten { background: #E6EAF3; color: var(--navy); }
.badge.canc { background: var(--red-soft); color: var(--red); }
.empty { background: var(--white); border: 1px dashed var(--line); border-radius: 16px; padding: 40px; text-align: center; color: var(--muted); }

.week { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.week-day { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 6px; align-content: start; min-height: 220px; }
.week-day.today { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.week-head { display: grid; justify-items: center; border: 0; background: transparent; cursor: pointer; padding: 4px; border-radius: 10px; text-transform: capitalize; }
.week-head:hover { background: var(--bg); }
.week-head span { font-size: .8rem; color: var(--muted); }
.week-head b { font: 700 1.4rem/1.1 var(--f-display); }
.week-head small { font-size: .74rem; color: var(--muted); text-transform: none; }
.chip-appt { display: grid; text-align: left; border: 0; border-left: 3px solid var(--teal); background: var(--teal-soft); border-radius: 8px; padding: 6px 8px; font-size: .8rem; cursor: pointer; }
.chip-appt small { color: var(--muted); font-size: .72rem; }
.chip-appt.pend { border-left-color: var(--amber); background: var(--amber-soft); }
.chip-appt.aten { border-left-color: var(--navy); background: #EEF1F7; }
.chip-appt.canc { border-left-color: var(--red); background: var(--red-soft); text-decoration: line-through; }

.promo-admin { display: grid; gap: 16px; }
.promo-edit { display: grid; grid-template-columns: 180px 1fr; gap: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.promo-edit.off { opacity: .75; }
.promo-edit img { border-radius: 12px; aspect-ratio: 1; object-fit: cover; background: #F1F3F4; }
.promo-fields { display: grid; gap: 12px; }
.promo-fields .btn { justify-self: start; }
.promo-top { display: flex; justify-content: space-between; align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 42px; height: 24px; border-radius: 999px; background: #C9D3DA; position: relative; transition: background-color .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

.dialog { border: 0; border-radius: 22px; padding: 0; width: min(560px, calc(100% - 32px)); box-shadow: 0 40px 80px -30px rgba(19, 35, 63, .6); }
.dialog::backdrop { background: rgba(19, 35, 63, .5); }
.dialog form { padding: 26px; display: grid; gap: 14px; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 6px; }

/* ---------- Aparición ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .service, .to-top, .toast { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .svc-choices { grid-template-columns: repeat(3, 1fr); }
  .week { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .appt { grid-template-columns: 64px 1fr; }
  .appt-meta { justify-items: start; text-align: left; }
  .appt-actions { justify-content: flex-start; min-width: 0; }
}
@media (max-width: 900px) {
  .hero-grid, .location-grid { grid-template-columns: 1fr; }
  .hero-card { left: 12px; }
  .promos, .team { grid-template-columns: repeat(2, 1fr); }
  .clinic-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; }
  .side-logo img { width: 90px; margin: 0; }
  .side-nav { grid-auto-flow: column; }
  .side-foot { margin: 0 0 0 auto; grid-auto-flow: column; align-items: center; }
  .user { display: none; }
  .book-done dl { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .nav-toggle { display: grid; }
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 18px; background: var(--white); border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 13px 0; font-size: 1.05rem; }
  .nav-links .nav-cta { margin-top: 8px; }
  .services, .promos, .row, .row.three, .week { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .svc-choices { grid-template-columns: repeat(2, 1fr); }
  .clinic-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .clinic-grid .big { grid-column: auto; grid-row: span 1; }
  .field.inline { grid-template-columns: 1fr; }
  .promo-edit { grid-template-columns: 1fr; }
  .promo-edit img { max-width: 160px; }
  .side-foot { margin: 0; width: 100%; justify-content: space-between; }
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .to-top { right: 19px; bottom: 82px; width: 46px; height: 46px; }
}
