/* ESTILOS GLOBALES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f1f5f9;
  color: #1e293b;
}

.hidden {
  display: none !important;
}

/* PANTALLA 1: LOGIN CONTENEDOR */
.login-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(500px, 35vw, 620px);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: #eef3f8;
}

.left-panel {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: url('../images/inicio_1.png') no-repeat center center / cover;
  display: flex;
  align-items: flex-end;
  padding: clamp(34px, 4.4vw, 68px);
}

.left-panel .overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 29, 53, 0.14) 0%, rgba(3, 29, 53, 0.06) 54%, rgba(3, 29, 53, 0.02) 100%),
    linear-gradient(180deg, rgba(4, 31, 57, 0.04) 0%, rgba(4, 31, 57, 0.18) 48%, rgba(3, 39, 72, 0.92) 100%);
}

.brand-info {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  color: #fff;
  padding-bottom: clamp(6px, 1.2vh, 16px);
}

.hero-kicker {
  display: inline-block;
  margin-bottom: 11px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  color: #d9efff;
}

.hero-title {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: clamp(2.75rem, 4.25vw, 4.4rem);
  line-height: 1.01;
  font-weight: 760;
  letter-spacing: -0.042em;
  color: #fff;
  text-wrap: balance;
}

.hero-description {
  max-width: 720px;
  margin: 0;
  font-size: clamp(0.98rem, 1.28vw, 1.12rem);
  line-height: 1.58;
  color: rgba(255,255,255,.94);
  text-wrap: pretty;
}

.hero-description-secondary {
  margin-top: 9px;
  color: rgba(235, 245, 253, 0.87);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
}

.right-panel {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vh, 34px) clamp(28px, 3vw, 48px);
  background: #fff;
  box-shadow: -16px 0 48px rgba(15, 45, 74, 0.07);
}

.form-wrapper {
  width: min(100%, 500px);
}

.login-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  margin: 0 auto 18px;
}

.login-logo-img {
  display: block;
  width: min(100%, 350px);
  max-height: 88px;
  height: auto;
  object-fit: contain;
}

.login-logo-secondary-img {
  display: block;
  width: min(100%, 260px);
  max-height: 82px;
  height: auto;
  object-fit: contain;
}

.login-heading {
  margin-bottom: 20px;
  text-align: center;
}

.form-wrapper h2 {
  margin: 0 0 6px;
  color: #0b3e70;
  font-size: clamp(1.7rem, 2.4vw, 2rem);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.subtitle {
  margin: 0;
  color: #65788c;
  font-size: 0.94rem;
  line-height: 1.4;
}

.form-group {
  margin-bottom: 13px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: #334e68;
  font-size: 0.77rem;
  font-weight: 700;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid #cbd7e3;
  border-radius: 10px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.input-shell:focus-within {
  border-color: #0b76cf;
  box-shadow: 0 0 0 3px rgba(11, 118, 207, 0.10);
}

.input-icon {
  width: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  color: #315d88;
}

.input-icon svg {
  width: 22px;
  height: 22px;
}

.form-group .input-shell input[type="text"],
.form-group .input-shell input[type="password"] {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 48px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17324a;
  font-size: 0.98rem;
}

.form-group > input[type="text"],
.form-group > input[type="password"] {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #cbd7e3;
  border-radius: 10px;
  outline: 0;
  color: #17324a;
  font-size: 0.98rem;
  background: #fff;
}

.form-group > input:focus {
  border-color: #0b76cf;
  box-shadow: 0 0 0 3px rgba(11, 118, 207, 0.10);
}

.password-field-container {
  position: relative;
}

.toggle-pwd-btn {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #315d88;
  cursor: pointer;
  font-size: 0.95rem;
}

.captcha-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: stretch;
}

.captcha-entry-row > input {
  min-width: 0;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #cbd7e3;
  border-radius: 10px;
  outline: none;
  color: #17324a;
  font-size: 0.98rem;
  text-transform: uppercase;
}

.captcha-entry-row > input:focus {
  border-color: #0b76cf;
  box-shadow: 0 0 0 3px rgba(11, 118, 207, 0.10);
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 7px;
}

#captchaCanvas {
  width: 166px;
  height: 50px;
  border: 1px solid #bdd0e3;
  border-radius: 10px;
  background: #f8fbff;
}

#refreshCaptcha {
  width: 46px;
  height: 50px;
  padding: 0;
  border: 1px solid #cbd7e3;
  border-radius: 10px;
  background: #fff;
  color: #0b4f87;
  cursor: pointer;
  font-size: 1.25rem;
  transition: background .18s ease, border-color .18s ease;
}

#refreshCaptcha:hover {
  background: #f3f8fc;
  border-color: #9db8d1;
}

.btn-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 3px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #0b4f87 0%, #0a74c9 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(11, 91, 153, 0.16);
  transition: transform .18s ease, filter .18s ease;
}

.btn-submit:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: .68;
  cursor: wait;
  transform: none;
}

.login-message {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #9f1d1d;
  font-size: 0.8rem;
  line-height: 1.42;
  text-align: left;
}

.login-message.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.support-container {
  position: relative;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #dbe4ec;
  text-align: center;
}

.support-title {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 12px;
  background: #fff;
  color: #75889a;
  font-size: 0.8rem;
  white-space: nowrap;
}

.support-buttons {
  display: flex;
  justify-content: center;
}

.support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, transform .18s ease;
}

.telegram-btn {
  border: 1px solid #1d9bf0;
  background: #fff;
  color: #087dc1;
}

.telegram-btn:hover {
  background: #f1f9ff;
  transform: translateY(-1px);
}

.access-note {
  margin: 13px 0 0;
  text-align: center;
  color: #8999a8;
  font-size: 0.74rem;
  line-height: 1.35;
}

@media (min-width: 851px) and (max-height: 820px) {
  .right-panel {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .login-logo-container {
    gap: 7px;
    margin-bottom: 11px;
  }

  .login-logo-img {
    width: min(100%, 310px);
    max-height: 70px;
  }

  .login-logo-secondary-img {
    width: min(100%, 225px);
    max-height: 68px;
  }

  .login-heading {
    margin-bottom: 14px;
  }

  .form-wrapper h2 {
    font-size: 1.65rem;
  }

  .subtitle {
    font-size: 0.86rem;
  }

  .form-group {
    margin-bottom: 9px;
  }

  .form-group label {
    margin-bottom: 4px;
  }

  .input-shell,
  .captcha-entry-row > input {
    min-height: 46px;
  }

  .form-group .input-shell input[type="text"],
  .form-group .input-shell input[type="password"] {
    height: 44px;
  }

  #captchaCanvas {
    height: 46px;
  }

  #refreshCaptcha {
    height: 46px;
  }

  .btn-submit {
    min-height: 48px;
  }

  .support-container {
    margin-top: 15px;
    padding-top: 16px;
  }

  .support-btn {
    min-height: 38px;
  }

  .access-note {
    margin-top: 8px;
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: clamp(2.6rem, 4vw, 3.8rem);
  }

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

  .hero-description-secondary {
    font-size: 0.88rem;
  }
}

/* PANTALLA 2: DASHBOARD */
.dashboard-container {
  min-height: 100vh;
  padding: 20px;
}

.outer-app-frame {
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

/* LOGO SUPERIOR CENTRADO ARRIBA DE TODO EL DASHBOARD */
.header-banner-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 22px;
  padding: 8px 0 18px;
  border-bottom: 1px solid #e2e8f0;
}

.header-banner-img {
  display: block;
  width: min(100%, 360px);
  max-height: 110px;
  height: auto;
  object-fit: contain;
}

.user-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #e2e8f0;
  padding: 10px 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.user-status-text {
  font-size: 0.9rem;
  color: #334155;
}

.top-actions-box {
  display: flex;
  gap: 10px;
}

.btn-mis-docs,
.btn-salir {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-mis-docs {
  background: #0284c7;
  color: #fff;
}

.btn-salir {
  background: #ef4444;
  color: #fff;
}

/* PANEL SECTORES */
.panel-card {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 25px;
}

.sector-title {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 700;
  margin-bottom: 12px;
}

.sector-columns {
  display: flex;
  gap: 20px;
}

.col-half {
  flex: 1;
}

.sub-title-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-btn.active,
.nav-btn:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
  font-weight: 600;
}

.divider {
  border: 0;
  border-top: 1px dashed #cbd5e1;
  margin: 15px 0;
}

/* FORMULARIOS */
.dynamic-form {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
}

.form-title {
  font-size: 1.1rem;
  color: #991b1b;
  border-bottom: 2px solid #ef4444;
  padding-bottom: 8px;
  margin-bottom: 15px;
}

.info-yellow-alert {
  background: #fef9c3;
  border-left: 4px solid #eab308;
  padding: 10px;
  font-size: 0.85rem;
  color: #854d0e;
  margin-bottom: 20px;
}

.form-block {
  margin-bottom: 20px;
  background: #f8fafc;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
}

.block-title {
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-row {
  margin-bottom: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-field {
  display: flex;
  flex-direction: column-reverse;
}

.form-field input,
.form-field select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9rem;
  outline: none;
}

.form-field label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}

.citt-display {
  background: #f1f5f9;
  font-weight: bold;
  color: #b91c1c;
}

.time-input-group {
  display: flex;
  gap: 5px;
}

.btn-red-submit {
  width: 100%;
  background: #c81e1e;
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.btn-red-submit:hover {
  background: #9b1c1c;
}

/* TABLA MEDICAMENTOS Y SÍNTOMAS */
.med-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.med-table th,
.med-table td {
  border: 1px solid #cbd5e1;
  padding: 8px;
  text-align: left;
  font-size: 0.85rem;
}

.med-table th {
  background: #e2e8f0;
}

.med-table input,
.med-table select {
  width: 100%;
  padding: 4px;
  border: 1px solid #cbd5e1;
}

.btn-add {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: bold;
}

.btn-remove-row,
.btn-remove-sintoma {
  background: none;
  border: none;
  cursor: pointer;
}

.sintoma-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flex-grow-1 {
  flex: 1;
}

/* DOCUMENTOS SECCIÓN */
.docs-header h3 {
  font-size: 1.1rem;
  color: #0f172a;
}

.docs-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 15px;
}

.docs-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.doc-filter-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.doc-filter-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #0284c7;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
}

.docs-table th,
.docs-table td {
  border: 1px solid #e2e8f0;
  padding: 10px;
  text-align: left;
  font-size: 0.85rem;
}

.docs-table th {
  background: #f8fafc;
}

.btn-delete-doc {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
}

.empty-docs-msg {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
  font-size: 0.9rem;
}

.tag-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}

.tag-paciente {
  background: #e0f2fe;
  color: #0369a1;
}

.tag-mascota {
  background: #fef3c7;
  color: #b45309;
}

/* ADAPTACIÓN RESPONSIVA */
@media (max-width: 850px) {
  .login-container {
    grid-template-columns: 1fr;
  }

  .left-panel {
    min-height: 42vh;
    padding: 34px 22px;
  }

  .right-panel {
    min-height: auto;
    padding: 30px 20px 36px;
  }

  .login-logo-img {
    width: min(100%, 320px);
  }

  .login-logo-secondary-img {
    width: min(100%, 230px);
  }

  .captcha-entry-row {
    grid-template-columns: 1fr;
  }

  .captcha-box {
    justify-content: center;
  }

  .sector-columns {
    flex-direction: column;
  }

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

  .user-info-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .header-banner-img {
    width: min(100%, 330px);
  }

  #docsSection {
    overflow-x: auto;
  }

  .docs-table {
    min-width: 850px;
  }
}

@media (max-width: 520px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-description {
    font-size: 0.88rem;
  }

  .dashboard-container {
    padding: 10px;
  }

  .outer-app-frame {
    padding: 14px;
  }

  .top-actions-box {
    width: 100%;
  }

  .btn-mis-docs,
  .btn-salir {
    flex: 1;
    justify-content: center;
  }

  .support-buttons {
    flex-direction: column;
  }

  .support-btn {
    justify-content: center;
  }

  .captcha-box {
    flex-wrap: wrap;
  }

  .med-table {
    min-width: 720px;
  }

  .form-block {
    overflow-x: auto;
  }
}

/* =========================================================
   REDISEÑO PROFESIONAL DEL DASHBOARD
   Estas reglas mejoran la apariencia sin alterar el JavaScript.
========================================================= */

:root {
  --portal-navy: #0b2942;
  --portal-blue: #075985;
  --portal-blue-light: #0ea5e9;
  --portal-red: #d71920;
  --portal-red-dark: #af141a;
  --portal-green: #16a34a;
  --portal-bg: #eef3f8;
  --portal-card: #ffffff;
  --portal-border: #d9e2ec;
  --portal-muted: #64748b;
  --portal-text: #172033;
  --portal-shadow: 0 18px 45px rgba(15, 39, 64, 0.10);
}

.dashboard-container {
  min-height: 100vh;
  padding: 32px 24px 56px;
  background:
    radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.08), transparent 30%),
    linear-gradient(180deg, #f7fafc 0%, var(--portal-bg) 100%);
}

.dashboard-content {
  width: 100%;
}

.outer-app-frame {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  background: var(--portal-card);
  border: 1px solid rgba(217, 226, 236, 0.9);
  border-radius: 16px;
  box-shadow: var(--portal-shadow);
}

/* Encabezado institucional */
.header-banner-container {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  align-items: center;
  gap: 36px;
  margin: 0;
  padding: 30px 38px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(247,250,252,1) 100%);
  border-bottom: 4px solid var(--portal-red);
}

.header-banner-container::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 36%;
  height: 4px;
  background: var(--portal-blue);
}

.header-banner-img {
  width: 100%;
  max-width: 330px;
  max-height: 105px;
  height: auto;
  object-fit: contain;
  justify-self: center;
}

.dashboard-heading {
  padding-left: 34px;
  border-left: 1px solid var(--portal-border);
}

.dashboard-kicker,
.section-overline {
  display: block;
  margin-bottom: 7px;
  color: var(--portal-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-heading h1 {
  margin: 0;
  color: var(--portal-navy);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.dashboard-subtitle {
  margin: 9px 0 0;
  color: var(--portal-muted);
  font-size: 0.97rem;
  line-height: 1.55;
}

/* Barra de sesión */
.user-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 15px 38px;
  background: #f8fafc;
  border-bottom: 1px solid var(--portal-border);
  border-radius: 0;
}

.session-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-status-dot {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  background: var(--portal-green);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.12);
}

.session-label {
  display: block;
  margin-bottom: 2px;
  color: var(--portal-green);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.user-status-text {
  display: block;
  color: #334155;
  font-size: 0.9rem;
}

.top-actions-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-mis-docs,
.btn-salir {
  min-height: 38px;
  padding: 9px 15px;
  border-radius: 7px;
  font-size: 0.77rem;
  letter-spacing: 0.025em;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.btn-mis-docs {
  background: var(--portal-blue);
}

.btn-salir {
  background: var(--portal-red);
}

.btn-mis-docs:hover,
.btn-salir:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.12);
}

/* Contenido principal */
#mainPanelWrapper,
#docsSection {
  padding: 30px 38px 38px;
}

.panel-card {
  margin-bottom: 28px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 39, 64, 0.055);
}

.module-selector-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  padding: 23px 26px;
  background: linear-gradient(135deg, #fbfdff, #f5f9fc);
  border-bottom: 1px solid var(--portal-border);
}

.module-selector-heading h2 {
  margin: 0;
  color: var(--portal-navy);
  font-size: 1.25rem;
  line-height: 1.25;
}

.module-selector-heading > p {
  max-width: 420px;
  margin: 0;
  color: var(--portal-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.sector-group {
  padding: 22px 26px;
}

.sector-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 15px;
  color: var(--portal-navy);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.sector-title::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--portal-red);
  border-radius: 999px;
}

.sector-columns {
  gap: 22px;
}

.sub-group {
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e5edf4;
  border-radius: 10px;
}

.sub-title-label {
  margin-bottom: 12px;
  color: var(--portal-blue);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.btn-row {
  gap: 10px;
}

.nav-btn {
  min-height: 42px;
  padding: 10px 14px;
  color: #334155;
  background: #fff;
  border: 1px solid #cfdbe6;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(15, 39, 64, 0.04);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.nav-btn .icon-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  background: #fef2f2;
  border-radius: 6px;
}

.nav-btn:hover {
  color: var(--portal-red-dark);
  background: #fff8f8;
  border-color: #ef9a9a;
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(185, 28, 28, 0.08);
}

.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--portal-red), var(--portal-red-dark));
  border-color: var(--portal-red);
  box-shadow: 0 8px 18px rgba(215, 25, 32, 0.19);
}

.nav-btn.active .icon-red {
  background: rgba(255, 255, 255, 0.18);
}

.divider {
  margin: 0 26px;
  border-top: 1px solid #e5edf4;
}

/* Formularios */
.form-section {
  margin-top: 28px;
}

.dynamic-form {
  padding: 0 26px 28px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 39, 64, 0.07);
}

.form-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 -26px 22px;
  padding: 22px 26px;
  background: linear-gradient(135deg, #fff 0%, #fafcfe 100%);
  border-bottom: 1px solid var(--portal-border);
}

.form-title {
  margin: 0;
  padding: 0;
  color: var(--portal-navy);
  border: 0;
  font-size: 1.25rem;
  text-transform: none;
}

.form-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 800;
  white-space: nowrap;
}

.info-yellow-alert {
  margin-bottom: 22px;
  padding: 13px 15px;
  color: #854d0e;
  background: #fffbea;
  border: 1px solid #fde68a;
  border-left: 4px solid #eab308;
  border-radius: 7px;
  line-height: 1.5;
}

.form-block {
  margin-bottom: 22px;
  padding: 21px;
  background: #f8fafc;
  border: 1px solid #e3ebf3;
  border-radius: 10px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  color: var(--portal-navy);
  font-size: 0.78rem;
  letter-spacing: 0.07em;
}

.block-title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--portal-blue-light);
  border-radius: 50%;
}

.form-row {
  margin-bottom: 15px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.grid-2 {
  gap: 18px;
}

.form-field {
  flex-direction: column;
}

.form-field label {
  order: initial;
  margin-bottom: 7px;
  color: #475569;
  font-size: 0.75rem;
  line-height: 1.35;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--portal-text);
  background: #fff;
  border: 1px solid #cbd8e4;
  border-radius: 7px;
  font-size: 0.88rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--portal-blue);
  box-shadow: 0 0 0 3px rgba(7, 89, 133, 0.11);
}

