/* ========================================
   MODERN CSS - IESTP Recuay Portfolio
   ======================================== */

/* --- CSS Variables --- */
:root {
    --primary: #0979b0;
    --primary-light: #1E9BD2;
    --primary-dark: #065A84;
    --primary-glow: rgba(9, 121, 176, 0.3);
    --primary-bg: rgba(9, 121, 176, 0.06);

    --secondary: #de2e03;
    --secondary-light: #EF5D23;
    --secondary-dark: #B02302;

    --accent: #00BFA5;
    --accent-light: #1DE9B6;
    --accent-dark: #00897B;

    --danger: #FF1744;
    --warning: #FFC107;
    --info: #2979FF;
    --success: #00C853;

    --bg-primary: #FAFAFA;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F5F7FA;
    --bg-dark: #121212;

    --surface: #FFFFFF;
    --surface-elevated: #FFFFFF;

    --text-primary: #1A1A2E;
    --text-secondary: #4A4A6A;
    --text-muted: #8E8EA0;
    --text-light: #C0C0D0;
    --text-white: #FFFFFF;

    --border-light: #E8E8F0;
    --border-medium: #D0D0E0;
    --border-focus: #1E9BD2;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(9, 121, 176, 0.15);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.27, 1.55);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --container-max: 1200px;
    --header-height: 138px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0A0A1A;
        --bg-secondary: #161628;
        --bg-tertiary: #1E1E3A;
        --surface: #1E1E3A;
        --surface-elevated: #252545;
        --text-primary: #E8E8F0;
        --text-secondary: #B0B0C8;
        --text-muted: #7070A0;
        --border-light: #2A2A4A;
        --border-medium: #3A3A5A;
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
    }
    .header { background: rgba(22, 22, 40, 0.92); }
    .hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg-primary) 50%, var(--bg-secondary) 100%); }
    .modal-logo, .footer-logo, .logo { background: var(--text-white); }
    .material-icon.pdf { background: linear-gradient(135deg, #4A1A1A, #5A2020); color: #FF8A80; }
    .material-icon.pptx { background: linear-gradient(135deg, #4A2E10, #5A3A10); color: #FFCC80; }
    .material-icon.docx { background: linear-gradient(135deg, #123A5A, #164A70); color: #82B1FF; }
    .material-icon.video { background: linear-gradient(135deg, #3A3A3A, #4A4A4A); color: #BDBDBD; }
    .material-icon.code { background: linear-gradient(135deg, #1A4A2A, #205A30); color: #A5D6A7; }
    .material-icon.folder { background: linear-gradient(135deg, #4A3E10, #5A4E10); color: #FFE082; }
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: var(--header-height);
}

@media (max-width: 768px) {
    html { font-size: 15px; }
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary); }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--text-primary); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }
h4 { font-size: clamp(1.0625rem, 2vw, 1.25rem); }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 0.875rem; font-weight: 600; }
p { color: var(--text-secondary); }

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-tertiary);
    padding: 0.125em 0.375em;
    border-radius: var(--radius-sm);
    color: var(--secondary);
}

/* --- Layout --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

.section { padding: 6rem 0; position: relative; }
@media (max-width: 768px) { .section { padding: 4rem 0; } }

.section-title { text-align: center; margin-bottom: 3.5rem; position: relative; }
.section-title::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    margin: 1.25rem auto 0; border-radius: var(--radius-full);
}

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.75rem; font-size: 0.9375rem; font-weight: 600;
    border-radius: var(--radius-md); transition: all var(--transition-fast);
    white-space: nowrap; letter-spacing: 0.01em;
}
.btn-sm { padding: 0.5rem 1.125rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.0625rem; }
.btn-full { width: 100%; }
.btn-primary { background: var(--primary); color: var(--text-white); box-shadow: 0 2px 8px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md), 0 4px 16px var(--primary-glow); }
.btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); border: 1px solid var(--border-medium); }
.btn-secondary:hover { background: var(--border-light); border-color: var(--primary-light); color: var(--primary); }
.btn-accent { background: var(--accent); color: var(--text-primary); }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: var(--text-white); }
.btn-danger:hover { background: #D50000; transform: translateY(-1px); }
.btn-warning { background: var(--warning); color: var(--text-primary); }
.btn-success { background: var(--success); color: var(--text-white); }
.btn-logout { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-medium); padding: clamp(0.45rem, 0.6vw, 0.55rem) clamp(0.875rem, 1.2vw, 1.25rem); font-size: clamp(0.72rem, 0.9vw, 0.82rem); border-radius: var(--radius-full); white-space: nowrap; }
.btn-logout:hover { background: var(--danger); color: var(--text-white); border-color: var(--danger); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-download { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--text-white); box-shadow: 0 2px 8px var(--primary-glow); }
.btn-download:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-link { background: transparent; color: var(--primary); border: 1px solid var(--primary-light); }
.btn-link:hover { background: var(--primary); color: var(--text-white); transform: translateY(-1px); }

/* --- Utilities --- */
.hidden { display: none !important; }
.center-actions { text-align: center; margin-bottom: 2rem; }
.actions-section-spaced { margin-top: 1.5rem; }
.form-control { width: 100%; }

/* --- Forms --- */
.form-group { margin-bottom: 1.5rem; }
.form-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group label { display: block; margin-bottom: 0.625rem; font-weight: 600; color: var(--text-primary); font-size: 0.875rem; letter-spacing: 0.01em; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.875rem 1.125rem;
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    background: var(--surface); color: var(--text-primary);
    transition: all var(--transition-fast); font-size: 0.9375rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 100px; }

/* --- Modals --- */
.modal {
    position: fixed; inset: 0; z-index: 1000; display: flex;
    align-items: center; justify-content: center; padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transition: all var(--transition-normal);
}
.modal.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--surface-elevated); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl); width: 100%; max-width: 440px;
    overflow: hidden; transform: scale(0.92) translateY(20px);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-light);
}
.modal.active .modal-content { transform: scale(1) translateY(0); }
.modal-large { max-width: 720px; }
.modal-header {
    padding: 2.5rem; text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white); position: relative; overflow: hidden;
}
.modal-header::before {
    content: ''; position: absolute; top: -50%; right: -30%;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}
.modal-logo {
    width: 80px; height: 80px; margin: 0 auto 1rem;
    border-radius: var(--radius-lg); background: var(--text-white); padding: 8px;
    box-shadow: var(--shadow-md);
}
.modal-header h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.modal-header p { color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; }
.login-form { padding: 2.5rem; }
.modal-footer { padding: 1.5rem 2.5rem 2rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; border-top: 1px solid var(--border-light); }
.modal-footer small { color: var(--text-light); }
.modal-footer code { background: var(--bg-tertiary); padding: 0.125rem 0.375rem; border-radius: var(--radius-sm); font-size: 0.75rem; color: var(--primary-light); }
.modal-close {
    position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.15);
    color: var(--text-white); font-size: 1.5rem; line-height: 1;
    transition: all var(--transition-fast); z-index: 10; backdrop-filter: blur(4px);
}
.modal-close:hover { background: rgba(255, 255, 255, 0.25); }

