:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #edf7f6;
  --ink: #17313b;
  --muted: #61737b;
  --line: #d8e2e5;
  --teal: #007c82;
  --teal-dark: #005f65;
  --mint: #dff3ee;
  --coral: #e86f59;
  --amber: #d98b2b;
  --navy: #223b59;
  --shadow: 0 18px 48px rgba(25, 55, 62, 0.12);
}

/* Kergo-inspired dark premium skin */
:root {
  color-scheme: dark;
  --bg: #020b0d;
  --surface: rgba(7, 24, 28, 0.88);
  --surface-soft: rgba(12, 46, 52, 0.72);
  --ink: #f4fbfc;
  --muted: #9eb9c2;
  --line: rgba(67, 230, 236, 0.28);
  --teal: #31f4ef;
  --teal-dark: #1bb9c5;
  --mint: rgba(49, 244, 239, 0.14);
  --coral: #ff5d93;
  --amber: #d6a543;
  --navy: #14263a;
  --blue: #3b8cff;
  --violet: #b561ff;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.48), 0 0 26px rgba(49, 244, 239, 0.08);
}

body {
  background:
    linear-gradient(135deg, rgba(2, 11, 13, 0.98), rgba(4, 26, 29, 0.98)),
    repeating-linear-gradient(90deg, rgba(49, 244, 239, 0.04) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(0deg, rgba(49, 244, 239, 0.035) 0 1px, transparent 1px 120px);
  color: var(--ink);
}

.app-shell {
  background:
    linear-gradient(115deg, rgba(49, 244, 239, 0.08), transparent 34%),
    linear-gradient(245deg, rgba(181, 97, 255, 0.06), transparent 28%);
}

.sidebar {
  border-right: 1px solid rgba(49, 244, 239, 0.22);
  background:
    linear-gradient(180deg, rgba(5, 23, 27, 0.97), rgba(2, 11, 13, 0.98)),
    repeating-linear-gradient(135deg, rgba(49, 244, 239, 0.05) 0 1px, transparent 1px 18px);
  box-shadow: 14px 0 45px rgba(0, 0, 0, 0.34);
}

.brand-mark {
  border: 1px solid rgba(49, 244, 239, 0.75);
  background: linear-gradient(135deg, rgba(49, 244, 239, 0.96), rgba(23, 177, 196, 0.82));
  color: #001014;
  box-shadow: 0 0 22px rgba(49, 244, 239, 0.34);
}

.brand strong {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
}

.nav-item {
  border: 1px solid transparent;
  color: #d5eff3;
  font-weight: 850;
}

.nav-item:hover,
.nav-item.is-active {
  border-color: rgba(49, 244, 239, 0.45);
  background: linear-gradient(90deg, rgba(49, 244, 239, 0.18), rgba(49, 244, 239, 0.04));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--teal), 0 0 18px rgba(49, 244, 239, 0.1);
}

.sidebar-card,
.patient-chip,
.logout-link,
.menu-toggle,
.panel,
.metric-card,
.benefit-card,
.appointment-card,
.notification-card,
.consultation-card,
.invoice-row,
.login-panel,
.booking-frame-shell,
.pdf-frame-shell,
.consultation-table-wrap {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(10, 37, 43, 0.9), rgba(4, 15, 18, 0.88));
  box-shadow: var(--shadow);
}

.content {
  padding: 34px;
}

.topbar h1,
.section-heading h2,
.hero-copy h2 {
  color: #fff;
  font-weight: 950;
  text-shadow: 0 0 26px rgba(49, 244, 239, 0.1);
}

.topbar h1 {
  font-size: clamp(30px, 4.4vw, 56px);
}

.eyebrow {
  color: var(--teal);
  letter-spacing: 0.18em;
  text-shadow: 0 0 14px rgba(49, 244, 239, 0.34);
}

.patient-chip,
.logout-link {
  color: #e9fbfd;
}

.logout-link:hover,
.text-button:hover {
  border-color: rgba(49, 244, 239, 0.55);
  color: var(--teal);
}

.hero-panel {
  border: 1px solid rgba(49, 244, 239, 0.34);
  background: #031014;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 36px rgba(49, 244, 239, 0.14);
}

.hero-panel::after {
  background:
    linear-gradient(90deg, rgba(2, 11, 13, 0.94), rgba(3, 20, 23, 0.72) 48%, rgba(4, 30, 34, 0.18)),
    repeating-linear-gradient(90deg, rgba(49, 244, 239, 0.05) 0 1px, transparent 1px 90px);
}

.status-pill,
.tag {
  border: 1px solid rgba(49, 244, 239, 0.3);
  background: rgba(49, 244, 239, 0.11);
  color: #dffeff;
}

.tag.confirmed,
.tag.done {
  border-color: rgba(49, 244, 239, 0.5);
  background: rgba(49, 244, 239, 0.16);
  color: var(--teal);
}

.tag.pending {
  border-color: rgba(214, 165, 67, 0.45);
  background: rgba(214, 165, 67, 0.15);
  color: #ffd47b;
}

.tag.cancelled {
  border-color: rgba(255, 93, 147, 0.42);
  background: rgba(255, 93, 147, 0.13);
  color: #ff9abd;
}

