/* ==========================================================================
   KIPAPP Pezet
   Satu aksen, dua tema. Semua pasangan warna sudah dihitung, bukan dikira.
   Bootstrap tidak dipakai: modal dan komponen dibuat sendiri supaya tidak ada
   kelas framework yang bertabrakan dengan token di sini.
   ========================================================================== */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;
  --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;

  --focus: 2px solid var(--accent);
  --shadow-pop: 0 12px 32px rgba(15, 19, 26, .16);
  --shadow-card: 0 1px 2px rgba(15, 19, 26, .05);
}

/* ---------- tema terang (bawaan) ---------- */
html[data-theme="light"] {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #e3e6eb;
  --line-2: #808b9d;          /* batas komponen, 3.44:1 di atas surface */
  --ink: #14181f;             /* 17.79:1 */
  --ink-2: #4a5363;           /*  7.75:1 */
  --ink-3: #66707f;           /*  5.01:1 di surface, 4.68:1 di bg */
  --accent: #146c43;          /*  6.45:1 */
  --accent-hover: #0f5a37;
  --accent-soft: #e6f2ec;
  --on-accent: #ffffff;       /*  6.45:1 di atas accent */
  --danger: #b42318;          /*  6.57:1 */
  --danger-soft: #fef3f2;
  --danger-line: #f0b4ae;
  --ok: #067647;
  --warn: #8a5a00;
  --warn-soft: #fdf6e3;
  color-scheme: light;
}

/* ---------- tema gelap ---------- */
html[data-theme="dark"] {
  --bg: #0f1319;
  --surface: #161b23;
  --surface-2: #1e242e;
  --line: #262d38;
  --line-2: #63738a;          /* 3.58:1 di atas surface */
  --ink: #e9edf3;             /* 14.71:1 */
  --ink-2: #a8b2c1;           /*  8.07:1 */
  --ink-3: #8892a2;           /*  5.50:1 */
  --accent: #5fd39a;          /*  9.28:1 */
  --accent-hover: #7ee2b0;
  --accent-soft: #16302a;
  --on-accent: #08130d;       /* 10.16:1 di atas accent */
  --danger: #ff8f85;          /*  7.83:1 */
  --danger-soft: #2a1512;
  --danger-line: #7a332c;
  --ok: #6ee7a8;
  --warn: #f0c674;
  --warn-soft: #2a2113;
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, .55);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { margin: 0; font-weight: 650; line-height: 1.25; }
p { margin: 0; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Fokus harus selalu kelihatan. */
:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
:focus:not(:focus-visible) { outline: none; }

.hidden { display: none !important; }
/* Atribut hidden kalah oleh aturan kelas seperti .login{display:flex} dan
   .overlay{display:flex}. Ditegakkan di sini supaya semua elemen yang memakai
   atribut hidden benar-benar hilang, bukan hanya yang kebetulan punya aturan
   sendiri. Tanpa ini, layar login tetap menutupi aplikasi setelah masuk. */
[hidden] { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Layar masuk
   -------------------------------------------------------------------------- */
.login {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-5);
  background: var(--bg);
}
.login__card {
  width: 100%; max-width: 360px;
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.login__title { font-size: 20px; margin-bottom: 4px; }
.login__sub { font-size: 13.5px; color: var(--ink-2); margin-bottom: var(--sp-5); }
.login__foot {
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink-3);
}

.pw { position: relative; }
.pw .input { padding-right: 52px; }
.pw__eye {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--ink-3);
}
.pw__eye:hover { color: var(--accent); }
.pw__eye svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Kerangka
   -------------------------------------------------------------------------- */
.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4) 72px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}

.brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }

.brand__mark {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800; font-size: 19px;
}

.brand__name { font-size: 16px; letter-spacing: .01em; }
.brand__sub { font-size: 12.5px; color: var(--ink-3); }

.topbar__right { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }

.account {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px; color: var(--ink-2);
  max-width: 100%;
}
.account__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.account__dot--off { background: var(--danger); }
.account__email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Tombol
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn--danger { background: var(--surface); border-color: var(--danger-line); color: var(--danger); }
.btn--danger:hover { background: var(--danger); border-color: var(--danger); color: var(--surface); }

