/* ============================================================
   NUEVA EPS — Design System
   Fiel al diseño de las imágenes de referencia
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --c-primary:       #4698CA;
  --c-primary-d:     #3a7dae;
  --c-primary-l:     #e8f4fb;
  --c-red:           #C0392B;
  --c-bg:            #F0F2F5;
  --c-white:         #FFFFFF;
  --c-text-1:        #2C2C2C;
  --c-text-2:        #666666;
  --c-text-3:        #999999;
  --c-border:        #DDDDDD;
  --c-disabled-bg:   #C8CDD4;
  --c-disabled-text: #FFFFFF;
  --c-success:       #27AE60;
  --c-success-l:     #eafaf1;
  --c-orange:        #E8952A;
  --c-teal:          #4ECDC4;

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  --shadow-xs:  0 1px 3px rgba(0,0,0,.08);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-nav: 0 -1px 8px rgba(0,0,0,.10);
  --shadow-card:0 3px 12px rgba(0,0,0,.10);
  --shadow-modal:0 -6px 24px rgba(0,0,0,.18);

  --nav-h:  62px;
  --hdr-h:  54px;
  --btn-h:  52px;
  --input-h:52px;

  --font-base: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}
body {
  font-family: var(--font-base);
  background: #F0F2F5;
  color: var(--c-text-1);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100dvh;
  min-height: 100vh;
  /* Cubrir safe-areas en dispositivos con notch/bordes curvos */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
button { font-family: var(--font-base); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font-base); outline: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
svg { flex-shrink: 0; }

/* ── App Shell ──────────────────────────────────────────────── */
#app {
  width: 100%;
  min-height: 100dvh;
  min-height: 100vh;
  position: relative;
  background: var(--c-bg);
  overflow-x: hidden;
}
#screen-root { width: 100%; }
#overlay-root { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
#overlay-root.active { pointer-events: all; }
#toast-root {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 950;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(90vw, 400px);
}

/* ── Logo ───────────────────────────────────────────────────── */
.logo { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.logo__word {
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -1px;
  line-height: 1;
  font-size: 44px;
  display: flex;
  align-items: flex-end;
}
.logo__v {
  position: relative;
  display: inline-block;
  color: var(--c-red);
}
.logo__dot {
  display: block;
  width: 11px;
  height: 11px;
  background: var(--c-red);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
}
.logo__eps {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary);
  margin-top: -3px;
  letter-spacing: 0.5px;
}
/* Size modifiers */
.logo--lg .logo__word { font-size: 58px; }
.logo--lg .logo__dot  { width: 15px; height: 15px; top: 2px; }
.logo--lg .logo__eps  { font-size: 27px; margin-top: -3px; }

.logo--sm .logo__word { font-size: 28px; letter-spacing: -0.5px; }
.logo--sm .logo__dot  { width: 7px; height: 7px; top: 1px; }
.logo--sm .logo__eps  { font-size: 13px; margin-top: -2px; }

.logo--xs .logo__word { font-size: 22px; letter-spacing: -0.5px; }
.logo--xs .logo__dot  { width: 6px; height: 6px; top: 1px; }
.logo--xs .logo__eps  { font-size: 11px; margin-top: -1px; }

/* ── Auth Layout (login, tutorial, welcome) ─────────────────── */
.auth-page {
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
}
.auth-page__back {
  padding: 12px 16px 0;
  height: 48px;
  display: flex;
  align-items: center;
}
.auth-page__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
}
.auth-page__logo-wrap {
  display: flex;
  justify-content: center;
  padding: 48px 0 44px;
}
.auth-page__label {
  font-size: 15px;
  color: var(--c-text-2);
  margin-bottom: 20px;
}
.auth-page__spacer { flex: 1; }
.auth-page__btn-area {
  padding: 0 0 16px;
}
.auth-page__footer-link {
  display: flex;
  justify-content: center;
  padding-bottom: 8px;
}
.auth-page__footer-link a,
.auth-page__footer-link button {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  background: none;
  border: none;
  cursor: pointer;
  width: auto;
  display: inline;
  padding: 0;
  height: auto;
}

/* ── Pre-login Footer ───────────────────────────────────────── */
.preauth-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-bg);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0 max(12px, env(safe-area-inset-bottom));
}
.preauth-footer__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-2);
  font-size: 11px;
  font-family: var(--font-base);
  font-weight: 600;
  padding: 4px 16px;
  transition: color .15s;
}
.preauth-footer__item:hover,
.preauth-footer__item:focus { color: var(--c-primary); outline: none; }
.preauth-footer__item svg { color: var(--c-text-3); }
.preauth-footer__item:hover svg,
.preauth-footer__item:focus svg { color: var(--c-primary); }

