/* =========================
   Filson Pro (carga local)
   ========================= */
@font-face {
  font-family: "Filson Pro";
  src: url("/static/fonts/FilsonPro-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Filson Pro";
  src: url("/static/fonts/FilsonPro-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Filson Pro";
  src: url("/static/fonts/FilsonPro-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =========================
   Paleta (marca)
   ========================= */
:root {
  --navy: #10225A;
  --mint: #00FCA7;
  --blue: #0087FF;

  --black: #090909;
  --gray-75: #474747;
  --gray-50: #848484;
  --gray-25: #C1C1C1;
  --white: #FFFFFF;

  --bg: #F6F7F9;
  --card: #FFFFFF;

  --radius: 18px;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.10);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Filson Pro", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--black);
}

/* =========================
   Header / Topbar
   ========================= */
.topbar {
  background: linear-gradient(90deg, var(--navy), #0d1c46);
  color: var(--white);
}

.topbar__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand__logo {
  width: clamp(90px, 10vw, 180px);
  height: clamp(90px, 10vw, 180px);
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand__subtitle {
  font-size: 12px;
  opacity: 0.95;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  flex: 0 0 auto;
}

/* =========================
   MENÚ / PESTAÑAS (base.html .menu)
   ========================= */
.menu{
  border-top: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(90deg, rgba(0,135,255,.18), rgba(0,252,167,.10));
}

.menu__inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 10px 18px 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.menu__tab{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 10px 14px;
  border-radius: 999px;

  text-decoration: none !important;
  color: rgba(255,255,255,.95) !important;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;

  background: rgba(255,255,255,.10);
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 18px rgba(0,0,0,.10);

  transition: transform .06s, background .15s, box-shadow .15s, border-color .15s;
}

.menu__tab:visited{
  color: rgba(255,255,255,.95) !important;
}

.menu__tab:hover{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 14px 26px rgba(0,0,0,.14);
}

.menu__tab:active{
  transform: translateY(1px);
}

.menu__tab:focus-visible{
  outline: 4px solid rgba(0,252,167,.25);
  outline-offset: 2px;
}

.menu__tab--active{
  color: #071224 !important;
  background: linear-gradient(90deg, var(--blue), var(--mint)) !important;
  border-color: rgba(0,252,167,.60) !important;
  box-shadow: 0 16px 34px rgba(0,135,255,.20);
}

.menu__dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 6px rgba(0,252,167,.14);
  flex: 0 0 auto;
}

.menu__tab--active .menu__dot{
  background: var(--navy);
  box-shadow: 0 0 0 6px rgba(16,34,90,.14);
}

/* =========================
   Layout
   ========================= */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px 40px;
}

/* =========================
   Alerts
   ========================= */
.alerts {
  margin-bottom: 14px;
  display: grid;
  gap: 10px;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--gray-25);
  background: var(--white);
  font-weight: 500;
}

.alert--success {
  border-color: rgba(0, 252, 167, 0.45);
  box-shadow: 0 6px 18px rgba(0, 252, 167, 0.12);
}

.alert--error {
  border-color: rgba(255, 0, 0, 0.25);
}

/* =========================
   Card
   ========================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 34, 90, 0.10);
  padding: 20px;
}

.card__title {
  margin: 0;
  font-size: 22px;
  color: var(--navy);
  font-weight: 800;
}

.card__hint {
  margin: 8px 0 16px;
  color: var(--gray-75);
  font-size: 14px;
  font-weight: 400;
}

/* =========================
   Sections (color + ícono)
   ========================= */
.section{
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(16, 34, 90, 0.10);
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.section::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.section::after{
  content: "";
  position: absolute;
  inset: -40px -60px auto auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at 30% 30%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

.section__header{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.section__icon{
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255,255,255,.7));
  border: 2px solid rgba(16, 34, 90, 0.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.section__icon img{
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.section__headtext{ min-width: 0; }

.section__title{
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}

.section__desc{
  margin: 6px 0 0;
  color: var(--gray-75);
  font-size: 13px;
}

.section__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

/* Colores por sección */
.section--patient{
  --accent: var(--mint);
  --accent2: var(--blue);
  --accent-soft: rgba(0,252,167,.22);
}
.section--vitals{
  --accent: var(--blue);
  --accent2: var(--mint);
  --accent-soft: rgba(0,135,255,.18);
}
.section--dx{
  --accent: var(--mint);
  --accent2: var(--navy);
  --accent-soft: rgba(0,252,167,.18);
}
.section--hx{
  --accent: var(--blue);
  --accent2: var(--navy);
  --accent-soft: rgba(0,135,255,.14);
}
.section--cardio{
  --accent: var(--navy);
  --accent2: var(--mint);
  --accent-soft: rgba(16,34,90,.16);
}
.section--test{
  --accent: var(--blue);
  --accent2: var(--mint);
  --accent-soft: rgba(0,135,255,.16);
}

/* Secciones del registro médico */
.section--doctor{
  --accent: var(--mint);
  --accent2: var(--blue);
  --accent-soft: rgba(0,252,167,.22);
}
.section--contact{
  --accent: var(--blue);
  --accent2: var(--navy);
  --accent-soft: rgba(0,135,255,.16);
}

/* =========================
   Fields
   ========================= */
.field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-75);
  margin-bottom: 8px;
}

.field small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray-50);
}

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

input, select, textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--gray-25);
  outline: none;
  font-size: 15px;
  font-weight: 400;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

input, select { padding: 12px 12px; }

textarea {
  padding: 12px 12px;
  resize: vertical;
  min-height: 92px;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(0, 135, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 135, 255, 0.12);
}

input:disabled, select:disabled, textarea:disabled {
  background: #f0f2f4;
  color: var(--gray-75);
}

/* Input group con ícono */
.input-group { position: relative; }

.input-group__icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(16, 34, 90, 0.10);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

.input-group input { padding-left: 52px; }

/* Select con flecha */
select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gray-75) 50%),
    linear-gradient(135deg, var(--gray-75) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

/* =========================
   Antecedentes (Hábitos / Médicos / Quirúrgicos)
   ========================= */
.section--hx .hx__groupTitle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(16,34,90,.10);
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  margin: 0 0 10px;
}

