/*
 * Estilos globales para el módulo de Matrícula Online
 * Paleta de colores Bootstrap 5
 * @author ISAM Software
 */

:root {
    /* Colores Bootstrap 5 estándar */
    --primary: #0d6efd;
    --primary-hover: #0b5ed7;
    --primary-active: #0a58ca;
    --primary-light: rgba(13, 110, 253, 0.1);

    --secondary: #6c757d;
    --secondary-light: rgba(108, 117, 125, 0.1);

    --success: #198754;
    --success-bg: #d1e7dd;

    --warning: #ffc107;
    --warning-bg: #fff3cd;

    --danger: #dc3545;
    --danger-bg: #f8d7da;

    --info: #0dcaf0;
    --info-bg: #cff4fc;

    --bg-light: #f8f9fa;
    --bg-alternative: #ffffff;

    --border-color: #dee2e6;
    --border-input: #ced4da;

    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.08);
    --shadow-primary: rgba(13, 110, 253, 0.25);

    --text-dark: #212529;
    --text-muted: #6c757d;
}

/* ============================================
   RESET Y BASE
   ============================================ */
body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================
   NAVBAR - HEADER
   ============================================ */
.navbar.bg-primary,
.navbar[class*="bg-primary"] {
    background-color: #0b469ddb !important;
    color: white;
    box-shadow: 0 2px 4px var(--shadow-medium);
}

.navbar .navbar-brand,
.navbar .nav-link,
.navbar .text-white {
    color: white !important;
}

.navbar .nav-link:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-nav {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Navbar fijo en matricula_online.php */
body.matricula-online-page {
    --navbar-matricula-height: 56px;
    padding-top: var(--navbar-matricula-height);
}

#navbar-matricula-online.fixed-top {
    z-index: 1030;
}

/* Toastr por encima del navbar fijo */
#toast-container {
    z-index: 1100;
}

/* ============================================
   CARD MATRÍCULA (header estilo trámite + paso actual)
   ============================================ */
.card-matricula-online {
    border-radius: 0.85rem;
    overflow: hidden;
}

.card-matricula-online__header {
    background: linear-gradient(135deg, #0b469d 0%, #1565c0 55%, #1e88e5 100%);
}

.card-matricula-online__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.card-matricula-online__header .step-counter {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 5.5rem;
}

.card-matricula-online__header .step-number {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #fff;
    backdrop-filter: blur(10px);
}

.card-matricula-online__header .step-label {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 500;
    color: #fff;
    line-height: 1.2;
}

/* ============================================
   PESTAÑAS DEL PORTAL (Matrícula / Mis notas)
   ============================================ */
.portal-estudiante-tabs .nav-link {
    color: #0b469d;
    font-weight: 600;
    border-radius: 2rem;
    padding: 0.45rem 1.1rem;
}

.portal-estudiante-tabs .nav-link.active {
    background: linear-gradient(135deg, #0b469d 0%, #1565c0 100%);
    color: #fff;
}

.alert.mo-alert-cerrado {
    display: flex !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
    background-color: #fffcf2;
    border-color: #f5e3a8;
    border-left-color: #f0c850;
    color: #7a5d0a;
}

.mo-alert-cerrado__icon {
    display: inline-block;
    flex: 0 0 auto;
    font-size: 1.35rem;
    line-height: 1;
    color: #d4a017;
}

.mo-alert-cerrado__texto {
    flex: 1 1 auto;
    min-width: 0;
}

/* ============================================
   MIS NOTAS
   ============================================ */
#tab_mis_notas .mn-badge-semestre {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    letter-spacing: 0.3px;
}

#tab_mis_notas .mn-btn-actualizar {
    font-weight: 600;
    border-width: 1.5px;
}

#tab_mis_notas .mn-btn-actualizar:hover,
#tab_mis_notas .mn-btn-actualizar:focus {
    color: #0b469d;
}

#tab_mis_notas .mn-mensaje__cuerpo {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.6rem;
}

#tab_mis_notas .mn-mensaje__icon {
    flex: 0 0 auto;
    font-size: 1.25rem;
    line-height: 1;
}

#tab_mis_notas .mn-seccion-titulo {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #1e3c72;
    padding-bottom: 0.4rem;
    margin-bottom: 0.85rem;
    border-bottom: 2px solid rgba(30, 60, 114, 0.12);
}

