:root {
  --ink: #16323f;
  --muted: #6b8490;
  --line: #e7eef0;
  --line-strong: #d7e3e6;
  --paper: #ffffff;
  --canvas: #f3f6f7;
  --teal: #12b5ab;
  --teal-dark: #0e8f88;
  --teal-soft: #e7f7f6;
  --ok: #0b7a52;
  --ok-bg: #e6f6ee;
  --warn: #9a6b10;
  --warn-bg: #fff6e5;
  --bad: #b42318;
  --bad-bg: #fff1f0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 48, .04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; max-width: 100%; }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.admin-app {
  min-height: 100vh;
  font-family: Inter, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}
.admin-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 14px 20px 48px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.admin-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  min-height: 56px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 10px;
  z-index: 20;
}
.admin-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.admin-mark, .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  flex: none;
}
.admin-logo strong { display: block; font-size: 12px; line-height: 1.15; letter-spacing: .12em; }
.admin-logo small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .2em; }
.admin-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a {
  flex: none;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
}
.admin-nav a.on { background: var(--teal-soft); color: var(--teal-dark); }
.admin-nav a:hover { color: var(--ink); background: #f3f7f8; }
.admin-nav a.on:hover { color: var(--teal-dark); background: var(--teal-soft); }
.admin-user {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}
.admin-user form { margin: 0; }
.ghost-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  white-space: nowrap;
  border-radius: 999px;
}
.ghost-link:hover { color: var(--ink); background: #f3f7f8; }
.user-chip {
  width: auto !important;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.user-chip:hover { background: #f6f9fa; }
.admin-main { padding-top: 20px; }
.admin-main h1 { font-size: 22px; margin: 0; letter-spacing: -.03em; font-weight: 700; }
.admin-main h2 { font-size: 15px; margin: 0 0 12px; font-weight: 700; }
.admin-main .muted { color: var(--muted); margin: 0 0 14px; font-size: 13px; line-height: 1.5; }
.admin-main .muted.tight { margin: 8px 0 0; }
.table-cards tfoot td { border-top: 1px solid #e6f1f0; padding-top: 10px; }
.swal-field {
  display: block;
  text-align: left;
  font-size: 12px;
  color: #7a93a3;
  font-weight: 600;
}
.swal-field .swal2-input { margin: 6px 0 12px; width: 100%; }
.swal-hint { text-align: left; font-size: 12px; color: #8aa3b0; margin: 0; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-grid.has-fee {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.kpi-grid.has-fee .kpi-card > b { font-size: 20px; }
.kpi-card, .panel, .admin-main .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi-card {
  padding: 16px 16px 14px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
.kpi-card > * { width: 100%; }
a.kpi-card { color: inherit; text-decoration: none; }
a.kpi-card:hover { border-color: #cde7e4; background: #fcfefe; }
.kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.kpi-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--teal-soft);
  position: relative;
  flex: none;
  display: block;
  font-style: normal;
  line-height: 0;
  overflow: hidden;
  color: var(--teal);
}
.kpi-ico::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid var(--teal);
  border-radius: 4px;
}
.kpi-ico.down::after { border: 0; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); inset: 8px 10px; }
.kpi-ico.qr::after { border-radius: 3px; }
.kpi-ico.bag::after { border-radius: 3px 3px 5px 5px; }
.kpi-ico.fee::after {
  border: 0;
  content: "%";
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
  line-height: 28px;
  text-align: center;
}
.kpi-card > b {
  display: block;
  margin: 12px 0 6px;
  min-height: 26px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: left;
}
.kpi-card p { margin: 0; margin-top: auto; color: var(--muted); font-size: 12px; line-height: 1.4; }
.kpi-ok { color: #0f9d94; font-weight: 700; }
.kpi-warn { color: #c47a12; font-weight: 700; }
.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 12px;
  margin-bottom: 16px;
}
.panel { padding: 16px 18px; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-head a { color: var(--teal-dark); font-size: 13px; font-weight: 600; text-decoration: none; }
.pill {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  white-space: nowrap;
}
.bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  height: 168px;
  gap: 8px;
}
.bar-col { display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; text-decoration: none; color: inherit; }
.bar-track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-top: 1px solid #eef6f6;
  background-image: repeating-linear-gradient(to top, #eef6f6 0 1px, transparent 1px 28px);
}
.bar-track span {
  display: block;
  width: 42%;
  max-width: 18px;
  background: var(--teal);
  border-radius: 6px 6px 2px 2px;
}
.bar-col small { margin-top: 8px; color: #8aa3b0; font-size: 10px; }
.bar-col small.on { color: #0f766e; font-weight: 700; }
.empty {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8aa3b0;
  padding: 20px;
}
.empty strong { color: #3d5d6c; font-size: 14px; }
.empty p { margin: 6px 0 0; font-size: 12px; max-width: 240px; }
.soft-list { list-style: none; margin: 0; padding: 0; }
.soft-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f0f6f6;
}
.soft-list li:last-child { border-bottom: 0; }
.soft-list strong { font-size: 13px; }
.soft-list p { margin: 2px 0 0; color: #8aa3b0; font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c5d5dc; margin-top: 6px; flex: none; }
.dot.on { background: #19c2b8; box-shadow: 0 0 0 4px #e7faf8; }
.volume { display: grid; gap: 18px; padding-top: 8px; }
.vol-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 8px; }
.vol-meta span { color: #8aa3b0; font-size: 12px; }
.vol-meta strong { font-size: 20px; }
.meter {
  height: 10px;
  background: #eefbf9;
  border-radius: 999px;
  overflow: hidden;
}
.meter i { display: block; height: 100%; width: 0; background: #b7efe9; border-radius: 999px; }
.meter.teal i { background: var(--teal); }
.legend { color: #8aa3b0; font-size: 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lg { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #b7efe9; margin-right: 4px; }
.lg.teal { background: var(--teal); }
.admin-main .card { padding: 16px 18px; margin: 0 0 16px; }
.admin-main .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-main .stats article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.admin-main .stats span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.admin-main .stats b { font-size: 22px; display: block; margin-top: 8px; font-variant-numeric: tabular-nums; }
.admin-main label { display: block; margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); }
.admin-main input,
.admin-main textarea,
.admin-main select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}
.admin-main input[type="checkbox"] { width: auto; margin: 0; }
.idr-field {
  display: flex;
  align-items: stretch;
  margin-top: 6px;
  border: 1px solid #dcecef;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.idr-field em {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: #0f766e;
  padding: 0 12px;
  background: #eefbf9;
  border-right: 1px solid #e6f1f0;
}
.admin-main .idr-field input {
  margin: 0;
  border: 0;
  border-radius: 0;
  flex: 1;
  min-width: 0;
  background: transparent;
}
.admin-main button,
.admin-main .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.admin-main button:hover,
.admin-main .btn:hover { background: var(--teal-dark); }
.admin-main button.ghost:hover,
.admin-main .ghost:hover { background: #f6f9fa; color: var(--ink); }
.admin-main button.icon-btn:hover,
.icon-btn:hover { background: #f6f9fa; }
.admin-main button.ghost,
.admin-main .ghost {
  background: transparent;
  color: #5f7b8c;
  border: 1px solid #dcecef;
}
.admin-main button.small,
.admin-main .ghost.small { width: auto; padding: 7px 12px; margin-top: 0; }
.admin-main button.danger,
.admin-main .ghost.danger {
  color: #b42318;
  border-color: #f2c9c6;
  background: #fff;
}
.admin-main button.danger:hover,
.admin-main .ghost.danger:hover { background: #fff4f3; }
.admin-main button.icon-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  margin-top: 0;
  box-sizing: border-box;
  border-radius: 10px;
  background: transparent;
  color: #5f7b8c;
  border: 1px solid #dcecef;
}
.icon-btn svg { width: 16px; height: 16px; display: block; }
.admin-main button.icon-btn.danger,
.icon-btn.danger { color: #b42318; border-color: #f2c9c6; background: transparent; }
.admin-main .copy {
  font-family: ui-monospace, monospace;
  background: #f5f9f9;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  word-break: break-all;
  font-size: 12px;
  margin: 6px 0 0;
  cursor: pointer;
}
.copy-stack { display: grid; gap: 12px; }
.copy-stack > div > span { color: #7a93a3; font-size: 12px; font-weight: 600; }
.copy-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 6px;
}
.copy-row .copy { flex: 1; margin: 0; min-width: 0; display: flex; align-items: center; }
.copy-row form { margin: 0; display: flex; }
.copy-row .icon-btn {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
}
.admin-main table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-main thead th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f7fafa;
}
.admin-main th, .admin-main td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.admin-main tbody tr:hover td { background: #fafcfc; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.admin-main .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.admin-main .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.admin-main .alert { background: #ffe8e8; color: #9b1c1c; padding: 10px 12px; border-radius: 12px; margin: 0 0 14px; }
.admin-main .notice { background: #e7f8ef; color: #0b6b45; padding: 10px 12px; border-radius: 12px; margin: 0 0 14px; }
.admin-main .badge { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #eef3f4; color: #4d6670; font-size: 11px; font-weight: 700; }
.admin-main .badge.waiting { background: var(--warn-bg); color: var(--warn); }
.admin-main .badge.expired { background: var(--bad-bg); color: var(--bad); }
.admin-main .badge.processed,
.admin-main .badge.success { background: var(--ok-bg); color: var(--ok); }
.admin-main .qr { max-width: 220px; display: block; margin: 8px auto; background: #fff; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.page-head h1 { margin: 0; }
.page-head .muted { margin: 0; }
.page-head form { margin: 0; flex: none; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.page-actions .ghost,
.page-actions button,
.page-actions .btn,
.page-actions .icon-btn {
  height: 36px;
  margin-top: 0;
  white-space: nowrap;
}
.page-actions .ghost,
.page-actions .btn,
.page-actions button:not(.icon-btn) {
  padding: 0 12px;
}
.dash-date-input {
  height: 36px;
  width: 148px;
  margin: 0;
  border: 1px solid #d7e6e4;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  cursor: pointer;
  color: #17364a;
}
.filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  align-self: end;
  height: 42px;
}
.filter-bar button,
.simulate-bar button { margin-top: 0; height: 42px; }
.filter-bar .ghost,
.filter-bar .icon-btn {
  height: 42px;
  width: 42px;
  min-width: 42px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.rolling-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 4px;
  background: #f7fafa;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rolling-row strong { display: block; font-size: 13px; }
.rolling-row p { margin: 2px 0 0; color: #8aa3b0; font-size: 12px; }
.rolling-row .switch { flex: none; cursor: pointer; }
.toggle-stack { display: grid; gap: 8px; margin: 12px 0; }
.toggle-stack .rolling-row { margin: 0; }
.maint-grid {
  grid-template-columns: 0.7fr 0.7fr 1.6fr;
  margin: 12px 0 14px;
}
.maint-now {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff7e8;
  color: #8a5a10;
  font-size: 13px;
}
.account-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.account-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.account-fields.two { grid-template-columns: 1fr 1fr; }
.account-fields.three { grid-template-columns: 1.2fr 1fr 1fr; }
.account-fields .span-all { grid-column: 1 / -1; }
.account-fields textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dcecef;
  min-height: 88px;
  resize: vertical;
}
.cookie-block.span-all { grid-column: 1 / -1; }
.cookie-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cookie-head span { color: #7a93a3; font-size: 12px; font-weight: 600; }
.admin-main .cookie-head input {
  margin: 0;
  width: min(200px, 46%);
  padding: 8px 10px;
}
.cookie-block textarea { margin-top: 6px; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  align-items: center;
}
.form-actions button { margin-top: 0; }
.help-box {
  margin-top: 12px;
  background: #f6fbfb;
  border: 1px solid #e6f1f0;
  border-radius: 14px;
  padding: 10px 14px;
  color: #5f7b8c;
  font-size: 13px;
  line-height: 1.5;
}
.help-box summary { cursor: pointer; font-weight: 700; color: #17364a; }
.help-box ol { margin: 10px 0 8px; padding-left: 18px; }
.help-box li { margin: 4px 0; }
.help-box p { margin: 0; }
.help-box a { color: #147f8a; font-weight: 600; }
.help-box kbd, .help-box code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  background: #fff;
  border: 1px solid #dcecef;
  border-radius: 6px;
  padding: 1px 6px;
}
.account-grid { display: grid; gap: 14px; max-width: 420px; }
.account-grid.wide { max-width: none; }
.switch-field { display: flex; flex-direction: column; gap: 8px; }
.switch {
  position: relative;
  width: 42px;
  height: 24px;
  display: inline-block;
}
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i {
  position: absolute; inset: 0;
  background: #d7e6e6;
  border-radius: 999px;
  transition: .2s;
}
.switch i::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: .2s;
}
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch-field small { color: #8aa3b0; font-size: 11px; }
.col-aktif { width: 72px; }
.col-aktif .switch { display: inline-block; vertical-align: middle; cursor: pointer; }
.provider-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.provider-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.provider-row.off { opacity: .55; background: #f7f9fa; }
.provider-logo {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 1px 4px rgba(18, 70, 80, .08);
}
.provider-row strong {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
  color: #2b4a56;
}
.provider-row .switch { flex: none; cursor: pointer; }
.add-qris-row {
  display: grid;
  grid-template-columns: 180px 150px 1fr auto;
  gap: 12px;
  align-items: end;
}
.add-qris-row .grow { min-width: 0; }
.add-qris-row button { margin-top: 0; height: 42px; }
.file-pick {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 6px;
  min-height: 42px;
  border: 1px dashed #c5e4e0;
  border-radius: 12px;
  background: #f6fbfb;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.file-pick:hover,
.file-pick.drag {
  border-color: #19c2b8;
  background: #eefbf9;
}
.file-pick.has-file {
  border-style: solid;
  border-color: #bfe8e4;
  background: #fff;
}
.file-pick input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
}
.file-pick-ui {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 12px;
  pointer-events: none;
}
.file-pick-ico {
  width: 18px;
  height: 18px;
  flex: none;
  color: #19c2b8;
}
.file-pick-preview {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #dcecef;
  background: #fff;
}
.file-pick.has-file .file-pick-ico { display: none; }
.file-pick-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.file-pick-copy strong {
  font-size: 13px;
  font-weight: 700;
  color: #2b4a56;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-pick-copy small {
  font-size: 11px;
  color: #8aa3b0;
}
.qris-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qris-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.qris-row.off { background: #f7fafa; }
.qris-row.off strong { color: #7a93a3; }
.qris-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}
.qris-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qris-stat {
  width: 100%;
  color: #8aa3b0;
  font-size: 12px;
  font-weight: 500;
}
.chip-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: #5f7b8c;
  background: #f4faf9;
  border: 1px solid #e6f1f0;
  border-radius: 999px;
  padding: 3px 8px;
}
.chip-id.off { color: #b42318; border-color: #f2c9c6; background: #fff4f3; }
.pair-row { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.pair-row select {
  width: min(240px, 46vw);
  height: 36px;
  margin: 0;
  padding: 0 8px;
  font-size: 12px;
}
.admin-main .pair-row select { width: min(240px, 46vw); margin-top: 0; }
.swal-field .swal2-select { margin: 6px 0 12px; width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.unmatched-banner {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 13px;
  border: 1px solid #f3e4c0;
}
.unmatched-banner a { color: #7a5b12; font-weight: 700; }
.qris-actions { display: flex; gap: 6px; flex: none; align-items: center; }
.qris-actions form { margin: 0; display: flex; align-items: center; }
.qris-actions .switch { cursor: pointer; }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
.login-box {
  width: min(380px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 26px 24px;
  box-shadow: var(--shadow);
}
.login-box .admin-logo { margin-bottom: 6px; }
.login-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.login-box label { display: block; margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.login-box input {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
}
.login-box button {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.login-box button:hover { background: var(--teal-dark); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.chip {
  text-decoration: none;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
.chip:hover { border-color: #c9dbde; color: var(--ink); }
.chip.on { background: var(--teal-soft); color: var(--teal-dark); border-color: #cfece9; }
.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(130px, .9fr) minmax(120px, .8fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
}
.filter-bar.has-dates {
  grid-template-columns: minmax(160px, 1.2fr) minmax(140px, 1fr) minmax(120px, .85fr) minmax(120px, .75fr) minmax(230px, 1.3fr) auto;
}
.filter-date[hidden] { display: none !important; }
.filter-date input[readonly] { background: #fff; cursor: pointer; }
.litepicker {
  font-family: Inter, "Segoe UI", sans-serif;
  border-radius: 16px;
  border: 1px solid #e6f1f0;
  box-shadow: 0 16px 40px rgba(18, 70, 80, .12);
}
.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date,
.litepicker .container__days .day-item.is-selected {
  background-color: var(--teal) !important;
  color: #fff !important;
}
.litepicker .container__days .day-item.is-in-range {
  background-color: #e7f8f6 !important;
  color: #17364a !important;
}
.log-filter { grid-template-columns: minmax(180px, 1.6fr) auto; }
.simulate-bar { grid-template-columns: 1fr auto; }
.row-actions {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.row-actions form { display: inline-flex; margin: 0; }
a.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.admin-main a.icon-btn { margin-top: 0; }
button.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: #147f8a;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  word-break: break-all;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 4px 0;
  font-size: 13px;
  color: #7a93a3;
}
.pager a { color: #147f8a; font-weight: 600; text-decoration: none; }
.table-foot { padding: 8px 4px 0; }

@media (max-width: 1200px) {
  .filter-bar,
  .filter-bar.has-dates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
  .log-filter { grid-template-columns: minmax(180px, 1.6fr) auto; }
  .log-filter .filter-actions { grid-column: auto; }
}
@media (max-width: 1100px) {
  .kpi-grid.has-fee { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .maint-grid { grid-template-columns: 1fr 1fr; }
  .maint-grid .span-2 { grid-column: 1 / -1; }
  .account-split,
  .account-fields.two,
  .account-fields.three { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .admin-top {
    grid-template-columns: 1fr auto;
    width: 100%;
  }
  .admin-logo { grid-column: 1; grid-row: 1; }
  .admin-user { grid-column: 2; grid-row: 1; }
  .admin-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    padding-bottom: 2px;
  }
  .panel-grid,
  .admin-main .grid2,
  .admin-main .stats,
  .admin-main .row,
  .filter-bar,
  .simulate-bar,
  .add-qris-row { grid-template-columns: 1fr; }
  .filter-actions { width: 100%; }
  .filter-actions button, .simulate-bar button, .add-qris-row button {
    flex: 1;
    width: 100%;
    height: 42px;
  }
  .filter-actions .icon-btn {
    flex: none;
    width: 42px;
    height: 42px;
  }
  .page-head { flex-direction: column; }
  .legend { justify-content: flex-end; }
  .qris-row { flex-wrap: wrap; align-items: center; }
  .qris-actions { width: auto; margin-left: auto; }
  .qris-actions form { flex: none; }
  .qris-actions button { width: auto; }
}
@media (max-width: 640px) {
  .admin-shell { padding: 8px 12px 28px; }
  .admin-main { padding-top: 12px; }
  .admin-main h1 { font-size: 20px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .maint-grid { grid-template-columns: 1fr; }
  .kpi-card > b { font-size: 20px; }
  .panel { min-height: 0; }
  .table-cards thead { display: none; }
  .table-cards tbody { display: grid; gap: 10px; }
  .table-cards tr {
    display: grid;
    gap: 6px;
    border: 1px solid #e6f1f0;
    border-radius: 14px;
    padding: 12px;
    background: #fbfdfe;
  }
  .table-cards td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border: 0;
    padding: 0;
  }
  .table-cards td::before {
    content: attr(data-label);
    color: #8aa3b0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex: none;
    max-width: 38%;
  }
  .table-cards td.row-actions,
  .table-cards td[data-label=""] {
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-top: 6px;
  }
  .table-cards td.row-actions::before,
  .table-cards td[data-label=""]::before { display: none; }
  .row-actions { white-space: normal; }
}
