@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --verde-oscuro: #102824;
  --verde-medio: #315C55;
  --verde-claro: #E8F0EE;
  --dorado: #FAC569;
  --dorado-hover: #f0b84a;
  --fondo: #f0f4f2;
  --blanco: #ffffff;
  --texto: #102824;
  --texto-suave: #555;
  --texto-muy-suave: #888;
  --borde: #e0e8e5;
  --sombra-sm: 0 2px 8px rgba(0,0,0,0.06);
  --sombra-md: 0 8px 24px rgba(0,0,0,0.10);
  --sombra-lg: 0 20px 48px rgba(0,0,0,0.18);
  --radio-sm: 8px;
  --radio-md: 12px;
  --radio-lg: 18px;
}

html, body { font-family: 'Inter', sans-serif; font-size: 14px; color: var(--texto); background: var(--fondo); }

/* ─── UTILIDADES ─── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* ─── PÁGINA DE AUTH (login / autorización) ─── */
.auth-page {
  min-height: 100vh;
  background: radial-gradient(ellipse at 70% 20%, #1e4a42 0%, #102824 55%, #0a1f1d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: '';
  position: absolute;
  top: -30%; right: -10%;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(49,92,85,0.35) 0%, transparent 65%);
  pointer-events: none;
}
.auth-page::after {
  content: '';
  position: absolute;
  bottom: -20%; left: -10%;
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(250,197,105,0.10) 0%, transparent 65%);
  pointer-events: none;
}

.auth-card {
  background: var(--blanco);
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.06);
  padding: 44px 48px 40px;
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.auth-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.auth-logo-box {
  width: 58px; height: 58px;
  background: var(--verde-oscuro);
  border-radius: 14px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(16,40,36,0.35);
}
.auth-logo-box img { width: 88%; height: 88%; object-fit: contain; }
.auth-logo-fallback { color: var(--dorado); font-size: 22px; font-weight: 700; }
.auth-brand { font-size: 18px; font-weight: 700; color: var(--verde-oscuro); letter-spacing: -0.02em; }
.auth-brand-sub { font-size: 11px; color: var(--texto-muy-suave); margin-top: 2px; }

.auth-divider {
  height: 2px;
  background: linear-gradient(90deg, var(--dorado) 0%, rgba(250,197,105,0.1) 100%);
  border-radius: 2px;
  margin: 18px 0 26px;
}