/* Tarjetas de estado (compactas, estilo status-card del wizard) */
#tab_mis_notas .mn-status {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    padding: 0.7rem 1rem;
    background: #fff;
    border: 1px solid rgba(30, 60, 114, 0.08);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#tab_mis_notas .mn-status:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.16);
}

#tab_mis_notas .mn-status__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
}

#tab_mis_notas .mn-status__icon--academic {
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
}

#tab_mis_notas .mn-status__icon--financial {
    background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
}

#tab_mis_notas .mn-status__icon--period {
    background: linear-gradient(135deg, #fb8c00 0%, #f57c00 100%);
}

#tab_mis_notas .mn-status__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

#tab_mis_notas .mn-status__titulo {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e3c72;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Pastillas de estado (estilo status-badge del wizard) */
#tab_mis_notas .mn-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

#tab_mis_notas .mn-pill--ok {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

#tab_mis_notas .mn-pill--warn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

#tab_mis_notas .mn-pill--info {
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
}

#tab_mis_notas .mn-pill--neutral {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
}

/* Cronograma de aportes */
#tab_mis_notas .mn-aporte {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
    padding: 0.8rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-top: 3px solid #adb5bd;
    border-radius: 10px;
    box-shadow: 0 2px 8px var(--shadow-light);
}

#tab_mis_notas .mn-aporte__numero {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    background: #e9ecef;
    color: var(--text-muted);
}

#tab_mis_notas .mn-aporte__body {
    flex: 1 1 auto;
    min-width: 0;
}

#tab_mis_notas .mn-aporte__titulo {
    font-weight: 700;
    color: #1e3c72;
}

#tab_mis_notas .mn-aporte__fechas {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

#tab_mis_notas .mn-aporte--publicado {
    border-top-color: #00a085;
}

#tab_mis_notas .mn-aporte--publicado .mn-aporte__numero {
    background: rgba(0, 184, 148, 0.12);
    color: #00836b;
}

#tab_mis_notas .mn-aporte--registro {
    border-top-color: #1976d2;
}

#tab_mis_notas .mn-aporte--registro .mn-aporte__numero {
    background: rgba(30, 136, 229, 0.12);
    color: #1565c0;
}

/* Tabla de notas: columnas de aporte y promedio con ancho fijo */
#tab_mis_notas #mn_tabla_notas {
    table-layout: fixed;
    width: 100%;
}

#tab_mis_notas .mn-col-num {
    width: 3.25rem;
}

#tab_mis_notas .mn-col-curso {
    width: 15rem;
}

#tab_mis_notas .mn-col-promedio {
    width: 8.5rem;
}

/* Competencia (código) y nota final de cada competencia */
#tab_mis_notas .mn-col-competencia {
    width: 4.75rem;
}

#tab_mis_notas .mn-col-final {
    width: 10rem;
}

/* Curso: nombre legible y alineado a la izquierda */
#tab_mis_notas #mn_tabla_notas td.mn-celda-curso {
    text-align: left;
    word-break: normal;
    overflow-wrap: break-word;
}

/* Un grupo por curso: separador y resaltado de todas sus filas al pasar el cursor */
#tab_mis_notas #mn_tabla_notas > tbody.mn-curso {
    border-top: 2px solid #ced4da;
}

#tab_mis_notas #mn_tabla_notas > tbody.mn-curso:hover > tr > td {
    background-color: #f1f6fd;
}

#tab_mis_notas .mn-competencia {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.4rem;
    background: #f8f9fa;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: help;
}

#tab_mis_notas .mn-card-competencia {
    border-left: 3px solid var(--bs-border-color, #dee2e6);
    padding-left: 0.65rem;
}

#tab_mis_notas #mn_tabla_notas td {
    overflow-wrap: anywhere;
    word-break: break-word;
    vertical-align: middle;
}

#tab_mis_notas .mn-comentario {
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Boleta de notas */
#tab_mis_notas .mn-boleta {
    padding: 1.1rem 1.25rem;
    border: 1px solid rgba(30, 60, 114, 0.12);
    border-left: 4px solid #1976d2;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 100%);
}

#tab_mis_notas .mn-boleta--disponible {
    border-left-color: #00a085;
    background: linear-gradient(135deg, #f0fbf7 0%, #ffffff 100%);
}

#tab_mis_notas .mn-boleta__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #1e88e5 0%, #1976d2 100%);
}

#tab_mis_notas .mn-boleta--disponible .mn-boleta__icon {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
}

#tab_mis_notas .mn-boleta__condiciones li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.45rem 0;
}

