/* ── SiPeSan Shared Stylesheet ── */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --green-900: #0d3b1f;
    --green-800: #155330;
    --green-700: #1a6b3c;
    --green-600: #218a4d;
    --green-500: #27a05a;
    --green-400: #3dbd72;
    --green-300: #6dd197;
    --green-100: #e8f7ee;
    --green-50: #f2fbf5;
    --gold: #c9a84c;
    --gold-light: #f0d98c;
    --cream: #faf8f3;
    --gray-900: #1a1d23;
    --gray-700: #3d4350;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --sidebar-w: 260px;
    --navbar-h: 64px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .13);
    --radius: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 14px;
}

 input[type=number]::-webkit-inner-spin-button,
 input[type=number]::-webkit-outer-spin-button {
     -webkit-appearance: none;
     margin: 0;
 }

 /* Hilangkan tombol panah di Firefox */
 input[type=number] {
     -moz-appearance: textfield;
 }

/* ── SHARED CARD ── */
.card {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: box-shadow .2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: none;
    border-bottom: 1px solid var(--gray-100);
    padding: 16px 20px;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-900);
}

.card-body {
    padding: 20px;
}

/* ── FORM ── */
.form-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control,
.form-select {
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    transition: all .2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(39, 160, 90, .12);
    outline: none;
}

.input-group-text {
    background: var(--gray-100);
    border: 1.5px solid var(--gray-300);
    border-right: none;
    border-radius: 10px 0 0 10px;
    color: var(--gray-500);
}

.input-group .form-control {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

.input-group:focus-within .input-group-text {
    border-color: var(--green-500);
}

/* ── BUTTONS ── */
.btn-primary-g {
    background: linear-gradient(135deg, var(--green-600), var(--green-500));
    border: none;
    color: white;
    border-radius: 9px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 13px;
    transition: all .2s;
    box-shadow: 0 2px 8px rgba(39, 160, 90, .25);
    cursor: pointer;
}

.btn-primary-g:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(39, 160, 90, .35);
    color: white;
}

.btn-outline-g {
    border: 1.5px solid var(--green-500);
    color: var(--green-600);
    background: none;
    border-radius: 9px;
    padding: 9px 18px;
    font-weight: 600;
    font-size: 13px;
    transition: all .2s;
    cursor: pointer;
}

.btn-outline-g:hover {
    background: var(--green-50);
    color: var(--green-700);
}

.btn-sm-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid var(--gray-300);
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 13px;
    transition: all .2s;
    cursor: pointer;
}

.btn-sm-icon:hover {
    border-color: var(--green-500);
    color: var(--green-600);
    background: var(--green-50);
}

.btn-sm-icon.danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fee2e2;
}

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1.5px solid var(--gray-300);
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    cursor: pointer;
    transition: all .2s;
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* ── BADGES ── */
.badge-green {
    background: var(--green-100);
    color: var(--green-700);
}

.badge-red {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-yellow {
    background: #fef3c7;
    color: #b45309;
}

.badge-gray {
    background: var(--gray-100);
    color: var(--gray-500);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

/* ── TABLE ── */
.table {
    margin: 0;
    font-size: 13.5px;
}

.table thead th {
    background: var(--gray-100);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-500);
    border-bottom: none;
    padding: 12px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-color: var(--gray-100);
}

.table tbody tr:hover {
    background: var(--green-50);
}

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

/* ── SEARCH BAR ── */
.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.search-input-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1.5px solid var(--gray-300);
    border-radius: 9px;
    font-size: 13.5px;
    transition: all .2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(39, 160, 90, .1);
}

/* ── MODAL ── */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--gray-100);
    padding: 18px 24px;
    background: var(--green-50);
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--green-800);
}

.modal-footer {
    border-top: 1px solid var(--gray-100);
    padding: 16px 24px;
}

.modal-body {
    padding: 24px;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--green-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;

    /* ⛔ default hidden */
    transform: translateX(-100%);
    transition: transform .3s ease;
}

/* ✅ muncul saat aktif */
.sidebar.open {
    transform: translateX(0);
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .s-icon {
    width: 40px;
    height: 40px;
    background: var(--green-500);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand .s-name {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 17px;
    color: white;
    line-height: 1.1;
}

.sidebar-brand .s-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, .5);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .35);
    padding: 12px 8px 6px;
}

