:root {
    /* Brand Colors */
    --color-primary: #002366;
    /* Deep Navy Blue */
    --color-secondary: #B22234;
    /* Red */
    --color-accent: #bf953f;
    /* Gold */

    /* Dark Theme Palette */
    --color-bg: #0f172a;
    --color-sidebar: #1e293b;
    --color-surface: rgba(255, 255, 255, 0.05);
    /* Glass effect base */
    --color-surface-hover: rgba(255, 255, 255, 0.1);
    --color-text: #f8fafc;
    --color-text-muted: #cbd5e1;
    /* Increased contrast from #94a3b8 */

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 80px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    background: radial-gradient(circle at top right, #1e3a8a 0%, var(--color-bg) 60%);
    color: var(--color-text);
    min-height: 100vh;
    overflow: auto;
    /* App-like feel */
}

/* --- UTILITIES --- */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: auto;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* focus-visible for high contrast accessibility */
:focus-visible {
    outline: 2px solid var(--color-accent) !important;
    outline-offset: 4px !important;
}

a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip link for keyboard accessibility (WCAG AA) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-accent);
    color: #1e293b;
    padding: 8px;
    z-index: 10000;
    transition: top 0.3s;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    top: 0;
}

/* Admin Visibility System */
.admin-only {
    display: none !important;
}

body.is-admin .admin-only {
    display: inline-flex !important;
}

.glass-panel {
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.input-field {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    color: white;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    transition: 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--color-accent);
}

.input-field::placeholder {
    color: #94a3b8;
    /* Increased contrast from default */
    opacity: 1;
    /* Browser consistency */
}

.agreement-scrollable:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: -2px;
}

/* --- ANIMATIONS --- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
}
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.1);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- BUTTONS --- */
.btn {
    background: var(--color-accent);
    color: #1e293b;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon, .btn-icon-sm {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.btn-icon-sm {
    padding: 0.3rem;
}

.btn-icon:hover, .btn-icon-sm:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* --- SCREENS --- */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    padding: 2rem;
}

/* Agreement Screen Styles */
.agreement-container {
    width: 90%;
    max-width: 800px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInScale 0.5s ease-out;
}

.agreement-scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.agreement-scrollable h3 {
    color: var(--color-accent);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.agreement-scrollable p {
    margin-bottom: 1rem;
}

.agreement-scrollable strong {
    color: var(--color-text);
}

/* Force scrollbar visibility on mobile/webkit */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: rgba(191, 149, 63, 0.4); /* Gold/Accent color with transparency */
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(191, 149, 63, 0.8);
}

/* Ensure specific containers always show their scrollbars */
.agreement-scrollable, 
#gmail-compose-modal,
.modal-overlay,
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) rgba(0, 0, 0, 0.1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

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

/* --- LOGIN SCREEN --- */
.login-container {
    display: flex;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
    width: 100%;
}

.info-side {
    flex: 1;
    text-align: right;
}

.login-form-side {
    flex: 0 0 400px;
    padding: 2.5rem;
}

.logo-display {
    width: 240px;
    margin-bottom: 2rem;
}

.clock-widget {
    font-size: 4rem;
    font-weight: 200;
    line-height: 1;
}

.date-display {
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

/* RESPONSIVE: Stack login for tablets/laptops */
@media screen and (max-width: 992px) {
    .login-container {
        flex-direction: column;
        gap: 2rem;
        padding-bottom: 5rem;
        overflow-y: auto;
    }
    .info-side {
        text-align: center;
        flex: none;
    }
    .login-form-side {
        flex: none;
        width: 100%;
        max-width: 450px;
    }
    .header-widget {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* --- MAIN APP LAYOUT --- */
#main-menu-screen {
    display: flex;
    height: 100vh;
    overflow: auto;
    width: 100%;
}

/* --- SIDEBAR LAYOUT --- */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: 0.2s;
    text-align: left;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left: 3px solid var(--color-accent);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-small {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- MAIN CONTENT --- */
.main-body {
    width: 100%;
    height: 100vh;
    overflow: auto;
    display: block !important; /* Force block to prevent flex shifts */
}

.top-header {
    height: var(--header-height);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-widget {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-wrapper {
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 1rem 2rem 2rem 2rem; /* Reduced top padding to move content up */
    display: block !important;
}

.view-section {
    width: 100%;
    display: block !important;
}

.view-section.hidden {
    display: none !important;
}

/* --- DATA TABLES --- */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 300px;
    height: 38px;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    border-color: var(--color-accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(191, 149, 63, 0.15);
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    outline: none;
    font-size: 0.85rem;
}

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

.data-table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    background-color: var(--color-bg);
    z-index: 10;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 5000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    background: #1e293b;
    /* Solid color for readability */
    max-height: 92vh;
    overflow-y: visible; /* Changed from auto to allow dropdown to show */
    border-radius: var(--radius-lg);
    position: relative;
}

/* Custom Scrollbar for Modals (Auto-visibility optimized) */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: transparent; /* Makes it invisible when not needed */
}
.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

#contract-modal .input-field {
    padding: 0.5rem 0.6rem;
    margin-bottom: 0;
    /* Slightly reduced padding too */
}

#contract-modal .modal-content {
    overflow-y: visible;
    /* explicit remove */
    max-height: 95vh;
    /* Ensure it can grow if needed, or fit screen */
}

#contract-modal .modal-footer {
    margin-top: 0.25rem;
    /* Reduced further */
}

/* --- CLIENT MODAL COMPACT STYLES --- */
#client-modal .input-field {
    margin-bottom: 0;
    padding: 0.5rem 0.6rem;
}