.section--hx .checkgroup{
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(16,34,90,.10);
  background: rgba(255,255,255,.75);
}

.section--hx .checkrow{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

/* Override global .field label styling for list items */
.section--hx .checkgroup label.checkrow{
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-75);
}

.section--hx .checkgroup label.checkrow span{
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
}

.section--hx .checkrow input[type="checkbox"]{
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.section--hx .checklabel{
  min-width: 84px;
  font-weight: 800;
  font-size: 13px;
  color: var(--gray-75);
}

.section--hx .checkrow input[type="text"],
.section--hx .checkrow select{
  flex: 1;
  min-width: 180px;
}

/* =========================
   Buttons / Actions
   ========================= */
.actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.05s, box-shadow 0.15s, background 0.15s;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: linear-gradient(90deg, var(--blue), var(--mint));
  color: #071224;
  box-shadow: 0 12px 28px rgba(0, 135, 255, 0.20);
}

.btn--primary:hover {
  box-shadow: 0 16px 34px rgba(0, 135, 255, 0.26);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border: 2px solid rgba(16, 34, 90, 0.18);
}

.btn--ghost:hover {
  background: rgba(16, 34, 90, 0.05);
}

/* Link de ayuda */
.help-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid rgba(16, 34, 90, 0.12);
  background: rgba(16, 34, 90, 0.03);
}

.help-link:hover { background: rgba(16, 34, 90, 0.06); }

.help-link__icon {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

/* =========================
   Footer
   ========================= */
.footer { margin-top: 40px; }

.footer__bar {
  height: 22px;
  background: var(--navy);
}

/* =========================================================
   Mi recuperación (merecupero.html)
   ========================================================= */
.recovery__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

.recovery__badge{
  width:56px;
  height:56px;
  border-radius:18px;
  border:2px solid rgba(0,135,255,.18);
  background: rgba(0,135,255,.08);
  display:flex;
  align-items:center;
  justify-content:center;
}

.recovery__badge img{
  width:42px;
  height:42px;
  object-fit:contain;
}

.recovery__layout{
  display:grid;
  grid-template-columns: 1fr 1.1fr;
  gap:14px;
}

.recovery__panel{
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(16,34,90,.10);
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}

.recovery__panelTitle{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: var(--navy);
}

.recovery__grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-bottom: 10px;
}

/* Sliders / síntomas */
.symptom-list{
  display:grid;
  gap:12px;
  margin-top: 8px;
}

.symptom{
  padding:12px;
  border-radius: 16px;
  border: 1px solid rgba(16,34,90,.10);
  background: rgba(255,255,255,.85);
}

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

.symptom__label{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-weight: 900;
  color: var(--navy);
}

.symptom__icon{
  width:26px;
  height:26px;
  object-fit:cover;
  border-radius: 8px;
  border: 1px solid rgba(16,34,90,.10);
}

.symptom__value{
  font-weight: 900;
  font-size: 18px;
  min-width: 20px;
  text-align: right;
}

