@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Nunito:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================
   Centro Educativo Otilia Pelaez
   style.css - Todos los estilos
   Sabana Perdida, Santo Domingo Norte, RD
================================================ */

:root {
    --gold: #F5C518;
    --gold-light: #FFE066;
    --gold-dark: #C9A000;
    --white: #FFFFFF;
    --off-white: #FFFDF0;
    --navy: #16213E;
    --blue: #0F3460;
    --text: #2C2C2C;
    --gray: #F4F4F4;
    --border: #E8E0C0;
    --success: #2ECC71;
    --danger: #E74C3C;
    --info: #3498DB;
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: var(--off-white);
    color: var(--text);
}


/* LOGIN SCREEN */

#login-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 60%, #1a4a7a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 18px;
    padding: 24px 26px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
    max-height: 92vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.login-emblem {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    box-shadow: 0 4px 16px rgba(245, 197, 24, 0.45);
    border: 2px solid var(--gold);
    overflow: hidden;
}

.login-emblem img {
    width: 60px;
    height: 60px;
    border-radius: 0;
    object-fit: contain;
    padding: 4px;
    display: block;
}

.login-emblem-txt {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--navy);
}

.login-logo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    color: var(--navy);
    font-weight: 900;
}

.login-logo p {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
}

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

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    color: var(--text);
    background: var(--white);
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(201, 160, 0, 0.12);
}

.btn {
    padding: 13px 22px;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 160, 0, 0.45);
}

.btn-outline {
    background: none;
    border: 1.5px solid var(--border);
    color: #666;
}

.btn-outline:hover {
    border-color: #aaa;
    color: var(--text);
}

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

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

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

.divider-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: #bbb;
    font-size: 12px;
}

.divider-or::before,
.divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.alert-error {
    background: #FDE8E8;
    color: #C0392B;
    border: 1px solid #F5B7B1;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}


/* NAVBAR */

#navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    border-bottom: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 64px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

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


/* Logo imagen en navbar — tamaño controlado */

.nav-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 0;
    object-fit: contain;
    border: 2px solid var(--gold);
    box-shadow: 0 2px 8px rgba(245, 197, 24, 0.35);
    flex-shrink: 0;
    display: block;
}

.nav-logo-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 18px;
    color: var(--navy);
    border: 2px solid var(--white);
    overflow: hidden;
    flex-shrink: 0;
}

.nav-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.nav-logo-text {
    color: var(--white);
}

.nav-logo-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.nav-logo-text span {
    font-size: 10px;
    color: var(--gold-light);
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links a,
.nav-links button {
    color: var(--white);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links button:hover {
    background: rgba(245, 197, 24, 0.2);
    color: var(--gold-light);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 14px;
}

.user-pill span {
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
}

.role-badge {
    background: var(--gold);
    color: var(--navy);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
}

#btn-logout {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ff8a7a;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

#btn-logout:hover {
    background: rgba(231, 76, 60, 0.4);
}

.notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--white);
    font-size: 20px;
}

.notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--navy);
    display: none;
}

.notif-dot.show {
    display: block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.notif-panel {
    position: absolute;
    top: 68px;
    right: 20px;
    width: 320px;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    z-index: 999;
    display: none;
    overflow: hidden;
}

.notif-panel.open {
    display: block;
    animation: slideDown 0.2s ease;
}

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

.notif-header {
    padding: 14px 18px;
    background: var(--navy);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h4 {
    font-size: 14px;
    font-weight: 700;
}

.notif-clear {
    background: none;
    border: none;
    color: var(--gold-light);
    font-size: 11px;
    cursor: pointer;
    font-weight: 700;
}

.notif-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.notif-item:hover {
    background: #FFFBF0;
}

.notif-item.unread {
    background: #FFFBF0;
    border-left: 3px solid var(--gold);
}

.notif-item p {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
}

.notif-item span {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
    display: block;
}

.notif-empty {
    padding: 24px;
    text-align: center;
    color: #bbb;
    font-size: 13px;
}


/* PAGES */

.page {
    display: none;
    padding-top: 0;
    min-height: 100vh;
}


/* When navbar is fixed (public mode), pages need padding */

body:not(.logged-in) .page {
    padding-top: 64px;
}

.page.active {
    display: block;
}


/* HERO */

#hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 60%, #1a4a7a 100%);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(245, 197, 24, 0.08) 0%, transparent 60%), radial-gradient(ellipse at 70% 20%, rgba(245, 197, 24, 0.05) 0%, transparent 50%);
}

.hero-badge {
    display: inline-block;
    background: rgba(245, 197, 24, 0.15);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

#hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 5vw, 56px);
    color: var(--white);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 10px;
}

#hero h1 span {
    color: var(--gold);
}

.hero-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 16px;
    max-width: 600px;
    margin: 10px auto 30px;
}

.hero-btns {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero-badge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.hero-badge-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(212, 175, 55, 0.5));
    animation: escudoPulse 3s ease-in-out infinite;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    padding: 13px 28px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(245, 197, 24, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 197, 24, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    padding: 13px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s;
}

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

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.06);
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(245, 197, 24, 0.2);
}

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

.stat-item .num {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--gold);
}

.stat-item .lbl {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 3vw, 34px);
    color: var(--navy);
    font-weight: 900;
}

.section-title h2 span {
    color: var(--gold-dark);
}

.section-title p {
    color: #777;
    margin-top: 8px;
    font-size: 15px;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    margin: 12px auto 0;
    border-radius: 2px;
}

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

.announcement-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
    border: 1px solid var(--border);
}

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

.ann-header {
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.ann-type {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ann-type.evento {
    background: #FFF3CD;
    color: #856404;
}

.ann-type.aviso {
    background: #D1ECF1;
    color: #0c5460;
}

.ann-type.urgente {
    background: #F8D7DA;
    color: #721c24;
}

.ann-type.info {
    background: #D4EDDA;
    color: #155724;
}

.ann-date {
    font-size: 11px;
    color: #999;
}

.ann-body {
    padding: 18px;
}

.ann-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 8px;
}

.ann-body p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.ann-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.ann-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
}

.ann-footer span {
    font-size: 12px;
    color: #999;
}


/* SOCIAL */

.social-section {
    background: linear-gradient(135deg, #f0f4ff, #e8eeff);
    padding: 60px 20px;
}

.social-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.social-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.fb-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1877F2;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.social-follow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s;
}

.social-btn.fb {
    background: #1877F2;
    color: white;
}

.social-btn.fb:hover {
    background: #145dbf;
}

.social-btn.wa {
    background: #25D366;
    color: white;
}

.social-btn.wa:hover {
    background: #1aad52;
}

.social-btn.ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
}

.fb-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.fb-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e6ff;
}

.fb-post-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.fb-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
    color: var(--navy);
    flex-shrink: 0;
    overflow: hidden;
}

.fb-avatar img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 50%;
}

.fb-post-info h4 {
    font-size: 13px;
    font-weight: 700;
    color: #1877F2;
}

.fb-post-info span {
    font-size: 11px;
    color: #aaa;
}

.fb-post-emoji {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
}

.fb-post-body {
    padding: 14px 16px;
}

.fb-post-body p {
    font-size: 13px;
    color: #444;
    line-height: 1.6;
}

.fb-post-footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 16px;
}

.fb-post-footer span {
    font-size: 12px;
    color: #888;
}

.fb-link {
    display: block;
    text-align: center;
    padding: 14px;
    color: #1877F2;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border-top: 1px solid #e0e6ff;
}

.fb-link:hover {
    background: #f0f6ff;
}


/* ABOUT */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

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

.about-school-img {
    width: 100%;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.school-emblem {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 900;
    color: var(--navy);
    border: 4px solid var(--white);
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.5);
    overflow: hidden;
}

.school-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.about-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--navy);
    margin-bottom: 12px;
}

.about-text p {
    color: #555;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 14px;
}

.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.info-card {
    background: var(--white);
    padding: 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.info-card .ic-label {
    font-size: 11px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
}

.info-card .ic-value {
    font-size: 13px;
    color: var(--navy);
    font-weight: 700;
    margin-top: 4px;
}

.director-section {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 50px 20px;
}

.director-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.director-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    flex-shrink: 0;
    border: 4px solid var(--gold);
    box-shadow: 0 4px 20px rgba(245, 197, 24, 0.4);
    overflow: hidden;
}

.director-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.director-text h4 {
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.director-text h2 {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 8px;
}

.director-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.7;
}


/* FOOTER */

.footer {
    background: var(--navy);
    padding: 40px 20px 20px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    color: var(--gold);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p,
.footer-col a {
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.footer-col a:hover {
    color: var(--gold-light);
}

.footer-social-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.fsoc {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.fsoc:hover {
    transform: scale(1.1);
}

.fsoc.fb {
    background: #1877F2;
}

.fsoc.ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.fsoc.wa {
    background: #25D366;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}


/* MODAL */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--navy);
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media(max-width:500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* DASHBOARD */

.dash-header {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 30px 30px 20px;
    color: var(--white);
}

.dash-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
}

.dash-header p {
    opacity: 0.7;
    font-size: 13px;
    margin-top: 4px;
}

.dash-tabs {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
}

.dash-tab {
    padding: 7px 14px;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .8);
    border: 1px solid rgba(255, 255, 255, .15);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.dash-tab.active,
.dash-tab:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.dash-content {
    padding: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.dash-section {
    display: none;
}

.dash-section.active {
    display: block;
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--gold);
    display: flex;
    align-items: center;
    gap: 14px;
}

.kpi-icon {
    font-size: 28px;
}

.kpi-num {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 900;
    color: var(--navy);
}

.kpi-label {
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.panel {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.panel h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--navy);
    margin-bottom: 16px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    transition: all 0.2s;
    margin-bottom: 14px;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 160, 0, 0.4);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--gray);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    color: var(--navy);
    font-size: 12px;
    text-transform: uppercase;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover td {
    background: #FFFBF0;
}

.tbl-actions {
    display: flex;
    gap: 6px;
}

.tbl-btn {
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.tbl-btn.del {
    background: #F8D7DA;
    color: #721c24;
}

.tbl-btn.approve {
    background: #D4EDDA;
    color: #155724;
}

.tbl-btn.reject {
    background: #F8D7DA;
    color: #721c24;
}

.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.badge-pending {
    background: #FFF3CD;
    color: #856404;
}

.badge-approved {
    background: #D4EDDA;
    color: #155724;
}

.badge-rejected {
    background: #F8D7DA;
    color: #721c24;
}

.grade-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 12px;
}

.grade-A {
    background: #D4EDDA;
    color: #155724;
}

.grade-B {
    background: #D1ECF1;
    color: #0c5460;
}

.grade-C {
    background: #FFF3CD;
    color: #856404;
}

.grade-D {
    background: #F8D7DA;
    color: #721c24;
}


/* STUDENT */

.student-header {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 30px;
    color: var(--white);
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.student-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    border: 3px solid var(--white);
    flex-shrink: 0;
}

.student-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin-bottom: 4px;
}

.student-info p {
    opacity: 0.7;
    font-size: 13px;
}

.career-tag {
    background: rgba(245, 197, 24, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 6px;
}

.student-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

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

.gpa-big {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 900;
    color: var(--gold-dark);
    line-height: 1;
}

.gpa-label {
    font-size: 13px;
    color: #888;
    font-weight: 600;
}

.subject-list {
    list-style: none;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.subject-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}

.subject-grade-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-track {
    width: 80px;
    height: 6px;
    background: var(--gray);
    border-radius: 3px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    border-radius: 3px;
}


/* PARENTS */

.parents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.parent-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.parent-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 12px;
}


/* INSCRIPCION */

.inscripcion-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
}

.inscripcion-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.inscripcion-head {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 24px;
    color: var(--white);
    text-align: center;
}

.inscripcion-head h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
}

.inscripcion-body {
    padding: 28px;
}

.photo-upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 20px;
    background: var(--gray);
}

.photo-upload-area:hover {
    border-color: var(--gold-dark);
    background: var(--off-white);
}

.photo-upload-area p {
    font-size: 13px;
    color: #888;
}

.photo-preview {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    object-fit: cover;
    margin: 0 auto 10px;
    display: block;
    border: 3px solid var(--gold);
}


/* AUSENCIAS */

.ausencia-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin-bottom: 14px;
}

.ausencia-card .student-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ausencia-card .st-name {
    font-weight: 700;
    color: var(--navy);
    font-size: 15px;
}

.ausencia-card .reason {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}


/* DISTRITO */

.distrito-panel {
    background: linear-gradient(135deg, #f0f8ff, #e8f4fd);
    border: 1px solid #bee3f8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.distrito-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-green {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

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


/* TOAST */

#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    max-width: 320px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-info {
    background: var(--info);
}

@media(max-width:768px) {
    .nav-links a {
        display: none;
    }
    .dash-content {
        padding: 16px;
    }
}


/* ================================================
   MENSAJES / CHAT - Profesor <-> Padre
   ================================================ */

.mensaje-card {
    background: var(--white);
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

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

.mensaje-card.unread-msg {
    border-left: 4px solid var(--gold);
    background: #FFFDF0;
}

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

.msg-tipo {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
}

.msg-tipo.reunion {
    background: #FFF3CD;
    color: #856404;
}

.msg-tipo.urgente {
    background: #F8D7DA;
    color: #721c24;
}

.msg-tipo.normal {
    background: #D1ECF1;
    color: #0c5460;
}

.msg-fecha {
    font-size: 11px;
    color: #aaa;
}

.msg-body {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

.msg-unread-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--gold-dark);
    font-size: 18px;
}

.chat-contacts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.chat-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.chat-contact:hover {
    border-color: var(--gold);
    background: #FFFBF0;
}

.chat-contact .cc-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.chat-contact .cc-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
}

.chat-contact .cc-role {
    font-size: 11px;
    color: #aaa;
}


/* ================================================
   NAVBAR DROPDOWNS
================================================ */

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-drop-btn {
    color: var(--white);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-drop-btn:hover {
    background: rgba(245, 197, 24, 0.2);
    color: var(--gold-light);
}

.nav-drop-menu {
    display: none;
    position: absolute;
    top: 38px;
    left: 0;
    background: var(--navy);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    min-width: 200px;
    z-index: 2000;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.nav-drop-menu.show {
    display: block;
    animation: fadeDown 0.15s ease;
}

.nav-drop-menu a {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.nav-drop-menu a:hover {
    background: rgba(245, 197, 24, 0.2);
    color: var(--gold-light);
}


/* BTN MAESTROS en navbar */

.btn-maestros {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 4px;
}

.btn-maestros:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 160, 0, 0.4);
}


/* ================================================
   VISTA ESTUDIANTE - SECCIONES
================================================ */

.est-section {
    display: none;
}

.est-section.active-section {
    display: block;
}

.perfil-card {
    background: var(--white);
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

.perfil-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.perfil-row:last-child {
    border-bottom: none;
}

.perfil-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.perfil-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}


/* ================================================
   VISTA PADRE - SECCIONES
================================================ */

.padre-section {
    display: none;
}


/* ================================================
   REGISTRO - CAMPOS CONDICIONALES
================================================ */

#reg-hijo-wrap,
#reg-grado-wrap,
#reg-carrera-wrap,
#reg-padre-contacto-wrap {
    display: none;
}


/* ================================================
   CATEGORÍAS PERSONALIZADAS (Custom Sections)
================================================ */

.custom-section-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.cs-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.cs-body {
    padding: 22px;
}

.cs-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    color: var(--navy);
    margin-bottom: 10px;
}

.cs-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

#custom-sections-area {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}


/* ================================================
   UNICARIBE-STYLE NAVBAR CATEGORIES (visible en home)
================================================ */

.category-bar {
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 20px;
}

.category-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.cat-item {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 700;
    padding: 13px 18px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

.cat-item:hover,
.cat-item.active {
    color: var(--gold-light);
    border-bottom-color: var(--gold);
}


/* Dropdown carrusel estilo UNICARIBE */

.dropdown-mega {
    position: relative;
}

.dropdown-mega .mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0d1d3a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 12px 12px;
    min-width: 220px;
    z-index: 3000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.dropdown-mega:hover .mega-menu {
    display: block;
}

.mega-menu a {
    display: block;
    padding: 11px 18px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}

.mega-menu a:hover {
    background: rgba(245, 197, 24, 0.15);
    color: var(--gold-light);
}


/* ================================================
   NAVBAR DROPDOWNS — estilo UNICARIBE
================================================ */

.nav-links-row {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-dropdown {
    position: relative;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--white);
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-btn:hover {
    background: rgba(245, 197, 24, 0.2);
    color: var(--gold-light);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: linear-gradient(135deg, #1a2a50, #0d1f3e);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(245, 197, 24, 0.2);
    z-index: 2000;
    overflow: hidden;
    display: none;
    animation: fadeDown 0.15s ease;
}

.dropdown-menu.open {
    display: block;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu a {
    display: block;
    padding: 11px 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(245, 197, 24, 0.15);
    color: var(--gold-light);
    padding-left: 24px;
}


/* SECCIONES ESTUDIANTE */

.est-tabs {
    display: flex;
    gap: 5px;
    padding: 14px 18px;
    background: rgba(22, 33, 62, 0.05);
    border-bottom: 2px solid var(--border);
}

.est-tab {
    padding: 7px 16px;
    border-radius: 7px;
    background: none;
    border: 1.5px solid var(--border);
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.est-tab.active,
.est-tab:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.est-section {
    display: none;
    padding: 20px;
}

.est-section.active {
    display: block;
}


/* PERFIL ACADÉMICO */

.perfil-card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.perfil-header {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 28px;
    color: white;
    display: flex;
    align-items: center;
    gap: 18px;
}

.perfil-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 3px solid white;
    flex-shrink: 0;
}

.perfil-info h2 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin-bottom: 4px;
}

.perfil-info p {
    opacity: 0.75;
    font-size: 13px;
}

.perfil-body {
    padding: 22px;
}

.perfil-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.perfil-row:last-child {
    border-bottom: none;
}

.perfil-label {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}

.perfil-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}


/* PADRE SECTIONS */

.padre-section {
    display: none;
    padding: 18px;
}

.padre-section.active {
    display: block;
}


/* SECCIONES PERSONALIZADAS */

#custom-sections-container {
    width: 100%;
}


/* HOME ROLE QUICK PANEL */

.home-quick-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(245, 197, 24, 0.25);
    border-radius: 10px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 26px;
    color: white;
}

