:root {
  /* Marca Mente Sana · white-label */
  --brand-teal: #2fb6c3;
  --brand-teal-strong: #0b8f98;
  --brand-cyan: #74d2df;
  --brand-pink: #eba4b7;
  --brand-pink-strong: #d77f99;
  --brand-ink: #05212b;

  /* Superficies dark */
  --bg-deep: #050c12;
  --panel: rgba(255,255,255,.055);
  --panel-strong: rgba(255,255,255,.085);
  --border: rgba(255,255,255,.10);
  --border-brand: rgba(116,210,223,.24);

  /* Texto */
  --text: #f8fafc;
  --muted: #aeb8ca;
  --muted-2: #7f8aa0;

  /* Estados */
  --success: #74d9c0;
  --danger: #f1a2b6;
  --danger-strong: #df7f9a;
  --danger-soft: rgba(235,164,183,.10);

  /* Gradientes */
  --brand-gradient: linear-gradient(
    100deg,
    var(--brand-teal) 0%,
    var(--brand-cyan) 58%,
    var(--brand-pink) 100%
  );
  --brand-gradient-teal: linear-gradient(
    145deg,
    var(--brand-teal-strong),
    var(--brand-cyan)
  );

  --shadow: 0 18px 50px rgba(0,0,0,.28);
  --shadow-brand: 0 14px 30px rgba(47,182,195,.16);
  --max-width: 760px;
  --nav-height: 76px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg-deep); }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 4% 8%, rgba(47, 182, 195, .22), transparent 26rem),
    radial-gradient(circle at 96% 14%, rgba(235, 164, 183, .15), transparent 25rem),
    radial-gradient(circle at 86% 38%, rgba(38, 102, 143, .20), transparent 30rem),
    linear-gradient(165deg, #08151c 0%, #050c12 56%, #071019 100%);
  overflow-x: hidden;
}

button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.app-shell {
  width: min(100%, var(--max-width));
  min-height: calc(100dvh - var(--nav-height));
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px calc(var(--nav-height) + 24px);
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  font-size: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.28), rgba(255,255,255,.06)),
    linear-gradient(135deg, #6dc8ee, #df7cac);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 30px rgba(0,0,0,.18);
}

.brand-copy { display: grid; gap: 1px; line-height: 1.12; }
.brand-copy strong { font-size: 1.02rem; font-weight: 700; }
.brand-copy small { color: var(--muted); font-size: .76rem; font-weight: 400; }

.main-content {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 58px 0 30px;
}

.view {
  display: none;
  width: 100%;
  animation: viewIn .26s ease both;
}

.view.is-active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 24px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
  color: #dbe3ef;
  font-size: .78rem;
  line-height: 1.25;
  backdrop-filter: blur(14px);
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 610px;
  margin-bottom: 20px;
  font-size: clamp(2.55rem, 10vw, 4.7rem);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 800;
}