.form-field input::placeholder {
  color: #94a3b8;
}

.citt-display {
  color: var(--portal-red-dark) !important;
  background: #fff7f7 !important;
  border-color: #f3b7ba !important;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.time-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 8px;
}

.btn-red-submit {
  min-height: 52px;
  margin-top: 6px;
  padding: 14px 22px;
  background: linear-gradient(135deg, var(--portal-red), var(--portal-red-dark));
  border-radius: 8px;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(215, 25, 32, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-red-submit:hover {
  background: linear-gradient(135deg, #c9151c, #991116);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(215, 25, 32, 0.24);
}

/* Tablas */
.med-table,
.docs-table {
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
}

.med-table th,
.docs-table th {
  padding: 11px 10px;
  color: #334155;
  background: #edf3f8;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.med-table td,
.docs-table td {
  padding: 10px;
  background: #fff;
}

.btn-add {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 7px;
}

/* Sección documentos */
#docsSection.panel-card {
  padding: 25px;
}

.docs-header h3 {
  color: var(--portal-navy);
  font-size: 1.25rem;
}

.docs-header p {
  margin-top: 5px;
  color: var(--portal-muted);
}

/* Responsive */
@media (max-width: 920px) {
  .dashboard-container {
    padding: 18px 12px 40px;
  }

  .header-banner-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 26px 24px;
    text-align: center;
  }

  .dashboard-heading {
    padding: 20px 0 0;
    border-top: 1px solid var(--portal-border);
    border-left: 0;
  }

  .user-info-bar {
    padding: 15px 24px;
  }

  #mainPanelWrapper,
  #docsSection {
    padding: 24px;
  }

  .module-selector-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .module-selector-heading > p {
    max-width: none;
  }
}

@media (max-width: 650px) {
  .outer-app-frame {
    border-radius: 10px;
  }

  .user-info-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions-box {
    width: 100%;
  }

  .btn-mis-docs,
  .btn-salir {
    flex: 1;
    justify-content: center;
  }

  #mainPanelWrapper,
  #docsSection {
    padding: 16px;
  }

  .panel-card,
  .dynamic-form {
    border-radius: 9px;
  }

  .module-selector-heading,
  .sector-group {
    padding-left: 18px;
    padding-right: 18px;
  }

  .divider {
    margin-left: 18px;
    margin-right: 18px;
  }

  .dynamic-form {
    padding-left: 16px;
    padding-right: 16px;
  }

  .form-heading-row {
    align-items: flex-start;
    flex-direction: column;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .form-status-badge {
    align-self: flex-start;
  }

  .form-block {
    padding: 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   JERARQUÍA VISUAL INSTITUCIONAL
   Niveles diferenciados para una interfaz gubernamental.
========================================================= */

:root {
  --institutional-red: #b91c1c;
  --institutional-red-dark: #991b1b;
  --institutional-red-soft: rgba(185, 28, 28, 0.25);
  --institutional-border: #d8dee6;
  --institutional-bg-soft: #fafafa;
  --institutional-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* NIVEL 1: contenedor principal */
.panel-card--primary {
  border: 2px solid var(--institutional-red-dark);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--institutional-shadow);
}

/* Contenedor principal de selección de documentos */
.panel-card--selector {
  border: 1.5px solid var(--institutional-red);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(153, 27, 27, 0.06);
}

/* NIVEL 2: sectores institucionales */
.sector-card {
  position: relative;
  margin: 24px;
  padding: 20px;
  background: var(--institutional-bg-soft);
  border: 1px solid rgba(185, 28, 28, 0.32);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.035);
}

.sector-card + .divider {
  display: none;
}

.sector-card .sector-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin: -4px 0 18px;
  padding: 10px 14px 10px 18px;
  color: #334155;
  background: #ffffff;
  border: 1px solid rgba(185, 28, 28, 0.24);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025);
}

.sector-card .sector-title::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 4px;
  height: auto;
  background: var(--institutional-red);
  border-radius: 0 4px 4px 0;
}

.sector-card .sector-title::after {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  margin-left: auto;
  color: var(--institutional-red-dark);
  background: #fff1f2;
  border: 1px solid rgba(185, 28, 28, 0.15);
  border-radius: 50%;
  font-size: 0.9rem;
}

.sector-card:nth-of-type(1) .sector-title::after {
  content: "▦";
}

.sector-card:nth-of-type(2) .sector-title::after {
  content: "▣";
}

.sector-card:nth-of-type(3) .sector-title::after {
  content: "✚";
}

/* NIVEL 3: módulos MINSA, ESSALUD y clínicas */
.module-card {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--institutional-red-soft);
  border-radius: 9px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.module-card .sub-title-label {
  margin-bottom: 12px;
  color: var(--institutional-red-dark);
  font-weight: 700;
  letter-spacing: 0.055em;
}

.sector-columns {
  gap: 24px;
}

/* NIVEL 4: formularios y bloques internos */
.form-card {
  border: 1px solid var(--institutional-border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--institutional-shadow);
}

.form-block {
  margin-bottom: 24px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--institutional-border);
  border-radius: 9px;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.025);
}

.form-block + .form-block {
  margin-top: 4px;
}

.form-heading-row {
  background: #ffffff;
  border-bottom: 1px solid var(--institutional-border);
}

.info-yellow-alert {
  border: 1px solid #f3df8f;
  border-left: 4px solid #d4a800;
  border-radius: 8px;
  background: #fffdf2;
  box-shadow: none;
}

/* Inputs: neutros en reposo, rojo únicamente en focus */
.form-field input,
.form-field select,
.form-field textarea,
.form-group input[type="text"],
.form-group input[type="password"] {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: none;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.form-group input:focus {
  border-color: var(--institutional-red);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
}

/* Botones y grupos sin competir con los paneles */
.btn-row,
.docs-filter-bar,
.support-buttons {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.nav-btn {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.035);
}

.nav-btn:hover {
  border-color: rgba(185, 28, 28, 0.45);
  background: #fffafa;
}

.nav-btn.active {
  border-color: var(--institutional-red);
  background: linear-gradient(
    135deg,
    var(--institutional-red),
    var(--institutional-red-dark)
  );
}

/* Tablas y resultados */
.med-table,
.docs-table {
  border: 1px solid var(--institutional-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.03);
}

.med-table th,
.docs-table th {
  background: #f3f5f7;
  color: #334155;
  border-color: var(--institutional-border);
}

.med-table td,
.docs-table td {
  background: #ffffff;
  border-color: var(--institutional-border);
}

.docs-filter-bar {
  padding: 12px 0;
  border-bottom: 1px solid var(--institutional-border);
}

.empty-docs-msg {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fafafa;
}

/* Perfil de sesión */
.session-user {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.user-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #164e72;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(7, 89, 133, 0.10);
}

.user-avatar-icon {
  display: block;
}

.session-copy {
  min-width: 0;
}

.session-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.session-status-line .session-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.11);
}

.session-status-line .session-label {
  margin: 0;
  line-height: 1.2;
}

.session-copy .user-status-text {
  overflow-wrap: anywhere;
}

/* Mayor respiración entre áreas */
.form-section {
  margin-top: 32px;
}

.dynamic-form {
  padding-bottom: 30px;
}

.module-selector-heading {
  padding-top: 24px;
  padding-bottom: 24px;
}

/* Responsive: conserva la adaptación existente */
@media (max-width: 850px) {
  .sector-card {
    margin: 18px;
    padding: 18px;
  }

  .sector-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .module-card {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .sector-card {
    margin: 13px;
    padding: 15px;
  }

  .sector-card .sector-title {
    align-items: flex-start;
    min-height: 40px;
    padding-right: 10px;
  }

  .module-card {
    padding: 15px;
  }

  .form-block {
    padding: 16px;
  }

  .session-user {
    width: 100%;
  }

  .user-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .top-actions-box {
    min-width: 0;
    flex-wrap: wrap;
  }

  .btn-mis-docs,
  .btn-salir {
    min-width: 125px;
  }
}

@media (max-width: 420px) {
  .sector-card {
    margin: 10px;
  }

  .sector-card .sector-title::after {
    display: none;
  }

  .session-user {
    align-items: flex-start;
  }

  .user-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .user-avatar-icon {
    width: 24px;
    height: 24px;
  }

  .top-actions-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .btn-mis-docs,
  .btn-salir {
    min-width: 0;
    width: 100%;
  }
}
/* CAMPOS ADICIONALES DEL CERTIFICADO ESSALUD */
.form-field textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  color: #172033;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.88rem;
  line-height: 1.45;
  resize: vertical;
  outline: none;
  box-shadow: none;
}

.form-field textarea:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.10);
}
/* IMAGEN COMBINADA DE FIRMA Y SELLO DEL CERTIFICADO ESSALUD */
.certificado-firma-sello {
  display: block;
  max-width: 100%;
  height: auto;
}
/* =========================================================
   PORTAL DE SALUD V9.2 — DASHBOARD Y PERFIL
   ========================================================= */
.dashboard-container {
  min-height: 100vh;
  padding: 0;
  background: #f5f7fb;
}

.dashboard-content {
  width: 100%;
  min-height: 100vh;
}

.outer-app-frame.panel-card--primary {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #f5f7fb;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-items: start;
}

.portal-sidebar {
  grid-column: 1;
  grid-row: 1 / -1;
  min-height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #123f69 0%, #0b3155 100%);
  color: #fff;
  padding: 22px 12px 20px;
  box-shadow: 7px 0 22px rgba(15, 23, 42, .08);
  z-index: 6;
}

.sidebar-brand {
  padding: 4px 12px 22px;
  border-bottom: 1px solid rgba(255,255,255,.13);
  margin-bottom: 18px;
}

.sidebar-logo {
  display: block;
  width: 190px;
  max-width: 100%;
  height: 58px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: .96;
}

.sidebar-caption {
  display: block;
  margin-top: 6px;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.88);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: #fff;
  background: rgba(52, 152, 219, .32);
}

.sidebar-link:hover {
  transform: translateX(2px);
}

.sidebar-footer {
  margin-top: auto;
  padding: 18px 8px 4px;
  border-top: 1px solid rgba(255,255,255,.13);
}

.sidebar-footer p {
  margin: 14px 8px 0;
  color: rgba(255,255,255,.55);
  font-size: .72rem;
  line-height: 1.45;
}

.sidebar-logout {
  color: #fff;
}

.header-banner-container {
  grid-column: 2;
  grid-row: 1;
  min-height: 96px;
  margin: 0;
  padding: 14px 28px;
  background: #fff;
  border: 0;
  border-bottom: 1px solid #e5eaf1;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 24px;
  align-items: center;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 8;
}

.header-brand-cluster {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 430px;
}

.header-banner-img {
  width: 238px;
  max-height: 66px;
  margin: 0;
  object-fit: contain;
}

.header-portal-img {
  width: 170px;
  max-height: 62px;
  object-fit: contain;
}

.header-divider {
  width: 1px;
  height: 48px;
  background: #d7dee8;
}

.dashboard-heading {
  min-width: 0;
}

.dashboard-heading h1 {
  margin: 0 0 5px;
  color: #12345b;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 750;
  white-space: normal;
}

.dashboard-subtitle {
  margin: 0;
  color: #58708d;
  font-size: .82rem;
}

.header-account-area {
  position: relative;
  justify-self: end;
}

.user-menu-button {
  border: 0;
  background: transparent;
  padding: 5px 7px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #12345b;
}

.user-menu-button:hover,
.user-menu-button[aria-expanded="true"] {
  background: #f0f5fa;
}

.header-avatar-wrap,
.profile-menu-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8f0f8;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d9e2ec;
}

.profile-menu-avatar-wrap {
  width: 62px;
  height: 62px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.profile-avatar-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 800;
  font-size: 1.08rem;
  color: #0f5b94;
  background: linear-gradient(135deg, #d9ecfb, #edf6fd);
}

.profile-avatar-fallback--large {
  font-size: 1.35rem;
}

.header-user-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 88px;
}

.header-user-copy strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .92rem;
}

.header-user-copy small {
  color: #75879a;
  font-size: .7rem;
}

.header-user-chevron {
  font-size: 1.2rem;
  color: #3b6b91;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .18);
  z-index: 50;
}

.profile-menu-header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid #e8edf3;
}

.profile-menu-header > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-menu-header strong {
  color: #12345b;
  overflow-wrap: anywhere;
}

.profile-menu-header span {
  color: #708398;
  font-size: .78rem;
}

.profile-photo-button,
.profile-menu-action {
  width: 100%;
  min-height: 40px;
  border-radius: 9px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
}

.profile-photo-button {
  border: 1px solid #4aa3e4;
  background: #f7fbff;
  color: #0879c9;
}

.profile-menu-action {
  margin-top: 8px;
  border: 1px solid #dce4ec;
  background: #fff;
  color: #41566e;
}

.profile-menu-action--danger {
  color: #b42318;
  border-color: #f1c5c1;
  background: #fffafa;
}

.profile-photo-status {
  min-height: 0;
  margin: 10px 2px 0;
  color: #58708d;
  font-size: .73rem;
  line-height: 1.4;
}

.dashboard-topline {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  border-radius: 0;
  background: #fff;
  border-bottom: 1px solid #e7edf4;
  padding: 8px 30px;
  display: flex;
  justify-content: space-between;
  color: #61758a;
  font-size: .78rem;
}

.dashboard-topline > div:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dashboard-home,
#mainPanelWrapper,
#docsSection {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

.dashboard-home {
  padding: 30px;
}

.dashboard-welcome-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}

.dashboard-welcome-row h2 {
  margin: 0 0 8px;
  color: #102f55;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
}

.dashboard-welcome-row p {
  margin: 0;
  max-width: 820px;
  color: #526b84;
  line-height: 1.55;
  font-size: .94rem;
}

.dashboard-clock-card {
  padding: 16px 18px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8ef;
  text-align: center;
  box-shadow: 0 6px 16px rgba(18,52,91,.05);
}

.dashboard-clock-card strong {
  display: block;
  color: #12345b;
  font-size: 1.35rem;
}

.dashboard-clock-card span {
  color: #73869a;
  font-size: .74rem;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-stat-card {
  min-height: 116px;
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 6px 18px rgba(18,52,91,.04);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #e3f1fc;
  color: #0878c8;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 900;
}

.stat-icon--green {
  background: #e2f7ea;
  color: #13944e;
}

.stat-icon--purple {
  background: #efe8ff;
  color: #6840cf;
}

.dashboard-stat-card div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-stat-card strong {
  color: #102f55;
  font-size: 1.7rem;
}

.dashboard-stat-card span:last-child {
  color: #58708d;
  font-size: .82rem;
}

.dashboard-panel {
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(18,52,91,.04);
}

.dashboard-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-panel-heading h3 {
  margin: 0;
  color: #12345b;
  font-size: 1rem;
}

.dashboard-link-button {
  border: 0;
  background: transparent;
  color: #0878c8;
  font-weight: 700;
  cursor: pointer;
}

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

.quick-action-card {
  min-height: 126px;
  border: 0;
  border-radius: 10px;
  padding: 18px 14px;
  background: #eef7fe;
  color: #0878c8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15,23,42,.08);
}

.quick-action-card > span {
  font-size: 1.6rem;
  font-weight: 900;
}

.quick-action-card strong {
  font-size: .88rem;
}

.quick-action-card small {
  color: #61758a;
  font-size: .75rem;
  line-height: 1.35;
}

.quick-action-card--green {
  background: #edf9f1;
  color: #12914c;
}

.quick-action-card--purple {
  background: #f2edff;
  color: #6840cf;
}

.quick-action-card--neutral {
  background: #f2f5f8;
  color: #244765;
}

.dashboard-table-wrap {
  overflow-x: auto;
}

.dashboard-recent-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.dashboard-recent-table th,
.dashboard-recent-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  font-size: .78rem;
  color: #294661;
}

.dashboard-recent-table th {
  background: #f6f8fb;
  color: #4f657c;
  font-weight: 700;
}

.dashboard-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f7ed;
  color: #16824a;
  font-size: .72rem;
  font-weight: 800;
}

.dashboard-empty-state {
  padding: 22px 10px 10px;
  text-align: center;
  color: #7b8ea2;
  font-size: .82rem;
}

.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
}

.dashboard-info-card {
  background: #fff;
  border: 1px solid #e2e8ef;
  border-radius: 12px;
  padding: 18px;
}

.dashboard-info-card h3 {
  margin: 0 0 8px;
  color: #12345b;
  font-size: .95rem;
}

.dashboard-info-card p {
  margin: 0;
  color: #61758a;
  font-size: .8rem;
  line-height: 1.55;
}

.dashboard-telegram-button {
  display: inline-flex;
  margin-top: 4px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #2997e4;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  color: #0878c8;
  font-weight: 750;
  text-decoration: none;
  background: #f8fcff;
}

#mainPanelWrapper,
#docsSection {
  margin: 0;
  padding: 28px 30px;
}

#mainPanelWrapper > .panel-card,
#docsSection.panel-card {
  margin: 0 0 22px;
}