/* --- Login split (marca + formulario) --- */
.modal-content.modal-login { max-width: 880px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.login-brand {
    position: relative; overflow: hidden;
    background: transparent;
    color: var(--text-white); display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
    padding: 3rem 2rem; gap: 1.1rem;
}
.login-brand::before { display: none; }
.login-brand::after { display: none; }
.login-brand > * { position: relative; z-index: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }
.login-brand-logo { text-shadow: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.login-brand::before {
    content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.08); top: -110px; left: -110px;
}
.login-brand::after {
    content: ''; position: absolute; width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.07); bottom: -90px; right: -70px;
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand-logo {
    width: 120px; height: 120px; border-radius: 22px;
    background: var(--text-white); padding: 10px; box-shadow: var(--shadow-lg);
}
.login-brand h2 {
    font-family: 'Montserrat', var(--font-sans); font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: 0.1em;
    color: var(--secondary); text-shadow: 0 3px 16px rgba(0, 0, 0, 0.6);
}
.login-brand p { color: rgba(255, 255, 255, 0.88); font-size: 0.9rem; line-height: 1.7; }
.brand-institute {
    font-family: 'Montserrat', var(--font-sans); font-weight: 700;
    font-size: clamp(1.1rem, 2.6vw, 1.4rem); color: var(--secondary);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.brand-program {
    font-family: 'Montserrat', var(--font-sans); font-weight: 700;
    font-size: clamp(0.95rem, 2vw, 1.1rem); letter-spacing: 0.04em; color: var(--secondary);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.login-form-side { padding: 3rem; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--surface); }
.login-form-side > * { width: 100%; max-width: 440px; }
.login-form-header { text-align: center; margin-bottom: 1.75rem; }
.login-form-header h2 { color: var(--primary); font-size: 1.375rem; margin-bottom: 0.375rem; }
.login-form-header p { color: var(--text-muted); font-size: 0.875rem; }
.modal-login .login-form { padding: 0; }
.modal-login .modal-footer { padding: 1.25rem 0 0; }
/* Tabs de rol en login */
.role-tabs { display: flex; gap: 0.625rem; margin-bottom: 1.5rem; }
.role-tab {
    flex: 1; padding: 0.75rem 1rem; font-size: 0.875rem; font-weight: 700;
    color: var(--text-secondary); background: var(--bg-tertiary);
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    transition: all var(--transition-fast); cursor: pointer;
}
.role-tab:hover { border-color: var(--primary-light); }
.role-tab.active { background: var(--primary); border-color: var(--primary); color: var(--text-white); box-shadow: 0 2px 8px var(--primary-glow); }
/* Login a pantalla completa con foto del instituto */
#loginModal { padding: 0; overflow-y: auto; align-items: stretch; background: url('../assets/images/instituto.jpg') center/cover no-repeat fixed, var(--primary-dark); }
#loginModal::before {
    content: ''; position: fixed; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, rgba(6, 90, 132, 0.6) 0%, rgba(9, 121, 176, 0.35) 45%, rgba(0, 0, 0, 0.15) 100%);
}
#loginModal .modal-content.modal-login { width: 100%; min-height: 100vh; border-radius: 0; background: transparent; box-shadow: none; border: none; position: relative; z-index: 1; }
@media (max-width: 680px) {
    .modal-content.modal-login { grid-template-columns: 1fr; }
    .login-brand { padding: 2rem 1.5rem; gap: 0.75rem; }
    .login-brand-logo { width: 84px; height: 84px; border-radius: 18px; }
    .login-form-side { padding: 2rem 1.5rem; }
}

/* --- Header & Navigation --- */
.header {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light); z-index: 100;
}
.header-top {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-dark));
    color: var(--text-white); text-align: center;
    font-size: clamp(0.625rem, 1vw, 0.8rem); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 0.5rem 1rem;
}
.header-container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; gap: 1rem; max-width: none; padding-left: 1.5rem; padding-right: 1.5rem; }
.header-user {
    display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem;
    padding: 0.3rem 1.5rem; font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-tertiary); border-top: 1px solid var(--border-light); min-height: 30px;
}
.header-user:empty { display: none; }
.role-badge { padding: 0.15rem 0.75rem; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.role-badge.teacher { background: var(--primary); color: #fff; }
.role-badge.student { background: var(--success); color: #fff; }
.logo-section { display: flex; align-items: center; gap: 0.875rem; flex-shrink: 0; justify-self: start; min-width: 0; }
.logo { width: clamp(44px, 3.5vw, 60px); height: clamp(44px, 3.5vw, 60px); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--primary), var(--primary-light)); padding: 4px; box-shadow: var(--shadow-sm); flex-shrink: 0; }
.logo-text h1 { font-size: clamp(1rem, 1.4vw, 1.25rem); font-weight: 700; color: var(--primary); line-height: 1.2; white-space: nowrap; }
.logo-text .subtitle { font-size: 0.6875rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-list { display: flex; align-items: center; justify-content: center; gap: 0.25rem; }
.nav { justify-self: center; min-width: 0; }
.nav-link { color: var(--text-secondary); }
.nav-link:hover { color: var(--primary); background: var(--bg-tertiary); }
.nav-link.active { color: var(--primary); background: linear-gradient(135deg, rgba(9, 121, 176, 0.08), rgba(9, 121, 176, 0.04)); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; background: var(--primary); border-radius: var(--radius-full);
}
.nav-link {
    display: block; padding: 0.55rem clamp(0.5rem, 0.8vw, 0.95rem); font-size: clamp(0.8rem, 1vw, 0.95rem); font-weight: 600;
    color: var(--text-secondary); border-radius: var(--radius-md); transition: all var(--transition-fast); position: relative;
    white-space: nowrap;
}
.nav-link:hover { color: var(--primary); background: var(--bg-tertiary); }
.nav-link.active { color: var(--primary); background: linear-gradient(135deg, rgba(9, 121, 176, 0.08), rgba(9, 121, 176, 0.04)); }
.nav-link.active::after {
    content: ''; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%);
    width: 24px; height: 3px; background: linear-gradient(90deg, var(--primary-light), var(--secondary)); border-radius: var(--radius-full);
}
.mobile-menu-btn { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: var(--radius-md); }
.mobile-menu-btn:hover { background: var(--bg-tertiary); }
.hamburger { position: relative; width: 24px; height: 2px; background: var(--text-primary); border-radius: var(--radius-full); transition: background var(--transition-fast); }
.hamburger::before, .hamburger::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-primary); border-radius: var(--radius-full); transition: transform var(--transition-normal); }
.hamburger::before { top: -7px; } .hamburger::after { bottom: -7px; }
.header-actions { display: flex; align-items: center; gap: 1rem; justify-self: end; flex-shrink: 0; }
@media (max-width: 1599px) and (min-width: 1024px) {
    .logo-text { display: none; }
    .nav-link { padding: 0.45rem 0.55rem; font-size: 0.78rem; }
    .header-container { gap: 0.5rem; padding-left: 1rem; padding-right: 1rem; }
    .header-actions { gap: 0.5rem; }
}
@media (max-width: 1023px) {
    .mobile-menu-btn { display: flex; }
    .nav {
        position: fixed; top: var(--header-height); left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border-light);
        border-radius: 0; padding: 1rem; box-shadow: var(--shadow-lg);
        transform: translateY(-100%); opacity: 0; visibility: hidden;
        transition: all var(--transition-normal);
    }
    .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
    .nav-list { flex-direction: column; width: 100%; }
    .nav-link { width: 100%; text-align: left; padding: 0.75rem 1rem; color: var(--text-secondary); }
    .nav-link:hover { color: var(--primary); background: var(--bg-tertiary); }
    .nav-link.active { color: var(--primary); background: linear-gradient(135deg, rgba(9, 121, 176, 0.08), rgba(9, 121, 176, 0.04)); }
    .nav-link.active::after { display: none; }
}
@media (max-width: 640px) {
    .header-top { letter-spacing: 0.04em; }
}

