@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&display=swap');
/* ============================================================
   Sistema de Gestión Universitaria — Identidad Visual Enterprise
   Paleta: Azul Noche Institucional + Acento Dorado
   Tipografía: Fraunces (Display) + Public Sans (Texto) + IBM Plex Mono (Códigos)
   ============================================================ */

:root {
    /* Paleta de Colores Principal */
    --sgu-navy-950: #0F2A3C;
    --sgu-navy-900: #123449;
    --sgu-navy-800: #1B4965;
    --sgu-navy-700: #24608A;
    --sgu-gold-500: #2A9D8F;
    --sgu-gold-400: #23897C;
    --sgu-paper:    #F4F7F9;
    --sgu-paper-2:  #FFFFFF;
    --sgu-ink:      #0F2A3C;
    --sgu-ink-soft: #64748B;
    --sgu-line:     #E2E8F0;
    --sgu-success:  #23897C;
    --sgu-danger:   #D64550;

    /* Escala Tipográfica Compacta */
    --fs-2xs:  0.65rem;  /* Categorías de menú, metadatos secundarios */
    --fs-xs:   0.72rem;  /* Badges, encabezados de tablas, tags */
    --fs-sm:   0.78rem;  /* Labels de formularios, código monoespaciado */
    --fs-base: 0.85rem;  /* Texto general de body, filas de tabla, inputs */
    --fs-md:   0.90rem;  /* Botones, enlaces principales de menú */
    --fs-lg:   1.00rem;  /* Títulos de tarjetas y secciones */

    /* Bordes y Sombras */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 10px rgba(15, 42, 60, 0.06);
    --shadow-md: 0 8px 30px rgba(15, 42, 60, 0.10);
    --shadow-lg: 0 8px 30px rgba(15, 42, 60, 0.10);
}

* { 
    box-sizing: border-box; 
}

body {
    background: var(--sgu-paper);
    color: var(--sgu-ink);
    font-family: 'Sora', sans-serif;
    font-size: var(--fs-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
    font-family: 'Sora', sans-serif;
    letter-spacing: -0.015em;
}

.text-mono, .code-tag, .row-code {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

a { 
    color: var(--sgu-navy-800);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--sgu-navy-700);
}

/* ---------------- Personalización de Scrollbars ---------------- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(74, 90, 117, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 90, 117, 0.5);
}

/* ---------------- Login ---------------- */

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 46% 54%;
}

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-aside { display: none; }
}

.login-aside {
    background:
        radial-gradient(circle at 15% 20%, rgba(201,162,39,0.18), transparent 45%),
        linear-gradient(160deg, var(--sgu-navy-950) 0%, var(--sgu-navy-900) 55%, var(--sgu-navy-800) 100%);
    color: #eef1f6;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
}

.login-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(238,241,246,0.035) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(238,241,246,0.035) 0 1px, transparent 1px 42px);
    pointer-events: none;
}

.login-crest {
    width: 56px;
    height: 56px;
    border: 2px solid var(--sgu-gold-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 1.5rem;
    color: var(--sgu-gold-400);
    position: relative;
    z-index: 1;
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.2);
}

.login-aside .headline {
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    line-height: 1.18;
    max-width: 22ch;
    position: relative;
    z-index: 1;
}

.login-aside .subline {
    color: #b9c4d9;
    font-size: var(--fs-md);
    max-width: 40ch;
    position: relative;
    z-index: 1;
}

.login-aside .ledger {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2.25rem;
    border-top: 1px solid rgba(238,241,246,0.18);
    padding-top: 1.25rem;
}

.login-aside .ledger .num {
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    color: var(--sgu-gold-400);
    display: block;
}

.login-aside .ledger .lbl {
    font-size: var(--fs-2xs);
    color: #9fb0cb;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--sgu-paper-2);
}

.login-card {
    width: 100%;
    max-width: 380px;
}

.login-card .form-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sgu-ink-soft);
}

.login-card .form-control {
    border: 1px solid var(--sgu-line);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: var(--fs-base);
}

.login-card .form-control:focus {
    border-color: var(--sgu-navy-700);
    box-shadow: 0 0 0 3px rgba(28,58,99,0.12);
}

