/* =============================================================
   ESCUELITA FC — STYLESHEET UNIFICADO
   Versão 2.0 | Substitui todos os estilos inline dispersos
   ============================================================= */

/* ===== 1. VARIÁVEIS CSS ===== */
:root {
    /* Paleta principal */
    --primary:       #1a3a6e;
    --primary-dark:  #0f2550;
    --primary-light: #2563eb;

    /* Estados */
    --success: #16a34a;
    --warning: #d97706;
    --danger:  #dc2626;
    --info:    #0284c7;

    /* Neutros */
    --dark:       #1e293b;
    --gray:       #64748b;
    --gray-light: #94a3b8;
    --border:     #e2e8f0;
    --light:      #f8fafc;
    --white:      #ffffff;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 65px;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow:    0 4px 15px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);

    /* Bordas */
    --radius:    10px;
    --radius-sm:  6px;
    --radius-lg: 14px;

    /* Transição */
    --transition: all 0.3s ease;
}

/* ===== 2. BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    margin: 0;
    overflow-x: hidden;
    font-size: 0.9375rem;
}

a { color: var(--primary-light); }
a:hover { color: var(--primary); }

/* ===== 3. LAYOUT PRINCIPAL ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== 4. SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand:hover { color: white; text-decoration: none; }

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--success);
    flex-shrink: 0;
}

/* Botão de recolher sidebar */
.sidebar-collapse-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-shrink: 0;
    line-height: 1;
}
.sidebar-collapse-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}
.sidebar-collapse-btn .fa-chevron-left {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.sidebar-nav {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
}

.nav-section { margin-bottom: 16px; }

.nav-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.45);
    padding: 0 20px 6px;
    margin-bottom: 2px;
}

.nav-item { margin: 2px 10px; }

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.875rem;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.nav-badge {
    background: var(--success);
    color: white;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Scrollbar da sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 2px; }

/* ===== 5. ÁREA DO USUÁRIO (rodapé da sidebar) ===== */
.user-area {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.user-details h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
    line-height: 1.2;
}

.user-details small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.72rem;
}

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

.user-action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 7px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    text-align: center;
    font-size: 0.78rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

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

/* ===== 6. CONTEÚDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

.content-area {
    flex: 1;
    min-width: 0;
    padding: 28px 30px;
}

/* ===== 7. BOTÃO TOGGLE (Mobile) ===== */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: var(--primary);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.sidebar-toggle:hover { background: var(--primary-dark); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ===== 8. RESPONSIVO ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .sidebar-overlay.mobile-open {
        display: block;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: flex;
    }
    .content-area {
        padding: 20px 16px;
        padding-top: 68px;
    }
}

@media (max-width: 576px) {
    .content-area {
        padding: 14px 12px;
        padding-top: 64px;
    }
}

/* ===== 8b. SIDEBAR RECOLHIDA (desktop) ===== */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-details,
.sidebar.collapsed .user-action-btn span {
    display: none;
}

.sidebar.collapsed .sidebar-collapse-btn .fa-chevron-left {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    margin: 2px 6px;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 10px 8px;
}

.sidebar.collapsed .nav-link i {
    font-size: 1.1rem;
    width: auto;
}

.sidebar.collapsed .user-area {
    padding: 10px 6px;
}

.sidebar.collapsed .user-info {
    justify-content: center;
    margin-bottom: 6px;
}

.sidebar.collapsed .user-actions {
    flex-direction: column;
}

.sidebar.collapsed .user-action-btn {
    padding: 8px;
    justify-content: center;
}

@media (max-width: 992px) {
    .sidebar-collapse-btn { display: none; }
    body.sidebar-collapsed .main-content { margin-left: 0; }
}

/* ===== 9. CABEÇALHO DA PÁGINA ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i { color: var(--primary); }

.page-subtitle {
    color: var(--gray);
    font-size: 0.85rem;
    margin: 4px 0 0;
}

/* ===== 10. CARDS ===== */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* ── Stats Cards — full-color modern ── */
.stats-card {
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: white;
    background: var(--primary);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Diagonal shine overlay */
.stats-card::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}

