/* =========================================================
   NEXPAY — Neubrutalism
   Border tebal, bayangan keras tanpa blur, warna datar.
   Dimuat paling akhir supaya menimpa gaya dasar.
   ========================================================= */

:root { --pop: #ffd23f; } /* cadangan jika style.css lama masih ter-cache */
body { background: var(--bg); }
::selection { background: var(--pop); color: #111; }

/* ---------- Kartu & panel ---------- */
.card, .glass, .modal, .ui-modal, .toast, .dropdown-menu, .table-wrap, .preview, .auth-card.card {
  border: 2px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--card);
}
.card:hover { border-color: var(--border); }
.card-secondary { background: var(--card-2); }
.hover-lift:hover, .quick-action:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--sh);
  border-color: var(--border);
}
.card-head h3 { font-weight: 700; }

/* ---------- Navigasi ---------- */
.nav-public { background: var(--bg); backdrop-filter: none; border-bottom: 2px solid var(--border); }
.topbar { background: var(--bg); backdrop-filter: none; border-bottom: 2px solid var(--border); }
.sidebar { border-right: 2px solid var(--border); background: var(--sidebar); }
body.admin .sidebar { background: var(--sidebar); border-right-color: var(--border); }
.nav-menu a { font-weight: 600; color: var(--text); padding: 4px 8px; border-radius: 6px; }
.nav-menu a:hover { background: var(--pop); color: #111; }
.nav-title { font-weight: 700; color: var(--muted); }
.nav-link { border: 2px solid transparent; color: var(--text); font-weight: 500; }
.nav-link:hover { background: var(--card-2); border-color: var(--border); transform: none; }
.nav-link.active, body.admin .nav-link.active {
  background: var(--pop); color: #111; font-weight: 700;
  border-color: var(--border); box-shadow: var(--shadow-sm);
}
.sidebar.collapsed .nav-link { justify-content: center; }
.brand-mark, .sidebar-brand img {
  background: var(--pop); color: #111;
  border: 2px solid var(--border); box-shadow: var(--shadow-sm); border-radius: 8px;
}
.brand { letter-spacing: -0.02em; }
.admin-badge { background: var(--pop); color: #111; border: 2px solid var(--border); border-radius: 6px; }
.menu-toggle, .nav-toggle { border: 2px solid var(--border); background: var(--card); box-shadow: var(--shadow-sm); border-radius: 8px; }
.menu-toggle:active, .nav-toggle:active { transform: translate(2px, 2px); box-shadow: none; }

/* ---------- Tombol ---------- */
.btn {
  background: var(--card); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm); font-weight: 700;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--sh); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--sh); }
