/* ===========================================================================
   Cashcard v2 — design system
   CSS tulis tangan, tanpa build step: bisa diunggah apa adanya ke cPanel.
   Mendukung tema terang & gelap lewat atribut data-theme di <html>.
   =========================================================================== */

:root {
  --brand-50:  #eef4ff;
  --brand-100: #dbe6ff;
  --brand-300: #93b4ff;
  --brand-500: #2f6bff;
  --brand-600: #1f54e0;
  --brand-700: #1a44b4;

  --ok-50: #e8f8f0;  --ok-500: #12a05f;  --ok-700: #0b7042;
  --warn-50:#fff5e6; --warn-500:#d98207;  --warn-700:#a35f00;
  --dang-50:#fdecec; --dang-500:#d92d20; --dang-700:#a81d16;
  --info-50:#e9f3fe; --info-500:#1570cd;

  --bg:        #f4f6fb;
  --surface:   #ffffff;
  --surface-2: #f8fafc;
  --border:    #e3e8ef;
  --text:      #101828;
  --text-soft: #5a6473;
  --text-mute: #8894a5;

  --radius:    12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow:    0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

  --sidebar-w: 256px;
  --topbar-h:  60px;

  /* Sidebar selalu gelap di kedua tema: identitas merek yang tegas. */
  --side-bg:     #0c1427;
  --side-bg-2:   #121c33;
  --side-line:   #1e2a45;
  --side-text:   #9aa7bf;
  --side-strong: #eef2fb;
  --side-active: rgba(79, 129, 255, .16);

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

html[data-theme="dark"] {
  --side-bg:     #080d1a;
  --side-bg-2:   #0e1526;
  --side-line:   #18223a;
  --brand-50:  #101c33;
  --brand-100: #16243f;
  --bg:        #0b0f17;
  --surface:   #121826;
  --surface-2: #171f30;
  --border:    #253046;
  --text:      #e8edf6;
  --text-soft: #a3aec2;
  --text-mute: #7b8699;
  --ok-50:  #10241a; --warn-50: #2a1f0d; --dang-50: #2c1414; --info-50: #10202f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow:    0 4px 16px rgba(0,0,0,.45);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }

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

a { color: var(--brand-500); text-decoration: none; }
a:hover { text-decoration: underline; }

h1,h2,h3,h4 { margin: 0 0 .4em; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: 12.5px; }

/* ------------------------------------------------------------- layout ---- */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--side-bg);
  color: var(--side-text);
  display: flex; flex-direction: column;
  position: fixed; inset: 0 auto 0 0;
  z-index: 40;
  transition: transform .22s ease;
  overflow: hidden;
}

.sidebar__brand {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--side-line);
  flex: 0 0 auto;
}
/* Logo Cashcard di ubin putih: simbol birunya tetap jelas di sidebar gelap,
   header terang, maupun tema gelap. */
.sidebar__logo {
  width: 32px; height: 32px; border-radius: 9px; padding: 4px;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .08), 0 2px 6px rgba(16, 24, 40, .12);
  flex: 0 0 auto;
}
.sidebar__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sidebar__name { font-weight: 680; font-size: 15px; color: var(--side-strong); letter-spacing: -.01em; }
.icon-btn.sidebar__close { display: none; margin-left: auto; background: transparent; border-color: var(--side-line); color: var(--side-text); }

.sidebar__nav { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px 24px; }
.sidebar__nav::-webkit-scrollbar { width: 6px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: var(--side-line); border-radius: 3px; }

.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 0; }
.nav-group__title {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: #5f6d88;
  padding: 0 10px 6px;
  display: flex; align-items: center; gap: 6px;
}
.nav-group--lipat > summary { cursor: pointer; list-style: none; }
.nav-group--lipat > summary::-webkit-details-marker { display: none; }
.nav-group--lipat > summary:hover { color: var(--side-text); }
.nav-group__panah { width: 13px; height: 13px; margin-left: auto; transition: transform .15s; }
.nav-group--lipat[open] .nav-group__panah { transform: rotate(180deg); }

.nav-link {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--side-text); font-weight: 520; font-size: 13.5px;
  position: relative;
  transition: background .13s, color .13s;
}
.nav-link:hover { background: var(--side-bg-2); color: var(--side-strong); text-decoration: none; }
.nav-link.is-active { background: var(--side-active); color: #fff; font-weight: 600; }
.nav-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: #4f81ff;
}
.nav-link.is-active .nav-link__icon { color: #7ea2ff; }
.nav-link__icon { width: 18px; height: 18px; flex: 0 0 18px; }
.nav-link__badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--dang-500); color: #fff;
  border-radius: 20px; padding: 1px 7px; line-height: 1.5;
}