.nav-item {
    margin-bottom: 2px;
}

.nav-link-s {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .2s;
    cursor: pointer;
}

.nav-link-s i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav-link-s:hover {
    background: rgba(255, 255, 255, .07);
    color: white;
}

.nav-link-s.active {
    background: var(--green-600);
    color: white;
    box-shadow: 0 2px 8px rgba(39, 160, 90, .35);
}

.nav-link-s .badge {
    margin-left: auto;
}

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

.user-card {
    background: rgba(255, 255, 255, .07);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-500);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, .5);
}

/* ── TOPNAV ── */
.topnav {
    position: fixed;
    left: var(--sidebar-w);
    right: 0;
    top: 0;
    height: var(--navbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    z-index: 99;
    box-shadow: var(--shadow-sm);
}

.topnav-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--gray-900);
    flex: 1;
}

.topnav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-dot {
    position: relative;
}

.notif-dot::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

.hamburger {
    display: none;
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: var(--sidebar-w);
    padding-top: var(--navbar-h);
    min-height: 100vh;
}

.content-area {
    padding: 28px;
}

.page-header {
    margin-bottom: 24px;
}

.page-header h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--gray-500);
    font-size: 13px;
    margin: 0;
}

/* ── BREADCRUMB ── */
.breadcrumb {
    font-size: 12px;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--gray-300);
}

.breadcrumb-item a {
    color: var(--green-600);
    text-decoration: none;
}

/* ── STAT CARDS ── */
.stat-card {
    border-radius: var(--radius);
    padding: 20px 22px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all .25s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    margin-bottom: 14px;
}

.stat-card .stat-val {
    font-size: 32px;
    font-weight: 800;
    color: white;
    font-family: 'Tajawal', sans-serif;
    line-height: 1;
}

.stat-card .stat-lbl {
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    margin-top: 4px;
}

.stat-card .stat-sub {
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    margin-top: 8px;
}

.stat-green {
    background: linear-gradient(135deg, var(--green-700), var(--green-500));
}

.stat-blue {
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
}

.stat-yellow {
    background: linear-gradient(135deg, #b45309, #f59e0b);
}

.stat-red {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

/* ── ACTIVITY FEED ── */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.activity-text {
    font-size: 13px;
    color: var(--gray-700);
}

.activity-text strong {
    color: var(--gray-900);
}

.activity-time {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 3px;
}

/* ── DETAIL CARD (Persetujuan) ── */
.detail-card {
    background: var(--green-50);
    border: 1.5px solid var(--green-300);
    border-radius: var(--radius);
    padding: 20px;
}

.detail-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.detail-label {
    font-weight: 700;
    min-width: 130px;
    color: var(--gray-700);
    font-size: 13px;
}

.detail-val {
    color: var(--gray-900);
    font-size: 13px;
}

.btn-approve {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border: none;
    color: white;
    padding: 11px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all .2s;
    cursor: pointer;
}

.btn-approve:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(34, 197, 94, .4);
    color: white;
}

.btn-reject {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    border: none;
    color: white;
    padding: 11px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all .2s;
    cursor: pointer;
}

.btn-reject:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, .4);
    color: white;
}

/* ── FILTER TABS ── */
.filter-tab {
    padding: 7px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid var(--gray-300);
    background: white;
    cursor: pointer;
    transition: all .2s;
    color: var(--gray-500);
}

.filter-tab.active {
    background: var(--green-600);
    border-color: var(--green-600);
    color: white;
}

.filter-tab:hover:not(.active) {
    border-color: var(--green-400);
    color: var(--green-600);
}

/* ── EXPORT BUTTONS ── */
.btn-export {
    border-radius: 9px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
    border: none;
    cursor: pointer;
}

/* ── ANIMATIONS ── */
.fade-in {
    animation: fadeIn .35s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── SIDEBAR OVERLAY (mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 99;
}

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

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ── RESPONSIVE ── */
@media (max-width:991.98px) {
    .topnav {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .hamburger {
        display: flex !important;
    }
}

@media (min-width:992px) {
    .sidebar {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--sidebar-w);
    }

    .topnav {
        left: var(--sidebar-w);
    }
}

@media (max-width:575.98px) {
    .content-area {
        padding: 16px;
    }

    .stat-card .stat-val {
        font-size: 26px;
    }
}