:root {
    --bg-body: #edf1f5;
    --bg-card: #ffffff;
    --text-dark: #3e5569;
    --text-muted: #8d97ad;
    --text-light: #b8c3d5;
    --primary-color: #5f76e8; 
    --primary-hover: #4c5fba;
    --primary-gradient: linear-gradient(135deg, #5f76e8 0%, #7388ec 100%);
    --success: #22ca80;
    --warning: #ffc107;
    --danger: #ff4f70;
    --info: #01caf1;
    --sidebar-bg: #212529;
    --sidebar-hover: rgba(255, 255, 255, 0.05);
    --sidebar-text: #8d97ad;
    --sidebar-text-active: #ffffff;
    --border-color: #e8eef3;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-card: 0px 1px 15px rgba(0, 0, 0, 0.05);
    --shadow-header: 0px 1px 15px rgba(0, 0, 0, 0.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Rubik', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
audio, video, img { max-width: 100%; height: auto; }
.fade-in { animation: fadeIn 0.35s ease forwards; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes spinIA {
    to { transform: rotate(360deg); }
}
.text-center { text-align: center; }
.btn-primary {
    background: var(--primary-color); color: #ffffff; border: none;
    padding: 12px 22px; border-radius: var(--radius-sm); font-size: 0.95rem;
    font-weight: 500; cursor: pointer; transition: 0.2s; text-align: center;
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(95, 118, 232, 0.25); }
.btn-primary:disabled { background: #cbd5e1; cursor: not-allowed; box-shadow: none; }
.btn-secondary {
    background: #ffffff; color: var(--text-dark); border: 1px solid var(--border-color);
    padding: 12px 22px; border-radius: var(--radius-sm); font-size: 0.95rem;
    font-weight: 500; cursor: pointer; transition: 0.2s; text-align: center;
}
.btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.input-moderno, .textarea-moderno {
    width: 100%; padding: 12px 16px; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.95rem; background-color: #ffffff;
    transition: 0.2s; font-family: inherit; color: var(--text-dark); box-sizing: border-box;
}
.input-moderno:focus, .textarea-moderno:focus {
    outline: none; border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(95, 118, 232, 0.15);
}
.w-100 { width: 100%; }
.split-layout { display: flex; min-height: 100vh; width: 100vw; overflow-x: hidden; }
.brand-side {
    flex: 1; background: var(--primary-gradient); color: #ffffff;
    padding: 80px; display: flex; flex-direction: column; justify-content: center;
}
.brand-title { font-size: 2.8rem; font-weight: 700; line-height: 1.2; margin: 20px 0; }
.brand-description { font-size: 1.05rem; color: rgba(255,255,255,0.85); line-height: 1.6; max-width: 440px; }
.interactive-side {
    flex: 1.25; display: flex; align-items: center; justify-content: center;
    padding: 40px 20px; background: var(--bg-body); position: relative;
    max-width: 100%; box-sizing: border-box;
}
.auth-card {
    background: var(--bg-card); padding: 40px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); border: none; width: 100%; max-width: 440px; margin: auto; box-sizing: border-box;
}
.auth-title { font-size: 1.6rem; font-weight: 600; margin-bottom: 8px; color: var(--text-dark); }
.auth-subtitle { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; line-height: 1.5; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--text-dark); }
.auth-actions { margin-bottom: 20px; text-align: right; }
.link-accent { color: var(--primary-color); font-weight: 500; text-decoration: none; }
.link-muted { color: var(--text-muted); font-size: 0.85rem; text-decoration: none; }
.link-muted:hover, .link-accent:hover { text-decoration: underline; }
.auth-footer { text-align: center; margin-top: 25px; font-size: 0.9rem; color: var(--text-muted); }
.logo-placeholder { display: flex; align-items: center; justify-content: center; }
.logo-bold { font-weight: 700; color: var(--primary-color); font-size: 22px; }
.logo-light { font-weight: 300; color: var(--text-muted); font-size: 22px; margin-left: 2px; }
.brand-side .logo-placeholder { justify-content: flex-start; }
.brand-side .logo-bold { color: #ffffff; }
.brand-side .logo-light { color: rgba(255,255,255,0.8); }
.logo-mobile-only { display: none; margin-bottom: 25px; }
.app-topbar, .admin-topbar {
    display: flex; justify-content: space-between; align-items: center;
    background: #ffffff; padding: 0 30px; height: 64px;
    border-bottom: 1px solid var(--border-color); position: sticky; top: 0; 
    z-index: 1000; box-shadow: var(--shadow-header); width: 100%; box-sizing: border-box;
}
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.user-email-text, .admin-email-text { font-size: 0.9rem; font-weight: 500; color: var(--text-dark); }
.btn-logout-header {
    background: #fef2f2; color: var(--danger); border: 1px solid #fecaca;
    padding: 6px 14px; border-radius: 20px; font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: 0.2s;
}
.btn-logout-header:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-avatar-profile {
    border-radius: 50%; width: 36px; height: 36px; padding: 0; 
    display: flex; align-items: center; justify-content: center; 
    background: #f8fafc; border: 1px solid var(--border-color); 
    color: var(--text-dark); cursor: pointer; transition: 0.2s;
}
.btn-avatar-profile:hover { border-color: var(--primary-color); color: var(--primary-color); }
.container-dashboard { width: 100%; max-width: 1000px; padding: 35px 20px; margin: 0 auto; box-sizing: border-box; }
.dashboard-tag { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; color: var(--primary-color); margin-bottom: 4px; }
.dashboard-welcome { font-size: 2rem; font-weight: 700; color: var(--text-dark); margin: 0; letter-spacing: -0.5px; }
.roadmap-wrapper {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-card); padding: 20px 30px; border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); margin-bottom: 30px; box-sizing: border-box; width: 100%;
}
.roadmap-step { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 2; min-width: 80px; flex: 0 0 auto; }
.step-icon { width: 34px; height: 34px; border-radius: 50%; background: #f1f5f9; color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; border: 2px solid var(--border-color); transition: 0.3s; }
.step-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.step-line { flex: 1; height: 3px; background: var(--border-color); margin: 0 10px; position: relative; top: -10px; z-index: 1; transition: 0.3s; min-width: 30px; }
.roadmap-step.completed .step-icon { background: var(--success); border-color: var(--success); color: white; }
.roadmap-step.completed .step-label { color: var(--success); }
.step-line.completed { background: var(--success); }
.roadmap-step.active .step-icon { background: var(--primary-color); border-color: var(--primary-color); color: white; box-shadow: 0 0 0 4px rgba(95,118,232,0.2); }
.roadmap-step.active .step-label { color: var(--primary-color); }
.step-line.active { background: var(--primary-gradient); }
.roadmap-step.match-step .step-icon { background: #fff3cd; border-color: #ffc107; color: #854d0e; font-size: 1.1rem; }
.roadmap-step.match-step .step-label { color: #854d0e; }
.dashboard-layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; }
.section-subtitle { font-size: 1.15rem; font-weight: 600; margin-bottom: 18px; color: var(--text-dark); }
.blocks-grid { display: flex; flex-direction: column; gap: 20px; }
.block-card {
    background: var(--bg-card); border-radius: var(--radius-md); padding: 25px 30px; 
    box-shadow: var(--shadow-card); transition: 0.2s; border: 1px solid transparent; width: 100%; box-sizing: border-box;
}
.block-card:hover { transform: translateY(-2px); border-color: var(--border-color); }
.block-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.block-number { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.block-badge { font-size: 0.75rem; font-weight: 500; padding: 4px 10px; border-radius: 20px; background: #fff3cd; color: #854d0e; }
.badge-locked { background: #f1f5f9; color: var(--text-muted); }
.block-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.block-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.block-locked { opacity: 0.65; }
.progress-text-small { font-size: 0.85rem; font-weight: 600; color: var(--primary-color); }
.sneak-peek-card {
    background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: var(--radius-md);
    padding: 30px; box-shadow: 0 10px 20px rgba(0,0,0,0.15); position: relative; overflow: hidden; width: 100%; box-sizing: border-box;
}
.sneak-peek-icon { width: 50px; height: 50px; background: rgba(255,255,255,0.1); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #ffc107; margin-bottom: 15px; }
.capsules-column { display: flex; flex-direction: column; gap: 20px; }
.capsule-card { background: var(--bg-card); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); transition: 0.2s; border: 1px solid transparent; }
.capsule-card:hover { transform: translateY(-2px); border-color: var(--primary-color); }
.capsule-image { height: 120px; background-size: cover; background-position: center; }
.capsule-content { padding: 20px; }
.capsule-tag { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; color: var(--success); background: #e6fffa; padding: 3px 8px; border-radius: 4px; display: inline-block; margin-bottom: 8px; }
.capsule-title { font-size: 1.05rem; font-weight: 600; color: var(--text-dark); margin: 0 0 6px 0; line-height: 1.3; }
.capsule-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; }
.container-test { width: 100%; max-width: 760px; padding: 35px 20px; margin: 0 auto; box-sizing: border-box; }
.test-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.btn-back { background: none; border: none; color: var(--text-muted); font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: 0.2s; }
.btn-back:hover { color: var(--primary-color); }
.test-counter { font-size: 0.8rem; font-weight: 600; color: var(--primary-color); text-transform: uppercase; background: #e0e7ff; padding: 6px 14px; border-radius: 20px; }
.progress-wrapper { margin-bottom: 30px; }
.progress-bar { height: 6px; background-color: var(--border-color); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary-color); width: 0%; transition: width 0.3s ease; }
.question-card { background: var(--bg-card); padding: 35px; border-radius: var(--radius-md); box-shadow: var(--shadow-card); box-sizing: border-box; width: 100%; }
#questionText { font-size: 1.35rem; font-weight: 600; line-height: 1.4; color: var(--text-dark); margin-bottom: 10px; }
#questionInstructions { font-size: 0.95rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 25px; }
.btn-likert {
    display: block; width: 100%; padding: 14px 18px; margin-bottom: 10px;
    background-color: #ffffff; border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 400;
    font-family: inherit; color: var(--text-dark); text-align: left;
    cursor: pointer; transition: 0.2s; box-sizing: border-box;
}
.btn-likert:hover { border-color: var(--primary-color); background-color: #f8fafc; }
.btn-likert.activo { background-color: #f1f5f9; border-color: var(--primary-color); color: var(--primary-color); font-weight: 500; }
.controls-area { margin-top: 25px; display: flex; justify-content: flex-end; }
.admin-wrapper { display: flex; height: 100vh; width: 100vw; overflow: hidden; background: var(--bg-body); }
.admin-sidebar { 
    width: 260px; background: var(--sidebar-bg); display: flex; flex-direction: column; 
    flex-shrink: 0; transition: left 0.3s ease; z-index: 1050; 
}
.sidebar-header { 
    height: 64px; display: flex; align-items: center; justify-content: space-between; 
    padding: 0 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
}
.btn-close-sidebar { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; display: none; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 15px 0; }
.nav-small-cap { font-size: 0.75rem; font-weight: 600; color: #505b6d; letter-spacing: 1px; padding: 10px 25px; display: block; }
.sidebar-nav { display: flex; flex-direction: column; }
.nav-item { 
    padding: 12px 25px; color: var(--sidebar-text); text-decoration: none; 
    font-size: 0.95rem; font-weight: 400; display: flex; align-items: center; gap: 12px; transition: 0.2s; 
}
.nav-item:hover, .nav-item.active { background: var(--sidebar-hover); color: var(--sidebar-text-active); border-left: 3px solid var(--primary-color); }
.nav-icon { opacity: 0.7; }
.nav-item.active .nav-icon { opacity: 1; color: var(--primary-color); }
.admin-main { flex: 1; display: flex; flex-direction: column; height: 100vh; overflow: hidden; position: relative; max-width: 100vw; }
.hamburger { background: none; border: none; color: var(--text-dark); cursor: pointer; display: none; }
.admin-content { flex: 1; padding: 30px; overflow-y: auto; background: var(--bg-body); box-sizing: border-box; }
.page-breadcrumb { margin-bottom: 25px; }
.page-title { font-size: 1.4rem; font-weight: 600; color: var(--text-dark); margin: 0 0 4px 0; }
.page-subtitle { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 25px; }
.stat-card { background: #ffffff; padding: 22px 25px; border-radius: var(--radius-md); box-shadow: var(--shadow-card); display: flex; align-items: center; gap: 20px; }
.stat-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.bg-success-light { background: #e6fffa; }
.bg-warning-light { background: #fef3c7; }
.stat-card-title { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin: 0 0 4px 0; }
.stat-card-value { font-size: 1.8rem; font-weight: 600; margin: 0; line-height: 1; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.card-freedash { background: #ffffff; border-radius: var(--radius-md); box-shadow: var(--shadow-card); margin-bottom: 30px; box-sizing: border-box; width: 100%; overflow: hidden; }
.card-body { padding: 25px; }
.card-title { font-size: 1.1rem; font-weight: 600; color: var(--text-dark); margin: 0 0 20px 0; }
.table-responsive { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table thead { background: transparent; }
.admin-table th { color: var(--text-muted); font-size: 0.85rem; font-weight: 500; padding: 14px 20px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.admin-table td { padding: 14px 20px; font-size: 0.95rem; color: var(--text-dark); border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table td::before { display: none; }
.user-email-main { font-weight: 600; color: var(--text-dark); word-break: break-all; }
.user-uid-sub { font-size: 0.75rem; color: var(--text-muted); font-family: monospace; margin-top: 2px; }
.candidate-email { font-weight: 500; color: var(--text-dark); word-break: break-all; }
.progress-number { font-weight: 600; color: var(--primary-color); }
.text-muted-fw600 { font-weight: 500; color: var(--text-muted); }
.badge { padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: 500; display: inline-block; }
.badge-success { background: #22ca80; color: #fff; }
.badge-warning { background: #ffc107; color: #212529; }
.badge-danger { background: #ff4f70; color: #fff; }
.badge-info { background: #01caf1; color: #fff; }
.badge-primary { background: var(--primary-color); color: #fff; }
.badge-light { background: #f8f9fa; color: #3e5569; }
.action-buttons-group { display: flex; gap: 6px; }
.btn-icon { background: #f8f9fa; border: 1px solid var(--border-color); color: #3e5569; border-radius: 4px; padding: 6px 12px; cursor: pointer; transition: 0.2s; }
.btn-icon:hover { background: #e2e6ea; }
.btn-icon.danger { color: #ff4f70; background: #fff0f3; border-color: #ffe0e6; }
.btn-icon.danger:hover { background: #ffe0e6; }
.btn-ia-disabled { background: #f8f9fa; color: #a0aec0; border: 1px solid var(--border-color); padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 500; cursor: not-allowed; }
.btn-ia-active { background: var(--primary-color); color: white; border: none; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.2s; }
.btn-ia-active:hover { background: var(--primary-hover); }
.btn-ia-generate { background: #212529; color: white; border: none; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.2s; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 10px; }
#modalUserProfile .modal-content, #modalExpediente .modal-content { background: #fff; width: 100%; max-width: 650px; border-radius: var(--radius-md); box-shadow: 0 10px 30px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; max-height: 90vh; }
.modal-header-profile { display: flex; justify-content: space-between; align-items: center; padding: 18px 25px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.btn-close-profile { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; }
.profile-tabs-container { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 2px solid #f1f5f9; flex-wrap: wrap; }
.profile-tab-btn { background: none; border: none; color: var(--text-muted); padding: 10px 0; font-size: 0.95rem; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.profile-tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.dossier-card { border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 20px; background: #ffffff; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.02); flex-wrap: wrap; gap: 15px; }
#modalAnalisis > div { background: var(--bg-body); border-radius: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.report-controls-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 30px; background: #ffffff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-header); flex-wrap: wrap; gap: 10px; }
.report-controls-title { font-size: 1.1rem; font-weight: 600; margin: 0; }
.report-controls-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-download { background: var(--primary-color); color: #fff; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 500; cursor: pointer; }
.btn-icon-flat.danger { background: #fff0f3; color: #ff4f70; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 500; cursor: pointer; }
.report-scroll-area { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 30px 20px; background: var(--bg-body); width: 100%; box-sizing: border-box; }
.report-paper { background: #ffffff; margin: 0 auto; max-width: 850px; border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 40px; overflow-wrap: break-word; word-wrap: break-word; box-sizing: border-box; width: 100%; }
.report-top-header { display: flex; justify-content: space-between; border-bottom: 2px solid var(--border-color); padding-bottom: 15px; margin-bottom: 25px; flex-wrap: wrap; gap: 10px; }
.report-tag { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--primary-color); background: #e0e7ff; padding: 4px 10px; border-radius: 4px; display: inline-block; margin-bottom: 6px; }
.report-title { font-size: 1.6rem; font-weight: 700; margin: 0 0 6px 0; }
.report-user { font-size: 0.95rem; color: var(--text-muted); margin: 0; word-break: break-all; }
.report-logo { text-align: right; }
.report-date { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.report-grid-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.chart-section { grid-template-columns: 1fr 1.4fr; }
.report-card { border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; background: #ffffff; box-sizing: border-box; width: 100%; }
.box-blue { border-left: 4px solid var(--primary-color); }
.box-purple { border-left: 4px solid #7460ee; }
.box-orange { border-left: 4px solid #ffc107; }
.box-cyan { border-left: 4px solid #01caf1; }
.box-red { border-left: 4px solid #ff4f70; }
.box-dark { border-left: 6px solid #0f172a; background: #f8fafc; }
.box-gray { background: #f8f9fa; border: none; }
.box-title { font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 12px; }
.box-text { font-size: 0.95rem; line-height: 1.6; color: var(--text-dark); word-wrap: break-word; }
.accent-text { color: var(--primary-color); font-weight: 600; }
.box-list { padding-left: 18px; font-size: 0.9rem; color: var(--text-dark); line-height: 1.5; }
.box-li { margin-bottom: 6px; word-wrap: break-word; }
.box-highlight { background: #e6fffa; border: 1px solid #22ca80; }
.title-highlight { color: #065f46; }
.text-highlight { color: #064e3b; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.text-white { color: white; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.fw-medium { font-weight: 500; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.p-4 { padding: 1.5rem; }
.vh-100 { height: 100vh; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.me-2 { margin-right: 0.5rem; }
.fs-5 { font-size: 1.25rem; }

@media (max-width: 900px) {
    .split-layout { flex-direction: column; height: auto; min-height: 100vh; }
    .brand-side { display: none; }
    .logo-mobile-only { display: flex; }
    .interactive-side { padding: 20px 15px; background: #fff; min-height: 100vh; }
    .auth-card { padding: 20px 10px; box-shadow: none; border: none; }
    .app-topbar { padding: 0 15px; }
    .container-dashboard, .container-test { padding: 20px 10px; }
    .dashboard-layout-grid { grid-template-columns: 1fr; gap: 20px; }
    .roadmap-wrapper { flex-wrap: nowrap; overflow-x: auto; padding: 15px; justify-content: flex-start; gap: 15px; -webkit-overflow-scrolling: touch; }
    .step-line { min-width: 25px; }
    .dashboard-welcome { font-size: 1.5rem; }
    .question-card { padding: 20px 15px; }
    #questionText { font-size: 1.15rem; }
    .controls-area { flex-direction: column; gap: 10px; }
    .controls-area button { width: 100%; }
    .admin-sidebar { position: fixed; left: -260px; top: 0; height: 100%; box-shadow: 4px 0 25px rgba(0,0,0,0.3); }
    .admin-sidebar.open { left: 0; }
    .mobile-only { display: block; }
    .hamburger { display: block; }
    .btn-close-sidebar { display: block; }
    .admin-topbar { padding: 0 15px; }
    .admin-email-text { display: none; }
    .admin-content { padding: 15px 10px; }
    .page-title { font-size: 1.2rem; }
    .card-freedash { background: transparent; border: none; box-shadow: none; margin-bottom: 15px; }
    .card-body { padding: 0; }
    .card-title { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table th, .admin-table td { display: block; width: 100%; box-sizing: border-box; }
    .admin-table thead { display: none; }
    .admin-table tr { background: #ffffff; margin-bottom: 15px; border-radius: var(--radius-md); padding: 15px; box-shadow: var(--shadow-card); border: 1px solid var(--border-color); }
    .admin-table td { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; text-align: right; }
    .admin-table td:last-child { border-bottom: none; padding-bottom: 0; }
    .admin-table td::before { display: block; content: attr(data-label); font-weight: 600; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; text-align: left; margin-right: 15px; }
    .admin-table td:first-child { flex-direction: column; align-items: flex-start; border-bottom: 2px solid #f1f5f9; padding-bottom: 12px; margin-bottom: 8px; text-align: left; }
    .admin-table td:first-child::before { display: none; }
    .action-buttons-group { flex-direction: column; width: 100%; gap: 6px; margin-top: 5px; }
    .action-buttons-group button { width: 100%; justify-content: center; padding: 10px; }
    .admin-table td[data-label="Expediente"] button { width: 100%; padding: 12px; margin-top: 10px; }
    .dossier-card { flex-direction: column; align-items: stretch; gap: 15px; text-align: center; }
    .dossier-card button { width: 100%; margin-top: 5px; }
    .report-grid-dual, .chart-section { grid-template-columns: 1fr; gap: 15px; }
    .report-paper { padding: 20px 15px; width: 100%; border-radius: 0; }
    .report-top-header { flex-direction: column; gap: 15px; text-align: center; }
    .report-logo { text-align: center; }
    .report-title { font-size: 1.3rem; }
    .report-controls-header { flex-direction: column; gap: 12px; text-align: center; padding: 15px; }
    .report-controls-buttons { width: 100%; flex-direction: column; }
    .report-controls-buttons button { width: 100%; }
    .flex-md-grow-0 { flex-grow: 1 !important; }
    .w-md-auto { width: 100% !important; }
    .mt-md-0 { margin-top: 0.5rem !important; }
    #modalUserProfile .modal-content, #modalExpediente .modal-content { width: 100%; max-height: 100vh; border-radius: 0; margin: 0; }
    .profile-tabs-container { flex-direction: column; gap: 5px; border-bottom: none; }
    .profile-tab-btn { border-bottom: 1px solid #e2e8f0; text-align: left; padding: 12px 15px; }
    .profile-tab-btn.active { background: #f8fafc; border-left: 3px solid var(--primary-color); border-bottom: 1px solid #e2e8f0; }
}
/* Estilos de la Hoja de Reporte Generada (Markdown a HTML) */
#hoja-reporte {
    background: #ffffff;
    max-width: 850px;
    margin: 0 auto;
    padding: 50px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    line-height: 1.6;
    text-align: left;
    box-sizing: border-box;
}
#hoja-reporte h1 {
    font-size: 22px;
    color: #0f172a;
    border-bottom: 3px solid #0f172a;
    padding-bottom: 10px;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-align: center;
}
#hoja-reporte h2 {
    font-size: 17px;
    color: #0284c7;
    margin-top: 35px;
    margin-bottom: 15px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 5px;
}
#hoja-reporte h3 {
    font-size: 15px;
    color: #334155;
    margin-top: 20px;
    margin-bottom: 10px;
}
#hoja-reporte p {
    font-size: 14px;
    color: #334155;
    margin-bottom: 15px;
    text-align: justify;
}
#hoja-reporte ul {
    margin-left: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #334155;
}
#hoja-reporte li {
    margin-bottom: 8px;
}
#hoja-reporte strong {
    color: #0f172a;
}