.primary-action {
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(49, 244, 239, 0.72);
  background: linear-gradient(135deg, #39f7f0, #24cde0);
  color: #001216;
  box-shadow: 0 0 26px rgba(49, 244, 239, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.primary-action:hover {
  background: linear-gradient(135deg, #77fff8, #30e3f1);
}

.secondary-action,
.danger-action,
.text-button,
.registration-tab {
  border-color: rgba(49, 244, 239, 0.24);
  background: rgba(6, 26, 31, 0.82);
  color: #eaffff;
}

.secondary-action:hover,
.registration-tab.is-active {
  border-color: rgba(49, 244, 239, 0.7);
  background: rgba(49, 244, 239, 0.14);
  color: var(--teal);
  box-shadow: 0 0 18px rgba(49, 244, 239, 0.18);
}

.danger-action {
  border-color: rgba(255, 93, 147, 0.42);
  color: #ff9abd;
}

.danger-action:hover {
  background: rgba(255, 93, 147, 0.12);
}

.metric-card,
.benefit-card,
.appointment-card,
.invoice-row,
.notification-card,
.consultation-card {
  position: relative;
  overflow: hidden;
}

.metric-card::after,
.benefit-card::after,
.appointment-card::after,
.invoice-row::after,
.notification-card::after,
.consultation-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  width: 74px;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--teal), transparent);
  box-shadow: 0 0 16px rgba(49, 244, 239, 0.7);
}

.metric-card:nth-child(3n + 2)::after,
.invoice-row:nth-child(3n + 2)::after {
  background: linear-gradient(90deg, var(--violet), transparent);
  box-shadow: 0 0 16px rgba(181, 97, 255, 0.62);
}

.metric-card:nth-child(3n)::after,
.invoice-row:nth-child(3n)::after {
  background: linear-gradient(90deg, var(--blue), transparent);
  box-shadow: 0 0 16px rgba(59, 140, 255, 0.62);
}

.metric-card strong {
  color: #fff;
  text-shadow: 0 0 20px rgba(49, 244, 239, 0.28);
}

.metric-card span,
.metric-card small,
.appointment-card p,
.benefit-card p,
.notification-card p,
.report-panel p,
.invoice-row p,
.invoice-row small,
.consultation-card p,
.consultation-card small,
.consultation-card header span,
.appointment-meta,
.report-score span,
.report-score small,
.login-note,
.sidebar-card span,
.sidebar-card small {
  color: var(--muted);
}

.appointment-date,
.report-icon,
.benefit-card .benefit-icon {
  border: 1px solid rgba(49, 244, 239, 0.35);
  background: rgba(49, 244, 239, 0.12);
  color: var(--teal);
  box-shadow: inset 0 0 18px rgba(49, 244, 239, 0.07);
}

.report-score,
.report-points span,
.empty-state {
  border: 1px solid rgba(49, 244, 239, 0.2);
  background: rgba(7, 26, 31, 0.72);
}

.consultation-table {
  background: transparent;
  color: var(--ink);
}

.consultation-table th {
  background: rgba(49, 244, 239, 0.1);
  color: #dffeff;
}

.consultation-table th,
.consultation-table td {
  border-bottom-color: rgba(49, 244, 239, 0.16);
}

.booking-frame,
.pdf-frame {
  background: #051216;
}

.login-page {
  background:
    linear-gradient(120deg, rgba(2, 11, 13, 0.94), rgba(4, 33, 37, 0.86)),
    url("assets/patient-portal-clinic.png") center / cover no-repeat;
}

.login-panel {
  width: min(100%, 460px);
  color: var(--ink);
}

.registration-panel {
  width: min(100%, 820px);
}

.login-brand,
.login-form label,
.login-heading h1 {
  color: #fff;
}

.login-form input,
.booking-form input,
.booking-form select,
.booking-form textarea {
  border-color: rgba(49, 244, 239, 0.25);
  background: rgba(1, 9, 11, 0.82);
  color: #fff;
  outline: none;
}

.login-form input:focus,
.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  border-color: rgba(49, 244, 239, 0.78);
  box-shadow: 0 0 0 3px rgba(49, 244, 239, 0.13);
}

.human-check {
  border-color: rgba(49, 244, 239, 0.26);
  background: rgba(6, 26, 31, 0.82);
  color: #fff;
}

.portal-alert {
  border-color: rgba(214, 165, 67, 0.42);
  background: rgba(48, 34, 6, 0.82);
  color: #ffe0a0;
}

.success-alert {
  border-color: rgba(49, 244, 239, 0.42);
  background: rgba(49, 244, 239, 0.12);
  color: #dffeff;
}

.toast {
  border: 1px solid rgba(49, 244, 239, 0.38);
  background: rgba(3, 18, 22, 0.94);
  box-shadow: 0 0 28px rgba(49, 244, 239, 0.2);
}