h1 span {
  display: inline-block;
  background: linear-gradient(90deg, var(--brand-cyan) 0%, var(--brand-teal) 48%, var(--brand-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 25px;
  color: #c5cfdd;
  font-size: clamp(.98rem, 2.8vw, 1.12rem);
  line-height: 1.65;
}

.hero-actions { display: grid; gap: 11px; }

.btn {
  width: 100%;
  min-height: 52px;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 700;
  font-size: .96rem;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}

.btn:active { transform: scale(.985); }

.btn-primary {
  color: var(--brand-ink);
  background: var(--brand-gradient);
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  filter: brightness(1.035);
}

.btn[aria-busy="true"] {
  cursor: progress;
  letter-spacing: -.01em;
}

.btn:disabled {
  cursor: wait;
  opacity: .68;
  filter: saturate(.72);
}

.btn-danger-soft {
  color: #ffdbe4;
  border-color: rgba(235,164,183,.30);
  background: linear-gradient(
    180deg,
    rgba(235,164,183,.11),
    rgba(235,164,183,.055)
  );
}

.btn-danger-soft:active {
  background: rgba(235,164,183,.14);
}

.btn-secondary {
  color: var(--text);
  border-color: rgba(255,255,255,.11);
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
}

.helper-copy {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: .77rem;
  line-height: 1.58;
}

.provider-footer {
  margin-top: 26px;
  padding: 10px 2px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px 8px;
  color: var(--muted-2);
  font-size: .59rem;
  line-height: 1.45;
  text-align: center;
}

.provider-footer strong {
  color: #cbd7df;
  font-weight: 600;
}

.provider-footer a {
  color: #99dfe3;
  text-decoration: none;
  border-bottom: 1px solid rgba(153,223,227,.28);
}

.provider-dot {
  color: rgba(255,255,255,.25);
}


.page-heading {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: start;
}

.back-link {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
  font-size: 1.2rem;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #80d8dc;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.page-heading h2 {
  margin-bottom: 9px;
  font-size: clamp(1.75rem, 6vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.page-heading p, .preview-card p { color: var(--muted); line-height: 1.6; }
.page-heading p { margin-bottom: 0; font-size: .9rem; }

.preview-card {
  display: flex;
  gap: 13px;
  margin-top: 26px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
}

.preview-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--panel-strong);
}

.preview-card strong { display: block; margin-bottom: 4px; font-size: .91rem; }
.preview-card p { margin: 0; font-size: .78rem; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: rgba(5, 9, 17, .92);
  border-top: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
}

.nav-item {
  min-width: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  color: #eef2f7;
  background: rgba(255,255,255,.055);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  font-size: .64rem;
  font-weight: 700;
}

.nav-icon { font-size: 1.02rem; line-height: 1; }

.nav-item.is-active {
  color: #c8f6f7;
  border-color: rgba(116,210,223,.26);
  background:
    linear-gradient(
      180deg,
      rgba(47,182,195,.16),
      rgba(47,182,195,.07)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.05),
    0 0 0 1px rgba(47,182,195,.035);
}

@media (min-width: 620px) {
  .app-shell { padding-left: 28px; padding-right: 28px; }
  .main-content { padding-top: 72px; }
  .hero-actions { grid-template-columns: 1fr 1fr; }

  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 14px;
    width: min(620px, calc(100% - 28px));
    height: 68px;
    padding: 7px;
    transform: translateX(-50%);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 19px;
    box-shadow: var(--shadow);
  }
}

@media (min-width: 900px) {
  :root { --max-width: 980px; }
  .app-shell { padding-bottom: 110px; }
  .main-content { min-height: 580px; }
}


@media (max-width: 420px) {
  .btn-step {
    width: calc(100% - 34px);
  }

  .profile-picker-card {
    padding: 17px 15px;
  }

  .profile-option {
    min-height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}



/* ===== Acciones de paso ===== */
.btn-step {
  width: calc(100% - 28px);
  max-width: 520px;
  justify-self: center;
  margin-inline: auto;
}

/* ===== Disponibilidad real · Mente Sana ===== */

.availability-panel {
  margin-top: 28px;
}

.availability-status,
.availability-error {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255,255,255,.05);
}

.availability-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d6deea;
  font-size: .84rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #64d4df;
  box-shadow: 0 0 0 6px rgba(100, 212, 223, .10);
  animation: statusPulse 1.15s ease-in-out infinite alternate;
}

@keyframes statusPulse {
  from { opacity: .45; transform: scale(.85); }
  to { opacity: 1; transform: scale(1); }
}

.availability-content {
  display: grid;
  gap: 24px;
}

.availability-block {
  display: grid;
  gap: 12px;
}

.availability-label {
  color: #e4eaf3;
  font-size: .78rem;
  font-weight: 700;
}

.date-options {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86px, 94px);
  gap: 9px;
  padding: 2px 1px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
}

.date-options::-webkit-scrollbar {
  display: none;
}

.date-option {
  min-height: 88px;
  padding: 11px 9px;
  border: 1px solid var(--border);
  border-radius: 15px;
  color: var(--text);
  background: rgba(255,255,255,.045);
  cursor: pointer;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  scroll-snap-align: start;
}

.date-option small {
  color: var(--muted);
  font-size: .63rem;
  text-transform: capitalize;
}