.btn-sgu {
    background: var(--sgu-navy-900);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--sgu-navy-800);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn:active { 
    transform: translateY(1px); 
}

/* ---------------- Dashboard Shell ---------------- */

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { display: none; }
}

.app-sidebar {
    background: var(--sgu-navy-950);
    color: #d7deeb;
    padding: 1.25rem 0.9rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.app-sidebar .brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    padding: 0 0.35rem;
}

.app-sidebar .brand .mark {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--sgu-gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    color: var(--sgu-gold-400);
    flex-shrink: 0;
}

.app-sidebar .brand .name {
    font-family: 'Sora', sans-serif;
    font-size: 0.98rem;
    line-height: 1.15;
    color: #f2f4f8;
}

.nav-section-label {
    font-size: var(--fs-2xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c8bab;
    margin: 1.2rem 0.35rem 0.35rem;
}

.app-sidebar .nav-link {
    color: #c3cce0;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.6rem;
    font-size: var(--fs-base);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.15s ease;
}

.app-sidebar .nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.app-sidebar .nav-link.active-group {
    background: rgba(201,162,39,0.14);
    color: var(--sgu-gold-400);
    font-weight: 500;
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid var(--sgu-line);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
}

.app-content {
    padding: 1.5rem;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: var(--fs-base);
}

.user-chip .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sgu-navy-900);
    color: var(--sgu-gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
}

/* ---------------- Overlay para Menú Móvil (Mejora de app1.css) ---------------- */

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

.sidebar-overlay.show {
    display: block;
}

/* ---------------- Module Cards ---------------- */

.category-heading {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 1.75rem 0 0.8rem;
}

.category-heading:first-child { margin-top: 0; }

.category-heading .code-tag {
    font-size: var(--fs-2xs);
    color: var(--sgu-gold-500);
    background: rgba(201,162,39,0.12);
    border: 1px solid rgba(201,162,39,0.35);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
}

.module-card {
    background: #fff;
    border: 1px solid var(--sgu-line);
    border-radius: var(--radius-md);
    padding: 1rem 1rem 0.9rem;
    text-decoration: none;
    color: var(--sgu-ink);
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.module-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--sgu-gold-500);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.module-card:hover {
    border-color: var(--sgu-navy-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--sgu-ink);
}

.module-card:hover::before { opacity: 1; }

.module-card .icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--sgu-paper);
    color: var(--sgu-navy-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.6rem;
}

.module-card .title {
    font-weight: 600;
    font-size: var(--fs-md);
    margin-bottom: 0.15rem;
}

.module-card .hint {
    font-size: var(--fs-xs);
    color: var(--sgu-ink-soft);
}

/* ---------------- Tarjetas de Métricas y KPIs (Mejora de app1.css) ---------------- */

.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    border: 1px solid var(--sgu-line);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(201, 162, 39, 0.12);
    color: var(--sgu-gold-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--sgu-navy-950);
    font-family: 'Sora', sans-serif;
    line-height: 1.1;
}

.stat-card .stat-label {
    color: var(--sgu-ink-soft);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* ---------------- Paneles Generales (Mejora de app1.css) ---------------- */

.card-panel {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--sgu-line);
    overflow: hidden;
}