/* --- Main Content --- */
.main-content { padding-top: var(--header-height); min-height: 100vh; }
.main-content.hidden { display: none; }
main { min-height: calc(100vh - var(--header-height)); }

/* --- Hero Section --- */
.hero {
    padding: 6rem 0 5rem;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg-primary) 50%, var(--bg-tertiary) 100%);
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -200px; right: -200px;
    width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.5;
}
.hero-content { display: grid; gap: 3rem; align-items: start; position: relative; z-index: 1; }
@media (min-width: 1024px) { .hero-content { grid-template-columns: 1fr 1fr; align-items: center; } }
.hero-text h2 {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 0.75rem; line-height: 1.2;
}
.hero-text h3 { font-size: clamp(1.125rem, 2.5vw, 1.375rem); font-weight: 500; color: var(--text-secondary); margin-bottom: 1.5rem; }
.hero-description { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 2.5rem; max-width: 560px; line-height: 1.8; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
    text-align: center; padding: 1.5rem;
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); transition: all var(--transition-normal);
    position: relative; overflow: hidden;
}
.stat::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    opacity: 0; transition: opacity var(--transition-normal);
}
.stat:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.stat:hover::before { opacity: 1; }
.stat-number {
    display: block; font-size: 2.5rem; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { display: block; font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.5rem; font-weight: 500; }
.hero-image { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 640px) { .hero-image { grid-template-columns: 1fr; } }
.hero-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 2rem; text-align: center;
    transition: all var(--transition-normal); position: relative; overflow: hidden;
}
.hero-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    opacity: 0; transition: opacity var(--transition-normal);
}
.hero-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.hero-card:hover::before { opacity: 1; }
.card-icon { font-size: 2.75rem; margin-bottom: 1rem; display: block; }
.hero-card h4 { font-size: 1.0625rem; margin-bottom: 0.5rem; color: var(--primary); }
.hero-card p { font-size: 0.8125rem; color: var(--text-muted); }

/* --- About Section --- */
.about-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }
.about-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 2rem; transition: all var(--transition-normal);
    position: relative;
}
.about-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.about-card h3 { font-size: 1.125rem; margin-bottom: 1.5rem; color: var(--primary); display: flex; align-items: center; gap: 0.5rem; }
.about-card h3::before { content: ''; width: 8px; height: 8px; background: var(--secondary); border-radius: var(--radius-full); }
.info-list li { padding: 0.625rem 0; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); font-size: 0.9375rem; }
.info-list li:last-child { border-bottom: none; }
.competency-list li { position: relative; padding: 0.625rem 0 0.625rem 1.75rem; color: var(--text-secondary); font-size: 0.9375rem; }
.competency-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; font-size: 1rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.tech-tag {
    background: var(--bg-tertiary); color: var(--text-secondary);
    padding: 0.5rem 1.125rem; border-radius: var(--radius-full);
    font-size: 0.8125rem; font-weight: 600; border: 1px solid var(--border-light);
    transition: all var(--transition-fast); cursor: default;
}
.tech-tag:hover { background: var(--primary); color: var(--text-white); border-color: var(--primary); transform: translateY(-2px); }

/* --- Courses Section --- */
.courses-grid { display: grid; gap: 1.75rem; }
@media (min-width: 768px) { .courses-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .courses-grid { grid-template-columns: repeat(3, 1fr); } }
.course-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); overflow: hidden; transition: all var(--transition-normal);
    position: relative;
}
.course-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-xl); transform: translateY(-6px); }
.course-header { display: flex; align-items: flex-start; gap: 1.25rem; padding: 2rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--text-white); }
.course-icon { font-size: 2.75rem; flex-shrink: 0; }
.course-info h3 { font-size: 1.125rem; color: var(--text-white); margin-bottom: 0.375rem; }
.course-code { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); font-weight: 600; }
.course-description { padding: 2rem; color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.8; }
.course-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; padding: 1.25rem 2rem; background: var(--bg-tertiary); border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); }
.meta-item { font-size: 0.8125rem; color: var(--text-secondary); }
.meta-item strong { color: var(--text-primary); font-weight: 600; }
.course-topics { padding: 2rem; }
.course-topics h4 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 1.25rem; font-weight: 700; }
.course-topics ul { display: grid; gap: 0.75rem; }
.course-topics li { position: relative; padding-left: 1.5rem; font-size: 0.9375rem; color: var(--text-secondary); }
.course-topics li::before { content: '→'; position: absolute; left: 0; color: var(--secondary); font-weight: 700; }
.course-actions { display: flex; gap: 0.75rem; padding: 1.5rem 2rem; border-top: 1px solid var(--border-light); background: var(--bg-tertiary); justify-content: center; flex-wrap: wrap; }
@media (max-width: 480px) { .course-actions { flex-direction: column; } }
.course-actions-bar { display: flex; gap: 0.625rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-light); flex-wrap: wrap; justify-content: center; }
.course-actions-bar .btn { font-size: 0.75rem; padding: 0.375rem 0.875rem; }

