﻿
:root {
    --primary-color: #4f46e5;
    --primary-soft: #eef2ff;
    --sidebar-width: 260px;
}

body {
    background-color: #f3f4f6;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* LOGIN */
#loginSection {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    max-width: 420px;
    width: 100%;
    border-radius: 1.5rem;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.15);
    border: none;
}

.brand-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    border: none;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #4338ca, #4f46e5);
    }

/* APP LAYOUT */
#appSection {
    min-height: 100vh;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #e5e7eb;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

    .sidebar .brand {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.25);
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

        .sidebar .brand span {
            font-weight: 600;
            font-size: 1.1rem;
        }

.sidebar-nav {
    padding: 1rem 0.75rem;
    flex: 1;
    overflow-y: auto;
}

    .sidebar-nav .nav-link {
        color: #cbd5f5;
        border-radius: 0.75rem;
        padding: 0.6rem 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.95rem;
        margin-bottom: 0.25rem;
    }

        .sidebar-nav .nav-link i {
            font-size: 1.1rem;
        }

        .sidebar-nav .nav-link.active,
        .sidebar-nav .nav-link:hover {
            background: rgba(129, 140, 248, 0.15);
            color: #e5e7eb;
        }

.sidebar-footer {
    padding: 0.75rem 1rem 1.2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    font-size: 0.8rem;
    color: #9ca3af;
}

/* MAIN CONTENT / HEADER */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.header-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-bell {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    font-size: 0.65rem;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #6366f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.app-body {
    padding: 1rem;
}

.section-page {
    display: none;
}

    .section-page.active {
        display: block;
    }

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.section-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* CARDS */
.card {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.card-header {
    border-bottom: 1px solid #e5e7eb;
}

/* MOBILE FIRST */
.sidebar-toggle-btn {
    display: inline-flex;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
    z-index: 1030;
}

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 1025;
    display: none;
}

    .sidebar-overlay.show {
        display: block;
    }

/* Ocultar header-subtitle no modo responsivo */
@media (max-width: 767px) {
    #header-subtitle {
        display: none;
    }
}

@media (min-width: 992px) {
    .sidebar {
        position: fixed;
        transform: none;
        height: 100vh;
        overflow-y: auto;
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }

    .sidebar-overlay {
        display: none !important;
    }

    .sidebar-toggle-btn {
        display: none;
    }

    .app-body {
        padding: 1.25rem 1.5rem 1.5rem;
    }
}

.badge-status {
    font-size: 0.7rem;
}

.table-responsive {
    border-radius: 0.75rem;
    background: #ffffff;
}

.form-control::placeholder {
    color: #9ca3af;
    font-size: 0.9rem;
}

.accordion-body li {
    cursor: pointer;
}

/* TOAST */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

.toast-success {
    background: #10b981;
}

.toast-danger {
    background: #ef4444;
}

.toast-warning {
    background: #f59e0b;
}

.toast-info {
    background: #3b82f6;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* SELECTION BADGES */
#selectedClassesList,
#selectedStudentsList {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

#selectedClassesList .badge,
#selectedStudentsList .badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

#selectedClassesList .badge:hover,
#selectedStudentsList .badge:hover {
    background-color: #dc3545 !important;
    transform: scale(1.05);
}

#selectedClassesList .badge i,
#selectedStudentsList .badge i {
    font-size: 0.9rem;
}
