/* ======================
   RESET & BASE
====================== */
* {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    margin: 0;
    background: #f4f6f9;
    color: #1f2937;
    font-size: 14px;
}

/* ======================
   TOPBAR / HEADER
====================== */
.topbar {
    background: #0f172a;
    color: #fff;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar .brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .5px;
}

.topbar nav a {
    color: #cbd5e1;
    margin-left: 24px;
    text-decoration: none;
    font-size: 14px;
    padding-bottom: 4px;
}

.topbar nav a:hover,
.topbar nav a.active {
    color: #fff;
    border-bottom: 2px solid #38bdf8;
}

/* ======================
   LAYOUT
====================== */
.container,
.page-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ======================
   PAGE HEADER
====================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h1,
.page-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.page-header p {
    margin-top: 6px;
    color: #6b7280;
    font-size: 14px;
}

#cari {
    width: 260px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

/* ======================
   CARD
====================== */
.card {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.05);
}

/* ======================
   FORM
====================== */
.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: #2563eb;
}

input[readonly] {
    background: #f8fafc;
}

/* ======================
   TABLE
====================== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f1f5f9;
}

th {
    padding: 12px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    color: #475569;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

tbody tr:hover {
    background: #f9fafb;
}

td input {
    font-size: 13px;
}

/* ======================
   SUMMARY / TOTAL
====================== */
.summary {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 20px;
}

.summary div {
    width: 200px;
}

/* ======================
   STATUS BADGE
====================== */
.status {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-belum {
    background: #fee2e2;
    color: #991b1b;
}

.status-sebagian {
    background: #fef3c7;
    color: #92400e;
}

.status-lunas {
    background: #dcfce7;
    color: #166534;
}

/* ======================
   SISA PEMBAYARAN
====================== */
.sisa.merah {
    color: #dc2626;
    font-weight: 700;
}

.sisa.hijau {
    color: #16a34a;
    font-weight: 700;
}

/* ======================
   BUTTON
====================== */
.btn,
button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.btn.primary,
.btn-primary {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}

.btn.primary:hover,
.btn-primary:hover {
    background: #1e40af;
}

.btn.secondary,
.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn.secondary:hover,
.btn-secondary:hover {
    background: #d1d5db;
}

.form-actions {
    text-align: right;
    margin-top: 16px;
}

/* ======================
   LINK
====================== */
.btn-back {
    text-decoration: none;
    color: #2563eb;
    font-size: 14px;
}

