:root {
    --shell-green-950: #003d28;
    --shell-green-900: #00492e;
    --shell-green-850: #005538;
    --shell-green-800: #00623d;
    --shell-gold: #d0a72c;
    --shell-gold-light: #f2d46a;
    --shell-red: #e63333;
    --shell-sidebar-width: 220px;
}

/* =========================================================
   HEADER — Phase 2.1
   ========================================================= */
.jsc-shell-header {
    position: relative;
    z-index: 1040;
    height: 102px;
    overflow: visible;
    padding: 0 !important;
    border-bottom: 3px solid var(--shell-gold);
    background: var(--shell-green-950);
    box-shadow: 0 5px 18px rgba(0, 43, 25, .12);
}

.jsc-shell-header-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        linear-gradient(
            90deg,
            rgba(0, 60, 38, .99) 0%,
            rgba(0, 73, 45, .93) 33%,
            rgba(0, 65, 40, .64) 58%,
            rgba(0, 58, 36, .91) 78%,
            rgba(0, 54, 33, .99) 100%
        ),
        url("../img/cbk bg.png?v=20260928rc2") 63% 42% / cover no-repeat;
}

.jsc-shell-header-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 42%, rgba(208, 167, 44, .09) 58%, transparent 78%),
        repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0 1px, transparent 1px 90px);
}

.jsc-shell-header-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: .65rem 1.35rem;
}

.jsc-shell-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.jsc-shell-brand:hover {
    color: #fff;
}

.jsc-shell-marks {
    width: 150px;
    height: 78px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.18));
}

.jsc-shell-brand-copy {
    min-width: 0;
    display: block;
}

.jsc-shell-brand-copy strong,
.jsc-shell-brand-copy span,
.jsc-shell-brand-copy small {
    display: block;
}

.jsc-shell-brand-copy strong {
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.28rem;
    line-height: 1.05;
    letter-spacing: .025em;
}

.jsc-shell-brand-copy > span {
    margin-top: .18rem;
    color: rgba(255,255,255,.97);
    font-size: 1rem;
    line-height: 1.15;
    font-weight: 600;
}

.jsc-shell-brand-copy small {
    margin-top: .42rem;
    color: var(--shell-gold-light);
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .12em;
    white-space: nowrap;
}

.jsc-shell-brand-copy small b {
    display: inline-block;
    margin: 0 .38rem;
    color: #fff;
    font-weight: 500;
}

.jsc-shell-user-zone {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
}

.jsc-shell-bell {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 45, 28, .48);
    border: 1px solid rgba(255,255,255,.12);
    text-decoration: none;
    font-size: 1.05rem;
    transition: background .18s ease, transform .18s ease;
}

.jsc-shell-bell:hover {
    color: #fff;
    background: rgba(0, 36, 23, .74);
    transform: translateY(-1px);
}

.jsc-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0 .28rem;
    border-radius: 999px;
    color: #fff;
    background: var(--shell-red);
    border: 2px solid var(--shell-green-950);
    font-size: .62rem;
    font-weight: 800;
}

.jsc-user-dropdown {
    min-width: 235px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 18px;
    align-items: center;
    gap: .72rem;
    padding: .38rem .55rem;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: rgba(0, 45, 28, .40);
    text-align: left;
}

.jsc-user-dropdown:hover,
.jsc-user-dropdown[aria-expanded="true"] {
    background: rgba(0, 38, 24, .70);
}

.jsc-user-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #d6ae34, #9d7114);
    border: 2px solid rgba(255,255,255,.62);
    box-shadow: 0 3px 10px rgba(0,0,0,.16);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
}

.jsc-user-copy {
    min-width: 0;
}

.jsc-user-copy strong,
.jsc-user-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jsc-user-copy strong {
    color: #fff;
    font-size: .81rem;
}

.jsc-user-copy small {
    margin-top: .08rem;
    color: rgba(255,255,255,.76);
    font-size: .64rem;
}

.jsc-user-chevron {
    color: rgba(255,255,255,.82);
    font-size: .72rem;
}

.jsc-user-menu {
    min-width: 255px;
    overflow: hidden;
    padding: .35rem;
    border: 1px solid #dfe8e3;
    border-top: 3px solid var(--shell-gold);
    border-radius: 10px;
    box-shadow: 0 16px 38px rgba(0, 44, 26, .16);
}

.jsc-user-menu-head {
    padding: .65rem .75rem .45rem;
}

.jsc-user-menu-head strong,
.jsc-user-menu-head span {
    display: block;
}

.jsc-user-menu-head strong {
    color: #1d3f30;
    font-size: .82rem;
}

.jsc-user-menu-head span {
    margin-top: .14rem;
    color: #718178;
    font-size: .68rem;
}

.jsc-user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .58rem .7rem;
    border-radius: 6px;
    color: #375145;
    font-size: .76rem;
}

.jsc-user-menu .dropdown-item:hover {
    color: var(--shell-green-800);
    background: #eef7f2;
}

.jsc-user-menu .dropdown-item i {
    width: 18px;
    color: var(--shell-green-800);
}

.jsc-mobile-menu {
    display: none;
}