.sidebar__foot { padding: 12px 16px; border-top: 1px solid var(--side-line); }
.sidebar__foot .badge { background: transparent; border-color: var(--side-line); }

.main {
  flex: 1 1 auto;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-weight: 600; font-size: 14px; color: var(--text-soft); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1 1 auto; }
.icon-btn.topbar__burger { display: none; }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-soft); cursor: pointer;
  display: grid; place-items: center; padding: 0; flex: 0 0 auto;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .ikon { width: 17px; height: 17px; }

.content { padding: 24px; flex: 1 1 auto; width: 100%; max-width: 1440px; margin: 0 auto; }
.content--narrow { max-width: 860px; }

.page-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head__text { flex: 1 1 320px; min-width: 0; }
.page-head h1 { margin-bottom: 2px; }
.page-head__sub { color: var(--text-soft); font-size: 13px; margin: 0; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------------------------------------------------- cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card + .card, .card + .stat-grid, .callout + .card, .alur + .card { margin-top: 16px; }
.card__head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card__head h2, .card__head h3 { margin: 0; }
.card__head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }
.card__foot {
  padding: 12px 18px; border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

/* -------------------------------------------------------------- stats ---- */

.stat-grid {
  display: grid; gap: 14px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--brand-500);
}
.stat--ok::before   { background: var(--ok-500); }
.stat--warn::before { background: var(--warn-500); }
.stat--dang::before { background: var(--dang-500); }
.stat__label { font-size: 12px; color: var(--text-soft); font-weight: 550; margin-bottom: 4px; }
.stat__value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat__meta { font-size: 12px; color: var(--text-mute); margin-top: 4px; }