#tab_mis_notas .mn-boleta__condiciones li + li {
    border-top: 1px dashed var(--border-color);
}

#tab_mis_notas .mn-boleta__check {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #adb5bd;
}

#tab_mis_notas .mn-cond--ok .mn-boleta__check {
    color: #00a085;
}

#tab_mis_notas .mn-cond--pendiente .mn-boleta__check {
    color: #e67e22;
}

#tab_mis_notas .mn-boleta__acciones {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(0, 160, 133, 0.2);
}

#tab_mis_notas .mn-boleta__acciones.d-none {
    display: none !important;
}

#tab_mis_notas .mn-nivel {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: normal;
    max-width: 100%;
}

#tab_mis_notas .mn-nivel-previo {
    background: #f8d7da;
    color: #842029;
}

#tab_mis_notas .mn-nivel-inicio {
    background: #ffe5d0;
    color: #8a3c00;
}

#tab_mis_notas .mn-nivel-proceso {
    background: #fff3cd;
    color: #664d03;
}

#tab_mis_notas .mn-nivel-logrado {
    background: #d1e7dd;
    color: #0f5132;
}

#tab_mis_notas .mn-nivel-destacado {
    background: #cfe2ff;
    color: #084298;
}

#tab_mis_notas .mn-nivel-otro,
#tab_mis_notas .mn-nivel-vacio,
#tab_mis_notas .mn-nivel-pendiente {
    background: #e9ecef;
    color: var(--text-muted);
    font-weight: 500;
}

#tab_mis_notas .mn-card-curso {
    border-radius: 0.6rem;
}

@media (max-width: 575.98px) {
    #matricula_cambio_clave_panel.container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.card-body {
    background-color: white;
}

/* ============================================
   INPUTS
   ============================================ */
.form-control {
    border: 1px solid var(--border-input);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--shadow-primary);
    outline: none;
}

.form-control-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}

.form-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-muted);
}

/* ============================================
   BOTONES
   ============================================ */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-primary:active,
.btn-primary:focus {
    background-color: var(--primary-active);
    border-color: var(--primary-active);
    color: white;
}

.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem var(--shadow-primary);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert-warning {
    background-color: var(--warning-bg);
    border-color: var(--warning);
    color: #856404;
    border-left: 4px solid var(--warning);
}

.alert-success {
    background-color: var(--success-bg);
    border-color: var(--success);
    color: #0f5132;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background-color: var(--danger-bg);
    border-color: var(--danger);
    color: #842029;
    border-left: 4px solid var(--danger);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    background-color: var(--bg-light);
    padding: 2rem 0;
    min-height: calc(100vh - 56px);
}

/* ============================================
   PÁGINA DE LOGIN
   ============================================ */
body.login-page {
    background-image: url(../images/fondo-de-escritorio.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #FFFFFF;
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-header h2 {
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(13, 110, 253, 0.3);
    font-size: 2.2rem;
}

.login-header h6 {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    font-size: 1rem;
}

.login-content {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 24px var(--shadow-medium);
}

.login-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px var(--shadow-medium) !important;
}

.login-content h4 {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.badge-estudiante {
    background: var(--success);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.75rem;
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.badge-estudiante i {
    margin-right: 0.4rem;
}

/* Formulario de login - Floating Labels */
.form-floating-custom {
    position: relative;
}

.form-floating-custom .form-control {
    height: 58px;
    padding-left: 50px;
    padding-right: 50px;
    border: 1px solid var(--border-input);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-floating-custom .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--shadow-primary);
    outline: none;
}

.form-floating-custom .form-control:focus~label,
.form-floating-custom .form-control:not(:placeholder-shown)~label {
    color: var(--primary);
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    opacity: 1;
}

.form-floating-custom .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating-custom .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 5;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.form-floating-custom:focus-within .input-icon {
    color: var(--primary);
}

.form-floating-custom label {
    padding-left: 50px;
    color: var(--text-muted);
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
}

.form-floating-custom .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0;
    cursor: pointer;
    z-index: 15;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin: 0;
}

.form-floating-custom .password-toggle:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.form-floating-custom .password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--shadow-primary);
}

.form-floating-custom .password-toggle i {
    line-height: 1;
}

/* Botón de login */
#btn_login {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

#btn_login:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

#btn_login:active {
    background-color: var(--primary-active);
    border-color: var(--primary-active);
    transform: translateY(0);
}

.login-container>p {
    text-align: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.col-form-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 1.0rem;
}