.home-quick-card span {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Nunito', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.home-quick-card:hover {
    background: rgba(245, 197, 24, 0.18);
    border-color: var(--gold);
    transform: translateY(-3px);
}


/* LOGIN MAS COMPACTO */

#login-screen .login-card {
    max-width: 380px;
    padding: 30px 28px;
}

#login-screen .login-emblem {
    width: 72px;
    height: 72px;
}

#login-screen .login-emblem img {
    width: 68px;
    height: 68px;
}

#login-screen .login-logo h2 {
    font-size: 16px;
}

#login-screen .login-logo p {
    font-size: 11px;
}

#login-screen .form-group {
    margin-bottom: 12px;
}

#login-screen .form-group input,
#login-screen .form-group select {
    padding: 10px 13px;
    font-size: 13px;
}

#login-screen .login-logo {
    margin-bottom: 18px;
}


/* ROL HOME SECTION */

.role-home-wrap {
    padding: 32px 20px;
}

.role-home-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.role-home-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 18px;
    font-weight: 700;
}


/* ===== CATEGORY BAR ===== */

#cat-bar {
    background: var(--navy);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 62px;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cat-bar-inner {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.cat-bar-inner::-webkit-scrollbar {
    display: none;
}

.cat-item {
    flex-shrink: 0;
    position: relative;
}

.cat-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    padding: 13px 16px;
    cursor: pointer;
    white-space: nowrap;
    font-family: 'Nunito', sans-serif;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
    display: block;
}

.cat-btn:hover,
.cat-has-drop:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
}

.cat-dropdown-wrap:hover .cat-drop {
    display: block;
}

.cat-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #0f2044;
    min-width: 210px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-top: 2px solid var(--gold);
    z-index: 1000;
}

.cat-drop a {
    display: block;
    padding: 11px 18px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cat-drop a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
}


/* ===== ROLE HOME BANNERS ===== */

.role-home-banner {
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.role-home-inner {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-home-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-home-btns .btn {
    padding: 9px 16px;
    font-size: 13px;
}


/* ===== ROLE AVATAR (profile photo) ===== */

.role-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.role-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
}

.role-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.role-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--gold);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    border: 2px solid white;
}


/* ===== PERFIL AVATAR with edit ===== */

.perfil-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.perfil-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    overflow: hidden;
}

.perfil-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.perfil-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--gold);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    border: 2px solid white;
}


/* ===== NAV USER PILL with photo ===== */

#nav-user-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
    display: none;
}


/* ===== PERFIL CUSTOMIZATION BAR ===== */

.perfil-custom-bar {
    background: var(--navy);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.perfil-custom-title {
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
}

.perfil-custom-bar label {
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.perfil-custom-bar input[type=color] {
    width: 30px;
    height: 24px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
}

.perfil-custom-bar select {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-reset-theme {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
}

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

.perfil-page-wrap {
    padding: 24px;
    max-width: 650px;
    margin: 0 auto;
}

.perfil-section-title {
    font-size: 13px;
    color: var(--navy);
    margin-bottom: 10px;
    font-weight: 700;
}


/* Fix dropdown options visibility */

.perfil-custom-bar select option {
    background: #1a2744;
    color: white;
}

#est-font-select option {
    background: #1a2744;
    color: white;
}


/* ===== RICH EDITOR ===== */

.rich-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    padding: 8px 10px;
}

.rich-toolbar button {
    background: white;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}

.rich-toolbar button:hover {
    background: var(--gold);
    color: var(--navy);
}

.rich-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

.rich-editor {
    min-height: 160px;
    border: 1px solid var(--border);
    border-radius: 0 0 10px 10px;
    padding: 14px;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    background: white;
}

.rich-editor:empty:before {
    content: attr(placeholder);
    color: #bbb;
}

.rich-editor img {
    max-width: 100%;
    border-radius: 8px;
    margin: 6px 0;
}


/* ===== ROLES PANEL ===== */

.role-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    background: white;
}

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

.role-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.role-badge-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-badge-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-badge-profesor {
    background: #dcfce7;
    color: #166534;
}

.role-badge-estudiante {
    background: #dbeafe;
    color: #1e40af;
}

.role-badge-padre {
    background: #fce7f3;
    color: #9d174d;
}


/* ===== VALORES ===== */

.valor-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform .2s;
}

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

.valor-icon {
    font-size: 38px;
    margin-bottom: 12px;
}

.valor-card h4 {
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 8px;
}

.valor-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}


/* ===== NIVELES ===== */

.nivel-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 24px;
    color: white;
}

.nivel-card .nivel-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.nivel-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 4px;
}

.nivel-card p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.nivel-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nivel-card ul li {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    padding: 3px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nivel-card ul li:before {
    content: "✓ ";
    color: var(--gold);
}


/* ===== INSTALACIONES ===== */

.instalacion-card {
    background: white;
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border);
    transition: transform .2s;
}

.instalacion-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
}

.instalacion-card h5 {
    font-size: 15px;
    color: var(--navy);
    margin: 8px 0 4px;
}

.instalacion-card p {
    font-size: 12px;
    color: #888;
    margin: 0;
}


/* ===== CALENDARIO ===== */

.cal-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cal-mes {
    font-size: 11px;
    font-weight: 800;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.cal-evento {
    font-size: 14px;
    color: white;
    font-weight: 600;
    margin-bottom: 4px;
}

.cal-fecha {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}


/* ===== GALERÍA ===== */

.galeria-placeholder {
    grid-column: 1/-1;
    padding: 40px;
    text-align: center;
    color: #bbb;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed var(--border);
    font-size: 32px;
}

.galeria-img {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
}

.galeria-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.galeria-img:hover img {
    transform: scale(1.06);
}


/* ===== TESTIMONIOS ===== */

.testimonio-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 24px;
}

.test-texto {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 16px;
}

.test-texto:before {
    content: '"';
    font-size: 40px;
    color: var(--gold);
    line-height: 0;
    vertical-align: -14px;
}

.test-autor {
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.test-autor strong {
    color: white;
    font-size: 13px;
}

.test-autor small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}


/* ===== CONTACTO ===== */

.contacto-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.contacto-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--navy);
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.contacto-card h5 {
    font-size: 13px;
    color: var(--navy);
    margin: 0 0 2px;
}

.contacto-card p,
.contacto-card a {
    font-size: 13px;
    color: #555;
    margin: 0;
}


/* ===== TOP BAR PÚBLICO ===== */

#top-bar-public {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    display: block;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar-right a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
}

.top-bar-right a:hover {
    color: var(--gold);
}


/* ===== NAVBAR PÚBLICO ===== */

#public-navbar {
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 16px;
}

#public-navbar .nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
}

#public-navbar .nav-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 0;
}

#public-navbar .nav-logo-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: var(--navy);
    margin: 0;
}

#public-navbar .nav-logo-text span {
    font-size: 11px;
    color: #888;
}

.pub-nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pub-nav-links a {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.pub-nav-links a:hover {
    background: var(--gold);
    color: var(--navy);
}

.pub-login-btn {
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: opacity .15s;
}

.pub-login-btn:hover {
    opacity: 0.85;
}

.pub-inscribir-btn {
    background: var(--gold);
    color: var(--navy);
}


/* ===== MINI STATS ===== */

.mini-stat {
    background: #f5f0e8;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
}

.mini-stat strong {
    display: block;
    font-size: 18px;
    color: var(--navy);
    font-family: 'Playfair Display', serif;
}

.mini-stat span {
    font-size: 11px;
    color: #888;
}


/* ===== TIMELINE ===== */

.timeline {
    position: relative;
    padding: 0 20px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--navy), var(--gold));
    transform: translateX(-50%);
}

.tl-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-right: 52%;
}

.tl-right {
    flex-direction: row-reverse;
    padding-right: 0;
    padding-left: 52%;
}

.tl-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--navy);
    flex-shrink: 0;
    margin-top: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.tl-content {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 3px solid var(--gold);
    flex: 1;
}

.tl-year {
    font-size: 22px;
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    display: block;
    margin-bottom: 4px;
}

.tl-content p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

@media(max-width:600px) {
    .timeline:before {
        left: 20px;
    }
    .tl-item,
    .tl-right {
        padding-left: 50px;
        padding-right: 0;
        flex-direction: row;
    }
    .tl-dot {
        left: 20px;
    }
}


/* ===== MISIÓN VISIÓN VALORES ===== */

.mvv-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
}

.mvv-icon {
    font-size: 38px;
    margin-bottom: 12px;
}

.mvv-card h4 {
    color: var(--gold);
    font-size: 18px;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
}

.mvv-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.7;
}


/* ===== MAESTROS ===== */

.maestro-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform .2s, box-shadow .2s;
}

.maestro-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.maestro-foto {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
    overflow: hidden;
}

.maestro-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.maestro-card h4 {
    font-size: 14px;
    color: var(--navy);
    margin-bottom: 6px;
    font-weight: 700;
}

.maestro-cargo {
    display: inline-block;
    background: #f5f0e8;
    color: var(--navy);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.maestro-card p {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    margin: 0;
}


/* ===== GALERÍA ADMIN ===== */

.galeria-admin-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f0f0;
}

.galeria-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.galeria-admin-del {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
}


/* ===== HIDE top/public navbar when logged in ===== */

.logged-in #top-bar-public,
.logged-in #public-navbar {
    display: none;
}

body.public-mode #navbar {
    display: none!important;
}


/* ===== CONFIG TABS ===== */

.cfg-tab {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all .15s;
}

.cfg-tab.active,
.cfg-tab:hover {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

.cfg-section {
    display: none;
}

.cfg-section.active {
    display: block;
}

.cfg-section-h {
    font-size: 15px;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold);
}


/* ===== EDITOR ROWS ===== */

.nivel-edit-row,
.inst-edit-row,
.cal-edit-row,
.test-edit-row,
.maest-edit-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    background: white;
    flex-wrap: wrap;
}

.nivel-edit-row input,
.inst-edit-row input,
.cal-edit-row input,
.test-edit-row input,
.maest-edit-row input {
    flex: 1;
    min-width: 80px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
}

.nivel-edit-row textarea,
.test-edit-row textarea,
.maest-edit-row textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    font-family: 'Nunito', sans-serif;
}

.nivel-edit-row .nivel-icon-in,
.inst-edit-row .inst-icon-in,
.cal-edit-row .cal-mes-in,
.test-edit-row .test-emoji-in,
.maest-edit-row .maest-emoji-in {
    max-width: 70px;
    flex: none;
    text-align: center;
}

.btn-del-nivel {
    background: none;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}


/* ===== LOGROS ===== */

.logro-card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all .2s;
}

.logro-ganado {
    border-color: var(--gold);
    background: linear-gradient(135deg, #fefce8, #fef3c7);
}

.logro-bloqueado {
    opacity: 0.55;
    filter: grayscale(60%);
}

.logro-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.logro-card h5 {
    font-size: 13px;
    color: var(--navy);
    margin: 0 0 4px;
}

.logro-card small {
    font-size: 11px;
    color: #888;
}

.logro-badge {
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
}


/* ===== AUDIT LOG ===== */

#audit-log-list {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}


/* ===== REMEMBER ME ===== */

#saved-accounts-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

#saved-accounts-bar p {
    color: rgba(255, 255, 255, 0.6);
}


/* ===== BOT CONFIG STYLES ===== */

.bot-tab-section {
    display: block;
}

.bot-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

.bot-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bot-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: .3s;
}

.bot-toggle-slider:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.bot-toggle input:checked+.bot-toggle-slider {
    background: var(--gold);
}

.bot-toggle input:checked+.bot-toggle-slider:before {
    transform: translateX(22px);
}

.bot-day-check {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f0e8;
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
}

.bot-day-check input {
    accent-color: var(--gold);
    width: 15px;
    height: 15px;
}

.bot-resp-row {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}

.bot-resp-row .resp-keys {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
    margin-bottom: 8px;
}

.bot-resp-row .resp-text {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
    resize: vertical;
}


/* ===== CATEGORIAS ===== */

.cat-role-tab {
    transition: all .2s;
}

.cat-role-tab.active {
    background: var(--gold)!important;
    color: var(--navy)!important;
    border-color: var(--gold)!important;
}

.cat-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    transition: box-shadow .2s;
}

.cat-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.cat-item.disabled {
    opacity: .55;
    background: #f9f9f9;
}

.cat-item .cat-keys {
    background: #f5f0e8;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--navy);
    font-weight: 700;
    margin: 6px 0;
}

.cat-edit-area {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.cat-edit-area.open {
    display: block;
}


/* ===== CATEGORÍAS CONFIG ===== */

.cat-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cat-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.cat-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.cat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    cursor: pointer;
    background: white;
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}

.cat-card.expanded .cat-card-header {
    border-color: var(--border);
}

.cat-card-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.cat-card-info {
    flex: 1;
}

.cat-card-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--navy);
    margin: 0 0 2px;
}

.cat-card-desc {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.cat-card-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.cat-card-body {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--border);
    background: #fdfdfd;
}

.cat-card.expanded .cat-card-body {
    display: block;
}

.cat-expand-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    transition: transform .2s;
    padding: 0;
}

.cat-card.expanded .cat-expand-btn {
    transform: rotate(180deg);
}


/* ── PAGOS / CALENDARIO / RANKING / NOTIFS ── */

.padre-section {
    display: none;
}

.padre-section.active {
    display: block;
}

#cal-grid>div {
    cursor: pointer;
    user-select: none;
}

#cal-grid>div:hover {
    opacity: 0.8;
}

.ranking-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

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

.notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    margin-left: 4px;
    min-width: 18px;
    height: 18px;
}


/* Receipt print */

@media print {
    body>*:not(.print-area) {
        display: none !important;
    }
    .print-area {
        display: block !important;
    }
}


/* ── Dev Watermark ── */

#dev-watermark {
    pointer-events: none;
    user-select: none;
}


/* ── Public nav active state ── */

.pub-nav-links a:hover {
    color: var(--gold) !important;
    transition: color .2s;
}


/* ── Page transitions ── */

.page {
    animation: pageFadeIn .25s ease;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px)
    }
    to {
        opacity: 1;
        transform: none
    }
}


/* ── Social feed card hover ── */

#fb-posts-grid>div {
    transition: transform .2s, box-shadow .2s;
}

#fb-posts-grid>div:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}


/* ── Pagos public grid ── */

#pagos-public-grid>div {
    transition: transform .2s, box-shadow .2s;
}

#pagos-public-grid>div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}


/* ── Reglamento public ── */

#reg-pub-sections>div {
    transition: transform .15s;
}

#reg-pub-sections>div:hover {
    transform: translateX(4px);
}


/* ── Security lock animation ── */

@keyframes shake {
    0%,
    100% {
        transform: translateX(0)
    }
    25% {
        transform: translateX(-6px)
    }
    75% {
        transform: translateX(6px)
    }
}

.login-shake {
    animation: shake .4s ease;
}


/* ── Responsive nav for new items ── */

@media(max-width:900px) {
    .pub-nav-links a {
        font-size: 11px;
        padding: 4px 6px;
    }
}

@media(max-width:700px) {
    #dev-watermark {
        display: none;
    }
}


/* ══════════════════════════════════════════════════
   PREMIUM UPGRADES — C.E. Otilia Peláez
══════════════════════════════════════════════════ */


/* CSS custom properties upgrades */

:root {
    --navy: #0f1c3a;
    --blue: #1a3a6e;
    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-dark: #b8963e;
    --white: #ffffff;
    --bg: #f8f9fc;
    --border: #e5e7eb;
    --success: #16a34a;
    --danger: #dc2626;
    --info: #2563eb;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, .15);
    --radius: 14px;
    --radius-lg: 20px;
    --transition: all .22s cubic-bezier(.4, 0, .2, 1);
}


/* Body & typography */

body {
    font-family: 'Nunito', 'Inter', sans-serif;
    background: var(--bg);
    color: #1a1a2e;
    -webkit-font-smoothing: antialiased;
}


/* ── Scrollbar premium ── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}


/* ── Selection color ── */

::selection {
    background: rgba(212, 175, 55, 0.25);
    color: var(--navy);
}