/* ------------------------------------------------------------- tables ---- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td {
  padding: 10px 14px; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.data th {
  font-size: 11px; font-weight: 680; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-mute); background: var(--surface-2);
  position: sticky; top: 0; z-index: 1;
}
table.data th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
table.data th a:hover { color: var(--text); text-decoration: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.wrap { white-space: normal; min-width: 220px; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .muted { color: var(--text-mute); }

.empty { padding: 44px 20px; text-align: center; color: var(--text-mute); }
.empty__icon { font-size: 30px; opacity: .4; margin-bottom: 8px; }

/* ------------------------------------------------------------ controls --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13px; font-weight: 580; line-height: 1.3;
  cursor: pointer; white-space: nowrap;
  transition: background .13s, border-color .13s, opacity .13s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled, .btn.is-loading { opacity: .6; cursor: not-allowed; }
.btn--primary { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.btn--primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn--danger { background: var(--dang-500); border-color: var(--dang-500); color: #fff; }
.btn--danger:hover { background: var(--dang-700); border-color: var(--dang-700); }
.btn--ok { background: var(--ok-500); border-color: var(--ok-500); color: #fff; }
.btn--ok:hover { background: var(--ok-700); border-color: var(--ok-700); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--sm { padding: 5px 10px; font-size: 12px; }
.btn .ikon { width: 15px; height: 15px; flex: 0 0 auto; }
.btn--sm .ikon { width: 13px; height: 13px; }
.btn--block { width: 100%; }

.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-grid--1 { grid-template-columns: 1fr; }
[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-soft); }
.field__hint { font-size: 11.5px; color: var(--text-mute); }
.field__error { font-size: 11.5px; color: var(--dang-500); font-weight: 550; }

.input, .select, .textarea {
  width: 100%; padding: 8px 11px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13.5px; line-height: 1.45;
  transition: border-color .13s, box-shadow .13s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 16%, transparent);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--dang-500); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--text-mute); }
.textarea { resize: vertical; min-height: 92px; }
.textarea--code { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; word-break: break-all; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238894a5' d='M6 8.5L1.5 4h9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px;
}

.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; cursor: pointer; }
.check input { margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand-500); width: 15px; height: 15px; }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.filter-bar .field { flex: 1 1 160px; }
.filter-bar .field--wide { flex: 2 1 240px; }
.filter-bar__actions { display: flex; gap: 8px; }

/* ------------------------------------------------------------- badges ---- */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; font-weight: 640; white-space: nowrap;
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
}
.badge--success { background: var(--ok-50);   color: var(--ok-700);   border-color: transparent; }
.badge--warning { background: var(--warn-50); color: var(--warn-700); border-color: transparent; }
.badge--danger  { background: var(--dang-50); color: var(--dang-700); border-color: transparent; }
.badge--info    { background: var(--info-50); color: var(--info-500); border-color: transparent; }
.badge--muted   { background: var(--surface-2); color: var(--text-mute); }
html[data-theme="dark"] .badge--success { color: #4ade9a; }
html[data-theme="dark"] .badge--warning { color: #fbbf5a; }
html[data-theme="dark"] .badge--danger  { color: #f98a80; }

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ------------------------------------------------------------- alerts ---- */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert--success { background: var(--ok-50);   color: var(--ok-700); }
.alert--danger  { background: var(--dang-50); color: var(--dang-700); }
.alert--warning { background: var(--warn-50); color: var(--warn-700); }
.alert--info    { background: var(--info-50); color: var(--info-500); }
html[data-theme="dark"] .alert--success { color: #4ade9a; }
html[data-theme="dark"] .alert--danger  { color: #f98a80; }
html[data-theme="dark"] .alert--warning { color: #fbbf5a; }
.alert__close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; font-size: 16px; line-height: 1; padding: 0; }
.alert__close:hover { opacity: 1; }

/* --------------------------------------------------------- pagination ---- */

.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pagination__info { color: var(--text-soft); font-size: 12.5px; margin-right: auto; }
.pagination a, .pagination span {
  min-width: 32px; height: 32px; padding: 0 9px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 13px; font-weight: 550;
}
.pagination a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pagination .is-current { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.pagination .is-gap { border-color: transparent; }

/* --------------------------------------------------------------- auth ---- */

.auth {
  min-height: 100vh; display: grid; place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(1100px 480px at 12% -10%, color-mix(in srgb, var(--brand-500) 14%, transparent), transparent 60%),
    radial-gradient(900px 420px at 100% 110%, color-mix(in srgb, var(--brand-700) 12%, transparent), transparent 55%),
    var(--bg);
}
.auth__box { width: 100%; max-width: 410px; }
.auth__brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
.auth__brand .sidebar__logo { width: 40px; height: 40px; padding: 5px; border-radius: 10px; }
.auth__brand span { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.auth__card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 26px; }
.auth__title { text-align: center; margin-bottom: 4px; }
.auth__sub { text-align: center; color: var(--text-soft); font-size: 13px; margin-bottom: 20px; }
.auth__foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-soft); }
.auth__legal { text-align: center; margin-top: 18px; font-size: 11.5px; color: var(--text-mute); }

/* ---------------------------------------------------------------- qris --- */

.qr-preview {
  display: grid; place-items: center; gap: 12px;
  padding: 20px; background: var(--surface-2);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.qr-preview img { width: 240px; height: 240px; background: #fff; padding: 10px; border-radius: 10px; box-shadow: var(--shadow-sm); }

.kv { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 1px; background: var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kv > dt, .kv > dd { background: var(--surface); padding: 9px 13px; margin: 0; font-size: 13px; }
.kv > dt { color: var(--text-soft); font-weight: 570; }
.kv > dd { word-break: break-word; }
.kv > dd.mono { font-family: var(--mono); font-size: 12px; }

.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-row .input { flex: 1 1 auto; font-family: var(--mono); font-size: 12px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a {
  padding: 9px 14px; font-size: 13px; font-weight: 570; color: var(--text-soft);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.is-active { color: var(--brand-500); border-bottom-color: var(--brand-500); }

/* -------------------------------------------------------------- chart ---- */

.spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; }
.spark__bar { flex: 1 1 auto; background: var(--brand-100); border-radius: 3px 3px 0 0; min-height: 3px; position: relative; }
.spark__bar:hover { background: var(--brand-500); }
html[data-theme="dark"] .spark__bar { background: var(--brand-100); }

/* --------------------------------------------------------------- misc ---- */

.mono { font-family: var(--mono); }
.muted { color: var(--text-mute); }
.soft { color: var(--text-soft); }
.text-sm { font-size: 12.5px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; display: inline-block; vertical-align: bottom; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row--end { justify-content: flex-end; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px 4px 4px; border-radius: 999px;
  border: 1px solid transparent; background: none; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.user-chip:hover { background: var(--surface-2); border-color: var(--border); }
.user-chip__text { display: flex; flex-direction: column; min-width: 0; }
.user-chip__panah { width: 14px; height: 14px; color: var(--text-mute); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
}
.user-chip__name { font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--text); }
.user-chip__role { font-size: 11px; color: var(--text-mute); line-height: 1.25; }

.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 6px; z-index: 50; display: none;
}
.dropdown.is-open .dropdown__menu { display: block; }
.dropdown__head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown__item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; border-radius: 7px; font-size: 13px;
  color: var(--text-soft); background: none; border: 0; cursor: pointer;
  font-family: inherit; text-align: left;
}
.dropdown__item .ikon { width: 16px; height: 16px; }
.dropdown__item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown__item--danger:hover { background: var(--dang-50); color: var(--dang-500); }
.dropdown__sep { height: 1px; background: var(--border); margin: 6px 0; }

.sidebar__backdrop { display: none; }

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: translateX(0); }
  .icon-btn.sidebar__close { display: grid; }
  .main { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .icon-btn.topbar__burger { display: grid; }
  .sidebar__backdrop.is-open {
    display: block; position: fixed; inset: 0;
    background: rgba(8, 13, 26, .55); z-index: 39;
  }
}

@media (max-width: 640px) {
  .content { padding: 16px 14px 28px; }
  .card__body { padding: 14px; }
  .card__head { padding: 12px 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 13px; }
  .stat__value { font-size: 17px; }
  .kv { grid-template-columns: 1fr; }
  .kv > dt { padding-bottom: 0; background: var(--surface); }
  .page-head h1 { font-size: 19px; }
  .page-head__actions { width: 100%; }
  .page-head__actions .btn, .page-head__actions .inline { flex: 1 1 auto; }
  .page-head__actions .inline .btn { width: 100%; }
  .user-chip__text, .user-chip__panah, .topbar__title { display: none; }
  .topbar__spacer { flex: 1 1 auto; }
}

@media print {
  .sidebar, .topbar, .page-head__actions, .filter-bar, .filter-toggle, .pagination, .btn { display: none !important; }
  .main { margin-left: 0; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; }
}

/* ===========================================================================
   Komponen tambahan (ikon, alur dana, callout, grafik, tabel di HP, unggah)
   =========================================================================== */

.ikon {
  width: 18px; height: 18px; display: inline-block; vertical-align: -3px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.badge .ikon { width: 12px; height: 12px; vertical-align: -1px; }
h2 .ikon, h3 .ikon { width: 16px; height: 16px; color: var(--text-mute); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand-500); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.inline { display: inline-flex; margin: 0; }
.text-xs { font-size: 11px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); margin-bottom: 16px; }
.grid-2 > .card { margin-top: 0; }
.grid-2 + .card { margin-top: 0; }
.daftar-polos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.page-head__actions { align-items: center; }

.stat--link { display: block; color: inherit; transition: border-color .13s, box-shadow .13s, transform .13s; }
.stat--link:hover { text-decoration: none; border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-1px); }

.card__body--garis { border-top: 1px solid var(--border); }
.nomor {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-500); color: #fff; font-size: 12px; font-weight: 700; margin-right: 6px; vertical-align: 1px;
}

/* ------------------------------------------------------------ callout --- */
.callout {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
  border: 1px solid; font-size: 13.5px; line-height: 1.55;
}
.callout > .ikon { margin-top: 1px; width: 18px; height: 18px; }
.callout a { font-weight: 600; text-decoration: underline; color: inherit; }
.callout--info    { background: var(--info-50); border-color: color-mix(in srgb, var(--info-500) 25%, transparent); color: var(--text); }
.callout--info > .ikon { color: var(--info-500); }
.callout--warning { background: var(--warn-50); border-color: color-mix(in srgb, var(--warn-500) 30%, transparent); color: var(--text); }
.callout--warning > .ikon { color: var(--warn-500); }
.callout--danger  { background: var(--dang-50); border-color: color-mix(in srgb, var(--dang-500) 28%, transparent); color: var(--text); }
.callout--danger > .ikon { color: var(--dang-500); }
.callout--success { background: var(--ok-50); border-color: color-mix(in srgb, var(--ok-500) 28%, transparent); color: var(--text); }
.callout--success > .ikon { color: var(--ok-500); }

/* ------------------------------------------------------ status strip --- */
.status-strip {
  display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.status-strip__item { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-right: 1px solid var(--border); min-width: 160px; }
.status-strip__item:last-child { border-right: 0; }
.status-strip__item--lebar { flex: 1 1 280px; }
.status-strip__label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); }

/* -------------------------------------------------------- alur dana --- */
.alur {
  list-style: none; margin: 0 0 16px; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.alur__langkah { position: relative; }
.alur__langkah > a, .alur__langkah > div {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; height: 100%;
  color: inherit; text-decoration: none;
}
.alur__langkah + .alur__langkah { border-left: 1px solid var(--border); }
.alur__ikon {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-mute); border: 1px solid var(--border);
}
.alur__ikon .ikon { width: 16px; height: 16px; }
.alur__teks { display: flex; flex-direction: column; min-width: 0; }
.alur__judul { font-size: 13px; font-weight: 650; color: var(--text-soft); }
.alur__ket { font-size: 11.5px; color: var(--text-mute); line-height: 1.35; }
.alur__angka { margin-left: auto; font-weight: 700; font-size: 15px; }
.alur__langkah--lewat .alur__ikon { background: var(--ok-50); color: var(--ok-500); border-color: transparent; }
.alur__langkah--lewat .alur__judul { color: var(--text); }
.alur__langkah--aktif { background: var(--brand-50); }
.alur__langkah--aktif .alur__ikon { background: var(--brand-500); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 18%, transparent); }
.alur__langkah--aktif .alur__judul { color: var(--brand-600); }
html[data-theme="dark"] .alur__langkah--aktif .alur__judul { color: var(--brand-300); }

/* -------------------------------------------- tahap (dashboard) ------- */
.tahap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tahap__item {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px;
  padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: inherit; position: relative; background: var(--surface);
  transition: border-color .13s, box-shadow .13s, transform .13s;
}
.tahap__item:hover { text-decoration: none; border-color: var(--brand-300); box-shadow: var(--shadow); transform: translateY(-1px); }
.tahap__item + .tahap__item::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 12px; height: 1px; background: var(--border);
}
.tahap__ikon { grid-row: 1 / 4; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; }
.tahap__ikon .ikon { width: 18px; height: 18px; }
.tahap__ikon--info  { background: var(--info-50); color: var(--info-500); }
.tahap__ikon--warn  { background: var(--warn-50); color: var(--warn-500); }
.tahap__ikon--brand { background: var(--brand-50); color: var(--brand-500); }
.tahap__ikon--ok    { background: var(--ok-50); color: var(--ok-500); }
.tahap__label { font-size: 12px; color: var(--text-soft); font-weight: 560; }
.tahap__angka { font-size: 22px; font-weight: 720; letter-spacing: -.02em; line-height: 1.2; }
.tahap__dana { font-size: 12px; color: var(--text-mute); }

/* ------------------------------------------------------------ grafik --- */
.grafik { display: flex; gap: 10px; height: 220px; }
.grafik__sumbu {
  display: flex; flex-direction: column; justify-content: space-between;
  font-size: 11px; color: var(--text-mute); text-align: right; padding-bottom: 34px; min-width: 42px;
}
.grafik__area {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: stretch; gap: 6px; position: relative;
  background:
    linear-gradient(var(--border), var(--border)) 0 0 / 100% 1px no-repeat,
    linear-gradient(var(--border), var(--border)) 0 calc(50% - 17px) / 100% 1px no-repeat,
    linear-gradient(var(--border), var(--border)) 0 calc(100% - 34px) / 100% 1px no-repeat;
}
.grafik__kolom { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; }
.grafik__batang {
  position: relative; width: 100%; max-width: 44px; margin: 0 auto;
  background: linear-gradient(180deg, var(--brand-500), color-mix(in srgb, var(--brand-500) 55%, transparent));
  border-radius: 5px 5px 2px 2px; min-height: 0; transition: filter .13s;
}
.grafik__kolom:hover .grafik__batang { filter: brightness(1.15); }
.grafik__kolom.is-hari-ini .grafik__batang { background: linear-gradient(180deg, var(--ok-500), color-mix(in srgb, var(--ok-500) 55%, transparent)); }
.grafik__label { height: 34px; padding-top: 6px; font-size: 10.5px; line-height: 1.25; text-align: center; color: var(--text-mute); }
.grafik__kolom.is-hari-ini .grafik__label { color: var(--text); font-weight: 650; }
.grafik__tip {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface); font-size: 11.5px; line-height: 1.45;
  padding: 7px 9px; border-radius: 7px; white-space: nowrap; z-index: 5; text-align: center; pointer-events: none;
}
.grafik__kolom:hover .grafik__tip { display: block; }

