.app-shell {
    background: radial-gradient(circle at 0% 0%, #edf3fb 0%, #e7eef8 35%, #eef3fa 100%);
}

.app-shell .HOMEfondo {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.app-shell .top-header {
    border: 1px solid #d7e3f2;
    border-radius: 14px;
    background: linear-gradient(125deg, #f8fbff 0%, #eef4fb 100%);
    box-shadow: 0 10px 22px rgba(12, 37, 65, 0.08);
    margin: 8px 0 10px;
    padding: 12px 14px;
}

.app-shell .brand-logo {
    max-height: 88px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(8, 28, 49, 0.18));
}

.app-shell .top-quick-links {
    margin-top: 14px;
}

.app-shell .top-quick-links a {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 12px;
    margin: 0 2px;
    color: #1f5a8a;
    background: #eaf2fc;
    border: 1px solid #c7dbf1;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
}

.app-shell .top-quick-links a:hover,
.app-shell .top-quick-links a:focus {
    background: #1f5a8a;
    color: #ffffff;
    text-decoration: none;
}

.app-shell .top-quick-links .hidden-print {
    color: #8aa5c2;
}

.app-shell .social-links-compact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding-top: 4px;
    padding-bottom: 8px;
}

.app-shell .social-link-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 10px;
    border: 1px solid #d0dff0;
    background: #f7fbff;
    box-shadow: 0 4px 8px rgba(10, 35, 60, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.app-shell .social-link-item:hover,
.app-shell .social-link-item:focus {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(10, 35, 60, 0.14);
    text-decoration: none;
}

.app-shell .social-link-icon {
    width: 44px;
    height: 44px;
    max-width: 44px;
    max-height: 44px;
    display: block;
}

.app-shell .sag-navbar.navbar {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(125deg, #0e3359 0%, #1e5f9b 55%, #2b7dbc 100%);
    box-shadow: 0 12px 24px rgba(7, 30, 53, 0.2);
    margin-bottom: 14px;
    min-height: 52px;
}

.app-shell .sag-navbar .navbar-brand {
    color: #ffffff !important;
    font-size: 18px;
}

.app-shell .sag-navbar .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background 0.18s ease, color 0.18s ease;
}

.app-shell .sag-navbar .navbar-nav > li > a:hover,
.app-shell .sag-navbar .navbar-nav > li > a:focus,
.app-shell .sag-navbar .navbar-nav > .open > a,
.app-shell .sag-navbar .navbar-nav > .open > a:hover,
.app-shell .sag-navbar .navbar-nav > .open > a:focus {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

.app-shell .sag-navbar .dropdown-menu {
    border-radius: 10px;
    border: 1px solid #d9e4f3;
    box-shadow: 0 8px 20px rgba(6, 29, 52, 0.14);
    padding: 6px;
}

.app-shell .sag-navbar .dropdown-menu > li > a {
    border-radius: 8px;
    padding: 7px 10px;
    color: #1f4061;
    font-weight: 600;
}

.app-shell .sag-navbar .dropdown-menu > li > a:hover,
.app-shell .sag-navbar .dropdown-menu > li > a:focus {
    background: #edf4fd;
    color: #0f355e;
}

.app-shell .main-content-wrap {
    border: 1px solid #d7e4f3;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
    box-shadow: 0 12px 24px rgba(6, 31, 58, 0.1);
    padding: 12px;
    animation: shellFadeUp 0.42s ease both;
}

@keyframes shellFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-shell .site-footer {
    margin-top: 14px;
    border: 1px solid #d5e2f1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 16px rgba(6, 31, 58, 0.08);
    padding: 10px 12px;
}

.app-shell .site-footer a {
    color: #276799;
    font-weight: 700;
}

.app-shell .site-footer .copyright {
    color: #38546f;
    font-weight: 600;
    margin-bottom: 2px;
}

@media (max-width: 991px) {
    .app-shell .top-header {
        padding: 10px;
    }

    .app-shell .brand-logo {
        max-height: 74px;
    }

    .app-shell .sag-navbar .navbar-nav > li > a {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-shell .main-content-wrap,
    .app-shell .social-link-item {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 767px) {
    .app-shell .top-header {
        border-radius: 10px;
    }

    .app-shell .top-quick-links {
        margin-top: 8px;
        text-align: left !important;
    }

    .app-shell .top-quick-links a {
        margin: 0 4px 6px 0;
    }

    .app-shell .sag-navbar.navbar {
        border-radius: 10px;
    }

    .app-shell .main-content-wrap {
        border-radius: 10px;
        padding: 8px;
    }

    .app-shell .site-footer {
        border-radius: 10px;
    }

    .app-shell .social-links-compact {
        justify-content: flex-start;
    }

    .app-shell .social-link-item {
        width: 40px;
        height: 40px;
    }

    .app-shell .top-header-right {
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px;
    }

    .app-shell .top-quick-links {
        margin-top: 0;
        flex: 1;
        text-align: left !important;
    }

    .app-shell .header-social-icons .social-link-item {
        width: 32px;
        height: 32px;
    }

    .app-shell .header-social-icons .social-link-icon {
        width: 16px;
        height: 16px;
    }
}

/* Header Social Icons Integration */
.app-shell .top-header-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0;
}

.app-shell .header-social-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.app-shell .header-social-icons .social-links-compact {
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.app-shell .header-social-icons .social-link-item {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #c7dbf1;
    background: #f7fbff;
    box-shadow: 0 4px 8px rgba(10, 35, 60, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-shell .header-social-icons .social-link-item:hover,
.app-shell .header-social-icons .social-link-item:focus {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(10, 35, 60, 0.14);
    background: #eef4fb;
}

.app-shell .header-social-icons .social-link-icon {
    width: 24px;
    height: 24px;
}

/* Sidebar Collapsible */
.app-shell .main-content-area {
    position: relative;
}

.app-shell .sidebar-toggle-container {
    margin-bottom: 12px;
    display: flex;
    justify-content: flex-end;
}

.app-shell .sidebar-toggle-btn {
    background: none;
    border: 1px solid #d7e4f3;
    border-radius: 8px;
    padding: 8px 10px;
    color: #1f4061;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.app-shell .sidebar-toggle-btn:hover,
.app-shell .sidebar-toggle-btn:focus {
    background: #edf4fd;
    border-color: #b0d0f0;
    color: #0f355e;
}

.app-shell .sidebar-collapsible {
    transition: opacity 0.3s ease, max-height 0.3s ease, visibility 0.3s ease;
    max-height: 9999px;
    opacity: 1;
    visibility: visible;
}

.app-shell .sidebar-collapsible.sidebar-closed {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
}

/* Responsive Sidebar */
@media (min-width: 992px) {
    .app-shell .main-content-area {
        padding-right: 0;
    }

    .app-shell .sidebar-toggle-container {
        display: none;
    }

    .app-shell .sidebar-collapsible {
        max-height: 9999px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .app-shell .sidebar-collapsible.sidebar-closed {
        max-height: 9999px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

@media (max-width: 991px) {
    .app-shell .col-md-9 {
        width: 100%;
        padding-right: 15px;
    }

    .app-shell .col-md-3 {
        width: 100%;
    }

    .app-shell .sidebar-collapsible {
        margin-top: 12px;
        border-top: 1px solid #d7e4f3;
        padding-top: 12px;
    }
}

@media (max-width: 767px) {
    .app-shell .sidebar-toggle-btn {
        padding: 6px 8px;
        font-size: 16px;
    }

    .app-shell .navbar-social-icons {
        gap: 4px;
        padding: 0 4px;
    }

    .app-shell .navbar-social-icons .social-link-item {
        width: 28px;
        height: 28px;
    }

    .app-shell .navbar-social-icons .social-link-icon {
        width: 16px;
        height: 16px;
    }
}