/* ── Smooth scroll ── */

html {
    scroll-behavior: smooth;
}


/* ── Hero premium ── */

#hero {
    background: linear-gradient(145deg, #071328 0%, #0f1c3a 40%, #1a3a6e 80%, #0d2a55 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 60%), radial-gradient(ellipse at 20% 80%, rgba(26, 58, 110, 0.6) 0%, transparent 50%);
    pointer-events: none;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

#hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 900;
    color: white;
    line-height: 1.1;
    margin: 0 0 16px;
    letter-spacing: -1px;
}

#hero h1 span {
    color: var(--gold);
}

#hero .hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    line-height: 1.7;
    margin: 0 0 36px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
}

.hero-btns {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
    letter-spacing: .3px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}


/* Stats bar */

.stats-bar {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    margin-top: 40px;
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 0 16px;
    border-right: 1px solid rgba(255, 255, 255, .12);
}

.stat-item:last-child {
    border-right: none;
}

.stat-item .num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(20px, 3vw, 32px);
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    display: block;
}

.stat-item .lbl {
    font-size: 10px;
    color: rgba(255, 255, 255, .6);
    margin-top: 4px;
    letter-spacing: .8px;
    text-transform: uppercase;
    display: block;
}


/* ── Navbar premium (logged in) ── */

#navbar {
    background: linear-gradient(90deg, rgba(8, 16, 40, 0.98) 0%, rgba(13, 28, 62, 0.97) 50%, rgba(8, 16, 40, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--gold);
    border-top: none;
    position: sticky;
    top: 0;
    z-index: 7000;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .45), 0 1px 0 rgba(212, 175, 55, 0.15) inset;
}


/* Línea dorada animada debajo del navbar */

#navbar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), #ffd700, var(--gold), transparent);
    background-size: 200% 100%;
    animation: navGlow 3s linear infinite;
}


/* ── Centro del navbar ── */

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    user-select: none;
    text-align: center;
    padding: 4px 20px;
    border-radius: 10px;
    transition: background 0.2s;
}

.nav-center:hover {
    background: rgba(212, 175, 55, 0.08);
}

.nav-center-name {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-escudo {
    font-size: 20px;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
    animation: escudoPulse 3s ease-in-out infinite;
}

@keyframes escudoPulse {
    0%,
    100% {
        filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(212, 175, 55, 1));
    }
}

.nav-title-text {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-title-text strong {
    font-weight: 800;
    background: linear-gradient(135deg, #d4af37, #ffd700, #d4af37);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: goldShimmer 3s linear infinite;
}

@keyframes goldShimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

.nav-center-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9.5px;
    font-family: 'Nunito', sans-serif;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.nav-meta-item {
    color: rgba(255, 255, 255, 0.45);
}

#nav-live-clock {
    color: rgba(212, 175, 55, 0.7);
    font-weight: 700;
    font-size: 10px;
    font-family: 'Courier New', monospace;
}

.nav-meta-sep {
    color: rgba(212, 175, 55, 0.3);
    font-weight: 700;
}

.nav-logo-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: white;
    margin: 0;
}

.nav-logo-text span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.nav-btn {
    color: rgba(255, 255, 255, 0.85);
    background: none;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Nunito', sans-serif;
}

.nav-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
}


/* ── Panel cards premium ── */

.panel {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.panel:hover {
    box-shadow: var(--shadow-md);
}

.panel h3 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    font-size: 17px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* ── Buttons premium ── */

.btn {
    border-radius: 10px;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Nunito', sans-serif;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: #555;
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--navy);
    background: rgba(212, 175, 55, 0.05);
}


/* ── KPI cards premium ── */

.kpi-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left: 4px solid var(--gold);
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-num {
    font-size: 28px;
    font-weight: 900;
    color: var(--navy);
    font-family: 'Playfair Display', serif;
}

.kpi-label {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.kpi-icon {
    font-size: 28px;
}


/* ── Valor cards ── */

.valor-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.valor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.valor-icon {
    font-size: 40px;
    margin-bottom: 14px;
}

.valor-card h4 {
    color: var(--navy);
    font-size: 16px;
    margin: 0 0 8px;
    font-family: 'Playfair Display', serif;
}

.valor-card p {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}


/* ── Home quick cards ── */

.home-quick-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
    font-size: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
}

.home-quick-card:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.home-quick-card span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .3px;
}


/* ── Tables ── */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead tr {
    background: var(--navy);
    color: white;
}

.data-table th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover {
    background: #f8f9fc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}


/* ── Forms ── */

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

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    margin-bottom: 5px;
    display: block;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Nunito', sans-serif;
    transition: var(--transition);
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}


/* ── Modals premium ── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    display: flex;
}

.modal-box {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: modalIn .25s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes modalIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    color: white;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

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


/* ── Tabs premium ── */

.dash-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: #f8f9fc;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.dash-tab {
    padding: 8px 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    background: transparent;
    color: #888;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'Nunito', sans-serif;
}

.dash-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--navy);
}

.dash-tab.active {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: white;
    box-shadow: 0 4px 12px rgba(15, 28, 58, 0.3);
}

.dash-header {
    background: linear-gradient(135deg, #0f1c3a, #1a3a6e) !important;
    border-bottom: 2px solid #d4af37 !important;
    padding: 20px 24px 0 !important;
}

.dash-header h1 {
    font-family: 'Playfair Display', serif;
    color: white !important;
    font-size: 22px;
    margin: 0 0 4px;
}

.dash-header p {
    color: rgba(255, 255, 255, .65) !important;
    font-size: 13px;
    margin: 0 0 16px;
}


/* ── Role banner premium ── */

.role-home-banner {
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
}

.role-home-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.role-home-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.role-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.role-home-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}


/* ── Toast premium ── */

.toast {
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 220px;
    animation: toastIn .3s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ── Portal FAB ── */

#portal-fab button {
    border-radius: 50px !important;
    padding: 12px 22px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.45) !important;
    transition: var(--transition) !important;
}

#portal-fab button:hover {
    transform: translateY(-3px) !important;
}


/* ── Public navbar premium ── */

#public-navbar {
    background: rgba(10, 20, 45, 0.97) !important;
    backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--gold);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 8000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}

.pub-nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pub-nav-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.pub-nav-links a:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold);
}

.pub-login-btn {
    padding: 8px 18px;
    border-radius: 30px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Nunito', sans-serif;
}

.pub-login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.pub-inscribir-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--navy) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.pub-inscribir-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.45) !important;
}


/* ── Section titles ── */

.section-title {
    text-align: center;
    margin-bottom: 10px;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--navy);
    margin: 0 0 10px;
}

.section-title h2 span {
    color: var(--gold);
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    margin: 0 auto;
    border-radius: 2px;
}


/* ── Login card ── */

#login-screen .login-card {
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#login-screen .login-emblem img {
    border-radius: 0;
    object-fit: contain;
    padding: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    width: 80px;
    height: 80px;
}


/* ── Print ── */

@media print {
    #navbar,
    #public-navbar,
    #portal-fab,
    [id^="bot-fab"],
    #dev-watermark {
        display: none !important;
    }
}


/* ── Responsive ── */

@media (max-width: 768px) {
    #hero {
        padding: 80px 16px 40px;
        min-height: auto;
    }
    .role-home-btns {
        margin-left: 0;
        width: 100%;
    }
    .stats-bar {
        gap: 20px;
    }
    .dash-tabs {
        padding: 10px;
    }
    .modal-box {
        margin: 10px;
        border-radius: 16px;
    }
    #public-navbar {
        padding: 0 12px;
    }
    .pub-nav-links {
        display: none;
    }
}


/* ── Animations ── */

.page.active {
    animation: pageIn .3s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ── Highlight boxes ── */

.highlight-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.03));
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
}


/* ── Badge ── */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 800;
}

.badge-gold {
    background: var(--gold);
    color: var(--navy);
}

.badge-red {
    background: #ef4444;
    color: white;
}

.badge-green {
    background: #16a34a;
    color: white;
}


/* ── Profile card ── */

.perfil-header {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 32px;
    text-align: center;
    border-radius: var(--radius) var(--radius) 0 0;
}

.perfil-avatar {
    font-size: 60px;
    margin-bottom: 12px;
}

.perfil-info h2 {
    color: white;
    font-family: 'Playfair Display', serif;
    margin: 0 0 4px;
}

.perfil-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0;
}

.perfil-body {
    padding: 20px;
}

.perfil-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.perfil-row:last-child {
    border-bottom: none;
}

.perfil-label {
    color: #888;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.perfil-value {
    color: var(--navy);
    font-weight: 700;
}


/* ── Nivel cards ── */

.nivel-card {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 28px;
    color: white;
    transition: var(--transition);
}

.nivel-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
}

.nivel-icon {
    font-size: 40px;
    margin-bottom: 14px;
}

.nivel-card h4 {
    color: var(--gold);
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin: 0 0 8px;
}

.nivel-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin: 0 0 14px;
}

.nivel-card ul {
    padding-left: 16px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    line-height: 1.8;
    margin: 0 0 14px;
}


/* ── Est tabs ── */

.est-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.est-tabs::-webkit-scrollbar {
    display: none;
}

.est-tab {
    padding: 7px 14px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    background: transparent;
    color: #888;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'Nunito', sans-serif;
}

.est-tab:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--navy);
}

.est-tab.active {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: white;
    box-shadow: 0 3px 10px rgba(15, 28, 58, 0.3);
}


/* ================================================================
   OTILIA PELÁEZ — OVERRIDE DEFINITIVO
   Un solo bloque limpio, sin conflictos
================================================================ */


/* ── VARIABLES ── */

:root {
    --navy: #0f1c3a;
    --blue: #1a3a6e;
    --gold: #d4af37;
    --gold-light: #f0d060;
    --gold-dark: #b8963e;
    --bg: #f8f9fc;
    --border: #e5e7eb;
    --radius: 14px;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

::selection {
    background: rgba(212, 175, 55, .2);
    color: var(--navy);
}


/* ══════════════════════════════════════════════════════
   1. ANIMACIONES GLOBALES
══════════════════════════════════════════════════════ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeIn {
    from {
        opacity: 0
    }
    to {
        opacity: 1
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(.92)
    }
    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-20px)
    }
    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes shimmer {
    0% {
        background-position: 0% center
    }
    100% {
        background-position: 200% center
    }
}

@keyframes spin {
    from {
        transform: rotate(0)
    }
    to {
        transform: rotate(360deg)
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1
    }
    50% {
        opacity: .5
    }
}

@keyframes typingDot {
    0%,
    100% {
        opacity: .3;
        transform: translateY(0)
    }
    50% {
        opacity: 1;
        transform: translateY(-4px)
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(.9)
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

@keyframes loginIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(.96)
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1)
    }
}

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

@keyframes heroPulse {
    0% {
        opacity: .6;
        transform: scale(1)
    }
    100% {
        opacity: 1;
        transform: scale(1.04)
    }
}


/* Páginas con animación al mostrar */

.page.active {
    animation: fadeUp .35s var(--ease) both !important;
}


/* ══════════════════════════════════════════════════════
   2. TOP BAR Y PUBLIC NAVBAR
══════════════════════════════════════════════════════ */

#public-navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 900 !important;
    background: rgba(255, 255, 255, .97) !important;
    backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .1) !important;
}

.pub-nav-links a {
    transition: background .15s, color .15s !important;
}

.pub-nav-links a:hover {
    background: var(--gold) !important;
    color: var(--navy) !important;
    border-radius: 8px !important;
}


/* Hamburguesa */

#nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    flex-shrink: 0;
}

#nav-hamburger span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: all .3s;
}

#nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5.3px, 5.3px);
}

#nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

#nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5.3px, -5.3px);
}


/* Menú móvil */

#mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 50, .97);
    z-index: 9500;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 20px;
    animation: fadeIn .3s ease;
}

#mobile-menu.open {
    display: flex !important;
}

#mobile-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: white;
    font-size: 20px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-menu a {
    color: rgba(255, 255, 255, .9);
    font-size: 16px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    max-width: 290px;
    border: 1px solid rgba(255, 255, 255, .08);
    transition: background .2s;
}

#mobile-menu a:hover {
    background: rgba(212, 175, 55, .2);
    color: var(--gold);
}

#mobile-menu .mob-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 290px;
    margin-top: 14px;
}

#mobile-menu .mob-btns button {
    padding: 13px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    font-family: 'Nunito', sans-serif;
}

#mobile-menu .mob-login {
    background: white;
    color: var(--navy);
}

#mobile-menu .mob-register {
    background: var(--gold);
    color: var(--navy);
}


/* ══════════════════════════════════════════════════════
   3. HERO — centrado + animaciones
══════════════════════════════════════════════════════ */

#hero {
    background: linear-gradient(160deg, #0a1628 0%, #0f1c3a 45%, #1a3a6e 80%, #1a4a7a 100%) !important;
    min-height: 75vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 80px 20px 50px !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
}

#hero::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    background: radial-gradient(ellipse at 25% 40%, rgba(212, 175, 55, .12) 0%, transparent 55%), radial-gradient(ellipse at 75% 70%, rgba(212, 175, 55, .07) 0%, transparent 50%) !important;
    animation: heroPulse 8s ease-in-out infinite alternate !important;
    pointer-events: none !important;
}

#hero>div:not(.stats-bar) {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 820px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

#hero>.stats-bar {
    position: relative !important;
    z-index: 2 !important;
}

.hero-badge {
    animation: fadeUp .6s var(--ease) both !important;
}

#hero h1 {
    animation: fadeUp .6s var(--ease) .15s both !important;
}

#hero h1 span {
    display: block !important;
    background: linear-gradient(135deg, #ffe066, #d4af37, #ffe066) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: fadeUp .6s var(--ease) .3s both, shimmer 4s linear 1s infinite !important;
}

.hero-sub {
    animation: fadeUp .6s var(--ease) .45s both !important;
}

.hero-btns {
    animation: fadeUp .6s var(--ease) .6s both !important;
}


/* Botones hero */

.btn-primary {
    transition: all .2s !important;
}

.btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 28px rgba(212, 175, 55, .5) !important;
}

.btn-secondary {
    transition: all .2s !important;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, .18) !important;
    transform: translateY(-2px) !important;
}


/* Stats bar en fila */

.stats-bar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 22px 20px !important;
    margin-top: 44px !important;
    position: relative !important;
    z-index: 2 !important;
}

.stat-item {
    flex: 1 !important;
    text-align: center !important;
    padding: 0 18px !important;
    border-right: 1px solid rgba(255, 255, 255, .1) !important;
    animation: fadeUp .5s var(--ease) both !important;
}

.stat-item:last-child {
    border-right: none !important;
}

.stat-item:nth-child(1) {
    animation-delay: .1s !important;
}

.stat-item:nth-child(2) {
    animation-delay: .2s !important;
}

.stat-item:nth-child(3) {
    animation-delay: .3s !important;
}

.stat-item:nth-child(4) {
    animation-delay: .4s !important;
}

.stat-item .num {
    display: block !important;
}

.stat-item .lbl {
    display: block !important;
    margin-top: 4px !important;
}


/* Barra blanca eliminada */

#home-role-section:empty,
#home-role-panel:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}


/* ══════════════════════════════════════════════════════
   4. VALOR CARDS — centradas
══════════════════════════════════════════════════════ */

div:has(>.valor-card) {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 18px !important;
}

.valor-card {
    flex: 0 1 calc(33.333% - 13px) !important;
    min-width: 200px !important;
    max-width: 310px !important;
    box-sizing: border-box !important;
    transition: all .25s ease !important;
    animation: fadeUp .5s var(--ease) both !important;
}

.valor-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12) !important;
    border-color: var(--gold) !important;
}

.valor-card:nth-child(1) {
    animation-delay: .05s !important;
}

.valor-card:nth-child(2) {
    animation-delay: .1s !important;
}

.valor-card:nth-child(3) {
    animation-delay: .15s !important;
}

.valor-card:nth-child(4) {
    animation-delay: .2s !important;
}

.valor-card:nth-child(5) {
    animation-delay: .25s !important;
}


/* ══════════════════════════════════════════════════════
   5. LOGIN — centrado + animaciones
══════════════════════════════════════════════════════ */

#login-screen {
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.login-card {
    animation: loginIn .55s var(--ease) both !important;
    text-align: center !important;
}

.login-logo {
    text-align: center !important;
}

.login-emblem {
    animation: scaleIn .6s var(--ease) .2s both !important;
}

.login-logo h2 {
    animation: fadeUp .5s var(--ease) .35s both !important;
}

.login-logo p {
    animation: fadeUp .5s var(--ease) .4s both !important;
}


/* Form items alineados izquierda dentro del card centrado */

#login-form-wrap,
#register-form-wrap {
    text-align: left !important;
    width: 100% !important;
}

#login-form-wrap .form-group {
    animation: fadeUp .4s var(--ease) both !important;
}

#login-form-wrap .form-group:nth-child(1) {
    animation-delay: .5s !important;
}

#login-form-wrap .form-group:nth-child(2) {
    animation-delay: .58s !important;
}

#login-form-wrap .form-group:nth-child(3) {
    animation-delay: .66s !important;
}


/* Botones del login CENTRADOS */