/* ---------------------------------------------- tabel jadi kartu (HP) --- */
table.data tbody tr.is-dipilih { background: var(--brand-50); }
table.data--pilih tbody tr { cursor: pointer; }
table.data tbody tr.baris-baru { animation: sorot 1.6s ease; }
@keyframes sorot { from { background: color-mix(in srgb, var(--ok-500) 22%, transparent); } }

@media (max-width: 720px) {
  table.data--stack thead { display: none; }
  table.data--stack, table.data--stack tbody { display: block; }
  table.data--stack tbody tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
    padding: 12px 14px; border-bottom: 1px solid var(--border); position: relative;
  }
  table.data--stack tbody tr:last-child { border-bottom: 0; }
  table.data--stack td { border: 0; padding: 0; white-space: normal; min-width: 0; text-align: left !important; }
  table.data--stack td.wrap { min-width: 0; grid-column: 1 / -1; }
  table.data--stack td[data-label]::before {
    content: attr(data-label); display: block;
    font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute);
  }
  table.data--stack td:not([data-label]) { grid-column: 1 / -1; }
  table.data--stack td.text-right:not([data-label]) .btn { width: 100%; }
  table.data--stack td:first-child:has(input[type="checkbox"]) { position: absolute; right: 14px; top: 12px; grid-column: auto; }
}