.symptom__scale{
  display:flex;
  justify-content:space-between;
  font-size: 12px;
  color: var(--gray-50);
  margin-top: 6px;
}

/* Slider track + thumb (táctil) */
.range{
  width: 100%;
  margin-top: 10px;
  height: 10px;
  border-radius: 999px;
  outline: none;
  appearance: none;
  background: linear-gradient(90deg, var(--blue) 0%, var(--blue) 0%, #D9DEE6 0%, #D9DEE6 100%);
}

.range::-webkit-slider-thumb{
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--fill, var(--blue));
  border: 3px solid #ffffff;
  box-shadow: 0 10px 18px rgba(0,0,0,.15);
  cursor: pointer;
}

.range::-moz-range-thumb{
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--fill, var(--blue));
  border: 3px solid #ffffff;
  box-shadow: 0 10px 18px rgba(0,0,0,.15);
  cursor: pointer;
}

.recovery__actions{
  margin-top: 14px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
}

.recovery__note{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,135,255,.06);
  border: 1px dashed rgba(0,135,255,.22);
  color: var(--gray-75);
  font-size: 13px;
}

.recovery__charts{
  display:grid;
  gap:12px;
}

.chart-card{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(16,34,90,.10);
  background: rgba(255,255,255,.85);
  min-height: 240px;
}

.chart-card__title{
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 8px;
}

.chart-card__sub{
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray-50);
}

.recovery__summary{
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,252,167,.06);
  border: 1px solid rgba(0,252,167,.18);
}

.summary__title{
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 6px;
}

.summary__row{
  color: var(--gray-75);
  font-weight: 700;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 980px){
  .menu__tab{
    white-space: normal;
    line-height: 1.15;
  }
  .recovery__layout{
    grid-template-columns: 1fr;
  }
  .recovery__grid2{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar__inner { padding: 12px 14px; }
  .subsection__grid { grid-template-columns: 1fr; }
  .container { padding: 18px 14px 34px; }
  .card { padding: 16px; }

  .section__grid { grid-template-columns: 1fr; }
  .help-link { margin-left: 0; width: 100%; justify-content: center; }
  .brand__subtitle { white-space: normal; }

  .section__icon{ width: 50px; height: 50px; border-radius: 16px; }
  .section__icon img{ width: 44px; height: 44px; }

  .menu__tab{
    width: 100%;
    justify-content: center;
    white-space: normal;
    line-height: 1.15;
  }
}

@media (max-width: 420px) {
  .brand__logo {
    width: 96px;
    height: 96px;
  }
}

/* =========================
   Farmacológicos (toggle simple)
   ========================= */
.section--hx .farmagroups {
  display: grid;
  gap: 12px;
}

.section--hx .farma-category {
  border: 1px solid rgba(16, 34, 90, 0.10);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  overflow: hidden;
}

.section--hx .farma-category__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(16,34,90,.04);
}

.section--hx .farma-category__title {
  font-size: 14px;
  font-weight: 500;
  
}

.section--hx .farma-category__toggle {
  margin-left: auto;
}

.section--hx .farma-subgroup {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border-top: 1px dashed rgba(16,34,90,.10);
  background: rgba(255,255,255,.94);
}

.section--hx .farma-subgroup[hidden] {
  display: none !important;
}

.section--hx .farma-subgroup .checkrow {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 6px 0;
}

.section--hx .farma-subgroup .checkrow input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
}

.section--hx .farma-subgroup .checkrow span {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
}


/* =========================
   Subsecciones internas
   ========================= */
.subsection {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(16, 34, 90, 0.10);
  background: rgba(255,255,255,.78);
}

.subsection__header {
  margin-bottom: 10px;
}

.walktest-category__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.walktest-category__toggle {
  margin-left: auto;
  flex: 0 0 auto;
}

.walktest-subgroup {
  border-top: 1px dashed rgba(16,34,90,.10);
  padding-top: 12px;
}

.walktest-subgroup[hidden] {
  display: none !important;
}

.subsection__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.subsection__desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--gray-75);
}

.subsection__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* =========================================================
   Pantalla inicial / login
   ========================================================= */