.date-option strong {
  font-size: 1.38rem;
  line-height: 1.1;
}

.date-option span {
  color: #c9d2df;
  font-size: .65rem;
  text-transform: capitalize;
}

.date-option.is-selected {
  color: var(--brand-ink);
  border-color: transparent;
  background: var(--brand-gradient-teal);
  box-shadow: 0 10px 24px rgba(47,182,195,.16);
}

.date-option.is-selected small,
.date-option.is-selected span {
  color: rgba(5,33,43,.74);
}

.time-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.time-option {
  min-height: 46px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  color: #eef3f8;
  background: rgba(255,255,255,.045);
  cursor: pointer;
  font-weight: 600;
  font-size: .79rem;
}

.time-option.is-selected {
  color: var(--brand-ink);
  border-color: transparent;
  background: var(--brand-gradient-teal);
}

.slot-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid rgba(100, 212, 223, .22);
  border-radius: 15px;
  background: rgba(100, 212, 223, .075);
}

.slot-summary-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #10202a;
  background: #72d8df;
  font-weight: 800;
}

.slot-summary div {
  display: grid;
  gap: 2px;
}

.slot-summary small {
  color: var(--muted);
  font-size: .62rem;
}

.slot-summary strong {
  font-size: .8rem;
  line-height: 1.35;
}

.booking-continue {
  margin-top: -8px;
}

.availability-error {
  color: #e8edf5;
}

.availability-error strong {
  display: block;
  margin-bottom: 5px;
  font-size: .88rem;
}

.availability-error p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .76rem;
}

@media (min-width: 620px) {
  .time-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .date-options {
    grid-auto-columns: 102px;
  }
}

[hidden] { display: none !important; }


/* ===== Flujo de datos del paciente y revisión ===== */
.booking-stage { margin-top: 28px; }
.stage-back {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: #9edee2;
  background: transparent;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 600;
}

.selected-appointment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 15px;
  border: 1px solid rgba(100,212,223,.22);
  border-radius: 16px;
  background: rgba(100,212,223,.075);
}
.selected-appointment-icon {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 999px;
  color: #10202a; background: #72d8df; font-weight: 800;
}
.selected-appointment-card div { display: grid; gap: 2px; }
.selected-appointment-card small { color: var(--muted); font-size: .62rem; }
.selected-appointment-card strong { font-size: .8rem; line-height: 1.4; }