.card-header {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid var(--sgu-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #e9ecef;
}

.card-title {
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--sgu-navy-950);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.empty-state {
    border: 1px dashed var(--sgu-line);
    border-radius: var(--radius-md);
    padding: 2.25rem;
    text-align: center;
    color: var(--sgu-ink-soft);
    font-size: var(--fs-base);
}

.alert {
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: var(--fs-base);
}

/* ---------------- Pantalla de Bienvenida ---------------- */

.welcome-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.welcome-topbar {
    background: #fff;
    border-bottom: 1px solid var(--sgu-line);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-toggle-btn {
    background: var(--sgu-navy-950);
    color: var(--sgu-gold-400);
    border: none;
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.15s ease;
}

.menu-toggle-btn:hover {
    background: var(--sgu-navy-800);
    color: var(--sgu-gold-400);
}

.welcome-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.welcome-content {
    text-align: center;
    max-width: 460px;
}

.welcome-content .logo-wrap {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--sgu-paper-2);
    border: 1px solid var(--sgu-line);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.welcome-content .logo-wrap img {
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
}

.welcome-content .logo-fallback {
    font-family: 'Sora', sans-serif;
    font-size: 2.4rem;
    color: var(--sgu-navy-800);
}

.welcome-content .company-name {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--sgu-ink);
    margin-bottom: 0.3rem;
}

.welcome-content .app-name {
    color: var(--sgu-ink-soft);
    font-size: var(--fs-md);
    letter-spacing: 0.02em;
}

/* Offcanvas */

.offcanvas {
    background: var(--sgu-navy-950);
    color: #d7deeb;
    width: 270px;
}

.offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.offcanvas .btn-close {
    filter: invert(1) grayscale(1) brightness(1.6);
}

/* ---------------- Módulos Internos (Optimizados para Tablas y Datos) ---------------- */

.module-shell, .main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.module-topbar {
    background: #fff;
    border-bottom: 1px solid var(--sgu-line);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 5;
}

.module-content, .page-content {
    padding: 1.5rem;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Toolbar de Filtros y Búsquedas */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.toolbar .filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.toolbar .filters .form-control,
.toolbar .filters .form-select {
    border: 1px solid var(--sgu-line);
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: var(--sgu-ink-soft);
    font-size: 0.8rem;
    pointer-events: none;
}

.search-box input.form-control {
    width: 100%;
    padding-left: 34px;
}

/* ---------------- Tablas de Datos Enterprise ---------------- */

.table-wrap {
    background: #fff;
    border: 1px solid var(--sgu-line);
    border-radius: var(--radius-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.table thead th {
    background: var(--sgu-paper);
    color: var(--sgu-ink-soft);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border-bottom: 1px solid var(--sgu-line);
    white-space: nowrap;
    padding: 0.75rem 0.9rem;
}

.table tbody td {
    vertical-align: middle;
    font-size: var(--fs-base);
    padding: 0.65rem 0.9rem;
    color: var(--sgu-ink);
    word-break: break-word;
    border-bottom: 1px solid var(--sgu-paper);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background: var(--sgu-paper-2);
}

.row-code {
    font-size: var(--fs-sm);
    color: var(--sgu-navy-800);
    font-weight: 500;
    white-space: nowrap;
}

.cell-nowrap {
    white-space: nowrap;
}

.avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sgu-paper);
    border: 1px solid var(--sgu-line);
    flex-shrink: 0;
}

.avatar-sm-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--sgu-navy-900);
    color: var(--sgu-gold-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Sora', sans-serif;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Badges de Estado */

.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.55rem;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 600;
    background: rgba(28,58,99,0.08);
    color: var(--sgu-navy-800);
    border: 1px solid rgba(28,58,99,0.18);
    white-space: nowrap;
}

.badge-inactivo,
.badge-rechazado {
    background: rgba(179,57,44,0.08);
    color: var(--sgu-danger);
    border-color: rgba(179,57,44,0.25);
}

.badge-aprobado,
.badge-completado {
    background: rgba(31,122,92,0.08);
    color: var(--sgu-success);
    border-color: rgba(31,122,92,0.25);
}

.badge-pendiente {
    background: rgba(201,162,39,0.12);
    color: #927210;
    border-color: rgba(201,162,39,0.35);
}

/* Iconos de Acción */

.action-icons {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.action-icons a,
.action-icons button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--sgu-ink-soft);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
}

.action-icons a:hover,
.action-icons button:hover {
    background: var(--sgu-paper);
    color: var(--sgu-navy-800);
}

.action-icons .text-danger:hover {
    background: rgba(179,57,44,0.08);
    color: var(--sgu-danger) !important;
}

/* ---------------- Formularios por Secciones ---------------- */

.form-section {
    background: #fff;
    border: 1px solid var(--sgu-line);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Sora', sans-serif;
    font-size: var(--fs-lg);
    color: var(--sgu-ink);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--sgu-line);
}

.form-section-title i {
    color: var(--sgu-gold-500);
}

