:root {
    --forest-900: #1B3620;
    --forest-800: #234A2A;
    --forest-700: #2F5D37;
    --forest-600: #3D7247;
    --sage-500: #7A9270;
    --sage-100: #EAEFE4;
    --earth-500: #B8935A;
    --earth-100: #F4E9D8;
    --paper: #F7F6F1;
    --surface: #FFFFFF;
    --ink-900: #1E241C;
    --ink-600: #5B6357;
    --ink-400: #8A9184;
    --line: #E4E2DA;
    --danger: #B3492F;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--paper);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink-900);
    font-size: .9rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ===== Top navbar — single row: brand + menu + utilities ===== */
.topbar {
    background: var(--forest-900);
    padding: .55rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-shrink: 0;
}

.topbar-brand .mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    /* background: linear-gradient(155deg, var(--sage-500), var(--forest-600)); */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    color: #fff;
    font-size: .9rem;
    flex-shrink: 0;
}

.topbar-brand .name {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    line-height: 1.15;
    color: #fff;
}

.topbar-brand .sub {
    font-size: .68rem;
    color: #B7C4B0;
}

.icon-btn-dark {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #EDF1EA;
    position: relative;
    flex-shrink: 0;
}

.icon-btn-dark .dot {
    position: absolute;
    top: 5px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #E4694B;
    border: 1.5px solid var(--forest-900);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-shrink: 0;
}

.topbar-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--earth-500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .75rem;
}

.topbar-user .uname {
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.15;
}

.topbar-user .urole {
    color: #9DAE95;
    font-size: .68rem;
}

/* Hamburger toggle — hidden on desktop, shown on mobile */
#navToggle {
    display: none;
}

/* ===== Nav row (menu links) — inline within the single topbar row ===== */
.navrow {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}

.nav-link-top {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .8rem;
    color: #CFDAC9;
    text-decoration: none;
    font-size: .83rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link-top i {
    font-size: .95rem;
}

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

.nav-link-top.active {
    color: #fff;
    border-bottom-color: var(--earth-500);
    background: rgba(255, 255, 255, .04);
}

.nav-link-top .badge-count {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: .66rem;
    font-weight: 600;
    padding: .1rem .4rem;
    border-radius: 20px;
}

.navrow .dropdown-menu {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    margin-top: .4rem;
}

.navrow .dropdown-item {
    font-size: .83rem;
    padding: .5rem .65rem;
    border-radius: 7px;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--ink-900);
}

.navrow .dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--forest-700);
}

.navrow .dropdown-item:hover {
    background: var(--sage-100);
}

@media (max-width: 991.98px) {
    .topbar {
        flex-wrap: wrap;
    }

    .navrow {
        display: none;
        flex-basis: 100%;
        flex-wrap: wrap;
        overflow-x: visible;
        order: 3;
        border-top: 1px solid rgba(255, 255, 255, .08);
        margin-top: .5rem;
        padding-top: .35rem;
    }

    .navrow.show {
        display: flex;
    }

    #navToggle {
        display: flex;
    }
}

/* ===== Content ===== */
.content {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.breadcrumb-min {
    font-size: .78rem;
    color: var(--ink-400);
    margin-bottom: .25rem;
}

.breadcrumb-min a {
    color: var(--ink-400);
    text-decoration: none;
}

.page-head h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    color: var(--ink-900);
}

/* ===== Stat cards ===== */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    height: 100%;
}

.stat-card .stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.stat-card .stat-val {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    margin: .6rem 0 .1rem;
    color: var(--ink-900);
}

.stat-card .stat-label {
    font-size: .8rem;
    color: var(--ink-600);
}

.stat-trend {
    font-size: .76rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 20px;
}

.stat-trend.up {
    background: var(--sage-100);
    color: var(--forest-700);
}

.stat-trend.flat {
    background: var(--earth-100);
    color: #8A6A2E;
}

/* ===== Panels ===== */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.panel-head {
    padding: 1.1rem 1.25rem .4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-head h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.panel-head .sub {
    font-size: .78rem;
    color: var(--ink-400);
}

.panel-body {
    padding: .75rem 1.25rem 1.25rem;
}

/* ===== Table ===== */
.table-clean {
    font-size: .84rem;
    margin-bottom: 0;
}

.table-clean thead th {
    font-size: .72rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink-400);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    padding-bottom: .6rem;
    white-space: nowrap;
}

.table-clean tbody td {
    padding: .75rem .5rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    color: var(--ink-900);
}

.table-clean tbody tr:last-child td {
    border-bottom: none;
}

.entity-tag {
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 6px;
}

.entity-tag.kth {
    background: var(--sage-100);
    color: var(--forest-700);
}

.entity-tag.kups {
    background: var(--earth-100);
    color: #8A6A2E;
}

.status-pill {
    font-size: .74rem;
    font-weight: 600;
    padding: .25rem .65rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.status-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill.selesai {
    background: var(--sage-100);
    color: var(--forest-700);
}

.status-pill.selesai::before {
    background: var(--forest-600);
}

.status-pill.proses {
    background: #FDF1DF;
    color: #93650F;
}

.status-pill.proses::before {
    background: #C9891A;
}

.status-pill.batal {
    background: #F8E3DD;
    color: var(--danger);
}

.status-pill.batal::before {
    background: var(--danger);
}

.row-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--sage-100);
    color: var(--forest-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .75rem;
    flex-shrink: 0;
}

.progress-thin {
    height: 6px;
    border-radius: 20px;
    background: var(--sage-100);
}

.progress-thin .progress-bar {
    background: var(--forest-600);
    border-radius: 20px;
}

.region-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 0;
}

.region-row .region-name {
    width: 110px;
    font-size: .8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.region-row .region-pct {
    width: 38px;
    text-align: right;
    font-size: .78rem;
    color: var(--ink-600);
    flex-shrink: 0;
}

.btn-forest {
    background: var(--forest-700);
    border-color: var(--forest-700);
    color: #fff;
}

.btn-forest:hover {
    background: var(--forest-800);
    border-color: var(--forest-800);
    color: #fff;
}

.btn-outline-forest {
    border-color: var(--line);
    color: var(--ink-600);
}

.btn-outline-forest:hover {
    background: var(--paper);
}