/* --- Materials Section --- */
.filter-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; }
.filter-tab {
    padding: 0.5rem 1.375rem; font-size: 0.875rem; font-weight: 600;
    color: var(--text-secondary); background: var(--bg-tertiary);
    border: 2px solid var(--border-light); border-radius: var(--radius-full);
    transition: all var(--transition-fast); cursor: pointer;
}
.filter-tab:hover { background: var(--border-light); color: var(--text-primary); border-color: var(--primary-light); }
.filter-tab.active { background: var(--primary); color: var(--text-white); border-color: var(--primary); box-shadow: 0 2px 8px var(--primary-glow); }
.materials-grid, .projects-grid { display: grid; gap: 1.75rem; }
@media (min-width: 640px) { .materials-grid, .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .materials-grid, .projects-grid { grid-template-columns: repeat(3, 1fr); } }
.material-card, .project-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); overflow: hidden; transition: all var(--transition-normal);
    position: relative;
}
.material-card::before, .project-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    opacity: 0; transition: opacity var(--transition-normal);
}
.material-card:hover, .project-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.material-card:hover::before, .project-card:hover::before { opacity: 1; }
.material-header, .project-header { padding: 1.75rem 1.5rem; border-bottom: 1px solid var(--border-light); display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.material-icon, .project-icon {
    width: 56px; height: 56px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.material-icon.pdf { background: linear-gradient(135deg, #FFEBEE, #FFCDD2); color: #D32F2F; }
.material-icon.pptx { background: linear-gradient(135deg, #FFF3E0, #FFE0B2); color: #F57C00; }
.material-icon.docx { background: linear-gradient(135deg, #E3F2FD, #BBDEFB); color: #1976D2; }
.material-icon.video { background: linear-gradient(135deg, #F5F5F5, #E0E0E0); color: #616161; }
.material-icon.code { background: linear-gradient(135deg, #E8F5E9, #C8E6C9); color: #388E3C; }
.material-icon.folder { background: linear-gradient(135deg, #FFF8E1, #FFECB3); color: #F9A825; }
.project-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--text-white); box-shadow: 0 2px 8px var(--primary-glow); }
.material-info h4, .project-info h4 { font-size: 1.125rem; margin-bottom: 0.375rem; font-weight: 700; }
.material-meta, .project-meta { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.75rem; color: var(--text-muted); }
.material-meta span, .project-meta span { display: flex; align-items: center; gap: 0.25rem; background: var(--bg-tertiary); padding: 0.375rem 0.75rem; border-radius: var(--radius-sm); font-weight: 500; }
.material-body, .project-body { padding: 1.75rem; }
.material-body p, .project-body p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.8; }
.material-tags, .project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.material-tag, .project-tag { background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-primary)); color: var(--text-secondary); padding: 0.375rem 1rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; border: 1px solid var(--border-light); transition: all var(--transition-fast); }
.material-tag:hover, .project-tag:hover { border-color: var(--primary-light); color: var(--primary); }
.material-footer, .project-footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-light); background: linear-gradient(135deg, var(--bg-tertiary), var(--surface)); display: flex; gap: 0.625rem; justify-content: center; flex-wrap: wrap; }
.material-card .material-actions, .session-card .session-actions { display: flex; gap: 0.625rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-light); justify-content: center; flex-wrap: wrap; }
.material-card .material-actions .btn, .session-card .session-actions .btn { font-size: 0.75rem; padding: 0.375rem 0.875rem; }

/* Center button utilities */
.btn-center { display: inline-flex; align-items: center; justify-content: center; }
.flex-center-group { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.625rem; }

/* --- Sessions Timeline --- */
.sessions-timeline { position: relative; max-width: 800px; margin: 0 auto; }
.sessions-timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
    width: 3px; background: linear-gradient(180deg, var(--primary-light), var(--secondary));
    transform: translateX(-50%); border-radius: 2px;
}
@media (max-width: 767px) { .sessions-timeline::before { left: 1.25rem; } }
.session-item { position: relative; width: 50%; margin-bottom: 2.5rem; }
.session-item:nth-child(odd) { left: 0; padding-right: 2.5rem; text-align: right; }
.session-item:nth-child(even) { left: 50%; padding-left: 2.5rem; text-align: left; }
@media (max-width: 767px) {
    .session-item { width: 100%; left: 0 !important; padding-left: 3rem !important; padding-right: 0 !important; text-align: left !important; }
}
.session-marker {
    position: absolute; top: 0.5rem; width: 16px; height: 16px;
    border-radius: var(--radius-full); background: var(--surface);
    border: 3px solid var(--primary); z-index: 1;
    box-shadow: 0 0 0 4px rgba(9, 121, 176, 0.1);
}
@media (max-width: 767px) { .session-marker { left: 0.45rem; } }
@media (min-width: 768px) {
    .session-item:nth-child(odd) .session-marker { right: -8px; }
    .session-item:nth-child(even) .session-marker { left: -8px; }
}
.session-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 2rem; transition: all var(--transition-normal);
}
.session-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.session-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
@media (max-width: 767px) { .session-header { flex-direction: column; } }
.session-number { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--text-white); padding: 0.375rem 1rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; }
.session-date { font-size: 0.8125rem; color: var(--text-muted); white-space: nowrap; }
.session-title { font-size: 1.125rem; margin-bottom: 0.875rem; color: var(--text-primary); }
.session-description { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.7; }
.session-topics { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.session-tag { background: var(--bg-tertiary); color: var(--text-secondary); padding: 0.375rem 0.875rem; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; }

/* --- Students Section --- */
.students-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem;
}
.students-summary { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.summary-chip {
    background: var(--bg-tertiary); border: 1px solid var(--border-light);
    color: var(--text-secondary); padding: 0.5rem 1.125rem; border-radius: var(--radius-full);
    font-size: 0.8125rem; font-weight: 600;
}
.week-selector { display: flex; align-items: center; gap: 0.75rem; }
.week-selector label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.week-selector select {
    padding: 0.625rem 0.875rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 600;
    background: var(--surface); color: var(--text-primary); cursor: pointer;
}
.week-selector select:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.week-selector input[type="date"] {
    padding: 0.625rem 0.875rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-md); font-size: 0.875rem;
    background: var(--surface); color: var(--text-primary);
}
.week-selector input[type="date"]:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.week-total { font-size: 0.8125rem; color: var(--text-muted); font-weight: 600; }
.add-student-section {
    background: linear-gradient(135deg, rgba(9, 121, 176, 0.06), rgba(0, 200, 83, 0.06));
    border: 2px dashed var(--success); border-radius: var(--radius-lg);
    padding: 2.5rem; text-align: center; margin-bottom: 2.5rem;
}
.add-student-section h3 { font-size: 1.25rem; color: var(--success); margin-bottom: 0.625rem; }
.add-student-section p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.add-student-form { display: grid; gap: 1.25rem; max-width: 600px; margin: 0 auto; text-align: left; }
@media (min-width: 640px) { .add-student-form { grid-template-columns: 2fr 1fr; } }
.add-student-form input {
    padding: 0.875rem 1.125rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-md); font-size: 0.9375rem;
    background: var(--surface); color: var(--text-primary); width: 100%;
    transition: all var(--transition-fast);
}
.add-student-form input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.add-student-actions { grid-column: 1 / -1; display: flex; gap: 0.875rem; justify-content: center; margin-top: 0.5rem; flex-wrap: wrap; }
.table-responsive { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.students-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 780px; }
.students-table thead th {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white); padding: 1rem 0.75rem; text-align: center;
    font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em;
    white-space: nowrap;
}
.students-table tbody td {
    padding: 0.875rem 0.75rem; text-align: center;
    border-bottom: 1px solid var(--border-light); color: var(--text-secondary);
    background: var(--surface);
}
.students-table tbody tr:nth-child(even) td { background: var(--bg-tertiary); }
.students-table tbody tr:hover td { background: var(--primary-bg); }
.student-name { text-align: left !important; font-weight: 600; color: var(--text-primary) !important; min-width: 200px; }
.students-empty { text-align: center; padding: 2.5rem !important; color: var(--text-muted) !important; }
.att-date-label { display: block; font-size: 0.625rem; font-weight: 500; text-transform: none; opacity: 0.85; }
.att-btns { display: flex; gap: 0.375rem; justify-content: center; }
.att-btn {
    width: 32px; height: 32px; border-radius: var(--radius-md); font-weight: 800; font-size: 0.75rem;
    border: 2px solid var(--border-medium); color: var(--text-muted); background: var(--surface);
    transition: all var(--transition-fast);
}
.att-btn:hover { transform: translateY(-1px); }
.att-p.active { background: var(--success); border-color: var(--success); color: #fff; }
.att-t.active { background: var(--warning); border-color: var(--warning); color: #fff; }
.att-f.active { background: var(--danger); border-color: var(--danger); color: #fff; }
.att-static {
    display: inline-block; padding: 0.375rem 1rem; border-radius: var(--radius-full);
    font-size: 0.8rem; font-weight: 700; background: var(--bg-tertiary); color: var(--text-muted);
}
.att-static.att-P { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.att-static.att-T { background: rgba(255, 193, 7, 0.2); color: #B7860B; }
.att-static.att-F { background: rgba(255, 23, 68, 0.12); color: var(--danger); }
.grade-input {
    width: 64px; padding: 0.5rem; text-align: center;
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    font-size: 0.875rem; font-weight: 700; background: var(--surface); color: var(--text-primary);
}
.grade-input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-glow); }
.avg-badge {
    display: inline-block; min-width: 48px; padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full); font-weight: 800; font-size: 0.875rem;
    background: var(--bg-tertiary); color: var(--text-muted);
}
.avg-badge.avg-good { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.avg-badge.avg-mid { background: rgba(255, 193, 7, 0.2); color: #B7860B; }
.avg-badge.avg-low { background: rgba(255, 23, 68, 0.12); color: var(--danger); }
.sub-count { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 600; }
.btn-delete-student { background: var(--danger); color: var(--text-white); }
.btn-delete-student:hover { background: #D50000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.pass-badge {
    display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 0.8rem;
    letter-spacing: 0.06em; background: var(--bg-tertiary); border: 1px dashed var(--border-medium);
    color: var(--primary); padding: 0.375rem 0.625rem; border-radius: var(--radius-md);
    cursor: pointer; transition: all var(--transition-fast); white-space: nowrap;
}
.pass-badge:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }

/* --- Dashboard --- */
.dash-stats { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 2rem; }
@media (min-width: 768px) { .dash-stats { grid-template-columns: repeat(4, 1fr); } }
.dash-stat {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 1.5rem; text-align: center;
    position: relative; overflow: hidden; transition: all var(--transition-normal);
}
.dash-stat::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
}
.dash-stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.dash-stat .num { font-family: 'Montserrat', var(--font-sans); font-size: 1.75rem; font-weight: 800; color: var(--primary); }
.dash-stat .lbl { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-top: 0.25rem; }
.dash-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: 1fr 1fr; } .dash-full { grid-column: 1 / -1; } }
.dash-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); padding: 2rem; box-shadow: var(--shadow-sm);
}
.dash-card h3 { font-size: 1.1rem; color: var(--primary); margin-bottom: 1.5rem; }
.bar-row { margin-bottom: 1.1rem; }
.bar-row:last-child { margin-bottom: 0; }
.bar-top { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.375rem; }
.bar-track { height: 12px; background: var(--bg-tertiary); border-radius: var(--radius-full); overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: var(--radius-full); transition: width 0.6s ease; }
.bar-fill.orange { background: linear-gradient(90deg, var(--secondary-dark), var(--secondary)); }
.week-bars { display: flex; align-items: stretch; gap: 6px; height: 190px; padding-top: 0.5rem; }
.week-bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.375rem; min-width: 0; }
.week-col { width: 100%; background: linear-gradient(180deg, var(--primary-light), var(--primary)); border-radius: 6px 6px 0 0; transition: height 0.5s ease; }
.week-col.empty { background: var(--border-light); }
.week-bar span { font-size: 0.62rem; color: var(--text-muted); font-weight: 700; }
.donut-wrap { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.donut { width: 180px; height: 180px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; background: var(--border-light); }
.donut::before { content: ''; position: absolute; width: 112px; height: 112px; background: var(--surface); border-radius: 50%; }
.donut span { position: relative; font-family: 'Montserrat', var(--font-sans); font-weight: 800; font-size: 1.5rem; color: var(--primary); }
.donut-legend { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 0.375rem; }

/* --- Alumnos en riesgo --- */
.students-table tr.at-risk td { background: rgba(255, 23, 68, 0.05); }
.students-table tr.at-risk td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.risk-badge {
    display: inline-block; font-size: 0.68rem; font-weight: 800;
    background: rgba(255, 23, 68, 0.12); color: var(--danger);
    padding: 0.2rem 0.625rem; border-radius: var(--radius-full);
    margin-left: 0.375rem; white-space: nowrap; vertical-align: middle;
}
.summary-chip.risk-chip { background: rgba(255, 23, 68, 0.12); border-color: var(--danger); color: var(--danger); }
.risk-item {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    background: var(--bg-tertiary); border-left: 3px solid var(--danger);
    border-radius: var(--radius-md); padding: 0.875rem 1.125rem; margin-bottom: 0.625rem;
}
.risk-item strong { display: block; font-size: 0.9rem; color: var(--text-primary); }
.risk-item small { font-size: 0.75rem; color: var(--text-muted); }
.risk-reasons { display: flex; gap: 0.375rem; flex-wrap: wrap; }
.risk-reasons .risk-badge { margin-left: 0; }
.risk-ok { text-align: center; color: var(--success); font-weight: 700; padding: 1.5rem; }

/* --- Contact Section --- */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1.5fr; } }
.contact-info h3 { font-size: 1.25rem; margin-bottom: 1.75rem; color: var(--text-primary); }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 1.25rem; color: var(--text-secondary); }
.contact-list li:last-child { border-bottom: none; }
.contact-list strong { min-width: 100px; color: var(--text-primary); font-weight: 600; }
.contact-form-container {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); padding: 2.5rem; box-shadow: var(--shadow-sm);
}
.contact-form-container h3 { font-size: 1.25rem; margin-bottom: 1.75rem; color: var(--text-primary); }