/* ── Form Controls ──────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.auth-page .form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 6px;
}
.form-input {
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--input-h);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 0 14px;
  font-size: 15px;
  color: var(--c-text-1);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(70,152,202,.15); }
.form-input input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font-base);
  color: var(--c-text-1);
  height: 100%;
}
.form-input input::placeholder { color: var(--c-text-3); }
.form-input__icon { color: var(--c-text-3); }
.form-input__action { background: none; border: none; cursor: pointer; color: var(--c-text-3); padding: 4px; transition: color .15s; }
.form-input__action:hover { color: var(--c-text-2); }

/* Custom select trigger */
.select-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  height: var(--input-h);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  padding: 0 14px;
  font-size: 15px;
  color: var(--c-text-3);
  cursor: pointer;
  transition: border-color .2s;
  font-family: var(--font-base);
}
.auth-page .select-trigger,
.auth-page .form-input {
  border-radius: var(--r-lg);
  height: 56px;
  font-size: 16px;
}
.select-trigger.has-value { color: var(--c-text-1); }
.select-trigger:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(70,152,202,.15); }
.select-trigger__text { flex: 1; text-align: left; }
.select-trigger__icon { color: var(--c-text-3); }

/* Error state */
.form-input.error { border-color: var(--c-red); }
.form-error { font-size: 12px; color: var(--c-red); margin-top: 4px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: var(--btn-h);
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-base);
  cursor: pointer;
  border: none;
  transition: background .18s, opacity .18s, transform .1s;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(.98); }
.btn:focus { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.btn--primary { background: var(--c-primary); color: var(--c-white); }
.btn--primary:hover:not(:disabled) { background: var(--c-primary-d); }
.btn--disabled,
.btn:disabled { background: var(--c-disabled-bg); color: var(--c-white); cursor: not-allowed; transform: none; }

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--c-primary);
  color: var(--c-primary);
}
.btn--outline:hover:not(:disabled) { background: var(--c-primary-l); }

.btn--text {
  background: none;
  color: var(--c-primary);
  height: auto;
  width: auto;
  font-weight: 600;
  font-size: 14px;
}

.btn--sm { height: 38px; font-size: 14px; border-radius: var(--r-xs); }
.btn--icon-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-border);
  color: var(--c-text-2);
  font-size: 13px;
  font-weight: 600;
}

/* Spinner inside button */
.btn__spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Back Button ────────────────────────────────────────────── */
.back-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--c-primary);
  border-radius: var(--r-full);
  transition: background .15s;
}
.back-btn:hover { background: var(--c-primary-l); }
.back-btn:focus { outline: 2px solid var(--c-primary); }

/* ── Authenticated Layout ───────────────────────────────────── */
.app-page {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  padding-bottom: var(--nav-h);
}
.app-page__content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Top header with back arrow */
.page-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 8px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.page-header__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-text-1);
}
.page-header--transparent { background: transparent; border-bottom: none; }

/* Home header (logo center) */
.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.home-header__btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: none; border: none; cursor: pointer;
  color: var(--c-text-2);
  transition: background .15s, color .15s;
}
.home-header__btn:hover { background: var(--c-primary-l); color: var(--c-primary); }

/* ── Page content areas ─────────────────────────────────────── */
.page-body { padding: 20px 20px 32px; }
.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: 20px;
  line-height: 1.2;
}
.section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-2);
  margin-bottom: 12px;
}

/* ── Bottom Tab Bar ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: var(--c-white);
  box-shadow: var(--shadow-nav);
  display: flex;
  align-items: stretch;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-3);
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-base);
  padding: 6px 4px 4px;
  transition: color .15s;
  position: relative;
}
.bottom-nav__item.active { color: var(--c-primary); }
.bottom-nav__item:focus { outline: none; }
.bottom-nav__item:focus-visible::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2px solid var(--c-primary);
  border-radius: var(--r-sm);
}

/* ── Recientes Cards ────────────────────────────────────────── */
.recientes-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.recientes-scroll::-webkit-scrollbar { display: none; }
.recientes-card {
  flex-shrink: 0;
  width: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-base);
}
.recientes-card__img {
  width: 160px;
  height: 140px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-border);
  position: relative;
}
.recientes-card__img img { width: 100%; height: 100%; object-fit: cover; }
.recientes-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recientes-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  text-align: center;
}

/* ── Service List Items ─────────────────────────────────────── */
.service-list { }
.service-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  font-family: var(--font-base);
  text-align: left;
  transition: background .15s;
}
.service-item:last-child { border-bottom: none; }
.service-item:hover { background: var(--c-primary-l); border-radius: var(--r-sm); }
.service-item__thumb {
  width: 76px; height: 76px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--c-border);
}
.service-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-item__name { font-size: 15px; color: var(--c-text-2); font-weight: 500; flex: 1; }
.service-item__chevron { color: var(--c-text-3); flex-shrink: 0; }

/* Menu list items (arrow style) */
.menu-list { }
.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  font-family: var(--font-base);
  text-align: left;
  transition: background .15s;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: var(--c-primary-l); border-radius: var(--r-sm); padding-left: 8px; }
.menu-item__label { font-size: 15px; color: var(--c-text-2); font-weight: 500; }
.menu-item__chevron { color: var(--c-primary); }

/* ── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 16px;
}
.empty-state__icon { color: var(--c-text-3); opacity: .7; }
.empty-state__text { font-size: 14px; color: var(--c-text-2); line-height: 1.5; max-width: 260px; }
.empty-state__btn { margin-top: 8px; }

/* ── Tabs ───────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 20px;
}
.tab-item {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text-3);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-family: var(--font-base);
  transition: color .2s, border-color .2s;
  margin-bottom: -1px;
}
.tab-item.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tab-item:focus { outline: none; }

/* ── Bottom Sheet ───────────────────────────────────────────── */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 800;
  opacity: 0;
  transition: opacity .25s;
}
.sheet-backdrop.visible { opacity: 1; }

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 480px;
  background: var(--c-white);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 810;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-sheet.visible { transform: translateX(-50%) translateY(0); }
.bottom-sheet__handle {
  width: 36px; height: 4px;
  background: var(--c-border);
  border-radius: var(--r-full);
  margin: 12px auto 8px;
  flex-shrink: 0;
}
.bottom-sheet__list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.sheet-option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  border: none;
  background: none;
  font-size: 15px;
  font-family: var(--font-base);
  color: var(--c-text-1);
  text-align: left;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--c-bg);
}
.sheet-option:last-child { border-bottom: none; }
.sheet-option:hover { background: var(--c-primary-l); }
.sheet-option.selected { color: var(--c-primary); font-weight: 700; }
.sheet-option__check { margin-left: auto; color: var(--c-primary); }

/* ── Modal Overlay ──────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.50);
  z-index: 850;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .2s;
}
.modal-backdrop.visible { opacity: 1; }
.modal {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-card);
  transform: scale(.95);
  transition: transform .2s;
}
.modal-backdrop.visible .modal { transform: scale(1); }
.modal__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: 10px;
  line-height: 1.3;
}
.modal__body { font-size: 14px; color: var(--c-text-2); line-height: 1.5; margin-bottom: 20px; }
.modal__actions { display: flex; gap: 10px; }
.modal__actions .btn { flex: 1; }

/* ── Toast ──────────────────────────────────────────────────── */
.toast {
  background: var(--c-text-1);
  color: var(--c-white);
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-card);
  animation: toast-in .3s ease, toast-out .3s ease 2.7s forwards;
  pointer-events: auto;
}
.toast--success { background: var(--c-success); }
.toast--error   { background: var(--c-red); }
@keyframes toast-in  { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; transform:translateY(-8px); } }

/* ── Progress Dots ──────────────────────────────────────────── */
.progress-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}
.progress-dots__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--c-border);
  transition: background .2s;
}
.progress-dots__dot.active { background: var(--c-primary); }

/* ── Toggle Switch ──────────────────────────────────────────── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border);
}
.toggle-label { font-size: 15px; color: var(--c-text-2); font-weight: 500; }
.toggle {
  position: relative;
  width: 48px; height: 28px;
  cursor: pointer;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
  position: absolute;
  inset: 0;
  background: var(--c-disabled-bg);
  border-radius: var(--r-full);
  transition: background .2s;
}
.toggle input:checked + .toggle__track { background: var(--c-primary); }
.toggle__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  background: var(--c-white);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
  transition: transform .2s;
}
.toggle input:checked ~ .toggle__thumb { transform: translateX(20px); }

/* ── Donut Chart ────────────────────────────────────────────── */
.donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.donut-legend {
  display: flex;
  gap: 20px;
}
.donut-legend__item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-2);
}
.donut-legend__swatch {
  width: 12px; height: 12px;
  border-radius: 2px;
  flex-shrink: 0;
}
.donut-tooltip {
  position: absolute;
  background: #333;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  font-family: var(--font-base);
}

/* ── Table ──────────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 8px 6px;
  font-weight: 700;
  color: var(--c-text-2);
  border-bottom: 2px solid var(--c-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.data-table td {
  padding: 10px 6px;
  color: var(--c-text-1);
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
  line-height: 1.4;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--c-primary-l); }

/* ── Radio List ─────────────────────────────────────────────── */
.radio-list { display: flex; flex-direction: column; gap: 0; }
.radio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--c-border);
}
.radio-row:last-child { border-bottom: none; }
.radio-row__input { accent-color: var(--c-primary); width: 18px; height: 18px; cursor: pointer; }
.radio-row__label { flex: 1; font-size: 14px; color: var(--c-text-2); }
.radio-row__icon { color: var(--c-text-3); }