#client-modal .modal-footer {
    margin-top: 0.5rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Premium Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(191,149,63, 0.5);
}

/* --- TOM SELECT DARK THEME OVERRIDES --- */
.ts-control {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 0.6rem 0.8rem !important;
}

.ts-control input {
    color: white !important;
}

.ts-control input::placeholder {
    color: var(--color-text-muted) !important;
}

.ts-dropdown {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border-radius: 6px !important;
    margin-top: 4px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    z-index: 10001 !important;
}

.ts-dropdown .option {
    padding: 0.6rem 0.8rem !important;
    color: white !important;
    transition: background 0.1s;
}

.ts-dropdown .active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.ts-dropdown .selected {
    background: var(--color-accent) !important;
    color: #1e293b !important;
}

.ts-dropdown .create:hover,
.ts-dropdown .option:hover,
.ts-dropdown .active:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* --- THEME OVERRIDES --- */

/* --- PRINT STYLES --- */
@media print {

    /* Base color overrides for print */
    body {
        --color-bg: #ffffff;
        --color-sidebar: transparent;
        --color-surface: transparent;
        --color-surface-hover: transparent;
        --color-text: #000000;
        --color-text-muted: #333333;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide elements that shouldn't print */
    .sidebar,
    .top-header,
    .tabs,
    .modal-tabs,
    .btn:not(.print-btn),
    .btn-secondary:not(.print-btn),
    .search-bar {
        display: none !important;
    }

    /* Reset layout wrapper sizes to allow multiple pages */
    body,
    html,
    #main-menu-screen,
    .main-body,
    .content-wrapper,
    .view-section {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        position: static !important;
        background-color: #ffffff !important;
        background-image: none !important;
    }

    /* Force text colors in print so white text isn't invisible */
    body,
    .main-body,
    .content-wrapper,
    .view-section,
    .glass-panel,
    h1,
    h2,
    h3,
    h4,
    p,
    span,
    div,
    label {
        color: #000000 !important;
    }

    /* Ensure glass panels render nicely but keep their intrinsic display */
    .glass-panel {
        background: #ffffff !important;
        border: 1px solid #ccc !important;
        margin-bottom: 20px !important;
        box-shadow: none !important;
        height: auto !important;
        overflow: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        page-break-inside: auto !important;
    }

    /* Inputs shouldn't be white on white */
    .input-field {
        background: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #999 !important;
    }

    /* Tables */
    .data-table th,
    .data-table td {
        color: #000000 !important;
        border-bottom: 1px solid #ddd !important;
    }

    .print-btn {
        display: none !important;
    }
}

/* --- ACADEMIC HUB ENHANCEMENTS --- */
.academic-student-banner {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--color-accent);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: -1rem -2rem 2.5rem -2rem; /* Offsets content-wrapper padding and provides space below */
    animation: bannerSlideDown 0.4s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.banner-student-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.banner-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.5px;
}