.form-section .form-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--sgu-ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Campo Requerido / Obligatorio (Mejora de app1.css) */
.req {
    color: var(--sgu-danger);
    font-weight: bold;
    margin-left: 2px;
}

.form-section .form-control,
.form-section .form-select,
.form-control,
.form-select {
    font-size: var(--fs-base);
    border: 1px solid var(--sgu-line);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.8rem;
}

.form-section .form-control:focus,
.form-section .form-select:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--sgu-navy-700);
    box-shadow: 0 0 0 3px rgba(28,58,99,0.12);
}

.form-actions-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--sgu-line);
    padding: 0.8rem 1.35rem;
    margin: 0 -1.5rem -1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    z-index: 4;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}

.photo-upload-box {
    width: 130px;
    height: 130px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--sgu-line);
    background: var(--sgu-paper-2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.photo-upload-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-box .placeholder-icon {
    font-size: 1.8rem;
    color: var(--sgu-line);
}

/* ---------------- Estilo Personalizado para Selects ---------------- */

select.form-control,
select.form-select,
.form-section select.form-control,
.form-section select.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5a75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 0.9rem;
    padding-right: 2.3rem !important;
}

select.form-control::-ms-expand,
select.form-select::-ms-expand {
    display: none;
}

/* ---------------- Paginación ---------------- */

.pagination-sgu .page-link {
    font-size: var(--fs-base);
    color: var(--sgu-navy-800);
    border-color: var(--sgu-line);
    padding: 0.35rem 0.7rem;
}

.pagination .page-item.active .page-link {
    background: var(--sgu-navy-900);
    border-color: var(--sgu-navy-900);
    color: #fff;
}

/* ---------------- Integración de Select2 (Mejorado con app1.css) ---------------- */

.select2-container--default .select2-selection--single {
    border: 1px solid var(--sgu-line) !important;
    border-radius: var(--radius-sm) !important;
    height: calc(2.25rem + 2px) !important;
    padding: 0.25rem 0.5rem;
    font-size: var(--fs-base) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--sgu-ink) !important;
    line-height: 1.6;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 0.5rem;
}

/* Enfoque / Focus state */
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--sgu-navy-700) !important;
    box-shadow: 0 0 0 3px rgba(28, 58, 99, 0.12) !important;
}

/* Limpieza de Outlines / Bordes por defecto (Mejora de app1.css) */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single:focus,
.select2-selection:focus {
    outline: none !important;
}

.select2-search__field {
    outline: none !important;
    border: 1px solid var(--sgu-line) !important;
    border-radius: var(--radius-sm) !important;
}

/* Menú desplegable */
.select2-dropdown {
    border-color: var(--sgu-line) !important;
    border-radius: var(--radius-sm) !important;
    font-size: var(--fs-base) !important;
    box-shadow: var(--shadow-md) !important;
    outline: none !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--sgu-navy-800) !important;
    color: #fff !important;
}

label.form-label {
    font-weight: 700 !important;
}

h4.mb-3 {
    font-size: 0.9rem;
    font-weight: 700;
    background-color: #f1f1f1;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 1rem !important;
}
h4.mb-3::before {
    content: "\f5fd"; /* fa-layer-group */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
    color: #2196F3;
}
/* Inputs y selects normales (sin Select2) */
.form-control:required,
.form-select:required {
  box-shadow: inset 3px 0 0 0 #2196F3;
  transition: box-shadow 0.3s ease;
}

.form-control:required:focus,
.form-select:required:focus {
  box-shadow: inset 3px 0 0 0 #2196F3, 0 0 0 3px rgba(28, 58, 99, 0.12);
}

/* Selects con Select2 inicializados (select requerido + su contenedor generado) */
select.select2-hidden-accessible:required + .select2-container .select2-selection {
  box-shadow: inset 3px 0 0 0 #2196F3;
  transition: box-shadow 0.3s ease;
}

/* Estado enfocado/abierto de Select2 */
select.select2-hidden-accessible:required + .select2-container--open .select2-selection,
select.select2-hidden-accessible:required + .select2-container--focus .select2-selection {
  box-shadow: inset 3px 0 0 0 #2196F3, 0 0 0 3px rgba(28, 58, 99, 0.12);
}