#login-form-wrap .btn,
#register-form-wrap .btn {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transition: all .2s !important;
}

#login-form-wrap .btn:nth-of-type(1) {
    animation: fadeUp .4s var(--ease) .74s both !important;
}

#login-form-wrap .btn:nth-of-type(2) {
    animation: fadeUp .4s var(--ease) .82s both !important;
}

#login-form-wrap .btn:nth-of-type(3) {
    animation: fadeUp .4s var(--ease) .9s both !important;
}

.btn-gold:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(184, 150, 62, .45) !important;
}

.btn:active {
    transform: scale(.97) !important;
}


/* Ojo del password — fijo */

.form-group div[style*="relative"] button[type="button"],
.form-group>div>button[type="button"] {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 15px !important;
    color: #bbb !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    animation: none !important;
    z-index: 3 !important;
    flex-shrink: 0 !important;
}

input[type="password"] {
    padding-right: 42px !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold-dark) !important;
    box-shadow: 0 0 0 3px rgba(184, 150, 62, .15) !important;
    outline: none !important;
}


/* ══════════════════════════════════════════════════════
   6. NAVBAR ADMIN — animaciones + responsive
══════════════════════════════════════════════════════ */

#navbar {
    animation: navDrop .4s var(--ease) both !important;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 60px !important;
}

.nav-links-row {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
}

.nav-links-row::-webkit-scrollbar {
    display: none !important;
}

.nav-btn {
    transition: all .18s !important;
}

.nav-btn:hover {
    background: rgba(212, 175, 55, .18) !important;
    color: var(--gold-light) !important;
}


/* Dropdowns */

.nav-dropdown {
    position: relative !important;
}

.dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    min-width: 210px !important;
    background: linear-gradient(135deg, #1a2a50, #0d1f3e) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5) !important;
    border: 1px solid rgba(212, 175, 55, .2) !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    animation: fadeUp .15s ease !important;
}

.dropdown-menu.open {
    display: block !important;
}

.dropdown-menu a {
    display: block !important;
    padding: 11px 16px !important;
    color: rgba(255, 255, 255, .85) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .15s !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, .05) !important;
}

.dropdown-menu a:last-child {
    border-bottom: none !important;
}

.dropdown-menu a:hover {
    background: rgba(212, 175, 55, .2) !important;
    color: var(--gold) !important;
}


/* ══════════════════════════════════════════════════════
   7. PANELES — dash-header sin fondo blanco + animaciones
══════════════════════════════════════════════════════ */

.dash-header {
    background: linear-gradient(135deg, var(--navy), var(--blue)) !important;
    border-bottom: none !important;
    animation: fadeIn .3s ease both !important;
}

.dash-header h1 {
    color: white !important;
    animation: slideRight .4s var(--ease) both !important;
}

.dash-header p {
    color: rgba(255, 255, 255, .7) !important;
}


/* dash-tabs — override con texto visible y múltiples filas */

.dash-tab:hover {
    background: rgba(255, 255, 255, .18) !important;
    color: white !important;
}

.dash-tab.active {
    background: var(--gold) !important;
    color: var(--navy) !important;
    border-color: var(--gold) !important;
    animation: scaleIn .2s var(--ease) !important;
}


/* Ocultar dash-header duplicado */


/* .role-home-banner + .dash-header — NO ocultar, contiene los tabs principales */


/* Role banner */

.role-home-banner {
    animation: fadeIn .4s ease both !important;
}

.role-home-inner {
    flex-wrap: wrap !important;
}

.role-avatar {
    animation: scaleIn .5s var(--ease) .1s both !important;
    transition: transform .2s !important;
}

.role-avatar:hover {
    transform: scale(1.06) !important;
}

.role-home-btns .btn {
    transition: all .2s !important;
}

.role-home-btns .btn:hover {
    transform: translateY(-2px) !important;
}


/* Secciones del panel */

.dash-section {
    animation: fadeUp .35s var(--ease) both !important;
}

.est-section {
    animation: fadeUp .35s var(--ease) both !important;
}

.padre-section {
    animation: fadeUp .35s var(--ease) both !important;
}


/* ══════════════════════════════════════════════════════
   8. KPI CARDS — animaciones
══════════════════════════════════════════════════════ */

.kpi-card {
    transition: all .22s ease !important;
    animation: fadeUp .4s var(--ease) both !important;
}

.kpi-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
}

.kpi-card:nth-child(1) {
    animation-delay: .05s !important;
}

.kpi-card:nth-child(2) {
    animation-delay: .1s !important;
}

.kpi-card:nth-child(3) {
    animation-delay: .15s !important;
}

.kpi-card:nth-child(4) {
    animation-delay: .2s !important;
}


/* ══════════════════════════════════════════════════════
   9. TABLAS — hover + animación de filas
══════════════════════════════════════════════════════ */

.data-table tbody tr {
    transition: background .15s !important;
    animation: fadeUp .3s ease both !important;
}

.data-table tbody tr:hover {
    background: rgba(212, 175, 55, .06) !important;
}

.data-table tbody tr:nth-child(1) {
    animation-delay: .05s !important;
}

.data-table tbody tr:nth-child(2) {
    animation-delay: .08s !important;
}

.data-table tbody tr:nth-child(3) {
    animation-delay: .11s !important;
}

.data-table tbody tr:nth-child(4) {
    animation-delay: .14s !important;
}

.data-table tbody tr:nth-child(5) {
    animation-delay: .17s !important;
}


/* ══════════════════════════════════════════════════════
   10. MODALES — animaciones (SIN bottom-sheet)
══════════════════════════════════════════════════════ */

.modal-overlay {
    display: none !important;
}

.modal-overlay.open {
    display: flex !important;
    animation: fadeIn .2s ease !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.modal-box {
    animation: scaleIn .3s var(--ease) !important;
}

.modal-close {
    transition: all .15s !important;
}

.modal-close:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border-radius: 6px !important;
}


/* ══════════════════════════════════════════════════════
   11. PERFIL — animaciones
══════════════════════════════════════════════════════ */

.perfil-header {
    animation: fadeIn .4s ease both !important;
}

.perfil-avatar {
    animation: scaleIn .5s var(--ease) .1s both !important;
    transition: transform .2s !important;
}

.perfil-avatar:hover {
    transform: scale(1.06) !important;
}

.perfil-row {
    transition: background .15s !important;
    animation: slideRight .3s ease both !important;
}

.perfil-row:hover {
    background: rgba(212, 175, 55, .05) !important;
}

.perfil-row:nth-child(1) {
    animation-delay: .1s !important;
}

.perfil-row:nth-child(2) {
    animation-delay: .14s !important;
}

.perfil-row:nth-child(3) {
    animation-delay: .18s !important;
}

.perfil-row:nth-child(4) {
    animation-delay: .22s !important;
}

.perfil-row:nth-child(5) {
    animation-delay: .26s !important;
}

.perfil-row:nth-child(6) {
    animation-delay: .30s !important;
}


/* ══════════════════════════════════════════════════════
   12. CLASES FALTANTES — layout y componentes
══════════════════════════════════════════════════════ */

.cat-tab-pane {
    display: none;
}

.pagos-tab-content {
    display: none;
}

.about-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
}

.galeria-placeholder {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px;
    color: #bbb;
    border: 2px dashed #ddd;
    border-radius: 14px;
    font-size: 14px;
}

.home-quick-card {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.home-quick-card:hover {
    background: rgba(212, 175, 55, .2);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.home-quick-card>span {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, .75);
}

.faq-item {
    background: white;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all .2s;
}

.faq-item:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.faq-pregunta {
    padding: 16px 20px;
    font-weight: 700;
    color: var(--navy);
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-arrow {
    transition: transform .25s;
    color: var(--gold);
    font-size: 12px;
}

.faq-respuesta {
    display: none;
    padding: 0 20px 16px;
    color: #555;
    font-size: 13px;
    line-height: 1.7;
    border-top: 1px solid #f0f0f0;
}

.faq-item.open .faq-respuesta {
    display: block;
    animation: fadeUp .25s ease both;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.noticia-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .07);
    border: 1px solid #eee;
    transition: all .2s;
    animation: fadeUp .4s ease both;
}

.noticia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}

.noticia-img {
    width: 100%;
    height: 140px;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.noticia-body {
    padding: 16px;
}

.noticia-body h4 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    font-size: 15px;
    margin: 0 0 6px;
}

.noticia-body p {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 8px;
}

.noticia-fecha {
    font-size: 11px;
    color: #bbb;
    font-weight: 700;
    text-transform: uppercase;
}

.docente-card {
    background: white;
    border-radius: 16px;
    padding: 22px 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
    border: 1px solid #eee;
    transition: all .2s;
    animation: fadeUp .4s ease both;
}

.docente-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}

.docente-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 10px;
    border: 3px solid var(--gold);
}

.docente-nombre {
    font-weight: 800;
    color: var(--navy);
    font-size: 14px;
    margin-bottom: 3px;
}

.docente-materia {
    font-size: 12px;
    color: var(--gold-dark);
    font-weight: 700;
}

.docente-grado {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}

.comunicado-card {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    border-left: 4px solid var(--navy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    animation: slideRight .3s ease both;
    transition: all .2s;
}

.comunicado-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.comunicado-icon {
    font-size: 26px;
    flex-shrink: 0;
}

.comunicado-body h4 {
    font-weight: 800;
    color: var(--navy);
    font-size: 14px;
    margin: 0 0 4px;
}

.comunicado-body p {
    color: #555;
    font-size: 13px;
    margin: 0 0 4px;
    line-height: 1.5;
}

.comunicado-fecha {
    font-size: 11px;
    color: #bbb;
    font-weight: 700;
}


/* Inputs de config */

.cal-evento-in,
.cal-fecha-in,
.inst-desc-in,
.inst-title-in,
.inst-icon-in,
.nivel-desc-in,
.nivel-title-in,
.nivel-icon-in,
.maest-cargo-in,
.maest-desc-in,
.maest-nombre-in,
.test-autor-in,
.test-rol-in,
.test-txt-in {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    box-sizing: border-box;
    transition: border .2s;
}

.cal-evento-in:focus,
.inst-title-in:focus,
.nivel-title-in:focus,
.maest-nombre-in:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(184, 150, 62, .12);
}

.nivel-desc-in,
.test-txt-in,
.maest-desc-in {
    resize: vertical;
    min-height: 60px;
}


/* Backdrop dropdowns */

#dropdown-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 99997;
}

#dropdown-backdrop.show {
    display: block;
}


/* ══════════════════════════════════════════════════════
   13. INSTALACIONES + SECCIONES HOME
══════════════════════════════════════════════════════ */

.instalacion-card {
    transition: all .22s ease !important;
    animation: fadeUp .4s ease both !important;
}

.instalacion-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1) !important;
}

.cal-card {
    transition: all .2s ease !important;
}

.cal-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .08) !important;
}

.section-title h2 {
    animation: slideRight .5s var(--ease) both !important;
}

.divider {
    animation: fadeIn .6s ease .3s both !important;
}


/* ══════════════════════════════════════════════════════
   14. RESPONSIVE TOTAL
══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    #top-bar-public {
        display: none !important;
    }
    .pub-nav-links {
        display: none !important;
    }
    #public-navbar>div:last-of-type {
        display: none !important;
    }
    #nav-hamburger {
        display: flex !important;
    }
    #hero {
        min-height: 82vh !important;
        padding: 72px 18px 44px !important;
    }
    #hero h1 {
        font-size: clamp(28px, 8vw, 38px) !important;
    }
    #hero h1 span {
        font-size: clamp(32px, 9.5vw, 44px) !important;
    }
    .hero-sub {
        font-size: 14px !important;
        margin-bottom: 24px !important;
    }
    .hero-badge {
        font-size: 9.5px !important;
        padding: 5px 14px !important;
    }
    .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .hero-btns button,
    .hero-btns a {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
    }
    .stats-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        padding: 0 !important;
        margin-top: 28px !important;
    }
    .stat-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
        padding: 14px 10px !important;
    }
    .stat-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, .08) !important;
    }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none !important;
    }
    .section {
        padding: 40px 16px !important;
    }
    #navbar {
        flex-wrap: wrap !important;
        padding: 6px 10px !important;
        height: auto !important;
        min-height: auto !important;
    }
    .nav-logo-text span {
        display: none !important;
    }
    .nav-links-row {
        order: 3 !important;
        width: 100% !important;
        padding: 4px 0 8px !important;
    }
    .nav-btn {
        font-size: 11px !important;
        padding: 6px 9px !important;
    }
    .user-pill span:not(.role-badge) {
        display: none !important;
    }
    .user-pill {
        padding: 4px 10px !important;
    }
    #btn-logout {
        font-size: 11px !important;
        padding: 5px 8px !important;
    }
    /* Dropdowns en móvil — centrados en pantalla */
    .nav-dropdown {
        position: static !important;
    }
    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 280px !important;
        max-width: 90vw !important;
    }
    .dropdown-menu a {
        font-size: 15px !important;
        padding: 14px 20px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }
    .role-home-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .role-home-btns {
        margin-left: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .role-home-btns .btn {
        font-size: 12px !important;
        padding: 10px 8px !important;
        display: flex !important;
        justify-content: center !important;
    }
    .dash-tab {
        font-size: 11px !important;
        padding: 7px 11px !important;
    }
    .dash-section {
        padding: 14px !important;
    }
    /* Modales — centrados en móvil también (NO bottom-sheet) */
    .modal-overlay.open {
        align-items: center !important;
        padding: 16px !important;
    }
    .modal-box {
        border-radius: 16px !important;
        max-width: calc(100% - 32px) !important;
        width: 100% !important;
        margin: 0 !important;
        max-height: 88vh !important;
    }
    .login-card {
        padding: 22px 18px !important;
        max-width: 100% !important;
    }
    #portal-fab {
        bottom: 16px !important;
        right: 14px !important;
    }
    .form-row {
        grid-template-columns: 1fr !important;
    }
    .valor-card {
        flex: 0 1 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
    div:has(>.instalacion-card) {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .perfil-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
    }
    .cards-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
}

@media (max-width: 480px) {
    #hero {
        padding: 65px 14px 38px !important;
    }
    #hero h1 {
        font-size: clamp(24px, 9vw, 32px) !important;
    }
    #hero h1 span {
        font-size: clamp(28px, 10vw, 36px) !important;
    }
    .hero-btns button,
    .hero-btns a {
        max-width: 100% !important;
    }
    .role-home-btns {
        grid-template-columns: 1fr !important;
    }
    .login-card {
        padding: 18px 14px !important;
    }
    #portal-fab-label {
        display: none !important;
    }
    .valor-card {
        flex: 0 1 100% !important;
        max-width: 100% !important;
    }
    div:has(>.instalacion-card) {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .cards-row {
        grid-template-columns: 1fr !important;
    }
    .stat-item .num {
        font-size: 22px !important;
    }
}

@media (max-width: 390px) {
    #hero h1 {
        font-size: 25px !important;
    }
    #hero h1 span {
        font-size: 29px !important;
    }
    .nav-btn {
        font-size: 10px !important;
        padding: 5px 7px !important;
    }
    .dash-tab {
        font-size: 10px !important;
        padding: 6px 8px !important;
    }
    .login-card {
        padding: 16px 12px !important;
    }
}

@media (hover:none) and (pointer:coarse) {
    .btn,
    .dash-tab,
    .pub-nav-links a,
    .nav-btn,
    .dropdown-menu a {
        min-height: 40px;
    }
    .valor-card:hover,
    .instalacion-card:hover,
    .kpi-card:hover {
        transform: none !important;
    }
}


/* ── FIX BARRA BLANCA DEFINITIVO ── */

#home-role-section,
#home-role-panel {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

#home-role-section:empty,
#home-role-panel:empty,
#home-role-section:not(:has(*)),
#home-role-panel:not(:has(*)) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}


/* Cuando el page-home muestra el hero directamente sin gap */

#page-home>#hero {
    margin-bottom: 0 !important;
}

#page-home>div:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ── FIX DROPDOWNS NAVBAR ── */


/* Asegurar que los dropdowns sean clickeables */


/* ══════════════════════════════════════════════════
   FIX DEFINITIVO — Dropdowns + dash-header + tabs
══════════════════════════════════════════════════ */


/* Dropdowns DESKTOP — position absolute */

.nav-dropdown {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

.dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    min-width: 215px !important;
    background: linear-gradient(135deg, #1a2a50, #0d1f3e) !important;
    border-radius: 12px !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .55) !important;
    border: 1px solid rgba(212, 175, 55, .25) !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    transform: none !important;
    width: auto !important;
}

.dropdown-menu.open {
    display: block !important;
}

.dropdown-menu a {
    display: block !important;
    padding: 11px 18px !important;
    color: rgba(255, 255, 255, .85) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background .15s !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, .06) !important;
    min-height: 40px !important;
    display: flex !important;
    align-items: center !important;
}

.dropdown-menu a:last-child {
    border-bottom: none !important;
}

.dropdown-menu a:hover {
    background: rgba(212, 175, 55, .22) !important;
    color: #f0d060 !important;
}


/* dash-header color definitivo */