/* ── Welcome Screen ─────────────────────────────────────────── */
.welcome-screen {
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px;
}
.welcome-screen .logo { margin-bottom: 48px; }
.welcome-title { font-size: 20px; font-weight: 800; color: var(--c-primary); margin-bottom: 6px; text-align: center; }
.welcome-sub { font-size: 14px; color: var(--c-text-2); font-weight: 600; text-align: center; margin-bottom: 40px; }
.welcome-check {
  width: 96px; height: 96px;
  border: 3px solid var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  animation: pop-in .4s cubic-bezier(.16,1,.3,1);
}
@keyframes pop-in { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Tutorial Screen ────────────────────────────────────────── */
.tutorial-screen {
  min-height: 100dvh;
  min-height: 100vh;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
}
.tutorial-header { padding: 16px 20px 8px; }
.tutorial-content { flex: 1; padding: 0 20px; display: flex; flex-direction: column; }
.tutorial-img {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #d0dce8;
  margin-bottom: 0;
  flex-shrink: 0;
}
.tutorial-img img { width: 100%; height: 100%; object-fit: cover; }
.tutorial-progress {
  height: 4px;
  background: var(--c-border);
  border-radius: var(--r-full);
  margin: 16px 0;
  overflow: hidden;
}
.tutorial-progress__fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: var(--r-full);
  transition: width .3s ease;
}
.tutorial-title { font-size: 18px; font-weight: 800; color: var(--c-primary); margin-bottom: 10px; }
.tutorial-desc { font-size: 14px; color: var(--c-text-2); line-height: 1.6; flex: 1; }
.tutorial-actions { padding: 20px 20px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; align-items: center; }

/* ── Notification Item ──────────────────────────────────────── */
.notif-item {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-xs);
}
.notif-dot { width: 8px; height: 8px; background: var(--c-primary); border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-text { font-size: 13px; color: var(--c-text-2); line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--c-text-3); margin-top: 4px; }

/* ── Section Card ───────────────────────────────────────────── */
.section-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 12px;
}
.section-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-card__title { font-size: 15px; font-weight: 700; color: var(--c-text-1); }
.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge--green   { background: var(--c-success);  color: #fff; }
.badge--orange  { background: var(--c-orange);   color: #fff; }
.badge--blue    { background: var(--c-primary);  color: #fff; }
.badge--gray    { background: var(--c-text-3);   color: #fff; }
.badge--red     { background: var(--c-red);      color: #fff; }
.badge--teal    { background: var(--c-teal);     color: #fff; }
.badge--nc      { background: #ccc;              color: var(--c-text-1); font-size: 10px; padding: 0 5px; }

/* Profile field row */
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-bg);
}
.profile-row:last-child { border-bottom: none; }
.profile-row__key { font-size: 13px; color: var(--c-text-2); display: flex; align-items: center; gap: 8px; }
.profile-row__val { font-size: 13px; color: var(--c-text-1); font-weight: 600; text-align: right; max-width: 60%; }

/* Citas form */
.citas-form { background: var(--c-white); border-radius: var(--r-md); padding: 16px; box-shadow: var(--shadow-xs); margin-bottom: 12px; }
.citas-form__header { margin-bottom: 12px; }
.citas-form__title { font-size: 15px; font-weight: 700; color: var(--c-text-1); }
.citas-form__subtitle { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.citas-form__ips { font-size: 11px; color: var(--c-text-3); text-align: right; margin-top: 4px; }
.citas-form label { font-size: 13px; color: var(--c-text-2); font-weight: 600; display: block; margin-bottom: 4px; margin-top: 10px; }
.citas-form select {
  width: 100%;
  height: 40px;
  border: 1px solid #C8CDD6;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 14px;
  font-family: var(--font-base);
  color: var(--c-text-1);
  background: var(--c-white);
  cursor: pointer;
  -webkit-appearance: auto;
}
.citas-form select:focus { border-color: var(--c-primary); outline: none; }
.citas-inmediata { margin-top: 12px; }

/* Table link */
.table-note { font-size: 12px; color: var(--c-primary); text-align: right; margin-bottom: 6px; }

/* Conducta button */
.btn-conducta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-2);
  font-family: var(--font-base);
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}
.btn-conducta:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-l); }

/* ── Regime selector (Red de atención) ─────────────────────── */
.regime-options { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.regime-option {
  width: 100%;
  height: 62px;
  background: #EAECEF;
  border: none;
  border-radius: var(--r-lg);
  font-size: 15px;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: background .15s, color .15s;
  font-family: var(--font-base);
  text-align: center;
}
.regime-option.selected {
  background: #4ECDC4;
  color: var(--c-white);
  font-weight: 700;
}
.regime-option:active { transform: scale(.99); }

.red-continuar-bar {
  position: absolute;
  bottom: 64px; /* justo encima del bottom nav */
  left: 0; right: 0;
  padding: 12px 16px;
  background: var(--c-white);
  border-top: 1px solid #E8EAED;
}
.red-continuar-bar .btn { width: 100%; }

/* ── Red de atención — búsqueda ──────────────────────────── */
.red-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-bg);
  border-radius: var(--r-lg);
  padding: 0 12px;
  height: 40px;
  margin-bottom: 10px;
}
.red-search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--c-text-1);
}
.red-search-input::placeholder { color: var(--c-text-3); }

