:root {
  --bg: #EEF1EC;
  --surface: #FFFFFF;
  --surface-soft: #F5F6F3;
  --ink: #16213D;
  --ink-soft: #566078;
  --accent: #A9772F;
  --accent-soft: #EFE3CC;
  --line: #DCDFD6;
  --green: #2F7A4D;
  --green-soft: #E3F0E7;
  --amber: #B7822A;
  --amber-soft: #F6EAD3;
  --red: #B2412E;
  --red-soft: #F5E1DC;
  --grey: #8B93A0;
  --grey-soft: #EBECE8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3 { font-family: 'Source Serif 4', Georgia, serif; margin: 0 0 12px; }
a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }

/* Topbar */
.topbar { background: var(--ink); color: #fff; }
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.brand { font-weight: 600; text-decoration: none; color: #fff; font-size: 15px; }
.brand span { color: var(--accent-soft); font-weight: 400; margin-left: 6px; }
.topbar nav a {
  color: #DDE1E6; text-decoration: none; font-size: 13.5px; margin-left: 18px;
}
.topbar nav a:hover { color: #fff; }
.topbar nav a.admin-link {
  background: var(--accent); color: #fff; padding: 6px 12px; border-radius: 6px;
}
.lang-switch { margin-left: 18px; font-size: 13px; }
.lang-switch a { color: #9AA4B0; text-decoration: none; padding: 0 3px; }
.lang-switch a.active { color: #fff; font-weight: 600; }
.lang-switch span { color: #5B6472; }

/* Cards / stats */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 28px; }
.stat { background: var(--surface); padding: 18px 16px; }
.stat .num { font-family: 'Source Serif 4', Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1; }
.stat .lbl { color: var(--ink-soft); font-size: 12.5px; margin-top: 6px; }
.stat.selesai .num { color: var(--green); }
.stat.proses .num { color: var(--amber); }
.stat.belum .num { color: var(--red); }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, 1fr); } }

section.block { margin-bottom: 30px; }

.cat-grid { display: flex; flex-direction: column; gap: 10px; }
.cat-row {
  display: grid; grid-template-columns: 1fr 2fr 110px; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px;
  text-decoration: none; color: inherit;
}
.cat-row:hover { border-color: var(--accent); }
.cat-name { font-weight: 600; font-size: 14px; }
.cat-name small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12px; margin-top: 2px; }
.bar-track { height: 8px; background: var(--grey-soft); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 99px; }
.cat-count { text-align: right; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 640px) { .cat-row { grid-template-columns: 1fr; } .cat-count { text-align: left; } }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
thead th {
  text-align: left; font-size: 12px; color: var(--ink-soft); font-weight: 600; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: var(--surface-soft);
}
tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-soft); }
.rank-chip {
  display: inline-block; font-size: 10.5px; padding: 2px 7px; border-radius: 99px; margin: 1px 2px 1px 0;
  background: var(--accent-soft); color: var(--accent);
}
.rank-chip.the { background: var(--grey-soft); color: var(--ink-soft); }
.status-badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.status-badge.selesai { background: var(--green-soft); color: var(--green); }
.status-badge.proses, .status-badge.verifikasi { background: var(--amber-soft); color: var(--amber); }
.status-badge.belum { background: var(--red-soft); color: var(--red); }

/* Forms */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
select, input[type="text"], input[type="url"], input[type="password"], input[type="number"], textarea {
  font-family: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px;
}
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.btn {
  display: inline-block; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: none; border-radius: 6px; padding: 9px 16px;
  text-decoration: none;
}
.btn.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }

/* Login */
.login-box { max-width: 380px; margin: 60px auto; }
.error-msg { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 6px; font-size: 13.5px; margin-bottom: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0; margin-top: 20px; color: var(--ink-soft); font-size: 12.5px; }

.pill { display: inline-block; font-size: 12px; background: var(--grey-soft); color: var(--ink-soft); padding: 3px 10px; border-radius: 99px; }