/* Header row: label left, icon right */
.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.sc-label {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.82;
    line-height: 1.3;
}

.sc-icon {
    font-size: 1.7rem;
    opacity: 0.38;
    flex-shrink: 0;
}

.sc-number {
    font-weight: 800;
    font-size: 2.3rem;
    line-height: 1;
    margin: 6px 0 2px;
    letter-spacing: -0.5px;
}

.sc-desc {
    font-size: 0.75rem;
    opacity: 0.78;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Color variants */
.stats-card.sc-green,  .stats-card.success { background: #16a34a; }
.stats-card.sc-amber,  .stats-card.warning { background: #d97706; }
.stats-card.sc-dark                        { background: #0f172a; }
.stats-card.sc-info,   .stats-card.info   { background: #0284c7; }
.stats-card.sc-danger, .stats-card.danger { background: #dc2626; }
.stats-card.sc-gray                        { background: #475569; }

/* Legacy compat */
.stats-icon { display: none; }
.stats-number { font-weight: 800; font-size: 2.3rem; color: white; line-height: 1; margin: 6px 0 2px; }
.stats-label  { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: 0.82; color: white; }

/* ===== 11. GRID DE STATS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

/* ===== 12. BANNER DE BOAS-VINDAS / PAGE BANNER ===== */
.welcome-section, .page-banner {
    background: var(--primary);
    color: white;
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.welcome-section::before, .page-banner::before {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.welcome-section::after, .page-banner::after {
    content: '';
    position: absolute;
    right: 60px;
    bottom: -60px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.welcome-section h1, .page-banner-title {
    margin: 0 0 4px;
    font-weight: 800;
    font-size: 1.75rem;
    line-height: 1.1;
}

.page-banner-section {
    display: block;
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.6;
    margin-bottom: 4px;
}

.page-banner-period {
    opacity: 0.72;
    font-size: 0.82rem;
    margin: 0;
}

.welcome-section .lead {
    opacity: 0.88;
    margin: 6px 0 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.role-badge {
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.78rem;
    display: inline-block;
}

.filial-badge {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    display: inline-block;
}

.super-admin-badge {
    background: #ef4444;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
}

/* Botões no banner */
.btn-banner-secondary {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    color: white;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.btn-banner-secondary:hover { background: rgba(255,255,255,0.24); color: white; text-decoration: none; }

.btn-banner-primary {
    background: #eab308;
    border: none;
    color: #1e293b;
    border-radius: var(--radius-sm);
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.btn-banner-primary:hover { background: #ca8a04; color: #1e293b; text-decoration: none; }

/* ===== 13. AÇÕES RÁPIDAS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.quick-action-btn {
    background: white;
    border: 1.5px solid var(--border);
    padding: 16px 12px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--dark);
    display: block;
}

.quick-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    text-decoration: none;
}

.quick-action-btn:hover i { color: white; }

.quick-action-btn i {
    font-size: 1.5rem;
    margin-bottom: 7px;
    color: var(--primary);
    display: block;
    transition: var(--transition);
}

.quick-action-btn div {
    font-weight: 600;
    font-size: 0.82rem;
}

/* ===== 14. TABELAS ===== */
.table th {
    background-color: #f1f5f9;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray);
    border-bottom: none;
    padding: 10px 14px;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
    padding: 10px 14px;
}

.table-hover tbody tr:hover { background-color: #f8fafc; }

/* ===== 15. TÍTULO DE SEÇÃO ===== */
.section-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 16. LINHAS URGENTES/PRÓXIMAS ===== */
.urgente {
    background-color: #fff5f5 !important;
    border-left: 3px solid var(--danger) !important;
}

.proximo {
    background-color: #fffbf0 !important;
    border-left: 3px solid var(--warning) !important;
}

/* ===== 17. FORMULÁRIOS ===== */
.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border-color: #d1d5db;
    font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ===== 18. ALERTAS ===== */
.alert { border-radius: var(--radius); border: none; }

/* ===== 19. BOTÕES ===== */
.btn { border-radius: var(--radius-sm); font-weight: 500; transition: var(--transition); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ===== 20. PÁGINA DE LOGIN ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

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

.login-logo i { font-size: 3rem; color: var(--primary); }
.login-logo h4 { margin: 10px 0 0; font-weight: 700; color: var(--dark); }

/* ===== 21. AVATAR PEQUENO (clientes) ===== */
.avatar-sm {
    width: 38px;
    height: 38px;
    min-width: 38px;
}

/* ===== 22. CARDS DE ESTATÍSTICA COM BORDA ESQUERDA (estilo SB Admin) ===== */
.border-left-primary   { border-left: 4px solid var(--primary) !important; }
.border-left-success   { border-left: 4px solid var(--success) !important; }
.border-left-warning   { border-left: 4px solid var(--warning) !important; }
.border-left-danger    { border-left: 4px solid var(--danger)  !important; }
.border-left-info      { border-left: 4px solid var(--info)    !important; }
.border-left-secondary { border-left: 4px solid var(--gray)    !important; }

/* ===== 23. UTILITÁRIOS DE TEXTO ===== */
.text-xs {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Compatibilidade Bootstrap 4 → 5 */
.font-weight-bold { font-weight: 700 !important; }
.text-gray-800    { color: var(--dark) !important; }
.text-gray-300    { color: var(--gray-light) !important; }
.no-gutters       { margin-right: 0; margin-left: 0; }
.no-gutters > .col,
.no-gutters > [class*="col-"] { padding-right: 0; padding-left: 0; }

/* ===== 24. CARDS DE CLIENTES (listar.php) ===== */
.client-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    background: white;
}

.client-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-color: #c8d6e5;
}

.client-card.hidden { display: none !important; }

/* ===== 25. ANIMAÇÃO FADE-IN ===== */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* ===== 26. NOTIFICAÇÕES TOAST ===== */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 280px;
    max-width: 420px;
}

/* ===== 27. RESPONSIVO — STATS E QUICK ACTIONS ===== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .welcome-section, .page-banner {
        padding: 18px 20px;
    }

    .welcome-section h1, .page-banner-title { font-size: 1.3rem; }

    .table th, .table td {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stats-card { padding: 16px 14px; min-height: 110px; }
    .sc-number   { font-size: 1.7rem; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
}

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

/* ===== 28. RESPOSIVO — CLIENTES ===== */
@media (max-width: 767.98px) {
    .list-group-item {
        border-radius: var(--radius) !important;
        margin-bottom: 8px;
    }

    tr:has(.bg-danger) { background-color: #fff5f5 !important; }
    tr:has(.bg-warning) { background-color: #fffbf0 !important; }
}

/* ===== 29. MÓDULO ALUMNOS ===== */
.card-alumno {
    transition: var(--transition);
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-alumno:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-alumno .card-body { padding: 1.25rem; }
.card-alumno .card-title { color: var(--dark); font-weight: 600; margin-bottom: 0.75rem; }

.badge-filial {
    font-size: 0.68rem;
    padding: 0.35em 0.6em;
    border-radius: 12px;
    background: var(--primary);
    color: white;
}

/* Stats dentro do card de aluno */
.alumno-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.stat-item {
    text-align: center;
    padding: 0.4rem;
    background: var(--light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.stat-value { font-weight: 700; font-size: 1em; color: var(--dark); }
.stat-label { font-size: 0.7em; color: var(--gray); margin-top: 2px; }

.filter-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-card .card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 0.875rem 1.25rem;
    border: none;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    color: var(--gray);
}

.avatar-placeholder {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.3em;
    margin-right: 1rem;
}

.alumno-header { display: flex; align-items: center; margin-bottom: 0.75rem; }

.search-box { position: relative; margin-bottom: 1.25rem; }
.search-box input { padding-left: 2.5rem; border-radius: 25px; border: 1px solid var(--border); }
.search-box i { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--gray); }

.filial-info {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
}

.filial-info h6 { margin-bottom: 0.25rem; font-weight: 600; }

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

/* ===== 30. BANNER UNIVERSAL (cl-banner) ===== */
.cl-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}
.cl-banner-deco {
    position: absolute;
    right: 0; top: 0; bottom: 0;
    width: 220px;
    background: repeating-linear-gradient(
        -55deg,
        rgba(255,255,255,0.035) 0px,
        rgba(255,255,255,0.035) 2px,
        transparent 2px,
        transparent 18px
    );
    pointer-events: none;
}
.cl-banner-body  { flex: 1; min-width: 0; position: relative; z-index: 1; }
.cl-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; z-index: 1; }
.cl-banner-eyebrow { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: .65; margin-bottom: 4px; display: block; }
.cl-banner-title { font-size: 1.9rem; font-weight: 800; margin: 0 0 4px; line-height: 1.1; }
.cl-banner-sub   { font-size: .82rem; opacity: .72; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cl-banner-badge {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}
.cl-banner-badge.super { background: rgba(234,179,8,0.25); border-color: rgba(234,179,8,0.4); }
.cl-filter-label { font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); margin-bottom: 6px; display: block; }

/* ===== MODULE INTRO CARD ===== */
.mod-intro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: opacity .28s ease, transform .28s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.mod-intro-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(59,130,246,.25);
}
.mod-intro-body { flex: 1; min-width: 0; }
.mod-intro-title { font-weight: 700; color: #1e293b; font-size: .92rem; margin-bottom: .2rem; }
.mod-intro-desc  { color: #64748b; font-size: .83rem; line-height: 1.55; margin-bottom: .6rem; }
.mod-intro-tags  { display: flex; flex-wrap: wrap; gap: .35rem; }
.mod-intro-tag   { background: #f8fafc; color: #475569; padding: .2rem .65rem; border-radius: 20px; font-size: .72rem; font-weight: 600; border: 1px solid #e2e8f0; display: inline-flex; align-items: center; gap: .3rem; }
.mod-intro-tag i { font-size: .62rem; opacity: .8; }
.mod-intro-close { position: absolute; top: .6rem; right: .75rem; background: none; border: none; color: #94a3b8; cursor: pointer; font-size: .78rem; padding: .25rem .45rem; line-height: 1; border-radius: 6px; transition: all .15s; }
.mod-intro-close:hover { color: #475569; background: #f1f5f9; }
@media (max-width: 576px) {
    .mod-intro { flex-direction: column; gap: .75rem; }
    .mod-intro-icon { width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 768px) {
    .cl-banner { flex-direction: column; align-items: flex-start; padding: 20px; }
    .cl-banner-title { font-size: 1.45rem; }
    .cl-banner-actions { width: 100%; }
}

/* ===== DASH-BANNER (legacy kept for backward compat) ===== */
.dash-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
}

.dash-banner::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.dash-banner-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.7;
    display: block;
    margin-bottom: 4px;
}

.dash-banner-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.1;
}

.dash-banner-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dash-meta-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.73rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
}

.dash-meta-super { background: rgba(234,179,8,0.25); border-color: rgba(234,179,8,0.4); }

.dash-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.dash-btn-ghost {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    color: white;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    white-space: nowrap;
}
.dash-btn-ghost:hover { background: rgba(255,255,255,0.24); color: white; text-decoration: none; }

.dash-btn-accent {
    background: #eab308;
    border: none;
    color: #1e293b;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    white-space: nowrap;
}
.dash-btn-accent:hover { background: #ca8a04; color: #1e293b; text-decoration: none; }

/* ===== 31. QUICK BAR ===== */
.dash-quickbar {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
}

.dqb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--dark);
    padding: 14px 8px;
    border-radius: var(--radius);
    background: white;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.dqb-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--primary);
    border-color: var(--primary-light);
    text-decoration: none;
}

.dqb-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.dqb-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* ===== 32. PAGOS PENDIENTES ROWS ===== */
.dash-pago-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
}

.dash-pago-row:last-child { border-bottom: none; }
.dash-pago-row:hover { background: #f8fafc; }

.dash-pago-vencido { background: #fff5f5; }
.dash-pago-vencido:hover { background: #fee2e2; }

.dash-pago-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.dash-pago-info { flex: 1; min-width: 0; }

.dash-pago-nombre {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-pago-meta {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 2px;
}

.dash-pago-monto {
    font-weight: 700;
    font-size: 0.875rem;
    white-space: nowrap;
}

.dash-badge-danger {
    background: #dc2626;
    color: white;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

/* ===== 33. TIMELINE DE HORARIOS HOY ===== */
.dash-timeline { display: flex; flex-direction: column; }

.dash-tl-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}
.dash-tl-item:last-child { border-bottom: none; }

.dash-tl-time {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray);
    min-width: 36px;
    padding-top: 2px;
    font-variant-numeric: tabular-nums;
}

.dash-tl-dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
    margin-top: 5px;
}

.dash-tl-body { flex: 1; min-width: 0; }

.dash-tl-cat {
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.2;
}

.dash-tl-prof {
    font-size: 0.75rem;
    color: var(--gray);
    margin-top: 2px;
}

/* Responsive dashboard */
@media (max-width: 991px) {
    .dash-quickbar { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .dash-banner { flex-direction: column; align-items: flex-start; }
    .dash-banner-title { font-size: 1.4rem; }
    .dash-banner-actions { width: 100%; }
}

/* ===== 34. CALENDARIO DE PAGOS ===== */
.calendar-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    background: white;
    overflow: hidden;
}
.cal-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    padding: 12px;
}
.cal-header {
    text-align: center;
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--gray);
    padding: 4px 2px;
    text-transform: uppercase;
}
.cal-day {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px 4px;
    min-height: 64px;
    position: relative;
    background: var(--light);
    transition: box-shadow 0.2s;
    cursor: default;
}
.cal-day:hover { box-shadow: var(--shadow-sm); }
.cal-day.empty { background: transparent; border-color: transparent; min-height: 0; }
.cal-day.today { border-color: var(--primary); background: rgba(26,58,110,0.04); }
.cal-day.has-payments { background: #f0fdf4; border-color: #10b981; }
.cal-day-num {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--dark);
    display: block;
    line-height: 1;
    margin-bottom: 3px;
}
.cal-day.today .cal-day-num { color: var(--primary); }
.cal-count {
    position: absolute;
    top: 4px; right: 4px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 18px; height: 18px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-names { margin-top: 2px; }
.cal-name {
    display: block;
    font-size: 0.6rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 3px;
    padding: 1px 3px;
    margin-bottom: 1px;
}
.cal-name.paid    { background: #dcfce7; color: #166534; }
.cal-name.pending { background: #fef9c3; color: #854d0e; }
.cal-name.overdue { background: #fee2e2; color: #991b1b; }
.cal-name.none    { background: #e0f2fe; color: #075985; }
.cal-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 12px 12px;
    font-size: 0.72rem;
    color: var(--gray);
}
.cal-legend span { display: flex; align-items: center; gap: 4px; }
.cal-legend span::before { content: ''; width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.cal-legend .leg-paid::before    { background: #dcfce7; border: 1px solid #10b981; }
.cal-legend .leg-pending::before { background: #fef9c3; border: 1px solid #f59e0b; }
.cal-legend .leg-overdue::before { background: #fee2e2; border: 1px solid #ef4444; }
.cal-legend .leg-none::before    { background: #e0f2fe; border: 1px solid #3b82f6; }
@media (max-width: 576px) {
    .cal-grid { gap: 2px; padding: 6px; }
    .cal-day  { min-height: 48px; padding: 3px 2px; }
    .cal-name { display: none; }
}

@media (max-width: 480px) {
    .dash-quickbar { grid-template-columns: repeat(4, 1fr); }
}