@media (max-width: 1280px) {
  .outer-app-frame.panel-card--primary {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .header-banner-container {
    padding-left: 20px;
    padding-right: 20px;
    gap: 16px;
  }

  .header-brand-cluster {
    min-width: 345px;
    gap: 12px;
  }

  .header-banner-img { width: 190px; }
  .header-portal-img { width: 138px; }
  .dashboard-home { padding: 24px; }
}

@media (max-width: 1020px) {
  .outer-app-frame.panel-card--primary {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .portal-sidebar {
    padding-left: 8px;
    padding-right: 8px;
  }

  .sidebar-brand {
    padding-left: 4px;
    padding-right: 4px;
  }

  .sidebar-logo {
    width: 54px;
    object-fit: cover;
    object-position: right center;
  }

  .sidebar-caption,
  .sidebar-link span,
  .sidebar-footer p {
    display: none;
  }

  .sidebar-link {
    justify-content: center;
    font-size: 1.2rem;
    padding: 12px 8px;
  }

  .header-brand-cluster {
    min-width: 0;
  }

  .header-banner-img { width: 150px; }
  .header-portal-img { width: 105px; }
  .header-divider { height: 38px; }

  .dashboard-heading {
    display: none;
  }

  .header-banner-container {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .outer-app-frame.panel-card--primary {
    display: block;
  }

  .portal-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    min-height: auto;
    height: 70px;
    z-index: 30;
    padding: 6px 8px;
    display: block;
  }

  .sidebar-brand,
  .sidebar-footer {
    display: none;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
  }

  .sidebar-link {
    min-height: 56px;
    padding: 7px 4px;
    font-size: 1.1rem;
  }

  .sidebar-nav .sidebar-link:nth-child(7) {
    display: none;
  }

  .header-banner-container {
    position: sticky;
    top: 0;
    min-height: 74px;
    padding: 8px 12px;
  }

  .header-banner-img {
    width: 130px;
  }

  .header-portal-img,
  .header-divider {
    display: none;
  }

  .header-user-copy small,
  .header-user-chevron {
    display: none;
  }

  .header-user-copy strong {
    max-width: 92px;
  }

  .user-menu-dropdown {
    position: fixed;
    top: 76px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .dashboard-topline {
    padding: 7px 14px;
  }

  .dashboard-home,
  #mainPanelWrapper,
  #docsSection {
    padding: 18px 14px 92px;
  }

  .dashboard-welcome-row {
    grid-template-columns: 1fr;
  }

  .dashboard-clock-card {
    justify-self: start;
    min-width: 160px;
  }

  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }

  .quick-action-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-action-card {
    min-height: 112px;
  }
}

@media (max-width: 460px) {
  .header-banner-img { width: 105px; }
  .header-avatar-wrap { width: 42px; height: 42px; }
  .header-user-copy { display: none; }
  .quick-action-grid { grid-template-columns: 1fr; }
}

/* ===== HOTFIX V9.3 – DASHBOARD EXACTO ===== */
.header-actions-cluster {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 18px;
}

.header-bell-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  position: relative;
  cursor: pointer;
  color: #12345b;
  display: grid;
  place-items: center;
}

.header-bell-button:hover { background: #f0f5fa; }
.header-bell-icon { font-size: 1.35rem; line-height: 1; }
.header-bell-dot {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}

.dashboard-topline, .user-info-bar { display: none !important; }
.dashboard-home { padding: 28px 28px 18px; }
.dashboard-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 298px;
  gap: 18px;
  align-items: start;
}
.dashboard-main-column, .dashboard-side-column {
  min-width: 0;
}
.dashboard-side-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dashboard-welcome-row {
  margin-bottom: 18px;
  grid-template-columns: minmax(0, 1fr) 220px;
}
.dashboard-welcome-row p {
  max-width: 860px;
  font-size: .96rem;
}
.dashboard-date-clock-wrap { display:flex; flex-direction:column; gap:12px; align-items:stretch; }
.dashboard-current-date {
  color: #173964;
  font-size: .92rem;
  text-align: right;
}
.dashboard-clock-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 94px;
}
.dashboard-clock-card > div { display:flex; flex-direction:column; }
.clock-icon { font-size: 1.65rem; color:#12345b; }
.dashboard-clock-card strong { font-size: 1.5rem; }
.dashboard-clock-card span { font-size: .76rem; }
.dashboard-stat-grid { gap: 18px; margin-bottom: 18px; }
.dashboard-stat-card { min-height: 112px; border-radius: 14px; }
.dashboard-stat-card strong { font-size: 1.55rem; }
.dashboard-panel { border-radius: 14px; }
.quick-action-card { min-height: 140px; border-radius: 12px; }
.quick-action-card strong { font-size: .98rem; }
.quick-action-card small { font-size: .8rem; max-width: 170px; }
.dashboard-recent-table { min-width: 100%; }
.dashboard-recent-table th, .dashboard-recent-table td { font-size: .82rem; }
.dashboard-recent-table td strong { color:#173964; }
.dashboard-action-icons {
  display:flex;
  align-items:center;
  gap: 8px;
}
.table-icon-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #edf5ff;
  color: #1b67c9;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: .88rem;
}
.table-icon-btn:hover { background: #dfeeff; }
.dashboard-status-badge {
  min-width: 68px;
  justify-content: center;
}
.dashboard-info-card {
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(18,52,91,.04);
}
.dashboard-info-card h3 {
  font-size: .97rem;
  display:flex;
  align-items:center;
  gap:10px;
}
.dashboard-info-card--blue h3::before,
.dashboard-info-card--support h3::before,
.dashboard-info-card--green h3::before {
  content: "📣";
  font-size: 1.1rem;
}
.dashboard-info-card--green h3::before { content: "🛡"; }
.dashboard-info-card--support h3::before { content: "📣"; }
.info-box {
  border-radius: 12px;
  padding: 16px 18px;
}
.info-box strong {
  display:block;
  margin-bottom: 9px;
  color:#16365c;
}
.info-box p { font-size: .82rem; }
.info-box--soft-blue { background:#eef5ff; }
.support-hours {
  margin-top: 16px;
  display:flex;
  flex-direction:column;
  gap:4px;
  color:#58708d;
  font-size:.83rem;
}
.dashboard-quote-card {
  text-align:center;
  background:#f5f8fc;
}
.dashboard-quote-card blockquote {
  margin:0 0 14px;
  color:#12345b;
  font-weight:700;
  line-height:1.55;
}
.dashboard-quote-card p {
  color:#6c8096;
  font-size:.88rem;
}
.dashboard-footer-links {
  margin-top: 28px;
  padding: 8px 2px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  color:#708398;
  font-size:.78rem;
}
.dashboard-footer-links > div {
  display:flex;
  gap:24px;
  flex-wrap:wrap;
}
.dashboard-footer-links a {
  color:#708398;
  text-decoration:none;
}
.dashboard-footer-links a:hover { color:#1b67c9; }
.sidebar-brand {
  padding: 4px 12px 18px;
}
.sidebar-logo {
  width: 150px;
  height: auto;
}
.sidebar-caption {
  margin-top: 8px;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.82);
}
.sidebar-footer {
  padding: 22px 10px 8px;
}
.sidebar-footer::before {
  content: "";
  display: block;
  height: 160px;
  margin: 0 6px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13,31,53,.05), rgba(13,31,53,.35)), url('../images/inicio_1.png') center/cover no-repeat;
}
.sidebar-footer p {
  margin: 10px 8px 0;
  color: rgba(255,255,255,.88);
  font-size: .78rem;
}
.sidebar-footer p::before {
  content: "PORTAL DE SALUD\AGestión documental segura";
  white-space: pre;
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.profile-menu-action--danger {
  justify-content: flex-start;
}
.profile-menu-action {
  justify-content: flex-start;
}
.profile-photo-button {
  justify-content:center;
}
@media (max-width: 1180px) {
  .dashboard-overview-grid { grid-template-columns: 1fr; }
  .dashboard-side-column { grid-row: 4; }
}
@media (max-width: 1020px) {
  .header-actions-cluster { gap: 10px; }
  .dashboard-welcome-row { grid-template-columns: 1fr; }
  .dashboard-date-clock-wrap { align-items: flex-start; }
  .dashboard-current-date { text-align: left; }
}
@media (max-width: 720px) {
  .dashboard-footer-links { flex-direction: column; align-items:flex-start; padding-bottom: 86px; }
  .dashboard-overview-grid { gap: 14px; }
  .dashboard-side-column { gap: 14px; }
}

/* =========================================================
   PORTAL DE SALUD PORTAL DE SALUD DEMO — REDISEÑO V9.4
   ========================================================= */
:root {
  --navy-950: #0b2744;
  --navy-900: #0f365e;
  --navy-800: #164a7b;
  --blue-600: #0b79d0;
  --blue-500: #1788df;
  --blue-100: #eaf5ff;
  --green-600: #16934f;
  --green-100: #e8f8ee;
  --purple-600: #6c45d4;
  --purple-100: #f0ebff;
  --slate-900: #102a43;
  --slate-700: #334e68;
  --slate-600: #526b84;
  --slate-500: #6f8296;
  --slate-300: #dce5ef;
  --slate-200: #e7edf4;
  --slate-100: #f2f6fa;
  --page: #f5f8fc;
  --white: #ffffff;
  --radius-card: 12px;
  --shadow-soft: 0 8px 24px rgba(15, 54, 94, 0.055);
  --sidebar-width: 270px;
  --right-col: 300px;
  --header-height: 96px;
}

html { background: var(--page); }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--page);
  color: var(--slate-900);
}
button, input, select, textarea { font: inherit; }
button, a, label[for] { -webkit-tap-highlight-color: transparent; }