/* ---------------------------------------------- filter di layar kecil --- */
.filter-toggle { display: none; }
.check--filter { align-self: center; padding-bottom: 8px; }
@media (max-width: 720px) {
  .filter-toggle {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 12px 14px; background: var(--surface-2); border: 0; border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0; font: inherit; font-weight: 600; color: var(--text-soft); cursor: pointer;
  }
  .filter-toggle + .filter-bar { display: none; border-radius: 0; }
  .filter-toggle + .filter-bar.is-open { display: flex; }
  .filter-bar .field { flex: 1 1 calc(50% - 10px); }
  .filter-bar .field--wide { flex-basis: 100%; }
  .filter-bar__actions { width: 100%; }
  .filter-bar__actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------------------ unggah --- */
.unggah {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 26px 16px; border: 2px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2); cursor: pointer; text-align: center; color: var(--text-soft);
  transition: border-color .13s, background .13s;
}
.unggah .ikon { width: 26px; height: 26px; color: var(--brand-500); }
.unggah:hover, .unggah.is-seret { border-color: var(--brand-500); background: var(--brand-50); }
.unggah.is-terisi { border-style: solid; border-color: var(--ok-500); background: var(--ok-50); }
.unggah__teks strong { color: var(--brand-500); }
.unggah__nama { font-size: 12px; color: var(--text-mute); }
.unggah__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.field > label.unggah { font-size: 13px; font-weight: 500; }

