:root {
  --bg: #f5f0ee;
  --surface: #ffffff;
  --surface-soft: #fff8f8;
  --ink: #16203a;
  --muted: #6a7280;
  --line: #eaecf0;
  --brand: #d62b2b;
  --brand-dark: #b01e1e;
  --accent: #d62b2b;
  --premium: #0f1729;
  --ok: #2d8a61;
  --warn: #c28a23;
  --rid-navy: #16203a;
  --rid-navy-deep: #0f1729;
  --rid-navy-darkest: #0b1120;
  --rid-red: #d62b2b;
  --rid-red-dark: #b01e1e;
  --rid-red-darker: #8b0e13;
  --rid-cream: #faf6f4;
  --rid-cream-mid: #f5f0ee;
  --rid-cream-border: #ede8e4;
  --rid-cream-border-dark: #e6e2df;
  --rid-text-muted: #6a7280;
  --rid-text-faint: #9a8a8a;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 28px rgba(15, 23, 42, 0.09), 0 3px 8px rgba(15, 23, 42, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4 {
  font-family: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  letter-spacing: -0.025em;
}

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

button {
  cursor: pointer;
}

.login-panel {
  display: grid;
  width: min(100%, 440px);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  gap: 14px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f3d2d2;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.login-brand .brand-mark {
  color: #ffffff;
  background: var(--brand);
}

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

.login-copy {
  display: grid;
  gap: 10px;
}

.login-copy h1 {
  max-width: none;
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.login-copy p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.identity-card {
  display: grid;
  gap: 4px;
  max-width: 430px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #fee2e2;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

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

.identity-card strong {
  color: var(--brand-dark);
}

.login-form {
  display: grid;
  gap: 12px;
  max-width: none;
  min-width: 0;
}

.login-form label,
.login-form input {
  min-width: 0;
  max-width: 100%;
}

.login-form input {
  width: 100%;
}

.google-action {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.google-action span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 900;
}

.login-trust {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
}

.login-trust span {
  padding: 6px 9px;
  color: var(--brand-dark);
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.login-showcase {
  display: none;
}

.login-showcase::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.72), rgba(15, 23, 42, 0.44));
}

.login-showcase::after {
  position: absolute;
  inset-inline: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), rgba(220, 38, 38, 0.7), rgba(255, 255, 255, 0.5), transparent);
  animation: scanLine 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes scanLine {
  0% { top: 8%; opacity: 0; }
  6% { opacity: 1; }
  94% { opacity: 0.7; }
  100% { top: 92%; opacity: 0; }
}

.showcase-card {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(310px, 100%);
  padding: 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  backdrop-filter: blur(14px);
}

.showcase-card.main {
  width: min(430px, 100%);
  margin-left: auto;
}

.showcase-card strong {
  font-size: 2.4rem;
}

.showcase-card small,
.showcase-card span {
  color: rgba(255, 255, 255, 0.78);
}

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

.app-shell[hidden],
.login-screen[hidden],
.loading-screen[hidden] {
  display: none;
}

/* ── Pantalla de carga: esqueleto del layout con brillo (diseño RID) ──
   Tiempos del componente RidSkeleton: visible 0.7s, luego se desvanece en
   0.55s (app.js la retira del todo a los ~1.3s). Reabrirse (hidden →
   visible) reinicia las animaciones. En móvil, la barra lateral se vuelve
   una franja superior y las tarjetas se reacomodan solas. */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  overflow: hidden;
  background: #f5f0ee;
  animation: ri-skel-out 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

@keyframes ri-skel-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes ri-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-screen .sk,
.loading-screen .skd {
  display: block;
  background-size: 200% 100%;
  animation: ri-shimmer 1.3s linear infinite;
  border-radius: 8px;
}

.loading-screen .sk {
  background-image: linear-gradient(90deg, #e6e1de 25%, #f2efec 50%, #e6e1de 75%);
}

.loading-screen .skd {
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.05) 75%);
}

.skel-side {
  width: 256px;
  flex: none;
  background: #0f1729;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skd-logo {
  height: 56px;
  width: 72%;
  margin-bottom: 18px;
}

.skd-item {
  height: 38px;
}

.skd-last {
  margin-top: auto;
}

.skel-main {
  flex: 1;
  min-width: 0;
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.sk-title {
  height: 32px;
  width: min(280px, 70%);
}

.sk-card {
  height: 96px;
}

/* El bloque grande crece hasta llenar la altura disponible del dispositivo */
.sk-block {
  flex: 1;
  min-height: 160px;
  max-height: 420px;
}

/* Las tarjetas se reacomodan solas según el ancho disponible */
.skel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

/* Móvil: la barra lateral se convierte en franja superior, como la app real */
@media (max-width: 760px) {
  .loading-screen {
    flex-direction: column;
  }

  .skel-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
  }

  .skd-logo {
    height: 46px;
    width: 110px;
    flex: none;
    margin-bottom: 0;
  }

  .skd-item {
    height: 30px;
    flex: 1;
  }

  .skel-side > :nth-child(n + 4) {
    display: none;
  }

  .skel-main {
    padding: 20px;
    gap: 16px;
  }

  .sk-card {
    height: 84px;
  }

  .skel-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* ── Transición de pestañas: entrada escalonada (diseño RID) ──
   Cada vez que una vista o sección del admin pasa a visible, sus bloques
   directos entran con fade-up en cascada. Mostrar/ocultar reinicia la
   animación, así que aplica en cada cambio de pestaña. */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.view.active > *,
.admin-section:not([hidden]) > * {
  animation: fade-up 0.4s ease both;
}

.view.active > *:nth-child(1),
.admin-section:not([hidden]) > *:nth-child(1) { animation-delay: 0.04s; }
.view.active > *:nth-child(2),
.admin-section:not([hidden]) > *:nth-child(2) { animation-delay: 0.1s; }
.view.active > *:nth-child(3),
.admin-section:not([hidden]) > *:nth-child(3) { animation-delay: 0.16s; }
.view.active > *:nth-child(4),
.admin-section:not([hidden]) > *:nth-child(4) { animation-delay: 0.22s; }
.view.active > *:nth-child(5),
.admin-section:not([hidden]) > *:nth-child(5) { animation-delay: 0.28s; }

@media (prefers-reduced-motion: reduce) {
  .loading-screen,
  .loading-screen .sk,
  .loading-screen .skd,
  .view.active > *,
  .admin-section:not([hidden]) > * {
    animation: none !important;
  }

  .loading-screen {
    opacity: 0;
    visibility: hidden;
  }
}

.sidebar {
  /* Pegada al viewport: la tarjeta de cuenta queda siempre abajo a la vista,
     sin subir ni bajar con el largo del contenido de la página. */
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  color: #ffffff;
  background: linear-gradient(165deg, var(--rid-red) 0%, var(--rid-red-darker) 100%);
  overflow: hidden auto;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.22) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 190px;
  height: auto;
  max-height: 72px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
}