.btn-primary { background: var(--primary); color: #fff; border: 2px solid var(--border); }
.btn-primary:hover { background: var(--primary); }
.btn-outline { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-danger { background: #ff6b6b; color: #111; border: 2px solid var(--border); }
.btn-success { background: #4ade80; color: #111; border: 2px solid var(--border); }
.btn.is-success { background: #4ade80; color: #111; }
.btn.is-error { background: #ff6b6b; color: #111; }
.btn:disabled, .btn.is-loading { box-shadow: none; }
[data-accent="amber"] .btn-primary, [data-accent="emerald"] .btn-primary { color: #111; }

/* ---------- Teks sorot ---------- */
.gradient-text {
  color: #111; background: var(--pop);
  padding: 0 0.22em; border-radius: 6px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
h3 .gradient-text, .section-head .gradient-text { background: none; padding: 0; color: var(--primary); }
.auth-aside .gradient-text { background: #fff; }
.muted, .page-head p { color: var(--muted); }
a { color: var(--primary); font-weight: 600; }

/* ---------- Badge & chip ---------- */
.badge {
  background: var(--card); color: var(--text); border: 2px solid var(--border);
  font-weight: 700; padding: 2px 10px;
}
.badge-success { background: #86efac; color: #111; }
.badge-warning { background: #fde047; color: #111; }
.badge-danger { background: #fca5a5; color: #111; }
.badge-info { background: #a5b4fc; color: #111; }
.chip { background: var(--card); border: 2px solid var(--border); font-weight: 600; }
.chip.active { background: var(--pop); color: #111; border-color: var(--border); box-shadow: var(--shadow-sm); }
.tabs { background: var(--card); border: 2px solid var(--border); padding: 4px; box-shadow: var(--shadow-sm); }
.tab { color: var(--text); font-weight: 600; border: 2px solid transparent; }
.tab.active { background: var(--pop); color: #111; border-color: var(--border); box-shadow: none; }

/* ---------- Form ---------- */
.input, .select, .textarea {
  background: var(--card); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--border); outline: 0;
  box-shadow: 3px 3px 0 var(--primary);
}
.input.invalid { border-color: var(--danger); box-shadow: 3px 3px 0 var(--danger); }
.input.valid { border-color: var(--border); box-shadow: 3px 3px 0 #4ade80; }
.label { color: var(--text); font-weight: 600; }
.input::placeholder { color: var(--muted); opacity: 0.6; }
.switch span { border: 2px solid var(--border); background: var(--card-2); }
.switch span::after { background: var(--border); top: 1px; left: 1px; }
.switch input:checked + span { background: #4ade80; }
.switch input:checked + span::after { background: var(--border); }
.platform-option { background: var(--card); border: 2px solid var(--border); font-weight: 600; box-shadow: var(--shadow-sm); }
.platform-option.active { background: var(--pop); color: #111; }
.check input { accent-color: var(--primary); }
.tg-guide { background: var(--card-2); border: 2px solid var(--border); color: var(--text); }
.field-ok { color: var(--success); font-weight: 600; }

/* ---------- Tabel ---------- */
.table th { background: var(--pop); color: #111; font-weight: 700; border-bottom: 2px solid var(--border); }
.table td { border-top: 1px solid var(--line); }
.table tbody tr:hover { background: var(--card-2); }
.table-foot { border-top: 2px solid var(--border); color: var(--text); }
.page-btn { background: var(--card); border: 2px solid var(--border); font-weight: 700; box-shadow: var(--shadow-sm); }
.page-btn.active { background: var(--pop); color: #111; border: 2px solid var(--border); }

/* ---------- Dashboard ---------- */
.stat-icon, .feature-icon, .ui-modal-icon {
  background: var(--pop); color: #111;
  border: 2px solid var(--border); box-shadow: var(--shadow-sm); border-radius: 8px;
}
.stat-icon.green { background: #86efac; color: #111; }
.stat-icon.amber { background: #fdba74; color: #111; }
.stat-icon.blue { background: #93c5fd; color: #111; }
.ui-modal-icon { border-radius: 50%; }
.ui-modal-icon.warning { background: #fde047; color: #111; }
.ui-modal-icon.error { background: #fca5a5; color: #111; }
.ui-modal-icon.success { background: #86efac; color: #111; }
.stat-value { font-weight: 700; }
.quick-action { background: var(--card); border: 2px solid var(--border); box-shadow: var(--shadow-sm); font-weight: 700; color: var(--text); }
.quick-action i { color: var(--text); }
.merchant-card { background: var(--card-2); border: 2px solid var(--border); }
.merchant-logo { border: 2px solid var(--border); border-radius: 8px; }
.avatar { background: var(--pop); color: #111; border: 2px solid var(--border); }
.timeline::before { background: var(--border); }
.timeline-item::before { background: var(--pop); border: 2px solid var(--border); width: 12px; height: 12px; }
.skeleton { background: var(--card-2); border: 2px solid var(--line); }

/* ---------- Admin ---------- */
.key-box { background: var(--card-2); border: 2px dashed var(--border); }
.notice { background: var(--pop); color: #111; border: 2px solid var(--border); box-shadow: var(--shadow-sm); font-weight: 500; }
.ip-row { background: var(--card-2); border: 2px solid var(--border); }
.service-row { border-bottom: 1px solid var(--line); }

/* ---------- Landing ---------- */
.hero h1 { font-weight: 700; letter-spacing: -0.03em; }
.hero .badge { background: #fff; color: #111; box-shadow: var(--shadow-sm); }
.preview { background: var(--card); padding: 12px; box-shadow: 4px 4px 0 var(--sh); }
.preview-bar i { background: var(--border); }
.preview-bar i:nth-child(1) { background: #ff6b6b; border: 2px solid var(--border); }
.preview-bar i:nth-child(2) { background: var(--pop); border: 2px solid var(--border); }
.preview-bar i:nth-child(3) { background: #4ade80; border: 2px solid var(--border); }
.preview-bar i { width: 12px; height: 12px; }
.preview-stats div { background: var(--card-2); border: 2px solid var(--border); border-radius: 8px; }
.preview-stats div:nth-child(1) { background: var(--pop); color: #111; }
.preview-stats div:nth-child(2) { background: #86efac; color: #111; }
.preview-stats div:nth-child(3) { background: #fdba74; color: #111; }
.preview-stats div:nth-child(4) { background: #a5b4fc; color: #111; }
.preview-stats small { color: #111; opacity: 0.75; font-weight: 600; }
.preview-chart { background: var(--card-2); border: 2px solid var(--border); border-radius: 8px; }
.preview-chart span { background: var(--primary); border: 2px solid var(--border); border-bottom: 0; opacity: 1; border-radius: 4px 4px 0 0; }
.pay-logos .card { background: var(--card); }
.step::before { background: var(--pop); color: #111; border: 2px solid var(--border); box-shadow: var(--shadow-sm); }
.faq-item {
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--card); box-shadow: var(--shadow-sm);
  padding: 12px 16px; margin-bottom: 12px;
}
.faq-item[open] { background: var(--card-2); }
.faq-item summary { font-weight: 700; }
.footer { background: var(--card); border-top: 2px solid var(--border); color: var(--text); }
.footer a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer a:hover { color: var(--primary); }
#security .card { background: var(--pop); color: #111; }
#security .card .muted { color: #222; }
#security .card h3 i { color: #111; }
#security .section-head h2, #security .section-head p { color: #111; }

/* ---------- Auth ---------- */
.auth-aside { background: var(--pop); border-right: 2px solid var(--border); color: #111; }
.auth-aside p, .auth-points li, .auth-points i { color: #111; }
.auth-points li { font-weight: 600; }
.auth-card .sub { color: var(--muted); }
.strength { background: var(--card-2); border: 2px solid var(--border); height: 8px; }

/* ---------- Pembayaran / QRIS ---------- */
.qr-frame { background: #fff; border: 3px solid var(--border); box-shadow: var(--shadow); border-radius: 10px; }
.countdown { color: var(--text); }
.detail-row { border-bottom: 1px dashed var(--border); }
.detail-row span:first-child { color: var(--muted); font-weight: 500; }

/* ---------- Kode ---------- */
.code-block { background: #111111; color: #f5f5f5; border: 2px solid var(--border); box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); }
[data-theme="dark"] .code-block { background: #0b0912; }
.code-wrap .copy-btn, .code-block .copy-btn { background: var(--pop); color: #111; }

/* ---------- Modal, toast, dropdown ---------- */
.modal-backdrop, .ui-backdrop { background: rgba(17, 17, 17, 0.55); backdrop-filter: none; }
.modal, .ui-modal { border-width: 3px; box-shadow: 4px 4px 0 var(--sh); }
.toast { border-left: 6px solid var(--primary); }
.toast-success { border-left-color: #4ade80; }
.toast-error { border-left-color: #ff6b6b; }
.toast-warning { border-left-color: var(--pop); }
.dropdown-item:hover { background: var(--pop); color: #111; }
.divider { background: var(--border); height: 2px; }
.page-loader { background: var(--bg); }
.loader-ring { border: 4px solid var(--border); border-top-color: var(--pop); }
[data-tooltip]:hover::after { background: #111; border: 2px solid var(--border); }
.legal a { text-decoration: underline; }

/* ---------- Docs ---------- */
.docs-nav { padding: 10px; }
.docs-nav .nav-link { font-size: 0.82rem; padding: 7px 10px; }
#doc > section { margin-bottom: 36px; }
#doc > section > h2 {
  display: inline-block; background: var(--pop); color: #111;
  border: 2px solid var(--border); box-shadow: var(--shadow-sm);
  border-radius: 6px; padding: 3px 12px; margin-bottom: 16px;
}
.endpoint { gap: 8px; flex-wrap: wrap; }
.endpoint code {
  background: #111; color: #fff; padding: 4px 10px; border-radius: 6px;
  font-size: 0.82rem; word-break: break-all;
}
[data-theme="dark"] .endpoint code { background: #0b0912; border: 2px solid var(--border); }
.method { background: #4ade80; color: #111; border: 2px solid var(--border); border-radius: 6px; font-weight: 700; }
.ep-label {
  display: inline-block; margin: 14px 0 6px; padding: 1px 8px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--card-2); border: 2px solid var(--border); border-radius: 4px; color: var(--text);
}
.ep-more { margin-top: 14px; }
.ep-more > summary {
  cursor: pointer; font-weight: 700; font-size: 0.85rem;
  padding: 8px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card-2); list-style: none;
}
.ep-more > summary::-webkit-details-marker { display: none; }
.ep-more > summary::before { content: "+ "; }
.ep-more[open] > summary::before { content: "\2212  "; }
.ep-more[open] > summary { background: var(--pop); color: #111; margin-bottom: 8px; }
.doc-hero { background: var(--pop); color: #111; }
.doc-hero h1 { font-size: 1.5rem; margin-bottom: 6px; }
.doc-hero p { color: #222; font-size: 0.9rem; }
.doc-hero code { background: #111; color: #fff; padding: 2px 8px; border-radius: 4px; }

@media (max-width: 992px) {
  .docs-nav { display: flex; gap: 8px; overflow-x: auto; padding: 8px; -webkit-overflow-scrolling: touch; }
  .docs-nav .nav-link { flex: 0 0 auto; white-space: nowrap; border-color: var(--border); background: var(--card); }
}
@media (max-width: 576px) {
  .card, .glass, .modal, .ui-modal, .toast, .table-wrap, .preview { box-shadow: 3px 3px 0 var(--sh); }
  .preview { box-shadow: 4px 4px 0 var(--sh); }
  .faq-item { padding: 10px 12px; }
  #doc > section > h2 { font-size: 1.15rem; }
}

/* ---------- Kompak: kontrol & jarak lebih kecil ---------- */
.btn { min-height: 34px; padding: 0 12px; font-size: 0.82rem; gap: 6px; }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 0.76rem; }
.btn-icon { width: 34px; min-height: 34px; padding: 0; }
.input, .select, .textarea { min-height: 36px; padding: 6px 10px; font-size: 0.85rem; }
.textarea { min-height: 76px; }
.card { padding: 14px; }
.card-head { margin-bottom: 10px; }
.form-group { margin-bottom: 11px; }
.label { font-size: 0.76rem; margin-bottom: 4px; }
.nav-link { padding: 7px 10px; font-size: 0.82rem; }
.sidebar { padding: 12px 10px; }
.topbar { padding: 0 14px; }
.content { padding: 16px; }
.page-head { margin-bottom: 14px; }
.page-head h2 { font-size: 1.25rem; }
.stat-card { padding: 12px; }
.stat-icon { width: 34px; height: 34px; font-size: 0.9rem; }
.stat-value { font-size: 1.05rem; }
.table th { padding: 8px 10px; }
.table td { padding: 8px 10px; }
.badge { font-size: 0.7rem; padding: 1px 8px; }
.hero { padding: 48px 0 36px; }
.section { padding: 36px 0; }
.avatar { width: 30px; height: 30px; font-size: 0.8rem; }
.nav-public .container { height: 52px; }
.brand-mark { width: 26px; height: 26px; font-size: 0.8rem; }
.ui-modal, .modal { padding: 16px; }
.chip { padding: 4px 11px; font-size: 0.78rem; }
.tab { padding: 6px 11px; font-size: 0.78rem; }

/* ---------- Halaman maintenance ---------- */
.maint { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px 14px; }
.maint-card { width: min(420px, 100%); text-align: center; display: grid; gap: 10px; justify-items: center; padding: 22px 18px; }
.maint-ico {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.4rem; color: #111;
  background: var(--pop); border: 2px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm);
}
.maint-card h1 { font-size: 1.35rem; }
.maint-card p { font-size: 0.88rem; max-width: 34ch; white-space: pre-line; }
.maint-actions { margin: 4px 0; }

@media (max-width: 576px) {
  .card { padding: 11px; }
  .card-head { margin-bottom: 8px; }
  .card-head h3 { font-size: 0.92rem; }
  .merchant-card { padding: 8px; gap: 9px; }
  .merchant-logo, .merchant-card .feature-icon { width: 30px; height: 30px; font-size: 0.8rem; }
  .content { padding: 12px 10px 20px; }
}

/* ---------- Grafik transaksi: garis, bisa digeser ---------- */
.chart-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
.chart-inner { position: relative; height: 150px; min-width: 100%; }
.dash-pair .chart-box { height: 140px; }
@media (max-width: 576px) {
  .chart-inner { height: 120px; }
  .dash-pair { grid-template-columns: 1fr 1fr; gap: 8px; }
  .dash-pair .card { padding: 9px; }
  .dash-pair .card-head h3 { font-size: 0.8rem; }
  .dash-pair .chart-box { height: 120px; }
}

/* Anak grid tidak boleh melebar mengikuti isi (grafik yang bisa digeser) */
.dash-grid > *, .grid > *, .stat-grid > * { min-width: 0; }
.dash-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart-scroll { max-width: 100%; width: 100%; }

/* ---------- Grafik garis (linechart.js) ---------- */
.chart-meta { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin: 0 0 10px; }
.chart-meta div { display: grid; gap: 1px; }
.chart-meta small { font-size: 0.66rem; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.chart-meta b { font-size: 0.95rem; line-height: 1.2; }
.nx-line { display: flex; align-items: flex-start; gap: 2px; }
.nx-line-y { position: relative; flex: none; width: 32px; font-size: 0.62rem; font-weight: 600; color: var(--muted); }
.nx-line-y span { position: absolute; right: 2px; transform: translateY(-50%); white-space: nowrap; }
.nx-line .chart-scroll { flex: 1; min-width: 0; width: auto; }
.chart-inner canvas { display: block; }
.nx-tip {
  position: absolute; z-index: 3; pointer-events: none; display: grid; gap: 1px; white-space: nowrap;
  padding: 4px 9px; border: 2px solid var(--border); border-radius: 6px; background: var(--card); color: var(--text);
  box-shadow: var(--shadow-sm); font-size: 0.78rem;
}
.nx-tip small { color: var(--muted); font-size: 0.64rem; font-weight: 600; }
@media (max-width: 576px) { .chart-meta { gap: 14px; } .chart-meta b { font-size: 0.85rem; } }

/* ---------- Keseimbangan & simetri layout ---------- */
/* Jumlah kartu berapa pun (3 atau 4) selalu mengisi satu baris penuh dan sama lebar */
.quick-actions { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.quick-action { justify-content: center; min-height: 64px; }
.stat-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.stat-card { min-height: 78px; }
/* Overview admin: 9 kartu = 3 x 3 (bukan 5 + 4) */
.admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 576px) { .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .admin-stats .stat-card { flex-direction: column; align-items: flex-start; } }

/* Dua kartu berdampingan selalu sama tinggi; isi mengisi ruang yang ada */
.dash-grid > .card, .grid-2 > .card, .grid-3 > .card { display: flex; flex-direction: column; }
.dash-grid > .card > .card-head, .grid-2 > .card > .card-head { flex: none; }
#merchants { flex: 1; display: flex; flex-direction: column; gap: 12px; }
#merchants .merchant-card { flex: 1; margin: 0; }
.card-actions { margin-top: auto; padding-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.grid-2 > .card > .chart-box, .dash-pair > .card > .chart-box { flex: 1; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; }

/* Create QRIS: kartu hasil di tengah, kartu form sama tinggi */
.qris-box { justify-content: center; min-height: 280px; }
.qris-box .empty-state { display: grid; justify-items: center; gap: 6px; }

/* Toolbar tabel: pencarian lebar, filter sedang, tombol tidak melar */
.table-toolbar { align-items: stretch; }
.table-toolbar .input { flex: 2 1 240px; }
.table-toolbar .select { flex: 1 1 150px; }
.table-toolbar .btn { flex: 0 0 auto; }
.table th.num, .table td.num { text-align: right; }
.table-actions { flex-wrap: wrap; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.page-head.flex-between { align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.pagination { display: flex; gap: 8px; }
.fee-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.json-view { max-height: 460px; overflow: auto; margin: 0; font-size: 0.76rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.danger-zone { border-style: dashed; }

/* ---------- How It Works: kartu langkah sama besar & rata tengah ---------- */
.steps .step { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 14px 18px; background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.steps .step::before { margin-bottom: 12px; flex: none; }
.steps .step h3 { font-size: 1rem; }
.steps .step p { margin-top: 6px; font-size: 0.85rem; }
@media (max-width: 992px) { .steps.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 576px) { .steps.grid-4 { gap: 10px; } .steps .step { padding: 16px 10px 14px; } .steps .step p { font-size: 0.78rem; } }

/* ---------- Docs v2: base URL, tab kode, tabel parameter ---------- */
.docs-main { min-width: 0; }
.docs-nav-title { margin: 10px 8px 4px; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.docs-nav-title:first-child { margin-top: 2px; }
.doc-hero { padding: 18px 20px; }
.hero-base { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.hero-base-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; }
.hero-base code { flex: 1 1 220px; min-width: 0; padding: 7px 12px; word-break: break-all; font-size: 0.85rem; border: 2px solid #111; border-radius: 6px; }
.hero-base .copy-btn { background: #fff; color: #111; border: 2px solid #111; }
.base-card { padding: 12px 14px; }
.info-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.info-row:last-child { border-bottom: 0; }
.info-k { flex: 0 0 120px; font-size: 0.78rem; font-weight: 600; opacity: 0.75; }
.info-v { flex: 1 1 200px; min-width: 0; word-break: break-all; font-size: 0.82rem; font-family: ui-monospace, Consolas, monospace; }
.info-row .copy-btn { position: static; }
.ep-card h3 { font-size: 1.05rem; }
.endpoint .copy-btn { margin-left: auto; position: static; }
.ep-base { opacity: 0.55; }
.ep-none { font-size: 0.82rem; margin: 0; }
.ep-notes { margin: 10px 0 0; padding-left: 18px; font-size: 0.82rem; opacity: 0.85; }
.ep-notes li { margin-bottom: 3px; }
.param-table td, .param-table th { vertical-align: top; font-size: 0.8rem; }
.nowrap { white-space: nowrap; }
.req-badge { display: inline-block; padding: 0 7px; border: 2px solid var(--border); border-radius: 4px; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; }
.req-badge.req { background: #fca5a5; color: #111; }
.req-badge.opt { background: var(--card-2); }
.lang-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.lang-tab { cursor: pointer; font: inherit; font-size: 0.76rem; font-weight: 700; padding: 4px 11px; color: var(--text); background: var(--card-2); border: 2px solid var(--border); border-radius: 6px; }
.lang-tab.active { background: var(--pop); color: #111; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 0.84rem; margin-top: 12px; }
.callout.warn { background: #fde68a; color: #111; }
.callout.info { background: #bae6fd; color: #111; }
.callout i { margin-top: 3px; }
.steps { margin: 0 0 16px; padding-left: 20px; font-size: 0.88rem; }
.steps li { margin-bottom: 4px; }
.doc-hero .copy-btn { position: static; }
.docs-nav .nav-link.active { font-weight: 700; }
@media (max-width: 992px) { .docs-nav-title { display: none; } }
@media (max-width: 576px) { .info-k { flex-basis: 100%; } .endpoint .copy-btn { margin-left: 0; } }

/* ---------- Status QRIS: sukses / kedaluwarsa / dibatalkan ---------- */
.qr-frame { position: relative; overflow: hidden; }
.qr-frame.is-success { background: #dcfce7; border-color: #16a34a; transition: background 0.3s; }
.qr-success { width: 190px; height: 190px; display: grid; place-content: center; justify-items: center; gap: 6px; color: #14532d; text-align: center; animation: qrPop 0.35s ease; }
.qr-success svg { width: 88px; height: 88px; }
.qr-success .c { stroke-dasharray: 152; stroke-dashoffset: 152; animation: qrDraw 0.55s ease forwards; }
.qr-success .k { stroke-dasharray: 40; stroke-dashoffset: 40; animation: qrDraw 0.35s 0.45s ease forwards; }
.qr-success strong { font-size: 1rem; }
.qr-success small { font-size: 0.85rem; font-weight: 600; }
.qr-frame.is-dead img, .qr-frame.is-dead canvas, .qr-frame.is-dead .qr-none { filter: grayscale(1) blur(2px); opacity: 0.3; }
.qr-overlay { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 1rem; color: #111; background: rgba(255, 255, 255, 0.55); text-transform: uppercase; letter-spacing: 0.04em; }
.qr-none { width: 190px; height: 190px; display: grid; place-content: center; justify-items: center; gap: 8px; color: #555; font-size: 0.78rem; text-align: center; padding: 8px; }
.qr-none i { font-size: 2rem; }
@keyframes qrDraw { to { stroke-dashoffset: 0; } }
@keyframes qrPop { from { transform: scale(0.85); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qr-success, .qr-success .c, .qr-success .k { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 576px) { .qr-success, .qr-none { width: 170px; height: 170px; } }
.invoice-wrap { max-width: 460px; margin: 0 auto; }
.inv-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
a.cell-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Lonceng notifikasi (topbar) ---------- */
.notif { position: relative; }
#bell { position: relative; }
.notif-badge {
  position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; font-size: 0.64rem; font-weight: 700; line-height: 1;
  color: #fff; background: #ef4444; border: 2px solid var(--border); border-radius: 9px;
}
.notif-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 150; width: min(350px, calc(100vw - 24px));
  display: flex; flex-direction: column; max-height: min(70vh, 460px);
  background: var(--card); color: var(--text); border: 2px solid var(--border); border-radius: 12px; box-shadow: 4px 4px 0 var(--sh);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.notif.open .notif-menu { opacity: 1; visibility: visible; transform: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 2px solid var(--border); }
.notif-head strong { font-size: 0.92rem; }
.notif-pending {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 0.82rem; font-weight: 600;
  color: #111; background: #fde047; border-bottom: 2px solid var(--border); text-decoration: none;
}
.notif-pending:hover { filter: brightness(0.96); text-decoration: none; }
.notif-push {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 12px; margin: 0; font: inherit; font-size: 0.8rem; font-weight: 600;
  text-align: left; color: var(--text); background: var(--card-2); border: 0; border-bottom: 2px solid var(--border); cursor: pointer;
}
.notif-push i { flex: 0 0 auto; color: var(--primary); }
.notif-push.on i { color: #16a34a; }
.notif-push:hover:not(:disabled) { filter: brightness(0.97); }
.notif-push.static, .notif-push:disabled { cursor: default; font-weight: 500; color: var(--muted); }
.notif-list { overflow-y: auto; overscroll-behavior: contain; }
.notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; color: inherit; text-decoration: none; border-bottom: 1px dashed var(--border); }
.notif-item:last-child { border-bottom: 0; }
a.notif-item:hover { background: var(--card-2); text-decoration: none; }
.notif-item.fresh { background: rgba(var(--primary-rgb), 0.1); box-shadow: inset 3px 0 0 var(--primary); }
.notif-ico { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; font-size: 0.85rem; color: #111; border: 2px solid var(--border); border-radius: 50%; }
.notif-ico.info { background: #a5b4fc; }
.notif-ico.success { background: #86efac; }
.notif-ico.warning { background: #fde047; }
.notif-ico.danger { background: #fca5a5; }
.notif-body { min-width: 0; display: grid; gap: 2px; }
.notif-title { font-size: 0.86rem; overflow-wrap: anywhere; }
.notif-msg { margin: 0; font-size: 0.8rem; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.notif-time { font-size: 0.7rem; opacity: 0.65; }
.notif-empty { display: grid; justify-items: center; gap: 8px; padding: 28px 12px; font-size: 0.85rem; color: var(--muted); }
.notif-empty i { font-size: 1.6rem; }
@media (max-width: 576px) {
  .notif-menu { position: fixed; top: calc(var(--topbar-h) + 6px); left: 12px; right: 12px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .notif-menu { transition: none; } }

/* ---------- Halaman Notifikasi (notification.html) ---------- */
.notif-page .card-head { margin-bottom: 0; padding-bottom: 12px; }
.notif-page .notif-pending, .notif-page .notif-push { border-top: 2px solid var(--border); }
button.notif-click { width: 100%; margin: 0; font: inherit; text-align: left; color: inherit; background: none; border: 0; border-bottom: 1px dashed var(--border); cursor: pointer; align-items: center; padding: 13px 4px; }
button.notif-click:hover { background: var(--card-2); }
.notif-click .notif-body { flex: 1 1 auto; }
.notif-go { flex: 0 0 auto; opacity: 0.45; font-size: 0.8rem; }
.notif-msg.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-ico.big { width: 44px; height: 44px; font-size: 1.1rem; }
.notif-detail-head { display: flex; gap: 14px; align-items: center; margin: 4px 0 16px; }
.notif-detail-title { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.notif-detail-msg { margin: 0 0 18px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- Admin: daftar notifikasi terkirim (ringkas) ---------- */
.nadm-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.nadm-item:last-child { border-bottom: 0; }
.nadm-link { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.nadm-link:hover .nadm-title { text-decoration: underline; text-underline-offset: 2px; }
.nadm-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nadm-main .badge { flex: 0 0 auto; }
.nadm-title { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nadm-meta { font-size: 0.74rem; color: var(--muted); }
