/* MitraHub panel theme. All colors come from the tokens below. */
:root {
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --hover: #f1f2f9;
  --border: #e6e8f2;
  --border-strong: #d4d8e6;
  --text: #12132a;
  --muted: #6b6f8a;
  --accent: #6c47ff;
  --accent-2: #2f7bff;
  --accent-hover: #5a35f0;
  --accent-soft: #f0ecff;
  --accent-text: #5631e8;
  --grad: linear-gradient(135deg, #6c47ff 0%, #2f7bff 100%);
  --grad-hero: linear-gradient(135deg, #5b3bff 0%, #3d6dff 55%, #19b4d6 100%);
  --green: #0f9d6b;
  --green-soft: #e8f8f1;
  --amber: #b25e00;
  --amber-soft: #fff6e6;
  --red: #e0344a;
  --red-soft: #fdeef0;
  --pink: #d63384;
  --pink-soft: #fdecf5;
  --code-bg: #0f1024;
  --code-text: #e3e5f5;
  --side-bg: #0f1022;
  --side-text: #c9cbe3;
  --side-muted: #6f7296;
  --side-hover: #1b1d38;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(18, 19, 42, 0.04), 0 4px 16px rgba(18, 19, 42, 0.04);
  --shadow-lg: 0 24px 56px rgba(18, 19, 42, 0.18);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0b17;
  --surface: #12142a;
  --surface-2: #0f1124;
  --hover: #1a1c36;
  --border: #23264a;
  --border-strong: #31355e;
  --text: #ecedf8;
  --muted: #9a9dbd;
  --accent: #8b6dff;
  --accent-2: #4d8dff;
  --accent-hover: #a28aff;
  --accent-soft: rgba(139, 109, 255, 0.16);
  --accent-text: #b4a2ff;
  --green: #3ad69a;
  --green-soft: rgba(58, 214, 154, 0.12);
  --amber: #ffbe4d;
  --amber-soft: rgba(255, 190, 77, 0.12);
  --red: #ff6b7f;
  --red-soft: rgba(255, 107, 127, 0.12);
  --pink: #ff7ab8;
  --pink-soft: rgba(255, 122, 184, 0.12);
  --code-bg: #070815;
  --side-bg: #080915;
  --side-hover: #15172e;
  --shadow: none;
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Sora", "Manrope", sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.ic { flex-shrink: 0; vertical-align: middle; }
.mono { font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.86em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.green { color: var(--green); }
.red { color: var(--red); }
.nowrap { white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--muted); font-weight: 500; font-size: 13px; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:hover:not(:disabled) { background: var(--hover); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .nav a:focus-visible, .chip:focus-visible, .tab:focus-visible {
  outline: 3px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent);
}
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(108, 71, 255, 0.28); }
.btn-primary:hover:not(:disabled) { background: var(--grad); filter: brightness(1.08); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(15, 157, 107, 0.22); }
.btn-green:hover:not(:disabled) { background: var(--green); filter: brightness(1.06); }
.btn-danger { color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-soft); border-color: var(--red); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.btn-soft:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--hover); }
.btn-white { background: rgba(255,255,255,.95); color: #2a1f7a; border-color: transparent; }
.btn-white:hover:not(:disabled) { background: #fff; }
.btn-glass { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-glass:hover:not(:disabled) { background: rgba(255,255,255,.26); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { padding: 13px 20px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--hover); }

/* ----------------------------------------------------------------- Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface-2);
  font-size: 14.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 90px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface); }
input[type="checkbox"] { width: auto; accent-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.input-icon { position: relative; }
.input-icon .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input { padding-left: 40px; }
.form-error { background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 14px; }

/* ----------------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--hover); color: var(--muted);
}
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-blue { background: var(--accent-soft); color: var(--accent-text); }
.badge-pink { background: var(--pink-soft); color: var(--pink); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(15,157,107,.5); } 70% { box-shadow: 0 0 0 8px rgba(15,157,107,0); } 100% { box-shadow: 0 0 0 0 rgba(15,157,107,0); } }

/* ------------------------------------------------------------------- Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art {
  background: var(--grad-hero); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-art::before, .auth-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); }
.auth-art::before { width: 420px; height: 420px; right: -140px; top: -120px; }
.auth-art::after { width: 300px; height: 300px; left: -100px; bottom: -110px; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h2 { font-size: 34px; line-height: 1.2; letter-spacing: -0.02em; max-width: 420px; }
.auth-art p { opacity: .85; margin-top: 12px; max-width: 420px; }
.auth-points { display: grid; gap: 12px; margin-top: 28px; }
.auth-point { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px); }
.auth-point .ic { opacity: .95; }
.auth-main { display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-head { margin-bottom: 22px; }
.logo {
  width: 46px; height: 46px; border-radius: 14px; background: var(--grad); color: #fff;
  display: inline-grid; place-items: center; font-family: "Sora", sans-serif; font-weight: 800; font-size: 20px;
  box-shadow: 0 8px 20px rgba(108, 71, 255, 0.35);
}
.auth-head h1 { font-size: 26px; letter-spacing: -0.02em; margin-top: 18px; }
.auth-head p { color: var(--muted); margin-top: 4px; }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.auth-switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth-switch button { background: none; border: none; color: var(--accent-text); font-weight: 700; cursor: pointer; }

/* ------------------------------------------------------------------ Shell */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; flex-shrink: 0; background: var(--side-bg); color: var(--side-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand .logo { width: 38px; height: 38px; font-size: 16px; border-radius: 12px; }
.brand-name { font-family: "Sora", sans-serif; font-weight: 700; font-size: 16px; color: #fff; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--side-muted); }
.nav { flex: 1; overflow-y: auto; padding: 4px 14px 14px; scrollbar-width: thin; scrollbar-color: #2a2c4d transparent; }
.nav-group { font-size: 11px; font-weight: 800; color: var(--side-muted); letter-spacing: .1em; text-transform: uppercase; padding: 18px 10px 7px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 3px;
  border-radius: 12px; border: 1px solid transparent; color: var(--side-text); font-size: 14.5px; font-weight: 600;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--side-hover); color: #fff; text-decoration: none; }
.nav a .ic { color: var(--side-muted); transition: color .15s; }
.nav a:hover .ic { color: #fff; }
.nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 18px rgba(108, 71, 255, 0.35); }
.nav a.active .ic { color: #fff; }
.nav .count { margin-left: auto; background: #ff4d6d; color: #fff; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.sidebar-foot { padding: 14px; border-top: 1px solid #1d1f3a; }
.sidebar-foot .logout { width: 100%; justify-content: flex-start; color: #ff8b9c; }
.sidebar-foot .logout:hover { background: var(--side-hover); color: #ffb0bb; }
.main { flex: 1; min-width: 0; position: relative; }
.main::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; pointer-events: none;
  background: radial-gradient(600px 220px at 85% 0%, rgba(108, 71, 255, 0.10), transparent 70%),
              radial-gradient(500px 200px at 30% 0%, rgba(47, 123, 255, 0.07), transparent 70%);
}
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 32px; background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.topbar .grow { flex: 1; min-width: 0; }
.topbar .crumb { font-size: 13px; color: var(--muted); font-weight: 600; }
.balance-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 700; font-size: 13.5px; color: var(--text); }
.balance-chip:hover { text-decoration: none; border-color: var(--accent); }
.balance-chip .ic { color: var(--accent-text); }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: "Sora", sans-serif; font-weight: 700; flex-shrink: 0; }
.content { max-width: 1100px; margin: 0 auto; padding: 8px 32px 64px; position: relative; }
.menu-btn { display: none; }

/* ------------------------------------------------------------ Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 28px; letter-spacing: -0.03em; line-height: 1.2; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 660px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ Hero */
.hero {
  background: var(--grad-hero); color: #fff; border-radius: 24px; padding: 26px 28px; margin-bottom: 18px;
  position: relative; overflow: hidden; box-shadow: 0 18px 40px rgba(76, 58, 255, 0.28);
}
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.1); }
.hero::before { width: 260px; height: 260px; right: -60px; top: -110px; }
.hero::after { width: 180px; height: 180px; right: 140px; bottom: -120px; }
.hero > * { position: relative; z-index: 1; }
.hero-label { font-size: 13px; font-weight: 700; opacity: .85; display: flex; align-items: center; gap: 8px; }
.hero-value { font-family: "Sora", sans-serif; font-size: 38px; font-weight: 700; letter-spacing: -0.03em; margin: 4px 0 2px; }
.hero-sub { font-size: 13.5px; opacity: .85; }
.hero-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.hero-split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: end; }
.hero-mini { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(6px); }
.hero-mini .v { font-family: "Sora", sans-serif; font-size: 22px; font-weight: 700; }

/* ------------------------------------------------------------------ Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card-title { display: flex; align-items: center; gap: 10px; font-family: "Sora", sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.card-title .chip-ic { width: 32px; height: 32px; }
.card-title .spacer { flex: 1; }
.card-sub { color: var(--muted); font-size: 13.5px; margin: -8px 0 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chip-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent-text); }
.chip-ic.green { background: var(--green-soft); color: var(--green); }
.chip-ic.amber { background: var(--amber-soft); color: var(--amber); }
.chip-ic.pink { background: var(--pink-soft); color: var(--pink); }
.chip-ic.red { background: var(--red-soft); color: var(--red); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 700; display: flex; align-items: center; gap: 7px; }
.stat-value { font-family: "Sora", sans-serif; font-size: 25px; font-weight: 700; letter-spacing: -0.03em; }
.stat-value.accent { color: var(--accent-text); }
.stat-value.green { color: var(--green); }
.stat-foot { font-size: 12.5px; color: var(--muted); margin-top: -8px; }

/* Step tiles on Beranda */
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; gap: 14px; align-items: flex-start; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.step:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.step .num { font-family: "Sora", sans-serif; font-weight: 800; font-size: 13px; color: var(--accent-text); }
.step.done .chip-ic { background: var(--green-soft); color: var(--green); }
.step h3 { font-size: 14.5px; }
.step p { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Notice */
.notice { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); margin-bottom: 16px; font-size: 14px; align-items: flex-start; }
.notice > .ic { margin-top: 2px; }
.notice strong { display: block; margin-bottom: 2px; }
.notice-blue { background: var(--accent-soft); border-color: transparent; }
.notice-blue > .ic { color: var(--accent-text); }
.notice-amber { background: var(--amber-soft); border-color: transparent; }
.notice-amber > .ic { color: var(--amber); }
.notice-green { background: var(--green-soft); border-color: transparent; }
.notice-green > .ic { color: var(--green); }
.notice-red { background: var(--red-soft); border-color: transparent; }
.notice-red > .ic { color: var(--red); }
.notice .grow { flex: 1; }

/* ------------------------------------------------------- Lists (rows) */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-bottom: 1px solid var(--border); transition: background .15s; }
.list-row:last-child { border-bottom: none; }
.list > .list-row:hover { background: var(--surface-2); }
.list-row .main-col { flex: 1; min-width: 0; }
.list-row .title { font-weight: 750; font-size: 14.5px; }
.list-row .meta { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.list-row .side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.list-row .price { font-family: "Sora", sans-serif; font-weight: 700; font-size: 16px; white-space: nowrap; }
.thumb { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex-shrink: 0; }
.dot::before { content: "·"; margin: 0 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

details.list-row { display: block; padding: 0; }
details.list-row > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 15px 18px; cursor: pointer; }
details.list-row > summary::-webkit-details-marker { display: none; }
details.list-row[open] > summary .chev { transform: rotate(180deg); }
.chev { color: var(--muted); transition: transform .15s; }
.details-body { padding: 0 18px 16px; }

/* --------------------------------------------------------------- Toolbar */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar select { width: auto; min-width: 160px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 13px; font-weight: 700; cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip.active { background: var(--grad); border-color: transparent; color: #fff; }
.tabs { display: inline-flex; gap: 3px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.tab { padding: 8px 15px; border-radius: 10px; border: none; background: transparent; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent-soft); color: var(--accent-text); }

/* ----------------------------------------------------------------- Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight: 800; background: var(--surface-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* ------------------------------------------------------------ Copy field */
.copy { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 6px 6px 13px; }
.copy code { flex: 1; overflow-x: auto; white-space: nowrap; font-family: "JetBrains Mono", Consolas, monospace; font-size: 13px; }
pre.code { background: var(--code-bg); color: var(--code-text); border-radius: var(--radius-sm); padding: 16px; overflow-x: auto; font-family: "JetBrains Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.6; white-space: pre; }
pre.code.wrap { white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow-y: auto; }
.code-wrap { position: relative; }
.code-wrap .btn { position: absolute; top: 10px; right: 10px; }
.endpoint { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--surface-2); font-size: 14px; }
.method { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px; margin-right: 8px; }
.method.get { background: var(--green-soft); color: var(--green); }
.method.post { background: var(--accent-soft); color: var(--accent-text); }

/* ------------------------------------------------------ Connection check */
.conn { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; border: 1px dashed var(--border-strong); background: var(--surface-2); }
.conn.ok { border-style: solid; border-color: transparent; background: var(--green-soft); }
.conn.bad { border-style: solid; border-color: transparent; background: var(--red-soft); }
.conn.wait { border-style: solid; border-color: transparent; background: var(--amber-soft); }
.conn .grow { flex: 1; min-width: 0; }
.conn strong { display: block; }
.conn-dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); flex-shrink: 0; }
.conn.ok .conn-dot { color: var(--green); }
.conn.bad .conn-dot { color: var(--red); }
.conn.wait .conn-dot { color: var(--amber); }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13px; margin-top: 8px; }
.kv dt { color: var(--muted); }
.kv dd { word-break: break-all; }

/* ------------------------------------------------------------- Amounts */
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.amounts .btn { padding: 14px 10px; font-size: 14.5px; border-radius: 14px; }
.amounts .btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.qris { text-align: center; }
.qris img { width: 260px; max-width: 100%; border-radius: 16px; border: 1px solid var(--border); background: #fff; padding: 12px; }
.qris .total { font-family: "Sora", sans-serif; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin-top: 12px; }
.qris .countdown { display: inline-flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 700; margin-top: 6px; }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.summary-line.total { border-top: 1px dashed var(--border-strong); margin-top: 6px; padding-top: 10px; font-weight: 800; }

/* --------------------------------------------------------------- Empty */
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty .ic { color: var(--border-strong); margin-bottom: 10px; }
.empty h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.loading { padding: 48px; text-align: center; color: var(--muted); }

/* ------------------------------------------------------- Modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 11, 28, 0.55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 100; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); max-height: 90vh; display: flex; flex-direction: column; animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); padding: 12px 15px; border-radius: 14px; font-size: 14px; box-shadow: var(--shadow-lg); max-width: 360px; animation: pop .16s ease-out; }
.toast.success .ic { color: var(--green); }
.toast.error .ic { color: var(--red); }

/* ------------------------------------------------------- Notifications */
.balance-chip.low { border-color: var(--amber); background: var(--amber-soft); color: var(--amber); }
.balance-chip.low .ic { color: var(--amber); }
.bell-wrap { position: relative; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff4d6d; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.bell-panel { position: absolute; right: 0; top: 46px; width: 380px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; animation: pop .14s ease-out; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-family: "Sora", sans-serif; font-weight: 700; }
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-foot { padding: 10px; border-top: 1px solid var(--border); text-align: center; }
.notif { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); color: var(--text); cursor: pointer; }
.notif:last-child { border-bottom: none; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.notif .chip-ic { width: 36px; height: 36px; }
.notif .t { font-weight: 750; font-size: 14px; }
.notif .b { font-size: 13px; color: var(--muted); margin-top: 1px; }
.notif .w { font-size: 12px; color: var(--muted); margin-top: 4px; }
.notif .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.switch { position: relative; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-strong); cursor: pointer; transition: background .15s; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.setting-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-row .grow { flex: 1; min-width: 0; }
.setting-row strong { display: block; }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: -280px; transition: left .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .topbar .crumb { display: none; }
  .content { padding: 4px 16px 48px; }
  .page-head h1 { font-size: 23px; }
  .hero { padding: 22px; border-radius: 20px; }
  .hero-value { font-size: 30px; }
  .hero-split { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .list-row { padding: 13px 14px; gap: 10px; }
  .thumb { display: none; }
  .amounts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 20px; }
  .balance-chip span { display: none; }
}

/* Sambungkan Bot: pilihan mode */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.mode-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text, inherit); cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.mode-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.mode-card > .ic { flex: none; color: var(--muted); margin-top: 2px; }
.mode-card strong { display: block; font-size: 14px; }
.mode-card small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.mode-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.mode-card.active > .ic { color: var(--accent-text); }
@media (max-width: 820px) { .mode-grid { grid-template-columns: 1fr; } }

/* Panduan API: endpoint yang bisa dibuka */
details.ep { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--surface-2); }
details.ep > summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 12px; cursor: pointer; list-style: none; }
details.ep > summary::-webkit-details-marker { display: none; }
details.ep[open] > summary { border-bottom: 1px solid var(--border); }
details.ep > :not(summary) { margin: 10px 12px; }
details.ep pre.code { margin-top: 4px; }
/* Langkah sederhana: ikon + judul + teks (tanpa pembungkus) */
.step:has(> h3) { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; align-content: start; }
.step > .step-icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.step > h3, .step > p { grid-column: 2; margin: 0; }