/* ============================================================
   admin.css — Tema Panel Admin Balam Sempurna (DPS)
   Warna disamakan dengan halaman publik (indigo/violet
   glassmorphism). Fraunces (serif) + Instrument Sans.
   ============================================================ */

:root {
  --bg: 252 100% 97%;            /* #F3F0FF */
  --bg-elevated: 246 60% 99%;    /* putih keunguan */
  --ink: 248 36% 17%;            /* #1F1B3A */
  --ink-soft: 247 16% 44%;       /* #635F82 */
  --muted-ink: 246 13% 48%;
  --line: 245 40% 90%;
  --line-strong: 245 32% 76%;
  --brand: 243 75% 59%;          /* indigo #4F46E5 */
  --brand-hover: 244 75% 52%;    /* #4338CA */
  --brand-soft: 243 100% 95%;    /* #EEF2FF */
  --gold: 258 90% 66%;           /* violet #8B5CF6 */
  --gold-soft: 258 90% 94%;
  --maroon: 347 77% 50%;         /* rose #E11D48 */
  --maroon-soft: 347 77% 94%;
  --success: 161 94% 30%;        /* #059669 */
  --warn: 26 90% 37%;            /* #B45309 */
  --danger: 347 77% 50%;
  --grad: linear-gradient(135deg, #4F46E5 0%, #8B5CF6 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: hsl(var(--ink));
  background-color: hsl(var(--bg));
  -webkit-font-smoothing: antialiased;
}
.bg-batik {
  background-color: hsl(var(--bg));
  background-image:
    radial-gradient(600px 420px at 12% -6%, rgba(129, 140, 248, 0.35), transparent 65%),
    radial-gradient(520px 400px at 88% 4%, rgba(236, 72, 153, 0.22), transparent 62%),
    radial-gradient(640px 460px at 50% 108%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(520px 380px at 95% 62%, rgba(139, 92, 246, 0.20), transparent 60%),
    linear-gradient(180deg, #F3F0FF 0%, #EEEAFC 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
.font-serif, .serif { font-family: "Fraunces", ui-serif, Georgia, Cambria, Times New Roman, Times, serif; }
.font-mono, .mono, code { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
.tabular { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
a { color: hsl(var(--brand)); text-decoration: none; }
img { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap-admin { max-width: 1120px; margin: 0 auto; padding: 36px 20px 90px; }

/* ---------- Ornamen ---------- */
.ornament {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: hsl(var(--gold));
  margin-bottom: 0.85rem;
}
.ornament::before,
.ornament::after {
  content: "";
  flex: 1 1;
  height: 1px;
  background: linear-gradient(to right, transparent, hsl(var(--line-strong)), transparent);
}
.ornament.justify-start::before { flex: 0 0 0; }

.head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.head-row h1 { font-family: "Fraunces", serif; font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
.head-row p { color: hsl(var(--muted-ink)); font-size: 0.9rem; margin: 8px 0 0; }

/* ---------- Chip statistik ---------- */
.stat-chip {
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--line));
  border-left: 4px solid hsl(var(--brand));
  border-radius: 14px;
  padding: 12px 18px;
  min-width: 150px;
  box-shadow: 0 1px 0 hsl(var(--line)), 0 12px 30px -18px hsl(var(--ink) / 0.12);
}
.stat-chip.gold { border-left-color: hsl(var(--gold)); }
.stat-chip .sc-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.12em; color: hsl(var(--muted-ink)); font-weight: 600; }
.stat-chip .sc-value { font-family: "Fraunces", serif; font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- Tab bar ---------- */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  background: hsl(243 100% 95%);
  border: 1px solid hsl(var(--line));
  border-radius: 14px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 26px;
}
.admin-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: hsl(var(--muted-ink));
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.admin-tabs a svg { width: 15px; height: 15px; flex-shrink: 0; }
.admin-tabs a:hover { color: hsl(var(--brand)); }
.admin-tabs a.aktif {
  background: hsl(var(--bg-elevated));
  color: hsl(var(--brand));
  box-shadow: 0 1px 3px hsl(var(--ink) / 0.12);
  font-weight: 600;
}

/* ---------- Kartu kertas ---------- */
.paper-card {
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--line));
  border-radius: 16px;
  box-shadow: 0 1px 0 hsl(var(--line)), 0 12px 30px -18px hsl(var(--ink) / 0.12);
}
.paper-card.pad { padding: 20px 22px; }
.paper-card .card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid hsl(var(--line));
  padding: 16px 22px;
}
.paper-card .card-head h3 { margin: 0; font-family: "Fraunces", serif; font-size: 1.05rem; font-weight: 600; }
.paper-card .card-head p { margin: 2px 0 0; font-size: 0.78rem; color: hsl(var(--muted-ink)); }
.space-y { display: flex; flex-direction: column; gap: 20px; }
.space-y-6 { display: flex; flex-direction: column; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }

/* ---------- Tombol ---------- */
.btn-primary, .btn-outline, .btn-ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary { background: var(--grad); color: #fff; border: 1px solid transparent; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { cursor: not-allowed; opacity: 0.6; }
.btn-outline { background: transparent; border: 1px solid hsl(var(--line-strong)); color: hsl(var(--ink)); }
.btn-outline:hover { background: hsl(var(--brand-soft)); border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: hsl(var(--muted-ink)); }
.btn-ghost:hover { color: hsl(var(--maroon)); background: hsl(var(--maroon-soft)); }
.btn-danger { background: hsl(var(--maroon)); border: 1px solid hsl(var(--maroon)); color: hsl(var(--bg)); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.78rem; border-radius: 8px; }
.btn-icon {
  appearance: none; background: transparent; border: 0; padding: 7px; border-radius: 9px;
  cursor: pointer; color: hsl(var(--muted-ink)); line-height: 0;
}
.btn-icon:hover { background: hsl(var(--brand-soft)); color: hsl(var(--brand)); }
.btn-icon.danger:hover { background: hsl(var(--maroon-soft)); color: hsl(var(--maroon)); }
.btn-icon svg { width: 16px; height: 16px; }

/* ---------- Field ---------- */
.field {
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--line));
  border-radius: 10px;
  color: hsl(var(--ink));
  padding: 0.7rem 0.9rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field:focus { border-color: hsl(var(--brand)); box-shadow: 0 0 0 3px hsl(var(--brand) / 0.12); }
select.field { cursor: pointer; }
label.f-label {
  display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: hsl(var(--muted-ink)); margin-bottom: 6px;
}
.field-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hint { font-size: 0.78rem; color: hsl(var(--muted-ink)); }
.f-warn { display: block; font-size: 0.74rem; font-weight: 600; color: hsl(var(--maroon)); margin-top: 5px; line-height: 1.4; }
.f-warn[hidden] { display: none; }

/* ---------- Tabel ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.tbl[data-testid="admin-voter-table"] { min-width: 1700px; }
table.tbl th {
  text-align: left; padding: 12px 16px; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: hsl(var(--muted-ink)); font-weight: 600;
  border-bottom: 1px solid hsl(var(--line)); white-space: nowrap;
}
table.tbl td { padding: 12px 16px; border-bottom: 1px solid hsl(var(--line) / 0.6); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: hsl(var(--brand-soft) / 0.35); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .kosong { text-align: center; color: hsl(var(--muted-ink)); padding: 36px 16px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.brand { background: hsl(var(--brand-soft)); color: hsl(var(--brand)); }
.badge.gold { background: hsl(var(--gold-soft)); color: hsl(var(--gold)); }
.badge.maroon { background: hsl(var(--maroon-soft)); color: hsl(var(--maroon)); }
.badge.green { background: hsl(145 55% 92%); color: hsl(var(--success)); }
.badge.blue { background: hsl(210 60% 93%); color: hsl(215 60% 38%); }
.badge.grey { background: hsl(243 40% 94%); color: hsl(var(--muted-ink)); }
.pill-tag { display: inline-block; padding: 2px 8px; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; border-radius: 5px; }

/* ---------- Filter chips ---------- */
.chip-filter {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
  border: 1px solid hsl(var(--line)); background: hsl(var(--bg-elevated));
  border-radius: 10px; font-size: 0.82rem; font-weight: 500; color: hsl(var(--ink-soft));
  cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.chip-filter:hover { border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.chip-filter.aktif { background: hsl(var(--brand)); color: hsl(var(--bg)); border-color: hsl(var(--brand)); }
.chip-filter .cnt {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  padding: 0 5px; border-radius: 999px; font-size: 0.7rem; font-family: "JetBrains Mono", monospace;
  font-weight: 600; background: hsl(243 40% 94%); color: hsl(var(--ink-soft));
}
.chip-filter.aktif .cnt { background: hsl(var(--bg)); color: hsl(var(--brand)); }

/* ---------- Pagination ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  border-top: 1px solid hsl(var(--line)); padding: 12px 16px; font-size: 0.78rem; color: hsl(var(--muted-ink));
}

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 0.88rem; border: 1px solid; }
.flash-ok { background: hsl(145 55% 94%); border-color: hsl(145 40% 75%); color: hsl(var(--success)); }
.flash-warn { background: rgba(180, 83, 9, 0.12); border-color: rgba(180, 83, 9, 0.35); color: #92400E; }
.flash-error { background: hsl(var(--maroon-soft)); border-color: hsl(var(--maroon) / 0.35); color: hsl(var(--maroon)); }

/* ---------- Link underline ---------- */
.link-underline {
  background-image: linear-gradient(hsl(var(--brand)), hsl(var(--brand)));
  background-position: 0 100%; background-repeat: no-repeat; background-size: 100% 1px;
  transition: background-size 0.2s ease;
}
.link-underline:hover { background-size: 100% 2px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(31, 27, 58, 0.45);
  backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  background: hsl(var(--bg-elevated)); border: 1px solid hsl(var(--line)); border-radius: 18px;
  box-shadow: 0 24px 60px -20px hsl(var(--ink) / 0.4); width: 100%; max-width: 560px;
  padding: 24px; position: relative; margin: auto;
}
.modal-card.wide { max-width: 760px; }
.modal-close { position: absolute; top: 14px; right: 14px; background: transparent; border: 0; font-size: 1.4rem; line-height: 1; color: hsl(var(--muted-ink)); cursor: pointer; padding: 6px; border-radius: 8px; }
.modal-close:hover { background: hsl(243 40% 94%); color: hsl(var(--ink)); }
.modal-title { font-family: "Fraunces", serif; font-size: 1.25rem; font-weight: 600; margin: 0 0 4px; }
.modal-sub { font-size: 0.8rem; color: hsl(var(--muted-ink)); margin: 0 0 18px; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.toolbar .search-box { position: relative; flex: 1 1 260px; }
.toolbar .search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: hsl(var(--muted-ink)); }
.toolbar .search-box .field { padding-left: 38px; }

/* ---------- Kartu pengaduan ---------- */
.complaint-card { padding: 22px; }
.complaint-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }.complaint-ticket { font-family: "JetBrains Mono", monospace; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; }
.complaint-date { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: hsl(var(--muted-ink)); }
.complaint-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-top: 14px; }
.complaint-grid .lbl { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.18em; color: hsl(var(--muted-ink)); font-weight: 600; }
.complaint-grid .val { margin-top: 4px; font-size: 0.9rem; }
.complaint-grid .val.mono { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: hsl(var(--muted-ink)); }
.complaint-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; border-top: 1px solid hsl(var(--line)); padding-top: 14px; }

/* ---------- Grup duplikat ---------- */
.dup-group { overflow: hidden; }
.dup-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-bottom: 1px solid hsl(var(--line)); background: hsl(var(--gold-soft) / 0.35); }
.dup-head.brand { background: hsl(var(--brand-soft)); }
.dup-head.maroon { background: hsl(var(--maroon-soft)); }
.dup-key { font-family: "Fraunces", serif; font-size: 1.05rem; font-weight: 600; word-break: break-all; }