/* Filtros */
.red-filtros { padding-bottom: 10px; }
.red-filtros__group { display: flex; align-items: center; gap: 8px; }
.red-filtros__label { font-size: 11px; font-weight: 700; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .5px; white-space: nowrap; min-width: 34px; }
.red-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.red-chips::-webkit-scrollbar { display: none; }
.red-chip {
  flex-shrink: 0;
  height: 26px;
  padding: 0 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-2);
  background: var(--c-bg);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .15s;
}
.red-chip.active {
  background: var(--c-primary-l);
  color: var(--c-primary);
  border-color: var(--c-primary);
}

/* Tarjeta prestador */
.red-card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: 14px;
  cursor: pointer;
  transition: box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.red-card:active { box-shadow: 0 2px 8px rgba(70,152,202,.15); }
.red-card__header { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.red-card__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--c-primary-l);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.red-card__nombre { font-size: 14px; font-weight: 700; color: var(--c-text-1); line-height: 1.35; }
.red-card__body { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.red-card__row { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--c-text-2); line-height: 1.4; }
.red-card__especialidades { display: flex; flex-wrap: wrap; gap: 5px; }

/* Badges */
.red-badge {
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  background: var(--c-bg);
  color: var(--c-text-2);
}
.red-badge--asignada { background: #e8f8f0; color: #27ae60; }

/* Especialidades chip */
.red-esp {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px;
  background: var(--c-bg);
  color: var(--c-text-2);
}

/* Detalle secciones */
.red-detalle-section {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 10px;
}
.red-detalle-title {
  font-size: 12px; font-weight: 700;
  color: var(--c-text-3); text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 4px;
}
.red-detalle-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-bg);
}
.red-detalle-row:last-child { border-bottom: none; }
.red-detalle-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--c-primary-l);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Proximas section */
.proximas-section {
  background: var(--c-white);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  overflow: hidden;
}
.proximas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-bg);
}
.proximas-title { font-size: 14px; font-weight: 700; color: var(--c-text-1); }
.proximas-body { padding: 12px 14px; min-height: 40px; }
.proximas-empty { font-size: 13px; color: var(--c-text-3); }

/* Proximas cita item */
.proxima-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-bg);
}
.proxima-item:last-child { border-bottom: none; }
.proxima-item__left  { flex: 1; }
.proxima-item__fecha { font-size: 12px; color: var(--c-text-3); margin-bottom: 4px; }
.proxima-item__esp   { font-size: 13px; font-weight: 700; color: var(--c-text-1); }
.proxima-item__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 120px;
}
.proxima-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  color: #fff;
  white-space: nowrap;
}
.proxima-tag--teal   { background: var(--c-teal); }
.proxima-tag--blue   { background: var(--c-primary); }
.proxima-tag--orange { background: var(--c-orange); }
.proxima-item__del {
  background: var(--c-red);
  border: none;
  border-radius: 4px;
  color: white;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* Citas 3-logo header */
.citas-header {
  display: flex;
  align-items: center;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  padding: 8px 10px;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.citas-header__hamburger {
  background: #1B5BC4;
  border: none;
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
}
.citas-logo-pana  { height: 28px; width: auto; flex-shrink: 0; }
.citas-logo-alone { height: 36px; width: auto; flex: 1; object-fit: contain; max-width: 110px; }
.citas-logout-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--c-text-2);
  cursor: pointer;
  font-family: var(--font-base);
  white-space: nowrap;
}
.citas-logo-neps {
  height: 40px;
  width: auto;
  flex-shrink: 0;
  max-width: 80px;
  object-fit: contain;
}

/* Perfil card */
.perfil-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  margin-bottom: 10px;
  overflow: hidden;
}
.perfil-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-bg);
  font-weight: 700;
  font-size: 14px;
  color: var(--c-text-1);
}
.perfil-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  border-bottom: 1px solid var(--c-bg);
  font-size: 13px;
}
.perfil-row:last-child { border-bottom: none; }
.perfil-row__label { display: flex; align-items: center; gap: 6px; color: var(--c-text-2); font-size: 13px; }
.perfil-row__val { color: var(--c-text-1); font-size: 13px; text-align: right; }
.perfil-row__dash { display:inline-block; width:18px; height:3px; background:var(--c-red); border-radius:2px; vertical-align:middle; }
.perfil-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 8px 14px;
  border-top: 1px solid var(--c-bg);
  font-size: 12px;
}
.perfil-footer__revocar { color: var(--c-text-2); cursor: pointer; background: none; border: none; font-size: 12px; font-family: var(--font-base); }
.perfil-footer__notif { color: var(--c-primary); font-weight: 600; display: flex; align-items: center; gap: 4px; font-size:12px; }

/* Grupo familiar row */
.grupo-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-1);
}

/* Citas footer */
.citas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-size: 11px;
  color: var(--c-text-3);
  border-top: 1px solid var(--c-border);
  background: var(--c-white);
  margin-top: 8px;
}
.citas-footer__copy { display: flex; align-items: center; gap: 6px; }