.dash-header {
    background: linear-gradient(135deg, #0f1c3a 0%, #1a3a6e 100%) !important;
    border-bottom: 3px solid #d4af37 !important;
    padding: 22px 24px 0 !important;
    color: white !important;
}

.dash-header h1 {
    color: white !important;
    font-size: 21px !important;
}

.dash-header p {
    color: rgba(255, 255, 255, .6) !important;
}


/* dash-tabs: múltiples filas con texto visible */

.dash-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    gap: 6px !important;
    margin-top: 16px !important;
    padding-bottom: 14px !important;
    scrollbar-width: none !important;
}

.dash-tab {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 7px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, .08) !important;
    color: rgba(255, 255, 255, .85) !important;
    border: 1px solid rgba(255, 255, 255, .15) !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all .2s !important;
    font-family: 'Nunito', sans-serif !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.dash-tab:hover {
    background: rgba(255, 255, 255, .18) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, .3) !important;
}

.dash-tab.active {
    background: #d4af37 !important;
    color: #0f1c3a !important;
    border-color: #d4af37 !important;
    font-weight: 800 !important;
}


/* Dropdowns móvil */

@media (max-width: 768px) {
    .nav-dropdown {
        position: static !important;
    }
    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 82vw !important;
        max-width: 300px !important;
    }
}


/* ── Responsive: nav-center en mobile ── */

@media (max-width: 768px) {
    .nav-center {
        position: static;
        transform: none;
        flex: 1;
        padding: 2px 8px;
    }
    .nav-center-meta {
        display: none;
    }
    .nav-escudo {
        font-size: 16px;
    }
    .nav-title-text {
        font-size: 13px;
    }
}

@media (max-width: 500px) {
    .nav-center {
        display: none;
    }
}


/* ══════════════════════════════════════════════════
   FIX FINAL DEFINITIVO — dash-header y tabs
══════════════════════════════════════════════════ */

#page-admin .dash-header,
#page-profesor .dash-header,
#page-estudiante .dash-header,
#page-padre .dash-header,
#page-enfermeria .dash-header,
.dash-header {
    background: linear-gradient(135deg, #0f1c3a 0%, #1a3a6e 100%) !important;
    border-bottom: 3px solid #d4af37 !important;
    padding: 20px 24px 0 !important;
    color: white !important;
}

.dash-header h1 {
    color: white !important;
    font-family: 'Playfair Display', serif !important;
    font-size: 22px !important;
    margin: 0 0 4px !important;
}

.dash-header p {
    color: rgba(255, 255, 255, .65) !important;
    font-size: 13px !important;
    margin: 0 0 14px !important;
}

.dash-tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-top: 14px !important;
    padding-bottom: 14px !important;
}

.dash-tab {
    background: rgba(255, 255, 255, .1) !important;
    color: rgba(255, 255, 255, .9) !important;
    border: 1px solid rgba(255, 255, 255, .2) !important;
    border-radius: 20px !important;
    padding: 6px 15px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: 'Nunito', sans-serif !important;
    white-space: nowrap !important;
    transition: all .2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.dash-tab:hover {
    background: rgba(255, 255, 255, .22) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, .4) !important;
}

.dash-tab.active {
    background: #d4af37 !important;
    color: #0f1c3a !important;
    border-color: #d4af37 !important;
    font-weight: 800 !important;
}


/* ══════════════════════════════════════════════════════════
   FIX TOTAL FINAL — Tabs visibles + Dropdowns funcionando
══════════════════════════════════════════════════════════ */


/* TABS: fondo azul cielo para ver los nombres */

.dash-tab {
    background: rgba(100, 160, 255, .15) !important;
    color: #e0eeff !important;
    border: 1px solid rgba(100, 160, 255, .3) !important;
    border-radius: 20px !important;
    padding: 6px 15px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: 'Nunito', sans-serif !important;
    white-space: nowrap !important;
    transition: all .2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.dash-tab:hover {
    background: rgba(100, 160, 255, .3) !important;
    color: white !important;
    border-color: rgba(100, 160, 255, .5) !important;
}

.dash-tab.active {
    background: #d4af37 !important;
    color: #0f1c3a !important;
    border-color: #d4af37 !important;
    font-weight: 800 !important;
}


/* DROPDOWNS: fix completo */

#navbar {
    overflow: visible !important;
}

.nav-links,
.nav-links-row {
    overflow: visible !important;
}

.nav-dropdown {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    overflow: visible !important;
}

.dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    margin-top: 4px !important;
    min-width: 220px !important;
    background: linear-gradient(160deg, #1a2a50 0%, #0d1f3e 100%) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .6) !important;
    border: 1px solid rgba(212, 175, 55, .3) !important;
    z-index: 999999 !important;
    overflow: hidden !important;
    transform: none !important;
    pointer-events: all !important;
}

.dropdown-menu.open {
    display: block !important;
}

.dropdown-menu a {
    display: flex !important;
    align-items: center !important;
    padding: 11px 18px !important;
    color: rgba(255, 255, 255, .9) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, .07) !important;
    transition: background .15s !important;
    min-height: 42px !important;
    white-space: nowrap !important;
}

.dropdown-menu a:last-child {
    border-bottom: none !important;
}

.dropdown-menu a:hover {
    background: rgba(212, 175, 55, .2) !important;
    color: #f0d060 !important;
    padding-left: 22px !important;
}


/* Móvil: dropdown centrado */

@media (max-width: 768px) {
    .nav-dropdown {
        position: static !important;
    }
    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin-top: 0 !important;
        width: 85vw !important;
        max-width: 300px !important;
    }
}


/* ══ TABS VISIBLES — texto negro sobre fondo claro ══ */

.dash-tab {
    background: #f0f4ff !important;
    color: #0f1c3a !important;
    border: 1.5px solid #c5d0e8 !important;
    border-radius: 20px !important;
    padding: 6px 15px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    font-family: 'Nunito', sans-serif !important;
    white-space: nowrap !important;
    transition: all .2s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.dash-tab:hover {
    background: #d4e3ff !important;
    color: #0f1c3a !important;
    border-color: #7ca0e0 !important;
}

.dash-tab.active {
    background: #d4af37 !important;
    color: #0f1c3a !important;
    border-color: #d4af37 !important;
    font-weight: 800 !important;
}


/* ╔══════════════════════════════════════════════════════════════╗
   ║   RESPONSIVE MÓVIL COMPLETO — iPhone 8, Android, Tablets    ║
   ║   Breakpoints: 390px | 480px | 600px | 768px | 1024px       ║
   ╚══════════════════════════════════════════════════════════════╝ */


/* ── BASE MÓVIL ── */

@media (max-width: 768px) {
    /* ══ TOP BAR oculto ══ */
    #top-bar-public {
        display: none !important;
    }
    /* ══ NAVBAR PÚBLICO más grande y accesible ══ */
    #public-navbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 999 !important;
        padding: 10px 16px !important;
        height: auto !important;
        min-height: 62px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-shadow: 0 3px 16px rgba(0, 0, 0, .15) !important;
    }
    .pub-nav-links {
        display: none !important;
    }
    #pub-nav-btns {
        display: none !important;
    }
    #nav-hamburger {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(15, 28, 58, .08) !important;
        border: 1.5px solid rgba(15, 28, 58, .15) !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
    }
    #nav-hamburger span {
        width: 20px !important;
        height: 2.5px !important;
        background: var(--navy) !important;
    }
    /* Logo en móvil */
    #public-navbar .nav-logo-text h2 {
        font-size: 15px !important;
    }
    #public-navbar .nav-logo-text span {
        display: none !important;
    }
    #public-navbar .nav-logo-img {
        width: 38px !important;
        height: 38px !important;
    }
    /* ══ MENÚ MÓVIL ══ */
    #mobile-menu {
        position: fixed !important;
        inset: 0 !important;
        background: linear-gradient(160deg, #0a1628 0%, #0f1c3a 50%, #1a3a6e 100%) !important;
        z-index: 9990 !important;
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 24px 20px !important;
        gap: 0 !important;
        overflow-y: auto !important;
    }
    #mobile-menu.open {
        display: flex !important;
    }
    #mobile-close-btn {
        position: absolute !important;
        top: 18px !important;
        right: 18px !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, .12) !important;
        border: none !important;
        color: white !important;
        font-size: 20px !important;
        border-radius: 50% !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #mobile-menu a {
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 300px !important;
        padding: 14px 20px !important;
        margin: 3px 0 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: rgba(255, 255, 255, .9) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, .08) !important;
        cursor: pointer !important;
        transition: background .2s !important;
        min-height: 50px !important;
    }
    #mobile-menu a:hover,
    #mobile-menu a:active {
        background: rgba(212, 175, 55, .2) !important;
        color: #f0d060 !important;
        border-color: rgba(212, 175, 55, .3) !important;
    }
    #mobile-menu .mob-btns {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 300px !important;
        margin-top: 16px !important;
    }
    #mobile-menu .mob-btns button {
        width: 100% !important;
        padding: 15px !important;
        border-radius: 12px !important;
        font-size: 15px !important;
        font-weight: 800 !important;
        cursor: pointer !important;
        border: none !important;
        min-height: 50px !important;
        font-family: 'Nunito', sans-serif !important;
    }
    #mobile-menu .mob-login {
        background: white !important;
        color: var(--navy) !important;
    }
    #mobile-menu .mob-register {
        background: var(--gold) !important;
        color: var(--navy) !important;
    }
    /* ══ BARRA BLANCA — eliminada ══ */
    #home-role-section,
    #home-role-panel {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    /* ══ HERO ══ */
    #hero {
        min-height: 82vh !important;
        padding: 72px 18px 40px !important;
    }
    #hero h1 {
        font-size: clamp(26px, 7.5vw, 38px) !important;
    }
    #hero h1 span {
        font-size: clamp(30px, 9vw, 44px) !important;
    }
    .hero-sub {
        font-size: 14px !important;
        margin-bottom: 22px !important;
    }
    .hero-badge {
        font-size: 9px !important;
        letter-spacing: 1px !important;
    }
    .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .hero-btns button,
    .hero-btns a {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
        min-height: 48px !important;
        font-size: 14px !important;
    }
    /* Stats en grid 2x2 */
    .stats-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0 !important;
        padding: 0 !important;
        margin-top: 24px !important;
    }
    .stat-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
        padding: 16px 10px !important;
    }
    .stat-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, .08) !important;
    }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none !important;
    }
    /* ══ NAVBAR ADMIN ══ */
    #navbar {
        flex-wrap: wrap !important;
        height: auto !important;
        min-height: auto !important;
        padding: 8px 12px !important;
        gap: 6px !important;
    }
    .nav-logo-text span {
        display: none !important;
    }
    .nav-logo-img {
        width: 34px !important;
        height: 34px !important;
    }
    .nav-links-row {
        order: 3 !important;
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding: 4px 0 8px !important;
        gap: 4px !important;
        scrollbar-width: none !important;
    }
    .nav-links-row::-webkit-scrollbar {
        display: none !important;
    }
    .nav-btn {
        font-size: 12px !important;
        padding: 8px 12px !important;
        min-height: 38px !important;
    }
    .user-pill {
        padding: 4px 10px !important;
    }
    .user-pill span:not(.role-badge) {
        display: none !important;
    }
    #btn-logout {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    .notif-btn {
        font-size: 18px !important;
        padding: 6px !important;
    }
    /* Dropdowns en móvil: centrados y grandes */
    .nav-dropdown {
        position: static !important;
    }
    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;
        width: 85vw !important;
        max-width: 310px !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
    .dropdown-menu a {
        font-size: 15px !important;
        padding: 15px 20px !important;
        min-height: 50px !important;
    }
    /* ══ PANEL ADMIN / PERFILES ══ */
    .role-home-banner {
        padding: 16px !important;
    }
    .role-home-inner {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .role-home-btns {
        margin-left: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .role-home-btns .btn {
        font-size: 12px !important;
        padding: 10px 8px !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        min-height: 42px !important;
    }
    .dash-header {
        padding: 14px 14px 0 !important;
    }
    .dash-header h1 {
        font-size: 18px !important;
    }
    .dash-tabs {
        gap: 5px !important;
        padding-bottom: 12px !important;
    }
    .dash-tab {
        font-size: 11.5px !important;
        padding: 6px 12px !important;
    }
    .dash-section {
        padding: 14px !important;
    }
    /* Tablas scrollables */
    .table-wrap,
    .dash-section>div[style*="overflow"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    table {
        min-width: 480px !important;
        font-size: 12px !important;
    }
    table th,
    table td {
        padding: 8px 10px !important;
        white-space: nowrap !important;
    }
    /* Formularios */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    /* Modales */
    .modal-overlay.open {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .modal-box {
        border-radius: 20px 20px 0 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
    }
    /* Excepto modales pequeños */
    #modal-profesor-login.modal-overlay.open {
        align-items: center !important;
        padding: 16px !important;
    }
    #modal-profesor-login .modal-box {
        border-radius: 16px !important;
        max-width: calc(100% - 32px) !important;
    }
    /* Login */
    .login-card {
        padding: 22px 18px !important;
        max-width: 100% !important;
        border-radius: 18px !important;
    }
    /* KPI Cards */
    .cards-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .kpi-card {
        padding: 14px 12px !important;
    }
    .kpi-num {
        font-size: 22px !important;
    }
    /* Secciones */
    .section {
        padding: 36px 14px !important;
    }
    .section-title h2 {
        font-size: clamp(20px, 5vw, 28px) !important;
    }
    /* Valor cards */
    div:has(>.valor-card) {
        gap: 12px !important;
    }
    .valor-card {
        flex: 0 1 calc(50% - 8px) !important;
        max-width: calc(50% - 6px) !important;
    }
    /* FAB */
    #portal-fab {
        bottom: 16px !important;
        right: 14px !important;
        z-index: 8998 !important;
    }
    #portal-fab button {
        padding: 11px 16px !important;
        font-size: 13px !important;
    }
    /* ══ BOT — adaptado a móvil ══ */
    #chat-widget,
    #bot-fab-padre,
    #bot-fab-profe,
    #bot-fab-admin,
    #bot-fab-enfer {
        bottom: 80px !important;
        right: 14px !important;
    }
    /* Ventana del bot: ancho de pantalla en móvil */
    #chat-window,
    #bfp-window,
    #bfpr-window,
    #bfa-window,
    #bfe-window {
        width: calc(100vw - 28px) !important;
        max-width: 340px !important;
        height: 420px !important;
        border-radius: 16px !important;
    }
    /* Área de mensajes */
    #chat-messages,
    #bfp-msgs,
    #bfpr-msgs,
    #bfa-msgs,
    #bfe-msgs {
        height: 260px !important;
        padding: 10px !important;
    }
    /* Botón del bot */
    #chat-btn,
    #bfp-btn,
    #bfpr-btn,
    #bfa-btn,
    #bfe-btn {
        width: 52px !important;
        height: 52px !important;
        font-size: 22px !important;
    }
    /* Quick replies scrollables */
    #chat-quick-replies,
    #bfp-qr,
    #bfpr-qr,
    #bfa-qr,
    #bfe-qr {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        scrollbar-width: none !important;
    }
}


/* ── iPhone 8 y similares (375-390px) ── */

@media (max-width: 390px) {
    #hero h1 {
        font-size: 25px !important;
    }
    #hero h1 span {
        font-size: 29px !important;
    }
    .hero-btns button,
    .hero-btns a {
        max-width: 100% !important;
        font-size: 13px !important;
    }
    .login-card {
        padding: 18px 14px !important;
    }
    .nav-btn {
        font-size: 11px !important;
        padding: 7px 9px !important;
    }
    .dash-tab {
        font-size: 11px !important;
        padding: 5px 10px !important;
    }
    .role-home-btns {
        grid-template-columns: 1fr !important;
    }
    .cards-row {
        grid-template-columns: 1fr !important;
    }
    .valor-card {
        flex: 0 1 100% !important;
        max-width: 100% !important;
    }
    #portal-fab-label {
        display: none !important;
    }
    #portal-fab {
        bottom: 12px !important;
        right: 10px !important;
    }
    .notif-panel {
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
    }
    #chat-window,
    #bfp-window,
    #bfpr-window,
    #bfa-window,
    #bfe-window {
        width: calc(100vw - 20px) !important;
        height: 380px !important;
    }
}


/* ── Tablet pequeña (480-768px) ── */