/* --- Footer --- */
.footer { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: var(--text-white); padding: 3.5rem 0 1.5rem; }
.footer-content { display: grid; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (min-width: 768px) { .footer-content { grid-template-columns: 2fr repeat(3, 1fr); } }
.footer-brand { display: flex; align-items: flex-start; gap: 1.25rem; }
.footer-logo { width: 56px; height: 56px; border-radius: var(--radius-md); background: var(--text-white); padding: 6px; flex-shrink: 0; box-shadow: var(--shadow-sm); }
.footer-brand h4 { font-size: 1.125rem; margin-bottom: 0.375rem; }
.footer-brand p { font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); }
.footer-column h5 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); margin-bottom: 1.25rem; font-weight: 700; }
.footer-column ul { display: grid; gap: 0.625rem; }
.footer-column a { color: rgba(255, 255, 255, 0.7); font-size: 0.9375rem; transition: color var(--transition-fast); }
.footer-column a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1.75rem; text-align: center; }
.footer-bottom p { color: rgba(255, 255, 255, 0.5); font-size: 0.875rem; margin-bottom: 0.5rem; }
.footer-note { font-size: 0.75rem !important; color: rgba(255, 255, 255, 0.4) !important; }

/* --- Toast Notifications --- */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 1100; display: flex; flex-direction: column; gap: 0.875rem; }
.toast {
    background: var(--surface-elevated); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 1rem 1.5rem; box-shadow: var(--shadow-xl);
    display: flex; align-items: center; gap: 0.875rem;
    min-width: 280px; max-width: 420px;
    transform: translateX(120%); opacity: 0;
    transition: all var(--transition-normal);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--info); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast-icon { flex-shrink: 0; font-size: 1.25rem; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }
.toast.warning .toast-icon { color: var(--warning); }
.toast-message { flex: 1; font-size: 0.875rem; color: var(--text-primary); }
.toast-close { flex-shrink: 0; color: var(--text-muted); font-size: 1.25rem; line-height: 1; padding: 0.25rem; }
.toast-close:hover { color: var(--text-primary); }

/* --- Course/Material/Session Actions --- */
.btn-edit-material { background: var(--warning); color: var(--text-white); }
.btn-edit-material:hover { background: #F9A825; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-delete-material { background: var(--danger); color: var(--text-white); }
.btn-delete-material:hover { background: #D50000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-add-material { background: var(--success); color: var(--text-white); }
.btn-add-material:hover { background: #00A849; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-upload-material { background: var(--info); color: var(--text-white); }
.btn-upload-material:hover { background: #1E68DB; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-edit-course { background: var(--warning); color: var(--text-white); }
.btn-edit-course:hover { background: #F9A825; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-delete-course { background: var(--danger); color: var(--text-white); }
.btn-delete-course:hover { background: #D50000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-add-course { background: var(--success); color: var(--text-white); }
.btn-add-course:hover { background: #00A849; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-edit-session { background: var(--warning); color: var(--text-white); }
.btn-edit-session:hover { background: #F9A825; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-delete-session { background: var(--danger); color: var(--text-white); }
.btn-delete-session:hover { background: #D50000; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-upload-new-session { background: var(--info); color: var(--text-white); }
.btn-upload-new-session:hover { background: #1E68DB; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.course-actions-bar { display: flex; gap: 0.625rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-light); flex-wrap: wrap; }
.course-actions-bar .btn { font-size: 0.75rem; padding: 0.375rem 0.875rem; }

/* --- Add Course/Material/Session Sections --- */
.add-course-section {
    background: linear-gradient(135deg, rgba(9, 121, 176, 0.06), rgba(0, 200, 83, 0.06));
    border: 2px dashed var(--success); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; margin-bottom: 2.5rem;
}
.add-course-section h3 { font-size: 1.25rem; color: var(--success); margin-bottom: 0.625rem; }
.add-course-section p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1.75rem; }
.add-course-form, .add-material-form { display: grid; gap: 1.25rem; max-width: 600px; margin: 0 auto; }
@media (min-width: 640px) { .add-course-form, .add-material-form { grid-template-columns: 1fr 1fr; } }
.add-course-form input, .add-course-form select, .add-course-form textarea,
.add-material-form input, .add-material-form select, .add-material-form textarea {
    padding: 0.875rem 1.125rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-md); font-size: 0.9375rem;
    background: var(--surface); color: var(--text-primary);
    transition: all var(--transition-fast); width: 100%;
}
.add-course-form input:focus, .add-course-form textarea:focus, .add-course-form select:focus,
.add-material-form input:focus, .add-material-form textarea:focus, .add-material-form select:focus {
    outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow);
}
.add-course-form textarea, .add-material-form textarea { resize: vertical; min-height: 60px; }
.add-course-form .form-full, .add-material-form .form-full { grid-column: 1 / -1; }
.add-course-actions, .add-material-actions { display: flex; gap: 0.875rem; justify-content: center; margin-top: 1.25rem; }
.add-material-section {
    background: linear-gradient(135deg, rgba(9, 121, 176, 0.06), rgba(0, 200, 83, 0.06));
    border: 2px dashed var(--success); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; margin-bottom: 2.5rem;
}
.add-material-section h3 { font-size: 1.25rem; color: var(--success); margin-bottom: 0.625rem; }
.add-material-section p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 1.75rem; }

/* --- Edit Modal Upload Area --- */
.edit-modal .upload-area { border-color: var(--border-medium); background: var(--bg-tertiary); margin-top: 0.625rem; }
.edit-modal .upload-area:hover { border-color: var(--warning); background: rgba(255, 193, 7, 0.05); }
.edit-modal .upload-area input[type="file"] { cursor: pointer; }
.edit-modal .form-group label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.625rem; }
.edit-modal .upload-area { padding: 1.5rem; }

/* --- Section Action Header --- */
.section-header { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .section-header { flex-direction: row; justify-content: space-between; } }
.section-header .section-title { margin-bottom: 0; }
.section-header .section-title::after { display: none; }
.section-actions-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.section-actions-header h3 { margin-bottom: 0; }
.section-actions-header .section-title { margin-bottom: 0; }
#materialFilters { margin-bottom: 2.5rem; }

/* --- Resources Section --- */
.actions-section {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-xl); padding: 2.5rem; box-shadow: var(--shadow-sm);
}
.actions-section h3 { font-size: 1.25rem; color: var(--primary); margin-bottom: 1.75rem; display: flex; align-items: center; gap: 0.625rem; }
.actions-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .actions-grid { grid-template-columns: repeat(3, 1fr); } }
.action-card {
    background: var(--bg-tertiary); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 1.75rem; transition: all var(--transition-normal);
}
.action-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.action-card h4 { font-size: 1.0625rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.action-card > p { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1.25rem; line-height: 1.6; }
.action-buttons { display: flex; flex-direction: column; gap: 0.625rem; }
.action-buttons .btn { width: 100%; justify-content: center; }

/* Upload dropzone: input file oculto, toda el área es clicable */
.upload-area {
    position: relative; border: 2px dashed var(--border-medium); border-radius: var(--radius-md);
    background: var(--surface); padding: 2rem 1.5rem; text-align: center; cursor: pointer;
    transition: all var(--transition-fast); overflow: hidden;
}
.upload-area:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.upload-area input[type="file"] {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.upload-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-text { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 0.375rem; }
.upload-text strong { color: var(--primary); }
.upload-hint { font-size: 0.75rem; color: var(--text-muted); }
.upload-file-name { font-size: 0.8125rem; margin-top: 0.75rem; font-weight: 600; min-height: 1.25rem; }

/* Upload history */
.upload-history { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border-light); }
.upload-history h5 { font-size: 0.9375rem; color: var(--text-primary); margin-bottom: 1rem; }
.upload-history-item {
    display: flex; align-items: center; gap: 0.875rem; padding: 0.75rem 1rem;
    background: var(--bg-tertiary); border-radius: var(--radius-md); margin-bottom: 0.5rem; font-size: 0.875rem;
}
.upload-history-item small { margin-left: auto; color: var(--text-muted); font-size: 0.75rem; }
.file-status { padding: 0.25rem 0.75rem; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 700; }
.file-status.success { background: rgba(0, 200, 83, 0.12); color: var(--success); }

/* Web links */
.links-list { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.link-item {
    display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem;
    background: var(--bg-tertiary); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); transition: all var(--transition-fast);
}
.link-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); transform: translateX(4px); }
.link-icon { font-size: 1.75rem; flex-shrink: 0; }
.link-info { flex: 1; min-width: 0; }
.link-info h5 { font-size: 0.9375rem; margin-bottom: 0.125rem; }
.link-info span { font-size: 0.8125rem; color: var(--text-muted); word-break: break-all; }
.link-action { flex-shrink: 0; }
.add-link-form { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.add-link-form input {
    flex: 1; min-width: 200px; padding: 0.75rem 1rem;
    border: 2px solid var(--border-light); border-radius: var(--radius-md);
    font-size: 0.875rem; background: var(--surface); color: var(--text-primary);
}
.add-link-form input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }

/* --- Edit Modal (dinámico) --- */
.edit-modal {
    position: fixed; inset: 0; z-index: 1000; display: flex;
    align-items: center; justify-content: center; padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    opacity: 0; transition: opacity var(--transition-normal);
}
.edit-modal.active { opacity: 1; }
.edit-modal-content {
    background: var(--surface-elevated); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl); width: 100%; max-width: 560px; max-height: 90vh;
    overflow-y: auto; transform: scale(0.95) translateY(16px);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-light);
}
.edit-modal.active .edit-modal-content { transform: scale(1) translateY(0); }
.edit-modal-header {
    padding: 2rem 2rem 1.5rem; border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.edit-modal-header h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.edit-modal-header p { font-size: 0.875rem; color: rgba(255, 255, 255, 0.8); }
.edit-modal-body { padding: 2rem; }
.edit-modal-footer {
    padding: 1.25rem 2rem; border-top: 1px solid var(--border-light);
    display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;
    background: var(--bg-tertiary); border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* --- Delete Confirm (dinámico) --- */
.delete-confirm {
    position: fixed; inset: 0; z-index: 1000; display: flex;
    align-items: center; justify-content: center; padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px);
    opacity: 0; transition: opacity var(--transition-normal);
}
.delete-confirm.active { opacity: 1; }
.delete-confirm-content {
    background: var(--surface-elevated); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl); width: 100%; max-width: 440px; padding: 2.5rem;
    text-align: center; transform: scale(0.95);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-light);
}
.delete-confirm.active .delete-confirm-content { transform: scale(1); }
.delete-confirm-icon { font-size: 3rem; margin-bottom: 1rem; }
.delete-confirm-body h3 { font-size: 1.25rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.delete-confirm-body p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 1.75rem; }
.delete-confirm-body .action-buttons { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.delete-confirm-body .action-buttons .btn { width: auto; }

/* --- Report Modal --- */
.report-modal {
    position: fixed; inset: 0; z-index: 1000; display: none;
    align-items: flex-start; justify-content: center; padding: 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(8px); overflow-y: auto;
}
.report-modal.active { display: flex; }
.report-content {
    background: var(--surface-elevated); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl); width: 100%; max-width: 980px;
    padding: 2.5rem; position: relative; border: 1px solid var(--border-light);
}
.report-close {
    position: absolute; top: 1rem; right: 1rem; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); background: var(--bg-tertiary);
    color: var(--text-muted); font-size: 1.5rem; line-height: 1;
    transition: all var(--transition-fast);
}
.report-close:hover { background: var(--danger); color: #fff; }
.report-header { text-align: center; margin-bottom: 1.75rem; border-bottom: 3px double var(--primary); padding-bottom: 1.25rem; }
.report-header h3 { font-size: 1.375rem; color: var(--primary); margin-bottom: 0.5rem; }
.report-header p { font-size: 0.9375rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; margin-bottom: 1.5rem; }
.report-table th {
    background: var(--primary); color: #fff; padding: 0.625rem 0.5rem;
    font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.03em;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.report-table td { border: 1px solid var(--border-light); padding: 0.5rem; text-align: center; color: var(--text-secondary); background: var(--surface); }
.report-table td.name { text-align: left; font-weight: 600; color: var(--text-primary); min-width: 180px; }
.report-table tbody tr:nth-child(even) td { background: var(--bg-tertiary); }
.report-table.matrix { min-width: 0; width: 100%; table-layout: fixed; font-size: 0.72rem; margin-left: auto; margin-right: auto; }
.report-table.matrix th, .report-table.matrix td { padding: 0.35rem 0.2rem; overflow-wrap: break-word; }
.report-table.matrix td.name { min-width: 0; font-size: 0.72rem; }
.matrix-wrap { overflow-x: auto; text-align: center; }
.cell-P { color: var(--success); font-weight: 800; }
.cell-T { color: #B7860B; font-weight: 800; }
.cell-F { color: var(--danger); font-weight: 800; }
.report-summary { display: flex; gap: 0.625rem; flex-wrap: wrap; justify-content: center; margin-bottom: 1.75rem; }
.report-actions { border-top: 1px solid var(--border-light); padding-top: 1.5rem; }
.report-tabs { display: flex; gap: 0.5rem; justify-content: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* --- Schedule --- */
.add-schedule-section {
    background: linear-gradient(135deg, rgba(9, 121, 176, 0.06), rgba(0, 200, 83, 0.06));
    border: 2px dashed var(--success); border-radius: var(--radius-lg);
    padding: 2.5rem; text-align: center; margin-bottom: 2.5rem;
}
.add-schedule-section h3 { font-size: 1.25rem; color: var(--success); margin-bottom: 1.75rem; }
.add-schedule-form { display: grid; gap: 1.25rem; max-width: 900px; margin: 0 auto; text-align: left; }
@media (min-width: 640px) { .add-schedule-form { grid-template-columns: repeat(3, 1fr); } }
.add-schedule-form input, .add-schedule-form select {
    padding: 0.875rem 1.125rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-md); font-size: 0.9375rem; width: 100%;
    background: var(--surface); color: var(--text-primary);
}
.add-schedule-form input:focus, .add-schedule-form select:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.add-schedule-actions { grid-column: 1 / -1; display: flex; justify-content: center; }
.schedule-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .schedule-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .schedule-grid { grid-template-columns: repeat(6, 1fr); } }
.sch-day { background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; }
.sch-day-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white); text-align: center; font-weight: 700;
    font-size: 0.85rem; padding: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.sch-block { padding: 1rem; border-bottom: 1px solid var(--border-light); position: relative; }
.sch-block:last-child { border-bottom: none; }
.sch-time { font-size: 0.75rem; font-weight: 700; color: var(--primary); margin-bottom: 0.25rem; }
.sch-course { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.sch-room { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }
.sch-empty { padding: 1.25rem; text-align: center; color: var(--text-light); font-size: 0.85rem; }
.sch-delete {
    position: absolute; top: 0.375rem; right: 0.375rem; width: 24px; height: 24px;
    border-radius: var(--radius-full); background: var(--bg-tertiary); color: var(--text-muted);
    font-size: 1rem; line-height: 1; transition: all var(--transition-fast);
}
.sch-delete:hover { background: var(--danger); color: #fff; }

/* --- Students extras --- */
.student-search {
    padding: 0.625rem 1rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-full); font-size: 0.85rem; min-width: 200px;
    background: var(--surface); color: var(--text-primary);
}
.student-search:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.btn-edit-student { background: var(--warning); color: var(--text-white); }
.btn-edit-student:hover { background: #F9A825; transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* --- Backup --- */
.backup-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1.5rem; text-align: center; }

/* --- Acta --- */
.acta-sign { text-align: center; margin-top: 2.5rem; font-size: 0.85rem; color: var(--text-secondary); line-height: 2; }

/* --- Announcements --- */
.add-announce-section {
    background: linear-gradient(135deg, rgba(9, 121, 176, 0.06), rgba(0, 200, 83, 0.06));
    border: 2px dashed var(--success); border-radius: var(--radius-lg);
    padding: 2.5rem; text-align: center; margin-bottom: 2.5rem;
}
.add-announce-section h3 { font-size: 1.25rem; color: var(--success); margin-bottom: 1.75rem; }
.add-announce-form { display: grid; gap: 1.25rem; max-width: 700px; margin: 0 auto; text-align: left; }
@media (min-width: 640px) { .add-announce-form { grid-template-columns: 1fr 1fr; } }
.add-announce-form .form-full { grid-column: 1 / -1; }
.add-announce-form input[type="text"], .add-announce-form select, .add-announce-form textarea {
    padding: 0.875rem 1.125rem; border: 2px solid var(--border-light);
    border-radius: var(--radius-md); font-size: 0.9375rem; width: 100%;
    background: var(--surface); color: var(--text-primary); font-family: inherit;
}
.add-announce-form input:focus, .add-announce-form select:focus, .add-announce-form textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 4px var(--primary-glow); }
.add-announce-form textarea { resize: vertical; min-height: 80px; }
.check-group label { display: flex; align-items: center; gap: 0.625rem; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.check-group input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); cursor: pointer; }
.add-announce-actions { grid-column: 1 / -1; display: flex; justify-content: center; }
.announce-list { display: grid; gap: 1.25rem; max-width: 860px; margin: 0 auto; }
.announce-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 1.75rem; position: relative;
    transition: all var(--transition-normal);
}
.announce-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.announce-card.pinned { border-left: 4px solid var(--secondary); background: linear-gradient(135deg, var(--surface), var(--primary-bg)); }
.announce-top { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 0.75rem; }
.announce-icon { font-size: 1.75rem; flex-shrink: 0; }
.announce-card h4 { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 0.25rem; }
.announce-meta { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }
.announce-card > p { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.7; white-space: pre-wrap; }
.announce-empty { text-align: center; color: var(--text-muted); padding: 3rem; }
.ann-del { z-index: 1; }

