/* assets/css/style.css */

:root {
    /* Colors */
    --primary: #1a365d;
    --primary-hover: #2d4a7c;
    --accent: #4299e1;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --gray-50: #f9fafb;
    --gray-100: #f7fafc;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --gray-900: #171923;

    /* Spacing */
    --space-xs: 0.25rem;
    /* 4px */
    --space-sm: 0.5rem;
    /* 8px */
    --space-md: 1rem;
    /* 16px */
    --space-lg: 1.5rem;
    /* 24px */
    --space-xl: 2rem;
    /* 32px */
    --space-2xl: 3rem;
    /* 48px */

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Skeleton Screens */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5rem;
    width: 100%;
}

.skeleton-text-short {
    width: 60%;
}

.skeleton-circle {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.skeleton-card {
    height: 150px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    min-height: 100vh;
    color: var(--gray-800);
}

.global-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: 9999;
    width: 100%;
    transform-origin: left;
    animation: loading-bar 2s infinite linear;
}

@keyframes loading-bar {
    0% {
        transform: scaleX(0);
    }

    50% {
        transform: scaleX(0.5);
    }

    100% {
        transform: scaleX(1);
        opacity: 0;
    }
}

/* Navbar */
.navbar {
    background: var(--primary);
    color: white;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    z-index: 100;
}

.navbar.test-env {
    background: #7b1b1b;
}

.navbar.test-env .nav-links>a.active::after {
    background: rgba(255, 255, 255, 0.7);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-brand h1 {
    font-size: 1.1rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 100%;
}

.nav-links>a,
.nav-links>.nav-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-links>a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 450;
    padding: 0 12px;
    transition: color 0.15s, background 0.15s;
    border-radius: 6px;
}

.nav-links>a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links>a.active {
    color: white;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.15);
}

.nav-links>a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px 2px 0 0;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
}

.nav-dropdown-toggle {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    border: none;
    height: 100%;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 450;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.nav-dropdown-toggle::after {
    content: '';
    border: 4px solid transparent;
    border-top-color: currentColor;
    margin-top: 2px;
    opacity: 0.6;
}

.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 6px;
    display: none;
    z-index: 200;
}

/* Alineación derecha para el menú de perfil */
.nav-dropdown-menu.align-right {
    left: auto;
    right: 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a,
.nav-dropdown-menu button {
    color: var(--gray-700);
    display: block;
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    border: none;
    background: none;
    font-size: 0.875rem;
    font-family: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.1s;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu button:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-dropdown-menu a.active {
    background: var(--accent);
    color: white;
    font-weight: 500;
}

.nav-dropdown-menu .menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 6px 0;
}

.nav-dropdown-menu .menu-header {
    padding: 8px 12px 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-dropdown-menu .menu-user-info {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 6px;
}

.nav-dropdown-menu .menu-user-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.875rem;
}

.nav-dropdown-menu .menu-user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: capitalize;
}

.mobile-group-label {
    margin: 12px 0 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400);
    font-weight: 600;
}

/* Logo en navbar */
.navbar-logo {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    transition: opacity 0.2s, background 0.2s;
}

.navbar-logo:hover {
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-logo img {
    height: 28px;
    width: auto;
}

/* Ocultar flecha en dropdown de usuario */
.navbar-user .nav-dropdown-toggle::after {
    display: none;
}

.navbar-user {
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar-user .nav-dropdown {
    height: 100%;
}

.navbar-user .nav-dropdown-toggle {
    gap: 8px;
}

.navbar-user .user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.role-badge {
    background: rgba(255, 255, 255, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.8);
}

.logout-btn {
    color: var(--danger);
}

.logout-btn:hover {
    background: #fef2f2;
    color: var(--danger);
}

/* Burger Menu */
.burger {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .navbar-user {
        display: none;
    }

    .burger {
        display: block;
    }

    .mobile-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-menu a {
        color: white;
        text-decoration: none;
        font-size: 1.1rem;
        padding: 10px 0;
    }

    .mobile-menu a.active {
        color: white;
        font-weight: 600;
        opacity: 1;
    }

    .mobile-menu a:not(.active) {
        opacity: 0.8;
    }

    .mobile-menu-section {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.5);
        padding-top: 10px;
        padding-bottom: 2px;
    }

    .mobile-menu-indent {
        padding-left: 14px !important;
        font-size: 1rem !important;
    }

    .mobile-menu-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.15);
        margin: 5px 0;
    }

    .mobile-logout {
        color: rgba(255, 100, 100, 0.9) !important;
    }

    .mobile-user-info {
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.8);
        font-size: 0.9rem;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

/* Global Utility Classes */
.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}

.mb-50 {
    margin-bottom: 50px;
}

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

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

@media (min-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 20px 15px;
    }
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    border: none;
    font-weight: 600;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

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

.btn-danger:hover {
    filter: brightness(0.95);
}

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

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

.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
}

.alert-success {
    background: #c6f6d5;
    color: #276749;
}

.plan-card {
    padding: 22px;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.plan-meta {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.plan-form {
    display: grid;
    gap: 16px;
}

.plan-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.plan-actions form {
    margin: 0;
}

/* Toasts */
.toast-container {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 2000;
}

.toast {
    min-width: 300px;
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-xl);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border-left: 4px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: auto;
    transition: transform 0.25s ease, opacity 0.25s ease;
    will-change: transform, opacity;
}

.toast-success {
    border-left-color: var(--success);
    background: #f0fff4;
    color: #22543d;
}

.toast-error {
    border-left-color: var(--danger);
    background: #fff5f5;
    color: #742a2a;
}

.toast-warning {
    border-left-color: var(--warning);
    background: #fffff0;
    color: #744210;
}

/* Toast animations */
@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes toast-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.toast-entering {
    animation: toast-slide-in 0.3s ease-out forwards;
}

.toast-leaving {
    animation: toast-fade-out 0.3s ease-out forwards;
}


/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--gray-800);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

/* Dashboard */
.welcome-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.welcome-card h2 {
    color: var(--primary);
    margin-bottom: 8px;
}

.welcome-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.period-inline {
    color: var(--gray-500);
    font-weight: 400;
}

/* Tarjeta compacta de nivel */
.tool-card-compact {
    min-height: auto;
    padding: 16px 20px;
}

.tool-card-static {
    cursor: default;
}