@media (min-width: 481px) and (max-width: 768px) {
    .valor-card {
        flex: 0 1 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
    .hero-btns {
        flex-direction: row !important;
    }
    .hero-btns button,
    .hero-btns a {
        max-width: 220px !important;
    }
    .cards-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* ── Tablet (768-1024px) ── */

@media (min-width: 769px) and (max-width: 1024px) {
    .pub-nav-links a {
        font-size: 11.5px !important;
        padding: 5px 7px !important;
    }
    #hero {
        min-height: 80vh !important;
    }
    .dash-tab {
        font-size: 12px !important;
        padding: 6px 12px !important;
    }
}


/* ── Touch: áreas mínimas de 44px ── */

@media (hover: none) and (pointer: coarse) {
    .btn,
    button,
    .dash-tab,
    .pub-nav-links a,
    .dropdown-menu a {
        min-height: 44px;
    }
    .nav-btn {
        min-height: 40px;
    }
    .valor-card:hover,
    .instalacion-card:hover,
    .kpi-card:hover {
        transform: none !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE MÓVIL TOTAL — iPhone 8 (375px) + tablets + todos
   Navbar grande · Sin barra blanca · Panel accesible · Bot ajustado
═══════════════════════════════════════════════════════════════════ */


/* ── Variables móvil ── */

:root {
    --tap: 48px;
    /* tamaño mínimo toque */
    --pad-m: 14px;
    /* padding móvil */
}


/* ══════════ NAVBAR PÚBLICO — MÓVIL ══════════ */

@media (max-width: 768px) {
    #top-bar-public {
        display: none !important;
    }
    #public-navbar {
        padding: 10px 16px !important;
        min-height: 60px !important;
        gap: 10px !important;
        background: white !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, .12) !important;
    }
    #public-navbar .nav-logo-img {
        width: 40px !important;
        height: 40px !important;
    }
    #public-navbar .nav-logo-text h2 {
        font-size: 15px !important;
        font-weight: 800 !important;
    }
    #public-navbar .nav-logo-text span {
        display: none !important;
    }
    .pub-nav-links {
        display: none !important;
    }
    #pub-nav-btns {
        display: none !important;
    }
    #nav-hamburger {
        display: flex !important;
        flex-direction: column !important;
        gap: 5px !important;
        background: var(--navy) !important;
        border: none !important;
        border-radius: 10px !important;
        padding: 10px !important;
        cursor: pointer !important;
        width: 46px !important;
        height: 46px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }
    #nav-hamburger span {
        background: white !important;
        width: 20px !important;
        height: 2px !important;
    }
}


/* ── Menú móvil fullscreen ── */

#mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: #0a1628;
    z-index: 9600;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 24px 40px;
    overflow-y: auto;
    gap: 0;
}

#mobile-menu.open {
    display: flex !important;
}

#mobile-close-btn {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, .1) !important;
    border: none !important;
    color: white !important;
    font-size: 20px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9601 !important;
}

#mobile-menu>div:first-of-type {
    font-size: 22px !important;
    margin-bottom: 8px !important;
    color: var(--gold) !important;
}

#mobile-menu a {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 320px !important;
    padding: 14px 20px !important;
    margin-bottom: 6px !important;
    border-radius: 14px !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, .06) !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    cursor: pointer !important;
    min-height: var(--tap) !important;
    transition: background .2s !important;
    text-decoration: none !important;
}

#mobile-menu a:hover,
#mobile-menu a:active {
    background: rgba(212, 175, 55, .2) !important;
    color: #f0d060 !important;
}

#mobile-menu .mob-btns {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 320px !important;
    margin-top: 16px !important;
}

#mobile-menu .mob-btns button {
    padding: 15px !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
    border: none !important;
    font-family: 'Nunito', sans-serif !important;
    min-height: var(--tap) !important;
}

.mob-login {
    background: white !important;
    color: var(--navy) !important;
}

.mob-register {
    background: var(--gold) !important;
    color: var(--navy) !important;
}


/* ══════════ BARRA BLANCA ELIMINADA ══════════ */

#home-role-section,
#home-role-panel {
    min-height: 0 !important;
}


/* ══════════ HERO MÓVIL ══════════ */

@media (max-width: 768px) {
    #hero {
        min-height: 88vh !important;
        padding: 70px 18px 40px !important;
    }
    #hero h1 {
        font-size: clamp(26px, 7.5vw, 38px) !important;
    }
    #hero h1 span {
        font-size: clamp(30px, 9vw, 44px) !important;
    }
    .hero-sub {
        font-size: 14px !important;
    }
    .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .hero-btns button,
    .hero-btns a {
        width: 100% !important;
        max-width: 290px !important;
        min-height: var(--tap) !important;
        justify-content: center !important;
    }
    .stats-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        padding: 0 !important;
        margin-top: 24px !important;
    }
    .stat-item {
        padding: 16px 10px !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
    }
    .stat-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, .08) !important;
    }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none !important;
    }
}


/* ══════════ NAVBAR ADMIN MÓVIL ══════════ */

@media (max-width: 768px) {
    #navbar {
        flex-wrap: wrap !important;
        padding: 8px 12px !important;
        height: auto !important;
        min-height: auto !important;
        gap: 6px !important;
    }
    #navbar .nav-logo-img {
        width: 34px !important;
        height: 34px !important;
    }
    #navbar .nav-logo-text h2 {
        font-size: 13px !important;
    }
    #navbar .nav-logo-text span {
        display: none !important;
    }
    /* Links en fila scrollable */
    .nav-links,
    .nav-links-row {
        order: 3 !important;
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding: 4px 0 8px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .nav-links::-webkit-scrollbar,
    .nav-links-row::-webkit-scrollbar {
        display: none !important;
    }
    .nav-btn {
        font-size: 11.5px !important;
        padding: 7px 10px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        min-height: 36px !important;
    }
    /* User pill compacto */
    .user-pill span:not(.role-badge) {
        display: none !important;
    }
    .user-pill {
        padding: 5px 10px !important;
    }
    #btn-logout {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    /* Dropdowns centrados en móvil */
    .nav-dropdown {
        position: static !important;
    }
    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 85vw !important;
        max-width: 300px !important;
        margin-top: 0 !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
    }
    .dropdown-menu a {
        font-size: 15px !important;
        padding: 14px 20px !important;
        min-height: 48px !important;
    }
}


/* ══════════ PANEL ADMIN MÓVIL — ACCESIBLE ══════════ */

@media (max-width: 768px) {
    /* Role banner */
    .role-home-banner {
        padding: 16px !important;
    }
    .role-home-inner {
        flex-direction: column !important;
        gap: 12px !important;
    }
    .role-home-btns {
        margin-left: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .role-home-btns .btn {
        font-size: 12px !important;
        padding: 10px 8px !important;
        text-align: center !important;
        justify-content: center !important;
        display: flex !important;
        min-height: 42px !important;
    }
    /* dash-header */
    .dash-header {
        padding: 14px 14px 0 !important;
    }
    .dash-header h1 {
        font-size: 18px !important;
    }
    .dash-tabs {
        gap: 5px !important;
        padding-bottom: 12px !important;
    }
    .dash-tab {
        font-size: 11.5px !important;
        padding: 6px 12px !important;
        min-height: 34px !important;
    }
    /* Secciones */
    .dash-section {
        padding: 14px !important;
    }
    .cards-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .kpi-card {
        padding: 14px 12px !important;
    }
    .kpi-num {
        font-size: 22px !important;
    }
    .kpi-label {
        font-size: 10px !important;
    }
    /* Tablas scrollables */
    .table-wrap,
    div[style*="overflow-x:auto"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    table {
        min-width: 480px !important;
        font-size: 12px !important;
    }
    table th,
    table td {
        padding: 8px 10px !important;
        white-space: nowrap !important;
    }
    /* Modales bottom-sheet en móvil */
    .modal-overlay.open {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .modal-box {
        border-radius: 20px 20px 0 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
    }
    /* Formularios */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    .cfg-section {
        padding: 14px !important;
    }
}


/* ══════════ BOT — ADAPTADO A TODOS LOS TAMAÑOS ══════════ */


/* Desktop normal */

#chat-widget,
#bot-fab-padre,
#bot-fab-profe,
#bot-fab-admin,
#bot-fab-enfer {
    right: 24px !important;
    bottom: 90px !important;
}


/* Ventanas del bot — tamaño adaptable */

#bfp-window,
#bfpr-window,
#bfa-window,
#bfe-window,
div[id$="-window"][style*="width:340px"] {
    width: 340px !important;
    height: 480px !important;
}

@media (max-width: 480px) {
    /* Bot ocupa casi toda la pantalla en móvil */
    #chat-widget,
    #bot-fab-padre,
    #bot-fab-profe,
    #bot-fab-admin,
    #bot-fab-enfer {
        right: 10px !important;
        bottom: 80px !important;
    }
    #bfp-window,
    #bfpr-window,
    #bfa-window,
    #bfe-window {
        position: fixed !important;
        bottom: 80px !important;
        right: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 70vh !important;
        border-radius: 20px 20px 0 0 !important;
        margin-bottom: 0 !important;
    }
    /* Chat widget estudiantes */
    #chat-window {
        position: fixed !important;
        bottom: 72px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 65vh !important;
        border-radius: 20px 20px 0 0 !important;
    }
    /* FAB botones más pequeños y accesibles */
    #bfp-btn,
    #bfpr-btn,
    #bfa-btn,
    #bfe-btn,
    button[id$="-btn"][style*="width:58px"] {
        width: 52px !important;
        height: 52px !important;
        font-size: 22px !important;
    }
    #portal-fab {
        bottom: 12px !important;
        right: 10px !important;
    }
    #portal-fab button {
        font-size: 13px !important;
        padding: 10px 16px !important;
    }
    #portal-fab-label {
        display: none !important;
    }
}


/* ══════════ LOGIN MÓVIL ══════════ */

@media (max-width: 480px) {
    .login-card {
        padding: 20px 16px !important;
        border-radius: 16px !important;
    }
    .login-logo h2 {
        font-size: 15px !important;
    }
    .form-group input,
    .form-group select {
        font-size: 16px !important;
    }
    /* 16px evita zoom en iOS */
}


/* ══════════ iPhone 8 específico (375px) ══════════ */

@media (max-width: 390px) {
    #hero {
        padding: 62px 14px 36px !important;
    }
    #hero h1 {
        font-size: 25px !important;
    }
    #hero h1 span {
        font-size: 29px !important;
    }
    .hero-badge {
        font-size: 9px !important;
        padding: 4px 12px !important;
    }
    .dash-tab {
        font-size: 10.5px !important;
        padding: 5px 10px !important;
    }
    .cards-row {
        grid-template-columns: 1fr !important;
    }
    .role-home-btns {
        grid-template-columns: 1fr !important;
    }
    .stat-item .num {
        font-size: 20px !important;
    }
    .kpi-num {
        font-size: 20px !important;
    }
}


/* ══════════ TABLET (768-1024px) ══════════ */

@media (min-width: 769px) and (max-width: 1024px) {
    .pub-nav-links a {
        font-size: 11.5px !important;
        padding: 5px 8px !important;
    }
    #hero {
        min-height: 80vh !important;
    }
    .cards-row {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    }
    .dash-tab {
        font-size: 12px !important;
        padding: 6px 13px !important;
    }
}


/* ══════════ TOUCH DEVICES ══════════ */

@media (hover:none) and (pointer:coarse) {
    .btn,
    button,
    a[onclick],
    .dash-tab,
    .pub-nav-links a,
    .dropdown-menu a {
        min-height: 44px !important;
    }
    /* Sin hover effects que se peguen */
    .valor-card:hover,
    .instalacion-card:hover,
    .kpi-card:hover {
        transform: none !important;
    }
}


/* ════════════════════════════════════════════════════════════════
   MOBILE TOTAL — iPhone 8 (375px) y todos los dispositivos
   Navbar grande · Sin barra blanca · Panel accesible · Bot adaptado
════════════════════════════════════════════════════════════════ */


/* ── BASE MÓVIL ── */

@media (max-width: 768px) {
    /* Eliminar top bar */
    #top-bar-public {
        display: none !important;
    }
    /* ── NAVBAR PÚBLICO — más grande y accesible ── */
    #public-navbar {
        padding: 10px 16px !important;
        min-height: 62px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
    }
    #public-navbar .nav-logo-img {
        width: 40px !important;
        height: 40px !important;
    }
    #public-navbar .nav-logo-text h2 {
        font-size: 15px !important;
        font-weight: 800 !important;
    }
    #public-navbar .nav-logo-text span {
        font-size: 10px !important;
    }
    .pub-nav-links {
        display: none !important;
    }
    #pub-nav-btns {
        display: none !important;
    }
    /* Hamburguesa — más grande y fácil de tocar */
    #nav-hamburger {
        display: flex !important;
        flex-direction: column !important;
        gap: 6px !important;
        padding: 10px !important;
        background: rgba(212, 175, 55, .15) !important;
        border-radius: 10px !important;
        border: 1.5px solid rgba(212, 175, 55, .4) !important;
        min-width: 48px !important;
        min-height: 48px !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
    }
    #nav-hamburger span {
        width: 24px !important;
        height: 2.5px !important;
        background: #0f1c3a !important;
        border-radius: 3px !important;
        transition: all .3s !important;
    }
    /* ── MENÚ MÓVIL — pantalla completa mejorada ── */
    #mobile-menu {
        padding: 0 !important;
        overflow-y: auto !important;
    }
    #mobile-menu.open {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding-top: 0 !important;
    }
    /* Header del menú */
    #mobile-menu>div:first-of-type {
        background: linear-gradient(135deg, #0f1c3a, #1a3a6e) !important;
        padding: 50px 24px 24px !important;
        text-align: center !important;
        font-size: 22px !important;
        margin-bottom: 0 !important;
        border-bottom: 3px solid #d4af37 !important;
    }
    /* Links del menú */
    #mobile-menu a {
        padding: 16px 24px !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        border-radius: 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        min-height: 54px !important;
    }
    #mobile-menu a:hover {
        background: rgba(212, 175, 55, .15) !important;
        padding-left: 30px !important;
    }
    /* Botones del menú */
    #mobile-menu .mob-btns {
        padding: 20px !important;
        background: rgba(0, 0, 0, .3) !important;
        gap: 12px !important;
        margin-top: auto !important;
    }
    #mobile-menu .mob-btns button {
        padding: 16px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
        min-height: 52px !important;
    }
    #mobile-close-btn {
        position: fixed !important;
        top: 16px !important;
        right: 16px !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
        z-index: 9999 !important;
    }
    /* ── BARRA BLANCA ELIMINADA ── */
    #home-role-section,
    #home-role-panel {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        min-height: 0 !important;
    }
    #home-role-section[style*="background"],
    #home-role-panel[style*="background"] {
        display: block !important;
        height: auto !important;
    }
    /* ── NAVBAR ADMIN en móvil ── */
    #navbar {
        flex-wrap: wrap !important;
        padding: 8px 12px !important;
        height: auto !important;
        min-height: auto !important;
        gap: 6px !important;
    }
    #navbar .nav-logo {
        flex: 1 !important;
    }
    #navbar .nav-logo-text span {
        display: none !important;
    }
    #navbar .nav-logo-img {
        width: 36px !important;
        height: 36px !important;
    }
    /* Links en fila scrollable */
    .nav-links-row {
        order: 3 !important;
        width: 100% !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        padding: 6px 0 8px !important;
        gap: 4px !important;
        scrollbar-width: none !important;
    }
    .nav-links-row::-webkit-scrollbar {
        display: none !important;
    }
    .nav-btn {
        font-size: 12px !important;
        padding: 8px 12px !important;
        min-height: 36px !important;
        white-space: nowrap !important;
    }
    .user-pill span:not(.role-badge) {
        display: none !important;
    }
    #btn-logout {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    /* ── PANEL ADMIN — accesible en móvil ── */
    .role-home-banner {
        padding: 18px 16px !important;
    }
    .role-home-inner {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .role-avatar {
        width: 60px !important;
        height: 60px !important;
        font-size: 26px !important;
    }
    .role-home-btns {
        margin-left: 0 !important;
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .role-home-btns .btn {
        font-size: 12px !important;
        padding: 10px 8px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    /* dash-tabs en móvil — scroll horizontal */
    .dash-header {
        padding: 14px 14px 0 !important;
    }
    .dash-header h1 {
        font-size: 18px !important;
    }
    .dash-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 6px !important;
        padding-bottom: 10px !important;
        scrollbar-width: thin !important;
        scrollbar-color: #d4af37 rgba(0, 0, 0, .1) !important;
    }
    .dash-tab {
        font-size: 12px !important;
        padding: 8px 13px !important;
        min-height: 36px !important;
    }
    .dash-section {
        padding: 14px !important;
    }
    /* KPI cards 2 columnas */
    .cards-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .kpi-card {
        padding: 14px 12px !important;
    }
    .kpi-num {
        font-size: 22px !important;
    }
    .kpi-label {
        font-size: 10px !important;
    }
    /* Tablas scrollables */
    .dash-section>div,
    .est-section>div,
    .padre-section>div {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    table {
        min-width: 480px !important;
        font-size: 12px !important;
    }
    table th,
    table td {
        padding: 8px 10px !important;
        white-space: nowrap !important;
    }
    /* Formularios en 1 columna */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    /* ── BOT — adaptado a móvil ── */
    #chat-widget,
    #bot-fab-padre,
    #bot-fab-profe,
    #bot-fab-admin,
    #bot-fab-enfer {
        bottom: 80px !important;
        right: 12px !important;
    }
    /* Ventana del bot — más pequeña en móvil */
    [id$="-window"] {
        width: calc(100vw - 24px) !important;
        max-width: 340px !important;
        height: 420px !important;
        right: 0 !important;
        border-radius: 16px !important;
    }
    /* Botón del bot — más accesible */
    [id$="-btn"]:not(#mobile-close-btn):not(#btn-logout):not(.modal-close) {
        min-height: 44px !important;
    }
    /* ── MODALES en móvil ── */
    .modal-overlay.open {
        align-items: flex-end !important;
        padding: 0 !important;
    }
    .modal-box {
        border-radius: 20px 20px 0 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    /* Excepción: modal de maestros NO bottom-sheet */
    #modal-profesor-login.modal-overlay.open {
        align-items: center !important;
        padding: 16px !important;
    }
    #modal-profesor-login .modal-box {
        border-radius: 16px !important;
        max-width: calc(100% - 32px) !important;
        max-height: 88vh !important;
    }
    /* ── FAB Portal ── */
    #portal-fab {
        bottom: 14px !important;
        right: 12px !important;
    }
    #portal-fab button {
        padding: 11px 16px !important;
        font-size: 13px !important;
    }
    /* ── Hero en móvil ── */
    #hero {
        min-height: 82vh !important;
        padding: 72px 18px 44px !important;
    }
    #hero h1 {
        font-size: clamp(28px, 8vw, 38px) !important;
    }
    #hero h1 span {
        font-size: clamp(32px, 9.5vw, 44px) !important;
    }
    .hero-sub {
        font-size: 14px !important;
        margin-bottom: 22px !important;
    }
    .hero-badge {
        font-size: 9.5px !important;
        padding: 5px 14px !important;
    }
    .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
    }
    .hero-btns button,
    .hero-btns a {
        width: 100% !important;
        max-width: 280px !important;
        justify-content: center !important;
    }
    .stats-bar {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        padding: 0 !important;
        margin-top: 24px !important;
    }
    .stat-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
        padding: 14px 8px !important;
    }
    .stat-item:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, .1) !important;
    }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) {
        border-bottom: none !important;
    }
    /* Login */
    .login-card {
        padding: 22px 16px !important;
    }
    #login-form-wrap .btn {
        min-height: 48px !important;
        font-size: 15px !important;
    }
    /* Secciones */
    .section {
        padding: 36px 14px !important;
    }
    /* Perfiles */
    .perfil-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 10px !important;
        padding: 20px 16px !important;
    }
    .perfil-row {
        flex-direction: column !important;
        gap: 2px !important;
        padding: 10px 0 !important;
    }
    .perfil-label {
        font-size: 10px !important;
    }
}