/* Upload area */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
  flex: 1;
}
.upload-hint { font-size: 13px; color: var(--c-text-3); text-align: center; }
.upload-btn {
  width: 100%;
  height: var(--btn-h);
  border: 2px solid var(--c-primary);
  border-radius: var(--r-sm);
  background: none;
  color: var(--c-primary);
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s;
}
.upload-btn:hover { background: var(--c-primary-l); }

/* Descarga segura modal — nuevo diseño */
.descarga-modal {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  background: #E8F4F8 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.descarga-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #E8F4F8;
  padding: 14px 12px 10px;
  gap: 8px;
}
.descarga-modal__logo-pana { height: 44px; width: auto; flex-shrink: 0; margin-right: 16px; }
.descarga-modal__logo-neps { height: 44px; width: auto; flex-shrink: 0; margin-left: 16px; }
.descarga-modal__shield-img { height: 68px; width: auto; }
.descarga-modal__bienvenido {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #C0392B;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}
.descarga-modal__bienvenido span {
  font-weight: 400;
  font-size: 14px;
  color: #C0392B;
}
.descarga-modal__bienvenido strong {
  font-size: 20px;
  text-align: center;
  color: #d13966;
  padding-top: 5px;
  padding-bottom: 20px;
  margin-top: 20px;
  font-weight: 400;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.2;
}
.descarga-modal__body {
  background: #E8F4F8;
  text-align: center;
  padding: 8px 20px 20px;
}
.descarga-modal__shield {
  margin: 40% auto 4px;
  display: flex;
  justify-content: center;
}
.descarga-modal__title {
  font-size: 22px;
  font-weight: 800;
  color: #e13b00;
  margin: 8px 0 14px;
}
.descarga-modal__captcha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 2px solid #ccc;
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 16px;
  gap: 8px;
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}
.descarga-modal__captcha-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.descarga-modal__captcha-box {
  width: 22px;
  height: 22px;
  border: 2px solid #aaa;
  border-radius: 3px;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s;
}
.descarga-modal__captcha-check input:checked + .descarga-modal__captcha-box {
  background: #27AE60;
  border-color: #27AE60;
}
.descarga-modal__captcha-check input:checked + .descarga-modal__captcha-box::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: 700;
}
.descarga-modal__captcha-label { font-size: 12px; color: #333; text-align: left; }
.descarga-modal__captcha-brand {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.descarga-modal__cf-logo { font-size: 20px; color: #F48024; }
.descarga-modal__text {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
  font-style: italic;
  text-align: left;
  margin-bottom: 10px;
}
.descarga-modal__copy {
  font-size: 11px;
  color: #00c7ca;
  font-weight: 600;
  margin-top: 8px;
}
.descarga-modal__ip {
  font-size: 10px;
  color: #00c7ca;
  margin-top: 2px;
}
.descarga-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--c-text-3);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

/* Atencion / Red placeholders */
.info-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 12px;
}
.info-card__title { font-size: 15px; font-weight: 700; color: var(--c-text-1); margin-bottom: 6px; }
.info-card__body { font-size: 14px; color: var(--c-text-2); line-height: 1.5; }
.info-card__action { margin-top: 14px; }
.contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--c-border);
}
.contact-row:last-child { border-bottom: none; }
.contact-icon { width: 40px; height: 40px; border-radius: var(--r-full); background: var(--c-primary-l); display: flex; align-items: center; justify-content: center; color: var(--c-primary); flex-shrink: 0; }
.contact-info__label { font-size: 13px; color: var(--c-text-3); }
.contact-info__value { font-size: 15px; font-weight: 700; color: var(--c-text-1); }

/* Cert download */
.cert-card {
  background: linear-gradient(135deg, #e8f4fb 0%, #d4ecf7 100%);
  border: 2px solid var(--c-primary);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
}
.cert-card__icon { color: var(--c-primary); margin: 0 auto 16px; }
.cert-card__title { font-size: 18px; font-weight: 800; color: var(--c-primary); margin-bottom: 8px; }
.cert-card__sub { font-size: 14px; color: var(--c-text-2); line-height: 1.5; }

/* Carné digital */
.carne-card {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-d) 100%);
  border-radius: var(--r-xl);
  padding: 28px 24px;
  color: var(--c-white);
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}
.carne-card__logo { margin-bottom: 24px; }
.carne-card__name { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.carne-card__doc { font-size: 14px; opacity: .85; margin-bottom: 20px; }
.carne-card__row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.carne-card__key { font-size: 11px; opacity: .75; text-transform: uppercase; letter-spacing: .5px; }
.carne-card__val { font-size: 14px; font-weight: 700; }

/* Separator text */
.or-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--c-text-3);
  font-size: 13px;
}
.or-separator::before,
.or-separator::after { content: ''; flex: 1; height: 1px; background: var(--c-border); }

/* Autocomplete / Inmediata chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-full);
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  cursor: pointer;
  font-family: var(--font-base);
  transition: border-color .15s, color .15s;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* Ajustes page */
.settings-section { background: var(--c-white); border-radius: var(--r-md); padding: 0 16px; margin-bottom: 16px; }
.settings-section__title { font-size: 12px; font-weight: 700; color: var(--c-text-3); text-transform: uppercase; letter-spacing: .5px; padding: 12px 0 4px; }