/* ---------- Topbar + user menu ---------- */
.admin-bar {
  background: hsl(var(--bg-elevated) / 0.85);
  border-bottom: 1px solid hsl(var(--line));
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}
.admin-bar-in { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Nav panel admin (link halaman publik + panel) ---------- */
.admin-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.admin-nav a {
  padding: 7px 13px; border-radius: 999px; font-size: 0.84rem; font-weight: 600;
  color: hsl(var(--muted-ink)); transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.admin-nav a:hover { background: hsl(var(--brand-soft)); color: hsl(var(--brand)); }
.admin-nav a.aktif { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3); }
.admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.95rem; color: hsl(var(--ink)); }
.admin-brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35); }
.admin-brand .mark svg { width: 17px; height: 17px; }
.admin-brand small { display: block; font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: hsl(var(--gold)); }
.user-menu { position: relative; }
.user-menu-trigger { appearance: none; background: transparent; border: 0; display: flex; align-items: center; gap: 10px; font-family: inherit; font-size: 0.85rem; color: hsl(var(--ink-soft)); cursor: pointer; padding: 5px 8px; border-radius: 10px; }
.user-menu-trigger:hover { color: hsl(var(--brand)); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: hsl(var(--brand-soft)); color: hsl(var(--brand)); display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; }
.user-drop { position: absolute; right: 0; top: calc(100% + 8px); width: 230px; background: hsl(var(--bg-elevated)); border: 1px solid hsl(var(--line)); border-radius: 14px; box-shadow: 0 18px 40px -16px hsl(var(--ink) / 0.3); padding: 8px; z-index: 70; }
.user-drop[hidden] { display: none; }
.user-drop .ud-head { padding: 8px 10px 10px; border-bottom: 1px solid hsl(var(--line)); margin-bottom: 6px; }
.user-drop .ud-name { font-weight: 600; font-size: 0.85rem; }
.user-drop .ud-role { display: inline-block; margin-top: 4px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; background: hsl(var(--brand-soft)); color: hsl(var(--brand)); padding: 2px 8px; border-radius: 6px; }
.user-drop a, .user-drop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 0.85rem; color: hsl(var(--ink)); background: transparent; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.user-drop a:hover, .user-drop button:hover { background: hsl(243 40% 94%); }
.user-drop a.keluar:hover, .user-drop button.keluar:hover { background: hsl(var(--maroon-soft)); color: hsl(var(--maroon)); }
.user-drop svg { width: 15px; height: 15px; color: hsl(var(--muted-ink)); }

