/* ===============================================
   TEST VOCACIONAL - INSTITUTIONAL COLOR SCHEME
   Primary: #F0AC2C (Golden)
   Secondary: #6A2718 (Brown)
   Tertiary: #23376D (Navy Blue)
=============================================== */

/* CSS Variables */
:root {
    --primary-color: #F0AC2C;
    --primary-gradient: linear-gradient(135deg, #F0AC2C 0%, #FFB84D 100%);
    --secondary-color: #6A2718;
    --tertiary-color: #23376D;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    /* Gradient background for the entire site */
    background: linear-gradient(135deg, #F0AC2C 0%, #6A2718 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ==========================
   Reglas responsive (móviles/tablets)
   Ajustes para que el layout colapse correctamente
   ========================== */



/* Login/Register Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    border-top: 4px solid var(--secondary-color);
}

/* Auth page layout: center the card in viewport and scale for larger screens */
.auth-page .container {
    max-width: 520px;
    min-height: 100vh;
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-page .login-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-page .login-card {
    width: 100%;
    max-width: 480px;
    padding: 36px 36px;
    border-radius: 10px;
}

/* Improve input sizes and spacing on auth pages */
.auth-page .form-group input,
.auth-page .form-group select {
    padding: 12px 14px;
    font-size: 1rem;
}

/* Responsive tweaks for small screens */
@media (max-width: 520px) {
    .auth-page .container {
        padding: 20px;
        height: auto;
    }

    .auth-page .login-card {
        padding: 20px;
        max-width: 100%;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

/* --- Login animations and logo --- */
.login-logo {
    width: 84px;
    height: 84px;
    margin: 0 auto 12px auto;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(35, 55, 109, 0.18);
    transform: translateY(-8px) scale(0.98);
    opacity: 0;
}

.logo-mark {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.login-logo.show {
    animation: logoDrop 700ms cubic-bezier(.2, .9, .2, 1) forwards;
}

@keyframes logoDrop {
    from {
        opacity: 0;
        transform: translateY(-24px) scale(0.7) rotate(-8deg);
    }

    60% {
        transform: translateY(6px) scale(1.06) rotate(4deg);
        opacity: 1;
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0);
    }
}

.brand-title {
    animation: titlePop 520ms ease both 120ms;
}

@keyframes titlePop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-card.animate {
    animation: slideIn 520ms cubic-bezier(.22, .9, .2, 1) both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Subtle pulsing for primary button on first load */
.btn-primary.pulse {
    animation: buttonPulse 1.6s ease-out 700ms 1;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(240, 172, 44, 0.36);
    }

    60% {
        box-shadow: 0 0 0 18px rgba(240, 172, 44, 0.0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(240, 172, 44, 0);
    }
}

/* A friendly floating hover for the logo */
.login-logo:hover {
    transform: translateY(-4px) scale(1.02);
    transition: transform 220ms ease;
}

.login-form {
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(240, 172, 44, 0.2);
}

/* Layout for fields on the same row */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 520px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.section-header {
    margin: 25px 0 15px 0;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--tertiary-color);
    text-transform: uppercase;
}

/* Username Checker Styles */
.form-help {
    min-height: 20px;
    transition: all 0.3s ease;
}

.suggest-btn {
    display: inline-block;
    margin: 2px 4px;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--primary-color);
    background: #fff;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggest-btn:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(240, 172, 44, 0.3);
}

.status-check {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.status-available {
    color: var(--success-color);
}

.status-taken {
    color: var(--danger-color);
}

.status-loading {
    color: var(--tertiary-color);
}

.suggestions-container {
    margin-top: 8px;
    padding: 10px;
    background: #fdf8ef;
    border-radius: 8px;
    border: 1px solid #faedda;
}

.suggestions-title {
    font-size: 0.8rem;
    color: #966b1c;
    margin-bottom: 6px;
    font-weight: bold;
    text-transform: uppercase;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(240, 172, 44, 0.4);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #4a1a10;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(106, 39, 24, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Navigation */
.navbar {
    background: var(--tertiary-color);
    box-shadow: var(--box-shadow);
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}


.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.nav-menu span {
    color: white;
    font-weight: 500;
    white-space: nowrap;
    padding: 0 10px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Test Form Styles */
.test-header {
    text-align: center;
    margin-bottom: 40px;
}

.test-header h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    background: var(--primary-gradient);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    font-weight: 600;
    color: var(--dark-color);
}

/* Category Tabs Navigation */
.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow-x: auto;
}

.category-tab {
    background: #e9ecef;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.category-tab:hover {
    background: #dfe5eb;
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
}

.tab-title {
    font-weight: 700;
    text-transform: capitalize;
}

.tab-progress {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Category Form Styles */
.category-form {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.category-header h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.category-description {
    color: #666;
    font-size: 1rem;
    text-transform: capitalize;
}

.category-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.category-section h2 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.type-subsection {
    margin-bottom: 30px;
}

.type-subsection h3 {
    color: var(--tertiary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* Category Navigation */
.category-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    gap: 20px;
}

.category-navigation button {
    flex: 1;
    max-width: 200px;
}

.category-navigation .btn-primary,
.category-navigation .btn-success,
.category-navigation .btn-secondary {
    margin: 0;
}

.question-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.likert-scale {
    display: flex;
    justify-content: center;
    gap: 80px;
    /* Increased gap as requested */
    margin-bottom: 10px;
}

.likert-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.likert-option input[type="radio"] {
    margin-bottom: 5px;
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.likert-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.likert-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

/* Results Styles */
.results-header {
    text-align: center;
    margin-bottom: 40px;
}

.results-header h1 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.result-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 5px solid #ddd;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 0;
}

.result-icon {
    font-size: 2rem;
}

.result-score {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

.score-percentage {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.score-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 10px;
}

.result-details {
    text-align: center;
    font-size: 0.95rem;
    color: #666;
}

.result-details p {
    margin: 5px 0;
}

/* Result States */
.result-apto {
    border-left: 5px solid var(--success-color);
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0) 100%);
}

.result-apto .score-label {
    color: var(--success-color);
    font-weight: 700;
}

.result-apto .result-icon {
    font-size: 2rem;
}

.result-potencial {
    border-left: 5px solid var(--warning-color);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05) 0%, rgba(255, 193, 7, 0) 100%);
}

.result-potencial .score-label {
    color: var(--warning-color);
    font-weight: 700;
}

.result-potencial .result-icon {
    font-size: 2rem;
}

.result-por-reforzar {
    border-left: 5px solid var(--danger-color);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0) 100%);
}

.result-por-reforzar .score-label {
    color: var(--danger-color);
    font-weight: 700;
}

.result-por-reforzar .result-icon {
    font-size: 2rem;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-wrapper {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    position: relative;
    width: 100%;
    overflow: hidden;
}

.chart-wrapper h3 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--secondary-color);
}

/* Recommendations */
.recommendations-section {
    background: linear-gradient(135deg, #f5f7ff 0%, #f8f9fa 100%);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
    border-top: 3px solid var(--primary-color);
}

.recommendations-section h2 {
    color: var(--secondary-color);
    margin-bottom: 25px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.recommendation-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.recommendation-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: capitalize;
    font-size: 1.1rem;
}

.recommendation-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

.action-buttons {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    margin: 0;
    flex: 0 1 auto;
}

/* Admin Styles */
.admin-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.admin-sidebar {
    width: 260px;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Softer shadow */
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 90px;
    height: calc(100vh - 110px);
    margin: 10px 0 10px 15px;
    border-radius: 15px;
    /* More rounded as requested */
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s;
    z-index: 100;
}

.admin-sidebar.collapsed {
    width: 70px;
    /* Slimmer when collapsed */
}

/* Estilos para control de sidebar en móvil */
.admin-sidebar.hidden-mobile {
    display: none !important;
}

.sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: #fff;
    color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

@media (min-width: 769px) {
    .sidebar-toggle-btn {
        display: none;
    }
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 15px;
    min-height: 60px;
    border-bottom: 1px solid #f8f9fa;
}

.sidebar-toggle-btn {
    background: #f0f2f5;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--secondary-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: var(--primary-gradient);
    color: white;
}

.sidebar-brand-text {
    margin-left: 12px;
    font-weight: 700;
    color: var(--secondary-color);
    white-space: nowrap;
    transition: opacity 0.2s;
}

/* Hard hide when collapsed */
.admin-sidebar.collapsed .sidebar-brand-text {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 10px;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px;
    color: var(--dark-color);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.menu-icon {
    font-size: 1.4rem;
    min-width: 40px;
    display: flex;
    justify-content: center;
    transition: margin 0.3s;
}

.menu-text {
    font-weight: 500;
    transition: opacity 0.2s;
}

/* Hard hide when collapsed */
.admin-sidebar.collapsed .menu-text {
    display: none;
}

/* Center icons when collapsed */
.admin-sidebar.collapsed .menu-icon {
    margin-right: 0;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(240, 172, 44, 0.2);
}

.sidebar-menu a.active::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 20%;
    height: 60%;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
    display: none;
    /* Hidden because we use cards now */
}


/* Consolidate Filters Section Styles */
.filters-section {
    background: #fff;
    padding: 36px 22px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: visible;
    position: relative;
    z-index: 50;
    min-height: 220px;
}

/* Ensure Choices.js dropdowns appear above other content inside the filters area */
.filters-section .choices {
    position: relative;
}

.filters-section .choices__list--dropdown {
    z-index: 9999 !important;
}

.filters-form {
    display: flex !important;
    flex-flow: row nowrap !important;
    /* Force single line row */
    gap: 20px !important;
    align-items: flex-end !important;
    width: 100%;
    min-width: max-content;
    position: relative;
    z-index: 50;
}

.filter-group {
    flex: 1 1 auto;
    min-width: 150px;
    max-width: 300px;
    margin-bottom: 0 !important;
    display: flex;
    flex-direction: column;
}

.filter-group.actions {
    flex: 0 0 auto;
    min-width: 100px;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 8px;
    white-space: nowrap;
}

.filter-group select,
.filter-group input,
.form-control {
    width: 100%;
    height: 42px;
    padding: 10px 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    background-color: #f8f9fa;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 51;
}

.filter-group select:focus,
.filter-group input:focus,
.form-control:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 172, 44, 0.1);
    position: relative;
    z-index: 52;
}

.filter-group.actions .btn {
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 25px;
    white-space: nowrap;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Choices.js Integration for Filters */
.filters-form .choices {
    margin-bottom: 0;
    min-width: 180px;
    /* Slightly wider for searchable selects */
    flex: 1;
}

.filters-form .choices__inner {
    border-radius: 10px;
    background-color: #f8f9fa;
    border: 1px solid #eee;
    padding: 2px 10px;
    min-height: 42px;
    display: flex;
    align-items: center;
}

.filters-form .choices__list--single {
    padding: 0;
}

.filters-form .choices__item--selectable {
    font-size: 0.95rem;
}

.filters-form .choices[data-type*="select-one"]::after {
    right: 15px;
}

.admin-main {
    flex: 1;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    margin: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-width: 0;
    /* Prevents flex items from overflowing */
}

/* End Consolidate Filters Section Styles */




.admin-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.admin-header h1 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

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

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.chart-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.institution-header,
.zona-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.institution-header h2,
.zona-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: white;
}

.institution-header p,
.zona-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
}



.admin-table tr:hover {
    background-color: #f8f9fa;
}

.admin-table td {
    color: var(--dark-color);
}

/* Forms */
.form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: calc(100% - 20px);
        margin: 10px;
        position: relative;
        top: 0;
        height: auto;
        min-height: auto;
        border-radius: 12px;
    }

    .admin-sidebar.collapsed {
        width: calc(100% - 20px);
        /* Don't shrink width on mobile, maybe just hide menu */
    }

    .admin-sidebar.collapsed .sidebar-menu {
        display: none;
    }

    .admin-main {
        margin: 10px;
        padding: 15px;
    }

    .charts-container {
        grid-template-columns: 1fr;
    }

    .likert-scale {
        flex-direction: row;
        gap: 30px;
        justify-content: center;
    }

    .likert-labels {
        flex-direction: column;
        gap: 5px;
    }

    .category-tabs {
        gap: 8px;
    }

    .recommendation-card {
        min-width: 100%;
    }

    .chart-wrapper {
        padding: 10px;
        margin-bottom: 20px;
    }

    .chart-wrapper canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .public-career-card {
        padding: 15px;
    }

    .public-careers-grid {
        grid-template-columns: 1fr;
    }

    .nav-brand {
        font-size: 1.2rem;
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-menu span {
        display: none;
        /* Hide welcome message on very small screens */
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .test-header h1 {
        font-size: 2rem;
    }

    .category-header h2 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .public-careers-section {
        padding: 15px;
    }

    .public-careers-section h2 {
        font-size: 1.4rem;
    }
}

/* Public Careers Section */
.public-careers-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--box-shadow);
    border-top: 5px solid var(--tertiary-color);
}

.public-careers-section h2 {
    color: var(--tertiary-color);
    margin-bottom: 10px;
}

.public-careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.public-career-card {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 20px;
    border-left: 4px solid var(--tertiary-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.public-career-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: white;
}

.public-career-card h4 {
    color: var(--tertiary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.public-career-card .university {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.public-career-card .area-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    align-self: flex-start;
}