.form-intro { margin-bottom: 17px; }
.form-intro p { margin: 6px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.patient-form { display: grid; grid-template-columns: 1fr; gap: 15px; }
.field-group { display: grid; gap: 7px; }
.field-group label { color: #e7edf5; font-size: .72rem; font-weight: 600; }
.field-group input, .field-group select {
  width: 100%; min-height: 50px; padding: 12px 13px;
  border: 1px solid var(--border); border-radius: 13px;
  outline: none; color: var(--text); background: rgba(255,255,255,.045);
  font-size: .84rem;
}
.field-group input::placeholder { color: #768196; }
.field-group input:focus, .field-group select:focus {
  border-color: rgba(100,212,223,.48);
  box-shadow: 0 0 0 3px rgba(100,212,223,.08);
}
.field-group select { color-scheme: dark; }
.booking-notice {
  padding: 13px 14px; border: 1px solid rgba(235,164,183,.18);
  border-radius: 13px; color: #d6dce6; background: rgba(235,164,183,.055);
  font-size: .7rem; line-height: 1.55;
}
.privacy-consent-card {
  padding: 15px;
  border: 1px solid rgba(116,210,223,.17);
  border-radius: 16px;
  background: rgba(47,182,195,.045);
}
.privacy-consent-heading { display: flex; gap: 10px; align-items: center; margin-bottom: 13px; }
.privacy-lock {
  width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 11px; background: rgba(255,255,255,.07);
}
.privacy-consent-heading div { display: grid; gap: 1px; }
.privacy-consent-heading strong { font-size: .76rem; }
.privacy-consent-heading small { color: var(--muted); font-size: .61rem; }
.privacy-checkbox-row { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; cursor: pointer; }
.privacy-checkbox-row input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: #65d4df; }
.privacy-checkbox-row span { color: #c7d0dd; font-size: .67rem; line-height: 1.55; }
.privacy-checkbox-row a { color: #8be0e4; text-decoration: underline; text-underline-offset: 2px; }
.privacy-help { margin: 10px 0 0 32px; color: var(--muted-2); font-size: .58rem; line-height: 1.5; }
.form-error {
  padding: 11px 12px; border: 1px solid rgba(229,97,97,.28); border-radius: 12px;
  color: #ffc5c5; background: rgba(229,97,97,.08); font-size: .7rem; line-height: 1.4;
}
.review-heading { margin-bottom: 18px; }
.review-heading h3 { margin: 4px 0 7px; font-size: 1.55rem; line-height: 1.1; }
.review-heading p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.review-card {
  overflow: hidden; border: 1px solid var(--border); border-radius: 17px;
  background: rgba(255,255,255,.045);
}

#confirmBooking {
  margin-top: 24px;
}

.review-row {
  display: grid; gap: 5px; padding: 13px 15px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}
.review-row:last-child { border-bottom: 0; }
.review-row span { color: var(--muted); font-size: .61rem; }
.review-row strong { font-size: .78rem; line-height: 1.4; overflow-wrap: anywhere; }
.review-row-primary { background: rgba(100,212,223,.055); }
.review-row-primary strong { color: #a9edf0; }
.review-consent {
  margin: 12px 0 18px; padding: 10px 12px; border-radius: 12px;
  color: #a8e7c5; background: rgba(79,190,131,.08); font-size: .65rem; font-weight: 600;
}
.confirm-message {
  margin: 12px 0 0; padding: 12px; border: 1px solid rgba(100,212,223,.16);
  border-radius: 12px; color: #bcd7df; background: rgba(100,212,223,.055);
  font-size: .67rem; line-height: 1.5;
}




/* ===== Persona seleccionada ===== */
.selected-profile-card {
  overflow: hidden;
  border: 1px solid var(--border-brand);
  border-radius: 19px;
  background:
    radial-gradient(circle at 92% 0%, rgba(47,182,195,.08), transparent 14rem),
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.032));
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}

.selected-profile-header {
  padding: 18px 18px 15px;
  border-bottom: 1px solid rgba(255,255,255,.065);
}

.selected-profile-header .section-kicker {
  margin-bottom: 7px;
}

.selected-profile-header > strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.selected-profile-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255,255,255,.055);
}

.selected-profile-detail {
  min-width: 0;
  padding: 14px 18px;
  background: rgba(6,14,21,.94);
}

.selected-profile-detail span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: .61rem;
}

.selected-profile-detail strong {
  display: block;
  font-size: .78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.selected-profile-actions {
  padding: 14px 18px 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-action {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: #d9e2ea;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font: inherit;
  font-size: .67rem;
  font-weight: 600;
}

.profile-action-primary {
  color: #b9f1f2;
  border-color: rgba(116,210,223,.22);
  background: rgba(47,182,195,.075);
}

.profile-edit-actions {
  margin-top: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(110px, .75fr);
  gap: 10px;
}

.profile-edit-actions .btn {
  width: 100%;
  min-height: 48px;
}

@media (max-width: 620px) {
  .selected-profile-details {
    grid-template-columns: 1fr;
  }

  .selected-profile-actions {
    align-items: stretch;
  }

  .profile-action {
    flex: 1 1 100%;
  }

  .profile-edit-actions {
    grid-template-columns: 1fr;
  }
}

/* ===== Selector de persona ===== */
.profile-picker-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.055),
      rgba(255,255,255,.035)
    );
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}

.profile-picker-card .review-heading {
  margin: 0;
  padding: 1px 2px 0;
}

.profile-picker-card .review-heading strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.38;
}

.profile-options {
  display: grid;
  gap: 10px;
}

.profile-option {
  width: 100%;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 15px;
  color: var(--text);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.065),
      rgba(255,255,255,.035)
    );
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  text-align: left;
  transition:
    transform .16s ease,
    border-color .16s ease,
    background .16s ease;
}