.tool-card-compact .tool-info h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.tool-card-compact .tool-info p {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.tool-card.level-card-1 {
    border: none;
    border-left: 4px solid #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, white 100%);
}

.tool-card.level-card-2 {
    border: none;
    border-left: 4px solid #ecc94b;
    background: linear-gradient(135deg, #fffff0 0%, white 100%);
}

.tool-card.level-card-3 {
    border: none;
    border-left: 4px solid #f56565;
    background: linear-gradient(135deg, #fff5f5 0%, white 100%);
}

.tool-card.tool-card-static.level-card-1:hover,
.tool-card.tool-card-static.level-card-2:hover,
.tool-card.tool-card-static.level-card-3:hover {
    transform: none;
    border: none;
    border-left: 4px solid;
}

.tool-card.level-card-1:hover {
    border-left: 4px solid #48bb78;
}

.tool-card.level-card-2:hover {
    border-left: 4px solid #ecc94b;
}

.tool-card.level-card-3:hover {
    border-left: 4px solid #f56565;
}

.level-name-1 {
    color: #276749;
}

.level-name-2 {
    color: #975a16;
}

.level-name-3 {
    color: #c53030;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-bottom: 4px solid var(--gray-300);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card.green {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border-left: 5px solid #48bb78;
    color: #22543d;
}

.stat-card.yellow {
    background: linear-gradient(135deg, #fffff0 0%, #fefcbf 100%);
    border-left: 5px solid #ecc94b;
    color: #744210;
}

.stat-card.red {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left: 5px solid #f56565;
    color: #742a2a;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray-600);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.stat-card-header h3 {
    margin: 0;
}

.stat-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.stat-info-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.stat-card.green .stat-info-btn {
    background: var(--success);
}

.stat-card.yellow .stat-info-btn {
    background: var(--warning);
}

.stat-card.red .stat-info-btn {
    background: var(--danger);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* Standalone form control (para uso fuera de .form-group) */
.form-control {
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Tables */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.card-header {
    padding: 15px 20px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-700);
}

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

th {
    text-align: left;
    padding: 12px 20px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

tr:hover {
    background: var(--gray-100);
}

/* Buttons and Badges */
.btn-small {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-small:hover {
    opacity: 0.8;
}

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

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

.btn-eval {
    background: var(--success);
    color: white;
    padding: 8px 12px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Badges */
.level-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.level-1 {
    background: #c6f6d5;
    color: #276749;
}

.level-2 {
    background: #fefcbf;
    color: #975a16;
}

.level-3 {
    background: #fed7d7;
    color: #c53030;
}

/* Chevron expandir KPIs (docentes sin rojo) */
.expand-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #cbd5e0;
    background: transparent;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, transform 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.expand-chevron:hover {
    color: #4a5568;
    border-color: #4a5568;
}

.expand-chevron svg {
    transition: transform 0.2s;
}

.expand-chevron.expanded svg {
    transform: rotate(180deg);
}

/* Toggle Guía Operativa */
.guia-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
}

.guia-toggle--si {
    background: #c6f6d5;
    color: #276749;
}

.guia-toggle--no {
    background: #e2e8f0;
    color: #718096;
}

.guia-toggle:hover {
    opacity: 0.8;
}

/* KPI Indicators */
.kpi-indicators {
    display: flex;
    gap: 15px;
}

.kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.kpi-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.kpi-color-3 {
    background-color: var(--success);
}

.kpi-color-2 {
    background-color: var(--warning);
}

.kpi-color-1 {
    background-color: var(--danger);
}

.kpi-color-none {
    background-color: var(--gray-300);
}

.kpi-num {
    font-size: 0.7rem;
    color: var(--gray-600);
    font-weight: 600;
}

.kpi-label {
    font-size: 0.7rem;
    color: var(--gray-700);
    font-weight: 600;
}


/* Evaluation Page Specifics */
.docente-header {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 640px) {
    .docente-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

.docente-info h2 {
    color: var(--primary);
    margin-bottom: 5px;
}

.docente-info p {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.period-badge {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: inline-block;
}

.kpi-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.kpi-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.kpi-header span {
    opacity: 0.7;
    font-weight: normal;
    font-size: 0.9rem;
}

.sub-element {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.sub-element:last-child {
    border-bottom: none;
}

.sub-element-title {
    font-weight: 600;
    color: var(--gray-800);
}

/* Comparación de evaluaciones (coordinador vs docente) */
.eval-comparison {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.eval-comparison-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.eval-comparison-separator {
    color: var(--gray-300);
}

.eval-comparison-label {
    font-weight: 500;
}

.eval-comparison-label.text-muted {
    color: var(--gray-400);
    font-style: italic;
}

.eval-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.eval-dot-1 {
    background: #f56565;
}

.eval-dot-2 {
    background: #ecc94b;
}

.eval-dot-3 {
    background: #48bb78;
}

/* Toggle de evidencia colapsable */
.evidence-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.15s;
}

.evidence-toggle:hover {
    color: var(--primary);
}

.evidence-toggle svg {
    transition: transform 0.2s;
}

.evidence-toggle svg.rotate-90 {
    transform: rotate(90deg);
}

.evidence-content {
    background: #f0f9ff;
    border-left: 3px solid var(--accent);
    padding: 10px 12px;
    margin: 6px 0 12px;
    border-radius: 0 6px 6px 0;
}

.evidence-content .self-comment-text {
    font-size: 0.85rem;
    color: var(--gray-700);
    font-style: italic;
}

/* Tooltips que solo aparecen al hover */
.tooltip-hover {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
    line-height: 1.3;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s, visibility 0.15s;
}

.radio-option:hover .tooltip-hover {
    visibility: visible;
    opacity: 1;
}

.sub-element-number {
    color: var(--gray-600);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.evaluated-badge {
    background: #c6f6d5;
    color: #276749;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.radio-option {
    position: relative;
    flex: 1;
    min-width: 120px;
}

.radio-option input {
    position: absolute;
    opacity: 0;
}

.radio-option label {
    display: block;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    border: 2px solid var(--gray-200);
    transition: all 0.2s;
    text-align: center;
}

.radio-option.green label {
    border-color: #c6f6d5;
    color: #276749;
}

.radio-option.green input:checked+label {
    background: #c6f6d5;
    border-color: var(--success);
}

.radio-option.yellow label {
    border-color: #faf20b;
    color: #975a16;
}

.radio-option.yellow input:checked+label {
    background: #fefcbf;
    border-color: var(--warning);
}

.radio-option.red label {
    border-color: #fed7d7;
    color: #c53030;
}

.radio-option.red input:checked+label {
    background: #fed7d7;
    border-color: var(--danger);
}

.tooltip {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 4px;
}

.comment-section {
    margin-top: 12px;
}

.comment-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 0;
    transition: color 0.15s;
}

.comment-toggle:hover {
    color: var(--accent);
}

.comment-history {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--gray-50);
    border-left: 3px solid var(--gray-300);
    border-radius: 0 6px 6px 0;
    padding: 8px 12px;
    margin-top: 10px;
}

.comment-history-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.comment-history-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.comment-history-index {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.comment-history-text {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-style: italic;
    line-height: 1.4;
    flex: 1;
}

.comment-history-date {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 3px;
    white-space: nowrap;
}

.comment-delete-controls {
    margin-top: 8px;
}

.comment-clear-btn {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.comment-clear-btn:hover {
    color: var(--danger, #ef4444);
}

.comment-clear-notice {
    font-size: 0.78rem;
    color: var(--danger, #ef4444);
}

.comment-undo-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.comment-field {
    margin-top: 8px;
}

.comment-field textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
}

.comment-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.chevron {
    transition: transform 0.3s ease;
}

.chevron.rotate {
    transform: rotate(180deg);
}

.kpi-avg {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.kpi-avg-3 {
    background-color: var(--success);
}

.kpi-avg-2 {
    background-color: var(--warning);
}

.kpi-avg-1 {
    background-color: var(--danger);
}

.form-footer {
    margin-top: 30px;
    text-align: center;
}

/* Page specific helpers */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.badge-success {
    background: #c6f6d5;
    color: #276749;
}

.badge-warning {
    background: #fefcbf;
    color: #975a16;
}

.kpi-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-element-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.card h3 {
    color: var(--gray-700);
    margin-bottom: 15px;
    font-size: 1rem;
}

.period-value {
    font-size: 1.2rem !important;
}

.level-value {
    font-size: 1.5rem !important;
}

/* Search and Tabs */
.search-container {
    margin-bottom: 25px;
    position: relative;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 40px !important;
    border-radius: 25px !important;
    border: 1px solid var(--gray-300) !important;
    font-size: 0.95rem;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-600);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 5px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-600);
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
}

/* User Card effect in tables */
.card-table-row {
    transition: all 0.2s;
}

.card-table-row:hover {
    background: var(--gray-100);
    transform: scale(1.002);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.badge-tab-count {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.tab-btn.active .badge-tab-count {
    background: var(--accent);
    color: white;
}

/* Profile Specific */
.profile-grid {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 30px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.profile-details p {
    margin-bottom: 12px;
    font-size: 1.05rem;
    display: flex;
    flex-direction: column;
}

.profile-details p strong {
    font-size: 0.85rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.profile-details p span {
    color: var(--gray-900);
    font-weight: 600;
}

.password-section {
    max-width: 500px;
}

.password-section h3 {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.25rem;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background: var(--gray-100);
    border-radius: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Utility visibility */
/* Periodos Management Styles */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-gray {
    background: #e2e8f0;
    color: #4a5568;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.table th {
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-backdrop-blur {
    backdrop-filter: blur(5px);
}

/* Login Page Wrapper */
.body-login {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

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

.logo h1 {
    color: #1a365d;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.logo p {
    color: #718096;
    font-size: 0.9rem;
}

/* Password Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--gray-600);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}

.password-toggle:hover {
    color: var(--gray-800);
    background: var(--gray-100);
}

.password-toggle:focus {
    outline: none;
    color: var(--accent);
}

.password-toggle .eye-icon {
    display: block;
}

.password-toggle .eye-open {
    display: block;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.showing .eye-open {
    display: none;
}

.password-toggle.showing .eye-closed {
    display: block;
}

.btn-premium {
    padding: 12px 25px;
    background: linear-gradient(135deg, #1a365d, #2a4365);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.btn-block {
    width: 100%;
}

.btn-login:hover {
    background: linear-gradient(to right, #2a4365, #1a365d);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-login:active {
    transform: translateY(0);
}

/* ================================================
   DOCENTE TOOLS (Dashboard)
   ================================================ */
.docente-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.tool-card.tool-locked {
    opacity: 0.7;
}

.tool-card.tool-locked:hover {
    border-color: var(--gray-300);
}

.tool-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 12px;
}

.tool-info {
    flex: 1;
}

.tool-info h4 {
    color: var(--gray-800);
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.tool-info p {
    color: var(--gray-600);
    margin: 0 0 8px 0;
    font-size: 0.85rem;
}

.tool-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-200);
    color: var(--gray-700);
}

.tool-badge.badge-success {
    background: #c6f6d5;
    color: #276749;
}

.tool-badge.badge-warning {
    background: #fefcbf;
    color: #975a16;
}

.tool-badge.badge-info {
    background: #bee3f8;
    color: #2b6cb0;
}

.level-plan-link {
    margin-top: 10px;
    text-decoration: none;
}

.level-plan-link:hover {
    text-decoration: none;
}

.tool-arrow {
    color: var(--gray-400);
    transition: transform 0.2s;
}

.tool-card:hover .tool-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* ================================================
   BITACORA (Mi Bitácora)
   ================================================ */
.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--gray-100);
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-chip:hover {
    background: var(--gray-200);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.note-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--gray-300);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.note-card.kpi-1 {
    border-left-color: var(--accent);
}

.note-card.kpi-2 {
    border-left-color: var(--warning);
}

.note-card.kpi-3 {
    border-left-color: var(--success);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.note-kpi-badge {
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.note-card.kpi-1 .note-kpi-badge {
    background: var(--accent);
}

.note-card.kpi-2 .note-kpi-badge {
    background: var(--warning);
    color: #744210;
}

.note-card.kpi-3 .note-kpi-badge {
    background: var(--success);
}

.note-sub-badge {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.note-date {
    margin-left: auto;
    color: var(--gray-500);
    font-size: 0.8rem;
}

.note-content {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 12px;
}

.note-url {
    margin-bottom: 12px;
}

.note-url a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
}

.note-url a:hover {
    text-decoration: underline;
}

.note-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

/* ================================================
   INFO BOX (Shared component)
   ================================================ */
.info-box {
    background: #ebf8ff;
    border-left: 4px solid var(--accent);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

/* ================================================
   AUTOEVALUACION (Mi Autoevaluación)
   ================================================ */
.timing-badge {
    background: #fefcbf;
    color: #975a16;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.timing-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    margin-left: 6px;
    cursor: help;
}

.timing-icon:hover {
    color: #b45309;
}

.eval-content-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 0;
}

@media (max-width: 900px) {
    .eval-content-grid {
        grid-template-columns: 1fr;
    }

    .notes-sidebar {
        display: none;
    }
}

.eval-column {
    border-right: 1px solid var(--gray-200);
}

.notes-sidebar {
    padding: 20px;
    background: var(--gray-100);
}

.notes-sidebar h4 {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-sidebar .no-notes {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.sidebar-notes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-note {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.sidebar-note .note-sub {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: inline-block;
    margin-bottom: 6px;
}

.sidebar-note p {
    color: var(--gray-700);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.sidebar-note .note-date {
    color: var(--gray-500);
    font-size: 0.75rem;
    display: block;
    margin-top: 6px;
}

.see-more {
    color: var(--accent);
    font-size: 0.85rem;
    text-decoration: none;
    display: block;
    text-align: center;
    padding: 8px;
}

.see-more:hover {
    text-decoration: underline;
}

/* ================================================
   MI EVALUACION (Ver evaluación compartida)
   ================================================ */
.eval-result-item {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.eval-result-item:last-child {
    border-bottom: none;
}

.eval-result-item.has-discrepancy {
    background: #fffbeb;
}

.sub-element.has-discrepancy-border {
    border: 2px solid #feb2b2 !important;
    background: #fff5f5 !important;
}

.eval-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.sub-number {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 10px;
}

.sub-name {
    color: var(--gray-800);
    font-weight: 500;
}

/* Status Page (index.php) */
.status-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
}

.status-page .status-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 500px;
    width: 100%;
}

.status-page h1 {
    color: #1a365d;
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.status-page .subtitle {
    color: #718096;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.status-page .status-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-page .status-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.status-page .status-item:last-child {
    border-bottom: none;
}

.status-page .status-label {
    color: #4a5568;
    font-weight: 500;
}

.status-page .status-value {
    color: #2d3748;
}

.status-page .status-value.success {
    color: #38a169;
}

.status-page .status-value.error {
    color: #e53e3e;
}

.status-page .status-value.warning {
    color: #d69e2e;
}

.status-page .footer-text {
    text-align: center;
    color: #a0aec0;
    font-size: 0.85rem;
    margin-top: 20px;
}



.value-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.value-badge.value-3 {
    background: #c6f6d5;
    color: #276749;
}

.value-badge.value-2 {
    background: #fefcbf;
    color: #975a16;
}

.value-badge.value-1 {
    background: #fed7d7;
    color: #c53030;
}

.not-evaluated {
    color: var(--gray-500);
    font-style: italic;
    font-size: 0.85rem;
}

.eval-comment {
    margin-top: 12px;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.eval-comment strong {
    display: block;
    color: var(--gray-600);
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.discrepancy-note {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================
   EVALUAR (Compartir evaluación)
   ================================================ */
.share-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.share-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--success);
}

.share-checkbox .checkmark {
    /* Placeholder - native checkbox styling is used via accent-color */
    display: none;
}

.share-label {
    font-weight: 600;
    color: var(--gray-700);
}

.shared-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #c6f6d5;
    color: #276749;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Evaluation Badges */
.badge-eval {
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
    border: 1px solid transparent;
    display: inline-block;
    margin-left: 5px;
}

.badge-eval-3 {
    background: #c6f6d5;
    color: #276749;
    border-color: #9ae6b4;
}

.badge-eval-2 {
    background: #fff9c4;
    color: #856404;
    border-color: #ffeeba;
}

.badge-eval-1 {
    background: #fed7d7;
    color: #c53030;
    border-color: #feb2b2;
}

/* Dashboard Styles */
.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.period-selector-container {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.period-selector-label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 5px;
    font-weight: 600;
    padding-left: 16px;
}

.period-selector-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: white;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    min-width: 180px;
}

.chart-card {
    padding: 20px;
}

.chart-title {
    margin-bottom: 15px;
}

.chart-canvas {
    max-height: 250px;
}

.tools-title {
    margin: 30px 0 20px;
    color: var(--gray-700);
}

/* Evaluar Styles */
.eval-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.self-evaluation-comment {
    margin-top: 10px;
    padding: 12px;
    background: #f7fafc;
    border-left: 3px solid #4299e1;
    border-radius: 4px;
    font-size: 0.85rem;
}

.self-comment-header {
    font-weight: 700;
    color: #2b6cb0;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.self-comment-text {
    color: #4a5568;
    font-style: italic;
}

.discrepancy-banner {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 6px;
    color: #c53030;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.accompaniment-adjustment-card {
    margin-top: 30px;
    padding: 25px;
    border-left: 5px solid var(--accent);
}

.accompaniment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.accompaniment-suggested-text {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.accompaniment-footer-note {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 10px;
}

.accompaniment-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.accompaniment-select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
}

.share-card {
    margin-top: 20px;
    padding: 25px;
    border-left: 5px solid var(--gray-300);
}

.share-card.is-shared {
    border-left-color: var(--success);
}

.share-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-card-note {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 12px;
}

/* Common Styles */
.page-subtitle {
    color: var(--gray-600);
    margin-top: 5px;
}

.flex-1 {
    flex: 1;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-15 {
    margin-bottom: 15px;
}

.mb-25 {
    margin-bottom: 25px;
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 600;
}

/* Bitacora Styles */
.filter-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: var(--gray-700);
}

.empty-state {
    padding: 60px;
    text-align: center;
}

.empty-state.plan-empty {
    padding: 8px 12px;
    text-align: left;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.modal-max-600 {
    max-width: 600px;
}

/* Autoevaluacion Styles */
.note-count-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Utilities */
.stats-grid-adaptive {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-gray-700 {
    color: var(--gray-700) !important;
}

.text-gray-600 {
    color: var(--gray-600) !important;
}

.text-success-dark {
    color: #276749 !important;
}

.text-sm {
    font-size: 0.8rem !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

.text-base {
    font-size: 0.9rem !important;
}

.lh-relaxed {
    line-height: 1.6 !important;
}

.d-inline {
    display: inline-block !important;
}

.d-flex {
    display: flex !important;
}

.d-block {
    display: block !important;
}

.justify-center {
    justify-content: center !important;
}

.align-center {
    align-items: center !important;
}

.gap-10 {
    gap: 10px !important;
}

.m-0 {
    margin: 0 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-5 {
    margin-top: 5px !important;
}

.mt-30 {
    margin-top: 30px !important;
}

.mb-8 {
    margin-bottom: 8px !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mb-5 {
    margin-bottom: 5px !important;
}

.ml-5 {
    margin-left: 5px !important;
}

.ml-10 {
    margin-left: 10px !important;
}

.mr-10 {
    margin-right: 10px !important;
}

.p-0 {
    padding: 0 !important;
}

.p-20 {
    padding: 20px !important;
}

.p-40 {
    padding: 40px !important;
}

.border-success-left {
    border-left-color: var(--success) !important;
}

.shared-info {
    background: #c6f6d5 !important;
    border-left: 5px solid var(--success) !important;
}

.max-w-500 {
    max-width: 500px !important;
}

.self-start {
    align-self: flex-start !important;
}

.site-footer {
    margin-top: 50px !important;
    padding: 30px !important;
    border-top: 1px solid var(--gray-200) !important;
    font-size: 0.85rem !important;
    color: var(--gray-600) !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-500);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary);
}

/* Expanded Utilities */
.p-25 {
    padding: 25px !important;
}

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

.text-gray-500 {
    color: var(--gray-500) !important;
}

.font-medium {
    font-weight: 500 !important;
}

.modal-close-btn {
    border: none !important;
    background: none !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
}

.profile-header-title {
    margin-bottom: 30px !important;
    border-bottom: 2px solid var(--accent) !important;
    display: inline-block !important;
    padding-bottom: 5px !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

/* Responsive Visibility Utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* X-Cloak for AlpineJS */
[x-cloak] {
    display: none !important;
}

/* ============================================================================
   Filtros y Alertas de Elementos en Rojo
   ============================================================================ */

.search-filter-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-filter-row .search-container {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-checkbox:hover {
    border-color: var(--warning);
    background: #fffbeb;
}

.filter-checkbox.active {
    border-color: var(--warning);
    background: #fef3c7;
    font-weight: 500;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.filter-checkbox .filter-icon {
    font-size: 1rem;
}

.filter-checkbox .filter-count {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Badge de alerta junto al nombre */
.name-with-alert {
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    cursor: pointer;
    transition: all 0.2s;
}

.alert-badge:hover {
    background: #fee2e2;
    border-color: #f87171;
    transform: scale(1.05);
}

/* Fila con elementos en rojo */
tr.has-red-elements {
    background: #fffbeb;
}

tr.has-red-elements:hover {
    background: #fef3c7;
}

/* Fila expandida con detalle de elementos */
tr.expanded-row {
    background: #fefce8;
}

tr.expanded-row td {
    padding: 0;
}

.expanded-content {
    padding: 15px 20px;
    border-top: 1px dashed var(--gray-300);
}

.expanded-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-200);
}

.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.element-group {
    background: white;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid var(--gray-200);
}

.element-group-header {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.element-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.element-item.value-1 {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.element-item.value-2 {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.element-item.value-3 {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.element-number {
    font-weight: 600;
    color: var(--gray-600);
    min-width: 30px;
}

.element-name {
    flex: 1;
    color: var(--gray-700);
}

.element-value {
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.element-item.value-1 .element-value {
    color: #dc2626;
}

.element-item.value-2 .element-value {
    color: #d97706;
}

.element-item.value-3 .element-value {
    color: #16a34a;
}

@media (max-width: 768px) {
    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter-row .search-container {
        width: 100%;
    }

    .filter-checkbox {
        justify-content: center;
    }

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

/* ========================================
   TABS EVALUACIÓN
   ======================================== */
.eval-tabs {
    margin-top: 20px;
}

.eval-tabs-header {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.eval-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--gray-600);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.eval-tab-btn:hover {
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.5);
}

.eval-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.eval-tab-btn svg {
    flex-shrink: 0;
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
}

.eval-tab-content {
    animation: fadeIn 0.2s ease;
}

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

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

[x-cloak] {
    display: none !important;
}

/* Sección Seguimiento */
.seguimiento-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.seguimiento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.seguimiento-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.1rem;
    color: var(--gray-800);
}

.seguimiento-header h3 svg {
    color: var(--gray-500);
}

/* Plan de mejora - documento actual */
.plan-current-doc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 10px;
    margin-bottom: 16px;
}

.plan-doc-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.plan-doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 10px;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.plan-doc-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plan-doc-title {
    font-weight: 600;
    color: var(--gray-800);
}

.plan-doc-meta {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.plan-notes-display {
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 16px;
}

/* Empty state mejorado */
.empty-state-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--gray-50);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
}

.empty-state-box svg {
    color: var(--gray-400);
    margin-bottom: 12px;
}

.empty-state-box p {
    margin: 0 0 4px 0;
    font-weight: 500;
    color: var(--gray-700);
}

.empty-state-box span {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.plan-form-section {
    margin-top: 16px;
}

.plan-form-section>.btn {
    margin-bottom: 16px;
}

/* Responsive tabs */
@media (max-width: 640px) {
    .eval-tab-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .eval-tab-btn span:not(.tab-badge) {
        display: none;
    }

    .plan-current-doc {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .plan-doc-info {
        flex-direction: column;
    }
}

/* ========================================
   ACORDEONES EVALUACIÓN
   ======================================== */
.accordion-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 16px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    user-select: none;
}

.accordion-header:hover {
    background-color: var(--gray-50);
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--gray-800);
}

.accordion-chevron {
    color: var(--gray-500);
    transition: transform 0.2s ease;
}

.accordion-chevron.rotate {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 20px 20px 20px;
    border-top: 1px solid var(--gray-200);
}

/* Plan de mejora badges */
.plan-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.plan-status-badge.has-plan {
    background-color: #d1fae5;
    color: #065f46;
}

.plan-status-badge.no-plan {
    background-color: var(--gray-100);
    color: var(--gray-600);
}

/* Plan meta info */
.plan-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.plan-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.plan-meta-item svg {
    color: var(--gray-400);
}

/* Empty state inline */
.empty-state-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.empty-state-inline svg {
    color: var(--gray-400);
}

/* Plan form */
.plan-form {
    margin-top: 16px;
}

.plan-form .form-group {
    margin-bottom: 12px;
}

.plan-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
}

.plan-form input[type="url"],
.plan-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.plan-form input[type="url"]:focus,
.plan-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.plan-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.mt-20 {
    margin-top: 20px;
}

/* ========================================
   AYUDA CONTEXTUAL KPIs
   ======================================== */

/* Contador de evaluación en KPI */
.kpi-eval-count {
    color: var(--gray-500);
    font-weight: 400;
    font-size: 0.85em;
    margin-left: 4px;
}

/* Acciones del header del KPI */
.kpi-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Botón de info en el header del KPI */
.kpi-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.kpi-info-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Modal de información del KPI */
.kpi-info-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.kpi-info-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.kpi-info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
}

.kpi-info-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: white;
}

.kpi-info-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.kpi-info-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.kpi-info-modal-body {
    padding: 24px;
}

.kpi-info-modal-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Botón de ayuda en sub-elemento */
.sub-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    padding: 0;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    vertical-align: middle;
}

.sub-help-btn:hover,
.sub-help-btn.active {
    background: var(--primary-hover);
    transform: scale(1.1);
}

/* Popover de ayuda del sub-elemento */
.sub-help-popover {
    margin-top: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 8px;
    border-left: 3px solid #eab308;
}

.sub-help-popover p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-700);
}

/* Descripción del sub-elemento (evaluar.php) */
.sub-element-desc {
    margin-top: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 8px;
    border-left: 3px solid #eab308;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--gray-700);
}

/* Responsive */
@media (max-width: 640px) {
    .kpi-info-modal-content {
        max-width: 100%;
        margin: 0 10px;
    }

    .kpi-info-modal-header {
        padding: 16px 20px;
    }

    .kpi-info-modal-body {
        padding: 20px;
    }
}

/* ========================================
   BOTÓN FLOTANTE - INFOGRAFÍA
   ======================================== */
.infografia-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(26, 54, 93, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.infografia-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 54, 93, 0.5);
}

.infografia-fab:active {
    transform: scale(0.95);
}

.infografia-fab svg {
    width: 24px;
    height: 24px;
}

.infografia-fab-tooltip {
    position: absolute;
    right: 68px;
    background: var(--gray-800);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.infografia-fab:hover .infografia-fab-tooltip {
    opacity: 1;
}

.infografia-fab-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--gray-800);
}

/* Botón secundario - Horarios y Planes */
.infografia-fab.fab-secondary {
    bottom: 92px;
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    box-shadow: 0 4px 14px rgba(66, 133, 244, 0.4);
    text-decoration: none;
}

.infografia-fab.fab-secondary:hover {
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.5);
}

/* ========================================
   MODAL - INFOGRAFÍA LIGHTBOX
   ======================================== */
.infografia-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.infografia-modal.active {
    opacity: 1;
    visibility: visible;
}

.infografia-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.infografia-modal.active .infografia-modal-content {
    transform: scale(1);
}

.infografia-modal img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.infografia-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.infografia-modal-close:hover {
    transform: scale(1.1);
}

.infografia-modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--gray-700);
}

.infografia-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

.infografia-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.infografia-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
}

.infografia-action-btn svg {
    flex-shrink: 0;
}

.infografia-modal-title {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
}

/* Responsive para móviles */
@media (max-width: 640px) {
    .infografia-fab {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    .infografia-fab.fab-secondary {
        bottom: 76px;
    }

    .infografia-fab-tooltip {
        display: none;
    }

    .infografia-modal-close {
        top: -10px;
        right: -10px;
        width: 36px;
        height: 36px;
    }

    .infografia-action-btn {
        padding: 6px 12px;
        font-size: 0.78rem;
    }
}

/* ===== Activity/Bitácora de Accesos ===== */
.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: -5px;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-100);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-body {
    padding: 16px 20px;
}

.alert-header-red {
    background: #fff5f5;
    border-bottom-color: #feb2b2;
}

.alert-header-red h3 {
    color: var(--danger);
}

.alert-header-yellow {
    background: #fffff0;
    border-bottom-color: #faf089;
}

.alert-header-yellow h3 {
    color: var(--warning);
}

.user-alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--gray-100);
    border-radius: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.user-info-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.user-info-compact .user-name {
    font-weight: 500;
}

.program-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: var(--gray-200);
    border-radius: 4px;
    color: var(--gray-700);
}

.role-badge.role-director {
    background: #805ad5;
    color: white;
}

.role-badge.role-coordinador {
    background: #3182ce;
    color: white;
}

.role-badge.role-docente {
    background: #38a169;
    color: white;
}

.last-access {
    font-size: 0.875rem;
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

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

.user-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-cell .user-name {
    font-weight: 500;
    color: var(--gray-800);
}

.user-cell .user-email {
    font-size: 0.8rem;
}

.text-center {
    text-align: center;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.page-header .text-muted {
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* Tabs */
.tabs-container {
    margin-top: 20px;
}

.tabs-header {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--gray-800);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.tab-badge-red {
    background: #fed7d7;
    color: var(--danger);
}

.tab-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Empty state */
.empty-state {
    padding: 40px 20px;
}

.empty-icon {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.py-20 {
    padding-top: 20px;
    padding-bottom: 20px;
}

.py-40 {
    padding-top: 40px;
    padding-bottom: 40px;
}

@media (max-width: 640px) {
    .tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

/* Sortable table headers */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 24px !important;
    transition: background 0.15s;
}

th.sortable:hover {
    background: var(--gray-200);
}

th.sortable::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--gray-400);
    margin-top: -7px;
    opacity: 0.4;
}

th.sortable::before {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-400);
    margin-top: 5px;
    opacity: 0.4;
}

th.sortable.sort-asc::after {
    border-bottom-color: var(--primary);
    opacity: 1;
}

th.sortable.sort-asc::before {
    opacity: 0.2;
}

th.sortable.sort-desc::before {
    border-top-color: var(--primary);
    opacity: 1;
}

th.sortable.sort-desc::after {
    opacity: 0.2;
}

/* ===== Feedback Bottom-Up ===== */
.feedback-target-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.feedback-target-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feedback-target-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.feedback-target-role {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.feedback-section {
    margin-bottom: 20px;
}

.feedback-section .card-header {
    background: var(--primary);
    color: white;
}

.feedback-section .card-header h3 {
    color: white;
    font-size: 1rem;
}

.feedback-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}

.feedback-item:last-child {
    border-bottom: none;
}

.feedback-item-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.feedback-item-number {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.85rem;
}

.feedback-item-name {
    font-weight: 500;
    color: var(--gray-800);
}

.feedback-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.feedback-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ebf8ff;
    border: 1px solid #90cdf4;
    border-radius: 8px;
    padding: 16px;
    margin: 24px 0;
    color: #2b6cb0;
}

.feedback-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.feedback-form .form-footer {
    margin-top: 24px;
}

/* Tool card para feedback en dashboard */
.tool-card.tool-feedback {
    border-left: 4px solid var(--accent);
}

/* ===== Feedback Results View ===== */
.feedback-stats-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feedback-stats-card .stat-item {
    display: flex;
    flex-direction: column;
}

.feedback-stats-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.feedback-stats-card .stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-top: 4px;
}

.feedback-result-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
}

.feedback-result-item:last-child {
    border-bottom: none;
}

.feedback-result-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.feedback-result-header .sub-element-number {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
}

.feedback-result-header .sub-element-title {
    font-weight: 500;
    color: var(--gray-800);
}

.feedback-result-score {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.score-fill.green {
    background: var(--success);
}

.score-fill.yellow {
    background: var(--warning);
}

.score-fill.red {
    background: var(--danger);
}

.score-details {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.score-value {
    font-weight: 600;
}

.score-value.green {
    color: var(--success);
}

.score-value.yellow {
    color: #b7791f;
}

.score-value.red {
    color: var(--danger);
}

.score-label {
    color: var(--gray-600);
}

.responses-count {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-left: auto;
}

.feedback-overall-card {
    background: white;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--gray-300);
}

.feedback-overall-card.green {
    border-top-color: var(--success);
}

.feedback-overall-card.yellow {
    border-top-color: var(--warning);
}

.feedback-overall-card.red {
    border-top-color: var(--danger);
}

.overall-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.overall-score {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.feedback-overall-card.green .overall-score {
    color: var(--success);
}

.feedback-overall-card.yellow .overall-score {
    color: #b7791f;
}

.feedback-overall-card.red .overall-score {
    color: var(--danger);
}

.overall-interpretation {
    margin-top: 12px;
    font-size: 1rem;
    color: var(--gray-600);
}

/* ===== OKRs Page ===== */
.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header-flex h1 {
    margin-bottom: 4px;
}

/* Brecha de Impacto Alert */
.impact-gap-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fffbeb;
    border: 1px solid #fbbf24;
    padding: 20px;
}

.impact-gap-icon {
    font-size: 2rem;
    line-height: 1;
}

.impact-gap-content strong {
    display: block;
    margin-bottom: 8px;
    color: #92400e;
}

.impact-gap-content p {
    margin: 0 0 8px 0;
    color: #a16207;
}

.impact-gap-content small {
    color: #a16207;
}

/* Comparativa Piso vs Techo */
.okr-comparison-card {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: white;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 24px;
}

.comparison-item {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.comparison-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.comparison-sublabel {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.comparison-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.comparison-value.green {
    color: var(--success);
}

.comparison-value.yellow {
    color: #b7791f;
}

.comparison-value.red {
    color: var(--danger);
}

.comparison-value.neutral {
    color: var(--gray-400);
}

.comparison-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    max-width: 200px;
    margin: 0 auto;
}

.comparison-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.comparison-fill.green {
    background: var(--success);
}

.comparison-fill.yellow {
    background: var(--warning);
}

.comparison-fill.red {
    background: var(--danger);
}

.comparison-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--gray-500);
    font-weight: 600;
    font-size: 1.1rem;
}

/* OKR Grid */
.okr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.okr-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--gray-300);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.okr-card.green {
    border-top-color: var(--success);
}

.okr-card.yellow {
    border-top-color: var(--warning);
}

.okr-card.red {
    border-top-color: var(--danger);
}

.okr-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.okr-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.okr-status-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.okr-status-badge.green {
    background: #d1fae5;
    color: #065f46;
}

.okr-status-badge.yellow {
    background: #fef3c7;
    color: #92400e;
}

.okr-status-badge.red {
    background: #fee2e2;
    color: #991b1b;
}

.okr-status-badge.pending {
    background: var(--gray-200);
    color: var(--gray-600);
}

.okr-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.okr-description {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.okr-metrics {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.okr-metric {
    display: flex;
    flex-direction: column;
}

.okr-metric-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.okr-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.okr-metric-value.green {
    color: var(--success);
}

.okr-metric-value.yellow {
    color: #b7791f;
}

.okr-metric-value.red {
    color: var(--danger);
}

.okr-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.okr-progress-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.okr-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.okr-progress-fill.green {
    background: var(--success);
}

.okr-progress-fill.yellow {
    background: var(--warning);
}

.okr-progress-fill.red {
    background: var(--danger);
}

.okr-progress-text {
    font-size: 0.85rem;
    color: var(--gray-600);
    white-space: nowrap;
}

.okr-source {
    color: var(--gray-500);
}

.okr-edit-btn {
    align-self: flex-start;
}

.okr-calculated-badge {
    color: var(--gray-500);
    font-style: italic;
}

.okr-evidence {
    margin-top: 8px;
}

.evidence-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.evidence-link:hover {
    text-decoration: underline;
}

.okr-notes {
    background: var(--gray-100);
    padding: 12px;
    border-radius: 8px;
    color: var(--gray-600);
}

.okr-updated {
    color: var(--gray-400);
    text-align: right;
}

/* OKR Modal */
#okrModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#okrModal.modal-hidden {
    display: none;
}

#okrModal .modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    margin: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

#okrModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

#okrModal .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

#okrModal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    line-height: 1;
}

#okrModal .modal-close:hover {
    color: var(--gray-700);
}

#okrModal form {
    padding: 24px;
}

#okrModal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    margin-top: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.form-hint {
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* ===== Reports Page ===== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.report-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.report-card h3 {
    font-size: 1.1rem;
    color: var(--gray-800);
    margin: 0;
}

.report-card p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
    flex: 1;
}

.report-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.report-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.report-form select {
    flex: 1;
    min-width: 150px;
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
}

/* Inline-style cleanup utilities */
.docente-tools-grid--narrow {
    max-width: 800px;
}

.tool-card-static {
    cursor: default;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-input-auto {
    width: auto;
}

.header-section--aligned {
    align-items: flex-start;
    margin-bottom: 20px;
}

.text-right {
    text-align: right;
}

.tabs--padded {
    padding: 0 20px;
    border-bottom: 1px solid var(--gray-200);
}

.chart-max-300 {
    max-height: 300px;
}

.chart-card-padded {
    padding: 20px;
}

.icon-inline {
    vertical-align: middle;
    margin-right: 8px;
}

.feedback-notice--spaced {
    margin-bottom: 1.5rem;
}

.eval-comment-highlight {
    background: #ebf8ff;
    border-left: 3px solid var(--accent);
}

.kpi-content.is-open {
    display: block;
}

.modal-hidden {
    display: none;
}

.form-control--narrow {
    max-width: 240px;
}

/* Usuarios: compact table tweaks */
.link-name {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.link-name:hover {
    color: var(--accent);
    text-decoration: underline;
}

.kpi-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.kpi-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    background: var(--gray-300);
}

.kpi-badge-none {
    background: var(--gray-200);
    color: var(--gray-600);
}

.kpi-badge-1,
.kpi-badge-red {
    background: #f56565;
}

.kpi-badge-2,
.kpi-badge-yellow {
    background: #ecc94b;
    color: #744210;
}

.kpi-badge-3,
.kpi-badge-green {
    background: #48bb78;
}

.avg-value {
    font-weight: 600;
}

.avg-green {
    color: #38a169;
}

.avg-yellow {
    color: #b7791f;
}

.avg-red {
    color: #e53e3e;
}

.avg-none {
    color: var(--gray-500);
}

.btn-icon {
    min-width: 34px;
    justify-content: center;
}

.table-sort {
    color: inherit;
    text-decoration: none;
}

.table-sort:hover {
    color: var(--accent);
}

.users-table th.sortable {
    cursor: pointer;
}

.users-table th.sortable:hover {
    color: var(--accent);
}

.users-table th.sortable .table-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.users-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.35;
    border-bottom: 4px solid currentColor;
}

.users-table th.sort-asc::after {
    opacity: 1;
    border-bottom: 4px solid currentColor;
    border-top: none;
}

.users-table th.sort-desc::after {
    opacity: 1;
    border-top: 4px solid currentColor;
    border-bottom: none;
}

/* Report styles (printables) */
.report {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 11px;
    line-height: 1.4;
    color: #1a202c;
    padding: 20px;
}

.report-individual {
    line-height: 1.5;
}

.report .no-print {
    margin-bottom: 15px;
}

.report .report-action-btn {
    padding: 8px 16px;
    cursor: pointer;
}

.report .report-back-link {
    margin-left: 10px;
}

.report .report-period {
    font-size: 10px;
    color: #718096;
}

.report .report-col-narrow {
    width: 8%;
}

.report .report-col-wide {
    width: 32%;
}

.report .report-col-medium {
    width: 12%;
}

.report .report-col-comment {
    width: 36%;
}

/* Reporte Docentes */
.report-docentes .header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1a365d;
}

.report-docentes .header h1 {
    font-size: 18px;
    color: #1a365d;
    margin-bottom: 5px;
}

.report-docentes .header p {
    color: #718096;
    font-size: 12px;
}

.report-docentes .meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 10px;
    color: #718096;
}

.report-docentes table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.report-docentes th,
.report-docentes td {
    border: 1px solid #e2e8f0;
    padding: 6px 8px;
    text-align: left;
}

.report-docentes th {
    background: #1a365d;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 9px;
}

.report-docentes tr:nth-child(even) {
    background: #f7fafc;
}

.report-docentes tr:hover {
    background: #edf2f7;
}

.report-docentes .kpi-cell {
    text-align: center;
    font-weight: 500;
}

.report-docentes .kpi-green {
    color: #38a169;
}

.report-docentes .kpi-yellow {
    color: #b7791f;
}

.report-docentes .kpi-red {
    color: #e53e3e;
}

.report-docentes .level-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 500;
    color: white;
}

.report-docentes .level-1 {
    background: #38a169;
}

.report-docentes .level-2 {
    background: #d69e2e;
}

.report-docentes .level-3 {
    background: #e53e3e;
}

.report-docentes .summary {
    margin-top: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.report-docentes .summary h3 {
    font-size: 12px;
    margin-bottom: 10px;
}

.report-docentes .summary-grid {
    display: flex;
    gap: 30px;
}

.report-docentes .summary-item {
    text-align: center;
}

.report-docentes .summary-value {
    font-size: 20px;
    font-weight: 700;
}

.report-docentes .summary-label {
    font-size: 10px;
    color: #718096;
}

.report-docentes .summary-value-green {
    color: #38a169;
}

.report-docentes .summary-value-yellow {
    color: #d69e2e;
}

.report-docentes .summary-value-red {
    color: #e53e3e;
}

/* Reporte Individual */
.report-individual .header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #1a365d;
}

.report-individual .header-left h1 {
    font-size: 16px;
    color: #1a365d;
    margin-bottom: 3px;
}

.report-individual .header-left p {
    color: #718096;
    font-size: 11px;
}

.report-individual .header-right {
    text-align: right;
}

.report-individual .level-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.report-individual .level-1 {
    background: #38a169;
}

.report-individual .level-2 {
    background: #d69e2e;
}

.report-individual .level-3 {
    background: #e53e3e;
}

.report-individual .info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
}

.report-individual .info-item label {
    font-size: 9px;
    color: #718096;
    text-transform: uppercase;
    display: block;
}

.report-individual .info-item span {
    font-weight: 500;
}

.report-individual .kpi-section {
    margin-bottom: 20px;
    page-break-inside: avoid;
}

.report-individual .kpi-header {
    background: #1a365d;
    color: white;
    padding: 8px 12px;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
}

.report-individual .kpi-table {
    width: 100%;
    border-collapse: collapse;
}

.report-individual .kpi-table th,
.report-individual .kpi-table td {
    border: 1px solid #e2e8f0;
    padding: 6px 10px;
    text-align: left;
    font-size: 10px;
}

.report-individual .kpi-table th {
    background: #edf2f7;
    font-weight: 600;
    font-size: 9px;
    text-transform: uppercase;
}

.report-individual .kpi-table tr:nth-child(even) {
    background: #f7fafc;
}

.report-individual .value-cell {
    text-align: center;
    font-weight: 600;
}

.report-individual .value-green {
    color: #38a169;
}

.report-individual .value-yellow {
    color: #b7791f;
}

.report-individual .value-red {
    color: #e53e3e;
}

.report-individual .value-na {
    color: #a0aec0;
}

.report-individual .comment-cell {
    font-size: 9px;
    color: #4a5568;
    font-style: italic;
}

.report-individual .summary-box {
    margin-top: 20px;
    padding: 15px;
    background: #ebf8ff;
    border: 1px solid #90cdf4;
    border-radius: 8px;
}

.report-individual .summary-box h3 {
    font-size: 12px;
    color: #2b6cb0;
    margin-bottom: 10px;
}

.report-individual .summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    text-align: center;
}

.report-individual .summary-value {
    font-size: 18px;
    font-weight: 700;
}

.report-individual .summary-label {
    font-size: 9px;
    color: #718096;
}

@media print {
    .report .no-print {
        display: none;
    }

    .report {
        padding: 0;
    }

    @page {
        margin: 1cm;
    }
}