/* LOGIN: identidad propia / demo */
.login-container { background: #fff; }
.left-panel {
  background:
    radial-gradient(circle at 20% 22%, rgba(47, 154, 230, .24), transparent 34%),
    radial-gradient(circle at 80% 74%, rgba(68, 196, 160, .15), transparent 28%),
    linear-gradient(145deg, #123f69 0%, #0c3155 55%, #0a2948 100%);
}
.left-panel .overlay { background: linear-gradient(90deg, rgba(7,38,68,.28), rgba(7,38,68,.06)); }
.hero-kicker { color: rgba(255,255,255,.82); letter-spacing: .12em; }
.hero-title { font-size: clamp(2.15rem, 4vw, 4rem); line-height: 1.02; letter-spacing: -.03em; }
.hero-description { max-width: 700px; font-size: 1rem; line-height: 1.65; color: rgba(255,255,255,.9); }
.login-brand { display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:28px; color:var(--navy-900); }
.login-brand > div { display:flex; flex-direction:column; line-height:1.05; }
.login-brand strong { font-size:1.15rem; letter-spacing:.08em; }
.login-brand span:not(.brand-symbol) { margin-top:4px; font-size:.76rem; color:var(--slate-500); font-weight:700; letter-spacing:.07em; }
.brand-symbol { width:44px; height:44px; border-radius:12px; background:linear-gradient(145deg,#e8f5ff,#d8edff); color:var(--blue-600); display:grid; place-items:center; flex:0 0 auto; }
.brand-symbol svg { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* Estructura principal */
.dashboard-container, .dashboard-content { min-height:100vh; background:var(--page); }
.outer-app-frame.panel-card--primary {
  display:grid;
  grid-template-columns: var(--sidebar-width) minmax(0,1fr);
  grid-template-rows: var(--header-height) minmax(0,1fr);
  width:100%; max-width:none; min-height:100vh; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; background:var(--page);
}

/* Sidebar */
.portal-sidebar {
  grid-column:1; grid-row:1 / -1;
  position:sticky; top:0; z-index:30;
  min-height:100vh; height:100vh;
  padding:18px 14px 16px;
  display:flex; flex-direction:column;
  color:#fff;
  background:linear-gradient(180deg,#123f69 0%,#0d355d 56%,#0a2a4a 100%);
  box-shadow:none;
  overflow-y:auto;
}
.sidebar-brand { padding:6px 10px 20px; border-bottom:1px solid rgba(255,255,255,.15); margin-bottom:16px; }
.sidebar-brand-row { display:flex; align-items:center; gap:11px; }
.sidebar-brand-row .brand-symbol { width:42px; height:42px; border-radius:11px; background:rgba(255,255,255,.1); color:#75c7ff; box-shadow:inset 0 0 0 1px rgba(255,255,255,.12); }
.sidebar-brand-row .brand-symbol svg { width:25px; height:25px; }
.sidebar-brand-row > div { min-width:0; display:flex; flex-direction:column; }
.sidebar-brand-row strong { font-size:.93rem; font-weight:750; letter-spacing:.015em; color:#fff; }
.sidebar-brand-row div span { margin-top:2px; width:max-content; padding:2px 6px; border-radius:999px; background:rgba(105,195,255,.14); color:#9dd9ff; font-size:.62rem; font-weight:800; letter-spacing:.11em; }
.sidebar-caption { display:block; margin-top:11px; color:rgba(255,255,255,.67); font-size:.72rem; letter-spacing:.085em; text-transform:uppercase; }
.sidebar-nav { display:flex; flex-direction:column; gap:5px; }
.sidebar-link {
  width:100%; min-height:52px; padding:12px 14px;
  border:0; border-radius:10px; background:transparent;
  color:rgba(255,255,255,.9); display:flex; align-items:center; gap:13px;
  font-size:.95rem; font-weight:520; text-align:left; cursor:pointer;
  transition:background .2s ease,color .2s ease,transform .2s ease;
}
.sidebar-link:hover { background:rgba(255,255,255,.08); color:#fff; transform:translateX(2px); }
.sidebar-link.active { background:linear-gradient(90deg,rgba(31,135,207,.72),rgba(30,124,190,.5)); color:#fff; box-shadow:inset 0 0 0 1px rgba(255,255,255,.04); }
.side-icon { width:25px; height:25px; display:grid; place-items:center; flex:0 0 auto; color:#d7edff; }
.side-icon svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sidebar-separator { height:1px; background:rgba(255,255,255,.17); margin:9px 12px 7px; }
.sidebar-logout { margin-top:2px; }
.sidebar-media-card {
  position:relative; min-height:170px; margin:18px 4px 0; border-radius:14px; overflow:hidden;
  background:url('../images/inicio_1.png') 8% center / cover no-repeat;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
  margin-top:auto;
}
.sidebar-media-overlay { position:absolute; inset:0; background:linear-gradient(180deg,rgba(4,30,54,.08),rgba(5,31,55,.94)); }
.sidebar-media-copy { position:absolute; left:16px; right:16px; bottom:16px; display:flex; flex-direction:column; gap:3px; }
.sidebar-media-copy strong { color:#fff; font-size:.84rem; letter-spacing:.03em; }
.sidebar-media-copy span { color:rgba(255,255,255,.78); font-size:.72rem; }

/* Header */
.header-banner-container {
  grid-column:2; grid-row:1;
  min-height:var(--header-height); height:var(--header-height);
  position:sticky; top:0; z-index:25;
  margin:0; padding:0 28px;
  background:#fff; border:0; border-bottom:1px solid var(--slate-200);
  display:grid; grid-template-columns:auto minmax(260px,1fr) auto; align-items:center; gap:22px; text-align:left;
}
.header-brand-cluster { min-width:430px; display:flex; align-items:center; gap:15px; }
.header-divider { width:1px; height:52px; background:#dbe3ec; flex:0 0 auto; }
.header-portal-wordmark { display:flex; flex-direction:column; min-width:190px; line-height:1.04; }
.header-portal-wordmark strong { color:#0e4678; font-size:1.24rem; font-weight:850; letter-spacing:.005em; }
.header-portal-wordmark small { margin-top:4px; width:max-content; padding:2px 6px; border-radius:999px; background:#eef7ff; color:#1788df; font-size:.6rem; font-weight:800; letter-spacing:.12em; }
.dashboard-heading { min-width:0; }
.dashboard-heading h1 { margin:0 0 5px; color:var(--navy-900); font-size:1.08rem; font-weight:750; }
.dashboard-subtitle { margin:0; color:var(--slate-500); font-size:.8rem; }
.header-actions-cluster { justify-self:end; display:flex; align-items:center; gap:16px; }
.header-bell-button { width:42px; height:42px; border:0; border-radius:50%; background:transparent; color:var(--navy-900); display:grid; place-items:center; position:relative; cursor:pointer; transition:background .2s ease; }
.header-bell-button:hover { background:#f1f6fa; }
.header-bell-button svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.header-bell-dot { position:absolute; top:7px; right:7px; width:9px; height:9px; border-radius:50%; background:#ef4444; border:2px solid #fff; }
.header-account-area { position:relative; }
.user-menu-button { min-height:56px; padding:5px 6px 5px 7px; border:0; border-radius:12px; background:transparent; display:flex; align-items:center; gap:10px; color:var(--navy-900); cursor:pointer; transition:background .2s ease; }
.user-menu-button:hover,.user-menu-button[aria-expanded="true"] { background:#f3f7fb; }
.header-avatar-wrap,.profile-menu-avatar-wrap { width:48px; height:48px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#eaf2fa; border:2px solid #fff; box-shadow:0 0 0 1px #d5e0ea; flex:0 0 auto; }
.profile-menu-avatar-wrap { width:64px; height:64px; }
.profile-avatar-img { width:100%; height:100%; object-fit:cover; display:block; }
.profile-avatar-fallback { width:100%; height:100%; display:grid; place-items:center; background:linear-gradient(145deg,#d9ecfb,#eef7ff); color:#0d6caf; font-weight:850; }
.profile-avatar-fallback--large { font-size:1.3rem; }
.header-user-copy { min-width:110px; display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
.header-user-copy strong { max-width:170px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.header-user-copy small { color:var(--slate-500); font-size:.69rem; }
.header-user-chevron { color:#376c99; font-size:1.05rem; }
.user-menu-dropdown { position:absolute; top:calc(100% + 8px); right:0; width:300px; padding:14px; background:#fff; border:1px solid #dbe4ed; border-radius:12px; box-shadow:0 18px 48px rgba(15,42,67,.16); z-index:60; }
.profile-menu-header { display:flex; align-items:center; gap:12px; padding-bottom:13px; margin-bottom:10px; border-bottom:1px solid #e7edf4; }
.profile-menu-header > div { min-width:0; display:flex; flex-direction:column; gap:3px; }
.profile-menu-header strong { color:var(--navy-900); font-size:.94rem; overflow-wrap:anywhere; }
.profile-menu-header span { color:var(--slate-500); font-size:.75rem; }
.profile-photo-button,.profile-menu-action { width:100%; min-height:40px; padding:9px 11px; border-radius:8px; display:flex; align-items:center; gap:9px; justify-content:flex-start; font-size:.82rem; font-weight:700; cursor:pointer; transition:background .2s ease,border-color .2s ease; }
.profile-photo-button { justify-content:center; color:#0878c8; background:#f7fbff; border:1px solid #55a9e6; }
.profile-photo-button:hover { background:#eef8ff; }
.profile-menu-action { margin-top:7px; color:#334e68; background:#fff; border:1px solid #dde6ef; }
.profile-menu-action:hover { background:#f7f9fc; }
.profile-menu-action--danger { color:#c62828; background:#fffafa; border-color:#f0cdcd; }
.profile-photo-status { margin:9px 2px 0; min-height:0; color:var(--slate-500); font-size:.71rem; line-height:1.35; }
.mobile-menu-button { display:none; width:42px; height:42px; border:0; border-radius:9px; background:#f1f6fa; color:var(--navy-900); cursor:pointer; }
.mobile-menu-button svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }

/* Home / main */
.dashboard-home,#mainPanelWrapper,#docsSection { grid-column:2; grid-row:2; min-width:0; }
.dashboard-home { padding:26px 28px 16px; background:var(--page); }
.dashboard-overview-grid { display:grid; grid-template-columns:minmax(0,1fr) var(--right-col); gap:18px; align-items:start; }
.dashboard-main-column,.dashboard-side-column { min-width:0; }
.dashboard-side-column { display:flex; flex-direction:column; gap:16px; }
.dashboard-welcome-row { display:grid; grid-template-columns:minmax(0,1fr) 220px; align-items:start; gap:20px; margin-bottom:18px; }
.dashboard-welcome-copy h2 { margin:0 0 7px; color:#102f55; font-size:clamp(1.85rem,2.2vw,2.15rem); line-height:1.1; font-weight:750; letter-spacing:-.02em; }
.dashboard-welcome-copy p { margin:0; color:#405f7d; font-size:.95rem; line-height:1.5; }
.dashboard-welcome-secondary { margin-top:3px !important; color:#58708d !important; }
.dashboard-date-clock-wrap { display:flex; flex-direction:column; gap:10px; align-items:stretch; }
.dashboard-current-date { text-align:right; color:#173964; font-size:.8rem; line-height:1.35; }
.dashboard-clock-card { min-height:68px; padding:12px 14px; background:#f0f4f8; border:0; border-radius:11px; display:flex; align-items:center; justify-content:center; gap:10px; box-shadow:none; }
.clock-icon { width:30px; height:30px; color:#173964; display:grid; place-items:center; }
.clock-icon svg { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.dashboard-clock-card > div { display:flex; flex-direction:column; }
.dashboard-clock-card strong { color:#102f55; font-size:1.18rem; line-height:1; }
.dashboard-clock-card span { margin-top:3px; color:var(--slate-500); font-size:.68rem; }

.dashboard-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.dashboard-stat-card { min-height:112px; padding:18px; background:#fff; border:1px solid #e0e7ef; border-radius:var(--radius-card); box-shadow:var(--shadow-soft); display:flex; align-items:center; gap:15px; }
.stat-icon { width:52px; height:52px; border-radius:11px; display:grid; place-items:center; flex:0 0 auto; }
.stat-icon svg { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.stat-icon--blue { background:#e5f3ff; color:#0978cc; }
.stat-icon--green { background:#e2f7e9; color:#15904c; }
.stat-icon--purple { background:#efe8ff; color:#6a42d0; }
.dashboard-stat-card div { min-width:0; display:flex; flex-direction:column; gap:4px; }
.dashboard-stat-card strong { color:#102f55; font-size:1.55rem; line-height:1; }
.dashboard-stat-card div span { color:#4f6880; font-size:.81rem; line-height:1.35; }

.dashboard-panel { margin-bottom:16px; padding:14px; background:#fff; border:1px solid #e0e7ef; border-radius:var(--radius-card); box-shadow:var(--shadow-soft); }
.dashboard-panel-heading { margin-bottom:12px; display:flex; justify-content:space-between; align-items:center; gap:12px; }
.dashboard-panel-heading h3 { margin:0; color:#12345b; font-size:.98rem; font-weight:760; }
.dashboard-link-button { border:0; background:transparent; color:#0879cf; font-size:.78rem; font-weight:750; cursor:pointer; }
.quick-action-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.quick-action-card { min-height:138px; padding:16px 12px; border:0; border-radius:10px; background:#edf7ff; color:#0878c8; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; text-align:center; cursor:pointer; transition:transform .2s ease,box-shadow .2s ease,filter .2s ease; }
.quick-action-card:hover { transform:translateY(-2px); box-shadow:0 10px 22px rgba(15,42,67,.08); filter:saturate(1.04); }
.quick-action-card--green { background:#edf9f1; color:#128b49; }
.quick-action-card--purple { background:#f2edff; color:#6a42d0; }
.quick-action-card--neutral { background:#f1f5f8; color:#244765; }
.quick-icon { width:40px; height:40px; display:grid; place-items:center; }
.quick-icon svg { width:34px; height:34px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.quick-action-card strong { font-size:.9rem; line-height:1.2; }
.quick-action-card small { max-width:170px; color:#5f7488; font-size:.75rem; line-height:1.35; }

.dashboard-table-wrap { overflow-x:auto; border-radius:9px; }
.dashboard-recent-table { width:100%; min-width:790px; border-collapse:collapse; }
.dashboard-recent-table th,.dashboard-recent-table td { padding:10px 10px; border-bottom:1px solid #e9eef4; text-align:left; color:#294661; font-size:.76rem; vertical-align:middle; }
.dashboard-recent-table th { background:#f4f7fa; color:#4d647b; font-weight:750; }
.dashboard-recent-table tbody tr { transition:background .18s ease; }
.dashboard-recent-table tbody tr:hover { background:#f9fbfd; }
.dashboard-recent-table td strong { color:#173964; font-weight:700; }
.dashboard-status-badge { display:inline-flex; min-width:62px; align-items:center; justify-content:center; padding:4px 9px; border-radius:6px; background:#e5f7ea; color:#16824a; font-size:.69rem; font-weight:800; }
.dashboard-action-icons { display:flex; align-items:center; gap:6px; }
.table-icon-btn { width:31px; height:31px; border:0; border-radius:8px; background:transparent; color:#0879cf; display:grid; place-items:center; cursor:pointer; transition:background .18s ease,transform .18s ease; }
.table-icon-btn:hover { background:#eaf5ff; transform:translateY(-1px); }
.table-icon-btn svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.table-icon-btn.is-disabled { color:#a7b6c5; cursor:not-allowed; opacity:.58; }
.table-icon-btn.is-disabled:hover { background:transparent; transform:none; }
.dashboard-empty-state { padding:22px 10px; text-align:center; color:#7c8fa2; font-size:.81rem; }

/* Right column */
.dashboard-info-card { padding:16px; background:#fff; border:1px solid #e0e7ef; border-radius:var(--radius-card); box-shadow:var(--shadow-soft); }
.dashboard-info-card h3 { margin:0 0 10px; color:#12345b; font-size:.93rem; font-weight:760; display:flex; align-items:center; gap:9px; }
.dashboard-info-card p { margin:0; color:#526b84; font-size:.79rem; line-height:1.55; }
.dashboard-side-time-card { background:#fff; }
.side-date-label { margin-bottom:11px; color:#385774; font-size:.76rem; line-height:1.35; text-transform:capitalize; }
.side-time-row { display:flex; align-items:center; gap:11px; padding:12px; border-radius:10px; background:#f2f6fa; }
.side-time-row > div { display:flex; flex-direction:column; gap:3px; }
.side-time-row strong { color:#12345b; font-size:1.15rem; }
.side-time-row span { color:#71859a; font-size:.7rem; }
.side-card-icon { width:36px; height:36px; border-radius:9px; display:grid; place-items:center; flex:0 0 auto; }
.side-card-icon svg { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.side-card-icon--blue { background:#e5f3ff; color:#0b79d0; }
.side-card-icon--green { background:#e6f7eb; color:#16934f; }
.dashboard-info-card--green { background:#fbfefc; }
.dashboard-support-button { width:100%; min-height:44px; border:1px solid #228fe0; border-radius:9px; display:flex; align-items:center; justify-content:center; gap:8px; color:#0879cf; background:#fff; font-size:.83rem; font-weight:750; text-decoration:none; transition:background .2s ease,box-shadow .2s ease; }
.dashboard-support-button:hover { background:#f1f9ff; box-shadow:0 6px 14px rgba(23,136,223,.08); }
.support-hours { margin-top:14px; display:flex; flex-direction:column; gap:3px; color:#536d85; font-size:.77rem; line-height:1.35; }
.support-hours strong { color:#294661; margin-bottom:2px; }
.dashboard-quote-card { text-align:center; background:#f4f7fa; }
.dashboard-quote-card blockquote { margin:0 0 10px; color:#12345b; font-size:.83rem; font-weight:720; line-height:1.5; }
.dashboard-quote-card p { color:#71859a; font-size:.77rem; }
.demo-side-note { text-align:center; color:#93a3b2; font-size:.63rem; font-weight:800; letter-spacing:.13em; }

/* Footer */
.dashboard-footer-links { margin-top:20px; padding:8px 2px 0; display:flex; align-items:center; justify-content:space-between; gap:18px; color:#71859a; font-size:.7rem; }
.dashboard-footer-links > div { display:flex; gap:20px; flex-wrap:wrap; }
.dashboard-footer-links a { color:#71859a; text-decoration:none; transition:color .18s ease; }
.dashboard-footer-links a:hover { color:#0879cf; }

/* Formularios existentes dentro del nuevo layout */
#mainPanelWrapper,#docsSection { margin:0; padding:24px 28px 30px; background:var(--page); }
#mainPanelWrapper > .panel-card,#docsSection.panel-card { margin:0 0 18px; }

/* Overlay móvil */
.mobile-sidebar-overlay { position:fixed; inset:0; background:rgba(7,26,44,.48); backdrop-filter:blur(2px); z-index:40; }
body.sidebar-open { overflow:hidden; }

/* Responsive */
@media (max-width: 1360px) {
  :root { --sidebar-width:250px; --right-col:285px; }
  .header-brand-cluster { min-width:380px; gap:12px; }
  .header-portal-wordmark { min-width:170px; }
  .header-portal-wordmark strong { font-size:1.1rem; }
  .dashboard-home { padding-left:22px; padding-right:22px; }
}

@media (max-width: 1180px) {
  :root { --sidebar-width:220px; }
  .header-divider--second { display:none; }
  .header-brand-cluster { min-width:300px; }
  .dashboard-heading h1 { font-size:1rem; }
  .dashboard-overview-grid { grid-template-columns:minmax(0,1fr) 265px; gap:14px; }
  .quick-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .quick-action-card { min-height:116px; }
}

@media (max-width: 980px) {
  :root { --sidebar-width:84px; --right-col:1fr; }
  .portal-sidebar { padding:16px 8px; }
  .sidebar-brand-row > div,.sidebar-caption,.sidebar-link > span:not(.side-icon),.sidebar-media-card { display:none; }
  .sidebar-brand { padding:4px 6px 16px; }
  .sidebar-brand-row { justify-content:center; }
  .sidebar-link { justify-content:center; padding:12px 8px; }
  .sidebar-separator { margin-left:7px; margin-right:7px; }
  .header-banner-container { grid-template-columns:auto minmax(0,1fr) auto; padding:0 18px; gap:14px; }
  .header-brand-cluster { min-width:0; }
  .header-portal-wordmark { min-width:150px; }
  .header-divider--second { display:none; }
  .dashboard-heading { display:none; }
  .dashboard-overview-grid { grid-template-columns:1fr; }
  .dashboard-side-column { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .demo-side-note { grid-column:1 / -1; }
}

@media (max-width: 720px) {
  :root { --header-height:74px; }
  .outer-app-frame.panel-card--primary { display:grid; grid-template-columns:1fr; grid-template-rows:var(--header-height) minmax(0,1fr); }
  .portal-sidebar {
    position:fixed; left:0; top:0; bottom:0; z-index:50;
    width:min(82vw,290px); height:100dvh; min-height:100dvh;
    padding:18px 14px calc(18px + env(safe-area-inset-bottom));
    transform:translateX(-104%); transition:transform .22s ease;
  }
  .portal-sidebar.is-mobile-open { transform:translateX(0); }
  .sidebar-brand-row > div,.sidebar-caption,.sidebar-link > span:not(.side-icon),.sidebar-media-card { display:flex; }
  .sidebar-brand-row > div { flex-direction:column; }
  .sidebar-caption { display:block; }
  .sidebar-link { justify-content:flex-start; padding:12px 14px; }
  .sidebar-media-card { display:block; }
  .header-banner-container { grid-column:1; grid-row:1; padding:0 12px; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; }
  .mobile-menu-button { display:grid; place-items:center; }
  .header-brand-cluster { min-width:0; gap:9px; }
  .header-divider { display:none; }
  .header-portal-wordmark { min-width:0; }
  .header-portal-wordmark strong { font-size:.95rem; }
  .header-portal-wordmark small { font-size:.54rem; }
  .header-bell-button { display:none; }
  .header-user-copy small,.header-user-chevron { display:none; }
  .header-user-copy strong { max-width:92px; font-size:.78rem; }
  .header-avatar-wrap { width:42px; height:42px; }
  .dashboard-home,#mainPanelWrapper,#docsSection { grid-column:1; grid-row:2; padding:18px 14px calc(24px + env(safe-area-inset-bottom)); }
  .dashboard-welcome-row { grid-template-columns:1fr; gap:12px; }
  .dashboard-current-date { text-align:left; }
  .dashboard-date-clock-wrap { align-items:flex-start; }
  .dashboard-clock-card { min-width:165px; }
  .dashboard-stat-grid { grid-template-columns:1fr; }
  .quick-action-grid { grid-template-columns:1fr 1fr; }
  .dashboard-side-column { grid-template-columns:1fr; }
  .dashboard-footer-links { flex-direction:column; align-items:flex-start; }
  .user-menu-dropdown { position:fixed; top:78px; right:10px; left:10px; width:auto; }
}

@media (max-width: 480px) {
  .header-user-copy { display:none; }
  .quick-action-grid { grid-template-columns:1fr; }
  .quick-action-card { min-height:110px; }
  .dashboard-welcome-copy h2 { font-size:1.7rem; }
  .dashboard-panel { padding:12px; }
}

/* ==========================================================
   V9.5 — INICIO COMPLETO / HISTORIAL / NOTIFICACIONES
   ========================================================== */

/* Home: composición final con columna lateral derecha */
.dashboard-home {
  padding: 26px 28px 16px;
  background: var(--page);
}

.dashboard-home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.dashboard-main-column,
.dashboard-side-column {
  min-width: 0;
}

.dashboard-side-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: calc(var(--header-height) + 18px);
}

.dashboard-welcome-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.dashboard-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: #2d6f9f;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .11em;
}

.dashboard-welcome-copy h2 {
  margin: 0 0 7px;
  color: #0e2f55;
  font-size: clamp(1.85rem, 2.35vw, 2.35rem);
  line-height: 1.06;
  font-weight: 750;
  letter-spacing: -.025em;
}

.dashboard-welcome-copy p {
  margin: 0;
  max-width: 780px;
  color: #405e7b;
  font-size: .96rem;
  line-height: 1.52;
}

.dashboard-welcome-secondary {
  margin-top: 4px !important;
  color: #617b94 !important;
  font-size: .88rem !important;
}

.dashboard-date-clock-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-current-date {
  color: #23476a;
  font-size: .78rem;
  line-height: 1.35;
  text-align: right;
  text-transform: capitalize;
}

.dashboard-clock-card {
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid #e0e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 42, 67, .045);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.clock-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #0e477a;
}

.clock-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-clock-card > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dashboard-clock-card strong {
  color: #0e3158;
  font-size: 1.25rem;
  font-weight: 800;
}

.dashboard-clock-card span {
  color: #71869a;
  font-size: .7rem;
}

/* Banner informativo */
.health-hero {
  position: relative;
  height: 230px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #dfe7f0;
  border-radius: 13px;
  background: #0d3458;
  box-shadow: var(--shadow-soft);
}

.health-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

.health-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 39, 69, .94) 0%, rgba(7, 39, 69, .83) 31%, rgba(7, 39, 69, .18) 67%, rgba(7, 39, 69, .16) 100%),
    linear-gradient(180deg, rgba(7, 39, 69, .06), rgba(7, 39, 69, .26));
}

.health-hero-copy {
  position: absolute;
  z-index: 2;
  left: 28px;
  top: 27px;
  max-width: 480px;
  color: #fff;
}

.health-hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 10px;
  margin-bottom: 9px;
  border: 1px solid rgba(255, 255, 255, .23);
  border-radius: 999px;
  background: rgba(48, 151, 224, .28);
  color: #e9f6ff;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.health-hero-copy h3 {
  margin: 0 0 8px;
  max-width: 450px;
  color: #fff;
  font-size: clamp(1.55rem, 2.35vw, 2.3rem);
  line-height: 1.07;
  font-weight: 760;
  letter-spacing: -.025em;
}

.health-hero-copy p {
  margin: 0 0 14px;
  max-width: 455px;
  color: rgba(255, 255, 255, .91);
  font-size: .83rem;
  line-height: 1.47;
}

.health-hero-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  background: #168be0;
  color: #fff;
  font-size: .78rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.health-hero-button:hover {
  transform: translateY(-1px);
  background: #0f79c7;
  box-shadow: 0 8px 18px rgba(7, 39, 69, .24);
}

.health-hero-demo {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(7, 39, 69, .72);
  color: rgba(255, 255, 255, .86);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .04em;
}

/* Estadísticas */
.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-stat-card {
  min-height: 100px;
  padding: 15px 17px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 42, 67, .04);
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-stat-card div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-stat-card strong {
  color: #0e3158;
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
}

.dashboard-stat-card span:not(.stat-icon) {
  color: #536f89;
  font-size: .78rem;
}

.dashboard-stat-card small {
  margin-top: 2px;
  color: #8192a4;
  font-size: .64rem;
  line-height: 1.25;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.stat-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Acciones + novedades */
.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(340px, 1.05fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-panel {
  margin: 0;
  padding: 15px;
  border: 1px solid #e0e7ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 42, 67, .04);
}

.dashboard-panel-heading {
  min-height: 26px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-panel-heading h3 {
  margin: 0;
  color: #0f3158;
  font-size: .92rem;
  font-weight: 780;
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf5fc;
  color: #6b8398;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .07em;
}

.quick-action-grid--home {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.quick-action-grid--home .quick-action-card {
  min-height: 126px;
  text-decoration: none;
}

.quick-action-card--support {
  background: #f2f6fa;
  color: #23608b;
}

.news-panel {
  display: flex;
  flex-direction: column;
}

.news-list-item {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #edf1f5;
}

.news-list-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.news-list-item img {
  width: 105px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #e1e8ef;
}

.news-list-item > div {
  min-width: 0;
}

.news-list-item strong {
  display: block;
  margin-bottom: 3px;
  color: #173a60;
  font-size: .77rem;
  line-height: 1.22;
}

.news-list-item p {
  margin: 0 0 3px;
  color: #61798f;
  font-size: .68rem;
  line-height: 1.35;
}

.news-list-item span {
  color: #8a9bac;
  font-size: .61rem;
}

/* Información y servicios */
.campaigns-panel {
  margin-bottom: 0;
}

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

.campaign-card {
  min-height: 96px;
  overflow: hidden;
  border: 1px solid #e0e8f0;
  border-radius: 10px;
  background: linear-gradient(135deg, #edf6ff, #f8fbfe);
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: stretch;
}

.campaign-card img {
  width: 90px;
  height: 100%;
  min-height: 96px;
  object-fit: cover;
}

.campaign-card > div {
  padding: 12px;
}

.campaign-card strong {
  display: block;
  margin-bottom: 4px;
  color: #163a61;
  font-size: .78rem;
}

.campaign-card p {
  margin: 0;
  color: #61798f;
  font-size: .67rem;
  line-height: 1.35;
}

.campaign-card--text {
  grid-template-columns: 52px minmax(0, 1fr);
  background: #f8fbfe;
}

.campaign-icon {
  width: 34px;
  height: 34px;
  margin: 12px 0 0 12px;
  border-radius: 9px;
  background: #e4f7eb;
  color: #168b4b;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.campaign-icon--lock {
  background: #edf1ff;
  color: #5e4bce;
}

/* Columna derecha */
.dashboard-info-card {
  padding: 16px;
  border: 1px solid #dfe7ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 42, 67, .045);
}

.dashboard-info-card h3 {
  margin: 0 0 11px;
  color: #0f3158;
  font-size: .92rem;
  font-weight: 780;
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-info-card p {
  margin: 0;
  color: #506b84;
  font-size: .79rem;
  line-height: 1.55;
}

.right-emoji {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.1rem;
}

.responsible-box {
  padding: 14px;
  border-radius: 10px;
  background: #eef5ff;
}

.responsible-box strong {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #163b63;
  font-size: .79rem;
}

.responsible-box strong span {
  font-size: 1.08rem;
}

.responsible-box p {
  font-size: .75rem;
  line-height: 1.55;
}

.dashboard-info-card--green {
  background: #fff;
}

.dashboard-support-button {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #218fe0;
  border-radius: 9px;
  background: #fff;
  color: #0879cf;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-size: .8rem;
  font-weight: 780;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.dashboard-support-button:hover {
  background: #eef8ff;
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(24, 133, 211, .1);
}

.support-hours {
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: #536e87;
  font-size: .75rem;
  line-height: 1.35;
}

.support-hours strong {
  margin-bottom: 2px;
  color: #284966;
}

.dashboard-quote-card {
  text-align: center;
  background: #f5f8fb;
}

.dashboard-quote-card blockquote {
  margin: 0 0 11px;
  color: #12365d;
  font-size: .81rem;
  font-weight: 760;
  line-height: 1.52;
}

.dashboard-quote-card p {
  color: #71869a;
  font-size: .74rem;
}

.demo-side-note {
  padding: 6px 8px;
  border-radius: 7px;
  color: #8a9bad;
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-align: center;
}

/* Notificaciones */
.header-notification-area {
  position: relative;
}

.notification-count-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  font-weight: 850;
  line-height: 1;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: -8px;
  width: 340px;
  max-height: 430px;
  overflow: hidden;
  border: 1px solid #dbe4ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 42, 67, .18);
  z-index: 70;
}

.notification-dropdown-head {
  min-height: 49px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7edf4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-dropdown-head strong {
  color: #12355c;
  font-size: .9rem;
}

.notification-read-button {
  border: 0;
  background: transparent;
  color: #0879cf;
  font-size: .67rem;
  font-weight: 750;
  cursor: pointer;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  min-height: 69px;
  padding: 11px 13px;
  border-bottom: 1px solid #eef2f6;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  background: #fff;
}

.notification-item:not(.is-read) {
  background: #f7fbff;
}

.notification-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eaf5ff;
  display: grid;
  place-items: center;
  font-size: 1rem;
}

.notification-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-item-copy strong {
  color: #214766;
  font-size: .72rem;
  line-height: 1.35;
  font-weight: 690;
}

.notification-item-copy span {
  color: #899aaa;
  font-size: .61rem;
}

.notification-empty {
  padding: 22px 14px;
  color: #7e90a1;
  text-align: center;
  font-size: .75rem;
}

/* Historial */
#docsSection {
  min-height: calc(100vh - var(--header-height));
}

.docs-header h3 {
  color: #12355c;
  font-size: 1.15rem;
  letter-spacing: .01em;
}

.history-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.btn-view-doc,
.btn-delete-doc {
  min-height: 31px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: .7rem;
  font-weight: 760;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-view-doc {
  border: 1px solid #8fc8f2;
  background: #f3faff;
  color: #0879cf;
}

.btn-view-doc:hover {
  background: #e6f5ff;
  transform: translateY(-1px);
}

.btn-delete-doc {
  border: 1px solid #f0c5c5;
  background: #fff8f8;
  color: #b42318;
}

.btn-delete-doc:hover {
  background: #fff0f0;
  transform: translateY(-1px);
}

/* Modales */
.portal-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  place-items: center;
  padding: 20px;
}

.portal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 47, .48);
  backdrop-filter: blur(2px);
}

.portal-modal-card {
  position: relative;
  z-index: 2;
  width: min(460px, calc(100vw - 30px));
  max-height: min(720px, calc(100vh - 40px));
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #dce5ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(8, 28, 47, .22);
}

.portal-modal-card--wide {
  width: min(720px, calc(100vw - 30px));
}

.portal-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-modal-head h3 {
  margin: 3px 0 0;
  color: #12355c;
  font-size: 1.18rem;
}

.modal-kicker {
  color: #7b8fa2;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .1em;
}

.modal-close-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f6fa;
  color: #526b84;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

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

.document-detail-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e4ebf2;
  border-radius: 9px;
  background: #f9fbfd;
}

.document-detail-item span {
  display: block;
  margin-bottom: 5px;
  color: #7a8ea1;
  font-size: .64rem;
  font-weight: 750;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.document-detail-item strong {
  color: #244761;
  font-size: .78rem;
  overflow-wrap: anywhere;
}

.password-change-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-change-form label {
  color: #334f68;
  font-size: .75rem;
  font-weight: 700;
}

.password-change-form input {
  width: 100%;
  height: 43px;
  margin-top: 5px;
  padding: 0 11px;
  border: 1px solid #ccd9e5;
  border-radius: 8px;
  outline: none;
}

.password-change-form input:focus {
  border-color: #268fd9;
  box-shadow: 0 0 0 3px rgba(38, 143, 217, .11);
}

.modal-status {
  min-height: 18px;
  margin: 0;
  color: #587189;
  font-size: .72rem;
}

.modal-primary-button {
  min-height: 43px;
  border: 0;
  border-radius: 8px;
  background: #0f78c8;
  color: #fff;
  font-size: .79rem;
  font-weight: 780;
  cursor: pointer;
}

body.portal-modal-open {
  overflow: hidden;
}

/* Footer final */
.dashboard-footer-links {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding: 12px 2px 2px;
  border-top: 1px solid #e3eaf1;
}

/* Responsive V9.5 */
@media (max-width: 1280px) {
  .dashboard-home-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 14px;
  }
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
  .news-panel {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .dashboard-home-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-side-column {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-side-column .demo-side-note {
    grid-column: 1 / -1;
  }
  .campaign-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard-home {
    padding: 17px 13px calc(24px + env(safe-area-inset-bottom));
  }
  .dashboard-welcome-row {
    grid-template-columns: 1fr;
  }
  .dashboard-current-date {
    text-align: left;
  }
  .dashboard-date-clock-wrap {
    align-items: flex-start;
  }
  .dashboard-clock-card {
    width: 175px;
  }
  .health-hero {
    height: 315px;
  }
  .health-hero-image {
    object-position: 64% center;
  }
  .health-hero-shade {
    background: linear-gradient(180deg, rgba(7, 39, 69, .33), rgba(7, 39, 69, .94) 65%);
  }
  .health-hero-copy {
    left: 18px;
    right: 18px;
    top: auto;
    bottom: 23px;
    max-width: none;
  }
  .health-hero-copy h3 {
    font-size: 1.55rem;
  }
  .health-hero-demo {
    top: 12px;
    bottom: auto;
  }
  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
  .quick-action-grid--home {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-side-column {
    display: grid;
    grid-template-columns: 1fr;
  }
  .notification-dropdown {
    position: fixed;
    top: calc(var(--header-height) + 6px);
    left: 10px;
    right: 10px;
    width: auto;
  }
  .document-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .quick-action-grid--home {
    grid-template-columns: 1fr;
  }
  .news-list-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .news-list-item img {
    width: 88px;
  }
  .campaign-card,
  .campaign-card--text {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .campaign-card img {
    width: 76px;
  }
}

/* =========================================================
   PORTAL DE SALUD V9.6 — AJUSTES FINALES DE INTERFAZ
   ========================================================= */

/* LOGIN restaurado: fotografía + bloque institucional */
.login-container {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(500px, 35vw, 620px) !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  width: 100% !important;
  background: #eef3f8 !important;
}

.left-panel {
  position: relative !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  overflow: hidden !important;
  background: url('../images/inicio_1.png') no-repeat center center / cover !important;
  display: flex !important;
  align-items: flex-end !important;
  padding: clamp(34px, 4.4vw, 68px) !important;
}

.left-panel .overlay {
  position: absolute !important;
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(3,29,53,.14) 0%, rgba(3,29,53,.06) 54%, rgba(3,29,53,.02) 100%),
    linear-gradient(180deg, rgba(4,31,57,.04) 0%, rgba(4,31,57,.18) 48%, rgba(3,39,72,.92) 100%) !important;
}

.brand-info {
  position: relative !important;
  z-index: 2 !important;
  width: min(100%, 760px) !important;
  color: #fff !important;
  padding-bottom: clamp(6px, 1.2vh, 16px) !important;
}

.hero-kicker {
  display: inline-block !important;
  margin-bottom: 11px !important;
  font-size: .75rem !important;
  font-weight: 800 !important;
  letter-spacing: .17em !important;
  color: #d9efff !important;
}

.hero-title {
  max-width: 720px !important;
  margin: 0 0 16px !important;
  font-size: clamp(2.75rem, 4.25vw, 4.4rem) !important;
  line-height: 1.01 !important;
  font-weight: 760 !important;
  letter-spacing: -.042em !important;
  color: #fff !important;
}

.hero-description {
  max-width: 720px !important;
  margin: 0 !important;
  font-size: clamp(.98rem, 1.28vw, 1.12rem) !important;
  line-height: 1.58 !important;
  color: rgba(255,255,255,.94) !important;
}

.hero-description-secondary {
  margin-top: 9px !important;
  color: rgba(235,245,253,.87) !important;
  font-size: clamp(.9rem, 1.1vw, 1rem) !important;
}

.right-panel {
  width: 100% !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: clamp(20px, 3vh, 34px) clamp(28px, 3vw, 48px) !important;
  background: #fff !important;
  box-shadow: -16px 0 48px rgba(15,45,74,.07) !important;
}

.form-wrapper { width: min(100%, 500px) !important; }

.login-logo-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 11px !important;
  width: 100% !important;
  margin: 0 auto 18px !important;
}

.login-logo-img {
  display: block !important;
  width: min(100%, 350px) !important;
  max-height: 88px !important;
  height: auto !important;
  object-fit: contain !important;
}

.login-logo-secondary-img {
  display: block !important;
  width: min(100%, 260px) !important;
  max-height: 82px !important;
  height: auto !important;
  object-fit: contain !important;
}

.login-heading { margin-bottom: 20px !important; text-align: center !important; }
.form-wrapper h2 {
  margin: 0 0 6px !important;
  color: #0b3e70 !important;
  font-size: clamp(1.7rem, 2.4vw, 2rem) !important;
  line-height: 1.15 !important;
  font-weight: 750 !important;
  letter-spacing: -.025em !important;
}
.subtitle { margin: 0 !important; color: #65788c !important; font-size: .94rem !important; line-height: 1.4 !important; }
.form-group { margin-bottom: 13px !important; }
.form-group label { display:block !important; margin-bottom:6px !important; color:#334e68 !important; font-size:.77rem !important; font-weight:700 !important; }
.input-shell { min-height:52px !important; border:1px solid #cbd7e3 !important; border-radius:10px !important; background:#fff !important; }
.input-shell:focus-within { border-color:#0b76cf !important; box-shadow:0 0 0 3px rgba(11,118,207,.10) !important; }
.input-icon { width:46px !important; flex:0 0 46px !important; display:grid !important; place-items:center !important; color:#315d88 !important; }
.input-icon svg { width:22px !important; height:22px !important; }
.form-group .input-shell input[type="text"],
.form-group .input-shell input[type="password"] { width:100% !important; height:50px !important; padding:0 48px 0 0 !important; border:0 !important; outline:0 !important; background:transparent !important; color:#17324a !important; font-size:.98rem !important; }
.toggle-pwd-btn { right:7px !important; width:38px !important; height:38px !important; background:transparent !important; }
.captcha-entry-row { display:grid !important; grid-template-columns:minmax(0,1fr) auto !important; gap:9px !important; }
.captcha-entry-row > input { min-height:52px !important; padding:0 14px !important; border:1px solid #cbd7e3 !important; border-radius:10px !important; font-size:.98rem !important; text-transform:uppercase !important; }
#captchaCanvas { width:166px !important; height:50px !important; border:1px solid #bdd0e3 !important; border-radius:10px !important; background:#f8fbff !important; }
#refreshCaptcha { width:46px !important; height:50px !important; border:1px solid #cbd7e3 !important; border-radius:10px !important; background:#fff !important; color:#0b4f87 !important; }
.btn-submit { width:100% !important; min-height:52px !important; border-radius:10px !important; background:linear-gradient(135deg,#0b4f87 0%,#0a74c9 100%) !important; box-shadow:0 9px 22px rgba(11,91,153,.16) !important; }
.support-container { position:relative !important; margin-top:20px !important; padding-top:20px !important; border-top:1px solid #dbe4ec !important; text-align:center !important; }
.support-title { position:absolute !important; top:-10px !important; left:50% !important; transform:translateX(-50%) !important; padding:0 12px !important; background:#fff !important; color:#75889a !important; font-size:.8rem !important; }
.support-buttons { display:flex !important; justify-content:center !important; }
.support-btn { min-height:42px !important; padding:0 18px !important; border-radius:9px !important; }
.telegram-btn { border:1px solid #1d9bf0 !important; background:#fff !important; color:#087dc1 !important; }
.access-note { margin:13px 0 0 !important; text-align:center !important; color:#8999a8 !important; font-size:.74rem !important; }

/* Sidebar / header */
.sidebar-main-logo {
  display: block;
  width: 168px;
  max-width: 100%;
  max-height: 72px;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
}
.header-portal-main-logo {
  display: block;
  width: 210px;
  max-height: 68px;
  object-fit: contain;
}

/* Microinteracciones: movimiento leve, no exagerado */
.dashboard-stat-card,
.quick-action-card,
.campaign-card,
.news-list-item,
.dashboard-info-card,
.health-hero {
  transition: transform 210ms ease, box-shadow 210ms ease, border-color 210ms ease;
}
.dashboard-stat-card:hover,
.quick-action-card:hover,
.campaign-card:hover,
.news-list-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(18,52,91,.10);
}
.news-list-item:hover {
  border-color: #bddcf5;
  background: #fbfdff;
}
.news-list-item:hover .news-arrow { transform: translateX(3px); }
.news-arrow { transition: transform 200ms ease; font-size:1.5rem; color:#0b78ca; }

/* Novedades clicables */
.news-list-item {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 11px;
  padding: 9px;
}
.news-list-item:focus-visible {
  outline: 3px solid rgba(11,118,207,.22);
  outline-offset: 2px;
}

/* Modal de novedades */
.portal-modal-card--news {
  width: min(720px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}
.news-modal-image {
  display: block;
  width: 100%;
  max-height: 390px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #e1e8f0;
  background: #eef3f8;
}
.news-modal-content { padding-top: 16px; }
.news-modal-date {
  display: inline-block;
  margin-bottom: 9px;
  color: #0b78ca;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.news-modal-content p {
  margin: 0;
  color: #48627c;
  line-height: 1.7;
  font-size: .96rem;
}

/* Ajustes visuales del inicio */
.dashboard-eyebrow { color:#0b659f !important; }
.health-hero-demo { background:rgba(4,35,61,.72) !important; }
.dashboard-side-column { align-self:start; }
.dashboard-important-card .responsible-box { border-radius:12px; }
.dashboard-info-card--support .dashboard-support-button:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(14,127,201,.14); }

/* Historial: tabla solo dentro de la vista Historial */
#docsSection { animation: portalFadeIn 220ms ease both; }
@keyframes portalFadeIn { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }

@media (min-width: 851px) and (max-height: 820px) {
  .right-panel { padding-top:14px !important; padding-bottom:14px !important; }
  .login-logo-container { gap:7px !important; margin-bottom:11px !important; }
  .login-logo-img { width:min(100%,310px) !important; max-height:70px !important; }
  .login-logo-secondary-img { width:min(100%,225px) !important; max-height:68px !important; }
}

@media (max-width: 850px) {
  .login-container { display:block !important; min-height:100dvh !important; }
  .left-panel { min-height:36vh !important; padding:32px 22px !important; }
  .hero-title { font-size:clamp(2rem,10vw,3rem) !important; }
  .right-panel { min-height:64vh !important; padding:26px 18px calc(30px + env(safe-area-inset-bottom)) !important; }
  .login-logo-img { width:min(100%,300px) !important; }
  .login-logo-secondary-img { width:min(100%,230px) !important; }
}

@media (max-width: 560px) {
  .left-panel { min-height:32vh !important; align-items:flex-end !important; }
  .hero-description-secondary { display:none !important; }
  .captcha-entry-row { grid-template-columns:1fr !important; }
  .captcha-box { width:100% !important; }
  #captchaCanvas { flex:1 1 auto !important; width:100% !important; }
  .header-portal-main-logo { width:160px; }
}

/* =========================================================
   PORTAL DE SALUD V9.7 - VISTAS INSTITUCIONALES
   No modifica el formulario de Nuevo Registro.
   ========================================================= */
.portal-view-section {
  padding: 22px 24px 32px;
  background: #f4f7fb;
  min-height: calc(100vh - 96px);
}

.portal-page-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.portal-title-icon {
  width: 48px;
  height: 48px;
  border: 2px solid #0b4f86;
  color: #0b4f86;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.portal-breadcrumb {
  display: block;
  font-size: .76rem;
  color: #2670ad;
  margin-bottom: 5px;
}

.portal-page-title h2 {
  margin: 0;
  color: #0b355f;
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  line-height: 1.1;
}

.portal-page-title p {
  margin: 6px 0 0;
  color: #60748b;
  font-size: .92rem;
}

.portal-card,
.tracking-search-card,
.help-search-card {
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(15, 48, 79, .035);
}

.portal-card { padding: 16px; }
.portal-card h3 { margin: 0 0 12px; color: #103c68; font-size: 1rem; }
.portal-card p { color: #657b91; line-height: 1.45; }

.portal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 12px;
}

.portal-card-head h3 { margin: 0; }
.portal-card-head p { margin: 4px 0 0; font-size: .82rem; }

.tracking-search-card {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.tracking-search-card label,
.security-card label {
  display: block;
  font-weight: 700;
  font-size: .8rem;
  color: #304d69;
  margin-bottom: 7px;
}

.tracking-search-row,
.help-search-card {
  display: flex;
  gap: 10px;
}

.tracking-search-row input,
.help-search-card input,
.security-card input {
  width: 100%;
  border: 1px solid #c8d5e3;
  border-radius: 5px;
  background: #fff;
  color: #183b5d;
  min-height: 40px;
  padding: 9px 12px;
  outline: none;
}

.tracking-search-row input:focus,
.help-search-card input:focus,
.security-card input:focus {
  border-color: #1680d8;
  box-shadow: 0 0 0 3px rgba(22,128,216,.1);
}

.portal-primary-button,
.portal-outline-button,
.portal-danger-button,
.portal-danger-outline,
.portal-table-button {
  border-radius: 5px;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
  padding: 8px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
}

.portal-primary-button {
  background: #0879d5;
  color: #fff;
  border: 1px solid #0879d5;
}
.portal-primary-button:hover { background: #0669ba; }

.portal-outline-button,
.portal-table-button {
  background: #fff;
  color: #0879d5;
  border: 1px solid #4a9de2;
}
.portal-outline-button:hover,
.portal-table-button:hover { background: #f0f8ff; }

.portal-danger-button {
  background: #e52626;
  color: #fff;
  border: 1px solid #e52626;
}

.portal-danger-outline {
  width: 100%;
  margin-top: 12px;
  background: #fff;
  color: #d51f2a;
  border: 1px solid #ee6b71;
}

.portal-button-link { width: 100%; }

.tracking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 14px;
}

.portal-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.portal-table th,
.portal-table td {
  padding: 10px 11px;
  border: 1px solid #dce5ee;
  text-align: left;
  vertical-align: middle;
  font-size: .8rem;
  color: #294966;
}

.portal-table th {
  background: #eef3f8;
  color: #173b5e;
  font-weight: 800;
}

.portal-table tr:hover td { background: #f8fbfe; }

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-processing { background: #e1f1ff; color: #046fc2; }
.status-valid { background: #dcf5e5; color: #178246; }
.status-expired { background: #ffe1e1; color: #cf1f2d; }

.status-help-card { align-self: start; }
.status-help-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
}
.status-help-row:last-of-type { border-bottom: 0; }
.status-help-row strong { color: #153d64; font-size: .84rem; }
.status-help-row p { margin: 2px 0 0; font-size: .77rem; }
.status-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; flex: 0 0 auto; }
.status-dot--blue { background: #0c7fd7; }
.status-dot--green { background: #20a45b; }
.status-dot--red { background: #e52936; }

.tracking-rule-note,
.tracking-auto-note,
.tracking-expired-note {
  margin-top: 14px;
  padding: 12px 13px;
  border-radius: 6px;
  font-size: .79rem;
  line-height: 1.45;
}
.tracking-rule-note,
.tracking-auto-note { background: #eef7ff; border: 1px solid #c7e2f7; color: #345d7d; }
.tracking-expired-note { background: #fff0f0; border: 1px solid #ffc4c7; color: #9f2530; }
.tracking-expired-note p { color: inherit; margin: 4px 0 0; }

.tracking-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  border: 1px solid #dbe5ee;
  border-radius: 7px;
  overflow: hidden;
  margin-bottom: 18px;
}
.tracking-detail-summary > div {
  padding: 12px;
  border-right: 1px solid #e5ebf1;
  background: #fff;
}
.tracking-detail-summary > div:last-child { border-right: 0; }
.tracking-detail-summary span { display: block; color: #6b7d8e; font-size: .72rem; margin-bottom: 4px; }
.tracking-detail-summary strong { color: #163d62; font-size: .83rem; }

.tracking-progress-head { display: flex; justify-content: space-between; color: #22496d; font-size: .8rem; margin-bottom: 7px; }
.tracking-progress-bar { height: 7px; border-radius: 999px; background: #e5ebf1; overflow: hidden; margin-bottom: 18px; }
.tracking-progress-bar span { display: block; height: 100%; background: #1583da; border-radius: inherit; transition: width .4s ease; }

.tracking-timeline { display: grid; gap: 0; }
.tracking-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; position: relative; padding-bottom: 16px; }
.tracking-step:not(:last-child)::before { content: ''; position: absolute; left: 16px; top: 30px; bottom: 0; width: 2px; background: #d7e0e8; }
.tracking-step.is-done:not(:last-child)::before { background: #28a55d; }
.tracking-step-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #aebac6; color: #fff; font-size: .74rem; font-weight: 800; z-index: 1; }
.tracking-step.is-done .tracking-step-dot { background: #22a45a; }
.tracking-step.is-active .tracking-step-dot { background: #0c7ed7; box-shadow: 0 0 0 4px rgba(12,126,215,.13); }
.tracking-step strong { display: block; color: #153d64; font-size: .83rem; }
.tracking-step small { display: block; color: #71849a; margin-top: 2px; }
.tracking-step p { margin: 4px 0 0; color: #5f748a; font-size: .76rem; }

.profile-page-grid {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.55fr);
  gap: 14px;
}
.profile-photo-card { text-align: center; }
.profile-photo-card h3 { text-align: left; }
.profile-page-avatar-wrap {
  width: 142px;
  height: 142px;
  margin: 14px auto;
  border-radius: 50%;
  overflow: hidden;
  background: #eaf1f7;
  border: 1px solid #d4e0ea;
  display: grid;
  place-items: center;
}
.profile-page-avatar { width: 100%; height: 100%; object-fit: cover; }
.profile-page-fallback { color: #0f4d7d; font-size: 3.7rem; font-weight: 800; }
.profile-photo-card p { font-size: .74rem; margin: 10px 0 0; }
.portal-small-status { min-height: 18px; color: #16824b !important; }

.profile-data-list { margin: 0; }
.profile-data-list > div { display: grid; grid-template-columns: 210px 1fr; border-top: 1px solid #e5ebf1; }
.profile-data-list > div:first-child { border-top: 0; }
.profile-data-list dt,
.profile-data-list dd { margin: 0; padding: 8px 9px; font-size: .8rem; }
.profile-data-list dt { color: #405f7c; background: #f8fafc; }
.profile-data-list dd { color: #183d61; font-weight: 600; }
.profile-security-summary { grid-column: 1; }
.profile-activity-card { grid-column: 2; }

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
.security-card { min-height: 175px; }
.security-activity-card { grid-column: 1 / -1; }
.security-state { padding: 12px; border-radius: 6px; display: grid; gap: 4px; }
.security-state--ok { background: #eef8f2; border: 1px solid #ccebd8; color: #1f7546; }
.security-state span { font-size: .77rem; line-height: 1.45; }
.device-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #e2e8ef; border-radius: 6px; }
.device-row strong, .device-row small { display: block; }
.device-row strong { color: #163d62; font-size: .8rem; }
.device-row small { color: #728499; margin-top: 3px; }
.security-card input[readonly] { background: #f5f7f9; }

.help-search-card { padding: 14px; margin-bottom: 14px; }
.help-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 14px; }
.faq-card details { border-top: 1px solid #e2e8ef; }
.faq-card details:first-of-type { border-top: 0; }
.faq-card summary { cursor: pointer; list-style: none; padding: 12px 4px; color: #173f65; font-weight: 700; font-size: .82rem; }
.faq-card summary::after { content: '⌄'; float: right; color: #0b79cf; }
.faq-card details[open] summary::after { content: '⌃'; }
.faq-card details p { margin: -2px 4px 12px; font-size: .79rem; }
.help-contact-card { align-self: start; }
.help-contact-card .support-hours { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e3e9ef; display: grid; gap: 4px; color: #597087; font-size: .8rem; }

.logout-confirm-card { max-width: 390px; text-align: center; padding: 28px !important; }
.logout-confirm-icon { width: 56px; height: 56px; border-radius: 50%; background: #fff0f0; color: #e52832; display: grid; place-items: center; margin: 0 auto 10px; font-size: 2rem; }
.logout-confirm-card h3 { margin: 0; color: #163d62; font-size: 1.3rem; }
.logout-confirm-card p { color: #6c7e90; margin: 8px 0 20px; }
.logout-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Mis documentos: mantiene la tabla original y añade estado */
#docsSection { margin: 22px 24px 32px; }
#docsSection .docs-header h3 { color: #103c68; font-size: 1.35rem; text-transform: none; }
#docsSection .docs-header p { color: #667b90; }
#docsSection .docs-table th { background: #eef3f8; color: #173b5e; }
#docsSection .docs-table td { color: #294966; }

@media (max-width: 1080px) {
  .tracking-layout,
  .help-layout { grid-template-columns: 1fr; }
  .profile-page-grid { grid-template-columns: 1fr 1.4fr; }
  .security-grid { grid-template-columns: 1fr 1fr; }
  .tracking-detail-summary { grid-template-columns: repeat(2, 1fr); }
  .tracking-detail-summary > div { border-bottom: 1px solid #e5ebf1; }
}

@media (max-width: 760px) {
  .portal-view-section { padding: 16px 12px 24px; }
  .portal-page-title { gap: 10px; }
  .portal-title-icon { width: 40px; height: 40px; font-size: 1.25rem; }
  .tracking-search-row,
  .help-search-card { flex-direction: column; }
  .profile-page-grid,
  .security-grid { grid-template-columns: 1fr; }
  .profile-security-summary,
  .profile-activity-card,
  .security-activity-card { grid-column: auto; }
  .profile-data-list > div { grid-template-columns: 1fr; }
  .profile-data-list dt { padding-bottom: 2px; }
  .profile-data-list dd { padding-top: 2px; }
  .tracking-detail-summary { grid-template-columns: 1fr; }
  .tracking-detail-summary > div { border-right: 0; border-bottom: 1px solid #e5ebf1; }
  .logout-confirm-actions { grid-template-columns: 1fr; }
  #docsSection { margin: 16px 12px 24px; }
}

/* =========================================================
   PORTAL DE SALUD PORTAL SALUD V9.8 — SISTEMA VISUAL INSTITUCIONAL
   Inicio / Perfil / Seguridad / Ayuda
   Nuevo Registro conserva su estructura y lógica existente.
========================================================= */
:root {
  --inst-navy:#0f426d;
  --inst-navy-dark:#0b3559;
  --inst-blue:#0879d5;
  --inst-blue-soft:#edf6fd;
  --inst-page:#f4f7fa;
  --inst-border:#d7e1ea;
  --inst-muted:#60758a;
  --inst-text:#173b5e;
  --inst-green:#178246;
  --inst-orange:#c76b08;
  --inst-red:#c92932;
}
.outer-app-frame.panel-card--primary {
  --sidebar-width: 220px;
  grid-template-columns:220px minmax(0,1fr);
  grid-template-rows:auto 36px minmax(0,1fr);
  min-height:100vh;
  background:linear-gradient(to right,#0b3458 0 220px,var(--inst-page) 220px 100%);
  border-left:1px solid #d8e2eb;
  border-right:1px solid #d8e2eb;
}
.portal-sidebar {
  grid-column:1; grid-row:1 / -1;
  width:220px; min-height:100vh; height:100%; align-self:stretch; padding:20px 10px 16px;
  background:linear-gradient(180deg,#103f69 0%,#0b3458 100%);
}
.sidebar-section-title { padding:8px 9px 7px; color:#c8d9e9; font-size:.69rem; letter-spacing:.055em; font-weight:750; }
.sidebar-section-title--spaced { margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.14); }
.sidebar-nav { gap:2px; }
.sidebar-link { min-height:43px; padding:9px 11px; border-radius:4px; font-size:.84rem; font-weight:600; gap:10px; }
.sidebar-link:hover { transform:none; background:rgba(255,255,255,.08); }
.sidebar-link.active { background:#1378bd; box-shadow:inset 3px 0 0 #8fd0ff; }
.side-icon,.side-icon svg { width:20px; height:20px; }
.sidebar-institutional-footer { margin-top:auto; padding:18px 9px 2px; border-top:1px solid rgba(255,255,255,.14); display:flex; flex-direction:column; gap:5px; color:#d7e4ef; font-size:.7rem; line-height:1.25; }
.sidebar-institutional-footer strong { color:#fff; font-size:.73rem; }
.sidebar-institutional-footer .sidebar-version { margin:8px 0 3px; color:#a9bfd1; }
.sidebar-institutional-footer a,.sidebar-text-logout { color:#c9d9e7; text-decoration:none; background:none; border:0; padding:0; text-align:left; font:inherit; cursor:pointer; }
.sidebar-institutional-footer a:hover,.sidebar-text-logout:hover { color:#fff; text-decoration:underline; }
.sidebar-text-logout { margin-top:6px; }

.institutional-header {
  grid-column:2; grid-row:1; position:sticky; top:0; z-index:25;
  min-height:82px; padding:10px 22px; background:#fff; border-bottom:1px solid var(--inst-border);
  display:grid; grid-template-columns:minmax(410px,1.25fr) minmax(350px,.9fr) 155px; gap:22px; align-items:center;
}
.institutional-brand-zone { display:flex; align-items:center; min-width:0; gap:18px; }
.institutional-minsa-logo { width:207px; max-height:52px; object-fit:contain; object-position:left center; flex:0 0 auto; }
.institutional-separator { width:1px; height:54px; background:#d8e2eb; flex:0 0 auto; }
.institutional-portal-copy { display:flex; flex-direction:column; min-width:0; line-height:1.08; }
.institutional-portal-copy strong { font-size:1.32rem; color:#0d3b66; font-weight:850; letter-spacing:.01em; }
.institutional-portal-copy b { margin-top:3px; color:#103f6c; font-size:.88rem; }
.institutional-portal-copy span { margin-top:3px; color:#667b90; font-size:.68rem; }
.institutional-account-zone { justify-self:end; color:#264d70; text-align:left; font-size:.72rem; line-height:1.38; }
.institutional-date-line { margin-bottom:2px; white-space:nowrap; }
.institutional-user-line { white-space:nowrap; }
.meta-divider { color:#a5b5c4; margin:0 5px; }
.institutional-header-links { display:flex; gap:0; margin-top:3px; }
.institutional-header-links button { background:none; border:0; border-right:1px solid #cad6e0; color:#0c609d; font:inherit; padding:0 8px; cursor:pointer; text-decoration:underline; }
.institutional-header-links button:first-child { padding-left:0; }
.institutional-header-links button:last-child { border-right:0; }
.institutional-secondary-mark { justify-self:end; width:150px; overflow:hidden; }
.institutional-secondary-mark img { width:145px; height:54px; object-fit:contain; object-position:right center; }
.institutional-session-bar {
  grid-column:2; grid-row:2; min-height:36px; padding:0 22px; background:#0d4b78; color:#fff;
  display:flex; justify-content:space-between; align-items:center; gap:20px; font-size:.7rem;
}
.institutional-session-bar > div { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.session-lock-icon { width:18px; height:18px; display:inline-grid; place-items:center; }
.session-lock-icon svg { width:16px; height:16px; fill:none; stroke:#fff; stroke-width:2; }
.session-separator { opacity:.7; margin:0 6px; }
.mobile-menu-button { position:absolute; left:9px; top:16px; z-index:2; }

.dashboard-home,#mainPanelWrapper,#docsSection,.portal-view-section { grid-column:2; grid-row:3; }
.dashboard-home.institutional-page,.portal-view-section.institutional-page { padding:15px 18px 20px; background:var(--inst-page); }
.institutional-page { min-width:0; color:var(--inst-text); }
.institutional-breadcrumb { min-height:24px; display:flex; align-items:center; gap:7px; margin-bottom:9px; color:#26608e; font-size:.72rem; }
.institutional-breadcrumb button { border:0; background:none; padding:0; color:#0b62a2; font:inherit; cursor:pointer; text-decoration:underline; }
.portal-card { border:1px solid var(--inst-border); border-radius:5px; box-shadow:none; padding:13px; }
.portal-card h3 { color:#123e67; font-size:.88rem; margin:0 0 9px; }
.portal-card p { color:var(--inst-muted); font-size:.75rem; line-height:1.42; }
.compact-card-title { color:#123e67; font-size:.83rem; font-weight:800; margin-bottom:9px; }
.portal-primary-button,.portal-outline-button,.portal-danger-button,.portal-danger-outline,.portal-table-button { border-radius:4px; min-height:34px; padding:6px 12px; font-size:.75rem; }
.compact-button { min-height:30px; padding:5px 10px; }
.full-width { width:100%; }
.text-link,.table-link-button,.text-link-button { color:#0871c2; font-size:.72rem; text-decoration:none; }
.table-link-button,.text-link-button { border:0; background:none; padding:0; cursor:pointer; }
.text-link:hover,.table-link-button:hover,.text-link-button:hover { text-decoration:underline; }

.home-content-grid { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:13px; align-items:start; }
.home-main-column,.home-right-column { min-width:0; }
.home-main-column { display:grid; gap:11px; }
.home-right-column { display:grid; gap:11px; padding-top:33px; }
.institutional-welcome-card { min-height:190px; padding:0; overflow:hidden; display:grid; grid-template-columns:minmax(0,1.08fr) minmax(300px,.82fr); }
.welcome-copy { padding:19px 20px; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; }
.welcome-copy h2 { margin:0; color:#0f385f; font-size:1.8rem; line-height:1.08; }
.welcome-copy .welcome-subtitle { margin:6px 0 9px; color:#3f5f7d; font-size:.9rem; }
.welcome-copy > p:not(.welcome-subtitle) { max-width:650px; margin:0 0 13px; font-size:.78rem; }
.compact-action { min-width:145px; }
.welcome-image-wrap { position:relative; min-height:190px; overflow:hidden; background:#dfe7ed; }
.welcome-image-wrap::before { content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.62) 12%,rgba(12,51,82,.10) 56%,rgba(7,37,61,.12) 100%); }
.welcome-image-wrap img { width:100%; height:100%; object-fit:cover; filter:grayscale(.8) saturate(.55) contrast(.92); }
.welcome-image-wrap span { position:absolute; z-index:2; right:15px; bottom:12px; color:#fff; font-size:.72rem; font-weight:800; text-shadow:0 1px 3px rgba(0,0,0,.5); border-bottom:3px solid #d81f2f; padding-bottom:3px; }
.account-summary-card { padding:0; overflow:hidden; }
.account-summary-card .compact-card-title { padding:10px 12px 7px; margin:0; border-bottom:1px solid #e2e9ef; }
.account-summary-row { display:grid; grid-template-columns:64px repeat(4,minmax(100px,1fr)) minmax(190px,1.3fr); min-height:82px; align-items:stretch; }
.summary-document-icon { display:grid; place-items:center; color:#0a79ce; background:#f6faff; }
.summary-document-icon svg { width:31px; height:31px; fill:none; stroke:currentColor; stroke-width:1.6; }
.summary-stat,.summary-last-access { padding:13px 14px; border-left:1px solid #e1e8ee; display:flex; flex-direction:column; justify-content:center; }
.summary-stat span,.summary-last-access span { color:#63788d; font-size:.68rem; }
.summary-stat strong { margin-top:2px; color:#123e67; font-size:1.35rem; }
.status-number-green { color:var(--inst-green)!important; }.status-number-orange { color:var(--inst-orange)!important; }.status-number-red { color:var(--inst-red)!important; }
.summary-last-access strong { margin-top:3px; color:#123e67; font-size:.79rem; }
.summary-last-access small { margin-top:2px; color:#6f8294; font-size:.63rem; }
.summary-last-access a { margin-top:4px; color:#0871c2; font-size:.65rem; text-decoration:none; }
.recent-documents-card { padding:0; overflow:hidden; }
.recent-documents-card .portal-card-head { padding:10px 12px 8px; margin:0; }
.institutional-table { min-width:650px; }
.portal-table th,.portal-table td { padding:7px 9px; font-size:.71rem; border-color:#dfe7ee; }
.portal-table th { background:#edf2f6; color:#183e62; }
.table-empty-cell { text-align:center!important; color:#7a8b9a!important; padding:17px!important; }
.operations-card { padding:11px 12px; }
.operations-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px 18px; }
.operation-link { border:0; background:#fff; padding:8px 4px; min-width:0; display:flex; gap:9px; text-align:left; align-items:flex-start; cursor:pointer; }
.operation-link:hover strong { text-decoration:underline; }
.operation-icon { width:25px; height:25px; color:#0879d5; flex:0 0 auto; }
.operation-icon svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.7; }
.operation-link > span:last-child { display:flex; flex-direction:column; min-width:0; }
.operation-link strong { color:#0870bf; font-size:.73rem; }
.operation-link small { margin-top:2px; color:#667b8e; font-size:.62rem; line-height:1.3; }
.compact-side-card { padding:12px; }
.compact-side-card h3 { display:flex; align-items:center; gap:7px; font-size:.8rem; }
.side-card-icon { width:19px; height:19px; color:#0879d5; display:grid; place-items:center; }
.side-card-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }
.soft-info-box { padding:11px; background:#eef5fb; border:1px solid #d6e7f4; border-radius:4px; color:#335d7c; font-size:.7rem; line-height:1.4; }
.helpdesk-side-card > strong { color:#173e63; font-size:.76rem; }.helpdesk-side-card > p { margin:4px 0 10px; }
.contact-mini-row { padding:6px 0; border-top:1px solid #e5ebf0; color:#31536f; font-size:.67rem; }
.institutional-logo-card { text-align:center; padding:15px 10px; }
.institutional-logo-card img { width:160px; max-width:100%; object-fit:contain; }.institutional-logo-card span { display:block; margin-top:6px; color:#6f8090; font-size:.66rem; }

.institutional-page-heading { display:grid; grid-template-columns:minmax(0,1fr) minmax(340px,42%); gap:18px; align-items:center; margin-bottom:12px; }
.page-heading-main { display:flex; align-items:center; gap:13px; }
.page-heading-main h2 { margin:0; color:#103b64; font-size:1.55rem; }.page-heading-main p { margin:3px 0 0; color:#687b8d; font-size:.78rem; }
.large-line-icon { width:42px; height:42px; color:#0d4b7a; display:grid; place-items:center; flex:0 0 auto; font-size:1.8rem; font-weight:700; }
.large-line-icon svg { width:39px; height:39px; fill:none; stroke:currentColor; stroke-width:1.65; }
.help-question-icon { border:3px solid currentColor; border-radius:50%; width:42px; height:42px; font-size:1.45rem; }
.institutional-info-alert { min-height:70px; padding:10px 13px; border:1px solid #badbf4; border-radius:4px; background:#eaf5fd; display:flex; gap:11px; align-items:flex-start; color:#224f72; }
.institutional-info-alert strong { display:block; margin-bottom:3px; color:#123f68; font-size:.76rem; }.institutional-info-alert p { margin:0; color:#42627d; font-size:.68rem; line-height:1.4; }
.info-circle { width:21px; height:21px; border-radius:50%; background:#0879d5; color:#fff; display:grid; place-items:center; font-size:.72rem; font-weight:850; flex:0 0 auto; }
.small-info { width:17px; height:17px; font-size:.61rem; }

.profile-institutional-grid { display:grid; grid-template-columns:minmax(260px,.75fr) minmax(0,1.65fr); gap:11px; }
.institutional-profile-photo { grid-row:span 1; }.profile-page-avatar-wrap { width:138px; height:138px; margin:11px auto; }
.profile-data-list > div { grid-template-columns:190px 1fr; }.profile-data-list dt,.profile-data-list dd { padding:6px 8px; font-size:.72rem; }
.profile-additional-card { grid-column:1; }.profile-preferences-card { grid-column:2; }.profile-security-summary { grid-column:1; }.profile-activity-card { grid-column:2; }
.compact-profile-data > div { grid-template-columns:150px 1fr; }
.preference-check { display:flex; gap:9px; padding:8px 4px; border-top:1px solid #e3e9ef; color:#274d6d; font-size:.72rem; }
.preference-check:first-of-type { border-top:0; }.preference-check input { margin-top:2px; }.preference-check span { display:flex; flex-direction:column; }.preference-check small { margin-top:2px; color:#728597; font-size:.63rem; }

.security-institutional-grid { display:grid; grid-template-columns:minmax(300px,1.02fr) minmax(260px,.9fr) minmax(280px,.98fr); gap:11px; align-items:start; }
.security-password-card { grid-row:span 2; }
.security-password-card label,.security-card label { display:block; margin:9px 0 5px; color:#274c6b; font-size:.69rem; font-weight:700; }
.security-password-card input,.security-card input { width:100%; min-height:34px; border:1px solid #cbd8e3; border-radius:4px; padding:7px 9px; color:#173d60; background:#fff; font-size:.72rem; }
.password-inline { display:grid; grid-template-columns:minmax(0,1fr) auto; }.password-inline input { border-radius:4px 0 0 4px; }.password-eye { min-width:42px; border:1px solid #cbd8e3; border-left:0; background:#f7f9fb; color:#2f5d80; font-size:.64rem; cursor:pointer; }
.password-rules { margin:11px 0; padding:10px 11px; background:#eef6fc; border:1px solid #d3e6f4; border-radius:4px; color:#385d79; font-size:.66rem; }.password-rules strong { color:#173e63; }.password-rules ul { margin:6px 0 0 16px; padding:0; line-height:1.5; }
.security-middle-column,.security-right-column { display:grid; gap:11px; }.security-card { min-height:0; }
.card-icon-title { display:flex; gap:9px; align-items:flex-start; margin-bottom:9px; }.card-icon-title h3 { margin:0 0 2px; }.card-icon-title p { margin:0; font-size:.66rem; }
.small-line-icon { width:25px; height:25px; color:#0b6fac; display:grid; place-items:center; flex:0 0 auto; }.small-line-icon svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.65; }
.security-state { padding:10px; background:#eef6fc; border:1px solid #d4e6f4; border-radius:4px; color:#355c78; }.security-state--warning { background:#fff6e8; border-color:#f2d4a7; color:#8a5917; }.security-state strong { font-size:.7rem; }.security-state span { font-size:.64rem; }
.device-row { grid-template-columns:32px 1fr auto; padding:8px; border-radius:4px; }.device-glyph { font-size:.56rem; font-weight:800; color:#0a639e; text-align:center; }.device-row strong { font-size:.7rem; }.device-row small { font-size:.61rem; }
.status-badge { min-width:auto; min-height:22px; padding:3px 7px; border-radius:4px; font-size:.62rem; }
.security-activity-card { grid-column:1/-1; }.security-activity-card .portal-card-head p { margin:2px 0 0; }

.help-search-institutional { padding:11px 13px; margin-bottom:11px; }.help-search-institutional h3 { margin-bottom:7px; }
.help-search-row { display:grid; grid-template-columns:28px minmax(0,1fr) 105px; align-items:stretch; }.search-line-icon { display:grid; place-items:center; border:1px solid #c9d8e4; border-right:0; border-radius:4px 0 0 4px; color:#0879d5; }.search-line-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; }.help-search-row input { min-height:35px; border:1px solid #c9d8e4; border-left:0; padding:7px 9px; outline:none; color:#193e61; font-size:.72rem; }.help-search-row button { border-radius:0 4px 4px 0; }.help-examples { margin:5px 0 0!important; font-size:.63rem!important; color:#738699!important; }
.help-institutional-layout { display:grid; grid-template-columns:minmax(0,1fr) 285px; gap:11px; align-items:start; }.help-main-zone { min-width:0; display:grid; gap:11px; }.help-main-two-columns { display:grid; grid-template-columns:minmax(0,1.02fr) minmax(0,.98fr); gap:11px; }.help-right-zone { display:grid; gap:11px; }
.institutional-faq { padding:11px 13px; }.faq-card details { border-top:1px solid #e1e8ee; }.faq-card summary { padding:9px 2px; font-size:.7rem; }.faq-card details p { margin:-1px 2px 9px; font-size:.66rem; }.faq-card summary::after { content:'⌄'; }.faq-card details[open] summary::after { content:'⌃'; }
.help-guides-card { padding:11px 13px; }.guide-list { border-top:1px solid #e3e9ef; }.guide-row { min-height:78px; display:grid; grid-template-columns:40px minmax(0,1fr) auto; gap:9px; align-items:center; padding:9px 0; border-bottom:1px solid #e3e9ef; }.file-type-icon { width:34px; height:40px; display:grid; place-items:center; color:#fff; border-radius:3px; font-size:.56rem; font-weight:850; }.file-type-icon--pdf { background:#d92d34; }.file-type-icon--zip { background:#1d8a55; }.guide-row strong { color:#164267; font-size:.7rem; }.guide-row p { margin:2px 0!important; font-size:.63rem!important; }.guide-row small { color:#7b8c9b; font-size:.58rem; }.help-download-link.is-unavailable { opacity:.48; pointer-events:none; border-color:#cbd5df; color:#778998; }
.help-right-card { padding:11px 12px; }.help-contact-item { display:grid; grid-template-columns:35px 1fr; gap:8px; padding:9px 0; border-top:1px solid #e3e9ef; }.help-contact-item:first-of-type { border-top:0; }.contact-symbol { width:31px; color:#0871c0; font-size:.55rem; font-weight:850; text-align:center; align-self:start; padding-top:2px; }.help-contact-item div { display:flex; flex-direction:column; gap:2px; }.help-contact-item strong { color:#164267; font-size:.69rem; }.help-contact-item span,.help-contact-item a { color:#28536f; font-size:.65rem; text-decoration:none; }.help-contact-item small { color:#728497; font-size:.59rem; line-height:1.35; }.help-hours-block { display:flex; gap:10px; align-items:center; padding:4px 0 10px; }.help-hours-block div { display:flex; flex-direction:column; color:#3e5c76; font-size:.67rem; }.help-hours-block strong { margin-top:2px; color:#183f63; font-size:.72rem; }.compact-info { display:flex; gap:7px; padding:8px; align-items:flex-start; }
.institutional-links { border-top:1px solid #e3e9ef; }.institutional-links a { display:flex; justify-content:space-between; gap:9px; padding:8px 1px; border-bottom:1px solid #e3e9ef; color:#086caf; font-size:.67rem; text-decoration:none; }.institutional-links a:hover { text-decoration:underline; }
.help-additional-strip { min-height:75px; padding:12px 16px; border:1px solid #bae4ce; border-radius:5px; background:#effaf3; display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:12px; align-items:center; }.support-headset-icon { width:40px; height:40px; color:#149359; }.support-headset-icon svg { width:38px; height:38px; fill:none; stroke:currentColor; stroke-width:1.7; }.help-additional-strip strong { color:#0f7046; font-size:.82rem; }.help-additional-strip p { margin:3px 0 0; color:#41705a; font-size:.66rem; }.support-green-button { min-height:34px; padding:6px 13px; border:1px solid #4cb47e; border-radius:4px; background:#fff; color:#14784c; font-size:.7rem; font-weight:750; cursor:pointer; }
.help-institutional-footer { display:flex; justify-content:space-between; gap:20px; padding:10px 5px 2px; color:#536d83; font-size:.61rem; }.help-institutional-footer > div { display:flex; flex-direction:column; gap:2px; }.help-institutional-footer > div:last-child { text-align:right; }

/* La sección Nuevo Registro conserva sus estilos internos. Solo se posiciona dentro de la nueva shell institucional. */
#mainPanelWrapper { margin:0; padding:18px; background:var(--inst-page); min-width:0; }
#docsSection,#trackingSection { margin:0; padding:18px; background:var(--inst-page); }

@media (max-width:1200px) {
  .institutional-header { grid-template-columns:minmax(390px,1fr) minmax(320px,.8fr); }
  .institutional-secondary-mark { display:none; }
  .home-content-grid { grid-template-columns:minmax(0,1fr) 245px; }
  .security-institutional-grid { grid-template-columns:minmax(290px,1fr) minmax(250px,1fr); }
  .security-right-column { grid-column:2; }.security-activity-card { grid-column:1/-1; }
}
@media (max-width:980px) {
  .outer-app-frame.panel-card--primary { grid-template-columns:1fr; grid-template-rows:auto 36px minmax(0,1fr); }
  .portal-sidebar { position:fixed; left:0; top:0; bottom:0; z-index:80; transform:translateX(-105%); transition:transform .2s ease; }
  .portal-sidebar.mobile-open { transform:translateX(0); }
  .institutional-header,.institutional-session-bar,.dashboard-home,#mainPanelWrapper,#docsSection,.portal-view-section { grid-column:1; }
  .institutional-header { padding-left:62px; grid-template-columns:minmax(0,1fr) auto; }
  .institutional-brand-zone { gap:11px; }.institutional-minsa-logo { width:170px; }.institutional-portal-copy span { display:none; }.institutional-account-zone { font-size:.66rem; }.institutional-user-line { display:none; }
  .mobile-menu-button { display:grid; place-items:center; }
  .home-content-grid,.help-institutional-layout { grid-template-columns:1fr; }.home-right-column { grid-template-columns:repeat(3,minmax(0,1fr)); padding-top:0; }.institutional-logo-card { display:none; }
  .institutional-page-heading { grid-template-columns:1fr; gap:9px; }.profile-institutional-grid { grid-template-columns:1fr; }.profile-additional-card,.profile-preferences-card,.profile-security-summary,.profile-activity-card { grid-column:1; }
  .security-institutional-grid { grid-template-columns:1fr 1fr; }.security-password-card { grid-row:auto; }.security-middle-column,.security-right-column { grid-column:auto; }.security-activity-card { grid-column:1/-1; }
  .help-main-two-columns { grid-template-columns:1fr; }
}
@media (max-width:700px) {
  .institutional-header { min-height:72px; padding:9px 10px 9px 56px; grid-template-columns:1fr; }.institutional-minsa-logo { width:145px; }.institutional-separator,.institutional-portal-copy,.institutional-account-zone { display:none; }
  .institutional-session-bar { padding:0 10px; font-size:.61rem; }.institutional-session-bar > span { display:none; }.institutional-session-bar > div { width:100%; justify-content:flex-end; }
  .dashboard-home.institutional-page,.portal-view-section.institutional-page { padding:11px; }
  .institutional-welcome-card { grid-template-columns:1fr; }.welcome-image-wrap { min-height:130px; }.welcome-copy h2 { font-size:1.4rem; }
  .account-summary-row { grid-template-columns:48px 1fr 1fr; }.summary-document-icon { grid-row:span 2; }.summary-last-access { grid-column:2/-1; }.summary-stat,.summary-last-access { padding:10px; }
  .operations-grid { grid-template-columns:1fr 1fr; }.home-right-column { grid-template-columns:1fr; }
  .profile-institutional-grid,.security-institutional-grid { grid-template-columns:1fr; }.security-middle-column,.security-right-column,.security-activity-card { grid-column:1; }
  .profile-data-list > div,.compact-profile-data > div { grid-template-columns:130px 1fr; }
  .institutional-page-heading { gap:8px; }.institutional-info-alert { min-height:0; }.page-heading-main h2 { font-size:1.3rem; }
  .help-main-two-columns { grid-template-columns:1fr; }.guide-row { grid-template-columns:36px minmax(0,1fr); }.guide-row .help-download-link { grid-column:2; justify-self:start; }.help-additional-strip { grid-template-columns:36px 1fr; }.help-additional-strip .support-green-button { grid-column:2; justify-self:start; }.help-institutional-footer { flex-direction:column; }.help-institutional-footer > div:last-child { text-align:left; }
}
@supports (padding:max(0px)) {
  @media (max-width:700px) { .dashboard-home.institutional-page,.portal-view-section.institutional-page,#mainPanelWrapper,#docsSection,#trackingSection { padding-bottom:max(14px, env(safe-area-inset-bottom)); } }
}


/* ==========================================================
   PORTAL DE SALUD PORTAL SALUD V10 — navegación, anuncios y perfil
   ========================================================== */
html.portal-session-active,
body.portal-session-active { scroll-behavior: auto; }
body.portal-session-active #loginSection { display:none !important; }
body.portal-session-active #dashboardSection { display:block !important; min-height:100vh; }

.portal-announcements-card{padding:0;overflow:hidden;border:1px solid #cfdbe7;background:#fff}
.portal-announcements-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:15px 18px 12px;border-bottom:1px solid #dde6ee;background:linear-gradient(90deg,#f8fbfe,#eef6fc)}
.portal-announcements-head h3{margin:2px 0 3px;color:#123e65;font-size:1rem}.portal-announcements-head p{margin:0;color:#657b8e;font-size:.76rem;line-height:1.45}
.portal-announcements-badge{flex:0 0 auto;padding:5px 9px;border:1px solid #a9cee8;border-radius:4px;background:#fff;color:#0b69a8;font-size:.68rem;font-weight:800;letter-spacing:.03em}
.portal-announcements-list{display:grid;grid-template-columns:1fr}
.portal-announcement-item{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:start;padding:11px 18px;border-bottom:1px solid #edf1f5}
.portal-announcement-item:last-child{border-bottom:0}.portal-announcement-dot{width:7px;height:7px;margin-top:5px;border-radius:50%;background:#7a95aa}.portal-announcement-item.is-primary .portal-announcement-dot{background:#0d78bd}
.portal-announcement-item strong{display:block;margin-bottom:2px;color:#173b5b;font-size:.76rem}.portal-announcement-item p{margin:0;color:#667d90;font-size:.7rem;line-height:1.4}.portal-announcement-item time,.portal-announcement-item>span:last-child{color:#8194a4;font-size:.65rem;white-space:nowrap}

.profile-card-subtitle{margin:3px 0 0;color:#71869a;font-size:.72rem}.profile-data-list--expanded{grid-template-columns:repeat(2,minmax(0,1fr))}.profile-data-list--expanded .profile-data-wide{grid-column:1/-1}
.profile-map-link{display:inline-block;margin-left:8px;color:#0b72b5;font-size:.72rem;font-weight:800;text-decoration:none}.profile-map-link:hover{text-decoration:underline}
.profile-generated-note{margin:0 16px 16px;padding:10px 12px;border-left:3px solid #2f8ac3;background:#eef7fc;color:#536f83;font-size:.7rem;line-height:1.45}
@media(max-width:760px){.portal-announcements-head{flex-direction:column}.portal-announcement-item{grid-template-columns:10px 1fr}.portal-announcement-item time,.portal-announcement-item>span:last-child{grid-column:2}.profile-data-list--expanded{grid-template-columns:1fr}.profile-data-list--expanded .profile-data-wide{grid-column:auto}}


/* ==========================================================
   PORTAL DE SALUD PORTAL SALUD V10.4 — perfil completo y novedades
   ========================================================== */
.profile-temporary-alert{transition:opacity .24s ease,transform .24s ease,max-height .26s ease,margin .26s ease,padding .26s ease;border-width .26s ease;overflow:hidden}
.profile-temporary-alert.is-expired{opacity:0;transform:translateY(-5px);max-height:0;min-height:0;margin:0;padding-top:0;padding-bottom:0;border-width:0;pointer-events:none}
.profile-page-avatar-button{display:block;margin:0 auto;padding:0;border:0;background:transparent;border-radius:50%;cursor:zoom-in}
.profile-page-avatar-button:focus-visible{outline:3px solid rgba(13,120,189,.26);outline-offset:4px}
.profile-default-avatar{font-size:0;background:#edf4f9 url('../images/profile_default.svg') center/cover no-repeat}
.profile-photo-page-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.profile-delete-photo-button{color:#a73544;border-color:#e2aab1;background:#fff}
.profile-delete-photo-button:disabled{opacity:.42;cursor:not-allowed}
.portal-modal-card--photo-viewer{width:min(760px,calc(100vw - 28px));background:#fff}
.profile-photo-viewer-body{padding:14px 18px 20px;display:grid;place-items:center;background:#f3f7fa}
.profile-photo-viewer-body img{display:block;max-width:100%;max-height:72vh;border-radius:10px;object-fit:contain;background:#fff;border:1px solid #d8e3eb}
.portal-modal-card--support{width:min(520px,calc(100vw - 28px))}
.password-support-modal-body{padding:24px;text-align:center}.support-lock-mark{font-size:2rem;margin-bottom:8px}.password-support-modal-body>strong{display:block;color:#123f68;font-size:1rem}.password-support-modal-body p{margin:8px auto 18px;max-width:420px;color:#5c7183;font-size:.78rem;line-height:1.55}.support-telegram-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.password-support-box{margin-top:14px;padding:16px;border:1px solid #b9d8ee;border-radius:7px;background:#f2f9fe}.password-support-box strong{display:block;color:#164d76}.password-support-box p{margin:5px 0 13px;color:#60778a;font-size:.72rem;line-height:1.45}
.portal-news-formal{padding:0;overflow:hidden}.portal-news-head{padding:14px 16px;border-bottom:1px solid #dde6ee;background:#f8fbfd}.portal-news-head p{margin:3px 0 0;color:#64798b;font-size:.7rem}.portal-news-status{padding:5px 9px;border:1px solid #bfd8e8;border-radius:999px;background:#eef8fd;color:#166a9d;font-size:.63rem;font-weight:800;white-space:nowrap}.portal-news-list{display:grid}.portal-news-item{width:100%;grid-template-columns:112px minmax(0,1fr) 28px!important;text-align:left;border:0!important;border-bottom:1px solid #e6edf2!important;border-radius:0!important;padding:10px 14px!important;background:#fff!important;cursor:pointer}.portal-news-item:last-child{border-bottom:0!important}.portal-news-item img{width:112px!important;height:62px!important;border-radius:5px!important;object-fit:cover}.portal-news-item strong{font-size:.75rem!important}.portal-news-item p{font-size:.67rem!important;margin:3px 0!important}.portal-news-item span:not(.news-arrow){font-size:.61rem!important}.portal-news-item:hover{background:#f8fbfd!important}.news-arrow{align-self:center;justify-self:end;color:#0b78ca;font-size:1.45rem}
@media(max-width:700px){.portal-news-item{grid-template-columns:82px minmax(0,1fr) 20px!important}.portal-news-item img{width:82px!important;height:58px!important}.profile-photo-viewer-body img{max-height:60vh}}


/* V10.5 · continuidad visual de página y marca institucional */
.dashboard-content{min-height:100vh;background:var(--inst-page)}
.outer-app-frame.panel-card--primary{align-items:stretch}
.dashboard-home.institutional-page,.portal-view-section.institutional-page,#mainPanelWrapper,#docsSection{min-height:calc(100vh - 118px)}
.profile-default-avatar{font-size:0!important;background:#f4f7fa url('../images/profile_default.svg') center/82% 82% no-repeat!important}
.institutional-identity-card{padding:15px 14px!important}
.institutional-identity-row{display:flex;align-items:center;justify-content:center;gap:12px;min-height:84px}
.institutional-coat{width:68px;height:76px;object-fit:contain;flex:0 0 auto}
.institutional-identity-divider{width:1px;height:62px;background:#d6e0e9;flex:0 0 auto}
.institutional-minsa-mini{width:150px;height:auto;object-fit:contain}
.institutional-identity-copy{display:flex;flex-direction:column;align-items:center;gap:2px;padding-top:8px;border-top:1px solid #e1e8ef;color:#315978}
.institutional-identity-copy strong{font-size:.78rem;color:#103f69}.institutional-identity-copy span{font-size:.7rem;color:#6a7f91}
@media(max-width:1100px){.institutional-coat{width:56px;height:64px}.institutional-minsa-mini{width:125px}}

/* =========================================================
   PORTAL DE SALUD Portal Salud V10.6 — UX, noticias, seguridad y aviso
========================================================= */

/* La barra lateral debe acompañar toda la altura del contenido. */
.portal-session-active .dashboard-container,
.portal-session-active .dashboard-content,
.portal-session-active .outer-app-frame{
  min-height:100vh;
}
.portal-session-active .outer-app-frame{
  align-items:stretch;
}
.portal-sidebar{
  align-self:stretch;
  min-height:100%;
  height:auto;
}

/* Foto predeterminada profesional. */
.profile-default-avatar[data-default-icon="true"]{
  display:grid;
  place-items:center;
  background:#f3f7fb;
  color:#0b4f7f;
}
.profile-default-avatar[data-default-icon="true"] svg{
  width:54%;
  height:54%;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Home: briefing compacto en lugar de un bloque pesado al centro. */
.portal-home-briefing{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:18px 20px !important;
  border-left:4px solid #0b75bb !important;
  background:linear-gradient(90deg,#f8fbff 0%,#fff 72%) !important;
}
.portal-home-briefing-copy h3{margin:4px 0 5px;font-size:1.05rem;color:#073b63}
.portal-home-briefing-copy p{margin:0;color:#60758a;line-height:1.55}
.portal-home-news-button{flex:0 0 auto;white-space:nowrap}

/* Columna lateral del Inicio. */
.home-right-column{
  display:grid;
  align-content:start;
  gap:14px !important;
}
.home-side-status-card,
.home-support-card,
.home-monitoring-card,
.home-identity-card{
  border:1px solid #d9e4ee !important;
  border-radius:14px !important;
  box-shadow:0 6px 20px rgba(12,56,91,.045) !important;
  background:#fff !important;
}
.home-side-card-title{display:flex;align-items:center;gap:11px;padding-bottom:11px;border-bottom:1px solid #e5edf4}
.home-side-card-title>div{display:grid;gap:2px}
.home-side-card-title strong{font-size:.94rem;color:#0c3f67}
.home-side-card-title small{font-size:.74rem;color:#7a8ea0}
.home-side-status-line{display:flex;align-items:flex-start;gap:9px;margin-top:13px;padding:11px;border-radius:10px;background:#f3f9fd;color:#47677f;line-height:1.45}
.status-live-dot{width:9px;height:9px;margin-top:4px;border-radius:50%;background:#1eb774;box-shadow:0 0 0 4px rgba(30,183,116,.12);flex:0 0 auto}
.home-support-card>p{margin:13px 0 10px;color:#60758a;line-height:1.5}
.home-support-details{display:grid;gap:7px;margin:0 0 13px;padding:10px 0;border-top:1px solid #edf2f6;border-bottom:1px solid #edf2f6;color:#49667d;font-size:.82rem}
.home-monitoring-card{display:flex;gap:12px;align-items:flex-start;background:#f8fbfe !important}
.home-monitoring-icon{width:28px;height:28px;display:grid;place-items:center;flex:0 0 28px;border-radius:50%;background:#e5f3fd;color:#0876bc;font-weight:800}
.home-monitoring-card strong{color:#0d456f}
.home-monitoring-card p{margin:3px 0 0;color:#61758a;line-height:1.5}
.home-identity-card{padding:16px !important}
.home-identity-card .institutional-identity-row{justify-content:center;gap:14px}
.home-identity-card .institutional-coat{max-width:78px;max-height:86px;object-fit:contain}
.home-identity-card .institutional-minsa-mini{max-width:142px;width:100%;height:auto;object-fit:contain}
.home-identity-card .institutional-identity-copy{text-align:center;margin-top:12px}

/* Página Noticias. */
.news-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin:8px 0 18px;padding:18px 20px;border:1px solid #dbe6ef;border-radius:14px;background:#fff}
.news-page-heading h2{margin:5px 0 6px;color:#0b3f68;font-size:1.55rem}
.news-page-heading p{margin:0;color:#667b8f;line-height:1.55}
.news-page-featured{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:16px}
.news-feature-card,.news-wide-card{border:1px solid #dbe6ef;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 8px 24px rgba(17,63,99,.05)}
.news-feature-card--primary{display:grid;grid-template-columns:minmax(240px,.88fr) minmax(0,1.12fr)}
.news-feature-card--primary>img{width:100%;height:100%;min-height:310px;object-fit:cover}
.news-feature-copy{padding:28px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.news-feature-tag{display:inline-flex;padding:6px 9px;border-radius:999px;background:#e8f4fc;color:#0b6da8;font-size:.73rem;font-weight:800}
.news-feature-copy h3{margin:14px 0 10px;font-size:1.55rem;line-height:1.18;color:#073b63}
.news-feature-copy p{margin:0 0 18px;color:#5c7387;line-height:1.65}
.news-page-secondary{display:grid;gap:16px}
.news-wide-card{appearance:none;width:100%;padding:0;display:grid;grid-template-columns:145px minmax(0,1fr) 24px;align-items:center;text-align:left;cursor:pointer;color:inherit}
.news-wide-card img{width:145px;height:154px;object-fit:cover}
.news-wide-card>span{display:grid;gap:6px;padding:18px}
.news-wide-card small{color:#0a79bd;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.news-wide-card strong{font-size:1.05rem;color:#0b3e66}
.news-wide-card p{margin:0;color:#687d90;line-height:1.5}
.news-wide-card>b{font-size:1.6rem;color:#8da2b3;font-weight:400}
.news-wide-card:hover{border-color:#9cc9e7;box-shadow:0 10px 28px rgba(15,94,145,.09)}
.news-responsibility-card{margin-top:16px;display:flex;align-items:flex-start;gap:12px;background:#f7fbfe !important}
.news-responsibility-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#e3f3fd;color:#0b76b9;font-weight:900;flex:0 0 30px}
.news-responsibility-card p{margin:4px 0 0;color:#63798c}

/* Seguridad: recomendación discreta y preguntas útiles. */
.security-guidance-card{max-width:560px;display:flex;align-items:flex-start;gap:11px;padding:12px 14px;border:1px solid #d8e7f2;border-radius:12px;background:#f8fbfe}
.security-guidance-card strong{display:block;color:#0a4e7f;font-size:.9rem}
.security-guidance-card p{margin:3px 0 0;color:#60778b;font-size:.8rem;line-height:1.45}
.security-questions-card details{border-top:1px solid #e6edf3;padding:10px 0}
.security-questions-card details:first-of-type{margin-top:12px}
.security-questions-card summary{cursor:pointer;color:#0b466f;font-weight:800;line-height:1.4}
.security-questions-card details p{margin:8px 0;color:#65798b;line-height:1.5}
.security-support-link{display:inline-flex;color:#0878bd;font-weight:800;text-decoration:none;font-size:.82rem}
.security-support-link:hover{text-decoration:underline}
.security-synced-label{display:inline-flex;margin-top:10px;padding:7px 10px;border-radius:999px;background:#edf8f2;color:#20774a;font-size:.76rem;font-weight:800}

/* Aviso de responsabilidad al ingresar. */
.compliance-notice{position:fixed;inset:0;z-index:2147483600;display:grid;place-items:center;padding:24px}
.compliance-notice.hidden{display:none}
.compliance-notice-backdrop{position:absolute;inset:0;background:rgba(9,28,44,.54);backdrop-filter:blur(5px)}
.compliance-notice-card{position:relative;width:min(620px,100%);padding:28px 30px 24px;border:1px solid #cfe0ec;border-radius:20px;background:#fff;box-shadow:0 24px 80px rgba(4,34,55,.26);text-align:center;overflow:hidden;animation:portalComplianceIn .28s ease both}
.compliance-notice.is-closing .compliance-notice-card{animation:portalComplianceOut .2s ease both}
.compliance-brand{display:flex;align-items:center;justify-content:space-between;gap:14px;padding-bottom:16px;border-bottom:1px solid #e5edf3}
.compliance-brand img{width:142px;height:auto;object-fit:contain}
.compliance-brand span{font-size:.72rem;font-weight:900;letter-spacing:.12em;color:#5f778b}
.compliance-icon{width:50px;height:50px;margin:20px auto 12px;display:grid;place-items:center;border-radius:50%;background:#eaf7f0;color:#198754;font-size:1.5rem;font-weight:900}
.compliance-notice-card h2{margin:0;color:#073f69;font-size:1.45rem}
.compliance-notice-card>p{margin:12px auto 16px;max-width:520px;color:#536f83;line-height:1.65}
.compliance-monitoring{display:grid;gap:3px;padding:13px 15px;border-radius:12px;background:#f3f8fc;text-align:left;color:#597286}
.compliance-monitoring strong{color:#0b4d7a}
.compliance-notice-card>button{margin-top:18px;min-width:130px;padding:10px 18px;border:0;border-radius:10px;background:#0c77b9;color:#fff;font-weight:800;cursor:pointer}
.compliance-progress{position:absolute;left:0;right:0;bottom:0;height:4px;background:#e7eff5}
.compliance-progress span{display:block;height:100%;background:#0c77b9;animation:portalComplianceProgress 7.2s linear forwards}
body.compliance-notice-open{overflow:hidden}
@keyframes portalComplianceIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@keyframes portalComplianceOut{to{opacity:0;transform:translateY(8px) scale(.99)}}
@keyframes portalComplianceProgress{from{width:100%}to{width:0%}}

@media(max-width:1100px){
  .news-page-featured{grid-template-columns:1fr}
  .news-feature-card--primary{grid-template-columns:280px 1fr}
}
@media(max-width:760px){
  .portal-home-briefing,.news-page-heading{flex-direction:column;align-items:stretch}
  .news-feature-card--primary{grid-template-columns:1fr}
  .news-feature-card--primary>img{min-height:210px;max-height:250px}
  .news-wide-card{grid-template-columns:105px minmax(0,1fr) 18px}
  .news-wide-card img{width:105px;height:138px}
  .compliance-notice-card{padding:22px 18px 20px}
  .compliance-brand{align-items:flex-start;flex-direction:column}
}


/* V10.8 · correo como identificador de acceso */
.login-field-note{
  display:block;
  margin-top:8px;
  color:rgba(233,240,248,.58);
  font-size:.76rem;
  line-height:1.45;
}

.profile-default-avatar[data-default-icon]{background:#f4f7fa!important;background-image:none!important}
.portal-inline-notice{display:flex;align-items:flex-start;gap:12px;position:relative;margin:0 0 16px;padding:14px 48px 14px 16px;border:1px solid #d9e5ef;border-radius:14px;background:#f8fbfe;color:#25435a}.portal-inline-notice strong{display:block;font-size:.92rem;color:#0e456d}.portal-inline-notice p{margin:4px 0 0;font-size:.8rem;line-height:1.5;color:#60778b}.portal-inline-notice button{position:absolute;top:10px;right:10px;border:0;background:transparent;color:#6b8295;font-size:1.35rem;line-height:1;cursor:pointer}.password-change-form{padding:20px;display:grid;gap:14px}.password-change-form label{display:grid;gap:6px}.password-change-form label span{font-size:.78rem;font-weight:800;color:#35566f}.password-change-form input{height:46px;padding:0 14px;border:1px solid #d2dee8;border-radius:10px;background:#f9fbfd;outline:none}.password-change-form input:focus{border-color:#4b9bc9;box-shadow:0 0 0 3px rgba(8,121,188,.10);background:#fff}.password-change-status{min-height:18px;margin:0;color:#60778b;font-size:.78rem}.password-change-actions{display:flex;justify-content:flex-end}