.btn--sm { min-height: 44px; padding: 0 var(--sp-3); font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--danger:hover { border-color: var(--danger); color: var(--danger); }

/* --------------------------------------------------------------------------
   Kartu
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--sp-4);
  overflow: hidden;
}

.card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.card__title { font-size: 15px; }
.card__hint { font-size: 12.5px; color: var(--ink-3); max-width: 46ch; }
.card__body { padding: var(--sp-5); }

/* Statistik */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-4);
}
.stat__value {
  font-size: 26px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.stat__label { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.stat--alert .stat__value { color: var(--danger); }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
  .stat__value { font-size: 20px; }
  .stat__label { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Formulir
   -------------------------------------------------------------------------- */
.field { margin-bottom: var(--sp-4); }
.field:last-child { margin-bottom: 0; }

.lbl {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.lbl__req { color: var(--danger); }
.lbl__opt { font-weight: 400; color: var(--ink-3); }

.input {
  width: 100%;
  min-height: 44px;
  padding: 10px var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.input::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus { border-color: var(--accent); outline: var(--focus); outline-offset: 1px; }

select.input { appearance: none; padding-right: 36px; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

.form-msg { font-size: 13px; font-weight: 600; margin-top: var(--sp-3); min-height: 18px; }
.form-msg--err { color: var(--danger); }
.form-msg--ok { color: var(--ok); }

/* Dropzone */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: var(--sp-5);
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 26px; height: 26px; color: var(--accent); }
.drop b { font-size: 14px; }
.drop span { font-size: 12.5px; color: var(--ink-2); }
.drop__files {
  margin-top: var(--sp-2); font-size: 12.5px; color: var(--ink-2);
  display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%;
}

/* Kotak centang sebagai baris 44px */
.check {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  min-height: 44px;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
}
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.check__text { font-size: 13.5px; font-weight: 600; }
.check__note { font-size: 12.5px; color: var(--ink-2); font-weight: 400; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Date picker
   -------------------------------------------------------------------------- */
.dp { position: relative; }

.dp__trigger {
  display: flex; align-items: center; gap: var(--sp-2);
  width: 100%; min-height: 44px;
  padding: 10px 44px 10px var(--sp-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}
.dp__trigger:hover { border-color: var(--accent); }
.dp__trigger svg { width: 17px; height: 17px; color: var(--ink-2); flex: none; }
.dp__value { flex: 1; min-width: 0; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp__value.is-empty { color: var(--ink-3); }
.dp__clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2);
}
.dp__clear:hover { background: var(--danger); color: var(--surface); }
.dp__clear svg { width: 12px; height: 12px; }

.dp__pop {
  position: fixed;            /* koordinat dari getBoundingClientRect = viewport */
  z-index: 60;
  width: 336px; max-width: calc(100vw - 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  padding: var(--sp-3);
}

.dp__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); margin-bottom: var(--sp-2);
}
.dp__title {
  flex: 1;
  min-height: 44px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 700;
  color: var(--ink);
  text-align: center;
}
.dp__title:hover { background: var(--surface-2); }

.dp__nav {
  width: 44px; height: 44px; flex: none;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: grid; place-items: center;
}
.dp__nav:hover { border-color: var(--accent); color: var(--accent); }
.dp__nav svg { width: 17px; height: 17px; }
.dp__nav[hidden] { display: none; }

.dp__status {
  min-height: 18px;
  font-size: 12.5px; color: var(--ink-2);
  text-align: center;
  margin-bottom: var(--sp-2);
}

.dp__dow, .dp__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp__dow span {
  text-align: center;
  font-size: 12px; font-weight: 700;
  color: var(--ink-3);
  padding: 4px 0;
}

.dp__day {
  height: 44px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.dp__day:hover { background: var(--surface-2); }
.dp__day.is-out { color: var(--ink-3); font-weight: 400; }
.dp__day.is-today::after {
  content: "";
  position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.dp__day.is-today { font-weight: 800; box-shadow: inset 0 0 0 1.5px var(--accent); }
.dp__day.is-today.is-out { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.dp__day.is-selected { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.dp__day.is-selected::after { background: var(--on-accent); }
.dp__day.is-in-range { background: var(--accent-soft); color: var(--accent); border-radius: 0; }
.dp__day.is-range-start { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.dp__day.is-range-end { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.dp__day:disabled { opacity: .35; cursor: not-allowed; }

.dp__foot {
  display: flex; gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.dp__foot .btn { flex: 1; padding: 0 var(--sp-2); }

/* Pemilih bulan dan tahun */
.dp__months, .dp__years {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  padding: var(--sp-1) 0;
}
.dp__months button, .dp__years button {
  min-height: 44px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
}
.dp__months button:hover, .dp__years button:hover { border-color: var(--accent); color: var(--accent); }
.dp__months button.is-active, .dp__years button.is-active {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}

/* Layar sempit: lembar bawah dengan latar gelap */
.dp__backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(9, 12, 17, .55);
  display: none;
}
@media (max-width: 600px) {
  .dp__pop {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;
    width: auto; max-width: none;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: 0;
    padding: var(--sp-4) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
    z-index: 110;
  }
  .dp__backdrop.is-open { display: block; }
}

/* --------------------------------------------------------------------------
   Tabel
   -------------------------------------------------------------------------- */
.table-tools {
  display: flex; align-items: center; gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.table-tools .search { position: relative; flex: 1; min-width: 180px; }
.table-tools .search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--ink-3); pointer-events: none;
}
.table-tools .search input { padding-left: 36px; }
.table-tools select.input { width: auto; min-width: 160px; }

.dt-container { padding: 0 var(--sp-5) var(--sp-4); }

table.dataTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.dataTable thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  height: 44px;
}
table.dataTable thead th.dt-orderable-asc,
table.dataTable thead th.dt-orderable-desc { cursor: pointer; }
table.dataTable thead th.dt-orderable-asc:hover,
table.dataTable thead th.dt-orderable-desc:hover { color: var(--accent); }
table.dataTable thead th.dt-ordering-asc,
table.dataTable thead th.dt-ordering-desc { color: var(--ink); }
table.dataTable thead th span.dt-column-order { margin-left: 4px; opacity: .6; }

table.dataTable tbody td {
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.dataTable tbody tr:last-child td { border-bottom: 0; }
table.dataTable tbody tr:hover { background: var(--surface-2); }

.keg__name { font-size: 14px; font-weight: 650; margin-bottom: 2px; }
.keg__meta { font-size: 12.5px; color: var(--ink-3); }
.col-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-date .dt { display: block; }

.files { display: flex; flex-direction: column; }
.file {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
  font-size: 13px; color: var(--accent);
  text-decoration: none;
  max-width: 100%;
}
.file:hover { text-decoration: underline; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file svg { width: 14px; height: 14px; flex: none; }
.file__copy { width: 44px; height: 44px; flex: none; }
.files__empty { font-size: 12.5px; color: var(--ink-3); }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.dt-layout-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3) 0 0;
}
.dt-info { font-size: 12.5px; color: var(--ink-3); }
.dt-paging { display: flex; gap: 6px; flex-wrap: wrap; }
.dt-paging button {
  min-width: 44px; min-height: 44px;
  padding: 0 var(--sp-2);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
}
.dt-paging button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.dt-paging button.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dt-paging button:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 760px) {
  .dt-container { padding: 0 var(--sp-4) var(--sp-4); }
  /* Tabel jadi kartu bertumpuk; tidak ada geser samping. */
  table.dataTable thead { display: none; }
  table.dataTable tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--sp-3);
    margin-bottom: var(--sp-3);
  }
  table.dataTable tbody td {
    display: block;
    border: 0;
    padding: 4px 0;
  }
  table.dataTable tbody tr:hover { background: transparent; }
  .col-date::before { content: "Tanggal: "; color: var(--ink-3); font-size: 12px; }
  .row-actions { margin-top: var(--sp-2); }
  .row-actions .btn { flex: 1; }
}

/* --------------------------------------------------------------------------
   Antrean dan kegagalan
   -------------------------------------------------------------------------- */
.queue-item, .fail-item {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
}
.queue-item__name, .fail-item__name { font-size: 13.5px; font-weight: 600; }
.queue-item__meta, .fail-item__meta { font-size: 12.5px; color: var(--ink-3); }
.fail-item { border-color: var(--danger-line); background: var(--danger-soft); }
.fail-item__error { font-size: 12.5px; color: var(--danger); margin-top: 2px; }

.bar {
  height: 5px; border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin-top: var(--sp-2);
  min-width: 140px;
}
.bar__fill { height: 100%; background: var(--accent); transition: width .3s; }

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(9, 12, 17, .55);
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-4);
  overflow-y: auto;
}
.overlay[hidden] { display: none; }

.modal {
  width: 100%; max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  max-height: 90dvh;
  display: flex; flex-direction: column;
}
.modal__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 16px; }
.modal__body { padding: var(--sp-5); overflow-y: auto; }
.modal__foot {
  display: flex; gap: var(--sp-2); justify-content: flex-end;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 24px;
  transform: translate(-50%, 12px);
  max-width: min(92vw, 460px);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 300;
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast--err { border-color: var(--danger); color: var(--danger); }

/* Keadaan kosong dan galat */
.state {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  color: var(--ink-2);
}
.state svg { width: 34px; height: 34px; color: var(--line-2); margin-bottom: var(--sp-2); }
.state b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.state span { font-size: 13.5px; }

.skeleton {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
