/* Paleta tomada del logo: crema, nude, oro rosa y negro */
:root {
  --cream: #FBF5F1;
  --blush: #F3E3DA;
  --nude: #E7C9B9;
  --rose: #B9806F;
  --rose-deep: #7E4A3B; /* 4.6:1 sobre nude, 5.7:1 sobre blush */
  --ink: #231815;
  --muted: #6B5750; /* 5.4:1 sobre blush */
  --line: #EAD7CD;
  --white: #fff;
  /* oro rosa: el texto blanco cae sobre el tramo medio (≈4.8:1) */
  --gold-grad: linear-gradient(135deg, #C08A78 0%, #9C6553 50%, #84503F 100%);
  --radius: 18px;
  --shadow: 0 10px 30px rgba(142, 87, 71, .12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: Montserrat, system-ui, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.6; }
img, video { max-width: 100%; display: block; }
a { color: var(--rose-deep); }
h1, h2, h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
.script { font-family: 'Great Vibes', cursive; font-weight: 400; color: var(--rose-deep); font-size: 1.25em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; }
::selection { background: var(--nude); color: var(--ink); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 0; cursor: pointer; font: 600 .95rem Montserrat, sans-serif;
  padding: .8em 1.6em; border-radius: 999px; color: var(--white); background: var(--gold-grad); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; color: var(--rose-deep); box-shadow: inset 0 0 0 1.5px var(--rose); }
.btn-small { padding: .45em 1.1em; font-size: .85rem; }
.btn-danger { background: #A8433A; }

/* Header */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem clamp(16px, 4vw, 48px); background: rgba(251, 245, 241, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 50%; }
.brand span { font-family: 'Great Vibes', cursive; font-size: 2rem; }
nav { display: flex; align-items: center; gap: 1.4rem; }
nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
nav a:hover { color: var(--rose-deep); }
.account { display: inline-flex; align-items: center; gap: .6rem; }
.hello { font-size: .9rem; color: var(--muted); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* El saludo ocupa mucho: en pantallas medianas quedan solo los botones (Panel, Salir, Mi cuenta) */
@media (max-width: 1180px) and (min-width: 961px) { .hello { display: none; } }
.menu-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--rose-deep); cursor: pointer; }
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  nav:where(#nav) { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem; }
  nav:where(#nav).open { display: flex; }
  nav:where(#nav) a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  #account { padding-top: .8rem; }
}

/* Hero */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 2rem; padding: clamp(40px, 8vw, 100px) clamp(16px, 6vw, 80px);
  background: radial-gradient(circle at 80% 30%, var(--nude), transparent 55%), radial-gradient(circle at 10% 90%, var(--blush), transparent 50%); }
.eyebrow { letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; color: var(--rose-deep); font-weight: 600; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.lead { font-size: 1.1rem; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.hero-logo img { width: min(260px, 70vw); height: auto; margin: auto; border-radius: 50%; box-shadow: 0 20px 60px rgba(142, 87, 71, .25), 0 0 0 10px rgba(255, 255, 255, .6); }
@media (max-width: 780px) { .hero { grid-template-columns: 1fr; text-align: center; } .lead { margin-inline: auto; } .hero-cta { justify-content: center; } }
/* En el celular el logo achicado deja el título y el botón de turno en la primera pantalla */
@media (max-width: 600px) { .hero { gap: 1.2rem; padding-top: 28px; } .hero-logo img { width: 132px; box-shadow: 0 12px 32px rgba(142, 87, 71, .22), 0 0 0 6px rgba(255, 255, 255, .6); } }
/* Portada con un trabajo real: arco con marco oro rosa. En el celular va debajo del texto para no tapar el botón de turno. */
.hero-logo.has-photo { padding: 4px; border-radius: 999px 999px 32px 32px; background: var(--gold-grad); box-shadow: 0 30px 70px rgba(142, 87, 71, .25); justify-self: center; width: min(400px, 100%); }
.hero-logo .hero-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px 28px 28px; box-shadow: none; }
@media (max-width: 780px) { .hero-logo.has-photo { order: 0; width: min(340px, 100%); } }
@media (max-width: 600px) { .hero-logo.has-photo { width: 100%; border-radius: 164px 164px 28px 28px; } .hero-logo .hero-photo { width: 100%; aspect-ratio: 4 / 3; border-radius: 160px 160px 24px 24px; } }
/* Reserva el alto de la foto de portada (app.js la cambia por el logo al cargar) para que no empuje el contenido (CLS). */
.hero-logo { display: grid; align-content: center; min-height: 508px; }
@media (max-width: 780px) { .hero-logo { min-height: 433px; } }
@media (max-width: 600px) { .hero-logo { min-height: calc(88vw * .75 + 8px); } }
/* Secciones que se llenan por JS: alto mínimo mientras llegan los datos. */
.team:empty { min-height: 260px; }
.cards:empty { min-height: 340px; }

/* Secciones */
.section { padding: clamp(48px, 8vw, 90px) clamp(16px, 6vw, 80px); }
.section-alt { background: var(--blush); }
.section-title { text-align: center; font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.5em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; max-width: 1100px; margin: auto; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.card h3 { font-size: 1.5rem; color: var(--rose-deep); border-bottom: 1px solid var(--line); padding-bottom: .4em; }
.card ul { padding-left: 1.1em; margin: 0; }
.card li::marker { color: var(--rose); }
.center { text-align: center; }

/* Galería */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.5rem; }
.chip { border: 1.5px solid var(--rose); background: transparent; color: var(--rose-deep); padding: .4em 1.2em; border-radius: 999px; cursor: pointer; font: 500 .9rem Montserrat, sans-serif; }
.chip.active { background: var(--rose-deep); border-color: var(--rose-deep); color: var(--white); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; max-width: 1200px; margin: auto; }
.tile { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.tile img, .tile video { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--nude); }
.tile-img { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; }
.tile figcaption { padding: .6rem .9rem; font-size: .9rem; color: var(--muted); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); }

/* Turnos */
.booking { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; max-width: 1000px; margin: auto; align-items: start; }
.stack { display: grid; gap: 1rem; }
label { display: grid; gap: .35rem; font-weight: 500; font-size: .92rem; }
input, select, textarea { font: inherit; padding: .7em .9em; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); outline: none; box-shadow: 0 0 0 3px rgba(185, 128, 111, .2); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 500; font-size: .92rem; margin-bottom: .35rem; }
.slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot { display: block; position: relative; }
.slot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.slot span { display: block; padding: .45em .9em; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 500; }
.slot input:checked + span { background: var(--rose-deep); color: var(--white); border-color: var(--rose-deep); }
.slot input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }
.form-msg:empty { display: none; }
.form-msg { margin: 0; color: var(--rose-deep); font-weight: 500; }
.ok { background: #E8F3EA; color: #2F6B3B; padding: .7rem 1rem; border-radius: 12px; }
.appts { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.appts li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 12px; }
.appts li span:first-letter { text-transform: uppercase; }
.appts li.cancelado { opacity: .6; }
.badge { display: inline-block; margin-left: .5rem; font-size: .75rem; padding: .1em .6em; border-radius: 999px; background: var(--blush); color: var(--muted); }

/* Contacto y mapa */
.contact { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; max-width: 1100px; margin: auto; align-items: center; }
.map { min-height: 340px; border-radius: var(--radius); overflow: hidden; background: var(--nude); display: grid; place-content: center; text-align: center; gap: 1rem; padding: 1rem; box-shadow: var(--shadow); }
.map iframe { width: 100%; height: 100%; min-height: 340px; border: 0; }
.map:has(iframe) { padding: 0; display: block; }
@media (max-width: 780px) { .contact { grid-template-columns: 1fr; } }

.footer { text-align: center; padding: 2rem 16px 5rem; font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); }
/* Crédito del desarrollo: discreto, debajo de los datos de Diva */
.footer .footer-credit { margin-top: 1.4rem; font-size: .78rem; letter-spacing: .02em; }
.footer-credit a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--nude); }
.footer-credit a:hover { color: var(--rose-deep); text-decoration-color: currentColor; }