/* iPhone 8 específico (375px) */

@media (max-width: 390px) {
    #hero h1 {
        font-size: 26px !important;
    }
    #hero h1 span {
        font-size: 30px !important;
    }
    .hero-badge {
        font-size: 9px !important;
    }
    .nav-btn {
        font-size: 11px !important;
        padding: 7px 10px !important;
    }
    .dash-tab {
        font-size: 11px !important;
        padding: 7px 11px !important;
    }
    .kpi-num {
        font-size: 20px !important;
    }
    .role-home-btns {
        grid-template-columns: 1fr !important;
    }
    .cards-row {
        grid-template-columns: 1fr !important;
    }
    [id$="-window"] {
        height: 380px !important;
    }
    #portal-fab-label {
        display: none !important;
    }
    .login-card {
        padding: 18px 12px !important;
    }
    #login-form-wrap .btn {
        font-size: 14px !important;
        padding: 14px !important;
    }
}


/* Tablets (768–1024px) */

@media (min-width: 769px) and (max-width: 1024px) {
    #hero {
        min-height: 75vh !important;
    }
    .pub-nav-links a {
        font-size: 11.5px !important;
        padding: 5px 7px !important;
    }
    .cards-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}


/* Touch devices — áreas de toque mínimas */

@media (hover: none) and (pointer: coarse) {
    .btn,
    button,
    a[onclick],
    .dash-tab,
    .pub-nav-links a {
        min-height: 44px;
    }
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    /* Evita zoom en iOS */
    .valor-card:hover,
    .instalacion-card:hover,
    .kpi-card:hover {
        transform: none !important;
    }
}


/* ================================================
   SIDEBAR MENU (logged-in users)
================================================ */

#app-sidebar {
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

#app-sidebar.open {
    display: flex !important;
    transform: translateX(0);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Nunito', sans-serif;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: rgba(245, 197, 24, 0.15);
    color: var(--gold-light);
    border-left-color: var(--gold);
}

.sidebar-link.active {
    background: rgba(245, 197, 24, 0.2);
    color: var(--gold);
    border-left-color: var(--gold);
}

.sidebar-section-title {
    padding: 10px 20px 4px;
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}


/* ================================================
   PORTAL QUICK-ACCESS BUTTONS
================================================ */

.portal-btn-card {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    color: white;
    border: none;
    border-radius: 14px;
    padding: 18px 22px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    min-width: 120px;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.portal-btn-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.portal-btn-card .pbc-icon {
    font-size: 28px;
}

.portal-btn-card .pbc-label {
    font-size: 12px;
    opacity: 0.9;
}


/* Sidebar toggle button in logged-in navbar */

#sidebar-toggle {
    order: -1;
    flex-shrink: 0;
}


/* Hide old nav-links-row since sidebar replaces it */

.nav-links-row {
    display: none !important;
}


/* ================================================
   PORTALES — Secretaría, Directora, Orientación, Deporte
================================================ */

#page-secretaria .dash-header,
#page-directora .dash-header {
    background: linear-gradient(135deg, #1a3a5c, #0f3460);
}

#page-orientacion .dash-header {
    background: linear-gradient(135deg, #1a3a1a, #0d5c2e);
}

#page-deporte .dash-header {
    background: linear-gradient(135deg, #3a1a0a, #7c2d12);
}


/* ================================================
   DARK MODE
================================================ */

body.dark-mode {
    --off-white: #121212;
    --white: #1e1e1e;
    --text: #e0e0e0;
    --gray: #2a2a2a;
    --border: #333;
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode .panel,
body.dark-mode .kpi-card,
body.dark-mode .announcement-card,
body.dark-mode .parent-card,
body.dark-mode .mensaje-card,
body.dark-mode .ausencia-card,
body.dark-mode .login-card {
    background: #1e1e1e !important;
    border-color: #333 !important;
    color: #e0e0e0;
}

body.dark-mode .data-table th {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .data-table td {
    border-color: #333;
    color: #ccc;
}

body.dark-mode .data-table tr:hover td {
    background: #252525;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .section-title h2,
body.dark-mode .panel h3,
body.dark-mode .panel h2 {
    color: #e0e0e0;
}

body.dark-mode .ann-body h3,
body.dark-mode .ann-body p {
    color: #ccc;
}

body.dark-mode .about-text p,
body.dark-mode .about-text h3 {
    color: #ccc;
}

body.dark-mode .dash-content {
    background: #121212;
}

body.dark-mode .notif-panel,
body.dark-mode .notif-item {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .chat-contact {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode #dark-mode-btn {
    color: #FFE066;
}


/* Dark mode transition */

body {
    transition: background 0.3s, color 0.3s;
}

.panel,
.kpi-card,
.announcement-card,
.data-table th,
.data-table td,
.form-group input,
.form-group select {
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}


/* ================================================
   COMUNICADOS / CIRCULARES
================================================ */

.comunicado-card {
    background: var(--white);
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--gold);
    margin-bottom: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s;
}

.comunicado-card:hover {
    transform: translateY(-2px);
}

.comunicado-card.urgente {
    border-left-color: var(--danger);
}

.comunicado-card.info {
    border-left-color: var(--info);
}

.comunicado-card.evento {
    border-left-color: var(--success);
}

.comunicado-card .com-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.comunicado-card .com-meta {
    font-size: 11px;
    color: #aaa;
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.comunicado-card .com-body {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

body.dark-mode .comunicado-card {
    background: #1e1e1e;
    border-color: #333;
}

body.dark-mode .comunicado-card .com-title {
    color: #e0e0e0;
}

body.dark-mode .comunicado-card .com-body {
    color: #bbb;
}


/* ================================================
   BÚSQUEDA GLOBAL
================================================ */

.search-bar-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.search-bar-wrap input {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    background: var(--white);
    color: var(--text);
}

.search-bar-wrap input:focus {
    outline: none;
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 3px rgba(201, 160, 0, 0.12);
}


/* ================================================
   BOLETÍN IMPRIMIBLE
================================================ */

.boletin-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.boletin-header {
    background: linear-gradient(135deg, var(--navy), var(--blue));
    padding: 24px;
    text-align: center;
    color: white;
}

.boletin-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin: 0 0 4px;
}

.boletin-tabla {
    width: 100%;
    border-collapse: collapse;
}

.boletin-tabla th {
    background: var(--navy);
    color: white;
    padding: 10px 14px;
    font-size: 12px;
    text-align: left;
}

.boletin-tabla td {
    padding: 9px 14px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.boletin-tabla tr:last-child td {
    border-bottom: none;
}

.boletin-tabla .nota-num {
    font-weight: 800;
    font-size: 15px;
}

.boletin-tabla .nota-A {
    color: #16a34a;
}

.boletin-tabla .nota-B {
    color: #2563eb;
}

.boletin-tabla .nota-C {
    color: #d97706;
}

.boletin-tabla .nota-D {
    color: #dc2626;
}

.print-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 160, 0, 0.4);
}

@media print {
    #navbar,
    #public-navbar,
    #top-bar-public,
    #portal-fab,
    #app-sidebar,
    #sidebar-overlay,
    .dash-header,
    .dash-tabs,
    .print-btn,
    #dark-mode-btn {
        display: none !important;
    }
    body {
        background: white !important;
    }
    .boletin-container {
        box-shadow: none;
        border-radius: 0;
    }
    .page {
        display: block !important;
        padding-top: 0 !important;
    }
}


/* ================================================
   CUMPLEAÑOS BANNER
================================================ */

#birthday-banner {
    display: none;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    position: relative;
    z-index: 900;
    animation: slideBanner 0.4s ease;
}

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

#birthday-banner button {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    border-radius: 6px;
    padding: 3px 10px;
    cursor: pointer;
    margin-left: 12px;
    font-size: 12px;
    font-weight: 700;
}


/* ================================================
   LOGIN REDESIGN
================================================ */

#login-screen {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1b3e 0%, #16213e 40%, #1a2a50 70%, #0a1628 100%);
    overflow: hidden;
}

#login-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(52, 152, 219, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.login-bg-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 40px 40px;
}

.login-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 36px 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.15);
    animation: loginCardIn .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes loginCardIn {
    from {
        transform: translateY(30px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0)
    }
    20% {
        transform: translateX(-8px)
    }
    40% {
        transform: translateX(8px)
    }
    60% {
        transform: translateX(-5px)
    }
    80% {
        transform: translateX(5px)
    }
}

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

.login-emblem {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #16213e, #2c3e7a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--gold);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.login-emblem img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 0;
    padding: 4px;
}

.login-logo h2 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 900;
    color: var(--navy);
    margin: 0 0 4px;
    line-height: 1.3;
}

.login-logo h2 span {
    color: var(--gold);
    display: block;
}

.login-logo p {
    font-size: 11px;
    color: #888;
    margin: 0;
}

.login-alert-box {
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    border: 1px solid #fca5a5;
    border-left: 4px solid #ef4444;
    color: #b91c1c;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
    display: none;
}

.login-field {
    position: relative;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}

.login-field:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
    background: #fff;
}

.login-field-icon {
    padding: 0 12px;
    font-size: 16px;
    flex-shrink: 0;
}

.login-field input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 12px 13px 0;
    font-size: 14px;
    outline: none;
    font-family: 'Nunito', sans-serif;
    color: #1a2a50;
}

.login-field input::placeholder {
    color: #aaa;
}

.pass-vis-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #888;
    padding: 4px;
    transition: color .2s;
}

.pass-vis-btn:hover {
    color: var(--navy);
}

.login-remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 13px;
}

.login-remember label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #555;
}

.login-remember input[type=checkbox] {
    width: 15px;
    height: 15px;
    accent-color: var(--gold);
    cursor: pointer;
}

.login-forgot {
    color: var(--gold);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.login-forgot:hover {
    text-decoration: underline;
}

.login-btn-main {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold), #c9a000);
    color: var(--navy);
    font-weight: 900;
    font-size: 15px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Nunito', sans-serif;
    transition: all .2s;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.login-btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.45);
}

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

.login-divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
    font-size: 12px;
    color: #bbb;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.login-divider span {
    background: rgba(255, 255, 255, 0.97);
    padding: 0 10px;
    position: relative;
    z-index: 1;
}

.login-alt-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-alt-btns button {
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #555;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    transition: all .2s;
}

.login-alt-btns button:hover {
    border-color: var(--navy);
    background: rgba(22, 33, 62, 0.04);
    color: var(--navy);
}

.login-btn-back {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    margin-top: 8px;
    transition: color .2s;
}

.login-btn-back:hover {
    color: var(--navy);
}

.reg-title {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    font-size: 17px;
    margin: 0 0 8px;
}

.reg-note {
    font-size: 12px;
    color: #888;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--gold);
    margin-bottom: 16px;
}

.login-footer {
    text-align: center;
    margin: 16px 0 0;
    font-size: 11px;
    color: #bbb;
}


/* ================================================
   LOGGED-IN STATE — ELIMINAR BARRA BLANCA
================================================ */


/* Cuando el usuario está logueado, ocultar toda la barra pública */

body.logged-in #top-bar-public,
body.logged-in #public-navbar,
body.logged-in #mobile-menu {
    display: none !important;
}


/* Navbar sticky ya empuja el contenido — no se necesita padding-top */

body.logged-in .page {
    padding-top: 0 !important;
}

/* En la página pública home, el hero maneja su propio espaciado */
body:not(.logged-in) #page-home {
    padding-top: 0 !important;
}

/* El hero en home mantiene su padding natural */

body.logged-in #page-home #hero {
    padding-top: 80px;
}


/* Ocultar secciones vacías del home sin dejar espacio */

body.logged-in #home-role-section:empty,
body.logged-in #home-role-panel:empty {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* Comunicados section visible cuando logueado */

body.logged-in #comunicados-home-section {
    display: block !important;
}


/* Portal buttons visible cuando logueado */

body.logged-in #portal-buttons-section {
    display: block !important;
}


/* ================================================
   PORTAL PAGES DASH HEADER COLORS
================================================ */

#page-secretaria .dash-header {
    background: linear-gradient(135deg, #2c3e7a, #16213e) !important;
}

#page-directora .dash-header {
    background: linear-gradient(135deg, #5c2e7a, #2d1654) !important;
}

#page-orientacion .dash-header {
    background: linear-gradient(135deg, #1a6b3a, #0d3b21) !important;
}

#page-deporte .dash-header {
    background: linear-gradient(135deg, #7a2e2e, #4a1515) !important;
}


/* ================================================
   CARDS ROW / STATS GRID
================================================ */

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

.cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.cards-row .kpi-card {
    flex: 1;
    min-width: 140px;
}


/* ================================================
   BOT FAB IMPROVEMENTS
================================================ */

.bot-fab-window {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
}

.bot-fab-msgs {
    padding: 14px !important;
    gap: 10px !important;
    display: flex;
    flex-direction: column;
}


/* ================================================
   MODAL OVERLAY (for modal-comunicado)
================================================ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal-overlay.open {
    display: flex !important;
}

.modal-overlay>div {
    animation: slideUp 0.25s ease both;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* ================================================
   TABLE IMPROVEMENTS
================================================ */

.data-table td {
    vertical-align: middle;
}

.data-table td button {
    margin: 2px;
}

.tbl-btn {
    padding: 4px 8px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 12px;
    background: #f0f4ff;
    color: #2c3e7a;
    transition: all .15s;
}

.tbl-btn:hover {
    background: #2c3e7a;
    color: white;
}

.tbl-btn.del,
.tbl-btn.btn-danger {
    background: #fff0f0;
    color: #e74c3c;
}

.tbl-btn.del:hover,
.tbl-btn.btn-danger:hover {
    background: #e74c3c;
    color: white;
}

.tbl-btn.approve {
    background: #f0fff4;
    color: #27ae60;
}

.tbl-btn.approve:hover {
    background: #27ae60;
    color: white;
}


/* ================================================
   COMUNICADOS CARDS (home)
================================================ */

.comunicado-card {
    background: white;
    border-radius: 12px;
    padding: 16px 18px;
    border-left: 4px solid var(--navy);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .07);
    margin-bottom: 12px;
    transition: transform .2s, box-shadow .2s;
}

.comunicado-card:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}

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

.com-titulo {
    font-weight: 800;
    color: var(--navy);
    font-size: 14px;
}

.com-fecha {
    font-size: 11px;
    color: #aaa;
}

.com-cuerpo {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 6px 0;
}

.com-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.com-dest {
    font-size: 11px;
    background: #f0f4ff;
    color: #2c3e7a;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

body.dark-mode .comunicado-card {
    background: #252525;
    border-color: var(--gold);
}

body.dark-mode .com-titulo {
    color: #e0e0e0;
}

body.dark-mode .com-cuerpo {
    color: #bbb;
}

body.dark-mode .com-dest {
    background: #333;
    color: #ccc;
}


/* ================================================
   🏢 PASANTÍAS — Badges, Cards, Table styles
================================================ */

.pas-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
    white-space: nowrap;
}

.pasantia-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .08);
    border-top: 4px solid var(--navy);
    transition: transform .2s, box-shadow .2s;
}

.pasantia-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}

body.dark-mode .pasantia-card {
    background: #252525;
    border-top-color: var(--gold);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
}

body.dark-mode .pas-badge {
    filter: brightness(0.85);
}


/* ================================================
   🎒 VIDA ESCOLAR — Gallery strip cards
================================================ */