.profile-option:active {
  transform: scale(.987);
}

.profile-option:hover {
  border-color: rgba(116,210,223,.24);
  background: rgba(47,182,195,.075);
}

.profile-option-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.profile-option-name {
  overflow-wrap: anywhere;
  font-size: .9rem;
  line-height: 1.25;
}

.profile-option-type {
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(116,210,223,.16);
  border-radius: 999px;
  color: #aeeff1;
  background: rgba(47,182,195,.075);
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.2;
}

.profile-option-arrow {
  flex: 0 0 auto;
  color: var(--brand-cyan);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1;
}

.profile-option-add {
  min-height: 58px;
  justify-content: flex-start;
  border-style: dashed;
  color: #dce6ed;
  background: rgba(255,255,255,.025);
}

.profile-option-helper {
  display: block;
  max-width: 34ch;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 500;
  line-height: 1.35;
}

.profile-option-add-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-ink);
  background: var(--brand-gradient-teal);
  font-size: 1.15rem;
  font-weight: 800;
}

#firstReservationOptions > .section-kicker {
  margin-bottom: -5px;
}

#firstReservationOptions > strong {
  font-size: 1rem;
  line-height: 1.35;
}

#firstReservationOptions > .btn {
  margin-top: -2px;
}

/* ===== Citas consultadas ===== */
.appointment-results-shell {
  margin-top: 24px;
}

.appointment-results-list {
  display: grid;
  gap: 16px;
}

.appointment-results-summary {
  display: grid;
  gap: 4px;
  padding: 2px 2px 0;
}

.appointment-results-summary span {
  color: var(--muted);
  font-size: .76rem;
}

.appointment-results-summary strong {
  color: var(--text);
  font-size: .96rem;
  line-height: 1.35;
}

.appointment-result-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.035));
  box-shadow: 0 16px 36px rgba(0,0,0,.16);
}

.appointment-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.065);
  background: rgba(3,10,16,.22);
}

@media (min-width: 520px) {
  .appointment-actions {
    grid-template-columns: 1fr 1fr;
  }
}


/* ===== Sistema único de diálogos · UAT-17 ===== */
body.dialog-open {
  overflow: hidden;
}

.portal-dialog {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding:
    max(20px, env(safe-area-inset-top))
    18px
    max(20px, env(safe-area-inset-bottom));
}

.portal-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 13, .76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portal-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  max-height: min(720px, calc(100dvh - 40px));
  overflow-y: auto;
  padding: 24px 20px 20px;
  border: 1px solid var(--border-brand);
  border-radius: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 0%, rgba(47,182,195,.13), transparent 16rem),
    linear-gradient(165deg, rgba(13,28,38,.98), rgba(6,14,21,.985));
  box-shadow:
    0 28px 80px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.06);
  animation: dialogIn .20s ease both;
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portal-dialog-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: var(--brand-ink);
  background: var(--brand-gradient-teal);
  box-shadow: 0 12px 30px rgba(47,182,195,.18);
  font-size: 1.42rem;
  font-weight: 800;
}