/* ---------- Catatan operator ---------- */
.note-item { background: hsl(243 40% 94%); border-radius: 10px; padding: 10px 12px; font-size: 0.8rem; }
.note-item .note-meta { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: hsl(var(--muted-ink)); font-weight: 600; }
.note-list { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; }

.empty-state { text-align: center; padding: 48px 20px; color: hsl(var(--muted-ink)); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: hsl(var(--brand)); opacity: 0.7; }

/* ---------- Galeri admin (grid foto) ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 18px 22px; }
.gal-item { overflow: hidden; display: flex; flex-direction: column; }
.gal-thumb { aspect-ratio: 16 / 9; background: hsl(var(--brand-soft)); }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.gal-date { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: hsl(var(--muted-ink)); font-weight: 600; }
.gal-title { font-family: "Fraunces", serif; font-size: 0.98rem; font-weight: 600; }
.gal-cap { font-size: 0.8rem; color: hsl(var(--ink-soft)); flex: 1; }

/* ---------- Kegiatan & tahapan (baris) ---------- */
.keg-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; padding: 14px 20px; }
.keg-date { display: flex; flex-direction: column; gap: 5px; min-width: 96px; }
.keg-date-txt { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: hsl(var(--muted-ink)); }
.keg-body { flex: 1 1 260px; min-width: 0; }
.keg-title { font-family: "Fraunces", serif; font-size: 0.98rem; font-weight: 600; }
.keg-cap { font-size: 0.82rem; color: hsl(var(--ink-soft)); margin-top: 2px; }
.keg-urutan { font-size: 0.7rem; color: hsl(var(--muted-ink)); margin-top: 4px; }
.keg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Responsif ---------- */
@media (max-width: 720px) {
  .wrap-admin { padding: 24px 14px 70px; }
  .admin-tabs { width: 100%; }
  .admin-tabs a { flex: 1 1 auto; justify-content: center; }
  .stat-chip { min-width: 130px; }
  .grid-2 { grid-template-columns: 1fr; }
  .admin-nav { order: 3; width: 100%; justify-content: center; }
}