/* Cambio de contraseña */
.cambio-pass__desc {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.55;
  margin-bottom: 24px;
}
.cambio-pass__btn-area {
  margin-top: 32px;
}
.cambio-pass__btn-area .btn {
  width: 100%;
}

/* Políticas — detalle */
.politica-detalle__title { margin-bottom: 28px; }
.politica-detalle__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}
.politica-detalle__body {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.6;
  margin-bottom: 32px;
}
.politica-detalle__btn { width: 100%; }

/* Acerca de la app */
.acerca-version {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 4px;
  margin-top: 8px;
}
.acerca-rights {
  font-size: 14px;
  color: var(--c-text-3);
}

/* Suspender cuenta */
.suspender-desc {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.6;
  margin-bottom: 24px;
}
.suspender-textarea-wrap { position: relative; }
.suspender-textarea {
  width: 100%;
  min-height: 150px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--c-text-1);
  resize: none;
  box-sizing: border-box;
  outline: none;
  background: var(--c-white);
  transition: border-color .15s, box-shadow .15s;
}
.suspender-textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(70,152,202,.15);
}
.suspender-textarea::placeholder { color: var(--c-text-3); }
.suspender-counter {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
}
.suspender-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}
.suspender-actions .btn { flex: 1; }

/* Profile panel (home) */
.profile-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 820;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .2s;
}
.profile-panel-backdrop.visible { opacity: 1; }
.profile-panel {
  position: absolute;
  top: 56px;
  right: 8px;
  width: min(300px, calc(100vw - 16px));
  background: var(--c-white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  padding: 16px 16px 12px;
  transform: scale(.92) translateY(-8px);
  transform-origin: top right;
  transition: transform .2s, opacity .2s;
  opacity: 0;
  z-index: 821;
}
.profile-panel.visible { transform: scale(1) translateY(0); opacity: 1; }

/* nuevos estilos del panel */
.pp-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-1);
  margin: 0 0 2px;
}
.pp-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--c-text-3);
  margin: 0 0 4px;
}
.pp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 6px;
}
.pp-data-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--c-primary);
}
.pp-data-val {
  font-size: 13px;
  color: var(--c-primary);
  font-weight: 400;
}
.pp-divider {
  height: 1px;
  background: var(--c-border);
  margin: 10px 0;
}
.pp-afil-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.pp-afil-arrow {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--c-primary);
  display: flex;
  align-items: center;
}

/* Mi afiliación */
.afil-tabs {
  display: flex;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 20px;
}
.afil-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-3);
  cursor: pointer;
  font-family: var(--font-base);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.afil-tab.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.afil-info-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 15px;
}
.afil-info-row:last-child { border-bottom: none; }
.afil-info-row__key {
  font-weight: 700;
  color: var(--c-text-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
}
.afil-info-row__sub {
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 4px;
  line-height: 1.6;
}
.afil-ips-btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: none;
  border: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-base);
}
.afil-ips-btn .afil-ips-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--c-text-1);
  line-height: 1.3;
  margin-bottom: 4px;
}
.no-beneficiarios {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  text-align: center;
}
.no-beneficiarios__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--c-primary);
  margin: 16px 0 8px;
}
.no-beneficiarios__text {
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.55;
}

/* Chat de soporte */
.chat-page { display: flex; flex-direction: column; height: 100dvh; background: var(--c-white); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px calc(var(--nav-h) + 64px);
  background: var(--c-white);
}
.chat-date-sep {
  text-align: center;
  font-size: 11px;
  color: var(--c-text-3);
  margin: 12px 0;
}
.chat-msg-wrap { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c-border);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text-2);
}
.chat-bubble {
  max-width: 75%;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 0 12px 12px 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-text-1);
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.chat-bubble--options { padding: 0; overflow: hidden; }
.chat-menu-card {
  margin: 0 8px 12px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.chat-option-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--c-border);
  padding: 11px 14px;
  font-size: 14px;
  color: var(--c-primary);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-base);
  transition: background .12s;
}
.chat-option-btn:active { background: var(--c-primary-l); }
.chat-option-btn:first-child { border-top: none; }
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 6px 2px; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); animation: chat-bounce .8s infinite; }
.chat-dot:nth-child(2) { animation-delay: .15s; }
.chat-dot:nth-child(3) { animation-delay: .3s; }
@keyframes chat-bounce { 0%,80%,100%{transform:translateY(0)} 40%{transform:translateY(-6px)} }
.chat-input-bar {
  position: fixed;
  bottom: var(--nav-h);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #1B2B6B;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}
.chat-input-bar__menu {
  background: none;
  border: none;
  color: var(--c-white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.chat-input-wrap {
  flex: 1;
  background: var(--c-white);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 6px;
}
.chat-input-wrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--c-text-1);
  font-size: 14px;
  font-family: var(--font-base);
  padding: 9px 0;
}
.chat-input-wrap input::placeholder { color: var(--c-text-3); }
.chat-input-icon {
  background: none;
  border: none;
  color: var(--c-text-3);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
}
.chat-input-icon--circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #1B2B6B;
  border: 2px solid rgba(255,255,255,.35) !important;
  padding: 0;
  justify-content: center;
  color: var(--c-white);
}
.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1B2B6B;
  border: 2px solid rgba(255,255,255,.35);
  color: var(--c-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Transcripción wizard */
.wizard-steps {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.wizard-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid var(--c-border);
  color: var(--c-text-3);
  background: var(--c-white);
  transition: all .2s;
}
.wizard-step-circle.active { background: var(--c-primary); border-color: var(--c-primary); color: white; }
.wizard-step-circle.done { background: var(--c-primary); border-color: var(--c-primary); color: white; }
.wizard-step-line {
  flex: 1;
  height: 2px;
  background: var(--c-border);
  transition: background .2s;
}
.wizard-step-line.done { background: var(--c-primary); }
.wizard-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 2px solid var(--c-primary);
  border-radius: var(--r-lg);
  background: none;
  color: var(--c-primary);
  font-size: 14px;
  font-weight: 700;
  padding: 14px;
  cursor: pointer;
  font-family: var(--font-base);
}
.wizard-terms-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--c-text-2);
  cursor: pointer;
  padding: 4px 0;
}
.wizard-terms-label input[type="checkbox"] { display: none; }
.wizard-terms-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-border);
  border-radius: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.wizard-terms-label.checked .wizard-terms-checkbox {
  background: var(--c-primary);
  border-color: var(--c-primary);
}
.wizard-doc-icon {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}

