/* Digipay · Gaya G (satu tema) */
:root {
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --ink: #101828;
  --muted: #475467;
  --muted-2: #667085;
  --border: #EAECF0;
  --primary: #1D4ED8;
  --primary-tint: #EFF4FF;
  --primary-tint-2: #E0EAFF;
  --highlight: #FEC84B;
  --success-bg: #DCFAE6;
  --success-fg: #067647;
  --success: #17B26A;
  --warn-bg: #FEF0C7;
  --warn-fg: #93370D;
  --warn: #F79009;
  --danger-bg: #FEE4E2;
  --danger-fg: #B42318;
  --danger: #F04438;
  --neutral-bg: #F2F4F7;
  --neutral-fg: #475467;
  --violet-bg: #F4EBFF;
  --violet-fg: #6941C6;
  --ground: var(--bg);
  --on-primary: #FFFFFF;
  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --r-card: 24px;
  --tint: var(--primary-tint);
  --accent: var(--highlight);
  --accent-ink: var(--ink);
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius-xl: 26px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 10px 30px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3, h4, b, strong { font-weight: 800; }
a { color: inherit; }
a:hover { opacity: .88; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
svg { flex: none; }
:focus-visible { outline: 3px solid #93B4FF; outline-offset: 2px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.grow { flex: 1; min-width: 0; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cluster { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.hide { display: none !important; }

/* ---------- kerangka ---------- */
.shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  width: 240px; flex: 0 0 240px; position: sticky; top: 0; height: 100vh;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 20px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 13px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
  font-size: 19px; font-weight: 800; text-transform: lowercase;
}
.sidebar-brand .name { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.sidebar-brand .name b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand .name span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mode-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--bg); border-radius: 12px; padding: 4px;
}
.mode-toggle button {
  min-height: 36px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.mode-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--primary); font-weight: 800; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px;
  border-radius: 14px; font-size: 14.5px; font-weight: 600; color: var(--muted);
  text-decoration: none;
}
.side-nav a[aria-current="page"] { background: var(--primary-tint); color: var(--primary); font-weight: 800; }
.nav-badge {
  margin-left: auto; font-size: 12px; font-weight: 800;
  background: var(--warn-bg); color: var(--warn-fg); border-radius: 999px; padding: 2px 8px;
}
.sidebar-user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  background: var(--bg); border-radius: 16px; padding: 12px; border: 0; text-align: left;
  width: 100%;
}
.avatar {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; flex: none; background: var(--primary-tint-2); color: var(--primary);
  width: 40px; height: 40px; font-size: 14px;
}
.avatar.dark { background: var(--ink); color: #fff; }
.avatar.green { background: var(--success-bg); color: var(--success-fg); }
.avatar.violet { background: var(--violet-bg); color: var(--violet-fg); }
.avatar.warn { background: var(--warn-bg); color: var(--warn-fg); }
.sidebar-user .meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.sidebar-user .meta b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .meta span { font-size: 12px; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 18px; }
.page { display: flex; flex-direction: column; gap: 20px; max-width: 1280px; width: 100%; margin: 0 auto; }
.page.tight { gap: 18px; }

.mobile-nav { display: none; }
.mobile-header { display: none; }

.sandbox-strip {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 9px 16px; letter-spacing: .01em;
}

/* ---------- header halaman ---------- */
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.page-head .title-block { display: flex; flex-direction: column; gap: 2px; margin-right: auto; min-width: 0; }
.page-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.page-head .sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.page-head .eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; }
.page-head .eyebrow.mono { font-family: var(--mono); }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- kartu ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; }
.card.rows { padding: 8px 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card h2 { font-size: 17px; font-weight: 800; }
.card h3 { font-size: 16px; font-weight: 800; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-link { font-size: 13.5px; font-weight: 800; color: var(--primary); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

.blue-card {
  background: var(--primary); color: #fff; border-radius: var(--radius-xl);
  padding: 26px; display: flex; flex-direction: column; gap: 18px;
}
.blue-card .label { font-size: 14.5px; font-weight: 600; opacity: .9; }
.blue-card .value { font-size: 50px; font-weight: 800; letter-spacing: -.035em; line-height: 1; }
.blue-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.blue-pill {
  font-size: 12.5px; font-weight: 800; background: rgba(255,255,255,.16);
  border-radius: 999px; padding: 5px 12px; display: inline-flex; align-items: center; gap: 6px;
}
.blue-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #6CE9A6; }
.blue-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.blue-stat { background: rgba(255,255,255,.12); border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.blue-stat b { font-size: 20px; font-weight: 800; }
.blue-stat span { font-size: 12.5px; opacity: .9; font-weight: 600; }

.hero-bars { display: flex; align-items: flex-end; gap: 6px; height: 64px; }
.hero-bars i { width: 12px; border-radius: 6px; background: rgba(255,255,255,.3); display: block; }
.hero-bars i.now { background: var(--highlight); }
.hero-bars i.peak { background: rgba(255,255,255,.6); }

/* ---------- pil status ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800;
  white-space: nowrap; line-height: 1.2;
}
.pill.paid, .pill.delivered, .pill.ok { background: var(--success-bg); color: var(--success-fg); }
.pill.pending, .pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill.expired { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill.cancelled, .pill.failed, .pill.danger { background: var(--danger-bg); color: var(--danger-fg); }
.pill.refund { background: var(--violet-bg); color: var(--violet-fg); }
.pill.live { background: var(--primary-tint); color: var(--primary); }
.pill.sandbox { background: var(--ink); color: #fff; }
.pill.neutral { background: var(--neutral-bg); color: var(--ink); }
.pill.owner { background: var(--primary-tint-2); color: var(--primary); }
.pill.tint { background: var(--primary-tint); color: var(--primary); }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 16px; border: 0; border-radius: 14px;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 800;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { opacity: .92; }
.btn.secondary { background: var(--surface); color: var(--ink); }
.btn.soft { background: var(--bg); color: var(--ink); }
.btn.tint { background: var(--primary-tint); color: var(--primary); }
.btn.danger { background: var(--danger-bg); color: var(--danger-fg); }
.btn.sm { min-height: 40px; padding: 0 12px; border-radius: 12px; font-size: 13px; }
.btn.sm, .filter-pill, .select-pill, .seg button { position: relative; }
.btn.sm::after, .filter-pill::after, .select-pill::after, .seg button::after { content: ''; position: absolute; inset: -3px; }
.btn.lg { min-height: 56px; border-radius: 16px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; border-radius: 14px; background: var(--surface); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.link { color: var(--primary); font-weight: 800; text-decoration: none; }
.link-plain { color: var(--ink); text-decoration: none; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13.5px; font-weight: 700; }
.input, textarea.input, select.input {
  width: 100%; min-height: 52px; padding: 0 14px; border: 2px solid var(--bg);
  border-radius: 14px; background: var(--bg); color: var(--ink);
  font-size: 15px; font-weight: 600; outline: none;
}
textarea.input { padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--primary); }
.input::placeholder { color: #98A2B3; font-weight: 500; }
.input:disabled { color: var(--muted); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.45; }
.field .err { font-size: 12px; color: var(--danger-fg); font-weight: 700; }
.input.invalid { border-color: var(--danger); }
.checkrow { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 13.5px; font-weight: 600; }
.checkrow input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; font-size: 13px; font-weight: 700; margin-bottom: 6px; }

.search-box {
  flex: 1 1 280px; display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: 14px; padding: 0 14px; min-height: 48px;
}
.search-box input {
  border: 0; outline: 0; background: transparent; color: var(--ink);
  flex: 1; min-width: 0; min-height: 44px; font-size: 14px; font-weight: 600;
}
.search-box input::placeholder { color: #667085; font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  border: 0; border-radius: 999px; min-height: 40px; padding: 0 14px;
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.filter-pill[aria-pressed="true"] { background: var(--ink); color: #fff; }
.select-pill {
  border: 0; border-radius: 999px; min-height: 40px; padding: 0 14px;
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 700;
  appearance: none;
}
.seg {
  display: flex; gap: 2px; background: var(--surface); border-radius: 14px; padding: 4px;
}
.seg button {
  border: 0; border-radius: 10px; padding: 0 14px; min-height: 38px;
  background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
}
.seg button[aria-pressed="true"] { background: var(--primary-tint); color: var(--primary); font-weight: 800; }

/* ---------- baris / daftar ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.row-title { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 12px; color: var(--muted); font-weight: 600; }
.row-amount { font-size: 15px; font-weight: 800; min-width: 96px; text-align: right; }
.row-amount.green { color: var(--success-fg); }
.row-amount.muted { color: var(--muted); text-decoration: line-through; }
.status-icon {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.status-icon.paid { background: var(--success-bg); color: var(--success-fg); }
.status-icon.pending { background: var(--warn-bg); color: var(--warn-fg); }
.status-icon.expired, .status-icon.cancelled { background: var(--neutral-bg); color: var(--muted); }
.status-icon.refund { background: var(--violet-bg); color: var(--violet-fg); }
.badge-soft {
  font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 3px 9px;
  background: var(--bg); color: var(--muted); white-space: nowrap;
}
.badge-soft.danger { background: var(--danger-bg); color: var(--danger-fg); }
.badge-soft.ok { background: var(--success-bg); color: var(--success-fg); }
.uniq { background: var(--highlight); border-radius: 5px; padding: 0 3px; }

/* ---------- tabel ---------- */
.table-card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table.data { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; color: var(--muted); font-size: 12.5px; font-weight: 700;
  padding: 16px 10px; white-space: nowrap;
}
table.data td { padding: 13px 10px; border-top: 1px solid var(--border); vertical-align: middle; }
table.data th:first-child, table.data td:first-child { padding-left: 20px; }
table.data th:last-child, table.data td:last-child { padding-right: 20px; }
table.data .r { text-align: right; }
table.data .cell-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
table.data .cell-main b { font-weight: 800; }
table.data .cell-main span { font-size: 12px; color: var(--muted); font-family: var(--mono); }
.table-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted); font-weight: 600;
}
.pager { display: flex; gap: 8px; }

/* ---------- beranda ---------- */
.home-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.home-grid .hero { flex: 999 1 520px; min-width: 0; }
.home-grid .health { flex: 1 1 300px; min-width: 0; }
.home-lower { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.home-lower .pending-card { flex: 1 1 320px; min-width: 0; }
.home-lower .recent { flex: 2 1 480px; min-width: 0; }

.health-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.health-row:first-of-type { border-top: 0; }
.health-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--success); }
.health-dot.ok { background: var(--success); }
.health-dot.warn { background: var(--warn); }
.health-dot.bad { background: var(--danger); }
.health-dot.info { background: var(--primary); }
.health-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.health-text b { font-size: 14px; }
.health-text span { font-size: 12.5px; color: var(--muted); line-height: 1.4; font-weight: 500; }
.shopee-monitor {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; background: var(--success-bg); color: var(--success-fg);
  font-size: 13px; font-weight: 800;
}
.shopee-monitor.warn { background: var(--warn-bg); color: var(--warn-fg); }
.shopee-monitor.bad { background: var(--danger-bg); color: var(--danger-fg); }
.shopee-monitor .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 4px rgba(23,178,106,.2);
}
.shopee-monitor.warn .dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(247,144,9,.2); }
.shopee-monitor.bad .dot { background: var(--danger); box-shadow: 0 0 0 4px rgba(240,68,56,.2); }

