/* Shell admin SATU — sidebar, login, overlay. Tidak memakai style.css publik. */

:root {
    --sidebar-width: 260px;
    --satu-green: #2d6a4f;
    --satu-green-dark: #1b4332;
    --satu-gold: #c9a227;
}

body.satu-dashboard {
    font-family: 'Poppins', system-ui, sans-serif;
    background-color: #f3f4f6;
    font-size: 0.88rem;
    color: #4a4a4a;
    margin: 0;
    padding: 0;
}

/* Sidebar: kalahkan Bootstrap .nav / .nav-link */
body.satu-dashboard .sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, var(--pramuka-coklat, #5c4033) 0%, var(--pramuka-coklat-gelap, #3d2914) 100%);
    color: #fff;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
}

body.satu-dashboard .sidebar.hide-desktop {
    margin-left: calc(-1 * var(--sidebar-width));
}

body.satu-dashboard .sidebar::-webkit-scrollbar { width: 5px; }
body.satu-dashboard .sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 10px;
}

body.satu-dashboard .sidebar .user-profile {
    padding: 28px 18px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.12);
    position: relative;
    flex-shrink: 0;
}

body.satu-dashboard .sidebar .user-profile img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 8px;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    border: 2px solid var(--satu-gold);
}

body.satu-dashboard .sidebar .user-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    line-height: 1.3;
}

body.satu-dashboard .sidebar .user-role {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 0, 0, 0.22);
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-block;
    color: rgba(255, 255, 255, 0.82);
    margin-top: 6px;
}

body.satu-dashboard .sidebar .btn-close-mobile {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.35rem;
    cursor: pointer;
    opacity: 0.75;
}

body.satu-dashboard .sidebar .nav-menu {
    padding: 10px 10px 16px;
    flex-grow: 1;
}

body.satu-dashboard .sidebar .nav-header {
    font-size: 10px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
    margin: 16px 0 6px 12px;
    letter-spacing: 0.08em;
}

body.satu-dashboard .sidebar .nav-header:first-child { margin-top: 6px; }

body.satu-dashboard .sidebar a.nav-link {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.88) !important;
    padding: 11px 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.2s;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 3px;
    line-height: 1.3;
    background: transparent;
    border: 0;
}

body.satu-dashboard .sidebar a.nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    padding-left: 18px;
}

body.satu-dashboard .sidebar a.nav-link.active {
    background: var(--satu-gold);
    color: #3d2914 !important;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
}

body.satu-dashboard .sidebar a.nav-link i {
    width: 22px;
    text-align: center;
    margin-right: 10px;
    font-size: 14px;
    flex-shrink: 0;
}

body.satu-dashboard .sidebar .nav-footer {
    padding: 12px 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

body.satu-dashboard .sidebar a.nav-link.logout-link { color: #ffadad !important; }
body.satu-dashboard .sidebar a.nav-link.logout-link:hover {
    background: rgba(255, 0, 0, 0.16) !important;
    color: #ff5252 !important;
}

body.satu-dashboard .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
}

body.satu-dashboard .main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

body.satu-dashboard .main-content.is-expanded {
    margin-left: 0;
}

body.satu-dashboard .header-top {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 3px solid #5c4033;
    padding: 0.7rem 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem -1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

body.satu-dashboard .header-top .satu-menu-toggle {
    cursor: pointer;
    color: #6c757d;
}

body.satu-dashboard .page-body {
    max-width: 1180px;
}

html[data-bs-theme="dark"] body.satu-dashboard .sidebar,
body.dark-mode.satu-dashboard .sidebar {
    background: #3d2914 !important;
    background-image: linear-gradient(180deg, #5c4033 0%, #3d2914 55%, #2a1f18 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] body.satu-dashboard .sidebar .user-profile,
body.dark-mode.satu-dashboard .sidebar .user-profile {
    background: rgba(0, 0, 0, 0.25) !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] body.satu-dashboard .header-top,
body.dark-mode.satu-dashboard .header-top {
    background: #1e242b !important;
    color: #e9ecef !important;
    border-bottom-color: #5c4033;
}

@media (max-width: 768px) {
    body.satu-dashboard .sidebar {
        left: -280px;
        width: 270px;
        margin-left: 0;
        box-shadow: none;
    }

    body.satu-dashboard .sidebar.active {
        left: 0;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.45);
    }

    body.satu-dashboard .sidebar.hide-desktop {
        margin-left: 0;
    }

    body.satu-dashboard .sidebar-overlay.active { display: block; }
    body.satu-dashboard .sidebar .btn-close-mobile { display: block; }
    body.satu-dashboard .sidebar .user-profile { padding-top: 44px; }

    body.satu-dashboard .main-content,
    body.satu-dashboard .main-content.is-expanded {
        margin-left: 0;
        padding: 1rem;
    }

    body.satu-dashboard .header-top {
        margin: -1rem -1rem 1rem -1rem;
        padding: 0.8rem 1rem;
    }
}

/* Login panitia — tanpa sidebar */
body.satu-auth {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', system-ui, sans-serif;
    background-color: #f5f0e8;
    background-image: linear-gradient(165deg, #faf7f2 0%, #f5f0e8 28%, #ede4d4 62%, #d4b896 100%);
    color: #212529;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

body.satu-auth .satu-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

body.satu-auth .satu-auth-brand {
    background: linear-gradient(180deg, var(--pramuka-coklat, #5c4033) 0%, var(--pramuka-coklat-gelap, #3d2914) 100%);
    color: #fff;
    text-align: center;
    padding: 1.6rem 1.4rem 1.3rem;
}

body.satu-auth .satu-auth-brand img {
    height: 52px;
    width: auto;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    margin-bottom: 10px;
}

body.satu-auth .satu-auth-body { padding: 1.5rem 1.4rem 1.6rem; }

html[data-bs-theme="dark"] body.satu-auth .satu-auth-card,
body.dark-mode.satu-auth .satu-auth-card {
    background: #1e242b;
    color: #e9ecef;
}

/* Dashboard charts + KPI (light mode; dark handled in satu-dashboard.css) */
.satu-dashboard .satu-kpi-card {
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(92, 64, 51, 0.08);
}

.satu-dashboard .satu-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: rgba(92, 64, 51, 0.1);
    color: var(--pramuka-coklat, #5c4033);
}

.satu-dashboard .satu-kpi-coklat .satu-kpi-icon {
    background: rgba(92, 64, 51, 0.12);
    color: var(--pramuka-coklat, #5c4033);
}
.satu-dashboard .satu-kpi-emas .satu-kpi-icon {
    background: rgba(201, 162, 39, 0.18);
    color: #8a6d12;
}
.satu-dashboard .satu-kpi-hijau .satu-kpi-icon {
    background: rgba(45, 106, 79, 0.14);
    color: var(--pramuka-hijau, #2d6a4f);
}
.satu-dashboard .satu-kpi-krem .satu-kpi-icon {
    background: rgba(212, 184, 150, 0.45);
    color: var(--pramuka-coklat-gelap, #3d2914);
}

.satu-dashboard .satu-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--pramuka-coklat-gelap, #3d2914);
}

.satu-dashboard .satu-kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    font-weight: 600;
}

.satu-dashboard .satu-chart-card {
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(92, 64, 51, 0.08);
}

.satu-dashboard .satu-chart-card h2,
.satu-dashboard .satu-chart-card .h6 {
    color: var(--pramuka-coklat-gelap, #3d2914);
}

.satu-dashboard .chart-container {
    width: 100%;
}