.portal-dialog[data-type="warning"] .portal-dialog-icon {
  color: #351a23;
  background: linear-gradient(145deg, #f4bfd0, var(--brand-pink-strong));
  box-shadow: 0 12px 30px rgba(215,127,153,.16);
}

.portal-dialog[data-type="error"] .portal-dialog-icon {
  color: #3b151f;
  background: linear-gradient(145deg, #ffc2d0, #e9819e);
}

.portal-dialog[data-type="success"] .portal-dialog-icon {
  color: #09271f;
  background: linear-gradient(145deg, #8ae3cb, #61cbb2);
}

.portal-dialog-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-cyan);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.portal-dialog-card h3 {
  margin: 0 0 10px;
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.portal-dialog-card p {
  margin: 0;
  color: #c3ccd8;
  font-size: .88rem;
  line-height: 1.65;
  white-space: pre-line;
}

.portal-dialog-detail {
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid var(--border-brand);
  border-radius: 14px;
  color: #dce8eb;
  background: rgba(47,182,195,.07);
  font-size: .79rem;
  line-height: 1.55;
  white-space: pre-line;
}

.portal-dialog[data-type="warning"] .portal-dialog-detail,
.portal-dialog[data-type="error"] .portal-dialog-detail {
  border-color: rgba(235,164,183,.20);
  background: var(--danger-soft);
}

.portal-dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 22px;
}

.portal-dialog[data-destructive="true"] #portalDialogConfirm {
  color: #341821;
  background: linear-gradient(100deg, #f0adc0, #e38da7);
  box-shadow: 0 12px 28px rgba(215,127,153,.16);
}

@media (min-width: 430px) {
  .portal-dialog-actions {
    grid-template-columns: 1fr 1fr;
  }

  .portal-dialog-actions.is-single-action {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-dialog-card {
    animation: none;
  }
}



/* ===== Cierre del paso de datos ===== */
.profile-persistence-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid rgba(116,210,223,.16);
  border-radius: 14px;
  background: rgba(47,182,195,.045);
}

.profile-persistence-note > span {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--brand-ink);
  background: var(--brand-gradient-teal);
  font-weight: 800;
}

.profile-persistence-note p {
  margin: 0;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.45;
}

.profile-persistence-note strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: .7rem;
}

.booking-final-actions {
  display: grid;
  gap: 14px;
}

.booking-final-actions .booking-notice {
  margin: 0;
}

.booking-final-actions .btn-step {
  width: calc(100% - 28px);
}

/* ===== Aviso de Privacidad ===== */
.privacy-page { width: min(100%, 860px); margin: 0 auto; padding: 28px 20px 70px; }
.privacy-page .brand { margin-bottom: 30px; }
.privacy-page-card {
  padding: 22px 18px; border: 1px solid var(--border); border-radius: 20px;
  background: rgba(8,16,31,.82); box-shadow: var(--shadow);
}
.privacy-page-card h1 { margin-bottom: 8px; font-size: clamp(2rem, 8vw, 3.3rem); }
.privacy-page-card h2, .privacy-page-card h3, .privacy-page-card h4 { margin-top: 26px; margin-bottom: 8px; line-height: 1.25; }
.privacy-page-card h3 { font-size: 1rem; }
.privacy-page-card h4 { font-size: .83rem; color: #cfe3e5; }
.privacy-page-card p, .privacy-page-card li, .privacy-page-card dd, .privacy-page-card dt {
  color: #b8c2d2; font-size: .73rem; line-height: 1.65;
}
.privacy-page-card a { color: #8be0e4; }
.privacy-document-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.privacy-document-meta span {
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted); background: rgba(255,255,255,.04); font-size: .56rem;
}
.privacy-highlight, .privacy-note {
  margin: 16px 0; padding: 13px; border: 1px solid rgba(100,212,223,.15);
  border-radius: 13px; background: rgba(100,212,223,.055);
}
.privacy-definitions { display: grid; gap: 8px; }
.privacy-definitions div { padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.035); }
.privacy-definitions dt { color: #e8eef6; font-weight: 700; }
.privacy-definitions dd { margin: 3px 0 0; }
.privacy-back { display: inline-flex; margin-bottom: 16px; color: #99e1e4; text-decoration: none; font-size: .72rem; font-weight: 600; }

@media (min-width: 620px) {
  .patient-form { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
  .review-row { grid-template-columns: 160px 1fr; align-items: start; }
  .review-row span { padding-top: 2px; }
}

[hidden] {
  display: none !important;
}


/* ===== Autocompletado Safari / Chrome ===== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  -webkit-box-shadow:
    0 0 0 1000px #10202a inset !important;
  box-shadow:
    0 0 0 1000px #10202a inset !important;
  border-color: var(--border-brand) !important;
  transition:
    background-color 9999s ease-out 0s;
}

/* Evita zoom automático de Safari/iPhone al capturar datos */
html {
  -webkit-text-size-adjust: 100%;
}

input,
select,
textarea {
  font-size: 16px !important;
}

input,
select,
textarea,
button {
  font-family: inherit;
}
