@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Mobile first. Desktop dihadkan 800px. */
:root {
    --bg: #f3f6f5;
    --card: #fff;
    --text: #16201c;
    --muted: #5f6d67;
    --line: #e1e8e5;
    --primary: #1a7f5a;
    --primary-dark: #146548;
    --primary-soft: #e8f4ee;
    --danger: #c62828;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16,32,26,.05), 0 6px 20px rgba(16,32,26,.06);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea, table { font-family: var(--font); }

a { color: var(--primary); }

.wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; }

main.wrap { padding-top: 24px; padding-bottom: 48px; }

h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 14px; }

.muted { color: var(--muted); font-size: .9rem; }
h1 + .muted { margin: 0 0 20px; }

/* Topbar */
.topbar { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; box-shadow: 0 2px 10px rgba(20,101,72,.25); }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 14px; padding-bottom: 14px; }
.topbar strong { font-weight: 700; letter-spacing: -.01em; font-size: 1.02rem; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px; }
.topbar a { color: #fff; text-decoration: none; font-size: .9rem; font-weight: 500; padding: 6px 12px; border-radius: 999px; opacity: .9; transition: background .15s, opacity .15s; }
.topbar a:hover { background: rgba(255,255,255,.18); opacity: 1; }

/* Card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }

/* Form */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 16px; }
input, select {
    display: block; width: 100%; margin-top: 6px;
    padding: 12px 14px; font: inherit; font-weight: 400;
    color: var(--text);
    border: 1px solid #cfd8d4; border-radius: 10px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #9aa6a1; }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,127,90,.15); }
.row { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
.hp { position: absolute; left: -9999px; }

/* Button */
.btn {
    display: inline-block; padding: 12px 20px; border: 0; border-radius: 10px;
    background: var(--primary); color: #fff; font: inherit; font-weight: 600;
    text-decoration: none; cursor: pointer; text-align: center;
    box-shadow: 0 1px 2px rgba(20,101,72,.3);
    transition: background .15s, transform .05s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: translateY(1px); }
.btn-block { display: block; width: 100%; }
.btn-light { background: #eaeff0; color: var(--text); box-shadow: none; }
.btn-light:hover { background: #dde4e5; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a82020; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }

/* Alert */
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: .92rem; font-weight: 500; }
.alert-success { background: #e6f4ea; color: #145c33; border: 1px solid #c5e5d0; }
.alert-error { background: #fdecea; color: #8a1c1c; border: 1px solid #f6cdc8; }

/* Table */
table.list { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.list th, table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #f8fbfa; }
table.list th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table.list .num { width: 1%; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
table.list .act { white-space: nowrap; text-align: right; }
.table-scroll { overflow-x: auto; }

.badge { display: inline-block; min-width: 26px; padding: 1px 9px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .78rem; font-weight: 600; text-align: center; vertical-align: middle; margin-left: 4px; }

/* Toolbar (admin) */
.toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
.toolbar form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.toolbar label { margin: 0; }
.toolbar .btn { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Lebih lebar dari telefon */
@media (min-width: 600px) {
    h1 { font-size: 1.75rem; }
    .card { padding: 28px 32px; }
    .row { grid-template-columns: 1fr 1fr; }
    .toolbar form { grid-template-columns: 1fr 1fr 1fr auto; }
    .btn-block { width: auto; min-width: 160px; }
}