.sidebar-logo {
  width: 220px;
  height: auto;
  max-height: 86px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: left center;
}

.brand-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
}

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

.login-brand .brand-logo {
  width: 250px;
  height: auto;
  max-height: 110px;
}

.login-brand {
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.login-brand-lockup {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.login-brand-lockup .brand-logo {
  width: min(270px, 72vw);
  height: auto;
  max-height: 96px;
  object-fit: contain;
}

.login-brand-lockup .brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  background: #13090c;
  border: 1px solid rgba(153, 27, 27, 0.18);
  border-radius: 16px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.login-brand-lockup .brand-seal img {
  display: block;
  width: 48px;
  height: 54px;
  object-fit: contain;
}

.login-brand-lockup .brand-type {
  display: grid;
  gap: 1px;
  line-height: 1;
  text-transform: uppercase;
}

.login-brand-lockup .brand-type strong {
  color: #cd2327;
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0;
}

.login-brand-lockup .brand-type small {
  color: #a67c52;
  font-size: 0.94rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
}

.login-brand-lockup .brand-subtitle {
  display: block;
  margin-top: 2px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

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

.brand strong,
.brand span,
.profile-card strong,
.profile-card span {
  display: block;
}

.brand span,
.profile-card span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.88rem;
}

.profile-card small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 800;
}

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

.nav-item {
  width: 100%;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.6);
  text-align: left;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-left-color: #ffffff;
  font-weight: 700;
  box-shadow: none;
  padding-left: 14px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 12px 4px;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
}