.vida-card {
    flex: 0 0 200px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 28px 20px;
    text-align: center;
    color: white;
    cursor: default;
    transition: transform .25s, background .25s;
    animation: vidaFloat 4s ease-in-out infinite;
}

.vida-card:nth-child(2) {
    animation-delay: .5s;
}

.vida-card:nth-child(3) {
    animation-delay: 1s;
}

.vida-card:nth-child(4) {
    animation-delay: 1.5s;
}

.vida-card:nth-child(5) {
    animation-delay: 2s;
}

.vida-card:nth-child(6) {
    animation-delay: 2.5s;
}

.vida-card:hover {
    transform: translateY(-8px) scale(1.04);
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
}

.vida-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    margin: 0 0 8px;
    color: var(--gold);
}

.vida-card p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
    line-height: 1.5;
}

@keyframes vidaFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}


/* ================================================
   📊 STATS COUNTER — Animated numbers section
================================================ */

.stats-counter {
    background: white;
    border-radius: 20px;
    padding: 32px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .07);
    border-top: 4px solid var(--gold);
    transition: transform .2s, box-shadow .2s;
}

.stats-counter:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}

.stats-icon {
    font-size: 38px;
    margin-bottom: 14px;
}

.stats-num {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 8px;
    transition: color .3s;
}

.stats-label {
    font-size: 13px;
    color: #888;
    font-weight: 600;
}

body.dark-mode .stats-counter {
    background: #252525;
    border-top-color: var(--gold);
}

body.dark-mode .stats-num {
    color: var(--gold);
}

body.dark-mode .stats-label {
    color: #aaa;
}


/* ================================================
   🌟 HERO ENHANCED — Floating particles
================================================ */

#hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    bottom: -60px;
    right: -60px;
    animation: heroFloat 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroFloat {
    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(-20px, -15px) scale(1.05);
    }
    66% {
        transform: translate(15px, -25px) scale(0.95);
    }
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 1;
    }
}


/* ── SCROLL REVEAL ── */

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity .6s ease, transform .6s ease;
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
    opacity: 1;
    transform: none;
}

.reveal-group>*:nth-child(1) {
    transition-delay: .05s
}

.reveal-group>*:nth-child(2) {
    transition-delay: .15s
}

.reveal-group>*:nth-child(3) {
    transition-delay: .25s
}

.reveal-group>*:nth-child(4) {
    transition-delay: .35s
}

.reveal-group>*:nth-child(5) {
    transition-delay: .45s
}

.reveal-group>*:nth-child(6) {
    transition-delay: .55s
}


/* ── SMOOTH PAGE TRANSITIONS ── */

.page {
    transition: opacity .25s ease;
}

.page.page-exit {
    opacity: 0;
}

.page.active {
    animation: pageFadeIn .3s ease both;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* ── PREMIUM SECTION HEADERS ── */

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 12px;
}


/* ── GLASSMORPHISM CARDS ── */

.glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    transition: transform .3s ease, box-shadow .3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}


/* ── ANIMATED GRADIENT TEXT ── */

.gradient-text {
    background: linear-gradient(135deg, var(--gold), #fff8e1, var(--gold));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
    to {
        background-position: 200% center;
    }
}


/* ── PULSE GLOW on KPI cards ── */

.kpi-card {
    transition: transform .25s ease, box-shadow .25s ease;
}

.kpi-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18);
}


/* ── NAVBAR GLOW LINE ── */

#navbar::after {
    content: '';
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: navGlow 3s ease-in-out infinite;
}

@keyframes navGlow {
    0%,
    100% {
        opacity: .4
    }
    50% {
        opacity: 1
    }
}


/* ── BUTTON RIPPLE ── */

.btn-gold,
.login-btn-main,
.action-btn {
    position: relative;
    overflow: hidden;
}

.btn-gold::after,
.login-btn-main::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: width .5s ease, height .5s ease, opacity .5s ease;
    opacity: 0;
}

.btn-gold:active::after,
.login-btn-main:active::after {
    width: 200px;
    height: 200px;
    opacity: 0;
}


/* ── FLOATING LABEL INPUTS ── */

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12) !important;
    outline: none;
}


/* ── PREMIUM TABLE ── */

.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: linear-gradient(135deg, var(--navy), #2c3e7a) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 12px 14px !important;
    font-size: 12px !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
}

.data-table tbody tr {
    transition: background .15s ease;
}

.data-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05) !important;
}

.data-table tbody td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #f0f0f0;
}


/* ── SIDEBAR ANIMATION ── */

#app-sidebar {
    transition: transform .32s cubic-bezier(.4, 0, .2, 1) !important;
}

#sidebar-overlay {
    transition: opacity .32s ease !important;
}


/* ── PANEL SHADOW ── */

.panel {
    transition: box-shadow .25s ease;
    border-radius: 16px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06) !important;
}

.panel:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, .1) !important;
}


/* ── TOAST ANIMATION ── */

.toast-item {
    animation: toastIn .35s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes toastIn {
    from {
        transform: translateX(110%) scale(.9);
        opacity: 0
    }
    to {
        transform: none;
        opacity: 1
    }
}


/* ── NOTIF PANEL ── */

.notif-panel {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .2) !important;
}


/* ── SCROLL BAR STYLED ── */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, .4);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}


/* ── DARK MODE PREMIUM ── */

body.dark-mode .panel {
    background: #1e2030 !important;
    border-color: #333 !important;
}

body.dark-mode .data-table tbody td {
    border-bottom-color: #2a2a3a;
}

body.dark-mode .data-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.06) !important;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, .25);
}


/* ── LOADING SCREEN ── */

#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0d1b3e, #16213e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: opacity .5s ease, visibility .5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#page-loader img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--gold);
}

#page-loader p {
    color: rgba(255, 255, 255, .7);
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    letter-spacing: .1em;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(212, 175, 55, .2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin-top: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}


/* ═══════════════════════════════════════════════════════════
   BOT TYPING INDICATOR + CHAT PREMIUM
═══════════════════════════════════════════════════════════ */

.bot-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 2px;
}

.bot-typing span {
    width: 7px;
    height: 7px;
    background: var(--gold);
    border-radius: 50%;
    display: inline-block;
    animation: botDot 1.2s ease-in-out infinite;
}

.bot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.bot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes botDot {
    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}


/* ═══════════════════════════════════════════════════════════
   ADMIN PANEL PREMIUM REDESIGN
═══════════════════════════════════════════════════════════ */

#page-admin .dash-header {
    background: linear-gradient(135deg, #04090f 0%, #0b1a38 40%, #0f2354 70%, #0a1628 100%) !important;
    border-bottom: 3px solid var(--gold) !important;
    padding: 28px 28px 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

#page-admin .dash-header::before {
    content: '⚙️';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-60%);
    font-size: 80px;
    opacity: 0.04;
    pointer-events: none;
}

#page-admin .dash-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), #ffd700, var(--gold), transparent);
    animation: navGlow 3s linear infinite;
}

#page-admin .dash-header h1 {
    font-family: 'Playfair Display', serif !important;
    font-size: 24px !important;
    color: white !important;
    margin: 0 0 4px !important;
    letter-spacing: 0.3px !important;
}

#page-admin .dash-header p {
    color: rgba(212, 175, 55, 0.7) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 0 0 20px !important;
}


/* Tabs del admin - scrollable pill bar */

#page-admin .dash-tabs {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: none !important;
    padding: 12px 16px !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(212, 175, 55, 0.4) rgba(255, 255, 255, 0.05) !important;
}

#page-admin .dash-tabs::-webkit-scrollbar {
    height: 4px !important;
}

#page-admin .dash-tabs::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 4px !important;
}

#page-admin .dash-tabs::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5) !important;
    border-radius: 4px !important;
}

#page-admin .dash-tab {
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    padding: 6px 14px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    transition: all 0.18s !important;
}

#page-admin .dash-tab:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: rgba(212, 175, 55, 0.35) !important;
    color: var(--gold) !important;
    transform: translateY(-1px) !important;
}

#page-admin .dash-tab.active {
    background: linear-gradient(135deg, var(--gold), #b8860b) !important;
    color: #0f1c3a !important;
    border-color: transparent !important;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.4) !important;
    transform: translateY(-1px) !important;
}


/* Role banner admin */

#page-admin .role-home-banner {
    background: linear-gradient(135deg, #06101f 0%, #0d2040 50%, #102a5a 100%) !important;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3) !important;
    padding: 32px 28px !important;
}

#page-admin .role-home-banner h2 {
    font-size: 26px !important;
    background: linear-gradient(135deg, white, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* KPI cards del admin más coloridas */

#page-admin .kpi-card {
    background: white !important;
    border-radius: 16px !important;
    padding: 18px 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    border-left: 4px solid var(--gold) !important;
    transition: all 0.2s !important;
}

#page-admin .kpi-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}

#page-admin .kpi-num {
    font-size: 28px !important;
    font-weight: 900 !important;
    font-family: 'Playfair Display', serif !important;
}

#page-admin .kpi-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #888 !important;
    margin-top: 2px !important;
}


/* ═══════════════════════════════════════════════════════════
   SIDEBAR PREMIUM REDESIGN
═══════════════════════════════════════════════════════════ */

.sidebar-premium {
    position: fixed;
    top: 0;
    left: 0;
    width: 290px;
    height: 100%;
    background: linear-gradient(180deg, #06101f 0%, #0d1f3e 40%, #0a1a35 100%);
    z-index: 2000;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    box-shadow: 6px 0 40px rgba(0, 0, 0, 0.6);
    border-right: 1px solid rgba(212, 175, 55, 0.2);
    animation: sidebarSlideIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

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


/* Header */

.sidebar-header {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(13, 28, 62, 0.9) 100%);
    padding: 24px 16px 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-school-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-crest {
    font-size: 32px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
    animation: escudoPulse 3s ease-in-out infinite;
}

.sidebar-school-name {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1.2;
}

.sidebar-school-loc {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
    font-family: 'Nunito', sans-serif;
}

.sidebar-close-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.sidebar-close-btn:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}


/* User card */

.sidebar-user-card {
    margin: 22px 14px 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 14px;
    padding: 16px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #a87d1a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid rgba(212, 175, 55, 0.5);
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 700;
    color: white;
    font-family: 'Nunito', sans-serif;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--gold);
    font-weight: 600;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* Nav links container */

.sidebar-nav {
    padding: 10px 10px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}


/* Sidebar nav links (generated by JS) */

.sidebar-nav a,
.sidebar-nav button,
#sidebar-links a,
#sidebar-links button {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: 'Nunito', sans-serif !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    width: 100% !important;
    text-align: left !important;
    transition: all 0.18s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.sidebar-nav a:hover,
.sidebar-nav button:hover,
#sidebar-links a:hover,
#sidebar-links button:hover {
    background: rgba(212, 175, 55, 0.12) !important;
    color: var(--gold) !important;
    transform: translateX(4px) !important;
}

.sidebar-nav a::before,
#sidebar-links a::before,
#sidebar-links button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: var(--gold);
    border-radius: 0 3px 3px 0;
    transition: transform 0.18s ease;
}

#sidebar-links a:hover::before,
#sidebar-links button:hover::before {
    transform: translateY(-50%) scaleY(1) !important;
}


/* Quick actions */

.sidebar-quick-actions {
    margin: 14px 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 12px;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 6px 8px;
    font-family: 'Nunito', sans-serif;
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
    cursor: pointer;
    text-align: left;
    margin-bottom: 4px;
    transition: all 0.18s;
}

.sidebar-action-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.25);
    color: var(--gold);
    transform: translateX(3px);
}

.sidebar-action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}


/* Footer */

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    text-align: center;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    font-family: 'Nunito', sans-serif;
    line-height: 1.8;
}


/* Botón hamburguesa rediseñado */

#sidebar-toggle {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 18px !important;
    padding: 8px 10px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
}

#sidebar-toggle:hover {
    background: rgba(212, 175, 55, 0.15) !important;
    border-color: var(--gold) !important;
    color: var(--gold) !important;
    transform: scale(1.05) !important;
}


/* ═══════════════════════════════════════════════════════════
   MEJORAS ESTÉTICAS GENERALES — ESCUELA CON MÁS COLOR Y VIDA
═══════════════════════════════════════════════════════════ */


/* Hero mejorado con borde decorativo */

#hero {
    border-bottom: 4px solid var(--gold) !important;
    position: relative !important;
}


/* Secciones con bordes de color */

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
    margin-top: 8px;
}


/* Tarjetas más coloridas */

.kpi-card {
    border-radius: 14px !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.kpi-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}


/* Dash header con gradiente escolar */

.dash-header {
    background: linear-gradient(135deg, #06101f 0%, #0d1f3e 50%, #0a2a5e 100%) !important;
    border-bottom: 3px solid var(--gold) !important;
    position: relative !important;
    overflow: hidden !important;
}

.dash-header::after {
    content: '🎓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 48px;
    opacity: 0.06;
    pointer-events: none;
}


/* Páginas con fondo levemente azulado */

.page {
    background: linear-gradient(180deg, #f0f4ff 0%, #f8faff 100%) !important;
}


/* Botón salir más rojo */

#btn-logout {
    background: linear-gradient(135deg, #c0392b, #e74c3c) !important;
    border: none !important;
    color: white !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

#btn-logout:hover {
    background: linear-gradient(135deg, #a93226, #c0392b) !important;
    transform: scale(1.04) !important;
}


/* Role badge más colorida */

.role-badge {
    background: linear-gradient(135deg, var(--gold), #b8860b) !important;
    color: var(--navy) !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}


/* Dark mode fixes for new sidebar */

body.dark-mode .sidebar-premium {
    background: linear-gradient(180deg, #020810 0%, #060f1e 40%, #040c18 100%);
}

body.dark-mode .page {
    background: linear-gradient(180deg, #0d1117 0%, #111827 100%) !important;
}


/* ── Role portals color themes ── */

#page-secretaria .dash-header {
    background: linear-gradient(135deg, #0c2461, #1e3799) !important;
    border-bottom: 3px solid #4a90d9 !important;
}

#page-secretaria .dash-tab.active {
    background: #4a90d9 !important;
    color: white !important;
}

#page-secretaria .dash-tab:hover {
    background: rgba(74, 144, 217, 0.2) !important;
    color: #4a90d9 !important;
}

#page-directora .dash-header {
    background: linear-gradient(135deg, #4a0072, #6d12a8) !important;
    border-bottom: 3px solid #a855f7 !important;
}

#page-directora .dash-tab.active {
    background: #a855f7 !important;
    color: white !important;
}

#page-directora .dash-tab:hover {
    background: rgba(168, 85, 247, 0.2) !important;
    color: #a855f7 !important;
}

#page-orientacion .dash-header {
    background: linear-gradient(135deg, #064e3b, #065f46) !important;
    border-bottom: 3px solid #34d399 !important;
}

#page-orientacion .dash-tab.active {
    background: #34d399 !important;
    color: #064e3b !important;
}

#page-orientacion .dash-tab:hover {
    background: rgba(52, 211, 153, 0.2) !important;
    color: #34d399 !important;
}

#page-deporte .dash-header {
    background: linear-gradient(135deg, #7c1d1d, #991b1b) !important;
    border-bottom: 3px solid #f87171 !important;
}

#page-deporte .dash-tab.active {
    background: #f87171 !important;
    color: white !important;
}

#page-deporte .dash-tab:hover {
    background: rgba(248, 113, 113, 0.2) !important;
    color: #f87171 !important;
}

#page-enfermeria .dash-header {
    background: linear-gradient(135deg, #065f46, #047857) !important;
    border-bottom: 3px solid #10b981 !important;
}

#page-enfermeria .dash-tab.active {
    background: #10b981 !important;
    color: white !important;
}

#page-enfermeria .dash-tab:hover {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #10b981 !important;
}

#page-profesor .dash-header {
    background: linear-gradient(135deg, #1a3a6e, #1e4d8c) !important;
    border-bottom: 3px solid #60a5fa !important;
}

#page-profesor .dash-tab.active {
    background: #60a5fa !important;
    color: #1e4d8c !important;
}

#page-profesor .dash-tab:hover {
    background: rgba(96, 165, 250, 0.2) !important;
    color: #60a5fa !important;
}


/* Portal headers with role emoji watermark */

#page-secretaria .dash-header::before {
    content: '🗂️';
}

#page-directora .dash-header::before {
    content: '👩‍💼';
}

#page-orientacion .dash-header::before {
    content: '🧭';
}

#page-deporte .dash-header::before {
    content: '⚽';
}

#page-enfermeria .dash-header::before {
    content: '🏥';
}

#page-profesor .dash-header::before {
    content: '👨‍🏫';
}

#page-secretaria .dash-header::before,
#page-directora .dash-header::before,
#page-orientacion .dash-header::before,
#page-deporte .dash-header::before,
#page-enfermeria .dash-header::before,
#page-profesor .dash-header::before {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-60%);
    font-size: 72px;
    opacity: 0.05;
    pointer-events: none;
}


/* Tab bar bg for all portals */

#page-secretaria .dash-tabs,
#page-directora .dash-tabs,
#page-orientacion .dash-tabs,
#page-deporte .dash-tabs,
#page-enfermeria .dash-tabs,
#page-profesor .dash-tabs {
    background: #f0f4ff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}