:root {
    --sbab-bg: #f4f6f8;
    --sbab-surface: #ffffff;
    --sbab-text: #1f2933;
    --sbab-muted: #6b7280;
    --sbab-border: #e5e7eb;
    --sbab-accent: #059669;
    --sbab-accent-dark: #047857;
    --sbab-sidebar: #111827;
    --sbab-sidebar-text: #cbd5e1;
}

* { box-sizing: border-box; }

body {
    background: var(--sbab-bg);
    color: var(--sbab-text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
}

/* ---------- Shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--sbab-sidebar);
    color: var(--sbab-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--sbab-accent);
    display: grid; place-items: center;
    color: #fff; font-size: 1.15rem;
}
.brand-text strong { display: block; color: #fff; font-size: .95rem; line-height: 1.2; }
.brand-text small { color: #94a3b8; font-size: .75rem; }

.nav-section {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    padding: 1rem 1.25rem .35rem;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 1.25rem;
    color: var(--sbab-sidebar-text);
    text-decoration: none;
    font-size: .92rem;
    border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-link.active { background: rgba(5, 150, 105, .15); color: #fff; border-left-color: var(--sbab-accent); }
.nav-link.disabled { opacity: .45; cursor: default; }
.nav-link.disabled:hover { background: none; }
.nav-link i { width: 1.1rem; text-align: center; }

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.5rem;
    background: var(--sbab-surface);
    border-bottom: 1px solid var(--sbab-border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-title { font-weight: 600; }

.content { padding: 1.5rem; width: 100%; max-width: 1400px; }

/* ---------- Komponen ---------- */
.card { border: 1px solid var(--sbab-border); border-radius: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, .03); }

.page-head h1 { font-weight: 700; }

.stat-card .card-body { padding: 1.1rem; }
.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.stat-icon.tone-primary { background: #e0ecff; color: #1d4ed8; }
.stat-icon.tone-success { background: #d1fae5; color: #047857; }
.stat-icon.tone-warning { background: #fef3c7; color: #b45309; }
.stat-icon.tone-info    { background: #e0f2fe; color: #0369a1; }
.stat-label { font-size: .82rem; color: var(--sbab-muted); }
.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }

.btn-accent { background: var(--sbab-accent); border-color: var(--sbab-accent); color: #fff; }
.btn-accent:hover { background: var(--sbab-accent-dark); border-color: var(--sbab-accent-dark); color: #fff; }

.phase-list { list-style: none; padding: 0; margin: 0; }
.phase-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 0;
    border-bottom: 1px solid var(--sbab-border);
    font-size: .92rem;
}
.phase-list li:last-child { border-bottom: 0; }

/* ---------- Halaman login ---------- */
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
    padding: 1rem;
}
.auth-card { width: 100%; max-width: 420px; padding: 2rem; }
.auth-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--sbab-accent);
    color: #fff;
    display: grid; place-items: center;
    font-size: 1.6rem;
    margin: 0 auto 1rem;
}

/* ---------- Responsif ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -270px;
        top: 0;
        z-index: 1040;
        transition: left .2s ease;
    }
    .app-shell.sidebar-open .sidebar { left: 0; }
    .content { padding: 1rem; }
}
