:root{
    --ink:#0E2B29;
    --teal-deep:#123832;
    --teal:#1F6F64;
    --teal-bright:#2F9C88;
    --gold:#C9A227;
    --gold-soft:#E4C25E;
    --cream:#F6F3EA;
    --ash:#8FA19E;
    --danger:#C1543C;
    --border:#DAD3BE;
}
*{box-sizing:border-box;}

body{
    margin:0;
    min-height:100vh;
    font-family:'Plus Jakarta Sans',sans-serif;
    background:
        radial-gradient(ellipse at 15% -10%, rgba(47,156,136,.18), transparent 50%),
        #F1EEE3;
    color:var(--ink);
}

.app-shell{
    display:grid;
    grid-template-columns:260px 1fr;
    min-height:100vh;
}
@media (max-width:900px){ .app-shell{ grid-template-columns:1fr; } }

.main{ padding:40px 48px 64px; }
.page-heading-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
    flex-wrap:wrap;
}
.page-heading{
    font-family:'Fraunces',serif;
    font-size:26px;
    font-weight:600;
    margin:0;
    color:var(--ink);
}

.notice-box{
    background:#FBF8EE;
    border:1px solid var(--gold-soft);
    border-left:4px solid var(--gold);
    border-radius:10px;
    padding:16px 20px;
    font-size:13.5px;
    line-height:1.8;
    color:#5A5230;
    margin-bottom:24px;
}
.notice-box b{ color:var(--ink); }
.notice-box.success{ border-color:var(--teal-bright); border-left-color:var(--teal); background:#EAF6F2; color:var(--teal-deep); }
.notice-box.danger{ border-color:var(--danger); border-left-color:var(--danger); background:#FBEFEC; color:#7A2E20; }

.btn{
    padding:11px 22px;
    border-radius:10px;
    font-family:inherit;
    font-weight:700;
    font-size:13.5px;
    border:none;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    gap:6px;
    transition:transform .15s ease, box-shadow .15s ease;
}
.btn-primary{
    background:linear-gradient(135deg, var(--teal-bright), var(--teal));
    color:#fff;
    box-shadow:0 12px 24px -10px rgba(31,111,100,.5);
}
.btn-primary:hover{ transform:translateY(-1px); }
.btn-ghost{
    background:transparent;
    border:1.5px solid #E2B9AC;
    color:var(--danger);
}
.btn-ghost:hover{ background:#FBEFEC; }
.btn-outline{
    background:transparent;
    border:1.5px solid var(--border);
    color:var(--ink);
}
.btn-outline:hover{ background:#EFE9D6; }
.btn-sm{ padding:6px 12px; font-size:12px; border-radius:8px; }

/* --- Toolbar: search + per-page --- */
.toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:14px;
    margin:22px 0 14px;
}
.per-page{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:13px;
    color:#5C6E6B;
}
.per-page select{
    padding:7px 10px;
    border-radius:8px;
    border:1.5px solid var(--border);
    font-family:inherit;
    font-size:13px;
    background:#fff;
    color:var(--ink);
}
.search-box{
    display:flex;
    align-items:center;
    gap:8px;
}
.search-box input{
    padding:9px 13px;
    border-radius:9px;
    border:1.5px solid var(--border);
    font-family:inherit;
    font-size:13.5px;
    min-width:220px;
    outline:none;
    background:#fff;
    color:var(--ink);
}
.search-box input:focus{ border-color:var(--teal-bright); box-shadow:0 0 0 3px rgba(47,156,136,.16); }

/* --- Table --- */
.table-card{
    background:#fff;
    border-radius:16px;
    border:1px solid #E7E1CE;
    box-shadow:0 20px 40px -26px rgba(14,43,41,.25);
    overflow:hidden;
}
table.data-table{
    width:100%;
    border-collapse:collapse;
    font-size:13.5px;
}
table.data-table thead th{
    background:linear-gradient(135deg, var(--teal-bright), var(--teal));
    color:#fff;
    text-align:left;
    padding:13px 18px;
    font-weight:600;
    font-size:12.5px;
    letter-spacing:.02em;
    text-transform:uppercase;
}
table.data-table tbody td{
    padding:12px 18px;
    border-bottom:1px solid #F0ECDD;
    color:var(--ink);
}
table.data-table tbody tr:last-child td{ border-bottom:none; }
table.data-table tbody tr:hover{ background:#FBF9F1; }
.unit-tag{
    display:inline-block;
    padding:3px 10px;
    border-radius:999px;
    background:#EAF6F2;
    color:var(--teal-deep);
    font-size:11.5px;
    font-weight:600;
}
.row-actions{ display:flex; gap:8px; }
.empty-state{ padding:40px; text-align:center; color:var(--ash); font-size:13.5px; }

/* --- Pagination --- */
.pagination-bar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:12px;
    margin-top:18px;
    font-size:13px;
    color:#5C6E6B;
}
.pagination{ display:flex; gap:6px; flex-wrap:wrap; }
.page-btn{
    padding:7px 12px;
    border-radius:8px;
    border:1.5px solid var(--border);
    background:#fff;
    color:var(--ink);
    text-decoration:none;
    font-size:12.5px;
    font-weight:600;
}
.page-btn:hover{ background:#EFE9D6; }
.page-btn.active{
    background:var(--ink);
    color:#fff;
    border-color:var(--ink);
}
.page-btn.disabled{ opacity:.4; pointer-events:none; }

/* --- Form (tambah/edit) --- */
.form-card{
    background:#fff;
    border-radius:18px;
    border:1px solid #E7E1CE;
    box-shadow:0 20px 40px -24px rgba(14,43,41,.25);
    padding:36px 40px;
    max-width:560px;
}
.field{ margin-bottom:18px; }
.field label{
    display:block;
    font-size:12.5px;
    font-weight:600;
    color:#42524F;
    margin-bottom:6px;
}
.field input, .field select{
    width:100%;
    padding:11px 13px;
    border-radius:10px;
    border:1.5px solid var(--border);
    background:#fff;
    font-family:inherit;
    font-size:14px;
    color:var(--ink);
    outline:none;
    transition:border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus{
    border-color:var(--teal-bright);
    box-shadow:0 0 0 3px rgba(47,156,136,.16);
}
.error-text{ color:var(--danger); font-size:12px; margin-top:5px; }
.form-actions{
    display:flex;
    gap:12px;
    margin-top:26px;
    padding-top:20px;
    border-top:1px solid #EEE9D8;
}
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sort-icon { font-size: 11px; opacity: .6; }