/* =====================================================
   COORDINATOR PANEL STYLES (Refactored for Tailwind/Glass)
   Panel del Coordinador Académico - Edukrea 2.0
   ===================================================== */

/* Reset handled by Tailwind Preflight, but keeping essential overrides */

:root {
    /* These variables are now synced with Edukrea_Final_v2 in the HTML style block 
       We keep them here just in case, but rely on the injected ones. */
    --header-height: 80px;
    --sidebar-width: 250px;
}

body {
    /* Font family and bg handled by Tailwind/HTML */
    overflow-x: hidden;
}

/* ==================
   LAYOUT
   ================== */

.main-content {
    margin-left: 0;
    /* Default for mobile/responsive */
    margin-top: var(--header-height);
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
    transition: margin-left 0.3s ease;
}

@media (min-width: 768px) {
    .main-content {
        margin-left: var(--sidebar-width);
    }
}

.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--glass-bg);
    /* Use shared glass variable */
    backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0 5rem 0;
    overflow-y: auto;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }
}

.coordinator-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    /* background: handled by .glass class in HTML */
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 50;
}

/* ==================
   COMPONENTS
   ================== */

/* Navigation Links */
.nav-link {
    /* Base styles handled by Tailwind classes in HTML, these are specific active states */
    position: relative;
    border-left: 3px solid transparent;
}

.nav-link.active {
    background: rgba(249, 115, 22, 0.15);
    /* Orange tint */
    color: #f97316;
    /* Orange-500 */
    border-left-color: #f97316;
}

.nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #f97316;
}

/* Sections */
.content-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Tables - Enhanced */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    /* rounded-xl */
    border: 1px solid var(--border-color);
    background: rgba(30, 41, 59, 0.4);
    /* slight dark tint */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #94a3b8;
    /* slate-400 */
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.5);
    font-size: 0.875rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: #cbd5e1;
    /* slate-300 */
    font-size: 0.875rem;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Progress Bar */
.progress-bar-container {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 9999px;
    /* full rounded */
    border: 1px solid var(--border-color);
    height: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ec4899);
    /* Orange to Pink Gradient */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: width 0.6s ease;
}

/* Modals - Premium Redesign */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 13, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #1e293b;
    background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 20px rgba(249, 115, 22, 0.05);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
    width: 95%;
}

.modal-overlay:not(.hidden) .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(90deg, #f97316, #f43f5e);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

.modal-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.25rem 2rem;
    background: rgba(15, 23, 42, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Button & Form Overrides inside Modal */
.modal .btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.modal .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.modal .btn-primary {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all 0.2s;
}

.modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(249, 115, 22, 0.4);
}

.modal .form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.modal input,
.modal select,
.modal textarea {
    width: 100%;
    background: rgba(2, 6, 23, 0.4) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0.75rem !important;
    padding: 0.875rem 1rem !important;
    font-size: 0.9375rem !important;
    transition: all 0.3s !important;
}

.modal input:focus,
.modal select:focus {
    background: rgba(2, 6, 23, 0.6) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1) !important;
}

/* Form Elements */
input,
select,
textarea {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #f97316 !important;
    /* Orange focus */
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2) !important;
    outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}