@media (max-width: 760px) {
  .content {
    padding: 18px;
  }

  .sidebar {
    box-shadow: 24px 0 70px rgba(0, 0, 0, 0.58);
  }

  .hero-panel {
    min-height: 520px;
  }

  .hero-panel::after {
    background:
      linear-gradient(180deg, rgba(2, 11, 13, 0.95), rgba(3, 21, 24, 0.62)),
      repeating-linear-gradient(90deg, rgba(49, 244, 239, 0.05) 0 1px, transparent 1px 86px);
  }
}

/* PodoActiva Modelo A */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f7f8f8;
  --ink: #1e262b;
  --muted: #4a5a64;
  --line: #e8ebec;
  --teal: #00838f;
  --teal-dark: #00666f;
  --mint: #e6f2f3;
  --coral: #00838f;
  --amber: #818181;
  --navy: #1e262b;
  --shadow: 0 1px 2px rgb(30 38 43 / 0.06), 0 4px 12px rgb(30 38 43 / 0.06);
}

* {
  letter-spacing: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
}

.app-shell {
  background: var(--bg);
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  box-shadow: none;
}

.brand {
  color: var(--ink);
}

.brand-mark {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
  box-shadow: none;
}

.brand strong {
  color: var(--ink);
  font-size: 19px;
  font-weight: 600;
}

.brand small,
.sidebar-card span,
.sidebar-card small,
.patient-chip small,
.metric-card p,
.appointment-card p,
.consultation-card p,
.invoice-row p,
.invoice-row small,
.empty-state p,
.timeline-item time,
.notification-card time,
.topbar-actions,
.hero-copy p {
  color: var(--muted);
}

.nav-item {
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  font-weight: 500;
}

.nav-item svg {
  color: var(--teal);
}

.nav-item:hover,
.nav-item.is-active {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--teal-dark);
  box-shadow: none;
}

.nav-count {
  background: var(--teal);
  color: #ffffff;
}

.content {
  background: var(--bg);
}

.topbar,
.section-heading {
  border-bottom: 0;
}

.topbar h1,
.section-heading h2,
.hero-copy h2,
.panel-heading h3,
.metric-card strong,
.appointment-card h3,
.consultation-card h3,
.invoice-row h4,
.invoice-detail-header h2,
.empty-state strong {
  color: var(--ink);
  font-weight: 600;
  text-shadow: none;
}

.topbar h1 {
  font-size: clamp(30px, 4vw, 39px);
  line-height: 1.06;
}

.section-heading h2 {
  font-size: clamp(26px, 3.2vw, 31px);
}

.eyebrow,
.pa-etiqueta {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
}

.sidebar-card,
.patient-chip,
.logout-link,
.menu-toggle,
.panel,
.metric-card,
.benefit-card,
.appointment-card,
.notification-card,
.consultation-card,
.invoice-row,
.login-panel,
.booking-frame-shell,
.pdf-frame-shell,
.consultation-table-wrap,
.empty-state,
.segmented-control {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: none;
}

.panel:hover,
.metric-card:hover,
.benefit-card:hover,
.appointment-card:hover,
.notification-card:hover,
.consultation-card:hover,
.invoice-row:hover {
  box-shadow: var(--shadow);
}

.hero-panel {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.hero-panel::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.92), rgba(255,255,255,0.72));
}

.status-pill,
.tag {
  border: 1px solid transparent;
  background: var(--mint);
  color: var(--teal-dark);
  font-weight: 500;
}

.tag.pending,
.tag.cancelled {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.primary-action,
.secondary-action,
.danger-action,
.text-button,
.registration-tab,
.icon-button,
.logout-link,
.menu-toggle {
  min-height: 42px;
  border-radius: 6px;
  font-weight: 500;
  box-shadow: none;
}

.primary-action {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.primary-action:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: #ffffff;
}

.secondary-action,
.text-button,
.registration-tab,
.icon-button,
.logout-link,
.menu-toggle {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--teal);
}

.secondary-action:hover,
.text-button:hover,
.registration-tab.is-active,
.icon-button:hover,
.logout-link:hover,
.menu-toggle:hover {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
  box-shadow: none;
}

.danger-action {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

.danger-action:hover {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

.booking-form label,
.form-grid label {
  color: var(--ink);
  font-weight: 500;
}

.booking-form input,
.booking-form select,
.booking-form textarea,
.form-grid input,
.form-grid select,
.form-grid textarea,
.login-panel input {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.login-panel input:focus {
  border-color: var(--teal);
  outline: 2px solid var(--mint);
  outline-offset: 0;
}

.consultation-table {
  background: var(--surface);
}

.consultation-table th {
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 600;
}

.consultation-table td {
  color: var(--ink);
}

.benefit-card .benefit-icon {
  background: var(--mint);
  color: var(--teal);
}

.notification-dot,
.segmented-control button.is-selected {
  background: var(--teal);
}

.segmented-control button {
  color: var(--muted);
  font-weight: 500;
}

.portal-alert {
  border: 1px solid #dfe7e8;
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 10px;
}

.toast {
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.booking-frame,
.pdf-frame {
  background: #ffffff;
}

@media (max-width: 760px) {
  .hero-panel::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.72));
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  background: #0f2d36;
  color: #f8fbfc;
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: #a9c0c6;
}

.main-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d8e9ed;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.nav-count {
  margin-left: auto;
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--coral);
  color: #fff;
  font-size: 12px;
  text-align: center;
}

.sidebar-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-card span,
.sidebar-card small {
  display: block;
  color: #b9cdd2;
}

.sidebar-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 20px;
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
  z-index: 5000;
  overflow: visible;
}

