/* PMFLI Dashboard — satu stylesheet, tanpa framework dan tanpa proses build. */
:root {
  --bg: #f1f5f9; --surface: #ffffff; --border: #e2e8f0; --text: #0f172a; --muted: #64748b;
  --brand: #1c5cab; --brand-dark: #104281; --brand-soft: #eef5fd;
  --chart-line: #2a78d6; --chart-grid: #e1e0d9; --chart-axis: #898781;
}
* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 20px; padding-bottom: 40px; }
.centered { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gap-top { margin-top: 12px; }
.grow { flex: 1 1 260px; }
.push-right { margin-left: auto; }
.text-center { text-align: center; } .text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12px; } .amber { color: #b45309; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.clip { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.h1 { font-size: 24px; margin: 8px 0 4px; } .h2 { font-size: 20px; margin: 0 0 4px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.pad { padding: 16px; } .pad-x { padding-left: 16px; padding-right: 16px; } .pad-top { padding-top: 16px; }
.narrow { max-width: 420px; width: 100%; } .narrow-left { max-width: 760px; }
.card-title { font-size: 14px; font-weight: 600; color: #334155; margin: 0; }
.unit { font-weight: 400; color: var(--muted); }
.subhead { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 4px; }

/* Header */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 8px; } .brand-name { font-weight: 600; font-size: 16px; }
.logo { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 700; }
.logo-lg { width: 48px; height: 48px; font-size: 22px; border-radius: 10px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { padding: 6px 12px; border-radius: 6px; color: #475569; font-weight: 500; font-size: 14px; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.userbox { display: flex; align-items: center; gap: 12px; }
.who { text-align: right; line-height: 1.2; } .who-name { font-weight: 600; font-size: 14px; color: var(--text); } .who-role { font-size: 12px; color: var(--muted); }

/* Form */
.label { display: block; font-size: 12px; font-weight: 500; color: #475569; margin-bottom: 4px; }
.input { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; background: #fff; color: var(--text); }
.input:focus { outline: 2px solid #cde2fb; border-color: var(--brand); }
.input:disabled { background: #f1f5f9; color: var(--muted); }
.input-auto { width: auto; } .input-inline { width: auto; flex: 1 1 240px; max-width: 320px; }
.input-group { position: relative; } .input-group .input { padding-right: 96px; }
.input-addon { position: absolute; right: 0; top: 0; bottom: 0; padding: 0 12px; border: 0; background: none; color: var(--brand); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.field-error { color: #b91c1c; font-size: 12px; margin: 4px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; } legend { font-weight: 600; font-size: 14px; color: #334155; padding: 0; margin-bottom: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; margin-right: 14px; } .checks { margin-top: 2px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 6px; border: 1px solid transparent; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none !important; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-secondary { background: #fff; color: #334155; border-color: #cbd5e1; } .btn-secondary:hover:not(:disabled) { background: #f8fafc; }
.btn-danger { background: #dc2626; color: #fff; } .btn-danger:hover:not(:disabled) { background: #b91c1c; }
.btn-block { width: 100%; }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid transparent; white-space: nowrap; }
.badge-green { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.badge-red { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.badge-amber { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge-blue { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.badge-slate { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.alert { padding: 8px 12px; border-radius: 6px; border: 1px solid; font-size: 14px; margin: 8px 0; }
.alert-red { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-amber { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-green { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }

/* Login */
.login-box { width: 100%; max-width: 380px; } .login-box > * + * { margin-top: 16px; }

/* Dashboard */
#dashboard > * + * { margin-top: 14px; }
.statusbar { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center; padding: 10px 16px; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tile { padding: 14px 16px; } .tile-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.tile-value { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; } .tile-value small { font-size: 14px; font-weight: 400; color: var(--muted); }
.tile-hint { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .grid-2.tight { gap: 10px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.chart-last { font-size: 14px; color: #475569; font-variant-numeric: tabular-nums; }
.chart { display: block; width: 100%; height: 200px; }
.chart-tip { position: fixed; z-index: 10; pointer-events: none; background: #fff; border: 1px solid var(--chart-grid); border-radius: 6px; padding: 4px 8px; font-size: 12px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.cmd-list { list-style: none; margin: 0; padding: 0; } .cmd-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #f1f5f9; font-size: 14px; }
.cmd-list li:first-child { border-top: 0; } .cmd-meta { font-size: 12px; color: var(--muted); }
.progress { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; margin: 12px 0 4px; } .progress-bar { height: 100%; width: 0; background: var(--brand); border-radius: 999px; }

/* Tabel */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border); }
.table td { padding: 8px 12px; font-size: 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.facts { margin: 0; } .facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } .facts dd { margin: 0 0 8px; font-weight: 500; font-size: 14px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 24px; margin-bottom: 14px; }
.user-form { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } .facts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Input dan tombol sebaris (panel kontrol, reset password) */
.row > .input { flex: 1 1 0; width: auto; min-width: 0; }