.auth-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--verde-medio);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ─── FORMULARIOS ─── */
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--verde-medio);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-md);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: var(--texto);
  background: #f9fbfa;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--verde-medio);
  box-shadow: 0 0 0 3px rgba(49,92,85,0.10);
  background: var(--blanco);
}
.field input.error { border-color: #e53e3e; }

/* ─── CAPTCHA ─── */
.captcha-box {
  background: #f5f9f7;
  border: 1.5px solid #c8dcd8;
  border-radius: var(--radio-md);
  padding: 13px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.captcha-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #333;
}
.captcha-icon {
  width: 20px; height: 20px;
  background: var(--verde-medio);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.captcha-icon svg { width: 12px; height: 12px; fill: white; }
.captcha-math {
  background: var(--verde-oscuro);
  color: var(--dorado);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.captcha-answer-wrap { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.captcha-answer-wrap input {
  width: 90px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  padding: 8px;
}

/* ─── CHECKBOX PERSONALIZADO ─── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 20px;
}
.check-row input[type="checkbox"] { display: none; }
.check-box {
  width: 18px; height: 18px;
  border: 2px solid var(--borde);
  border-radius: 5px;
  background: var(--blanco);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.15s;
}
.check-row input:checked + .check-box {
  background: var(--verde-medio);
  border-color: var(--verde-medio);
}
.check-row input:checked + .check-box svg { display: block; }
.check-box svg { display: none; width: 10px; height: 10px; fill: white; }
.check-label { font-size: 13px; color: var(--texto-suave); line-height: 1.5; }

/* ─── BOTONES ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radio-md);
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--dorado);
  color: var(--verde-oscuro);
  width: 100%;
}
.btn-primary:hover { background: var(--dorado-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(250,197,105,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: transparent;
  color: var(--verde-medio);
  border: 1.5px solid var(--verde-medio);
}
.btn-secondary:hover { background: var(--verde-claro); }

.btn-dark {
  background: var(--verde-oscuro);
  color: white;
}
.btn-dark:hover { background: #1a3d37; }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-danger { background: #fee2e2; color: #991b1b; }
.btn-danger:hover { background: #fecaca; }

/* ─── MENSAJES DE ERROR / ALERTA ─── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radio-md);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-warning { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.alert-info { background: var(--verde-claro); border: 1px solid #b0d0ca; color: var(--verde-oscuro); }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* ─── FOOTER AUTH ─── */
.auth-footer {
  text-align: center;
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   LAYOUT DEL PORTAL PRINCIPAL
═══════════════════════════════════════════ */

.portal-layout {
  display: flex;
  min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #0d2220;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
.sidebar-logo-box {
  width: 36px; height: 36px;
  background: var(--dorado);
  border-radius: 8px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 4px; image-rendering: -webkit-optimize-contrast; }
.sidebar-brand { font-size: 14px; font-weight: 700; color: var(--dorado); letter-spacing: 0.04em; }
.sidebar-brand-sub { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 1px; }

.sidebar-user {
  margin: 16px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar {
  width: 40px; height: 40px;
  background: var(--dorado);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--verde-oscuro);
  flex-shrink: 0;
}
.sidebar-uname { font-size: 13px; font-weight: 600; color: white; line-height: 1.3; }
.sidebar-urole { font-size: 10px; color: rgba(255,255,255,0.45); margin-top: 2px; }
.sidebar-umod { font-size: 10px; color: rgba(250,197,105,0.6); margin-top: 2px; }

.sidebar-nav { padding: 8px 12px; flex: 1; }
.sidebar-nav-label {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 8px;
  margin: 12px 0 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  margin-bottom: 2px;
  transition: all 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
.nav-item.active { background: rgba(250,197,105,0.13); color: var(--dorado); font-weight: 500; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 12px 8px; }

/* Imagen decorativa sidebar */
.sidebar-fondo-wrap {
  margin: 8px 12px 4px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  height: 140px;
  flex-shrink: 0;
}
.sidebar-fondo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.55;
  display: block;
}
.sidebar-fondo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13,34,32,0.2) 0%, rgba(13,34,32,0.7) 100%);
  pointer-events: none;
}
.sidebar-fondo-label {
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 1;
}

.sidebar-footer { padding: 16px 20px; }
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-logout:hover { background: rgba(220,38,38,0.15); color: #fc8181; }
.btn-logout svg { width: 15px; height: 15px; }

/* ─── CONTENIDO PRINCIPAL ─── */
.main { flex: 1; min-width: 0; background: var(--fondo); }

.main-topbar {
  background: white;
  border-bottom: 1px solid var(--borde);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-title { font-size: 22px; font-weight: 700; color: var(--texto); letter-spacing: -0.02em; }
.topbar-sub { font-size: 12px; color: var(--texto-muy-suave); margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ciclo-badge {
  display: inline-flex;
  align-items: center;
  background: var(--dorado);
  color: var(--verde-oscuro);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.progress-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fondo);
  padding: 8px 16px;
  border-radius: 30px;
  border: 1px solid var(--borde);
}
.progress-pill-pct { font-size: 15px; font-weight: 700; color: var(--dorado); }
.progress-pill-bar-bg { width: 100px; height: 6px; background: #e0e8e5; border-radius: 3px; overflow: hidden; }
.progress-pill-bar-fill { height: 6px; background: var(--dorado); border-radius: 3px; transition: width 0.4s; }
.progress-pill-label { font-size: 11px; color: var(--texto-muy-suave); }

.main-content { padding: 28px 32px; }

/* ─── CARDS ─── */
.card {
  background: white;
  border-radius: var(--radio-lg);
  border: 1px solid var(--borde);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--verde-medio);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title svg { width: 14px; height: 14px; }

/* ─── BARRA DE PROGRESO GRANDE ─── */
.progress-card { background: white; border-radius: var(--radio-lg); border: 1px solid var(--borde); padding: 22px 24px; margin-bottom: 20px; }
.progress-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.progress-title { font-size: 15px; font-weight: 700; color: var(--texto); }
.progress-ciclo { font-size: 11px; color: var(--texto-muy-suave); margin-top: 2px; }
.progress-pct-big { font-size: 32px; font-weight: 700; color: var(--dorado); line-height: 1; }
.progress-bar-bg { height: 10px; background: #f0f0f0; border-radius: 5px; margin-bottom: 8px; overflow: hidden; }
.progress-bar-fill { height: 10px; background: var(--dorado); border-radius: 5px; transition: width 0.5s ease; }
.progress-bar-fill.complete { background: #22c55e; }
.progress-sub { font-size: 12px; color: var(--texto-muy-suave); margin-bottom: 14px; }
.progress-msg {
  background: #FFFBEB;
  border-left: 3px solid var(--dorado);
  padding: 11px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  color: #78350f;
  line-height: 1.6;
}
.progress-msg.complete { background: #F0FDF4; border-left-color: #22c55e; color: #166534; }

/* ─── FORMULARIOS DESCARGABLES ─── */
.forms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.form-dl-item {
  background: #f5f9f7;
  border: 1px solid #d0e4de;
  border-radius: var(--radio-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.form-dl-name { font-size: 12px; font-weight: 500; color: var(--texto); line-height: 1.4; }
.form-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--verde-oscuro);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  text-decoration: none;
  width: fit-content;
  transition: background 0.2s;
}
.form-dl-btn:hover { background: #1a3d37; }
.form-dl-btn svg { width: 13px; height: 13px; }

/* ─── ALERTAS DE ATENCIÓN ─── */
.alerta-atencion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radio-md);
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alerta-revision {
  background: #FFFBEB;
  border-color: #F59E0B;
}
.alerta-pendiente {
  background: #EFF6FF;
  border-color: #93C5FD;
}
.alerta-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alerta-revision .alerta-icon { background: #FEF3C7; color: #D97706; }
.alerta-pendiente .alerta-icon { background: #DBEAFE; color: #2563EB; }
.alerta-icon svg { width: 18px; height: 18px; }
.alerta-body { flex: 1; }
.alerta-titulo { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.alerta-revision .alerta-titulo { color: #92400E; }
.alerta-pendiente .alerta-titulo { color: #1E40AF; }
.alerta-desc { font-size: 12px; color: #666; line-height: 1.4; }
.alerta-btn {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}
.alerta-revision .alerta-btn { background: #F59E0B; color: #fff; }
.alerta-pendiente .alerta-btn { background: #2563EB; color: #fff; }

/* ─── CHECKLIST ─── */
.card-title-checklist {
  background: var(--verde-oscuro);
  color: var(--dorado) !important;
  margin: -22px -24px 16px;
  padding: 13px 20px;
  border-radius: var(--radio-lg) var(--radio-lg) 0 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-title-checklist svg { color: var(--dorado); fill: var(--dorado); }
.section-sep {
  background: var(--verde-claro);
  border-left: 4px solid var(--verde-medio);
  padding: 11px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--verde-oscuro);
  margin: 24px 0 12px;
}

.doc-item {
  background: white;
  border: 1px solid var(--borde);
  border-left: 3px solid var(--dorado);
  border-radius: var(--radio-md);
  margin-bottom: 8px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.doc-item:hover { box-shadow: var(--sombra-sm); }

.doc-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 12px;
  background: #f4f8f6;
  border-bottom: 1px solid #e8f0ed;
}
.doc-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--verde-oscuro);
  flex: 1;
  line-height: 1.4;
}
.doc-item-body { padding: 0 16px 14px; border-top: 1px solid var(--borde); }

/* Badges de estado */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge-ok { background: #DCFCE7; color: #166534; }
.badge-pending { background: #FEF9C3; color: #854d0e; }
.badge-na { background: #DBEAFE; color: #1e40af; }
.badge-approved { background: #166534; color: #ffffff; }
.badge-revision { background: #FFF3CD; color: #92400E; border: 1px solid #F59E0B; }

/* Upload area */
.upload-zone {
  border: 2px dashed #b0c4be;
  border-radius: var(--radio-md);
  padding: 20px;
  text-align: center;
  background: #f8faf9;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}
.upload-zone:hover { border-color: var(--verde-medio); background: var(--verde-claro); }
.upload-zone.dragover { border-color: var(--dorado); background: #FFFBEB; }
.upload-zone-icon { font-size: 28px; margin-bottom: 6px; }
.upload-zone-text { font-size: 12px; color: var(--texto-suave); }
.upload-zone-sub { font-size: 11px; color: var(--texto-muy-suave); margin-top: 3px; }
.upload-file-input { display: none; }

.upload-form-row { display: flex; gap: 10px; margin-top: 10px; align-items: flex-end; flex-wrap: wrap; }
.upload-form-row .field { flex: 1; min-width: 180px; margin-bottom: 0; }

.no-aplica-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.no-aplica-row label { font-size: 12px; color: var(--texto-suave); cursor: pointer; }

.doc-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.doc-obs { font-size: 11px; color: var(--texto-muy-suave); margin-top: 4px; font-style: italic; }

/* Aviso archivo seleccionado */
.upload-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #EFF6FF;
  border: 1px solid #93C5FD;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  color: #1E40AF;
  margin: 8px 0 4px;
  animation: fadeInHint 0.3s ease;
}
.upload-hint::before { content: "↑"; font-weight: 700; font-size: 14px; }
@keyframes fadeInHint {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Botón animado cuando hay archivo listo */
.btn-ready {
  background: var(--dorado) !important;
  color: var(--verde-oscuro) !important;
  box-shadow: 0 0 0 3px rgba(250,197,105,0.35);
  animation: pulseReady 1.6s ease infinite;
}
@keyframes pulseReady {
  0%, 100% { box-shadow: 0 0 0 3px rgba(250,197,105,0.35); }
  50%       { box-shadow: 0 0 0 7px rgba(250,197,105,0.12); }
}
.doc-obs-revision {
  background: #FFF3CD;
  border-left: 3px solid #F59E0B;
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #92400E;
  margin-bottom: 10px;
}

/* Pendientes strip */
.pending-strip {
  background: #FFF7ED;
  border: 1px solid #fed7aa;
  border-radius: var(--radio-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.pending-strip-icon { font-size: 16px; flex-shrink: 0; }
.pending-strip-label { font-size: 12px; font-weight: 600; color: #9a3412; margin-bottom: 3px; }
.pending-strip-list { font-size: 12px; color: #c2410c; }

/* ─── SPINNER ─── */
.spinner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16,40,36,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.spinner-overlay.active { display: flex; }
.spinner {
  width: 44px; height: 44px;
  border: 4px solid rgba(250,197,105,0.2);
  border-top-color: var(--dorado);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-text { color: white; font-size: 13px; font-weight: 500; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════
   PÁGINA DE PROGRESO / KPIs
═══════════════════════════════════════════ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.kpi-card {
  background: white;
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi-card-ok    { border-top: 3px solid #22c55e; }
.kpi-card-pending { border-top: 3px solid #FAC569; }
.kpi-card-na    { border-top: 3px solid #60a5fa; }

.kpi-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.kpi-icon svg { width: 18px; height: 18px; }
.kpi-icon-total   { background: #f0f4f2; color: var(--verde-medio); }
.kpi-icon-ok      { background: #dcfce7; color: #166534; }
.kpi-icon-pending { background: #fef9c3; color: #854d0e; }
.kpi-icon-na      { background: #dbeafe; color: #1e40af; }

.kpi-value         { font-size: 32px; font-weight: 700; color: var(--texto); letter-spacing: -0.03em; line-height: 1; }
.kpi-value-ok      { color: #16a34a; }
.kpi-value-pending { color: #d97706; }
.kpi-value-na      { color: #2563eb; }
.kpi-label         { font-size: 13px; font-weight: 600; color: var(--texto); margin-top: 4px; }
.kpi-sub           { font-size: 11px; color: var(--texto-muy-suave); }

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.chart-card { margin-bottom: 0; }

.dona-center-label {
  position: absolute;
  text-align: center;
  pointer-events: none;
}
.dona-pct { font-size: 28px; font-weight: 700; color: var(--texto); line-height: 1; }
.dona-sub { font-size: 11px; color: var(--texto-muy-suave); margin-top: 2px; }

.dona-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}
.dona-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--texto-suave);
}
.dona-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.progress-big-wrap { margin: 8px 0 20px; }
.progress-big-num  { font-size: 52px; font-weight: 700; color: var(--dorado); line-height: 1; letter-spacing: -0.04em; }
.progress-big-sym  { font-size: 28px; font-weight: 600; }
.progress-big-label { font-size: 12px; color: var(--texto-muy-suave); margin-top: 2px; }

.milestone-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.milestone-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f9fbfa;
  border: 1px solid var(--borde);
}
.milestone-item.done { background: #f0fdf4; border-color: #bbf7d0; }
.milestone-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--borde); flex-shrink: 0;
}
.milestone-item.done .milestone-dot { background: #22c55e; }
.milestone-text { font-size: 12px; color: var(--texto-suave); flex: 1; }
.milestone-item.done .milestone-text { color: var(--texto); font-weight: 500; }
.milestone-badge {
  font-size: 10px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  white-space: nowrap;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.docs-table thead tr {
  border-bottom: 2px solid var(--borde);
}
.docs-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-muy-suave);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.docs-table td {
  padding: 12px;
  border-bottom: 1px solid var(--borde);
  vertical-align: middle;
}
.docs-table tbody tr:last-child td { border-bottom: none; }
.docs-table tbody tr:hover td { background: #f9fbfa; }
.doc-num { color: var(--texto-muy-suave); font-weight: 600; width: 36px; }
.doc-name-cell { font-weight: 500; color: var(--dorado); }

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .sidebar { width: 220px; }
  .main-content { padding: 20px 16px; }
  .main-topbar { padding: 12px 16px; }
  .progress-pill { display: none; }
  .auth-card { padding: 32px 24px 28px; }
}
@media (max-width: 600px) {
  .portal-layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .forms-grid { grid-template-columns: 1fr; }
}

/* ─── AUTORIZACIÓN ─── */
.auth-legal-body {
  font-size: 13px;
  color: var(--texto-suave);
  line-height: 1.75;
  text-align: justify;
  margin-bottom: 14px;
}
.auth-rights-box {
  background: #f5f9f7;
  border-left: 3px solid var(--verde-medio);
  padding: 14px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 12px;
  color: var(--texto-suave);
  line-height: 1.7;
  margin-bottom: 22px;
}
.auth-rights-box strong { color: var(--texto); font-weight: 600; }
.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f5f9f7;
  border: 1.5px solid #c8dcd8;
  color: var(--verde-medio);
  font-size: 12px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  margin-bottom: 22px;
  transition: all 0.2s;
}
.pdf-btn:hover { background: var(--verde-claro); border-color: var(--verde-medio); }