.topbar h1,
.section-heading h2,
.hero-copy h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.logout-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.online-booking-view,
.data-protection-view {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 150px);
}

.booking-frame-shell {
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.booking-frame {
  display: block;
  width: 100%;
  height: min(980px, calc(100vh - 180px));
  min-height: 720px;
  border: 0;
  background: #fff;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(110deg, rgba(13, 45, 53, 0.86) 0%, rgba(13, 45, 53, 0.56) 42%, rgba(255, 255, 255, 0.18) 100%),
    url("assets/portal-clinic-room.png") center / cover no-repeat;
}

.registration-page {
  background:
    linear-gradient(110deg, rgba(13, 45, 53, 0.82) 0%, rgba(13, 45, 53, 0.48) 42%, rgba(255, 255, 255, 0.24) 100%),
    url("assets/portal-clinic-reception.png") center / cover no-repeat;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(100%, 440px);
  padding: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 24px 60px rgba(15, 45, 54, 0.22);
  backdrop-filter: blur(16px);
}

.login-page .login-heading h1 {
  color: #1e262b;
  text-shadow: none;
}

.login-page .login-heading .eyebrow {
  color: #00838f;
}

.login-page .login-brand,
.login-page .login-form label {
  color: #1e262b;
}

.registration-shell {
  align-items: start;
}

.registration-panel {
  width: min(100%, 760px);
}

.login-brand {
  color: var(--ink);
}

.login-heading {
  margin: 32px 0 20px;
}

.login-heading h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.registration-form {
  display: none;
}

.registration-form.is-visible {
  display: grid;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.human-check {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  width: fit-content;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
  color: var(--ink);
}

.human-check input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--teal);
}

.bot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.login-alert {
  margin-bottom: 16px;
}

.success-alert {
  margin-bottom: 16px;
  border-color: rgba(0, 124, 130, 0.28);
  background: var(--mint);
  color: var(--teal-dark);
}

.registration-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.registration-tab {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.registration-tab.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.login-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-note a {
  color: var(--teal-dark);
  font-weight: 800;
}

.view {
  display: none;
}

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

.hero-panel {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: 8px;
  background: #112f39;
  box-shadow: var(--shadow);
}

.hero-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 31, 37, 0.95) 0%, rgba(4, 31, 37, 0.86) 34%, rgba(4, 31, 37, 0.38) 66%, rgba(4, 31, 37, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.18));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  padding: 44px;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.34);
}

.hero-copy h2 {
  color: #ffffff;
  margin-top: 14px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 540px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.6;
}

.status-pill {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-action,
.secondary-action,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  text-decoration: none;
}

.primary-action {
  padding: 10px 16px;
  background: var(--teal);
  color: #fff;
}

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action {
  padding: 10px 16px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-copy .secondary-action {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.text-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: var(--teal);
}

.metric-grid,
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.metric-card,
.panel,
.benefit-card,
.appointment-card,
.notification-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: 8px 0;
  font-size: 34px;
}

.two-column,
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 20px;
  margin-top: 20px;
}

.report-panel {
  grid-row: span 2;
}

.report-summary {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.panel {
  padding: 20px;
}

.panel-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.appointment-list,
.notification-list,
.document-list,
.invoice-list,
.timeline {
  display: grid;
  gap: 12px;
}

.appointment-list:not(.compact) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.appointment-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.appointment-top,
.notification-card,
.document-row,
.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.appointment-date {
  display: grid;
  min-width: 76px;
  place-items: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal-dark);
  font-weight: 900;
}

.appointment-date small {
  color: inherit;
  font-weight: 700;
  text-transform: uppercase;
}

.appointment-date .appointment-year {
  font-size: 12px;
  line-height: 1;
  opacity: 0.78;
}

.appointment-card h3,
.benefit-card h3 {
  margin: 0 0 6px;
}

.appointment-card p,
.benefit-card p,
.notification-card p,
.report-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.appointment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.appointment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.appointment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.appointment-actions form {
  margin: 0;
}

.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #f0c9c3;
  border-radius: 8px;
  background: #fff6f4;
  color: #b23d2c;
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef3f4;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tag.confirmed {
  background: var(--mint);
  color: var(--teal-dark);
}

.tag.pending {
  background: #fff4df;
  color: #9a6114;
}

.tag.done {
  background: #eef3f4;
  color: #4d626a;
}

.tag.cancelled {
  background: #f0f2f3;
  color: #78868b;
}

.report-header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.report-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--teal);
}