.form-grid--cari { grid-template-columns: 1fr 1fr auto; align-items: end; }
.field--tombol .btn { width: 100%; }
@media (max-width: 640px) { .form-grid--cari { grid-template-columns: 1fr 1fr; } .field--tombol { grid-column: 1 / -1; } }

.empty--kecil { padding: 22px 18px 6px; }
.empty__icon .ikon { width: 34px; height: 34px; stroke-width: 1.6; }

/* --------------------------------------------------------- lain-lain --- */
.email-teks {
  margin: 0; white-space: pre-wrap; word-break: break-word; max-height: 520px; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font-size: 12px; line-height: 1.6;
}
.bukti-mini { display: inline-block; }
.bukti-mini img { max-width: 220px; max-height: 260px; border-radius: 10px; border: 1px solid var(--border); display: block; }

.galat { max-width: 520px; margin: 40px auto; text-align: center; }
.galat__ikon { font-size: 44px; font-weight: 700; letter-spacing: -.03em; color: var(--brand-500); }
.card .galat__ikon {
  width: 64px; height: 64px; margin: 4px auto 6px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-50);
}
.card .galat__ikon .ikon { width: 28px; height: 28px; }
.card .galat__ikon--dang { background: var(--dang-50); color: var(--dang-500); }

@media (max-width: 900px) {
  .alur { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .alur__langkah:nth-child(3) { border-left: 0; }
  .alur__langkah:nth-child(n+3) { border-top: 1px solid var(--border); }
  .tahap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tahap__item + .tahap__item::before { display: none; }
}
@media (max-width: 520px) {
  .alur__ket { display: none; }
  .alur__langkah > a, .alur__langkah > div { padding: 10px; gap: 8px; }
  .alur__ikon { width: 30px; height: 30px; flex-basis: 30px; }
  .tahap__item { padding: 12px; column-gap: 10px; }
  .tahap__ikon { width: 32px; height: 32px; }
  .tahap__angka { font-size: 18px; }
  .grafik { height: 180px; }
  .grafik__sumbu { min-width: 34px; }
  .grafik__area { gap: 3px; }
  .grafik__label { font-size: 9.5px; }
  .grafik__kolom:nth-child(even):not(.is-hari-ini) .grafik__label { visibility: hidden; }
  .status-strip__item { border-right: 0; border-bottom: 1px solid var(--border); flex: 1 1 100%; }
}

/* ------------------------------------------------------- role & izin --- */
.izin-grup { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin: 0 0 14px; }
.izin-grup > legend { padding: 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); }
.izin-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.izin { padding: 6px 8px; border-radius: 7px; }
.izin:hover { background: var(--surface-2); }
.izin--kunci { opacity: .55; cursor: not-allowed; }
.akses th.akses__role { text-align: center; white-space: nowrap; }
.akses td.akses__sel { text-align: center; }
.akses__ya { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ok-50); color: var(--ok-500); }
.akses__ya .ikon { width: 14px; height: 14px; stroke-width: 3; }
.akses__tidak { color: var(--text-mute); }
.akses tr.akses__grup td { background: var(--surface-2); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-mute); padding-top: 8px; padding-bottom: 8px; }
.akses td:first-child { white-space: normal; min-width: 240px; }

/* -------------------------------------------------------- pengaturan --- */
.tabs--pengaturan a { display: inline-flex; align-items: center; gap: 7px; }
.tabs--pengaturan .ikon { width: 15px; height: 15px; }

