body {
    font-family: "Segoe UI", sans-serif;
    background: #f3f5f8;
}

.dashboard-body {
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1e3a8a, #1e40af);
    box-shadow: 8px 0 24px rgba(15, 23, 42, 0.12);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.sidebar-logo {
    width: 180px;
    max-width: calc(100% - 0.5rem);
    margin-inline: auto;
    box-sizing: border-box;
    overflow: hidden;
    flex: 0 0 auto;
}

.sidebar-logo-img {
    display: block !important;
    box-sizing: border-box;
    width: 180px !important;
    max-width: 100% !important;
    height: 180px !important;
    max-height: 180px !important;
    object-fit: cover !important;
    object-position: center;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Escritorio: el menú lateral no encoge ni crece con el contenido (Bootstrap `d-flex` usa flex-shrink: 1 por defecto). */
@media (min-width: 992px) {
    #app-shell > aside.sidebar {
        flex: 0 0 250px;
        width: 250px;
        min-width: 250px;
        max-width: 250px;
        overflow-x: hidden;
    }

    #app-shell > main.content {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.sidebar-offcanvas .sidebar-logo {
    max-width: 180px;
    margin-inline: auto;
}

.sidebar-offcanvas .sidebar-logo-img {
    max-height: 180px;
}

.content {
    min-height: 100vh;
}

.stat-card {
    border: none;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
}

.stat-icon {
    font-size: 1.45rem;
    line-height: 1;
    opacity: 0.9;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
}

.card {
    border-radius: 16px;
}

.sidebar .nav-link {
    border-radius: 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(2px);
}

.menu-group-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-group-toggle:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.menu-group-toggle .chevron {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.menu-group-toggle.collapsed .chevron {
    transform: rotate(-90deg);
}

.menu-submenu {
    padding-left: 1rem;
    margin-top: 0.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-submenu .nav-link {
    font-size: 0.92rem;
    background: rgba(255, 255, 255, 0.05);
}

.table td,
.table th {
    vertical-align: middle;
}

.pick-ingreso-estudiante,
.pick-ingreso-concepto {
    cursor: pointer;
}

.pick-ingreso-estudiante:active,
.pick-ingreso-concepto:active {
    background-color: rgba(13, 110, 253, 0.08);
}

.sidebar-offcanvas {
    width: min(288px, 88vw);
    background: linear-gradient(180deg, #1e3a8a, #1e40af);
}

@media (max-width: 991px) {
    .content {
        min-height: inherit;
    }
}