.report-score {
  display: grid;
  gap: 4px;
  margin: 24px 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.report-score strong {
  font-size: 58px;
  line-height: 1;
}

.report-score span,
.report-score small {
  color: var(--muted);
}

.report-points {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.report-points span {
  padding: 12px;
  border-left: 4px solid var(--teal);
  background: #f8fbfb;
}

.document-row {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.document-row:last-child {
  border-bottom: 0;
}

.consultation-panel {
  margin-bottom: 20px;
  overflow: hidden;
}

.consultation-table-wrap {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.consultation-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  background: #fff;
}

.consultation-table th,
.consultation-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.consultation-table th {
  background: #f6fafb;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.consultation-table tr:last-child td {
  border-bottom: 0;
}

.consultation-table td:nth-child(1),
.consultation-table td:nth-child(2),
.consultation-table td:nth-child(4) {
  white-space: nowrap;
}

.consultation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.consultation-download {
  min-width: 104px;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal-dark);
}

.icon-button:disabled {
  cursor: default;
  opacity: 0.36;
}

.consultation-cards {
  display: none;
  gap: 12px;
  margin-top: 16px;
}

.consultation-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.consultation-card header,
.consultation-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.consultation-card header span,
.consultation-card small {
  color: var(--muted);
}

.consultation-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.empty-state {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.empty-state p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.invoice-panel {
  align-self: start;
}

.invoice-list {
  margin-top: 14px;
}

.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfd;
}

.invoice-row h4 {
  margin: 8px 0 4px;
  font-size: 16px;
}

.invoice-row p {
  margin: 0 0 5px;
  color: var(--muted);
  line-height: 1.4;
}

.invoice-row small {
  color: var(--muted);
}

.invoice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.invoice-view {
  display: grid;
  gap: 18px;
}

.invoice-detail-panel {
  padding: 16px;
}

.invoice-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.invoice-detail-header p {
  margin: 10px 0 5px;
  color: var(--muted);
}

.invoice-detail-header small {
  color: var(--muted);
}

.pdf-frame-shell {
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.pdf-frame {
  display: block;
  width: 100%;
  height: min(980px, calc(100vh - 220px));
  min-height: 720px;
  border: 0;
  background: #fff;
}

.icon-action {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.booking-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

.booking-form textarea {
  resize: vertical;
}

.form-wide,
.form-actions {
  grid-column: 1 / -1;
}

.form-actions p {
  margin: 0;
  color: var(--teal-dark);
  font-weight: 800;
}

.segmented-control {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented-control button.is-selected {
  background: var(--teal);
  color: #fff;
}

.benefit-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.benefit-card .benefit-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #fff3ee;
  color: var(--coral);
}

.benefit-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.notification-card {
  padding: 16px;
}

.notification-card > form {
  margin-left: auto;
}

.notification-read-action {
  min-height: 38px;
  white-space: nowrap;
}

.notification-card.unread {
  border-color: rgba(0, 124, 130, 0.35);
  background: #fbffff;
}

.notification-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--teal);
}

.notification-card:not(.unread) .notification-dot {
  background: var(--line);
}

.notification-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.notification-card time,
.timeline-item time {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.timeline-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 8px;
  background: #102f38;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.portal-alert {
  border: 1px solid rgba(255, 193, 7, 0.36);
  background: rgba(255, 248, 225, 0.96);
  color: #5f4300;
  border-radius: 8px;
  font-size: 0.94rem;
  line-height: 1.45;
  margin: 0 0 18px;
  padding: 12px 14px;
}

@media (max-width: 1100px) {
  .metric-grid,
  .benefit-grid,
  .appointment-list:not(.compact) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .report-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: min(320px, 86vw);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .content {
    padding: 18px;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .patient-chip {
    display: none;
  }

  .hero-copy {
    padding: 28px;
  }

  .hero-panel {
    min-height: 520px;
  }

  .hero-panel::after {
    background: linear-gradient(180deg, rgba(12, 37, 45, 0.86), rgba(12, 37, 45, 0.42));
  }

  .metric-grid,
  .benefit-grid,
  .appointment-list:not(.compact),
  .booking-form,
  .form-grid,
  .registration-tabs {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segmented-control button {
    flex: 1;
  }

  .online-booking-view {
    min-height: calc(100vh - 96px);
  }

  .booking-frame-shell {
    min-height: calc(100vh - 190px);
    margin-inline: -10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .booking-frame {
    height: calc(100vh - 190px);
    min-height: 620px;
  }

  .consultation-table-wrap {
    display: none;
  }

  .consultation-cards {
    display: grid;
  }

  .consultation-card header,
  .consultation-card footer {
    display: grid;
    justify-content: stretch;
  }

  .consultation-actions {
    justify-content: stretch;
  }

  .consultation-actions .secondary-action:not(.icon-action) {
    width: 100%;
  }

  .invoice-row,
  .invoice-detail-header {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-actions {
    justify-content: stretch;
  }

  .invoice-actions .secondary-action:not(.icon-action),
  .invoice-detail-header .primary-action {
    width: 100%;
  }

  .pdf-frame-shell {
    min-height: calc(100vh - 260px);
    margin-inline: -10px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .pdf-frame {
    height: calc(100vh - 260px);
    min-height: 560px;
  }
}

/* Modelo A final overrides */
html body {
  background: #ffffff;
  color: #1e262b;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html .app-shell,
html .content,
html .sidebar {
  background: #ffffff;
}

html .nav-item:hover,
html .nav-item.is-active {
  border-color: #e6f2f3;
  background: #e6f2f3;
  color: #00666f;
  box-shadow: none;
}

html .panel,
html .metric-card,
html .benefit-card,
html .appointment-card,
html .notification-card,
html .consultation-card,
html .invoice-row,
html .booking-frame-shell,
html .pdf-frame-shell,
html .consultation-table-wrap {
  background: #ffffff;
  border-color: #e8ebec;
  box-shadow: none;
}

html .topbar h1,
html .section-heading h2,
html .panel-heading h3 {
  color: #1e262b;
  font-weight: 600;
  text-shadow: none;
}

.language-switcher {
  margin-left: auto;
  position: relative;
  z-index: 6000;
}

.language-switcher label {
  align-items: center;
  display: flex;
  gap: 8px;
  overflow: visible;
}

.language-switcher span {
  color: #607078;
  font-size: 12px;
  font-weight: 600;
}

.language-switcher select {
  min-height: 38px;
  min-width: 132px;
  border: 1px solid #dce6e8;
  border-radius: 6px;
  background: #ffffff;
  color: #1e262b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0 10px;
}

.center-choice-panel {
  width: 100%;
  max-width: none;
}

.center-choice-panel .panel-heading {
  align-items: flex-start;
  gap: 16px;
}

.center-choice-panel .panel-heading p {
  color: #607078;
  font-size: 14px;
  line-height: 1.45;
  margin: 6px 0 0;
  max-width: 620px;
}

.center-choice-form {
  display: grid;
  gap: 22px;
}

.center-search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.center-search-field {
  display: grid;
  gap: 8px;
}

.center-search-field span {
  color: #607078;
  font-size: 13px;
  font-weight: 700;
}

.center-search-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #dce6e8;
  border-radius: 8px;
  background: #ffffff;
  color: #1e262b;
  font: inherit;
  font-weight: 600;
  padding: 0 16px;
}

.center-search-field input:focus {
  border-color: #00838f;
  box-shadow: 0 0 0 3px rgba(0, 131, 143, 0.12);
  outline: none;
}

.center-location-button {
  min-height: 52px;
  white-space: nowrap;
}

.center-choice-note,
.center-choice-empty {
  border: 1px solid rgba(0, 131, 143, 0.18);
  border-radius: 8px;
  background: rgba(0, 131, 143, 0.07);
  color: #005f69;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  padding: 12px 14px;
}

.center-choice-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-height: min(58vh, 620px);
  overflow: auto;
  padding: 2px 4px 2px 2px;
}

.center-choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: flex-start;
  min-height: 112px;
  border: 1px solid #dce6e8;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  padding: 18px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.center-choice-card:hover {
  border-color: #00838f;
  box-shadow: 0 14px 34px rgba(0, 131, 143, 0.12);
  transform: translateY(-1px);
}

.center-choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.center-choice-mark {
  width: 22px;
  height: 22px;
  border: 2px solid #9ab2b8;
  border-radius: 999px;
  margin-top: 2px;
}

.center-choice-card input:checked + .center-choice-mark {
  border-color: #00838f;
  box-shadow: inset 0 0 0 5px #ffffff;
  background: #00838f;
}

.center-choice-card:has(input:checked) {
  border-color: #00838f;
  background: #f1fbfc;
  box-shadow: 0 14px 34px rgba(0, 131, 143, 0.14);
}

.center-choice-copy {
  display: grid;
  gap: 6px;
}

.center-choice-copy strong {
  color: #1e262b;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.center-choice-copy small {
  color: #607078;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.center-choice-copy .center-distance {
  color: #00838f;
  font-weight: 800;
}

.login-language {
  margin: 0 0 18px;
}

.login-language label {
  justify-content: space-between;
}

.topbar-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  position: relative;
  z-index: 6000;
  overflow: visible;
}

.topbar h1 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.15;
}

.topbar .patient-chip {
  display: none;
}

.topbar .language-switcher {
  margin-left: 0;
}

.topbar .language-switcher label {
  gap: 10px;
}

.topbar .language-switcher span {
  color: #607078;
  font-size: 13px;
  font-weight: 700;
}

.language-select-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 7000;
}

.language-flag {
  flex: 0 0 auto;
  width: 20px;
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(23, 47, 54, 0.18);
  border-radius: 2px;
  background: #ffffff;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 88px;
  min-height: 42px;
  border: 1px solid #dce6e8;
  border-radius: 8px;
  background: #ffffff;
  color: #1e262b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 0 12px;
}

.language-chevron {
  width: 9px;
  height: 9px;
  border-right: 2px solid #1e262b;
  border-bottom: 2px solid #1e262b;
  margin-left: auto;
  transform: rotate(45deg) translateY(-2px);
}

.language-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9000;
  display: none;
  min-width: 124px;
  border: 1px solid #dce6e8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(23, 47, 54, 0.18);
  overflow: hidden;
  padding: 6px;
}

.language-select-shell.is-open .language-options {
  display: grid;
  gap: 2px;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1e262b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
  text-align: left;
}

.language-option:hover,
.language-option.is-selected {
  background: #e6f8fa;
  color: #006d77;
}

.language-flag-es {
  background: linear-gradient(#aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%);
}

.language-flag-en {
  background:
    linear-gradient(90deg, transparent 42%, #c8102e 42% 58%, transparent 58%),
    linear-gradient(transparent 38%, #c8102e 38% 62%, transparent 62%),
    linear-gradient(90deg, transparent 35%, #ffffff 35% 65%, transparent 65%),
    linear-gradient(transparent 30%, #ffffff 30% 70%, transparent 70%),
    #012169;
}

.language-flag-it {
  background: linear-gradient(90deg, #008c45 0 33%, #ffffff 33% 66%, #cd212a 66%);
}

.language-flag-pt {
  background: linear-gradient(90deg, #006600 0 42%, #ff0000 42%);
}

.language-flag-ca {
  background: repeating-linear-gradient(
    to bottom,
    #f8d21c 0 2px,
    #f8d21c 2px 4px,
    #d71920 4px 6px
  );
}

.language-flag-eu {
  background:
    linear-gradient(33deg, transparent 42%, #ffffff 42% 48%, #009b48 48% 54%, #ffffff 54% 60%, transparent 60%),
    linear-gradient(-33deg, transparent 42%, #ffffff 42% 48%, #009b48 48% 54%, #ffffff 54% 60%, transparent 60%),
    linear-gradient(90deg, transparent 43%, #ffffff 43% 48%, #009b48 48% 54%, #ffffff 54% 59%, transparent 59%),
    linear-gradient(transparent 34%, #ffffff 34% 39%, #009b48 39% 47%, #ffffff 47% 52%, transparent 52%),
    #d71920;
}

.language-flag-fr {
  background: linear-gradient(90deg, #0055a4 0 33%, #ffffff 33% 66%, #ef4135 66%);
}

.language-flag-de {
  background: linear-gradient(#000000 0 33%, #dd0000 33% 66%, #ffce00 66%);
}

@media (max-width: 760px) {
  .center-search-bar {
    grid-template-columns: 1fr;
  }

  .center-location-button {
    width: 100%;
  }

  .center-choice-grid {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

.topbar .logout-link {
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
}

.topbar .logout-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

@media (max-width: 760px) {
  .topbar-actions-right {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .language-switcher {
    width: auto;
  }

  .language-switcher label {
    justify-content: flex-start;
  }

  .center-choice-grid {
    grid-template-columns: 1fr;
  }

  .center-choice-card {
    min-height: auto;
  }
}

html body:not(.login-page) {
  background: #f5f8f9;
}

html body:not(.login-page) .app-shell,
html body:not(.login-page) .content {
  background: transparent;
}

html body:not(.login-page) .sidebar {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

html body:not(.login-page) .brand strong {
  color: #1e262b;
}

html body:not(.login-page) .brand small,
html body:not(.login-page) .sidebar-card span,
html body:not(.login-page) .sidebar-card small {
  color: #6f858c;
}

html body:not(.login-page) .sidebar-card strong {
  color: #43565d;
}

html body:not(.login-page) .nav-item {
  color: #4f666d;
}

html body:not(.login-page) .nav-item svg {
  color: #00838f;
}

html body:not(.login-page) .nav-item:hover,
html body:not(.login-page) .nav-item.is-active {
  background: #e3f3f4;
  color: #00666f;
}

html body:not(.login-page) .topbar,
html body:not(.login-page) .panel,
html body:not(.login-page) .booking-frame-shell,
html body:not(.login-page) .pdf-frame-shell,
html body:not(.login-page) .consultation-table-wrap,
html body:not(.login-page) .appointment-card,
html body:not(.login-page) .invoice-row,
html body:not(.login-page) .notification-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

html body:not(.login-page) .hero-panel {
  background: #0d2d35;
}

html body:not(.login-page) .hero-panel::after {
  background:
    linear-gradient(90deg, rgba(4, 31, 37, 0.97) 0%, rgba(4, 31, 37, 0.9) 34%, rgba(4, 31, 37, 0.48) 64%, rgba(4, 31, 37, 0.12) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.22));
}

html body:not(.login-page) .hero-copy {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.46);
}

html body:not(.login-page) .hero-copy h2 {
  color: #ffffff;
}

html body:not(.login-page) .hero-copy p {
  color: rgba(255, 255, 255, 0.94);
}

html body:not(.login-page) .hero-copy .status-pill {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.22);
  color: #8ff7f2;
  font-weight: 800;
}

.portal-alert .inline-resend-form {
  margin-top: 12px;
}

.inline-resend-button {
  appearance: none;
  border: 1px solid rgba(0, 131, 143, 0.32);
  border-radius: 8px;
  background: #00838f;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 10px 14px;
}

.inline-resend-button:hover {
  background: #006f78;
}

.confirmation-page .login-shell {
  min-height: 100vh;
  padding: 32px 18px;
}

.confirmation-page .login-panel {
  width: min(100%, 520px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 28px 72px rgba(9, 40, 48, 0.3);
}

.confirmation-page .login-brand,
.confirmation-page .login-brand strong,
.confirmation-page .login-heading h1,
.confirmation-page .login-note a {
  color: #1e262b;
}

.confirmation-page .login-brand small {
  color: #9bb2b8;
}

.confirmation-page .login-heading {
  margin: 28px 0 22px;
}

.confirmation-page .login-heading h1 {
  max-width: 380px;
  font-size: 30px;
  line-height: 1.08;
  text-shadow: none;
}

.confirmation-page .portal-alert {
  border-radius: 8px;
  color: #5f4300;
  background: #fff8df;
  border-color: #ffe08a;
}

.confirmation-page .success-alert {
  color: #075c62;
  background: #e7f7f7;
  border-color: #bfe5e7;
}

.confirmation-page .login-note {
  margin: 20px 0 0;
}

.confirmation-page .login-note a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  background: #00838f;
  color: #fff;
  font-weight: 800;
  padding: 0 18px;
  text-decoration: none;
}

html body.login-page.confirmation-page {
  background:
    linear-gradient(120deg, rgba(5, 38, 45, 0.72), rgba(15, 139, 145, 0.42)),
    url("assets/portal-clinic-room.png") center / cover fixed no-repeat;
}

@media (max-width: 760px) {
  html body:not(.login-page) .hero-panel::after {
    background:
      linear-gradient(180deg, rgba(4, 31, 37, 0.96) 0%, rgba(4, 31, 37, 0.82) 52%, rgba(4, 31, 37, 0.42) 100%);
  }
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell,
.content,
.topbar,
.topbar-actions-right,
.language-switcher,
.language-switcher label,
.language-select-shell {
  min-width: 0;
}

@media (max-width: 760px) {
  .topbar {
    flex-wrap: wrap;
    overflow: visible;
  }

  .topbar-actions-right {
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    max-width: 100%;
  }

  .language-switcher {
    flex: 1 1 auto;
    max-width: 100%;
  }

  .language-switcher label {
    flex-wrap: wrap;
    gap: 6px;
  }

  .language-select-shell {
    max-width: 100%;
  }

  .language-trigger {
    min-width: 76px;
    padding: 0 10px;
  }

  .language-options {
    right: auto;
    left: 0;
    max-width: calc(100vw - 36px);
  }

  .topbar .logout-link {
    flex: 0 1 auto;
    min-width: 0;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .booking-frame-shell,
  .pdf-frame-shell {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 760px) and (orientation: portrait) {
  .invoice-view {
    overflow-x: hidden;
  }

  .invoice-view .pdf-frame-shell {
    position: relative;
    left: 45%;
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    margin-inline: 0;
    transform: translateX(-50%);
  }

  .invoice-view .pdf-frame {
    width: 100%;
    max-width: 100%;
  }

  .data-document-view .data-document-frame-shell {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    min-height: calc(100vh - 250px);
    overflow: hidden;
  }

  .data-document-view .data-document-frame {
    width: 190%;
    max-width: none;
    height: 190%;
    min-height: calc((100vh - 250px) * 1.9);
    transform: scale(0.526);
    transform-origin: 0 0;
  }
}

.data-protection-panel-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
}

.data-sign-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid rgba(0, 131, 143, 0.18);
  border-radius: 999px;
  background: #00838f;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  padding: 0 18px 0 14px;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.data-sign-button:hover,
.data-sign-button:focus-visible {
  background: #006f79;
  box-shadow: 0 14px 30px rgba(0, 131, 143, 0.18);
  outline: none;
  transform: translateY(-1px);
}

.data-sign-button-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.data-sign-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
}

.data-sign-modal.is-open {
  display: grid;
}

body.data-sign-modal-open {
  overflow: hidden;
}

.data-sign-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  border-bottom: 1px solid #dce6e8;
  background: rgba(255, 255, 255, 0.98);
  color: #1e262b;
  padding: 14px clamp(16px, 3vw, 34px);
}

.data-sign-modal-bar strong {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.2;
}

.data-sign-modal-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid #dce6e8;
  border-radius: 999px;
  background: #ffffff;
  color: #1e262b;
  cursor: pointer;
  font: inherit;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
}

.data-sign-modal-close:hover,
.data-sign-modal-close:focus-visible {
  border-color: #00838f;
  color: #00838f;
  outline: none;
}

.data-sign-modal-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: #ffffff;
}

html body.login-page {
  background:
    linear-gradient(110deg, rgba(13, 45, 53, 0.82), rgba(13, 45, 53, 0.38)),
    url("assets/portal-clinic-room.png") center / cover no-repeat;
}

html body.login-page.registration-page,
html body.login-page.confirmation-page {
  background: #f5f8f9;
}

.report-unavailable {
  color: #607078;
  font-size: 14px;
}

.online-booking-view {
  min-width: 0;
  align-content: start;
}

html body:not(.login-page) .online-booking-view .booking-frame-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  background: #fff;
}

@media (max-width: 760px) {
  .data-protection-panel-heading {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .data-protection-panel-heading .tag {
    justify-self: end;
  }

  .data-sign-button {
    grid-column: 1 / -1;
    justify-self: start;
    max-width: 100%;
    white-space: normal;
  }

  .data-sign-modal-bar {
    min-height: 64px;
  }
}