.banner-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-badge.active { border-color: #00ff9d; color: #00ff9d; background: rgba(0, 255, 157, 0.05); }
.banner-badge.warning { border-color: #fbbf24; color: #fbbf24; background: rgba(251, 191, 36, 0.05); }
.banner-badge.danger { border-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, 0.05); }

.banner-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@keyframes bannerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- ACADEMIC REPORT STYLES (v11.12.1) --- */
.report-preview-container {
    background: rgba(0,0,0,0.2);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

.report-document {
    width: 210mm;
    min-height: 297mm;
    background: #ffffff;
    color: #111111;
    padding: 10mm 20mm 20mm 20mm; /* Reduced top to 10mm */
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    font-family: 'Inter', sans-serif;
    position: relative;
    text-align: left;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align to bottom for better line positioning */
    border-bottom: 3px solid #002366;
    padding-bottom: 0.5rem; /* Reduced from 1.5rem */
    margin-bottom: 2rem;
}

.report-logo img {
    max-height: 158px; /* Increased by 50% */
    width: auto;
    filter: none;
}

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

.report-meta h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #002366;
    margin: 0;
    letter-spacing: 1px;
}

.report-meta p {
    font-size: 0.85rem;
    color: #666;
}

.report-badge {
    display: inline-block;
    background: #002366;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.report-student-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.info-group label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.info-group .value {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.report-section {
    margin-bottom: 2.5rem;
}

.report-section h3 {
    font-size: 0.9rem;
    color: #002366;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

/* --- PIPELINE VISIBILITY FIX --- */
.report-pipeline {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 0;
    position: relative;
    width: 100%;
}

.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    z-index: 5;
}

.node-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    z-index: 10;
    border: 2px solid #e2e8f0;
}

.pipeline-node.completed .node-circle { 
    background: #002366; 
    color: #ffffff; 
    border-color: #002366;
}

.pipeline-node.active .node-circle { 
    border: 3px solid #002366; 
    color: #002366; 
    background: #ffffff;
}

.node-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    margin-top: 0.75rem;
    font-weight: 700;
    text-align: center;
    max-width: 80px;
    color: #64748b;
}

.pipeline-node.completed .node-label,
.pipeline-node.active .node-label {
    color: #1e293b;
}

.node-connector {
    position: absolute;
    height: 4px;
    background: #e2e8f0;
    width: 100%;
    top: 16px;
    left: 50%;
    z-index: 1;
}

.pipeline-node.completed .node-connector { 
    background: #002366; 
}

.report-columns {
    display: flex;
    gap: 2rem;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.grid-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.grid-item.done { background: #f0fdf4; color: #166534; border: 1px solid #dcfce7; }
.grid-item.pending { background: #fff1f2; color: #991b1b; border: 1px solid #fee2e2; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.report-list .list-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.list-item .label { font-weight: 600; font-size: 0.85rem; }
.list-item .score { font-weight: 700; color: #002366; }
.list-item .sub-label { font-size: 0.65rem; color: #64748b; margin-top: 2px; }

.report-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-event {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e2e8f0;
}

.event-date { color: #64748b; font-weight: 600; width: 80px; }
.event-type { font-size: 0.65rem; color: #fff; background: #94a3b8; padding: 2px 6px; border-radius: 4px; margin-left: 8px; }

.report-footer {
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-note {
    max-width: 400px;
    font-size: 0.7rem;
    color: #94a3b8;
    font-style: italic;
    line-height: 1.4;
}

.sig-line {
    width: 200px;
    border-top: 1px solid #111;
    margin-bottom: 0.5rem;
}

.footer-sig p {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* --- PRINT OPTIMIZATION --- */
@media print {
    body {
        background: none !important;
        background-color: white !important;
    }
    
    .screen, .sidebar, .top-header, .main-header, .banner-actions, .academic-student-banner, .tabs, .glass-panel > div:first-child {
        display: none !important;
    }

    .content-wrapper {
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    #view-academico, #academic-hub-layout, #academic-hub-main {
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
    }

    #tab-academico-report {
        display: block !important;
    }

    #tab-academico-report .glass-panel {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .report-document {
        box-shadow: none !important;
        padding: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        border: none !important;
    }

    .report-section {
        page-break-inside: avoid;
    }
}

/* --- EMAIL SIDEBAR --- */
.email-folder-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    transition: 0.2s;
    width: 100%;
    text-align: left;
}
.email-folder-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text);
}
.email-folder-btn.active {
    background: rgba(0, 255, 157, 0.1);
    color: var(--color-accent);
    font-weight: 600;
}
.email-folder-btn i {
    width: 18px;
    height: 18px;
}

/* --- STATUS BADGES --- */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
}

.status-Activo, .status-active { border-color: #22c55e; color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.status-Inactivo, .status-inactive { border-color: #94a3b8; color: #94a3b8; background: rgba(148, 163, 184, 0.1); }
.status-Cancelado { border-color: #f59e0b; color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.status-Potencial, .status-potential { border-color: #3b82f6; color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.status-firmado { border-color: #22c55e; color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.status-pending { border-color: #eab308; color: #eab308; background: rgba(234, 179, 8, 0.1); }

/* --- MINI SWITCH TOGGLE (v11.16.398) --- */
.switch-mini input:checked + .slider-mini {
    background-color: var(--color-accent) !important;
}

.slider-mini:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.switch-mini input:checked + .slider-mini:before {
    transform: translateX(14px);
}