/* WhatsApp flotante */
.wa { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: grid; justify-items: end; gap: .6rem; }
.wa-btn { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; background: #25D366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); position: relative; isolation: isolate; }
.wa-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: rgba(37, 211, 102, .5); animation: pulse 2.5s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: .5; } 60%, 100% { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wa-btn::after { animation: none; } html { scroll-behavior: auto; } }
.wa-panel { background: var(--white); border-radius: var(--radius); padding: 1rem; width: 250px; box-shadow: 0 12px 40px rgba(0,0,0,.18); display: grid; gap: .5rem; }
.wa-panel p { margin: 0 0 .3rem; }
.wa-panel a { display: block; padding: .6rem .8rem; border-radius: 12px; background: #E9F9EF; color: #11643A; text-decoration: none; font-weight: 500; }
.wa-panel a:hover { background: #D3F3DF; }

/* Modales */
.modal, .lightbox { border: 0; border-radius: var(--radius); padding: 2rem; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal::backdrop, .lightbox::backdrop { background: rgba(35, 24, 21, .55); }
.modal-close { position: absolute; top: .6rem; right: .8rem; background: none; border: 0; font-size: 1.8rem; cursor: pointer; color: var(--muted); }
.gbtn { display: flex; justify-content: center; min-height: 44px; margin: 1rem 0; }
.gbtn:empty { display: none; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .85rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lightbox { width: min(900px, calc(100vw - 32px)); padding: 1rem; background: var(--white); }
.lightbox img { margin: auto; max-height: 80vh; border-radius: 12px; }
.lightbox-caption { text-align: center; margin: .6rem 0 0; color: var(--muted); }

/* Banner de cookies */
.cookie-banner { position: fixed; left: 16px; right: 96px; bottom: 16px; z-index: 40; max-width: 720px; background: var(--ink); color: #F4E9E3; border-radius: var(--radius);
  padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.cookie-banner p { margin: 0; flex: 1 1 280px; font-size: .9rem; }
.cookie-banner a { color: var(--nude); }
.cookie-banner .btn-ghost { color: var(--nude); box-shadow: inset 0 0 0 1.5px var(--nude); }
.cookie-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
/* En el celular, banner compacto para no tapar el botón de turno */
@media (max-width: 600px) {
  .cookie-banner { left: 12px; right: 84px; bottom: 12px; padding: .75rem .9rem; gap: .6rem; }
  .cookie-banner p { flex-basis: 100%; font-size: .8rem; line-height: 1.45; }
  .cookie-actions .btn { padding: .5em 1em; font-size: .8rem; }
}

/* Páginas de texto y admin */
.page { max-width: 860px; margin: auto; padding: clamp(32px, 6vw, 64px) 16px; }
.page h1 { font-size: clamp(2rem, 5vw, 3rem); }
.page h2 { margin-top: 1.6em; color: var(--rose-deep); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.admin { max-width: 1200px; }
.login-card { max-width: 420px; margin: 4rem auto; }
.panel .card { margin-bottom: 1.5rem; }
.toolbar { display: flex; gap: 1rem; margin-bottom: 1rem; }
.service-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; align-items: end; }
.row-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
tr.cancelado { opacity: .5; }
.tile .row-actions { padding: 0 .9rem .8rem; justify-content: flex-start; }
nav a.active { color: var(--rose-deep); text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Panel: barra superior con íconos + menú lateral que se oculta ---------- */
.admin-top { gap: .8rem; justify-content: flex-start; }
.admin-top .brand { margin-right: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--rose-deep); cursor: pointer; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--blush); }
.logout-btn { box-shadow: inset 0 0 0 1.5px var(--nude); border-radius: 50%; }
.logout-btn:hover { background: var(--rose-deep); color: var(--white); box-shadow: none; }
.admin-shell { display: block; }
body.signed-in .admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
body.signed-in.side-collapsed .admin-shell { grid-template-columns: minmax(0, 1fr); }
.admin-shell > nav.sidebar { position: sticky; top: 71px; height: calc(100vh - 71px); overflow-y: auto; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: 1.2rem .8rem; background: var(--white); border-right: 1px solid var(--line); }
.admin-shell > nav.sidebar[hidden], body.side-collapsed .admin-shell > nav.sidebar { display: none; }
.admin-shell > nav.sidebar a { padding: .6rem .9rem; border: 0; border-radius: 10px; color: var(--ink); font-weight: 500; text-decoration: none; }
.admin-shell > nav.sidebar a:hover { background: var(--blush); color: var(--rose-deep); }
.admin-shell > nav.sidebar a.active { background: var(--blush); color: var(--rose-deep); font-weight: 600; text-decoration: none; box-shadow: inset 3px 0 0 var(--rose-deep); }
.admin-shell .page.admin { max-width: 1280px; width: 100%; padding-top: clamp(24px, 4vw, 40px); }
@media (max-width: 900px) {
  body.signed-in .admin-shell, body.signed-in.side-collapsed .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-shell > nav.sidebar { display: none; position: fixed; z-index: 25; top: 71px; left: 0; bottom: 0; width: min(280px, 84vw); height: auto; box-shadow: 12px 0 40px rgba(35, 24, 21, .18); }
  body.side-open .admin-shell > nav.sidebar:not([hidden]) { display: flex; }
}

/* ---------- Panel › Agenda: un día, una columna por profesional ---------- */
.agenda-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.agenda-head h1 { margin: 0; }
.agenda-head p { margin: .2rem 0 0; }
.agenda-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.agenda-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.8rem 0 .6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.page .agenda-bar h2 { margin: 0; font-size: 1.6rem; color: var(--ink); }
.agenda-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.agenda-nav input { width: auto; padding: .4em .8em; }
.agenda-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin: 0 0 1rem; padding: 0; font-size: .85rem; color: var(--muted); }
.agenda-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.agenda-legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.day-view { --cols: 2; display: grid; grid-template-columns: 64px repeat(var(--cols), minmax(200px, 1fr)); overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dv-corner, .dv-head { position: sticky; top: 0; z-index: 2; background: var(--white); border-bottom: 1px solid var(--line); }
.dv-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-left: 1px solid var(--line); }
.dv-head div { display: grid; line-height: 1.3; }
.dv-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--blush); color: var(--rose-deep); font-weight: 600; font-size: .8rem; flex: none; }
.dv-times { position: relative; }
.dv-times span { position: absolute; right: .6rem; transform: translateY(-50%); font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.dv-times span:first-child { transform: none; top: 4px !important; }
.dv-body { position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(var(--slot, 44px) - 1px), var(--line) calc(var(--slot, 44px) - 1px) var(--slot, 44px)); }
.dv-body.closed { background: repeating-linear-gradient(135deg, var(--cream) 0 10px, #F4EAE3 10px 20px); }
.dv-closed { text-align: center; margin: 1.2rem .5rem; }
.dv-appt { position: absolute; left: 6px; right: 6px; display: grid; align-content: start; gap: 2px; padding: .45rem .7rem; overflow: hidden; text-align: left; cursor: pointer;
  border: 0; border-left: 3px solid var(--c); border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, white); color: var(--ink); font: inherit; transition: box-shadow .15s, transform .15s; }
.dv-appt:hover { box-shadow: 0 6px 18px rgba(35, 24, 21, .12); transform: translateY(-1px); }
.dv-appt strong { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-appt span { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Turno de 30 min: hora, nombre y servicio en una sola línea */
.dv-appt.short { display: flex; align-items: center; gap: .4rem; padding: 0 .6rem; }
.dv-appt.short strong { flex: none; max-width: 65%; }
.dv-appt.short span::before { content: "· "; }
.dv-appt.cancelled { background: repeating-linear-gradient(135deg, #F7F1EE 0 6px, #EFE6E1 6px 12px); border-left-color: var(--line); }
.dv-appt.cancelled strong { text-decoration: line-through; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .dv-appt { transition: none; } .dv-appt:hover { transform: none; } }
#appt-dialog h2 { margin-top: 0; }
.show-mode-help { margin-top: -.4rem; }
.tile.is-hero { box-shadow: 0 0 0 3px var(--rose-deep), var(--shadow); }

/* Login / registro */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }
.tabs { display: flex; gap: .3rem; margin: 0 2rem 1.2rem 0; border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; padding: .7rem .5rem; font: 600 1rem Montserrat, sans-serif; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--rose-deep); border-bottom-color: var(--rose); }
.link { background: none; border: 0; padding: 0; color: var(--rose-deep); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; justify-self: start; }
label.check { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: .3em; accent-color: var(--rose-deep); }
.form-msg.ok { background: #E8F3EA; color: #2F6B3B; padding: .7rem 1rem; border-radius: 12px; }
.pw { display: grid; gap: .4rem; }
.pw-input { position: relative; display: block; }
.pw-input input { padding-right: 5.5rem; }
.pw-toggle { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--rose-deep); font: 500 .8rem Montserrat, sans-serif; cursor: pointer; padding: .4rem; }
.pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .8rem; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: #2F6B3B; }
.pw-rules li.ok::before { content: "✓ "; }

/* Agenda mensual */
.cal { background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: .8rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .5rem; }
.cal-head strong::first-letter { text-transform: uppercase; }
.cal-nav { background: var(--white); border: 1px solid var(--line); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 1.2rem; color: var(--rose-deep); }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: .75rem; font-weight: 600; color: var(--muted); padding: .2rem 0; }
.cal-day { aspect-ratio: 1; border: 0; border-radius: 10px; font: 500 .9rem Montserrat, sans-serif; background: transparent; color: #BFB0AA; cursor: default; }
.cal-day.free { background: var(--white); color: var(--ink); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--nude); }
.cal-day.free:hover { box-shadow: inset 0 0 0 2px var(--rose); }
.cal-day.picked { background: var(--rose-deep); color: var(--white); box-shadow: none; }
.cal-legend { display: flex; align-items: center; gap: .3rem; margin: .6rem 0 0; }
.cal-legend .dot { width: 12px; height: 12px; border-radius: 4px; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--nude); }

/* Mis turnos */
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h3 { display: inline-block; margin: 0; border: 0; padding: 0; }
details.card > summary::after { content: " ▾"; color: var(--rose); }
details.card[open] > summary { margin-bottom: 1rem; }
h4 { margin: 1.2rem 0 .5rem; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.2rem; color: var(--rose-deep); }

.narrow { max-width: 460px; }
.narrow-form { max-width: 560px; }
/* Panel › Datos del local › fotos de cada profesional */
#pro-photos { margin-top: 1.5rem; }
.pro-photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.pro-photo { margin: 0; display: grid; gap: .6rem; }
.pro-photo img, .pro-photo-empty { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; background: var(--blush); }
.pro-photo-empty { display: grid; place-items: center; color: var(--muted); border: 1.5px dashed var(--nude); }
.pro-photo figcaption { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.pro-photo input:focus-visible + label { outline: 3px solid var(--rose); outline-offset: 2px; }
.page-logo { margin: 0 auto 1.5rem; border-radius: 50%; }
#staff-list li { padding: .5rem 1rem; }
.badge.warn { background: #FBE3DF; color: #A8433A; margin-left: 0; }
.staff-line { margin: 0; }
.staff-name { font-weight: 600; color: var(--rose-deep); }
.warn-box { background: #FBE3DF; color: #A8433A; padding: .8rem 1rem; border-radius: 12px; }

/* Menú desplegable de servicios */
.dropdown { position: relative; }
.dropdown-toggle { background: none; border: 0; padding: 0; font: 500 1rem Montserrat, sans-serif; color: var(--ink); cursor: pointer; }
.dropdown-toggle::after { content: " ▾"; font-size: .8em; color: var(--rose); }
.dropdown-toggle:hover { color: var(--rose-deep); }
.dropdown-menu { display: none; position: absolute; top: calc(100% + .7rem); left: 50%; transform: translateX(-50%); min-width: 230px; z-index: 30;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .5rem; }
.dropdown-menu::before { content: ""; position: absolute; inset: -.8rem 0 auto; height: .8rem; } /* puente para no perder el hover */
.dropdown.open .dropdown-menu { display: grid; }
@media (hover: hover) and (min-width: 961px) { .dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu { display: grid; } }
.dropdown-menu a { padding: .6rem .9rem; border-radius: 10px; white-space: nowrap; }
.dropdown-menu a:hover, .dropdown-menu a:focus-visible { background: var(--blush); color: var(--rose-deep); }
@media (max-width: 960px) {
  .dropdown { border-bottom: 1px solid var(--line); padding: .7rem 0; }
  .dropdown-menu { position: static; transform: none; box-shadow: none; border: 0; padding: .3rem 0 0 .8rem; min-width: 0; }
  .dropdown-menu a { border-bottom: 0; padding: .45rem 0; }
}

/* Tarjetas de servicios: foto de la categoría, quién atiende, duración, precio desde y una acción principal */
#service-cards { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); max-width: 980px; gap: 1.5rem; }
.svc-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.svc-photo { display: block; aspect-ratio: 16 / 10; background: var(--blush); overflow: hidden; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.svc-card:hover .svc-photo img { transform: scale(1.04); }
.svc-body { display: flex; flex-direction: column; flex: 1; gap: .5rem; padding: 1.3rem 1.5rem 1.5rem; }
.svc-card.no-photo .svc-body { border-top: 3px solid var(--nude); }
.svc-body h3 { margin: 0; font-size: 1.7rem; }
.svc-body h3 a { color: var(--ink); text-decoration: none; }
.svc-body h3 a:hover { color: var(--rose-deep); }
.svc-meta { margin: 0; color: var(--rose-deep); font-weight: 600; font-size: .9rem; }
.svc-list { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.svc-card .card-actions { align-items: center; gap: 1.2rem; margin-top: .8rem; }
.svc-card .more { font-weight: 600; font-size: .9rem; text-underline-offset: 4px; }
.svc-card .more::after { content: " →"; }
@media (prefers-reduced-motion: reduce) { .svc-photo img { transition: none; } .svc-card:hover .svc-photo img { transform: none; } }

/* Quiénes te atienden */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 1.5rem; max-width: 980px; margin: auto; }
.team-card { display: grid; grid-template-columns: 42% 1fr; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.team-photo { position: relative; min-height: 260px; background: linear-gradient(160deg, var(--blush), var(--nude)); display: grid; place-items: center; }
.team-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-initial { font: 400 6rem/1 'Great Vibes', cursive; color: var(--rose-deep); }
.team-text { padding: 1.4rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .4rem; }
.team-text h3 { margin: 0; font-size: 2.1rem; }
.team-role { margin: 0; color: var(--rose-deep); font-weight: 600; font-size: .9rem; }
.team-bio { margin: .2rem 0 .8rem; flex: 1; }
.team-text .btn { align-self: flex-start; }
@media (max-width: 480px) { .team-card { grid-template-columns: 1fr; } .team-photo { aspect-ratio: 4 / 3; min-height: 0; } }
.section-sub { text-align: center; color: var(--muted); margin: -1.5rem 0 1.5rem; }

/* Galería: carrusel de a una foto con marco dorado, fondo desenfocado y miniaturas */
.carousel { max-width: 880px; margin: auto; }
.c-stage { position: relative; padding: 3px; border-radius: 28px; background: var(--gold-grad); box-shadow: 0 30px 70px rgba(142, 87, 71, .22); }
.c-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 25px; aspect-ratio: 4 / 3; background: #2A1D19; outline: none; }
.c-track::-webkit-scrollbar { display: none; }
.c-track:focus-visible { box-shadow: inset 0 0 0 3px var(--nude); }
.c-slide { flex: 0 0 100%; position: relative; margin: 0; overflow: hidden; scroll-snap-align: center; scroll-snap-stop: always; }
.c-bg { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; filter: blur(30px) brightness(.7) saturate(1.15); }
.c-open { position: relative; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; display: block; }
.c-img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.c-open:hover .c-img { transform: scale(1.025); }
.c-open.is-video .c-img { object-fit: cover; }
.c-open.is-video::after { content: "▶"; position: absolute; inset: 0; margin: auto; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; padding-left: 4px;
  color: #fff; font-size: 1.3rem; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .6); backdrop-filter: blur(10px); }
.c-caption { position: absolute; z-index: 2; inset: auto 0 0; padding: 3.5rem 1.6rem 1.2rem; pointer-events: none; color: #fff;
  font: 600 1.4rem/1.2 'Cormorant Garamond', serif; letter-spacing: .02em; background: linear-gradient(transparent, rgba(35, 24, 21, .72)); }
.c-nav, .v-nav { position: absolute; top: 50%; z-index: 3; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .16); backdrop-filter: blur(10px); transition: background .25s, transform .25s; }
.c-nav::before, .v-nav::before { content: ""; position: absolute; inset: 0; margin: auto; width: 11px; height: 11px; border: solid #fff; border-width: 2px 2px 0 0; }
.c-next::before, .v-next::before { transform: translateX(-2px) rotate(45deg); }
.c-prev::before, .v-prev::before { transform: translateX(2px) rotate(-135deg); }
.c-nav:hover, .v-nav:hover { background: rgba(255, 255, 255, .34); transform: translateY(-50%) scale(1.07); }
.c-prev { left: 18px; } .c-next { right: 18px; }
.c-count, .v-count { font-size: .8rem; letter-spacing: .18em; }
.c-count { position: absolute; z-index: 3; top: 16px; right: 18px; padding: .3em .9em; border-radius: 999px; color: #fff; background: rgba(35, 24, 21, .45); backdrop-filter: blur(8px); }
.c-count strong, .v-count strong { color: #F1D3C2; }
.c-thumbs, .v-thumbs { display: flex; gap: .6rem; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.c-thumbs::-webkit-scrollbar, .v-thumbs::-webkit-scrollbar { display: none; }
.c-thumbs { padding: 1.1rem .4rem .5rem; }
.c-thumb { position: relative; flex: 0 0 auto; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: pointer; background: var(--nude);
  opacity: .55; filter: grayscale(.3); transition: opacity .3s, filter .3s, transform .3s, box-shadow .3s; }
.c-thumb img, .c-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-thumb:hover { opacity: .9; filter: none; }
.c-thumb.active { opacity: 1; filter: none; transform: translateY(-3px); box-shadow: 0 0 0 2px var(--cream), 0 0 0 4px var(--rose), 0 8px 18px rgba(142, 87, 71, .3); }
.c-thumb.is-video::after { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.carousel.compact .c-stage { border-radius: 22px; }
.carousel.compact .c-track { aspect-ratio: 1; border-radius: 19px; }
.carousel.compact .c-nav { width: 42px; height: 42px; }
.carousel.compact .c-prev { left: 12px; } .carousel.compact .c-next { right: 12px; }
.carousel.compact .c-thumb { width: 56px; height: 56px; border-radius: 11px; }
.carousel.compact .c-caption { font-size: 1.15rem; padding: 2.5rem 1.1rem .9rem; }
@media (max-width: 600px) {
  .c-track { aspect-ratio: 4 / 5; }
  .c-nav { width: 42px; height: 42px; } .c-prev { left: 10px; } .c-next { right: 10px; }
  .c-thumb { width: 58px; height: 58px; }
}

/* Visor ampliado: la foto entra entera, con un tope para que no se vea con demasiado zoom */
.viewer { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #fff; background: rgba(20, 13, 11, .93); }
.viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }
.viewer::backdrop { background: rgba(20, 13, 11, .6); backdrop-filter: blur(6px); }
/* flex (no grid): así el max-height: 100% de la foto se calcula contra el alto real disponible y queda centrada */
.v-stage { display: flex; align-items: center; justify-content: center; min-height: 0; overflow: hidden; padding: 64px 90px 10px; }
.v-media { display: block; width: auto; height: auto; max-width: min(100%, 960px); max-height: min(100%, 74vh); object-fit: contain; border-radius: 16px; box-shadow: 0 25px 70px rgba(0, 0, 0, .45); animation: v-in .4s ease; }
@keyframes v-in { from { opacity: 0; transform: scale(.97); } }
.v-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; color: #fff; font-size: 1.7rem; line-height: 1;
  border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); }
.v-close:hover { background: rgba(255, 255, 255, .26); }
.v-nav { top: 45%; }
.v-prev { left: 20px; } .v-next { right: 20px; }
.v-info { display: flex; gap: 1rem; align-items: center; justify-content: center; flex-wrap: wrap; padding: .4rem 1rem; font-size: .9rem; }
.v-info a { color: var(--nude); }
.v-thumbs { padding: .7rem 1rem 1.2rem; }
.v-thumbs .c-thumb { width: 58px; height: 58px; border-radius: 11px; }
.v-thumbs .c-thumb.active { box-shadow: 0 0 0 2px #140D0B, 0 0 0 4px var(--nude); }
@media (max-width: 600px) {
  .v-stage { padding: 60px 10px 8px; }
  .v-nav { width: 40px; height: 40px; } .v-prev { left: 8px; } .v-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .c-img, .c-thumb, .c-nav, .v-nav { transition: none; } .v-media { animation: none; } }

/* Página de categoría */
.cat-hero { text-align: center; padding: clamp(40px, 7vw, 80px) 16px 1rem;
  background: radial-gradient(circle at 80% 20%, var(--nude), transparent 55%), radial-gradient(circle at 10% 90%, var(--blush), transparent 50%); }
.cat-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.cat-hero .lead { margin: 0 auto 1.8rem; }
.cat-hero .filters { flex-wrap: wrap; max-width: 900px; margin: 0 auto; padding-bottom: 1rem; }
.cat-hero .chip { text-decoration: none; background: var(--white); }
.cat-items { max-width: 1150px; margin: auto; padding: 1rem 16px 3rem; }
.svc { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding: clamp(2rem, 5vw, 4rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.svc.alt .svc-media { order: -1; }
.svc h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--ink); }
.svc h3 { font-size: 1.3rem; color: var(--rose-deep); margin: 1.6rem 0 .5rem; }
.svc p { margin: 0 0 .7rem; }
.svc-summary { font-size: 1.1rem; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .5rem; }
.pill { background: var(--blush); color: var(--rose-deep); padding: .3em .9em; border-radius: 999px; font-size: .85rem; font-weight: 500; }
ul.checks, ul.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
ul.checks li, ul.notes li { position: relative; padding-left: 1.7rem; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; top: .05em; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--rose); color: #fff; font-size: .7rem; display: grid; place-items: center; }
ul.notes li::before { content: "•"; position: absolute; left: .4rem; color: var(--rose); font-weight: 700; }
.svc-cta { margin-top: 1.8rem; }
.svc-media { position: sticky; top: 90px; }
.svc-media .empty { background: var(--blush); border-radius: 16px; padding: 3rem 1rem; }
@media (max-width: 800px) { .svc { grid-template-columns: 1fr; } .svc.alt .svc-media { order: 0; } .svc-media { position: static; } }

/* Panel: editor de servicios y galería */
.editor { display: grid; gap: 1rem; }
.editor .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.editor textarea { min-height: 110px; }
.hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.cat-block { margin-top: 2rem; }
.cat-block h3 { display: flex; align-items: center; gap: .6rem; }
.media-admin .tile select, .media-admin .tile input { font-size: .8rem; padding: .4em .6em; }
.media-admin .tile .stack { gap: .4rem; padding: .6rem .9rem .8rem; }

/* Agenda pública: horarios libres, el turno se pide por WhatsApp */
.busy-agenda { max-width: 560px; margin: auto; width: 100%; }
.busy-agenda .filters { justify-content: flex-start; margin-bottom: 0; }
.busy-agenda legend::first-letter { text-transform: uppercase; }
.cal-day.full { background: transparent; color: var(--muted); text-decoration: line-through; text-decoration-color: var(--nude); }
.cal-legend .dot.full { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; }
.card-actions .more { margin-top: 0; }
.svc-cta { display: flex; flex-wrap: wrap; gap: .6rem; }

/* Reseñas */
.stars { color: #C9973F; letter-spacing: .1em; font-size: 1.1rem; }
.reviews-summary { display: flex; justify-content: center; align-items: center; gap: .3rem; flex-wrap: wrap; }
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; max-width: 1100px; margin: auto; align-items: start; }
.reviews.compact { grid-template-columns: 1fr; margin: 0 0 .8rem; }
.review { display: grid; gap: .6rem; padding: 1.3rem; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.review-text { margin: 0; white-space: pre-line; }
.review-by { margin: 0; font-size: .9rem; }
.review-photos { display: flex; gap: .4rem; }
.review-photo { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; width: 76px; height: 76px; background: var(--nude); }
.review-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reviews-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.8rem; }
.rate { border: 0; padding: 0; margin: 0; }
.rate legend { font-weight: 500; margin-bottom: .3rem; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; gap: .2rem; }
.rate-stars input { position: absolute; opacity: 0; pointer-events: none; }
.rate-stars label { font-size: 2.2rem; line-height: 1; color: var(--line); cursor: pointer; transition: color .1s; }
.rate-stars label:hover, .rate-stars label:hover ~ label, .rate-stars input:checked ~ label { color: #C9973F; }
.rate-stars input:focus-visible + label { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
.hp { position: absolute; left: -9999px; }
.badge.ok { background: #E3F4E8; color: #2E6B40; margin-left: 0; align-self: center; }

/* Pase automático del carrusel: botón pausa/play + barra dorada de progreso */
.c-play { position: absolute; z-index: 3; top: 14px; left: 16px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; color: #fff; font-size: .7rem; letter-spacing: -.1em;
  border: 1px solid rgba(255, 255, 255, .55); background: rgba(35, 24, 21, .35); backdrop-filter: blur(8px); transition: background .25s; }
.c-play::before { content: "❚❚"; }
.c-play.paused::before { content: "▶"; letter-spacing: 0; padding-left: 2px; font-size: .75rem; }
.c-play:hover { background: rgba(35, 24, 21, .55); }
.c-progress { position: absolute; z-index: 3; left: 28px; right: 28px; bottom: 12px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .22); overflow: hidden; pointer-events: none; }
.c-progress::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #F1D3C2, #C99583); transform: scaleX(0); transform-origin: left; }
.c-progress.run::after { animation: c-prog 3.5s linear forwards; }
@keyframes c-prog { to { transform: scaleX(1); } }
.c-caption { padding-bottom: 1.6rem; }

/* Promociones: ventana emergente al entrar al Inicio */
.promo-modal { width: min(460px, calc(100vw - 32px)); padding: 0; border-radius: 26px; overflow: auto; background: var(--white);
  box-shadow: 0 0 0 3px #E9C9B6, 0 40px 90px rgba(35, 24, 21, .35); }
/* Con varias diapositivas el alto queda fijo: el contenido scrollea y las flechas no se mueven al pasar */
.promo-modal:has(.promo-nav) { height: min(720px, calc(100dvh - 32px)); overflow: hidden; }
.promo-modal:has(.promo-nav)[open] { display: flex; flex-direction: column; }
.promo-modal:has(.promo-nav) .promo-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.promo-modal:has(.promo-nav) .promo-slide { flex: 1; min-height: 0; overflow-y: auto; }
.promo-modal:has(.promo-nav) .promo-nav { flex: none; border-top: 1px solid var(--line); }
.promo-modal[open] { animation: promo-in .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes promo-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.promo-modal .modal-close { z-index: 2; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; line-height: 1;
  background: rgba(255, 255, 255, .88); color: var(--rose-deep); box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.promo-photo { display: block; background: var(--blush); }
.promo-photo img { display: block; width: 100%; max-height: 56vh; aspect-ratio: 2 / 3; object-fit: contain; } /* aspect-ratio reserva el alto antes de que cargue la foto (CLS) */
.promo-text { padding: 1.3rem 1.6rem .4rem; text-align: center; display: grid; gap: .5rem; justify-items: center; }
.promo-text .eyebrow { margin: 0; }
.promo-text h2 { margin: 0; font: 600 1.9rem/1.15 'Cormorant Garamond', serif; color: var(--rose-deep); }
.promo-desc { margin: 0; white-space: pre-line; }
.promo-text .btn { margin-top: .4rem; }
.promo-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .8rem 1rem 1.3rem; }
.promo-arrow { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--rose); background: transparent; cursor: pointer; transition: background .2s; }
.promo-arrow::before { content: ""; position: absolute; inset: 0; margin: auto; width: 9px; height: 9px; border: solid var(--rose-deep); border-width: 2px 2px 0 0; }
.promo-arrow.next::before { transform: translateX(-2px) rotate(45deg); }
.promo-arrow.prev::before { transform: translateX(2px) rotate(-135deg); }
.promo-arrow:hover { background: var(--blush); }
.promo-dots { display: flex; gap: .4rem; }
.promo-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: var(--nude); cursor: pointer; transition: background .3s; }
.promo-dot.active { width: 24px; background: var(--gold-grad); }
@media (prefers-reduced-motion: reduce) { .promo-modal[open] { animation: none; } }

/* Botón flotante "volver arriba" (encima del de WhatsApp) */
.to-top { position: fixed; z-index: 29; right: 24px; bottom: 92px; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold-grad); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s; }
.to-top::before { content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border: solid #fff; border-width: 2px 2px 0 0; transform: translateY(3px) rotate(-45deg); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { filter: brightness(1.06); }
body:not([data-wa]) .to-top { bottom: 24px; }

/* Concursos: en la ventana de promociones */
.contest-q { margin: 0; font-weight: 500; }
.contest-prize { margin: 0; color: var(--rose-deep); }
.contest-answer, .contest-winners { margin: 0; padding: .5rem 1rem; border-radius: 12px; background: var(--blush); }
.contest-form { padding: 1.3rem 1.6rem .6rem; text-align: left; }
.contest-form h2 { margin: 0; text-align: center; font: 600 1.7rem/1.15 'Cormorant Garamond', serif; color: var(--rose-deep); }
.contest-options { border: 0; padding: 0; margin: 0; }
.contest-options legend { font-weight: 500; margin-bottom: .5rem; }
.contest-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.contest-options .opt input { position: absolute; opacity: 0; pointer-events: none; }
.contest-options .opt span { display: block; padding: .45em 1.1em; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 500; transition: all .2s; }
.contest-options .opt input:checked + span { background: var(--gold-grad); color: #fff; border-color: transparent; }
.contest-options .opt input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }
.contest-rules { font-size: .85rem; color: var(--muted); }
.contest-rules summary { cursor: pointer; color: var(--rose-deep); }

/* Concursos: panel */
.contest-card { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: start; padding: 1rem; }
.contest-card img { width: 110px; height: 110px; object-fit: cover; border-radius: 12px; }
.contest-card p { margin: 0; }
#contest-report tr.winner td { background: #F6EFE0; font-weight: 500; }
@media (max-width: 600px) { .contest-card { grid-template-columns: 1fr; } .contest-card img { width: 100%; height: 180px; } }

/* Concursos: foto de la respuesta al finalizar + miniaturas en el panel */
.promo-photo.reveal { position: relative; }
.reveal-tag { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: .35em 1.1em; border-radius: 999px; white-space: nowrap;
  color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .05em; background: var(--gold-grad); box-shadow: 0 6px 18px rgba(142, 87, 71, .35); }
.promo-photo.reveal img { animation: v-in .6s ease; }
.contest-thumb { display: flex; align-items: center; gap: .6rem; }
.contest-thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }

/* Editor de horarios por profesional (panel) */
.sched-grid { display: grid; grid-template-columns: 3.2rem repeat(7, 1fr); gap: 3px; align-items: center; text-align: center; max-width: 460px; touch-action: none; user-select: none; }
.sched-cell { height: 1.5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--white); cursor: pointer; padding: 0; }
.sched-cell.on { background: var(--gold-grad); border-color: var(--rose-deep); }
.mail-preview { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
#mail-list summary, #staff-list summary { cursor: pointer; }
#mail-list p.small button { margin: 0 .25rem .25rem 0; }

/* =====================================================================
   Panel de administración (body.admin-ui): herramienta de trabajo, no vidriera.
   Superficies planas con borde, tipografía sans para escanear rápido,
   un solo botón primario por vista y acciones de riesgo en rojo.
   ===================================================================== */
:root { --ok: #2F6B3B; --ok-bg: #E8F3EA; --danger: #A8433A; --danger-bg: #FBE3DF; --gold: #C9973F; }
body.admin-ui { --radius: 14px; --shadow: 0 1px 2px rgba(35, 24, 21, .06); background: #FAF6F3; }

/* Barra superior: marca compacta + sección actual */
body.admin-ui .admin-top { padding-block: .45rem; }
body.admin-ui .admin-top .brand { margin-right: 0; }
body.admin-ui .admin-top .brand span { font-size: 1.7rem; line-height: 1; }
body.admin-ui .admin-top .brand img { width: 36px; height: 36px; }
.top-section { margin-right: auto; padding-left: .8rem; border-left: 1px solid var(--line); font-weight: 600; font-size: .95rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-section:empty { display: none; }
body.admin-ui .logout-btn { border-radius: 12px; }

/* Menú lateral agrupado */
body.admin-ui .admin-shell > nav.sidebar { gap: 1.1rem; padding: 1rem .7rem 2rem; top: 57px; height: calc(100vh - 57px); }
.nav-group { display: grid; gap: 2px; }
.nav-label { margin: 0 0 .25rem; padding: 0 .9rem; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
body.admin-ui .admin-shell > nav.sidebar a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 40px; padding: .5rem .9rem; font-size: .92rem; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 .4em; border-radius: 999px; background: var(--danger); color: var(--white); font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { body.admin-ui .admin-shell > nav.sidebar { top: 57px; } .top-section { font-size: .85rem; } }

/* Títulos: la serif queda solo en el h1 de cada sección */
body.admin-ui .page.admin h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: .3em; }
body.admin-ui .admin h2 { font-family: Montserrat, system-ui, sans-serif; font-size: 1.05rem; font-weight: 600; line-height: 1.3; margin: 0 0 .8rem; color: var(--ink); }
body.admin-ui .admin .panel > h2 { font-size: 1.25rem; margin-top: 2.2rem; color: var(--ink); }
body.admin-ui .admin .card > h2:first-child { padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
body.admin-ui .admin .card h2 a { font-size: .8rem; margin-left: .6rem; }
/* Subtítulos dentro de formularios largos */
body.admin-ui .admin form h2.group, body.admin-ui .admin form.card h2:not(:first-child) { margin: .8rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
body.admin-ui .admin h4 { font-family: Montserrat, system-ui, sans-serif; font-size: .95rem; }

/* Superficies planas */
body.admin-ui .card, body.admin-ui .tile, body.admin-ui .day-view { box-shadow: none; }
body.admin-ui .card { padding: 1.4rem; }
body.admin-ui .panel .card { margin-bottom: 1.2rem; }
body.admin-ui .muted { max-width: 70ch; }
body.admin-ui label { font-size: .85rem; font-weight: 600; }
body.admin-ui label.check { font-weight: 400; font-size: .92rem; }
body.admin-ui .hint { font-weight: 400; }
body.admin-ui input, body.admin-ui select, body.admin-ui textarea { border-radius: 10px; min-height: 42px; }
body.admin-ui input[type=checkbox], body.admin-ui input[type=radio] { min-height: 0; }
body.admin-ui .toolbar { flex-wrap: wrap; align-items: center; }

/* Botones: un primario sólido, el resto secundarios; sin degradado ni salto */
body.admin-ui .btn { background: var(--rose-deep); box-shadow: none; border-radius: 10px; font-size: .9rem; padding: .65em 1.2em; min-height: 42px; transition: background .15s; }
body.admin-ui .btn:hover { transform: none; filter: none; background: #6A3B2E; }
body.admin-ui .btn-ghost { background: transparent; color: var(--rose-deep); box-shadow: inset 0 0 0 1.5px var(--nude); }
body.admin-ui .btn-ghost:hover { background: var(--blush); }
body.admin-ui .btn-small { padding: .4em .9em; min-height: 36px; font-size: .82rem; }
body.admin-ui .btn-danger { background: var(--danger); color: var(--white); }
body.admin-ui .btn-danger:hover { background: #8C352D; }
body.admin-ui .btn-danger-ghost, body.admin-ui .btn-danger-ghost:hover { color: var(--danger); background: transparent; box-shadow: inset 0 0 0 1.5px #E4B8B2; }
body.admin-ui .btn-danger-ghost:hover { background: var(--danger-bg); }
@media (pointer: coarse) { body.admin-ui .btn-small, body.admin-ui .icon-btn { min-height: 44px; } body.admin-ui .icon-btn { min-width: 44px; } }

/* Estados semánticos con tokens */
body.admin-ui .ok, body.admin-ui .form-msg.ok, body.admin-ui .badge.ok { background: var(--ok-bg); color: var(--ok); }
body.admin-ui .warn-box, body.admin-ui .badge.warn { background: var(--danger-bg); color: var(--danger); }
body.admin-ui .form-msg:not(.ok) { color: var(--danger); }
body.admin-ui .stars { color: var(--gold); }

/* Ayuda larga plegada */
details.help { margin-top: -.4rem; font-size: .85rem; }
details.help summary { cursor: pointer; width: fit-content; color: var(--rose-deep); font-weight: 600; }
details.help p { margin: .5rem 0 0; }

/* Toast y confirmación propios */
.toast { position: fixed; z-index: 60; top: 70px; right: 16px; max-width: min(380px, calc(100vw - 32px)); padding: .8rem 1.1rem; border-radius: 12px; background: var(--ink); color: var(--white); font-size: .9rem; font-weight: 500; box-shadow: 0 12px 32px rgba(35, 24, 21, .25); animation: toast-in .25s cubic-bezier(.2, .8, .2, 1); }
.toast.error { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; pointer-events: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.confirm-dialog { border: 0; border-radius: var(--radius); padding: 1.5rem; width: min(420px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); color: var(--ink); }
.confirm-dialog::backdrop { background: rgba(35, 24, 21, .55); }
.confirm-dialog p { margin: 0 0 1.4rem; line-height: 1.5; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } .toast.out { transition: none; } body.admin-ui .btn, .icon-btn { transition: none; } }

/* Login centrado en la ventana */
body.admin-ui:not(.signed-in) main.page.admin { min-height: calc(100vh - 57px); max-width: none; display: grid; place-items: center; padding-block: 24px; }
#admin-login { width: min(420px, 100%); text-align: center; }
#admin-login .card { margin: 0 auto; text-align: left; }

/* Agenda: resumen del día y línea "ahora" */
.agenda-summary { margin: 0 0 .6rem; font-weight: 500; color: var(--ink); }
.dv-now { position: absolute; left: 0; right: 0; z-index: 1; height: 0; border-top: 2px solid var(--danger); pointer-events: none; }
.dv-now::before { content: ""; position: absolute; left: -1px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* Usuarios: en el celular cada fila es una tarjeta */
@media (max-width: 700px) {
  #usuarios .table-wrap { overflow: visible; }
  #usuarios table, #usuarios tbody, #usuarios tr, #usuarios td { display: block; width: 100%; }
  #usuarios thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  #usuarios tr { margin-bottom: .8rem; padding: .5rem 1rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
  #usuarios td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; text-align: right; word-break: break-word; }
  #usuarios td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: .8rem; font-weight: 600; text-align: left; }
  #usuarios td.row-actions { justify-content: flex-end; border-bottom: 0; padding-top: .8rem; }
  #usuarios td.row-actions::before { content: none; }
  #usuarios td select { width: auto; }
}

/* Ventanas emergentes de formularios (nuevo/editar servicio, promo, concurso, usuario, horarios) */
.form-dialog { position: fixed; border: 0; border-radius: var(--radius); padding: 1.6rem; width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; color: var(--ink); background: var(--white); box-shadow: 0 30px 80px rgba(0, 0, 0, .28); }
.form-dialog::backdrop { background: rgba(35, 24, 21, .55); }
.form-dialog#user-edit { width: min(440px, calc(100vw - 24px)); }
.form-dialog.wide { width: min(620px, calc(100vw - 24px)); }
.form-dialog .modal-close { position: absolute; top: .7rem; right: .8rem; z-index: 3; width: 40px; height: 40px; font-size: 1.6rem; border-radius: 10px; }
.form-dialog .modal-close:hover { background: var(--blush); }
.form-dialog > h2, .form-dialog form > h2:first-child { margin: 0 2.4rem 1rem 0; font-size: 1.15rem; }
.form-dialog form.card { border: 0; padding: 0; margin: 0; box-shadow: none; max-width: none; }
body.admin-ui .form-dialog .card > h2:first-child { border-bottom: 0; padding-bottom: 0; }
/* Botones de guardar siempre a mano, aunque el formulario sea largo */
.form-dialog .toolbar:last-of-type, .sched-actions { position: sticky; bottom: -1.6rem; z-index: 2; margin: 0 -1.6rem -1.6rem; padding: .8rem 1.6rem; background: var(--white); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .6rem; }
/* Grilla de horarios compacta dentro de la ventana */
.form-dialog .sched-grid { max-width: none; gap: 2px; }
.form-dialog .sched-cell { height: 1.05rem; border-radius: 4px; }
.form-dialog .sched-grid .small { font-size: .7rem; line-height: 1.05rem; }
.form-dialog #sched-body .stack { gap: .6rem; }

/* Con una ventana emergente abierta, el scroll queda solo en la ventana y la página de fondo no se mueve */
html:has(body.admin-ui) { scrollbar-gutter: stable; }
body.admin-ui:has(dialog[open]) { overflow: hidden; }
body.admin-ui dialog { overscroll-behavior: contain; }

/* Mails automáticos: lista compacta + editor en ventana con vista previa al costado */
.mail-group { margin-top: 1.6rem; }
.mail-rows { padding: 0; overflow: hidden; }
.mail-row { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; border-top: 1px solid var(--line); }
.mail-row:first-child { border-top: 0; }
.mail-info { flex: 1; min-width: 0; }
.mail-info p { margin: .15rem 0 0; }
.mail-info .badge { margin-left: .4rem; }
input.switch { appearance: none; flex: none; width: 44px; height: 26px; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: var(--nude); position: relative; cursor: pointer; transition: background .2s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
input.switch:checked { background: var(--ok); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:disabled { opacity: .5; cursor: default; }
.form-dialog.xl { width: min(1080px, calc(100vw - 24px)); }
.mail-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.form-dialog .mail-edit .toolbar:last-of-type { position: static; margin: 0; padding: 0; border: 0; }
.mail-side { position: sticky; top: 0; display: grid; gap: .5rem; }
.mail-side .mail-preview { height: min(560px, 70dvh); }
@media (max-width: 900px) { .mail-edit { grid-template-columns: 1fr; } .mail-side { position: static; } .mail-row { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }
.mail-row.is-off .mail-info strong { color: var(--muted); }

/* Migas de pan y página 404 */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; max-width: 1150px; margin: 0 auto; padding: 1rem 16px 0; font-size: .85rem; color: var(--muted); }
.page .crumbs { padding: 0 0 1rem; margin: 0; }
.crumbs a { color: var(--rose-deep); }
.not-found { text-align: center; min-height: 60vh; display: grid; align-content: center; justify-items: center; gap: .5rem; }
.not-found .lead { margin: 0 auto 1rem; }

/* Celular: zonas táctiles de al menos 40-44 px en la web pública */
@media (pointer: coarse) {
  body:not(.admin-ui) .menu-toggle { min-width: 44px; min-height: 44px; }
  body:not(.admin-ui) .chip, body:not(.admin-ui) .btn-small { min-height: 40px; }
  body:not(.admin-ui) .cal-nav, .c-play { width: 40px; height: 40px; }
  .footer p a, .crumbs a, .svc-card .more { display: inline-block; padding: .45rem .2rem; }
}