:root {
  --brand-purple: #523DBE;
  --brand-green: #00AD80;
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(82, 61, 190, .16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(0, 173, 128, .16), transparent 32%),
    linear-gradient(180deg, #F7F8FC 0%, #EEF3F8 100%);
}

.auth-shell {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: 100%;
  max-width: 1020px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(16,34,90,.10);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(16,34,90,.14);
}

.auth-card__hero {
  position: relative;
  padding: 44px;
  background:
    radial-gradient(circle at 0 0, rgba(82,61,190,.12), transparent 28%),
    linear-gradient(160deg, rgba(16,34,90,.98) 0%, rgba(16,34,90,.92) 54%, rgba(82,61,190,.90) 100%);
  color: var(--white);
}

.auth-card__hero::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -28px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0,252,167,.30) 0 14%, transparent 15% 100%),
    radial-gradient(circle, rgba(255,255,255,.12) 0 14%, transparent 15% 100%);
  background-size: 24px 24px, 24px 24px;
  opacity: .55;
  pointer-events: none;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.auth-logoWrap {
  width: clamp(120px, 18vw, 180px);
  height: clamp(120px, 18vw, 180px);
  margin: 28px 0 18px;
  border-radius: 32px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.auth-logo {
  width: 84%;
  height: 84%;
  object-fit: contain;
}

.auth-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.02;
  font-weight: 800;
}

.auth-summary {
  max-width: 520px;
  margin: 16px 0 0;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,.92);
}

.auth-card__formWrap {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(246,247,249,.98) 100%);
}

.auth-alerts {
  margin-bottom: 14px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  font-size: 15px;
}

.auth-actions {
  margin-top: 8px;
}

.auth-help {
  margin: 20px 0 0;
  text-align: center;
  color: var(--gray-75);
  font-size: 14px;
  font-weight: 500;
}

.auth-help a {
  color: var(--brand-purple);
  font-weight: 800;
  text-decoration: none;
}

.auth-help a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-card__hero,
  .auth-card__formWrap {
    padding: 28px;
  }

  .auth-summary {
    max-width: none;
  }
}

@media (max-width: 540px) {
  .auth-shell {
    padding: 16px;
  }

  .auth-card {
    border-radius: 24px;
  }

  .auth-card__hero,
  .auth-card__formWrap {
    padding: 22px;
  }

  .auth-title {
    font-size: 30px;
  }

  .auth-summary {
    font-size: 15px;
    line-height: 1.5;
  }
}


/* =========================================================
   BI Prescripción clínica
   ========================================================= */
.bi-dashboard{
  display:grid;
  gap:16px;
}

.bi-dashboard__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.bi-dashboard__badge{
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(0,135,255,.10), rgba(0,252,167,.12));
  border: 1px solid rgba(16,34,90,.10);
  color: var(--navy);
  font-weight: 900;
  text-align:center;
}

.bi-dashboard__badge small{
  display:block;
  margin-top:4px;
  color: var(--gray-50);
  font-size: 11px;
  font-weight:700;
}

.bi-note{
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(0,135,255,.24);
  background: rgba(0,135,255,.06);
  color: var(--gray-75);
  font-size: 13px;
  font-weight: 700;
}

.bi-filters{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(16,34,90,.10);
  background: rgba(255,255,255,.88);
}

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

.bi-kpi{
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(16,34,90,.10);
  box-shadow: 0 10px 20px rgba(0,0,0,.05);
}

.bi-kpi__label{
  color: var(--gray-50);
  font-size: 12px;
  font-weight: 800;
}

.bi-kpi__value{
  margin-top:6px;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
}

.bi-chart-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}

.bi-chart-card{
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(16,34,90,.10);
  box-shadow: 0 10px 20px rgba(0,0,0,.05);
}

.bi-chart-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 10px;
}

.bi-chart-card__title{
  margin:0;
  color: var(--navy);
  font-size: 17px;
  font-weight: 900;
}

.bi-chart-card__hint{
  margin: 6px 0 0;
  color: var(--gray-50);
  font-size: 12px;
  font-weight: 700;
}

.bi-chart-box{
  position: relative;
  width: 100%;
  height: 360px;
}

.bi-summary-table{
  margin-top: 12px;
  overflow:auto;
  border-radius: 14px;
  border: 1px solid rgba(16,34,90,.10);
}

.bi-summary-table table{
  width:100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(255,255,255,.92);
}

.bi-summary-table th,
.bi-summary-table td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16,34,90,.08);
  text-align:left;
}

.bi-summary-table th{
  font-size: 12px;
  color: var(--gray-75);
  background: rgba(16,34,90,.04);
}

.bi-summary-table td{
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.bi-empty{
  padding: 18px;
  border-radius: 16px;
  background: rgba(16,34,90,.04);
  color: var(--gray-75);
  font-weight: 800;
  text-align:center;
}

@media (max-width: 980px){
  .bi-filters,
  .bi-kpis{
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px){
  .bi-dashboard__header{
    flex-direction: column;
  }
  .bi-filters,
  .bi-kpis{
    grid-template-columns: 1fr;
  }
  .bi-chart-box{
    height: 320px;
  }
}