/* =========================================================
   SIDEBAR — closer to approved reference
   ========================================================= */
@media (min-width: 992px) {
    .shell-sidebar.col-lg-2 {
        flex: 0 0 var(--shell-sidebar-width);
        width: var(--shell-sidebar-width);
        max-width: var(--shell-sidebar-width);
    }

    .dashboard-main.col-lg-10,
    main.col-lg-10 {
        flex: 0 0 calc(100% - var(--shell-sidebar-width));
        width: calc(100% - var(--shell-sidebar-width));
        max-width: calc(100% - var(--shell-sidebar-width));
    }
}

.shell-sidebar {
    position: relative;
    min-height: calc(100dvh - 102px);
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(0, 69, 43, .99), rgba(0, 60, 38, .99));
    border-right: 1px solid rgba(208, 167, 44, .24);
}

.shell-sidebar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 290px;
    pointer-events: none;
    opacity: .15;
    background:
        linear-gradient(180deg, transparent, rgba(0,42,25,.94)),
        url("../img/cbk bg.png?v=20260928rc2") center bottom / cover no-repeat;
}

.shell-nav {
    position: relative;
    z-index: 2;
    padding: 1rem .4rem 1.2rem;
}

.shell-nav-link {
    min-height: 51px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    margin: .18rem 0;
    padding: .52rem .72rem;
    border-left: 3px solid transparent;
    border-radius: 8px;
    color: rgba(255,255,255,.96);
    text-decoration: none;
    font-size: .9rem;
    transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.shell-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.shell-nav-link.active {
    color: #173d2b;
    border-left-color: #efc849;
    background: linear-gradient(90deg, #f2d66c, #dfb733);
    box-shadow: 0 5px 14px rgba(0,0,0,.12);
    font-weight: 750;
}

.shell-nav-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: #fff;
    font-size: 1.02rem;
}

.shell-nav-link.active .shell-nav-icon {
    color: #9b6f09;
}

.shell-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shell-nav-badge {
    min-width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    padding: 0 .35rem;
    border-radius: 999px;
    color: #fff;
    background: var(--shell-red);
    border: 2px solid rgba(255,255,255,.18);
    font-size: .64rem;
    font-weight: 800;
}

.shell-nav-chevron {
    color: rgba(255,255,255,.65);
    font-size: .68rem;
}

.shell-nav-link.active .shell-nav-chevron {
    color: #7d5d0e;
}

.shell-sidebar-brand {
    position: absolute;
    z-index: 2;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.4rem;
}

.shell-sidebar-emblem {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: .75rem;
    border: 1px solid rgba(239,200,73,.38);
    border-radius: 50%;
    color: #e9c14b;
    background: rgba(0,46,28,.45);
    font-size: 1.55rem;
}

.shell-sidebar-values span {
    display: block;
    margin: .16rem 0;
    color: #e9c14b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.shell-sidebar-gold-line {
    width: 36px;
    height: 2px;
    margin-top: .7rem;
    background: var(--shell-gold);
}

.shell-sidebar-overlay {
    display: none;
}

/* Footer aligned to approved dark-green/gold visual */
.footer-jsc {
    margin-left: -1.45rem;
    margin-right: -1.45rem;
    margin-bottom: 0;
    padding-left: 1.45rem !important;
    padding-right: 1.45rem !important;
    color: rgba(255,255,255,.90) !important;
    border-top: 2px solid var(--shell-gold) !important;
    background: linear-gradient(90deg, #005a37, #00462c);
}

/* =========================================================
   TABLE/CONTENT WIDTH + QUICK ACTION ALIGNMENT
   ========================================================= */
@media (min-width: 1400px) {
    .dashboard-content-grid > section.col-xxl-9 {
        flex: 0 0 70%;
        width: 70%;
        max-width: 70%;
    }

    .dashboard-content-grid > aside.col-xxl-3 {
        flex: 0 0 30%;
        width: 30%;
        max-width: 30%;
    }
}

.dashboard-right-column .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    padding: .8rem;
}

.dashboard-right-column .quick-action {
    min-width: 0;
    min-height: 68px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    padding: .62rem .7rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.dashboard-right-column .quick-action > i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin: 0;
    border-radius: 8px;
    font-size: 1.08rem;
}

.dashboard-right-column .quick-action strong {
    font-size: .72rem;
    line-height: 1.15;
    white-space: normal;
}

.dashboard-right-column .quick-action span {
    margin-top: .18rem;
    font-size: .60rem;
    line-height: 1.2;
}

.dashboard-right-column .action-green {
    background: linear-gradient(135deg, #07804b, #00623a);
}

.dashboard-right-column .action-gold {
    background: linear-gradient(135deg, #dda925, #c78b12);
}

.dashboard-right-column .action-soft {
    color: #155bb1;
    background: linear-gradient(135deg, #edf5ff, #dbeaff);
}

.dashboard-right-column .action-soft-gold {
    color: #7241a5;
    background: linear-gradient(135deg, #f5effe, #e9ddfb);
}

/* =========================================================
   MOBILE / TABLET
   ========================================================= */
@media (max-width: 1199.98px) {
    .jsc-shell-brand-copy strong {
        font-size: 1.04rem;
    }

    .jsc-shell-brand-copy > span {
        font-size: .86rem;
    }

    .jsc-shell-brand-copy small {
        display: none;
    }

    .jsc-shell-marks {
        width: 120px;
    }

    .jsc-user-dropdown {
        min-width: 205px;
    }
}

@media (max-width: 991.98px) {
    .jsc-shell-header {
        height: 76px;
    }

    .jsc-shell-header-inner {
        padding: .45rem .7rem;
        gap: .55rem;
    }

    .jsc-mobile-menu {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        flex: 0 0 40px;
        border: 1px solid rgba(255,255,255,.18);
        border-radius: 8px;
        color: #fff;
        background: rgba(0,44,27,.55);
        font-size: 1.25rem;
    }

    .jsc-shell-marks {
        width: 86px;
        height: 56px;
    }

    .jsc-shell-brand-copy strong {
        font-size: .86rem;
    }

    .jsc-shell-brand-copy > span {
        font-size: .72rem;
    }

    .jsc-shell-user-zone {
        margin-left: auto;
        gap: .4rem;
    }

    .jsc-shell-bell {
        width: 38px;
        height: 38px;
    }

    .jsc-user-dropdown {
        min-width: 0;
        grid-template-columns: 38px 18px;
        gap: .28rem;
        padding: .25rem;
    }

    .jsc-user-avatar {
        width: 38px;
        height: 38px;
    }

    .jsc-user-copy {
        display: none;
    }

    .shell-sidebar {
        position: fixed;
        z-index: 1060;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 290px) !important;
        max-width: min(82vw, 290px) !important;
        min-height: 100dvh;
        transform: translateX(-102%);
        transition: transform .22s ease;
        box-shadow: 16px 0 38px rgba(0,0,0,.22);
    }

    .shell-sidebar.open {
        transform: translateX(0);
    }

    .shell-nav {
        padding-top: 5.2rem;
    }

    .shell-sidebar-overlay {
        position: fixed;
        z-index: 1050;
        inset: 0;
        display: none;
        border: 0;
        background: rgba(0, 31, 19, .48);
    }

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

    body.shell-menu-open {
        overflow: hidden;
    }

    .footer-jsc {
        margin-left: -.8rem;
        margin-right: -.8rem;
        padding-left: .8rem !important;
        padding-right: .8rem !important;
    }
}

@media (max-width: 575.98px) {
    .jsc-shell-header {
        height: 68px;
    }

    .jsc-shell-brand {
        gap: .45rem;
    }

    .jsc-shell-marks {
        width: 64px;
        height: 45px;
    }

    .jsc-shell-brand-copy strong {
        max-width: 165px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .72rem;
    }

    .jsc-shell-brand-copy > span {
        max-width: 165px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: .62rem;
    }

    .jsc-shell-bell {
        display: none;
    }

    .dashboard-right-column .quick-actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* =========================================================
   PHASE 3 — SETTINGS NAVIGATION + FOOTER FIX
   ========================================================= */

.shell-sidebar {
    display: flex;
    flex-direction: column;
}

.shell-nav {
    position: relative;
    z-index: 20;
    flex: 0 0 auto;
}

.shell-nav-link {
    position: relative;
    z-index: 21;
    pointer-events: auto;
}

.shell-sidebar-brand {
    position: relative;
    z-index: 2;
    left: auto;
    right: auto;
    bottom: auto;
    margin-top: auto;
    padding: 1rem 1.2rem 1.4rem;
    pointer-events: none;
}

.shell-sidebar::after {
    pointer-events: none !important;
}

main.col-lg-10 {
    min-height: calc(100dvh - 102px);
    display: flex;
    flex-direction: column;
}

main.col-lg-10 > .footer-jsc {
    margin-top: auto !important;
}

.footer-jsc {
    flex: 0 0 auto;
}

@media (max-width: 991.98px) {
    main.col-lg-10 {
        min-height: calc(100dvh - 76px);
    }

    .shell-sidebar-brand {
        position: relative;
        margin-top: auto;
    }
}

@media (max-width: 575.98px) {
    main.col-lg-10 {
        min-height: calc(100dvh - 68px);
    }
}


/* =========================================================
   PHASE 6 — CONSISTENT PAGE FOOTER
   ========================================================= */
main.col-lg-10 {
    min-height: calc(100dvh - 102px);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main.col-lg-10 > .footer-jsc {
    width: 100%;
    margin: auto 0 0 !important;
    padding: .9rem 1rem !important;
    flex: 0 0 auto;
    border-top: 2px solid var(--shell-gold) !important;
    border-radius: 0;
}

.footer-jsc > .container-fluid {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

@media (max-width: 991.98px) {
    main.col-lg-10 {
        min-height: calc(100dvh - 76px);
    }

    main.col-lg-10 > .footer-jsc {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 575.98px) {
    main.col-lg-10 {
        min-height: calc(100dvh - 68px);
    }

    .footer-jsc > .container-fluid {
        display: grid !important;
        grid-template-columns: 1fr;
        text-align: center;
    }
}
