body {
    background: #f8f9fa;
}

body.bg-admin {
    background: linear-gradient(to right, #fff8e7, #fefae0);
}

body.bg-alumnos {
    background: linear-gradient(to right, #fff3f3, #f9e9ff);
}

body.bg-profes {
    background: linear-gradient(to right, #e3f2fd, #bbdefb);
}

#main-navbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    /* La mantiene por encima de todo */
    transition: top 0.3s ease-in-out, box-shadow 0.3s;
    background: linear-gradient(90deg, #0d6efd 0%, #0284c7 100%) !important;
    /* Azul degradado premium */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

.header {
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-admin {
    background: #198754;
}

.header-alumnos {
    background: #ffc107;
    color: black;
}

.header-profes {
    background: #0d6efd;
}

.header-productos {
    background: #6f42c1;
}

.btn-back {
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-back:hover {
    background: linear-gradient(to right, #2575fc, #6a11cb);
    transform: scale(1.05);
    color: white;
}

.menu-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
}

.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

btn-eliminar-img {
    padding: 0px 6px;
    font-size: 1.2rem;
    line-height: 1.2;
}

.card-persona {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.card-persona:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
    border-color: #ffc107 !important;
    /* Borde amarillo al hacer hover */
}

.icono-avatar {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff3cd;
    /* Fondo amarillo clarito */
    color: #ffc107;
    border-radius: 50%;
    font-size: 1.5rem;
}

/* Fondo un poco más cálido para resaltar las tarjetas blancas */
body.bg-alumnos {
    background-color: #fffaf0;
}

/* --- AJUSTES DE MODO OSCURO GLOBAL --- */
[data-bs-theme="dark"] body {
    background-color: #121212 !important;
    color: #f8f9fa !important;
}

[data-bs-theme="dark"] .bg-body-tertiary {
    background-color: #121212 !important;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .bg-body {
    background-color: #1e1e1e !important;
    border-color: #333 !important;
}

[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5 {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .table {
    --bs-table-bg: #1e1e1e;
    --bs-table-color: #e0e0e0;
    border-color: #444;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: transparent !important;
    color: #e0e0e0 !important;
}

[data-bs-theme="dark"] input,
[data-bs-theme="dark"] select {
    background-color: #2b2b2b !important;
    border-color: #444 !important;
    color: white !important;
}


/* ANIMACIONES Y ESTILOS DEL LOGIN  */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim-1 {
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.anim-2 {
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
}

.anim-3 {
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
}

.anim-4 {
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

.login-sidebar {
    background-color: #172033;
    background-size: 55%;
    background-position: center;
    background-repeat: no-repeat;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.input-group:focus-within {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-radius: 0.375rem;
}

.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: #86b7fe;
}

.btn-login {
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(13, 110, 253, 0.3) !important;
}