:root {
    --sa-shell-primary: #2E8B57;
    --sa-shell-primary-soft: #e8f5ed;
    --sa-shell-primary-dark: #256f46;
    --sa-shell-primary-active: #2b7f4f;
    --sa-shell-border: #d4e5db;
    --sa-shell-text: #243a2f;
    --sa-shell-muted: #5f786a;
    --sa-shell-surface: #ffffff;
    --sa-shell-bg: #edf5f0;
    --sa-sidebar-expanded: 17.25rem;
    --sa-sidebar-collapsed: 5.35rem;
    --sa-sidebar-gap: 1rem;
    --sa-content-max: 76rem;
    --sa-content-gutter: 1.15rem;
    --sa-content-gutter-lg: 1.35rem;
}

.dashboard-shell {
    background: var(--sa-shell-bg);
    color: var(--sa-shell-text);
    overflow-x: hidden;
}

.dashboard-shell,
.dashboard-shell * {
    box-sizing: border-box;
}

.dashboard-shell .ds-shell-backdrop {
    min-height: 260px;
    top: 0;
    background:
        radial-gradient(circle at 12% -10%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(118deg, #256f46 0%, #2E8B57 57%, #3a9d66 100%);
    pointer-events: none;
}

.dashboard-shell .ds-main-content {
    position: relative;
}

.dashboard-shell .ds-main-content > .container-fluid,
.dashboard-shell .ds-main-content > .container {
    width: 100%;
    max-width: var(--sa-content-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--sa-content-gutter);
    padding-right: var(--sa-content-gutter);
}

.dashboard-shell .modal {
    z-index: 1080;
}

.dashboard-shell .modal-backdrop {
    z-index: 1070;
}

.dashboard-shell .sa-shell-sidebar {
    width: var(--sa-sidebar-expanded);
    margin: 1rem 0 1rem 1rem;
    border-radius: 1.15rem;
    background: #256f46 !important;
    box-shadow: 0 16px 36px rgba(28, 84, 63, 0.15);
    padding: 0.75rem 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 2rem);
    overflow: hidden;
    transition: width 0.22s ease, padding 0.22s ease;
    z-index: 1060 !important;
}

.dashboard-shell .sa-shell-brand {
    padding: 0.35rem 0.45rem 0.6rem;
    position: relative;
}

.dashboard-shell .sa-shell-collapse-btn {
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid #3e8067;
    border-radius: 0.55rem;
    background: #29644d;
    color: #e9f3ee;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: absolute;
    top: 0.25rem;
    right: 0.35rem;
}

.dashboard-shell .sa-shell-collapse-btn:hover {
    background: #2f7157;
}

.dashboard-shell .sa-shell-brand .navbar-brand {
    width: 100%;
    justify-content: center;
    overflow: hidden;
}

.dashboard-shell .sa-shell-brand .navbar-brand-img {
    max-height: 3.2rem;
    width: auto;
}

.dashboard-shell .sa-shell-brand-subtitle {
    margin-top: 0.35rem;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a8d0bf;
}

.dashboard-shell .sa-shell-nav {
    padding: 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-shell .sa-shell-sidebar .navbar-collapse {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    flex: 1 1 auto;
}

.dashboard-shell .sa-shell-sidebar .navbar-nav {
    width: 100%;
    align-items: stretch;
}

.dashboard-shell .sa-shell-sidebar .navbar-nav .nav-item,
.dashboard-shell .sa-shell-sidebar .navbar-nav .nav-item form {
    width: 100%;
}

.dashboard-shell .sa-shell-sidebar .nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    color: #edf7f2 !important;
}

.dashboard-shell .sa-shell-sidebar .nav-link .nav-link-text,
.dashboard-shell .sa-shell-sidebar .nav-link i,
.dashboard-shell .sa-shell-sidebar .nav-link .lucide-icon {
    color: #edf7f2 !important;
}

.dashboard-shell .sa-shell-section {
    padding: 0.85rem 0.6rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #a8cdbf !important;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.dashboard-shell .sa-shell-link {
    border-radius: 0.8rem;
    margin: 0.1rem 0;
    padding: 0.65rem 0.72rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.56rem;
    color: #edf7f2 !important;
    transition: all 0.18s ease;
    white-space: nowrap;
    overflow: hidden;
}

.dashboard-shell .sa-shell-link .nav-link-text,
.dashboard-shell .sa-shell-link i,
.dashboard-shell .sa-shell-link .lucide-icon,
.dashboard-shell .sa-shell-section {
    color: #edf7f2 !important;
}

.dashboard-shell .sa-shell-sidebar .nav-link .nav-link-text {
    flex: 1 1 auto;
    margin: 0 !important;
    text-align: left !important;
}

.dashboard-shell .sa-shell-link .sa-shell-link-icon i,
.dashboard-shell .sa-shell-link .sa-shell-link-icon .lucide-icon {
    color: #edf7f2 !important;
}

.dashboard-shell .sa-shell-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
}