.saklar { display: flex; align-items: center; gap: 10px; min-height: 38px; }
.saklar__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.saklar__label { position: relative; padding-left: 50px; cursor: pointer; font-size: 13.5px; font-weight: 560; color: var(--text); line-height: 1.35; }
.saklar__label::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 38px; height: 22px; border-radius: 22px; background: var(--border); transition: background .15s;
}
.saklar__label::after {
  content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s;
}
.saklar__input:checked + .saklar__label::before { background: var(--ok-500); }
.saklar__input:checked + .saklar__label::after { left: 19px; }
.saklar__input:focus-visible + .saklar__label::before { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.daftar-saklar { list-style: none; margin: 0; padding: 0; }
.daftar-saklar li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.daftar-saklar li:last-child { border-bottom: 0; }
.daftar-saklar li > :first-child { flex: 1 1 auto; }

.input--warna { width: 54px; height: 38px; padding: 3px; cursor: pointer; }

.gaya-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gaya {
  display: flex; flex-direction: column; gap: 6px; padding: 10px; cursor: pointer;
  border: 2px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .13s, box-shadow .13s;
}
.gaya:hover { border-color: var(--brand-300); }
.gaya.is-dipilih, .gaya:has(input:checked) { border-color: var(--brand-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 16%, transparent); }
.gaya input { position: absolute; opacity: 0; }
.gaya img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; object-position: bottom; border-radius: 8px; background: var(--surface-2); }
.gaya__nama { font-weight: 650; font-size: 13px; }
.gaya__ket { font-size: 11.5px; color: var(--text-mute); line-height: 1.4; }