.profile-card-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-card-info strong {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.profile-card-info .profile-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card::before {
  content: attr(data-initials);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  color: #ffffff;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
}

.logout-action {
  width: 100%;
  min-height: 40px;
  margin-top: 8px;
  color: rgba(255, 180, 180, 0.85);
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0;
  font-weight: 600;
  font-size: 0.86rem;
  text-align: left;
  padding: 0 14px;
  transition: background 150ms ease, color 150ms ease;
}

.logout-action:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.page-context span {
  padding: 4px 11px;
  background: #f8f5f3;
  border: 1px solid var(--rid-cream-border);
  border-radius: 7px;
  font-weight: 600;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 4px;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.internal-clock {
  display: grid;
  min-width: 138px;
  min-height: 46px;
  align-content: center;
  padding: 10px 18px;
  text-align: right;
  background: #f8f5f3;
  border: 1px solid var(--rid-cream-border);
  border-radius: 10px;
}

.internal-clock span,
.internal-clock small {
  color: var(--rid-text-faint);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.internal-clock strong {
  font-size: 0.9rem;
}

.primary-action,
.ghost-action {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

.primary-action {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--rid-red);
  border: 1px solid var(--rid-red);
  box-shadow: 0 6px 18px -6px rgba(214, 43, 43, 0.55);
}

.primary-action::before {
  content: "";
  position: absolute;
  left: -8%;
  top: 0;
  width: 116%;
  height: 28%;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.88) 50%, transparent);
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
}

.primary-action:hover::before {
  opacity: 1;
  animation: ri-scan-line 1.1s ease-in-out infinite;
}

@keyframes ri-scan-line {
  0% { transform: translateY(-150%); opacity: 0; }
  8%, 92% { opacity: 1; }
  100% { transform: translateY(320%); opacity: 0; }
}

.primary-action:hover {
  background: var(--rid-red-dark);
  box-shadow: 0 8px 24px rgba(214, 43, 43, 0.38);
  transform: translateY(-1px);
}

.primary-action:active {
  transform: translateY(0);
  box-shadow: none;
}

.ghost-action {
  color: var(--rid-red);
  background: transparent;
  border: 1.5px solid var(--rid-red);
  font-size: 0.86rem;
  padding: 0 14px;
}

.ghost-action:hover {
  background: #fff5f5;
}

@media (prefers-reduced-motion: reduce) {
  .primary-action::before {
    animation: none !important;
  }
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--rid-cream-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.stats-bar {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #fff8f8);
  border: 1px solid #f5d0d0;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stats-header h2 {
  margin-top: 4px;
  font-size: 1.05rem;
}

.period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.period-tabs button {
  min-height: 28px;
  padding: 0 12px;
  color: var(--brand-dark);
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 999px;
  font-weight: 800;
}

.period-tabs button.active {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(126px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.stat-item {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 66px;
  align-content: center;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #f0d4d4;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease, border-color 150ms ease;
}

.stat-item:hover {
  box-shadow: var(--shadow);
  border-color: #e8c0c0;
}

.stat-item span,
.stat-item small,
.order-meta,
.result-meta,
.feature-grid span,
.panel p {
  color: var(--muted);
}

.stat-item strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 1.32rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-item .metric-short {
  font-size: 1.42rem;
  letter-spacing: 0;
}

.stat-item span,
.stat-item small {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-grid,
.future-layout,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 18px;
}

.content-grid > *,
.future-layout > *,
.profile-layout > *,
.dashboard-side {
  min-width: 0;
}

.dashboard-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.panel {
  min-width: 0;
  padding: 22px;
  overflow: hidden;
}

.panel.wide {
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-heading .eyebrow {
  color: var(--rid-red-dark);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.partner-panel {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(153, 27, 27, 0.92), rgba(220, 38, 38, 0.86)),
    var(--brand);
  border-color: rgba(254, 202, 202, 0.42);
}

.partner-panel .eyebrow,
.partner-panel h2,
.partner-panel strong,
.partner-panel span {
  color: #ffffff;
}

.partner-panel .panel-heading {
  margin-bottom: 14px;
}

.partner-badge {
  flex: 0 0 auto;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.partner-progress {
  display: grid;
  gap: 10px;
}

.partner-progress > div:first-child {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.partner-progress span,
.partner-progress strong {
  font-size: 0.82rem;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: #ffffff;
  border-radius: inherit;
  transition: width 220ms ease;
}

.partner-ladder {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.partner-ladder span {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 7px 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
}

.partner-ladder span.active {
  color: var(--brand-dark);
  background: #ffffff;
}

.partner-ladder small {
  color: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  opacity: 0.72;
}

.reward-stack {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.reward-stack article {
  display: grid;
  gap: 7px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.reward-stack span {
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.74;
  text-transform: uppercase;
}

.reward-stack strong {
  font-size: 0.9rem;
}

.reward-stack ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.reward-stack li {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.74rem;
  line-height: 1.25;
}

.benefit-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.partner-history {
  margin-top: 14px;
}

.partner-history-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.74;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #ffffff;
}

.partner-history ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner-history-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
}

.partner-history-patient {
  flex: 1 1 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.partner-history-meta {
  flex: 0 0 auto;
  font-size: 0.72rem;
  opacity: 0.7;
  color: #ffffff;
}

.partner-history-pts {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 8px;
}

.benefit-catalog article {
  display: grid;
  gap: 2px;
  min-height: 72px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.benefit-catalog article.active {
  background: rgba(255, 255, 255, 0.18);
}

.benefit-catalog strong,
.benefit-catalog span,
.benefit-catalog small {
  color: #ffffff;
}

.benefit-catalog strong {
  font-size: 0.78rem;
}

.benefit-catalog span,
.benefit-catalog small {
  font-size: 0.68rem;
  line-height: 1.2;
  opacity: 0.78;
}

.results-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.results-tab {
  padding: 9px 18px;
  border-radius: 9px;
  border: 1.5px solid var(--rid-cream-border-dark);
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rid-text-muted);
  cursor: pointer;
  transition: all 150ms ease;
}

.results-tab:hover:not(.active) {
  border-color: var(--rid-red);
  color: var(--rid-red);
}

.results-tab.active {
  background: var(--rid-red);
  border-color: var(--rid-red);
  color: #fff;
  box-shadow: 0 4px 14px -4px rgba(214, 43, 43, 0.45);
}

.results-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(110px, 0.72fr) 92px minmax(128px, max-content) minmax(96px, max-content);
  gap: 10px;
  padding: 0 14px 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--rid-cream-border);
}

.results-cols span {
  color: var(--rid-text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(128px, max-content) max-content;
  gap: 10px;
  padding: 0 14px 10px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--rid-cream-border);
}

.order-cols span {
  color: var(--rid-text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-cols span:last-child {
  min-width: 52px;
}

.order-patient {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.patient-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-family: 'Schibsted Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6a7280;
  background: #f0eeec;
}

.patient-avatar--recibida {
  color: #b01e1e;
  background: #fbe7e7;
}

.patient-avatar--agendada {
  color: #946c00;
  background: #fffbeb;
}

.patient-avatar--completa {
  color: #1a4fa0;
  background: #eff6ff;
}

.patient-avatar--lista-para-descargar {
  color: #1a7a4a;
  background: #e8f5ef;
}

.order-view-link {
  padding: 4px 6px;
  color: var(--rid-red);
  background: transparent;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color 150ms ease;
}

.order-view-link:hover {
  color: var(--rid-red-dark);
  text-decoration: underline;
}

.order-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rid-cream-border);
}

.order-pagination[hidden] {
  display: none;
}

.order-pagination-info {
  color: var(--rid-text-faint);
  font-size: 0.84rem;
}

.order-pagination-info strong {
  color: var(--rid-navy);
}

.order-pagination-controls {
  display: flex;
  gap: 5px;
}

.pg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--rid-cream-border);
  color: var(--rid-text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  transition: border-color 150ms ease, color 150ms ease;
}

.pg-btn:hover:not(:disabled):not(.pg-active) {
  border-color: var(--rid-red);
  color: var(--rid-red);
}

.pg-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.pg-btn.pg-active {
  background: var(--rid-red);
  border-color: var(--rid-red);
  color: #ffffff;
  font-weight: 700;
}

.result-row--done {
  opacity: 0.65;
}

.result-row--done .download-action {
  background: #e8e8e8;
  color: #999;
}

.empty-state-hint {
  text-align: center;
  color: #aaa;
  font-size: 0.88rem;
  padding: 32px 0;
}

.order-list,
.results-table,
.feature-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.results-table[hidden] {
  display: none;
}

.order-row,
.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(92px, 0.58fr) max-content max-content;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  padding: 14px;
  background: #f8f5f3;
  border: 1px solid var(--rid-cream-border);
  border-radius: 12px;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.order-row:hover,
.result-row:hover {
  background: #ffffff;
  border-color: var(--rid-red);
  box-shadow: 0 4px 18px -4px rgba(214, 43, 43, 0.13), 0 2px 8px -2px rgba(22, 32, 58, 0.08);
  transform: translateY(-2px);
}

.order-name,
.result-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-name strong,
.result-name strong,
.order-meta,
.result-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.status.recibida {
  color: #b01e1e;
  background: #fef1f1;
  border: 1px solid rgba(214, 43, 43, 0.18);
}

.status.recibida::before {
  background: #d62b2b;
  opacity: 1;
}

.status.agendada {
  color: #946c00;
  background: #fffbeb;
  border: 1px solid rgba(180, 130, 0, 0.18);
}

.status.agendada::before {
  background: #e9a800;
  opacity: 1;
}

.status.completa {
  color: #1a4fa0;
  background: #eff6ff;
  border: 1px solid rgba(30, 80, 200, 0.18);
}

.status.completa::before {
  background: #2a6fdb;
  opacity: 1;
}

.status.lista-para-descargar {
  color: #1a7a4a;
  background: #edfdf5;
  border: 1px solid rgba(30, 160, 80, 0.18);
}

.status.lista-para-descargar::before {
  background: #1fa85a;
  opacity: 1;
}

.status.cancelada,
.status.descargado {
  color: #8a8080;
  background: #f0eeec;
  border: 1px solid var(--rid-cream-border-dark);
}

.status.cancelada::before,
.status.descargado::before {
  background: #9a8a8a;
  opacity: 1;
}

.flow-diagram {
  position: relative;
  display: grid;
  gap: 0;
  padding: 6px 0;
}

.flow-diagram::before {
  position: absolute;
  top: 26px;
  bottom: 26px;
  left: 19px;
  width: 2px;
  content: "";
  background: linear-gradient(var(--brand), #f7b4b4);
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
}

.flow-step span {
  z-index: 1;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  color: #ffffff;
  background: var(--brand);
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 0 0 8px #ffffff;
}

.flow-step p {
  color: var(--ink);
  font-weight: 800;
}

.flow-step:not(:last-child) p {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 1180px) {
  .panel:not(.wide) .flow-diagram {
    gap: 2px;
  }
}

@media (max-width: 1240px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.order-form {
  display: grid;
  gap: 18px;
}

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

/* ── Photo section ── */
.profile-photo-section {
  display: grid;
  gap: 16px;
}

.profile-photo-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #f8f5f3;
  border: 2px dashed #e0d8d4;
  border-radius: 14px;
  transition: border-color 150ms ease, background 150ms ease;
}

.profile-photo-hero:hover,
.profile-photo-hero.dragover {
  border-color: var(--rid-red);
  background: #fff5f5;
}

.photo-hero-text {
  display: grid;
  gap: 10px;
}

.photo-upload-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ffffff;
  border: 2px solid var(--rid-red);
  border-radius: 999px;
  color: var(--rid-red);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  width: fit-content;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.photo-upload-pill:hover {
  background: var(--rid-red);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -6px rgba(214, 43, 43, 0.5);
}

.photo-upload-pill input {
  display: none;
}

.photo-drag-hint {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

.crop-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 20px;
  align-items: end;
  padding: 0 2px;
}

.crop-item {
  gap: 8px;
  font-size: 0.72rem;
  color: var(--rid-text-faint);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crop-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.crop-item-head em {
  color: var(--rid-red-dark);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.crop-item input[type="range"] {
  width: 100%;
  min-height: 28px;
  min-width: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  align-self: center;
  background: var(--rid-cream-border-dark);
  border: none;
  border-radius: 99px;
  outline: none;
  box-shadow: none;
}

.crop-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rid-red);
  box-shadow: 0 2px 8px -2px rgba(214, 43, 43, 0.5);
  transition: transform 150ms ease;
}

.crop-item input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.crop-item input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--rid-red);
  box-shadow: 0 2px 8px -2px rgba(214, 43, 43, 0.5);
}

.crop-item input[type="range"]:focus {
  box-shadow: none;
  border: none;
}

.crop-reset-btn {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.8rem;
  white-space: nowrap;
}

/* ── Divider ── */
.form-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.form-section-divider::before,
.form-section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Form grid ── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.form-grid > label,
.special-study-fields label,
.tomography-fields label {
  color: var(--rid-red-dark);
  font-size: 0.82rem;
}

input[readonly] {
  color: var(--rid-text-muted);
  background: #f0eceb;
}

label[hidden] {
  display: none;
}

.full {
  grid-column: 1 / -1;
}

label[data-clinic-only][hidden] {
  display: none;
}

.required-star {
  color: var(--brand);
  font-weight: 900;
}

.field-error {
  display: none;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
}

.field-error.visible {
  display: flex;
}

.field-error::before {
  content: "⚠";
  flex-shrink: 0;
  font-size: 0.8rem;
}

input.field-invalid {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  color: var(--ink);
  background: #f8f7f6;
  border: 1.5px solid var(--rid-cream-border-dark);
  border-radius: 10px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%239A8A8A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #b0a8a8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rid-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(214, 43, 43, 0.1);
}

.study-grid {
  display: grid;
  gap: 18px;
}

.study-category {
  display: grid;
  gap: 10px;
}

.study-category h3 {
  margin: 0;
  color: var(--rid-red-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.study-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.study-option {
  position: relative;
  padding: 14px;
  background: #ffffff;
  border: 1.5px solid var(--rid-cream-border);
  border-radius: 12px;
  transition: background 150ms ease, border-color 150ms ease;
}

.study-option:hover {
  border-color: #d4c8c4;
}

.study-option:has(input:checked),
.special-study-option:has(input:checked),
.tomography-option:has(input:checked) {
  border-color: var(--rid-red);
  background: #fff8f8;
}

.study-option > input,
.special-study-option > label > input,
.tomography-option > label > input {
  position: absolute;
  inset: 14px 14px auto auto;
  width: 18px;
  min-height: 18px;
  appearance: none;
  margin: 0;
  border-radius: 5px;
  border: 2px solid #d0c8c4;
  background: #ffffff;
  flex: none;
  transition: all 150ms ease;
}

.study-option > input:checked,
.special-study-option > label > input:checked,
.tomography-option > label > input:checked {
  background: var(--rid-red);
  border-color: var(--rid-red);
}

.study-option > input:checked::after,
.special-study-option > label > input:checked::after,
.tomography-option > label > input:checked::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.study-option strong,
.study-option span {
  display: block;
  padding-right: 28px;
}

.study-option span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.special-study-option,
.tomography-option {
  grid-column: 1 / -1;
  position: relative;
  padding: 18px 20px;
  background: #ffffff;
  border: 1.5px solid var(--rid-cream-border);
  border-radius: 12px;
  transition: border-color 150ms ease;
}

.special-study-option > label,
.tomography-option > label {
  display: block;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.orthodontic-option {
  background: #ffffff;
}

.special-study-fields,
.tomography-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.special-study-fields[hidden],
.tomography-fields[hidden] {
  display: none;
}

.special-study-fields label,
.tomography-fields label {
  font-size: 0.82rem;
}

.package-includes {
  grid-column: 1 / -1;
  padding: 12px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.package-includes span {
  display: block;
  padding-right: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
}

.package-includes ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.84rem;
}

.orthodontic-instructions {
  grid-column: 1 / -1;
}

.orthodontic-instructions textarea {
  min-height: 92px;
}

.nested-fields {
  grid-column: 1 / -1;
}

.form-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  bottom: 0;
  padding: 18px 24px;
}

.form-summary h2 {
  color: var(--rid-navy);
}

.search-field {
  max-width: 280px;
}

.result-row {
  grid-template-columns: minmax(0, 1.35fr) minmax(110px, 0.72fr) 92px minmax(128px, max-content) minmax(96px, max-content);
}

.order-row {
  grid-template-columns: minmax(0, 1fr) 96px minmax(128px, max-content) max-content;
}

.result-date {
  font-size: 0.84rem;
}

.download-action,
.small-action {
  min-height: 36px;
  padding: 0 12px;
  color: var(--brand);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.download-action:hover,
.small-action:hover {
  background: #fff5f5;
  border-color: #fecaca;
}

.download-action.ready {
  color: #ffffff;
  background: var(--rid-red);
  border-color: var(--rid-red);
}

.download-action.ready:hover {
  background: var(--rid-red-dark);
  border-color: var(--rid-red-dark);
  box-shadow: 0 6px 16px -6px rgba(214, 43, 43, 0.5);
  transform: translateY(-1px);
}

.download-action:disabled {
  color: #b0a8a4;
  background: #f0eceb;
  border-color: var(--rid-cream-border-dark);
  cursor: default;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid article {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-card {
  padding: 0;
  overflow: hidden;
}

.preview-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 22px 20px;
  background: linear-gradient(135deg, var(--rid-red) 0%, var(--rid-red-darker) 100%);
  overflow: hidden;
}

.preview-hero::before {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.preview-hero > * {
  position: relative;
  z-index: 1;
}

.preview-avatar {
  width: 72px !important;
  height: 72px !important;
  font-size: 1.5rem !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.preview-identity {
  text-align: center;
}

.preview-identity h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.preview-identity p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.84rem;
  margin: 0;
}

.preview-details {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px 20px 14px;
}

.avatar {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background: var(--brand);
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 900;
}

.editable-avatar {
  width: 108px;
  height: 108px;
  flex: 0 0 108px;
  border-radius: 14px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--rid-red), var(--rid-red-darker));
  box-shadow: 0 4px 16px -4px rgba(214, 43, 43, 0.45);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate(var(--photo-translate-x, 0%), var(--photo-translate-y, 0%)) scale(var(--photo-zoom, 1));
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
}

.editable-avatar {
  cursor: grab;
  touch-action: none;
}

.editable-avatar.dragging {
  cursor: grabbing;
}

.preview-details div {
  padding: 12px 0;
  border-bottom: 1px solid var(--rid-cream-border);
  border-radius: 8px;
  transition: background 150ms ease, padding-left 150ms ease;
}

.preview-details div:last-child {
  border-bottom: none;
}

.preview-details div:hover {
  background: #f8f5f3;
  padding-left: 8px;
}

.preview-details dt {
  color: var(--rid-text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.preview-details dd {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--rid-navy);
  overflow-wrap: anywhere;
}

.security-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.security-row strong {
  display: block;
  color: var(--rid-navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.security-row span {
  display: block;
  margin-top: 2px;
  color: var(--rid-text-faint);
  font-size: 0.78rem;
}

.security-change-btn {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.security-divider {
  height: 1px;
  background: #f0ece9;
}

.security-password-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8f5f3;
  border: 1px solid var(--rid-cream-border);
  border-radius: 12px;
}

.security-password-form[hidden] {
  display: none;
}

.security-password-form label {
  color: var(--rid-red-dark);
  font-size: 0.78rem;
}

.switch {
  position: relative;
  display: inline-flex;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch-track {
  display: block;
  width: 40px;
  height: 22px;
  background: var(--rid-cream-border-dark);
  border-radius: 999px;
  transition: background 150ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease;
}

.switch input:checked + .switch-track {
  background: var(--rid-red);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--rid-red);
  outline-offset: 2px;
}

.clinic-team-card {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.clinic-team-card[hidden] {
  display: none;
}

.clinic-team-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clinic-team-list li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rid-cream-border);
  color: var(--rid-navy);
  font-size: 0.9rem;
  font-weight: 600;
}

.clinic-team-list li:last-child {
  border-bottom: none;
}

.clinic-team-list .clinic-team-empty {
  color: var(--rid-text-faint);
  font-weight: 500;
}

.clinic-team-hint {
  color: var(--rid-text-faint);
  font-size: 0.78rem;
  line-height: 1.5;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  color: #ffffff;
  background: var(--brand-dark);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.2s ease;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(29, 38, 48, 0.48);
}

.modal-backdrop[hidden] {
  display: none;
}

.order-modal {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(29, 38, 48, 0.25);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.icon-action {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--brand);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: 800;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.modal-main {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-main h3 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-main p,
.modal-notes p {
  color: var(--muted);
}

.order-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.order-detail-list div,
.modal-notes {
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-detail-list dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.order-detail-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

@media (max-width: 980px) {
  .workspace {
    padding: 20px;
  }

  .topbar,
  .form-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-grid,
  .future-layout,
  .profile-layout,
  .study-category-grid,
  .tomography-fields {
    grid-template-columns: 1fr;
  }

  .results-cols,
  .order-cols,
  .result-date {
    display: none;
  }

  .result-row {
    grid-template-columns: minmax(0, 1.35fr) minmax(110px, 0.72fr) minmax(128px, max-content) minmax(96px, max-content);
  }

  .stats-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-item {
    min-height: 66px;
  }
}

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

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
  }

  .nav-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-item {
    text-align: center;
  }

  .profile-card {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar-actions,
  .internal-clock {
    width: 100%;
  }

  .primary-action,
  .ghost-action {
    flex: 1;
  }

  .form-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .profile-photo-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .crop-panel {
    grid-template-columns: 1fr 1fr;
  }

  .crop-panel .crop-reset-btn {
    grid-column: 1 / -1;
  }

  .order-row,
  .result-row {
    grid-template-columns: 1fr;
  }

  .results-cols,
  .order-cols {
    display: none;
  }

  .package-includes ul {
    grid-template-columns: 1fr;
  }

  .order-detail-list {
    grid-template-columns: 1fr;
  }

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

.public-site {
  background: #ffffff;
}

.mobile-branch-shortcuts {
  display: none;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 94px;
  padding: 8px clamp(18px, 3vw, 42px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.public-nav .brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.public-nav .brand-logo {
  display: block;
  width: clamp(250px, 20vw, 340px);
  height: 82px;
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}

.public-nav .brand-seal {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: #13090c;
  border: 1px solid rgba(153, 27, 27, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}

.public-nav .brand-seal img {
  display: block;
  width: 37px;
  height: 42px;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.public-nav .brand-type {
  display: grid;
  gap: 1px;
  line-height: 1;
  text-transform: uppercase;
}

.public-nav .brand-type strong {
  color: #cd2327;
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0;
}

.public-nav .brand-type small {
  color: #a67c52;
  font-size: 0.72rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
}

.public-nav nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.public-nav nav a {
  padding: 7px 9px;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.public-nav nav a:hover {
  color: var(--brand);
  background: #fff5f5;
}

.public-nav .primary-action,
.public-hero-actions .primary-action,
.public-hero-actions .ghost-action,
.partner-summary-card .primary-action,
.branch-grid .ghost-action,
.public-cta .primary-action,
.public-cta .ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.public-nav .primary-action {
  flex: 0 0 auto;
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 800;
}

.public-hero-actions .primary-action,
.public-hero-actions .ghost-action {
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.9rem;
  font-weight: 800;
}

.public-hero-actions,
.public-cta div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-hero .ghost-action {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.42);
}

.whatsapp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 42px;
  min-height: 40px;
  padding: 9px 13px;
  color: #ffffff;
  background: #25d366;
  border: 1px solid #25d366;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.whatsapp-action:hover {
  background: #1fb85a;
  border-color: #1fb85a;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.28);
  transform: translateY(-1px);
}

.whatsapp-symbol {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.whatsapp-symbol::before {
  content: "☎";
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(12deg);
}

.whatsapp-symbol::after {
  position: absolute;
  right: 1px;
  bottom: -2px;
  width: 7px;
  height: 7px;
  background: inherit;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(28deg);
}

.whatsapp-icon-only {
  width: 42px;
  padding: 0;
}

.public-band,
.public-section,
.public-split,
.public-cta {
  padding: clamp(30px, 5vw, 62px) clamp(18px, 4vw, 54px);
}

.public-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background: #fff5f5;
  border-bottom: 1px solid #fee2e2;
}

.public-metrics article,
.service-grid article,
.benefit-list article,
.tier-grid article,
.branch-grid article {
  display: grid;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.service-grid article:hover,
.benefit-list article:hover,
.tier-grid article:hover,
.branch-grid article:hover {
  box-shadow: var(--shadow);
  border-color: #d1d5db;
}

.public-metrics article {
  min-height: 102px;
  align-content: center;
  padding: 16px;
}

.public-metrics span,
.public-metrics small {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.public-metrics strong {
  color: var(--brand-dark);
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  line-height: 1.05;
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 840px;
  margin-bottom: 24px;
}

.section-heading h2,
.public-split h2,
.public-cta h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-grid article,
.tier-grid article,
.branch-grid article {
  align-content: start;
  min-height: 230px;
  padding: 20px;
}

.service-card-img {
  width: calc(100% + 40px);
  height: 160px;
  margin: -20px -20px 16px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

.public-split-img {
  width: 100%;
  max-width: 560px;
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}

.service-grid article > span,
.tier-grid article > span {
  width: fit-content;
  padding: 6px 9px;
  color: var(--brand-dark);
  background: #fee2e2;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.service-grid p,
.benefit-list p,
.partner-summary-card p,
.branch-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.public-split {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 26px;
  background: linear-gradient(135deg, #ffffff, #fff5f5);
  border-block: 1px solid #fee2e2;
}

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

.benefit-list article {
  padding: 18px;
}

.doctor-benefits {
  background: #f8fafc;
}

.doctor-benefit-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  gap: 18px;
}

.partner-summary-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 24px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(153, 27, 27, 0.94), rgba(220, 38, 38, 0.84)),
    var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.partner-summary-card span,
.partner-summary-card strong,
.partner-summary-card p {
  color: #ffffff;
}

.partner-summary-card strong {
  font-size: 2rem;
  line-height: 1;
}

.partner-summary-card .primary-action {
  width: fit-content;
  color: var(--brand);
  background: #ffffff;
  border-color: #ffffff;
}

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

.tier-grid ul {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.35;
}

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

.branch-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 1120px;
}

.branch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.branch-grid small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
}

.branch-grid h3 {
  font-size: 1.18rem;
  line-height: 1.15;
}

.branch-grid p {
  font-size: 0.9rem;
}

.public-cta p {
  max-width: 600px;
  margin: 0 auto 6px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.public-footer {
  display: grid;
  gap: 28px;
  padding: clamp(28px, 4vw, 54px) clamp(18px, 4vw, 54px);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
}

.footer-brand .brand-logo {
  width: 220px;
  max-height: 78px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-cols div {
  display: grid;
  gap: 6px;
  align-content: start;
}

.footer-cols strong {
  color: #ffffff;
  font-size: 0.88rem;
}

.footer-cols span,
.footer-cols a {
  font-size: 0.82rem;
  line-height: 1.4;
}

.footer-cols a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 150ms ease;
}

.footer-cols a:hover {
  color: #ffffff;
}

.footer-copy {
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
}

@media (max-width: 680px) {
  .footer-cols {
    grid-template-columns: 1fr;
  }

  .branch-grid-2 {
    grid-template-columns: 1fr;
  }
}

.branch-grid dl {
  display: grid;
  gap: 4px;
  margin: 8px 0;
}

.branch-grid dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.branch-grid dt {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.branch-grid dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: right;
}

.branch-grid .ghost-action,
.branch-grid .whatsapp-action,
.public-cta .ghost-action {
  width: fit-content;
}

.branch-grid .ghost-action,
.branch-grid .whatsapp-action {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.branch-grid .whatsapp-icon-only {
  width: 38px;
  padding: 0;
}

.public-cta {
  display: grid;
  gap: 16px;
  color: #ffffff;
  background: var(--premium);
}

.public-cta .eyebrow,
.public-cta h2 {
  color: #ffffff;
}

.public-cta h2 {
  max-width: 920px;
}

.public-cta .ghost-action {
  color: #ffffff;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.34);
}

@media (max-width: 980px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-metrics,
  .service-grid,
  .branch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-split,
  .doctor-benefit-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .public-nav {
    align-items: stretch;
    gap: 12px;
    min-height: auto;
    padding: 12px 16px;
  }

  .public-nav .brand {
    justify-content: center;
  }

  .public-nav .brand-logo {
    width: min(320px, 84vw);
    height: 86px;
    max-height: 86px;
    object-position: center;
  }

  .public-nav nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
  }

  .public-nav nav a {
    padding: 8px 4px;
    font-size: 0.72rem;
    text-align: center;
  }

  .public-nav .primary-action {
    width: 100%;
  }

  .public-hero {
    min-height: 520px;
    padding: 28px 18px;
    align-items: end;
    background-position: 62% center;
  }

  .public-hero h1 {
    max-width: 11ch;
    font-size: 3rem;
    line-height: 0.96;
  }

  .public-hero p {
    font-size: 0.96rem;
    line-height: 1.5;
  }

  .public-hero-actions .whatsapp-action {
    display: none;
  }

  .mobile-branch-shortcuts {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    background: #fff5f5;
    border-bottom: 1px solid #fee2e2;
  }

  .mobile-branch-shortcuts article {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #fee2e2;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
  }

  .mobile-branch-shortcuts span {
    color: var(--brand-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-branch-shortcuts strong {
    color: var(--ink);
    font-size: 0.92rem;
    line-height: 1.25;
  }

  .mobile-shortcut-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .mobile-shortcut-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 6px;
    color: var(--brand-dark);
    background: #ffffff;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
  }

  .mobile-shortcut-actions .mobile-whatsapp {
    color: #ffffff;
    background: #25d366;
    border-color: #25d366;
  }

  .public-band,
  .public-section,
  .public-split,
  .public-cta {
    padding: 28px 16px;
  }

  .public-metrics,
  .service-grid,
  .benefit-list,
  .tier-grid,
  .branch-grid {
    grid-template-columns: 1fr;
  }

  .partner-summary-card .primary-action,
  .branch-grid .ghost-action,
  .branch-grid .whatsapp-action,
  .public-cta .primary-action,
  .public-cta .ghost-action {
    width: 100%;
  }

  .public-metrics {
    gap: 8px;
  }

  .public-metrics article {
    min-height: auto;
    padding: 14px;
  }

  .public-metrics strong {
    font-size: 1.55rem;
  }

  .service-grid article,
  .tier-grid article,
  .branch-grid article {
    min-height: auto;
    padding: 16px;
  }

  .service-card-img {
    width: calc(100% + 32px);
    height: 140px;
    margin: -16px -16px 14px;
  }

  .branch-grid dl div {
    display: grid;
    gap: 4px;
  }

  .branch-actions {
    display: grid;
    grid-template-columns: 1fr 42px 1fr;
    align-items: center;
  }
}

/* Doctor login redesign */
.login-screen {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  place-items: stretch;
  min-height: 100vh;
  padding: 0;
  background: #faf6f4;
}

.login-panel {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 100vh;
  gap: 26px;
  align-content: space-between;
  padding: 44px 40px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 255, 255, 0.14), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.24), transparent 36%),
    linear-gradient(145deg, #d62b2b 0%, #8b0e13 100%);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.login-panel::after {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-position: 0 0, 0 0;
  background-repeat: repeat;
  background-size: 36px 36px;
  pointer-events: none;
}

.login-panel > * {
  position: relative;
  z-index: 1;
}

.login-brand.login-brand-lockup {
  align-items: flex-start;
  justify-content: flex-start;
}

.login-brand.login-brand-lockup .brand-logo,
.login-panel .brand-logo {
  width: auto;
  height: 130px;
  max-height: none;
  max-width: 260px;
  object-fit: contain;
}

.login-panel .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.login-panel .login-copy {
  max-width: 330px;
  align-self: center;
}

.login-panel .login-copy h1,
.login-panel .login-copy p,
.login-panel .login-brand span {
  color: #ffffff;
}

.login-panel .login-copy h1 {
  font-size: clamp(1.9rem, 3vw, 2.3rem);
  line-height: 1.04;
}

.login-panel .login-copy p {
  color: rgba(255, 255, 255, 0.7);
}

.login-trust {
  display: grid;
  gap: 10px;
}

.login-trust span {
  position: relative;
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  color: rgba(255, 255, 255, 0.86);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 700;
}

.login-trust-icon {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 8px;
}

.login-trust-icon svg {
  width: 16px;
  height: 16px;
}

.login-branches-label {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-branches {
  display: grid;
  gap: 8px;
}

.login-branches a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}

.login-branches a:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
}

.login-branch-icon {
  display: grid;
  flex: none;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #25d366;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.login-branch-icon svg {
  width: 15px;
  height: 15px;
}

.login-branch-info {
  display: grid;
  gap: 2px;
}

.login-branches span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
}

.login-showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: none;
  align-items: center;
  padding: 52px clamp(28px, 4vw, 64px);
  background: #faf6f4;
}

.login-showcase::before,
.login-showcase::after {
  display: none;
}

.login-showcase > * {
  width: min(100%, 500px);
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 24px;
  color: #8a8080;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.login-back-link::before {
  content: "←";
  font-size: 1rem;
}

.login-card {
  display: grid;
  width: min(100%, 500px);
  padding: clamp(28px, 4vw, 44px);
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 30px 60px -30px rgba(22, 32, 58, 0.25), 0 8px 24px -12px rgba(22, 32, 58, 0.12);
}

.login-card .login-copy {
  gap: 12px;
  margin-bottom: 30px;
}

.login-card .login-copy h1 {
  color: #16203a;
  font-size: clamp(2rem, 3vw, 2.45rem);
  line-height: 1.04;
}

.login-card .login-copy p {
  color: #6a7280;
}

.login-form {
  gap: 18px;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: #16203a;
  font-size: 0.86rem;
  font-weight: 800;
}

.login-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.login-forgot-link {
  color: #d62b2b;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

.login-forgot-link:hover {
  text-decoration: underline;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  color: #16203a;
  background: #f8f7f6;
  border: 1.5px solid #e6e2df;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.login-form input:focus {
  background: #ffffff;
  border-color: #d62b2b;
  box-shadow: 0 0 0 3px rgba(214, 43, 43, 0.11);
}

.login-form .primary-action {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 8px;
  box-shadow: 0 12px 26px -12px rgba(214, 43, 43, 0.65);
}

.login-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0 14px;
  color: #a8a0a0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: #e9e2df;
}

.login-divider span {
  padding: 0 12px;
}

.login-note {
  margin: 0;
  color: #6a7280;
  font-size: 0.86rem;
  text-align: center;
}

.login-note a {
  color: #d62b2b;
  font-weight: 800;
  text-decoration: none;
}

.login-note a:hover {
  text-decoration: underline;
}

.login-legal {
  margin: 8px 0 0;
  color: #a8a0a0;
  font-size: 0.76rem;
  text-align: center;
}

.login-legal a {
  color: #8a8080;
  text-decoration: underline;
}

@media (max-width: 980px) {
  .login-screen {
    grid-template-columns: 1fr;
    min-height: 100vh;
    background: linear-gradient(145deg, #d62b2b 0%, #8b0e13 100%);
  }

  .login-panel {
    min-height: auto;
    gap: 18px;
    justify-items: center;
    padding: 28px 22px 20px;
    text-align: center;
  }

  .login-brand.login-brand-lockup {
    justify-items: center;
    justify-content: center;
    align-items: center;
  }

  .login-panel .login-copy {
    max-width: 620px;
    justify-items: center;
  }

  .login-panel .eyebrow {
    margin: 0 auto;
  }

  .login-trust {
    justify-items: center;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .login-trust span {
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
  }

  .login-branches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-branches-label {
    grid-column: 1 / -1;
  }

  .login-branches a {
    justify-content: center;
    text-align: center;
  }

  .login-showcase {
    padding: 34px 22px 42px;
  }
}

@media (max-width: 680px) {
  .login-panel {
    padding: 22px 16px 18px;
  }

  .login-brand.login-brand-lockup .brand-logo,
  .login-panel .brand-logo {
    height: 180px;
    max-height: none;
  }

  .login-panel .login-copy h1,
  .login-showcase .login-copy h1 {
    font-size: 1.85rem;
  }

  .login-trust,
  .login-branches {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    padding: 28px 16px 34px;
  }

  .login-back-link {
    margin-bottom: 26px;
  }
}

/* ── Consulta plus: registro de interés ── */
.feature-grid article .plus-interest-action {
  margin-top: 10px;
  justify-self: start;
}

.plus-interest-action:disabled {
  opacity: 0.65;
  cursor: default;
}

.plus-interest-summary {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.plus-interest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
}

.plus-interest-summary small {
  color: var(--muted);
  font-weight: 700;
}