.dashboard-shell .sa-shell-link.active {
    background: #2c8a3f;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dashboard-shell .sa-shell-link.active .nav-link-text,
.dashboard-shell .sa-shell-link.active i,
.dashboard-shell .sa-shell-link.active .lucide-icon {
    color: #ffffff !important;
}

.dashboard-shell .sa-shell-link-icon {
    width: 1.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    margin: 0;
}

.dashboard-shell .sa-shell-link-icon i,
.dashboard-shell .sa-shell-link-icon .lucide-icon {
    margin: 0 !important;
}

.dashboard-shell .sa-shell-link.active .sa-shell-link-icon {
    background: transparent;
}

.dashboard-shell .sa-shell-sidebar-footer {
    margin-top: auto;
    padding: 0.35rem 0.25rem 0;
}

.dashboard-shell .sa-shell-logout {
    border-top: 1px solid var(--sa-shell-border);
    border-radius: 0;
    margin-top: 0.4rem;
    padding-top: 0.9rem;
    color: #edf7f2;
}

.dashboard-shell .sa-shell-logout .sa-shell-link-icon {
    background: transparent;
}

.dashboard-shell .sa-shell-topbar {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(223, 228, 241, 0.95);
    box-shadow: 0 12px 24px rgba(23, 70, 53, 0.08);
    backdrop-filter: blur(5px);
}

.dashboard-shell .sa-shell-title-wrap {
    line-height: 1.2;
}

.dashboard-shell .sa-shell-kicker {
    color: var(--sa-shell-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-shell .sa-shell-page-title {
    color: #234536;
    font-size: 1.12rem;
    font-weight: 700;
}

.dashboard-shell .sa-shell-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #2f5645;
    background: #edf6f2;
    border: 1px solid #cfe2d9;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
}

.dashboard-shell #iconNavbarSidenav .sidenav-toggler-inner .sidenav-toggler-line {
    background: #344767;
}

.dashboard-shell .sa-mobile-menu-btn {
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 1062;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.7rem;
    border: 1px solid #cfe1d9;
    background: #ffffff;
    color: #1f4f3d;
    box-shadow: 0 10px 22px rgba(17, 62, 46, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.dashboard-shell .sa-mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(15, 31, 24, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}


@media (min-width: 1200px) {
    .dashboard-shell .main-content {
        margin-left: calc(var(--sa-sidebar-expanded) + var(--sa-sidebar-gap) + 0.75rem);
        margin-right: 1rem;
        width: auto;
        max-width: none;
    }

    .dashboard-shell .ds-main-content > .container-fluid,
    .dashboard-shell .ds-main-content > .container {
        padding-left: var(--sa-content-gutter-lg);
        padding-right: var(--sa-content-gutter-lg);
    }

    .dashboard-shell.sa-sidebar-collapsed .sa-shell-sidebar {
        width: var(--sa-sidebar-collapsed);
        padding-left: 0.45rem;
        padding-right: 0.45rem;
    }

    .dashboard-shell.sa-sidebar-collapsed .sa-shell-brand .navbar-brand-img {
        width: 2.35rem;
        height: 2.35rem;
        max-height: none;
        object-fit: cover;
        object-position: left center;
        border-radius: 0.45rem;
    }

    .dashboard-shell.sa-sidebar-collapsed .sa-shell-brand-subtitle,
    .dashboard-shell.sa-sidebar-collapsed .sa-shell-section,
    .dashboard-shell.sa-sidebar-collapsed .sa-shell-link .nav-link-text {
        display: none;
    }

    .dashboard-shell.sa-sidebar-collapsed .sa-shell-link {
        justify-content: center;
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }

    .dashboard-shell.sa-sidebar-collapsed .sa-shell-link-icon {
        margin: 0;
    }

    .dashboard-shell.sa-sidebar-collapsed .sa-shell-sidebar-footer .sa-shell-link {
        justify-content: center;
    }

    .dashboard-shell.sa-sidebar-collapsed .main-content {
        margin-left: calc(var(--sa-sidebar-collapsed) + var(--sa-sidebar-gap) + 0.75rem);
        width: auto;
        max-width: none;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .dashboard-shell .main-content {
        margin-left: calc(var(--sa-sidebar-expanded) + 0.75rem);
        margin-right: 0.75rem;
        width: auto;
        max-width: none;
    }
}

@media (min-width: 1536px) {
    :root {
        --sa-content-max: 80rem;
    }
}

@media (max-width: 991.98px) {
    .dashboard-shell .sa-shell-sidebar {
        margin: 0 !important;
        border-radius: 0 1rem 1rem 0;
        padding-top: 1rem;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(86vw, 21rem) !important;
        transform: translateX(-108%);
        transition: transform 0.24s ease;
        z-index: 1060 !important;
    }

    .dashboard-shell .main-content {
        margin-left: 0;
        margin-right: 0;
        padding-top: 2.8rem;
    }

    .dashboard-shell .ds-main-content > .container-fluid,
    .dashboard-shell .ds-main-content > .container {
        max-width: 100%;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .dashboard-shell .sa-shell-topbar {
        margin-top: 0.65rem;
    }

    .dashboard-shell.sa-mobile-nav-open .sa-shell-sidebar {
        transform: translateX(0);
    }

    .dashboard-shell.sa-mobile-nav-open .sa-mobile-nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 575.98px) {
    .dashboard-shell .sa-mobile-menu-btn {
        top: 0.6rem;
        left: 0.6rem;
        width: 2.35rem;
        height: 2.35rem;
    }
}