/* ============================================================
   Kompatibilitas class lama (dipakai admin_backup.php &
   admin_pengaturan.php yang tetap dipertahankan)
   ============================================================ */
.page-head { margin-bottom: 22px; }
.page-head .page-title { font-family: "Fraunces", serif; font-size: 1.7rem; font-weight: 600; margin: 0; line-height: 1.15; }
.page-head .page-sub { color: hsl(var(--muted-ink)); font-size: 0.88rem; margin: 6px 0 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card {
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--line));
  border-radius: 16px;
  box-shadow: 0 1px 0 hsl(var(--line)), 0 12px 30px -18px hsl(var(--ink) / 0.12);
  padding: 20px 22px;
}
.card.narrow { max-width: 560px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { margin: 0; font-family: "Fraunces", serif; font-size: 1.05rem; font-weight: 600; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.field { margin-bottom: 0; }
.field label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: hsl(var(--muted-ink)); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  background: hsl(var(--bg-elevated));
  border: 1px solid hsl(var(--line));
  border-radius: 10px;
  color: hsl(var(--ink));
  padding: 0.7rem 0.9rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: hsl(var(--brand)); box-shadow: 0 0 0 3px hsl(var(--brand) / 0.12); }
.field-note { font-size: 0.74rem; color: hsl(var(--muted-ink)); margin-top: 4px; }
.req { color: hsl(var(--maroon)); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 0.7rem 1.3rem; border-radius: 10px; cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--grad); color: #fff; border: 1px solid transparent; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.3); }
.btn-primary:hover { background: var(--grad); filter: brightness(1.06); }
.btn-outline { background: transparent; border: 1px solid hsl(var(--line-strong)); color: hsl(var(--ink)); }
.btn-outline:hover { background: hsl(var(--brand-soft)); border-color: hsl(var(--brand)); color: hsl(var(--brand)); }
.btn-ghost { background: transparent; border: 1px solid transparent; color: hsl(var(--muted-ink)); }
.btn-ghost:hover { color: hsl(var(--maroon)); background: hsl(var(--maroon-soft)); }
.btn-danger { background: hsl(var(--maroon)); color: hsl(var(--bg)); border: 1px solid hsl(var(--maroon)); }
.btn-block { width: 100%; }
.btn-mini { padding: 0.35rem 0.7rem; font-size: 0.76rem; border-radius: 8px; }
.btn-mini.danger { color: hsl(var(--maroon)); border-color: hsl(var(--maroon)); background: transparent; border: 1px solid; }
.btn-mini.danger:hover { background: hsl(var(--maroon-soft)); }
.hint { font-size: 0.78rem; color: hsl(var(--muted-ink)); }
.mono { font-family: "JetBrains Mono", monospace; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.aksi { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.kosong { text-align: center; color: hsl(var(--muted-ink)); padding: 30px 16px; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.tbl th {
  text-align: left; padding: 12px 16px; font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: hsl(var(--muted-ink)); font-weight: 600;
  border-bottom: 1px solid hsl(var(--line)); white-space: nowrap;
}
.tbl td { padding: 12px 16px; border-bottom: 1px solid hsl(var(--line) / 0.6); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: hsl(var(--brand-soft) / 0.35); }
.mini-select { padding: 0.35rem 0.6rem; border-radius: 8px; border: 1px solid hsl(var(--line)); background: hsl(var(--bg-elevated)); color: hsl(var(--ink)); font-size: 0.78rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.pagination .page { padding: 6px 12px; border-radius: 8px; border: 1px solid hsl(var(--line)); font-size: 0.8rem; color: hsl(var(--ink-soft)); }
.pagination .page.aktif { background: hsl(var(--brand)); color: hsl(var(--bg)); border-color: hsl(var(--brand)); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.toolbar-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar-form input[type="search"], .toolbar-form select {
  background: hsl(var(--bg-elevated)); border: 1px solid hsl(var(--line)); border-radius: 10px;
  padding: 0.6rem 0.9rem; font-family: inherit; font-size: 0.85rem; color: hsl(var(--ink));
}
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tabs .tab { padding: 8px 16px; border-radius: 10px; border: 1px solid hsl(var(--line)); font-size: 0.84rem; color: hsl(var(--muted-ink)); }
.tabs .tab.aktif { background: hsl(var(--brand)); color: hsl(var(--bg)); border-color: hsl(var(--brand)); font-weight: 600; }
.hint-inline { font-size: 0.75rem; color: hsl(var(--muted-ink)); font-weight: 400; text-transform: none; letter-spacing: 0; }