.simpan-bar {
  position: sticky; bottom: 0; z-index: 5; margin: 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Bukti di halaman klaim tidak lagi memenuhi layar. */
.card__body > a > img[alt="Bukti transfer"] { max-height: 640px; width: auto; max-width: 100%; display: block; margin: 0 auto; }

/* ------------------------------------------------------- data QRIS --- */
/* Tabel ala RadOne: baris pencarian per kolom, kolom bisa disembunyikan. */
table.data [data-kolom].is-tersembunyi { display: none; }
table.data tr.baris-cari th { background: var(--surface); padding-top: 6px; padding-bottom: 8px; text-transform: none; letter-spacing: 0; }
.input--kolom { padding: 5px 8px; font-size: 12px; min-width: 90px; height: auto; }
table.data .kolom-pilih { width: 36px; padding-right: 0; }
table.data .kolom-pilih input { width: 15px; height: 15px; accent-color: var(--brand-500); }
.dropdown__menu--tetap { min-width: 200px; display: none; flex-direction: column; gap: 4px; padding: 10px 12px; }
.dropdown.is-open .dropdown__menu--tetap { display: flex; }

.salin-teks {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: copy;
  border-bottom: 1px dashed var(--border);
}
.salin-teks:hover { color: var(--brand-500); border-bottom-color: var(--brand-500); }

/* Saklar ON/OFF di dalam tabel: satu klik, tanpa membuka halaman. */
.status-saklar {
  position: relative; display: inline-flex; align-items: center; justify-content: flex-end;
  width: 58px; height: 26px; padding: 0 9px; border: 0; border-radius: 26px; cursor: pointer;
  background: var(--border); color: var(--text-soft); font: 700 10.5px var(--font); letter-spacing: .04em;
  transition: background .15s;
}
.status-saklar::before {
  content: ""; position: absolute; left: 4px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: left .15s;
}
.status-saklar.is-on { background: var(--ok-500); color: #fff; justify-content: flex-start; }
.status-saklar.is-on::before { left: 36px; }
.status-saklar:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.status-saklar.is-loading { opacity: .6; }
.btn--hapus { color: var(--dang-500); }
.btn--hapus .ikon { width: 15px; height: 15px; }

/* Panel edit massal di atas tabel. */
.massal__panel { border-bottom: 1px solid var(--border); background: var(--surface-2); }
.massal__panel > summary { padding: 11px 16px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.massal__panel > summary .ikon { width: 16px; height: 16px; }
.massal__isi { padding: 4px 16px 0; }
.massal__aksi { padding: 12px 16px 14px; }
.massal__cakupan { display: flex; gap: 18px; flex-wrap: wrap; padding: 0 16px 10px; }

.tabel-kaki { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); }
.tabel-kaki form { display: inline-flex; align-items: center; gap: 8px; }
.tabel-kaki .pagination { border-top: 0; padding: 0; }
.select--kecil { width: auto; padding: 5px 28px 5px 8px; height: auto; font-size: 12.5px; }

/* Ringkasan hasil parse di halaman Ubah. */
.kv--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; background: none; }
.kv--grid > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 11px; }
.kv--grid dt { font-size: 11px; color: var(--text-mute); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kv--grid dd { margin: 2px 0 0; font-size: 13px; word-break: break-all; }

/* Generate: blok sub-tag EMVCo yang bisa dibuka-tutup. */
.tag-blok { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 12px; }
.tag-blok > summary { padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.tag-blok[open] > summary { border-bottom: 1px solid var(--border); }
.tag-blok > .form-grid { padding: 12px 14px; }
[data-qris-generate]:has(input[data-gen-sumber][value="string"]:checked) [data-gen-panel="id"],
[data-qris-generate]:has(input[data-gen-sumber][value="id"]:checked) [data-gen-panel="string"] { display: none; }

/* Gambar QR bertema (tema Card lebih tinggi dari lebarnya). */
.qr-preview img { height: auto; }
.logo-qris { width: 96px; height: 96px; display: grid; place-items: center; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: #fff; }
.logo-qris img { max-width: 84px; max-height: 84px; }
hr.garis { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* Kode masuk WhatsApp. */
.input--kode { font-family: var(--mono); font-size: 22px; letter-spacing: .4em; text-align: center; }

/* ------------------------------------------------------ chat WhatsApp --- */
.page-head--rapat { margin-bottom: 10px; }
.wa-device { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-device .input { width: auto; flex: 0 1 240px; min-width: 150px; }

.wa-chat {
  display: grid; grid-template-columns: minmax(260px, 340px) 1fr; height: calc(100vh - 200px); min-height: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.wa-chat__daftar { display: flex; flex-direction: column; border-right: 1px solid var(--border); min-height: 0; }
.wa-chat__cari { padding: 10px; border-bottom: 1px solid var(--border); }
.wa-baru { border-bottom: 1px solid var(--border); }
.wa-baru > summary { padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--brand-500); }
.wa-baru > summary .ikon { width: 15px; height: 15px; }
.wa-baru > form { padding: 0 10px 10px; gap: 8px; }
.wa-daftar { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto; }
.wa-daftar a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; color: var(--text); border-bottom: 1px solid var(--border); }
.wa-daftar a:hover { background: var(--surface-2); text-decoration: none; }
.wa-daftar a.is-aktif { background: var(--brand-50); }
.wa-daftar__teks { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.wa-daftar__baris { display: flex; justify-content: space-between; gap: 8px; }
.wa-daftar__baris strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }

.wa-chat__isi { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface-2); }
.wa-chat__kosong { margin: auto; text-align: center; color: var(--text-mute); padding: 20px; }
.wa-chat__kepala { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.wa-chat__kembali { display: none; font-size: 18px; text-decoration: none; }
.wa-chat__pesan { flex: 1 1 auto; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.wa-chat__tulis { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.wa-chat__tulis .textarea { min-height: 40px; max-height: 150px; resize: none; flex: 1 1 auto; }
.wa-chat__tulis label.icon-btn { cursor: pointer; }
.wa-chat__lampiran { padding: 0 14px 6px; background: var(--surface); }
.wa-chat__lampiran:empty { display: none; }

.wa-gelembung {
  max-width: min(78%, 560px); align-self: flex-start; padding: 7px 10px 5px; border-radius: 10px 10px 10px 3px;
  background: var(--surface); box-shadow: var(--shadow-sm); font-size: 13.5px; line-height: 1.45; word-wrap: break-word;
}
.wa-gelembung--saya { align-self: flex-end; border-radius: 10px 10px 3px 10px; background: #d9fdd3; color: #102a16; }
html[data-theme="dark"] .wa-gelembung--saya { background: #134d37; color: #e9fbe9; }
.wa-gelembung__dari { font-size: 11.5px; font-weight: 650; color: var(--brand-500); margin-bottom: 2px; }
.wa-gelembung__media { font-size: 12px; color: var(--text-soft); display: flex; align-items: center; gap: 4px; }
.wa-gelembung__media .ikon { width: 14px; height: 14px; }
.wa-gelembung__jam { font-size: 10.5px; color: var(--text-mute); text-align: right; margin-top: 2px; }
.wa-gelembung--saya .wa-gelembung__jam { color: inherit; opacity: .6; }
.wa-hari { text-align: center; margin: 8px 0 4px; }
.wa-hari span { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; font-size: 11.5px; color: var(--text-soft); }
.wa-kosong { text-align: center; margin: auto; }

/* HP: satu panel seperti aplikasi WhatsApp — daftar, atau percakapan layar penuh. */
@media (max-width: 767px) {
  .wa-chat { grid-template-columns: 1fr; height: calc(100vh - 170px); }
  .wa-chat .wa-chat__isi { display: none; }
  .wa-chat--buka .wa-chat__daftar { display: none; }
  .wa-chat--buka .wa-chat__isi { display: flex; }
  .wa-chat__kembali { display: inline-grid; place-items: center; }
  .page-head--rapat .page-head__actions { width: 100%; }
}