/* Noticias preferencias */
.pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
}
.pref-item:last-child { border-bottom: none; }
.pref-item__label { font-size: 14px; color: var(--c-text-2); }
.pref-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.pref-checkbox.checked { background: var(--c-primary); border-color: var(--c-primary); }
.pref-checkbox.checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-left: none;
  border-top: none;
  transform: rotate(45deg) translateY(-1px);
}

/* IPS detalle */
.ips-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1.3;
  margin-bottom: 20px;
}
.ips-detail-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}
.ips-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ips-detail-info { font-size: 13px; color: var(--c-text-2); line-height: 1.6; }
.ips-detail-info strong { color: var(--c-text-1); font-weight: 700; display: block; }

/* Certificados email form */
.cert-form { margin-top: 8px; }
.cert-form__desc {
  font-size: 14px;
  color: var(--c-text-2);
  line-height: 1.55;
  margin-bottom: 20px;
}
.cert-form__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-2);
  margin-bottom: 6px;
}

/* Skeleton loaders */
.skeleton {
  background: linear-gradient(90deg, #e8ecf0 25%, #f4f6f8 50%, #e8ecf0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton--card { width: 160px; height: 140px; border-radius: var(--r-lg); }
.skeleton--line { height: 14px; margin-bottom: 8px; }
.skeleton--line--sm { width: 60%; }
.skeleton--line--md { width: 80%; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 769px) {
  body { background: #d8e4ee; }
  #app {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0,0,0,.12);
  }
}

/* ── Transitions ─────────────────────────────────────────────── */
.screen-enter { animation: fade-slide-in .22s ease; }
@keyframes fade-slide-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}
.screen-back { animation: fade-slide-back .22s ease; }
@keyframes fade-slide-back {
  from { opacity: 0; transform: translateX(-24px); }
  to   { opacity: 1; transform: none; }
}

/* ── Contáctanos público ─────────────────────────────────── */
.contacto-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  color: var(--c-text-3);
}
.contacto-divider { height: 1px; background: var(--c-border); }

/* ── Chat botón-card (soporte público) ───────────────────── */
.chat-btn-card {
  background: var(--c-white);
  border-radius: 12px;
  margin: 0 8px 12px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.chat-btn-card__opts {
  border-top: 1px solid var(--c-border);
}
.chat-btn-card__opt {
  display: block;
  width: 100%;
  padding: 12px 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  background: none;
  border: none;
  border-top: 1px solid var(--c-border);
  cursor: pointer;
  font-family: var(--font-base);
  transition: background .15s;
}
.chat-btn-card__opt:first-child { border-top: none; }
.chat-btn-card__opt:active { background: var(--c-primary-l); }

/* ── Panel público deslizable (sobre login) ─────────────── */
.public-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 70px; /* altura del preauth-footer */
  background: var(--c-bg);
  z-index: 810;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.public-panel.visible { transform: translateY(0); }
/* Ocultar el footer continuar-bar dentro del panel para que no tape contenido */
.public-panel .red-continuar-bar { bottom: 0; }

/* ── Splash de lanzamiento ──────────────────────────────── */
#launch-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #F0F2F5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease;
}
#launch-splash span {
  font-family: 'Nunito', 'Helvetica Neue', Arial, sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #4698CA;
  letter-spacing: .5px;
}
#launch-splash.fade-out { opacity: 0; }
