/* Estilos globales para el proyecto */
body {
    background-color: #f0f2f5; /* Un color de fondo suave */
}

.main-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    overflow-y: auto;
    background: #f8f9fa;
}

.content-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Nuevo estilo para las tarjetas */
.card {
    border: none; /* Quitar el borde por defecto de Bootstrap */
    border-radius: 15px; /* Bordes más redondeados */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Sombra más suave y difusa */
    overflow: hidden; /* Para que el header no se salga de los bordes redondeados */
}

.card-header {
    border-bottom: none; /* Quitar la línea del header */
    color: #333; /* Color de texto oscuro para mejor legibilidad */
}

.card-icon {
    font-size: 3.5rem; /* Icono un poco más grande */
    margin-bottom: 1rem;
    /* Los colores se heredan de las clases de texto de Bootstrap (text-primary, etc) */
}

.matriculas-info {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.login-image {
    object-fit: cover;
    object-position: left;
}

/* --- Material Design Form Fields --- */

/* Contenedor para el campo de texto flotante */
.form-floating {
    position: relative;
}

/* Estilo del input */
.form-floating .form-control {
    border: none;
    border-bottom: 1px solid #ced4da; /* Línea base gris */
    border-radius: 0;
    padding: 1.5rem 0.75rem 0.5rem 0.75rem;
    background-color: transparent;
    transition: border-color 0.15s ease-in-out;
}

/* Quitar sombra y borde al enfocar */
.form-floating .form-control:focus {
    box-shadow: none;
    border-bottom: 2px solid #0d6efd; /* Línea azul al enfocar (color primario de Bootstrap) */
}

/* Estilo de la etiqueta */
.form-floating > label {
    padding: 1rem 0.75rem;
    transition: all 0.15s ease-in-out;
    opacity: 0.65;
}

/* Movimiento de la etiqueta cuando el input tiene contenido o está enfocado */
.form-floating .form-control:not(:placeholder-shown) ~ label,
.form-floating .form-control:focus ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    opacity: 1;
    color: #0d6efd; /* Color azul al enfocar */
}

/* Ajuste para select */
.form-floating > .form-select {
    border: none;
    border-bottom: 1px solid #ced4da;
    border-radius: 0;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    background-color: transparent;
}

.form-floating > .form-select:focus {
    box-shadow: none;
    border-bottom: 2px solid #0d6efd;
}

/* Estilos para Radio Buttons (manteniendo un look limpio) */
.form-check-input {
    border-color: #ced4da;
}
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}
.form-check-input:focus {
    box-shadow: none;
    border-color: #86b7fe; /* Sombra de foco de Bootstrap */
}

/* --- Corrección para el fondo de autocompletado del navegador --- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important; /* Forzar fondo blanco */
    -webkit-text-fill-color: #212529 !important; /* Color del texto, puedes ajustarlo */
    transition: background-color 5000s ease-in-out 0s; /* Truco para evitar que el navegador lo sobreescriba */
}

/* --- Responsive Sidebar --- */
#sidebar .menu-text {
    transition: display 0.3s ease;
}

@media (max-width: 768px) {
    #sidebar {
        width: 80px;
        transition: width 0.3s ease;
        cursor: pointer;
    }

    #sidebar.sidebar-expanded {
        width: 280px;
    }

    #sidebar:not(.sidebar-expanded) .menu-text {
        display: none;
    }

    #sidebar .accordion-button::after {
        display: none; /* Ocultar el ícono de flecha del acordeón */
    }

    #sidebar .nav-link,
    #sidebar .accordion-button {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        text-align: center;
    }

    #sidebar.sidebar-expanded .nav-link,
    #sidebar.sidebar-expanded .accordion-button {
        text-align: left;
    }

    #sidebar .bi {
        font-size: 1.5rem;
        margin-right: 0 !important;
    }

    #sidebar.sidebar-expanded .bi {
        margin-right: 0.5rem !important;
    }
}

/* --- Desktop Sidebar --- */
@media (min-width: 769px) {
    /* Force sidebar to be expanded on desktop, overriding any JS. */
    .sidebar-frame-container.collapsed {
        width: 280px !important;
    }
    #sidebar {
        width: 280px !important;
    }
    #sidebar .menu-text {
        display: inline !important;
    }
}

.col-asignatura {
    max-width: 150px; /* Adjust as needed */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Z-index fix for datepicker */
.datepicker {
    z-index: 1100 !important; /* Bootstrap modals are 1050, this should be higher */
}
