/* CitaFácil: rosa pastel y verde pastel (mismos colores del prototipo) */
:root {
  --bg: #fff7fa; --card: #fff; --ink: #3a2434; --mute: #7a6573; --line: #f3dbe6;
  --plum: #f4b6cd; --on-plum: #3a2434; --rose-ink: #b04a73; --mint: #1e7a58; --mint-bg: #d9f2e6;
  --blush: #fde4ee; --red: #b3345c;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
/* Siempre en tonos pastel, aunque el teléfono tenga activado el modo oscuro. */
body { background: var(--bg); color: var(--ink); font: 16px/1.5 "DM Sans", system-ui, sans-serif; min-height: 100vh;
  background-image: radial-gradient(circle at 0% 0%, #fde4ee 0, transparent 45%), radial-gradient(circle at 100% 30%, #e0f5ea 0, transparent 40%),
    radial-gradient(circle at 20% 100%, #fde4ee 0, transparent 40%); background-attachment: fixed; }
h1, h2, h3 { font-family: "Bricolage Grotesque", system-ui, sans-serif; margin: 0; line-height: 1.15; }
.wrap { max-width: 980px; margin: 0 auto; padding: 16px 16px 48px; }
.narrow { max-width: 520px; }
header.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px;
  background: linear-gradient(135deg, #f9c9da, #c9ecd9); border-radius: 22px; padding: 14px 18px; box-shadow: 0 10px 30px rgba(176, 74, 115, .18); }
header.top h1 { color: #5a2340; }
header.top h1 { font-size: 1.35rem; }
header.top p { margin: 2px 0 0; color: var(--mute); font-size: .92rem; }
.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tabs button { border: 0; background: none; color: var(--mute); font: inherit; font-weight: 600; padding: 9px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
@media (max-width: 420px) { .tabs { width: 100%; } .tabs button { flex: 1; padding: 9px 6px; font-size: .92rem; } }
.tabs button[aria-selected="true"] { background: var(--plum); color: var(--on-plum); }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.grid > * { min-width: 0; } /* sin esto, un selector o texto largo ensancha la columna y la pantalla se mueve de lado */
@media (min-width: 860px) { .grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
select { max-width: 100%; text-overflow: ellipsis; }
.card { background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: 0 12px 32px rgba(176, 74, 115, .12); }
.card h2 { font-size: 1.1rem; margin-bottom: 10px; }
.card + .card { margin-top: 16px; }
.muted, .empty { color: var(--mute); font-size: .92rem; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip, .btn-ghost { border: 1.5px solid var(--plum); background: var(--card); color: var(--rose-ink); font: inherit; font-weight: 500;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; text-decoration: none; display: inline-block; }
.chip small { color: var(--mute); font-weight: 400; }
.chip:hover, .chip[aria-pressed="true"] { background: var(--plum); color: var(--on-plum); }
.chip:disabled { opacity: .45; cursor: not-allowed; background: var(--card); color: var(--mute); }
.btn { border: 0; background: linear-gradient(135deg, #f7a8c6, #f4b6cd); box-shadow: 0 6px 16px rgba(245, 156, 188, .45); color: var(--on-plum); font: inherit; font-weight: 600; padding: 11px 22px; border-radius: 999px; cursor: pointer;
  text-decoration: none; display: inline-block; }
.btn.mint { background: var(--mint-bg); color: var(--mint); }
.btn:disabled { opacity: .6; cursor: wait; }
.link { background: none; border: 0; color: var(--rose-ink); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.danger { color: var(--red); border-color: var(--red); }
label { display: block; font-size: .9rem; color: var(--mute); margin: 10px 0 4px; }
input, select { font: inherit; color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 9px 12px; width: 100%; }
input[type="checkbox"] { width: auto; accent-color: var(--rose-ink); }
input[type="time"], input[type="number"] { width: auto; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid var(--mint); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: .95rem; }
.check input { margin-top: 4px; }
.msg { margin: 10px 0 0; font-size: .95rem; min-height: 1.4em; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--mint); }
[hidden] { display: none !important; }

/* Agenda */
.appt { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.appt:first-child { border-top: 0; }
.appt time { font: 700 1.05rem "Bricolage Grotesque", system-ui, sans-serif; }
.appt small { display: block; color: var(--mute); }
.appt .acts { text-align: right; font-size: .9rem; }
.appt .acts a, .appt .acts button { display: block; margin-left: auto; margin-top: 4px; }
.appt.x { opacity: .55; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 10px; border-radius: 999px; background: var(--mint-bg); color: var(--mint); }
.badge.x { background: var(--blush); color: var(--red); }
.stats { display: flex; gap: 24px; }
.stats b { font: 700 1.8rem "Bricolage Grotesque", system-ui, sans-serif; display: block; }
.tog { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.tog:first-of-type { border-top: 0; }

/* Configuración */
.hrow { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 4px 0; }
.srow { display: grid; grid-template-columns: 1fr 80px 100px auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.trow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.qr { background: #fff; padding: 10px; border-radius: 14px; display: inline-block; }
.qr img { display: block; width: 160px; height: 160px; }
.code { font: 600 1rem ui-monospace, monospace; word-break: break-all; }
@media (max-width: 520px) {
  .srow { grid-template-columns: minmax(0, 1fr) 64px 80px auto; }
  /* Horario en el celular: día y «Cerrado» arriba, las dos horas debajo */
  .hrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "d x" "o c"; padding: 6px 0; border-top: 1px solid var(--line); }
  .hrow > span { grid-area: d; font-weight: 600; text-transform: capitalize; }
  .hrow .o { grid-area: o; } .hrow .c { grid-area: c; }
  .hrow .closed { grid-area: x; justify-self: end; }
  .hrow input[type="time"] { width: 100%; min-width: 0; }
}

/* Página de reserva */
.step { margin-top: 16px; }
.step h2 { margin-bottom: 10px; }
.summary { background: var(--blush); border-radius: 16px; padding: 10px 14px; font-size: .95rem; }
.footer { text-align: center; color: var(--mute); font-size: .85rem; margin-top: 24px; }

/* Bienvenida de la página de reserva */
.welcome { text-align: center; padding: 10px 4px 6px; }
.welcome h1 { font-size: clamp(1.5rem, 6vw, 2rem); margin: 14px 0 8px; color: #5a2340; }
.welcome .lead { color: var(--mute); margin: 0 auto 18px; max-width: 36ch; white-space: pre-line; }
.logo-big { width: 104px; height: 104px; border-radius: 26px; object-fit: cover; box-shadow: 0 10px 26px rgba(176, 74, 115, .22); background: #fff; }
.logo-big.initials { display: grid; place-items: center; margin: 0 auto; font: 800 2.2rem "Bricolage Grotesque", sans-serif; color: #fff; background: linear-gradient(135deg, #f59cbc, #7fcfa7); }
.logo-sm { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #fff; }
.btn.big { padding: 15px 34px; font-size: 1.05rem; }
.svc-preview { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.svc-preview span { background: var(--blush); color: var(--rose-ink); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }

/* Calendario del mes */
.cal { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; max-width: 420px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font: 700 1.05rem "Bricolage Grotesque", sans-serif; }
.cal-nav { border: 1.5px solid var(--plum); background: var(--card); color: var(--rose-ink); width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: .75rem; color: var(--mute); padding: 4px 0; text-transform: uppercase; }
.cal-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; font-size: .95rem; position: relative; border: 0; background: none; font-family: inherit; color: var(--ink); }
.cal-cell.empty { visibility: hidden; }
.cal-cell.open { background: var(--blush); color: var(--rose-ink); font-weight: 600; cursor: pointer; transition: transform .1s; }
.cal-cell.open:hover { background: var(--plum); color: var(--on-plum); transform: scale(1.05); }
.cal-cell.open i { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #1e7a58; }
.cal-cell.full { color: #c7a3b4; text-decoration: line-through; }
.cal-cell.closed, .cal-cell.past, .cal-cell.beyond { color: #d9c6cf; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--mute); margin-top: 10px; }
.cal-legend > span { display: flex; align-items: center; gap: 5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.open { background: var(--blush); border: 2px solid var(--plum); }
.dot.full { background: #eadde3; }
.dot.closed { background: #f4ecf0; }

/* Vista mensual del panel */
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mcal .cal-wd { padding: 2px 0; }
.mday { min-height: 58px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.mday:hover { border-color: var(--plum); }
.mday.out { visibility: hidden; }
.mday.today { border: 2px solid var(--plum); }
.mday.closed { background: #fbf6f8; color: #b9a3ae; }
.mday b { font-size: .85rem; }
.mday .cnt { font-size: .75rem; background: var(--mint-bg); color: var(--mint); border-radius: 999px; padding: 1px 6px; align-self: flex-start; }
.mday .cnt.x { background: var(--blush); color: var(--red); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: #fff; }
.seg button { border: 0; background: none; font: inherit; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--mute); }
.seg button[aria-pressed="true"] { background: var(--plum); color: var(--on-plum); }

/* Acciones rápidas y bloqueos en la agenda */
.chip.mini { padding: 3px 10px; font-size: .82rem; }
.appt.block { background: repeating-linear-gradient(135deg, #fbf3f7 0 10px, #fff 10px 20px); border-radius: 12px; padding: 10px 8px; color: var(--mute); }
.appt.block time { color: var(--mute); }
.badge.x { background: var(--blush); color: var(--red); }

/* Aviso del plan y resumen del mes */
.summary.warn { background: #fff3d6; color: #6b4c00; }
.summary.bad { background: var(--blush); color: var(--red); font-weight: 500; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.stat { background: #fffafc; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font: 700 1.25rem "Bricolage Grotesque", system-ui, sans-serif; }
.stat span { color: var(--mute); font-size: .82rem; }

/* Primeros pasos */
.bar { height: 8px; background: var(--blush); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f59cbc, #7fcfa7); transition: width .4s; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.steps li:first-child { border-top: 0; }
.steps .ck { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--plum); color: var(--rose-ink); font-weight: 700; font-size: .85rem; }
.steps li.done .ck { background: var(--mint-bg); border-color: var(--mint); color: var(--mint); }
.steps li.done b { color: var(--mute); text-decoration: line-through; }
.steps small { display: block; color: var(--mute); }

/* Ficha de la clienta */
.dlg { border: 0; border-radius: 22px; padding: 18px; width: min(560px, calc(100vw - 24px)); max-height: 88vh; box-shadow: 0 30px 70px rgba(90, 35, 64, .3); color: var(--ink); }
.dlg::backdrop { background: rgba(58, 36, 52, .35); }
.dlg h2 { font-size: 1.2rem; }
.cust-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; text-decoration: underline dotted var(--plum); text-underline-offset: 3px; }

/* Cinta del salón de demostración */
.demo-ribbon { display: block; text-align: center; background: linear-gradient(90deg, #fff3d6, #fde4ee); color: #6b4c00; font-size: .85rem; font-weight: 600; padding: 8px 12px; text-decoration: none; }

/* Enlaces de «Acepto las condiciones» */
#termsText a { color: var(--rose-ink); font-weight: 600; }