/* --- Constancia --- */
.constancia-info {
    display: grid; gap: 0.5rem; margin-bottom: 1.5rem; padding: 1.25rem 1.5rem;
    background: var(--bg-tertiary); border-radius: var(--radius-md);
    font-size: 0.9rem; color: var(--text-secondary);
}
.constancia-info strong { color: var(--text-primary); }

/* --- Vista estudiante --- */
.student-mode .course-actions-bar,
.student-mode .center-actions,
.student-mode .add-course-section,
.student-mode #addCourseSection,
.student-mode #addMaterialSection,
.student-mode .add-material-section,
.student-mode .add-student-section,
.student-mode .add-link-form,
.student-mode .add-schedule-section,
.student-mode .add-announce-section,
.student-mode .backup-section,
.student-mode #dashboard,
.student-mode .actions-section:not(.actions-section-spaced) { display: none !important; }
.student-mode .section-actions-header { justify-content: center; }
.student-mode .section-actions-header .btn { display: none !important; }
.student-mode .students-toolbar .btn { display: none !important; }
.student-mode #riskCard { display: none !important; }

/* --- Animations --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.animate-fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.4s ease forwards; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-tertiary); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* --- Print Styles --- */
@media print {
    body.printing-report .main-content,
    body.printing-report .toast-container { display: none !important; }
    body.printing-report .report-modal { position: static; display: block; background: none; padding: 0; overflow: visible; }
    body.printing-report .report-content { box-shadow: none; border: none; max-width: 100%; padding: 0; }
    body.printing-report .report-actions,
    body.printing-report .report-close { display: none !important; }
}
@media print {
    .header, .footer, .modal, .btn, .filter-tabs, .course-actions, .material-footer, .project-footer, .contact-form-container, .upload-area, .actions-section, .add-link-form, .session-actions, .material-actions, .edit-modal, .delete-confirm, .add-material-section, .add-course-section, .course-actions-bar, .add-student-section, .att-btns, .week-selector { display: none !important; }
    .main-content { padding-top: 0; }
    .section { page-break-inside: avoid; }
    body { background: white; }
}