:root {
    --gradient-1: linear-gradient(135deg, #0f4c5c 0%, #0a9396 50%, #94d2bd 100%);
    --gradient-2: linear-gradient(135deg, #ee9b00 0%, #ca6702 50%, #bb3e03 100%);
    --gradient-3: linear-gradient(135deg, #005f73 0%, #0a9396 100%);
    --gradient-4: linear-gradient(135deg, #94d2bd 0%, #0a9396 100%);
    --gradient-5: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-6: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --gradient-sidebar: linear-gradient(180deg, #0a4a4a 0%, #0d5c5c 30%, #0a9396 100%);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif;
}

body {
    background: #f0f4f8;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex: 1;
}

/* Main wrapper harus ada margin left untuk sidebar */
.main-wrapper {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-wrapper.expanded {
    margin-left: 0;
}

.main-content {
    flex: 1;
    padding: 30px 35px;
}

/* Top bar styling */
.top-bar {
    display: flex;
    align-items: center;
    margin-bottom: 35px;
    gap: 20px;
}

#menuToggle {
    background: var(--gradient-3);
    color: white;
    border: none;
    font-size: 22px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: 0.3s;
}

#menuToggle:hover {
    transform: rotate(90deg);
}

.page-title {
    font-size: 30px;
    font-weight: 800;
    background: linear-gradient(135deg, #005f73, #0a9396);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}






/* Section */
.section {
    background: white;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid #0a9396;
}

/* Form */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 140px;
    flex: 1;
}

label {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

input, select {
    padding: 13px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 14px;
    background: #fafbfc;
    transition: 0.3s;
}

input:focus, select:focus {
    border-color: #0a9396;
    box-shadow: 0 0 0 4px rgba(10,147,150,0.1);
    outline: none;
}

/* Buttons */
.btn {
    padding: 13px 26px;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

.btn-primary { background: var(--gradient-3); color: white; }
.btn-success { background: var(--gradient-4); color: white; }
.btn-warning { background: var(--gradient-2); color: white; }
.btn-info { background: var(--gradient-5); color: white; }
.btn-danger { background: #ef4444; color: white; }
.btn-outline { background: transparent; border: 2px solid #0a9396; color: #0a9396; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th {
    text-align: left;
    padding: 15px 10px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    font-weight: 700;
    color: #1e3b3c;
}

td {
    padding: 14px 10px;
    border-bottom: 1px solid #f1f5f9;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-danger { background: #fce7f3; color: #9d174d; }

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-4);
    border-radius: 10px;
    transition: width 0.3s;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Sisa Hutang Box */
.sisa-hutang-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.sisa-hutang-box .label {
    font-size: 14px;
    color: #92400e;
}

.sisa-hutang-box .nilai {
    font-size: 32px;
    font-weight: 800;
    color: #92400e;
    margin: 5px 0;
}

/* Info box */
.info-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.info-box h4 {
    color: #166534;
    margin-bottom: 8px;
}

.info-box p {
    color: #15803d;
    font-size: 13px;
    margin: 3px 0;
}

@media (max-width: 900px) {
    .main-wrapper {
        margin-left: 0 !important;
        padding-top: 80px !important;
    }
    .main-content {
        padding: 20px !important;
    }
    .page-title {
        font-size: 24px;
    }
    #menuToggle {
        display: flex;
    }
}