/* ========== DESIGN TOKENS ========== */
:root {
  --bg: #EEF2F7;
  --surface: #FAFBFC;
  --surface-secondary: #F4F7FA;
  --sidebar: #0F172A;
  --sidebar-hover: rgba(255,255,255,0.08);
  --sidebar-active-bg: #4338CA;
  --text: #1E293B;
  --text-dim: #64748B;
  --text-light: #94A3B8;
  --border: #DCE4EC;
  --primary: #4338CA;
  --primary-hover: #4F46E5;
  --primary-light: rgba(67,56,202,0.1);
  --accent: #4338CA;
  --prevenir: #0EA5E9;
  --detectar: #F59E0B;
  --corregir: #10B981;
  --success: #16A34A;
  --success-light: rgba(22,163,74,0.1);
  --warning: #D97706;
  --warning-light: rgba(217,119,6,0.1);
  --danger: #DC2626;
  --danger-light: rgba(220,38,38,0.1);
  --gender: #D946EF;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 12px rgba(15,23,42,0.08);
  --shadow-hover: 0 6px 20px rgba(15,23,42,0.12);
  --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --transition: 0.25s ease;
  --sidebar-width: 250px;
  --sidebar-collapsed: 70px;
  --topbar-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

.text-dim { color: var(--text-dim); }
.text-light { color: var(--text-light); }
.text-primary { color: var(--primary) !important; }
.text-prevenir { color: var(--prevenir); }
.text-detectar { color: var(--detectar); }
.text-corregir { color: var(--corregir); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-gender { color: var(--gender); }
.bg-primary-light { background: var(--primary-light); }
.bg-success-light { background: var(--success-light); }
.bg-warning-light { background: var(--warning-light); }
.bg-danger-light { background: var(--danger-light); }
.fw-600 { font-weight: 600; }
.ls-tight { letter-spacing: -0.02em; }

.fade-in { animation: fadeIn 0.35s ease both; }
.fade-in-fast { animation: fadeIn 0.2s ease both; }
.slide-up { animation: slideUp 0.35s ease both; }
.slide-in-right { animation: slideInRight 0.3s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes scaleIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ========== SPLIT SCREEN AUTH ========== */
.auth-split { display: flex; min-height: 100vh; }
.auth-brand { flex: 0 0 50%; background: linear-gradient(135deg, #0F172A, #1E293B); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 3rem; position: relative; overflow: hidden; }
.auth-brand::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 50%, rgba(67,56,202,0.15) 0%, transparent 60%), radial-gradient(circle at 70% 80%, rgba(14,165,233,0.1) 0%, transparent 50%); pointer-events: none; }
.auth-brand-content { position: relative; z-index: 1; text-align: center; max-width: 400px; }
.auth-brand-icon { width: 80px; height: 80px; background: rgba(255,255,255,0.1); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); }
.auth-brand h1 { color: #FFF; font-size: 1.75rem; margin: 0 0 0.75rem; }
.auth-brand p { color: rgba(255,255,255,0.7); font-size: 1rem; line-height: 1.6; margin: 0; }
.auth-brand-footer { position: absolute; bottom: 2rem; color: rgba(255,255,255,0.4); font-size: 0.8rem; }
.auth-panel { flex: 0 0 50%; display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 2.5rem; }
.auth-card h2 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.auth-card .subtitle { color: var(--text-dim); margin: 0 0 1.75rem; font-size: 0.9375rem; }

@media (max-width: 768px) {
  .auth-split { flex-direction: column; }
  .auth-brand { display: none; }
  .auth-panel { flex: 1; padding: 1.5rem; }
  .auth-card { padding: 1.75rem; box-shadow: none; }
}

/* ========== FORM ELEMENTS ========== */
.form-input { height: 48px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: #F8FAFC; color: var(--text); font-size: 0.9375rem; padding: 0 1rem; width: 100%; transition: all var(--transition); font-family: inherit; }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,56,202,0.15); }
.form-input::placeholder { color: var(--text-light); }
.form-input-sm { height: 42px; font-size: 0.875rem; }
.form-input-lg { height: 52px; font-size: 1rem; }
.form-input.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-input.textarea { height: auto; min-height: 100px; padding: 0.75rem 1rem; resize: vertical; }
.form-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text-dim); margin-bottom: 0.375rem; text-transform: uppercase; letter-spacing: 0.03em; }
.form-group { margin-bottom: 1.25rem; }
.input-icon-wrapper { position: relative; }
.input-icon-wrapper .input-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-light); pointer-events: none; }
.input-icon-wrapper .form-input { padding-left: 2.75rem; }
.password-toggle { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-light); cursor: pointer; padding: 0; }
.password-toggle:hover { color: var(--text-dim); }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-family: inherit; font-size: 0.9375rem; font-weight: 600; padding: 0.625rem 1.25rem; border: none; border-radius: var(--radius-md); cursor: pointer; transition: all var(--transition); text-decoration: none; line-height: 1.4; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803D; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #B45309; color: #fff; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-secondary); color: var(--text); }
.btn-outline-primary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-lg { font-size: 1rem; padding: 0.75rem 1.75rem; }
.btn-sm { font-size: 0.8125rem; padding: 0.375rem 0.875rem; border-radius: 8px; }
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn:not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.btn-group .btn:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }

/* ========== ALERT CARDS ========== */
.alert-card { display: flex; gap: 0.75rem; padding: 1rem 1.125rem; border-radius: var(--radius-md); background: var(--surface-secondary); border: 1px solid var(--border); }
.alert-card .alert-icon { font-size: 1.25rem; flex-shrink: 0; }
.alert-card .alert-text { flex: 1; font-size: 0.875rem; color: var(--text-dim); line-height: 1.5; }
.alert-card .alert-text strong { color: var(--text); display: block; margin-bottom: 0.125rem; font-size: 0.875rem; }
.alert-warning { background: var(--warning-light); border-color: rgba(217,119,6,0.2); }
.alert-info { background: var(--primary-light); border-color: rgba(67,56,202,0.15); }

/* ========== BADGES ========== */
.badge { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 100px; background: var(--surface-secondary); color: var(--text-dim); }
.badge-junior { background: var(--danger-light); color: var(--danger); }
.badge-en-marcha { background: var(--warning-light); color: var(--warning); }
.badge-senior { background: var(--success-light); color: var(--success); }
.badge-prevenir { background: rgba(14,165,233,0.1); color: var(--prevenir); }
.badge-detectar { background: rgba(245,158,11,0.1); color: var(--detectar); }
.badge-corregir { background: rgba(16,185,129,0.1); color: var(--corregir); }
.badge-caracterizacion { background: rgba(100,116,139,0.1); color: #64748B; }

/* ========== SIDEBAR ========== */
.sidebar { position: fixed; left: 0; top: 0; height: 100vh; width: var(--sidebar-width); background: var(--sidebar); z-index: 1030; display: flex; flex-direction: column; transition: width 0.25s ease, left 0.25s ease; overflow: hidden; }
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-brand { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.125rem; border-bottom: 1px solid rgba(255,255,255,0.06); min-height: var(--topbar-height); flex-shrink: 0; }
.sidebar-brand-icon { width: 36px; height: 36px; background: var(--sidebar-active-bg); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.125rem; flex-shrink: 0; }
.sidebar-brand-text { overflow: hidden; white-space: nowrap; }
.sidebar-brand-text h3 { color: #fff; font-size: 0.9375rem; margin: 0; font-weight: 700; }
.sidebar-brand-text small { color: rgba(255,255,255,0.4); font-size: 0.6875rem; }
.sidebar.collapsed .sidebar-brand-text { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.75rem 0; }
.sidebar-section-title { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.3); padding: 0.75rem 1.125rem 0.375rem; white-space: nowrap; }
.sidebar.collapsed .sidebar-section-title { display: none; }
.sidebar-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1.125rem; color: rgba(255,255,255,0.6); text-decoration: none; transition: all var(--transition); white-space: nowrap; font-size: 0.875rem; font-weight: 500; }
.sidebar-item:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-item.active { background: var(--sidebar-active-bg); color: #fff; }
.sidebar-item .icon { font-size: 1.125rem; width: 20px; text-align: center; flex-shrink: 0; }
.sidebar.collapsed .sidebar-item .label { display: none; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 0.5rem 0; flex-shrink: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1029; }
.sidebar-overlay.show { display: block; }

/* ========== MAIN LAYOUT ========== */
.main-wrapper { margin-left: var(--sidebar-width); min-height: 100vh; transition: margin-left 0.25s ease; display: flex; flex-direction: column; }
.sidebar.collapsed + .main-wrapper,
.sidebar.collapsed ~ .main-wrapper { margin-left: var(--sidebar-collapsed); }
.topbar { height: var(--topbar-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1020; left: var(--sidebar-width); transition: left 0.25s ease; }
.sidebar.collapsed + .main-wrapper .topbar,
.sidebar.collapsed ~ .main-wrapper .topbar { left: var(--sidebar-collapsed); }
.topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.topbar-toggle { width: 36px; height: 36px; border-radius: 10px; border: none; background: transparent; color: var(--text-dim); font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.topbar-toggle:hover { background: var(--surface-secondary); }
.topbar-breadcrumb { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--text-dim); }
.topbar-breadcrumb a { color: var(--text-dim); }
.topbar-breadcrumb a:hover { color: var(--primary); }
.topbar-breadcrumb .separator { color: var(--text-light); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user { display: flex; align-items: center; gap: 0.625rem; cursor: pointer; padding: 0.375rem; border-radius: var(--radius-md); transition: background var(--transition); }
.topbar-user:hover { background: var(--surface-secondary); }
.topbar-avatar { width: 36px; height: 36px; border-radius: 10px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; }
.topbar-user-name { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.topbar-user-role { font-size: 0.6875rem; color: var(--text-dim); }
.main-content { flex: 1; padding: 0; }
.page-content { padding: 1.5rem; max-width: 100%; }

/* ========== ADMIN LOGIN MODAL ========== */
.admin-login-btn { position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1050; width: 38px; height: 38px; border: none; border-radius: 10px; background: var(--surface); color: var(--text-dim); font-size: 1.0625rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.admin-login-btn:hover { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); z-index: 1060; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--surface); border-radius: var(--radius-lg); padding: 1.5rem; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(15,23,42,0.2); position: relative; }
.modal-close { position: absolute; top: 0.75rem; right: 0.75rem; width: 32px; height: 32px; border: none; border-radius: 8px; background: transparent; color: var(--text-dim); font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.modal-close:hover { background: var(--surface-secondary); }

/* ========== SURVEY (formulario) ========== */
.survey-topbar { height: var(--topbar-height); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; position: sticky; top: 0; z-index: 1020; }
.survey-topbar-left { display: flex; align-items: center; gap: 0.75rem; flex: 1; }
.survey-topbar-center { display: flex; align-items: center; justify-content: center; flex: 1; }
.survey-topbar-right { display: flex; align-items: center; gap: 0.75rem; flex: 1; justify-content: flex-end; }
.survey-topbar-right .user-info { font-size: 0.8125rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.survey-topbar .brand { display: flex; align-items: center; gap: 0.625rem; font-weight: 700; font-size: 1rem; color: var(--text); }
.survey-topbar .brand .brand-icon { width: 32px; height: 32px; background: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.0625rem; }
.survey-progress { max-width: 820px; margin: 1rem auto 0; padding: 0 1.5rem; }
.survey-progress-sticky { position: sticky; top: var(--topbar-height); z-index: 1015; background: var(--surface); box-shadow: 0 2px 8px rgba(15,23,42,0.08); }
.survey-progress-bar { height: 6px; background: var(--border); border-radius: 100px; overflow: hidden; }
.survey-progress-fill { height: 100%; background: var(--primary); border-radius: 100px; transition: width 0.4s ease; }
.survey-tabs { display: flex; gap: 0.25rem; padding: 1rem 1.5rem; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; }
.survey-tab { display: inline-flex; align-items: center; gap: 0.375rem; background: none; border: none; font-family: inherit; font-size: 0.8125rem; font-weight: 500; color: var(--text-dim); padding: 0.5rem 1rem; border-radius: 8px; cursor: pointer; transition: all var(--transition); }
.survey-tab:hover { background: var(--surface-secondary); color: var(--text); }
.survey-tab.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.survey-tab .check { color: var(--success); }

/* ========== QUESTION CARDS ========== */
.question-card { margin: 1rem 0; padding: 1.25rem; background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border-left: 4px solid var(--border); transition: box-shadow var(--transition); }
.question-card.invalid { border-left-color: var(--danger); background: var(--danger-light); }
.question-card.block-caracterizacion { border-left-color: #64748B; }
.question-card.block-prevenir { border-left-color: var(--prevenir); }
.question-card.block-detectar { border-left-color: var(--detectar); }
.question-card.block-corregir { border-left-color: var(--corregir); }
.question-header { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.question-number { width: 32px; height: 32px; border-radius: 10px; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; flex-shrink: 0; }
.question-text { margin: 0; font-size: 0.9375rem; font-weight: 500; color: var(--text); line-height: 1.5; flex: 1; }
.gender-tag { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.7rem; padding: 0.125rem 0.5rem; border-radius: 6px; background: rgba(217,70,239,0.1); color: var(--gender); font-weight: 600; margin-left: 0.5rem; }
.question-options { display: flex; flex-direction: column; gap: 0.5rem; }
.option-pill { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: var(--radius-md); border: 1.5px solid var(--border); cursor: pointer; transition: all var(--transition); background: var(--surface); }
.option-pill:hover { border-color: var(--primary); background: var(--primary-light); }
.option-pill.selected { border-color: var(--primary); background: var(--primary-light); }
.option-pill.selected.block-prevenir { border-color: var(--prevenir); background: rgba(14,165,233,0.08); }
.option-pill.selected.block-detectar { border-color: var(--detectar); background: rgba(245,158,11,0.08); }
.option-pill.selected.block-corregir { border-color: var(--corregir); background: rgba(16,185,129,0.08); }
.option-letter { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-secondary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8125rem; color: var(--text-dim); flex-shrink: 0; transition: all var(--transition); }
.option-pill.selected .option-letter { background: var(--primary); color: #fff; }
.option-pill.selected.block-prevenir .option-letter { background: var(--prevenir); }
.option-pill.selected.block-detectar .option-letter { background: var(--detectar); }
.option-pill.selected.block-corregir .option-letter { background: var(--corregir); }
.option-text { font-size: 0.875rem; color: var(--text); line-height: 1.4; }

/* ========== CARD STATIC ========== */
.card-static { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-body { padding: 1.5rem; }

/* ========== RESULTS ========== */
.result-container { max-width: 820px; margin: 0 auto; padding: 2rem 1.5rem; }
.que-sigue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.result-hero { text-align: center; margin-bottom: 1.5rem; }
.result-hero h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
.result-hero .company { font-size: 1.125rem; font-weight: 600; margin: 0; }
.result-hero .nit { font-size: 0.8125rem; color: var(--text-dim); margin: 0; }
.result-score { text-align: center; padding: 2rem; margin-bottom: 1.5rem; }
.result-score-value { font-size: 3rem; font-weight: 800; color: var(--primary); }
.result-score-total { font-size: 1.25rem; color: var(--text-dim); font-weight: 400; }
.result-score-label { font-size: 0.8125rem; color: var(--text-dim); margin-top: 0.25rem; }

/* ========== PILLAR GRID ========== */
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.pillar-card { background: var(--surface); border-radius: var(--radius-lg); padding: 1.25rem; border: 1px solid var(--border); box-shadow: var(--shadow-card); }
.pillar-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.pillar-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.125rem; color: #fff; flex-shrink: 0; }
.pillar-prevenir .pillar-icon { background: var(--prevenir); }
.pillar-detectar .pillar-icon { background: var(--detectar); }
.pillar-corregir .pillar-icon { background: var(--corregir); }
.pillar-title { font-size: 0.875rem; font-weight: 700; }
.pillar-value { font-size: 1.75rem; font-weight: 800; margin-bottom: 0.5rem; }
.pillar-prevenir .pillar-value { color: var(--prevenir); }
.pillar-detectar .pillar-value { color: var(--detectar); }
.pillar-corregir .pillar-value { color: var(--corregir); }
.pillar-bar { height: 8px; background: var(--border); border-radius: 100px; overflow: hidden; }
.pillar-bar-fill { height: 100%; border-radius: 100px; transition: width 0.8s ease; }
.pillar-prevenir .pillar-bar-fill { background: var(--prevenir); }
.pillar-detectar .pillar-bar-fill { background: var(--detectar); }
.pillar-corregir .pillar-bar-fill { background: var(--corregir); }

/* ========== RECOMMENDATION CARDS ========== */
.recommendation-card { display: flex; gap: 0.75rem; padding: 1rem 1.125rem; background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 0.675rem; box-shadow: var(--shadow-sm); }
.recommendation-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; flex-shrink: 0; }
.recommendation-card.level-high { border-left: 4px solid var(--danger); }
.recommendation-card.level-high .recommendation-icon { background: var(--danger-light); color: var(--danger); }
.recommendation-card.level-medium { border-left: 4px solid var(--warning); }
.recommendation-card.level-medium .recommendation-icon { background: var(--warning-light); color: var(--warning); }
.recommendation-card.level-low { border-left: 4px solid var(--success); }
.recommendation-card.level-low .recommendation-icon { background: var(--success-light); color: var(--success); }
.recommendation-text { flex: 1; }
.recommendation-text h4 { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.4; }

/* ========== KPI CARDS ========== */
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.kpi-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin-bottom: 0.25rem; }
.kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.kpi-sub { font-size: 0.8125rem; color: var(--text-dim); }

/* ========== DROPDOWN ========== */
.dropdown-menu { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-hover); padding: 0.375rem; z-index: 1050; }
.dropdown-menu.show { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.8125rem; color: var(--text); border-radius: var(--radius-sm); text-decoration: none; transition: background var(--transition); }
.dropdown-item:hover { background: var(--surface-secondary); color: var(--text); }

/* ========== MODAL ========== */
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); }
.modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border); padding: 0.75rem 1.25rem; }

/* ========== ANIMATE ON SCROLL ========== */
.animate-on-scroll { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.animate-on-scroll.fade-in { opacity: 1; transform: translateY(0); }

/* ========== FORM-GRID-3 ========== */
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* ========== MOBILE FAB ========== */
.mobile-fab { display: none; position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 1050; width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 1.375rem; border: none; cursor: pointer; box-shadow: 0 4px 16px rgba(67,56,202,0.35); align-items: center; justify-content: center; transition: all var(--transition); }
.mobile-fab:hover { transform: scale(1.05); background: var(--primary-hover); }
.mobile-fab:active { transform: scale(0.95); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .pillar-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { width: 0; left: calc(-1 * var(--sidebar-collapsed)); }
  .sidebar.mobile-open { width: var(--sidebar-width); left: 0; }
  .sidebar + .main-wrapper,
  .sidebar ~ .main-wrapper { margin-left: 0; }
  .topbar { left: 0; }
  .mobile-fab { display: flex; }
  .page-content { padding: 1rem; }
  .auth-panel { padding: 1.5rem; }
  .auth-card { max-width: 100%; }
  .pillar-grid { grid-template-columns: 1fr; }
  .result-score-value { font-size: 2.5rem; }
  .card-custom .card-header { padding: 0.75rem 1rem; font-size: 0.875rem; }
  .card-custom .card-body { padding: 0.75rem; }
  table.table-admin { font-size: 0.75rem; }
  table.table-admin thead th,
  table.table-admin tbody td { padding: 0.5rem; }
  .survey-tabs { padding: 1rem; gap: 0.25rem; }
  .survey-tab { font-size: 0.75rem; padding: 0.5rem 0.75rem; }
  .survey-topbar { padding: 0 0.5rem; justify-content: center; }
  .survey-topbar-left { display: none; }
  .survey-topbar-center { flex: 1; justify-content: center; }
  .survey-topbar-right .user-info { display: none; }
  .survey-topbar-center img { height: 36px !important; }
  .question-card { margin: 0.75rem 0; padding: 1rem; }
  .question-text { font-size: 0.8125rem; }
  .option-pill { font-size: 0.8125rem; padding: 0.625rem 0.875rem; }
  .auth-card .form-input { height: 44px; font-size: 0.875rem; }
  .form-grid-3 { grid-template-columns: 1fr !important; }
  .result-container { padding: 0 0.75rem; }
  .card-static { padding: 1rem; }
  .recommendation-card { padding: 0.75rem; }
  .recommendation-text h4 { font-size: 0.8125rem; }
  .survey-progress { padding: 0 0.75rem; margin: 0.5rem 0; }
  .que-sigue-grid { grid-template-columns: 1fr; }
  .btn-result { width: 100%; min-width: 0; }
  .form-wrapper { padding: 0 1rem !important; }
}
@media (max-width: 576px) {
  .auth-card { padding: 1.5rem; border-radius: var(--radius-md); }
  .kpi-card { padding: 1rem; }
  .kpi-value { font-size: 1.375rem; }
  .topbar-user-info { display: none; }
  .survey-topbar-center img { height: 28px !important; }
  .form-grid-3 { grid-template-columns: 1fr !important; }
  .que-sigue-grid { grid-template-columns: 1fr; }
  .btn-result { width: 100%; min-width: 0; }
  .form-wrapper { padding: 0 1rem !important; }
  .btn-lg { font-size: 0.9375rem; padding: 0.625rem 1.25rem; }
  .option-pill { padding: 0.5rem 0.75rem; gap: 0.5rem; }
  .option-text { font-size: 0.8125rem; }
  #submitBtn { width: 100%; }
}
@media (max-width: 480px) {
  .survey-topbar { padding: 0 0.375rem; }
  .survey-topbar-center img { height: 24px !important; }
  .survey-tab { font-size: 0.7rem; padding: 0.375rem 0.5rem; }
  .survey-tab .check { display: none !important; }
  .question-card { padding: 0.75rem; }
  .question-number { width: 26px; height: 26px; font-size: 0.65rem; }
  .option-pill { padding: 0.5rem 0.625rem; gap: 0.375rem; }
  .option-letter { width: 24px; height: 24px; font-size: 0.7rem; }
  .result-hero h1 { font-size: 1.125rem; }
  .result-score-value { font-size: 2rem; }
  .pillar-card { padding: 1rem; }
  .pillar-value { font-size: 1.375rem; }
  .recommendation-card { padding: 0.625rem; }
  .form-wrapper { padding: 0 0.75rem !important; }
  .survey-tab i { display: none; }
}

/* ========== ADMIN / LEGACY ========== */
.card-custom { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.card-custom .card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 0.9375rem; }
.card-custom .card-body { padding: 1.25rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table-admin { width: 100%; border-collapse: collapse; font-size: 0.8125rem; background: var(--surface); }
table.table-admin thead th { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--border); color: var(--text-dim); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; background: #F4F7FA; white-space: nowrap; }
table.table-admin tbody td { padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--text); }
table.table-admin tbody td.text-wrap { max-width: 250px; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; }
table.table-admin tbody td.text-wrap-sm { max-width: 180px; white-space: normal; word-wrap: break-word; overflow-wrap: break-word; }
table.table-admin tbody tr:hover { background: rgba(0,0,0,0.02); }
.btn-sm-custom { padding: 0.3rem 0.75rem; border-radius: 8px; border: none; font-family: inherit; font-size: 0.75rem; font-weight: 500; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 0.25rem; }
.btn-sm-custom:hover { transform: translateY(-1px); }
.btn-primary-sm { background: rgba(13,110,253,0.1); color: #0d6efd; font-weight: 600; border: 1px solid rgba(13,110,253,0.25); }
.btn-primary-sm:hover { background: rgba(13,110,253,0.2); }
.btn-danger-sm { background: rgba(239,68,68,0.15); color: #991b1b; font-weight: 600; border: 1px solid rgba(239,68,68,0.25); }
.btn-danger-sm:hover { background: rgba(239,68,68,0.25); }
.btn-success-sm { background: rgba(16,185,129,0.15); color: #065f46; font-weight: 600; border: 1px solid rgba(16,185,129,0.25); }
.btn-success-sm:hover { background: rgba(16,185,129,0.25); }
.btn-warning-sm { background: rgba(245,158,11,0.15); color: #78350f; font-weight: 600; border: 1px solid rgba(245,158,11,0.25); }
.btn-warning-sm:hover { background: rgba(245,158,11,0.25); }
.badge-custom { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.7rem; font-weight: 600; }
.badge-active { background: rgba(16,185,129,0.1); color: #059669; }
.badge-detect { background: rgba(37,99,235,0.1); color: #2563eb; }
.badge-correct { background: rgba(217,119,6,0.1); color: #d97706; }
.badge-inactive { background: rgba(87,101,116,0.1); color: var(--text-dim); }
.form-control { width:100%;padding:0.6rem 0.875rem;background:#F8FAFC;border:1px solid var(--border);border-radius:10px;color:var(--text);font-family:inherit;font-size:0.875rem;outline:none;transition:all 0.2s; }
.form-control:focus { border-color:var(--primary);background:var(--surface);box-shadow:0 0 0 3px rgba(67,56,202,0.15); }
.form-control::placeholder { color: #94a3b8; }
select.form-control option { background: var(--surface); color: var(--text); }
textarea.form-control { resize: vertical; }