.countdown {
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  border-radius: 999px; padding: 5px 10px; background: var(--primary-tint); color: var(--primary);
  white-space: nowrap;
}
.countdown.warn { background: var(--warn-bg); color: var(--warn-fg); }

.warning-banner {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
  background: var(--warn-bg); color: var(--warn-fg); border-radius: 18px;
  padding: 12px 14px; text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.4;
}
.warning-banner .grow { flex: 1; }
.sandbox-strip .grow { flex: none; }

.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 20px; text-align: center; color: var(--muted);
}
.empty h3 { color: var(--ink); font-size: 17px; }
.empty p { font-size: 13.5px; font-weight: 500; max-width: 40ch; }
.skeleton { background: linear-gradient(90deg, #EDF0F5 25%, #F7F9FC 50%, #EDF0F5 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- detail ---------- */
.detail-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.detail-main { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.detail-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.detail-title { display: flex; flex-direction: column; gap: 1px; margin-right: auto; min-width: 0; }
.detail-title .ref { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.detail-title h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }

.webhook-note { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.webhook-note.bad { background: var(--danger-bg); color: var(--danger-fg); }
.webhook-note.good { background: var(--success-bg); color: var(--success-fg); }
.webhook-note.warn { background: var(--warn-bg); color: var(--warn-fg); }
.delivery-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.delivery-row .time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); min-width: 72px; }
.delivery-row .event { font-weight: 800; flex: 1 1 140px; }
.delivery-row .dur { color: var(--muted); min-width: 80px; text-align: right; font-weight: 600; }

.timeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; }
.timeline .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--primary); }
.timeline .dot.ok { background: var(--success); }
.timeline .dot.bad { background: var(--danger); }
.timeline .dot.muted { background: #98A2B3; }
.timeline .text { display: flex; flex-direction: column; flex: 1; gap: 2px; }
.timeline .text b { font-size: 14px; font-weight: 800; }
.timeline .text span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.timeline .at { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.kv > div:first-child { border-top: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.total-line { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }

/* ---------- laporan ---------- */
.report-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.report-card { border-radius: 22px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.report-card.blue { background: var(--primary); color: #fff; }
.report-card .k { font-size: 13px; font-weight: 600; opacity: .9; }
.report-card .v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.report-card .s { font-size: 12.5px; opacity: .85; font-weight: 600; }
.report-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; }
.report-grid .chart-card { flex: 2 1 480px; min-width: 0; }
.report-grid .category-card { flex: 1 1 300px; min-width: 0; }
.daily-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; align-items: end; height: 200px; border-bottom: 1px solid var(--border); }
.daily-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.daily-col .bar-value { font-size: 12px; font-weight: 800; white-space: nowrap; }
.daily-col .bar { width: 100%; max-width: 64px; border-radius: 10px 10px 4px 4px; background: #C7D7FE; min-height: 4px; }
.daily-col.now .bar { background: var(--primary); }
.daily-labels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.daily-labels span { font-size: 12.5px; color: var(--muted); text-align: center; font-weight: 600; white-space: nowrap; }
.category-row { display: flex; flex-direction: column; gap: 6px; }
.category-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.category-top b { font-weight: 800; }
.category-bar { height: 8px; border-radius: 8px; background: var(--bg); }
.category-bar i { display: block; height: 8px; border-radius: 8px; background: var(--primary); }
.category-note { font-size: 12px; color: var(--muted); font-weight: 500; line-height: 1.45; }
.mini-chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 70px; }
.mini-chart i { display: block; border-radius: 8px; background: rgba(255,255,255,.35); min-height: 4px; }
.mini-chart i.now { background: var(--highlight); }
.mini-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin-top: -6px; }
.mini-labels span { font-size: 11.5px; text-align: center; opacity: .85; }

/* ---------- shopee ---------- */
.status-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.status-hero .status-mark { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--success-bg); color: var(--success-fg); }
.status-hero .status-mark.warn { background: var(--warn-bg); color: var(--warn-fg); }
.status-hero .status-mark.bad { background: var(--danger-bg); color: var(--danger-fg); }
.status-hero .status-copy { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; }
.status-hero .status-copy b { font-size: 21px; }
.status-hero .status-copy span { font-size: 14px; color: var(--muted); font-weight: 600; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; flex: 2 1 480px; }
.meta-box { background: var(--bg); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.meta-box span { font-size: 12px; font-weight: 700; color: var(--muted); }
.meta-box b { font-size: 14.5px; font-weight: 800; }
.flow-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.flow-list li { display: flex; gap: 12px; align-items: flex-start; }
.flow-list .n { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.flow-list b { display: block; font-size: 14px; }
.flow-list span { font-size: 12.5px; color: var(--muted); line-height: 1.45; font-weight: 500; }
.qris-tile { width: 76px; height: 76px; border-radius: 16px; background: var(--primary-tint-2); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.card-grid-3 { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.card-grid-3 > .card { flex: 1 1 320px; min-width: 0; }
.stepper { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stepper li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.stepper li.done, .stepper li.now { color: var(--ink); }
.stepper li.done .n { background: var(--success-bg); color: var(--success-fg); }
.stepper li.now .n { background: var(--primary); color: #fff; }

/* ---------- integrasi ---------- */
.integration-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.integration-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.integration-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.key-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.key-row .key-name { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; }
.key-row .key-name b { font-size: 14px; }
.key-row .key-name span { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.log-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.log-row .time { font-family: var(--mono); font-size: 12px; color: var(--muted); min-width: 64px; }
.log-row .path { font-family: var(--mono); font-size: 12.5px; flex: 1 1 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-row .dur { color: var(--muted); min-width: 52px; text-align: right; font-weight: 600; }
.code-card { background: var(--ink); color: #E4E7EC; border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.code-card b { color: #fff; font-size: 13px; }
.code-card pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.code-inline { font-family: var(--mono); font-size: 12.5px; background: var(--bg); border-radius: 8px; padding: 2px 6px; }

/* ---------- tim ---------- */
.team-grid { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.team-main { flex: 2 1 480px; min-width: 0; }
.team-side { flex: 1 1 360px; min-width: 0; }
.member-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.member-row .member-name { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; gap: 1px; }
.member-row .member-name b { font-size: 14.5px; }
.member-row .member-name span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.invite-row .inv-dot { width: 40px; height: 40px; border-radius: 50%; border: 2px dashed #98A2B3; flex: none; }
.invite-row .member-name { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.permission-table { width: 100%; min-width: 380px; border-collapse: collapse; font-size: 13px; }
.permission-table th, .permission-table td { padding: 10px 6px; border-top: 1px solid var(--border); }
.permission-table thead th { border-top: 0; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.permission-table thead th:first-child { text-align: left; padding-left: 20px; }
.permission-table tbody th { text-align: left; font-weight: 600; padding-left: 20px; }
.permission-table .yes { color: var(--success-fg); font-weight: 800; }
.permission-table .no { color: #98A2B3; }
.activity-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.activity-row .time { font-family: var(--mono); font-size: 12.5px; color: var(--muted); min-width: 52px; }
.activity-row .who { font-weight: 800; min-width: 60px; }
.activity-row .what { flex: 1 1 260px; color: #344054; font-weight: 600; }
.role-help { background: var(--primary-tint); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.role-help span { font-size: 12.5px; color: #1E3A8A; line-height: 1.45; font-weight: 600; }

/* ---------- akun ---------- */
.account-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 720px; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.session-row .info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.session-row .info b { font-size: 13.5px; }
.session-row .info span { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- menu / notifikasi ---------- */
.popover {
  position: absolute; z-index: 40; min-width: 250px; max-width: 330px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 16px 40px rgba(16,24,40,.14);
  padding: 8px; overflow: hidden;
}
.popover.right { right: 0; top: calc(100% + 8px); }
.popover .pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; }
.popover .pop-head b { font-size: 14px; }
.popover .pop-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink);
  font-size: 13.5px; font-weight: 700; text-align: left; text-decoration: none;
}
.popover .pop-item:hover { background: var(--bg); }
.popover .pop-item small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.popover .notif-item { border-top: 1px solid var(--border); }
.popover .notif-item.unread { background: var(--primary-tint); }
.popover hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.rel { position: relative; }
.bell-btn { position: relative; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink); }
.bell-badge { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface); }

/* ---------- modal / toast ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: auto;
  background: var(--surface); border-radius: 24px; padding: 22px;
  box-shadow: 0 24px 64px rgba(16,24,40,.24); display: flex; flex-direction: column; gap: 14px;
}
.modal.wide { max-width: 720px; }
.modal.sheet { align-self: flex-end; border-radius: 24px 24px 0 0; max-width: none; }
.modal h3 { font-size: 19px; }
.modal p { font-size: 13.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }
.copy-box { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.copy-box code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.toasts { position: fixed; z-index: 80; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; max-width: min(360px, calc(100vw - 36px)); }
.toast {
  background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 14px;
  font-size: 13px; font-weight: 700; box-shadow: 0 12px 30px rgba(16,24,40,.24);
  display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: var(--success-fg); }
.toast.err { background: var(--danger-fg); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- halaman masuk ---------- */
.auth-page { min-height: 100vh; display: flex; flex-wrap: wrap; align-items: stretch; background: var(--bg); }
.auth-side {
  flex: 1 1 420px; background: var(--primary); color: #fff; padding: 48px;
  display: flex; flex-direction: column; gap: 28px; min-height: 100vh;
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 800; }
.auth-brand .brand-mark { width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--primary); font-size: 20px; }
.auth-brand .shop { font-weight: 600; opacity: .8; }
.auth-lead { margin-top: auto; display: flex; flex-direction: column; gap: 16px; max-width: 460px; }
.auth-lead h1 { font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.auth-lead p { font-size: 16px; line-height: 1.6; opacity: .9; font-weight: 600; }
.auth-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 520px; }
.auth-feature { background: rgba(255,255,255,.12); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.auth-feature b { font-size: 20px; }
.auth-feature span { font-size: 12.5px; opacity: .9; font-weight: 600; }
.auth-main { flex: 1 1 520px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface); border-radius: 28px;
  padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow);
}
.auth-card h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.auth-card .auth-sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.auth-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; font-weight: 500; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) {
  .main { padding: 24px 24px 44px; }
  .home-grid .hero { flex-basis: 100%; }
}

@media (max-width: 900px) {
  .auth-page { display: block; }
  .auth-side { width: 100%; min-height: 0; padding: 40px 24px 64px; border-radius: 0 0 32px 32px; }
  .auth-lead { margin-top: 0; }
  .auth-lead h1 { font-size: 28px; letter-spacing: -.02em; line-height: 1.15; }
  .auth-lead p, .auth-features { display: none; }
  .auth-main { width: 100%; min-width: 0; padding: 0 16px 32px; margin-top: -36px; align-items: flex-start; }
  .auth-card { margin: 0 auto; padding: 22px 20px; border-radius: 26px; box-shadow: 0 10px 30px rgba(16,24,40,.08); }
  .auth-card h2 { font-size: 20px; }
  .auth-card .auth-sub { display: none; }
  .auth-brand { font-size: 16px; }
  .auth-brand .brand-mark { width: 44px; height: 44px; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 18px 18px 104px; gap: 12px; }
  .page, .page.tight { gap: 12px; }
  .mobile-header { display: flex; align-items: center; gap: 12px; }
  .mobile-header .mobile-title { display: flex; flex-direction: column; flex: 1; line-height: 1.25; min-width: 0; }
  .mobile-header .mobile-title span { font-size: 13px; color: var(--muted); font-weight: 600; }
  .mobile-header .mobile-title b { font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head h1 { font-size: 26px; }
  .page-head .sub { display: none; }
  .page-head .eyebrow { font-size: 12px; }
  .blue-card { border-radius: 26px; padding: 20px; gap: 14px; }
  .blue-card .value { font-size: 36px; letter-spacing: -.03em; }
  .blue-stat { border-radius: 14px; padding: 10px 12px; }
  .blue-stat b { font-size: 18px; }
  .blue-stat span { font-size: 11.5px; }
  .hero-bars { display: none; }
  .blue-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .blue-stat.expired { display: none; }
  .card { border-radius: 22px; padding: 16px; }
  .card.rows { padding: 2px 16px; }
  .card-head { min-height: 48px; }
  .card h2, .card h3 { font-size: 15px; }
  .home-grid, .home-lower, .report-grid, .detail-grid, .integration-grid, .team-grid, .card-grid-3 { gap: 12px; }
  .integration-side { order: -1; }
  .home-grid .health { display: none; }
  .home-lower .pending-card { display: none; }
  .report-card { border-radius: 18px; padding: 12px 14px; }
  .report-card .v { font-size: 19px; }
  .report-card .k { font-size: 12px; }
  .report-card .s { font-size: 12px; }
  .report-summary { grid-template-columns: 1fr 1fr; gap: 10px; }
  .report-summary .report-card.blue { grid-column: 1 / -1; }
  .report-summary .report-card.blue .v { font-size: 32px; }
  .detail-title h1 { font-size: 17px; }
  .detail-title .ref { font-size: 12px; }
  .detail-side { order: 2; }
  .total-line { font-size: 32px; }
  .table-card { border-radius: 22px; }
  .table-scroll { display: none; }
  .desktop-only { display: none !important; }
  .mobile-list { display: block; }
  .row { gap: 12px; padding: 11px 0; }
  .member-row .member-name, .invite-row .member-name, .key-row .key-name { flex: 1 1 0; }
  .invite-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; }
  .invite-row .inv-dot { grid-row: span 2; align-self: start; }
  .invite-row .member-name { grid-column: 2; }
  .invite-row .btn.tint { grid-column: 3; grid-row: 1; }
  .invite-row .btn.ghost { grid-column: 2 / -1; grid-row: 2; justify-self: start; min-height: 32px; }

  .key-row { flex-wrap: nowrap; }
  .key-row .key-used { display: none; }
  .key-row .key-name b, .key-row .key-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .row-amount { min-width: 0; font-size: 14.5px; }
  .row-title { font-size: 14px; }
  .filter-row { flex-wrap: nowrap; overflow: hidden; }
  .filter-row .filter-pill { padding: 0 13px; min-height: 38px; }
  .filter-expired { display: none; }
  .search-box { min-height: 48px; }
  .page-head .btn.export-desktop { display: none; }
  .daily-chart { height: 140px; gap: 6px; }
  .daily-col .bar-value { font-size: 10px; }
  .daily-labels span { font-size: 11px; }
  .daily-labels { gap: 6px; }
  .status-hero { gap: 14px; }
  .status-hero .status-mark { width: 48px; height: 48px; border-radius: 16px; }
  .status-hero .status-copy b { font-size: 16px; }
  .status-hero .status-copy span { font-size: 12.5px; }
  .meta-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .meta-box { border-radius: 14px; padding: 10px 12px; }
  .meta-box span { font-size: 11.5px; }
  .meta-box b { font-size: 13.5px; }
  .qris-tile { width: 48px; height: 48px; border-radius: 14px; }
  .step-list-mobile { display: flex; flex-direction: column; gap: 10px; }
  .mobile-nav {
    display: grid; position: fixed; left: 0; right: 0; bottom: 0; height: 84px;
    background: var(--surface); border-top: 1px solid var(--border);
    align-items: center; padding: 0 6px 12px; z-index: 30;
  }
  .mobile-nav a, .mobile-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 60px; border: 0; background: transparent; color: var(--muted);
    text-decoration: none; font-size: 11.5px; font-weight: 600;
  }
  .mobile-nav a[aria-current="page"], .mobile-nav button[aria-current="page"] { color: var(--primary); }
  .mobile-nav a[aria-current="page"] span, .mobile-nav button[aria-current="page"] span { font-weight: 800; }
  .popover, .popover.right {
    position: fixed; left: 12px; right: 12px; top: auto; bottom: 96px;
    max-width: none; min-width: 0;
  }
  .modal.sheet { max-width: none; }
  .toasts { bottom: 96px; }
  .auth-side { min-height: 0; }
}

@media (min-width: 768px) {
  .mobile-only { display: none !important; }
  .mobile-list { display: none !important; }
}

@media (max-width: 380px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .report-summary { grid-template-columns: 1fr; }
  .report-summary .report-card.blue { grid-column: auto; }
}
