@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* =====================================================================
   app.css — Kedai Keuangan · Design System v2 "Premium"
   Bahasa visual mengikuti sistem_arsip_utu (brand #006DF0, Poppins,
   radius besar, soft shadow berlapis, gradient hero, icon tile pastel)
   lalu dinaikkan: glass topbar, hero gradient, numeric tabular,
   state hover halus, dark-mode parity penuh.
   Semua font & ikon di-vendor lokal (assets/vendor, assets/fonts) —
   tanpa CDN, jadi aman untuk CSP ketat dan tetap cepat saat offline.
   ===================================================================== */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* brand */
  --brand: #006df0;
  --brand-dark: #0057c2;
  --brand-deep: #0047a3;
  --brand-soft: #e8f1ff;
  --brand-tint: #f4f8ff;
  --brand-line: #cfe1ff;
  --grad-a: #0a6bff;
  --grad-b: #0050cc;

  /* surface */
  --bg: #f5f7fc;
  --bg-2: #eef2f9;
  --card: #ffffff;
  --card-2: #f8fafd;
  --card-3: #f1f5fb;
  --glass: rgba(255, 255, 255, .84);

  /* ink */
  --text: #16202e;
  --text-2: #33415c;
  --muted: #6b7688;
  --muted-2: #7f8a9d;
  --border: #e7ecf5;
  --border-strong: #d8e0ed;

  /* semantik keuangan */
  --pos: #12805c;
  --pos-soft: #e6f7ef;
  --pos-line: #b7e7cc;
  --neg: #b42318;
  --neg-soft: #fef1f0;
  --neg-line: #f6c6c6;
  --warn: #b54708;
  --warn-soft: #fff6e6;
  --warn-line: #f6d9a8;

  /* geometri */
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 11px;
  --radius-xs: 9px;
  --radius-pill: 999px;

  /* elevasi */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 26px -18px rgba(16, 24, 40, .18);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .05), 0 16px 34px -20px rgba(16, 24, 40, .24);
  --shadow-lg: 0 24px 56px -24px rgba(16, 24, 40, .30), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-brand: 0 10px 22px -12px rgba(0, 109, 240, .65);
  --ring: 0 0 0 4px rgba(0, 109, 240, .13);

  /* tipografi */
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* layout */
  --sidebar-w: 272px;
  --topbar-h: 68px;
  --content-max: 1560px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --t: all .24s var(--ease);
}

html[data-bs-theme="dark"] {
  color-scheme: dark;

  --brand: #5aa2ff;
  --brand-dark: #8ec2ff;
  --brand-deep: #2f7bff;
  --brand-soft: rgba(90, 162, 255, .15);
  --brand-tint: rgba(90, 162, 255, .07);
  --brand-line: rgba(90, 162, 255, .30);
  --grad-a: #2f7bff;
  --grad-b: #1d5fd1;

  --bg: #0a1120;
  --bg-2: #0d1526;
  --card: #121b2c;
  --card-2: #162034;
  --card-3: #1a253c;
  --glass: rgba(18, 27, 44, .84);

  --text: #e8eefb;
  --text-2: #c2cee2;
  --muted: #a3b0c4;
  --muted-2: #8b99b0;
  --border: #22304a;
  --border-strong: #2c3d5c;

  --pos: #4ade80;
  --pos-soft: rgba(74, 222, 128, .13);
  --pos-line: rgba(74, 222, 128, .28);
  --neg: #fb7185;
  --neg-soft: rgba(251, 113, 133, .13);
  --neg-line: rgba(251, 113, 133, .28);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .13);
  --warn-line: rgba(251, 191, 36, .26);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 28px -18px rgba(0, 0, 0, .75);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .40), 0 18px 38px -22px rgba(0, 0, 0, .85);
  --shadow-lg: 0 28px 60px -26px rgba(0, 0, 0, .90), 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-brand: 0 10px 24px -14px rgba(47, 123, 255, .75);
  --ring: 0 0 0 4px rgba(90, 162, 255, .18);
}

/* ---------------------------------------------------------------
   2. BASE
   --------------------------------------------------------------- */
* { -webkit-tap-highlight-color: transparent; }
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: .875rem;
  line-height: 1.58;
  letter-spacing: -.005em;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 520px at 6% -12%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 62%),
    radial-gradient(900px 460px at 102% 0%, color-mix(in srgb, #7c3aed 6%, transparent), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -.02em; font-weight: 600; color: var(--text); }
a { color: var(--brand); text-decoration: none; transition: var(--t); }
a:hover { color: var(--brand-dark); }
hr { border-color: var(--border); opacity: 1; }
strong, b { font-weight: 600; }

::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); color: var(--text); }
*:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.mono,
.num,
.amount,
td.num,
th.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.02em;
}

/* scrollbar halus */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 28%, transparent);
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--muted) 48%, transparent); background-clip: content-box; }

/* ---------------------------------------------------------------
   3. SHELL
   --------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

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

.app-content {
  flex: 1;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 26px clamp(14px, 2.4vw, 34px) 44px;
}

.app-content > * { animation: rise .5s var(--ease) both; }
.app-content > *:nth-child(2) { animation-delay: .04s; }
.app-content > *:nth-child(3) { animation-delay: .08s; }
.app-content > *:nth-child(4) { animation-delay: .12s; }
.app-content > *:nth-child(n+5) { animation-delay: .16s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px clamp(14px, 2.4vw, 34px);
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 55%, transparent);
  color: var(--muted);
  font-size: .75rem;
}

/* ---------------------------------------------------------------
   4. SIDEBAR
   --------------------------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1030;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: var(--card);
  background-image: linear-gradient(180deg, var(--brand-tint) 0%, transparent 240px);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(16, 24, 40, .02), 18px 0 44px -36px rgba(16, 24, 40, .30);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--topbar-h);
  padding: 0 18px;
  min-width: 0;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(140deg, var(--grad-a) 0%, var(--grad-b) 100%);
  box-shadow: 0 10px 20px -10px rgba(0, 109, 240, .85), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
  pointer-events: none;
}

.brand-text { min-width: 0; line-height: 1.2; }
.brand-text strong {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small {
  display: block;
  margin-top: 2px;
  font-size: .6875rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 18px;
}

.sidebar-section {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px 8px;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.sidebar-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.sidebar-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 3px;
  border-radius: var(--radius-sm);
  font-size: .8438rem;
  font-weight: 500;
  color: var(--muted);
  transition: var(--t);
}
.sidebar-nav .nav-link i {
  width: 22px;
  flex: 0 0 auto;
  text-align: center;
  font-size: 1.0625rem;
  color: var(--muted-2);
  transition: var(--t);
}
.sidebar-nav .nav-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sidebar-nav .nav-link:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  transform: translateX(2px);
}
.sidebar-nav .nav-link:hover i { color: var(--brand); }

.sidebar-nav .nav-link.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
  box-shadow: 0 12px 22px -14px rgba(0, 109, 240, .95), inset 0 1px 0 rgba(255, 255, 255, .28);
  transform: none;
}
.sidebar-nav .nav-link.active i { color: #fff; }
.sidebar-nav .nav-link.active::after {
  content: '';
  position: absolute;
  right: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-2) 70%, transparent);
}
.sidebar-footer .avatar { flex: 0 0 auto; }

.sidebar-offcanvas { width: 288px; }
.sidebar-nav-mobile { padding: 10px 12px 20px; }

.offcanvas {
  background: var(--card);
  color: var(--text);
  border-right: 1px solid var(--border) !important;
}
.offcanvas-header { padding: 16px 18px; border-color: var(--border) !important; }
.offcanvas-body { padding: 0; }

/* ---------------------------------------------------------------
   5. TOPBAR
   --------------------------------------------------------------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 0 clamp(14px, 2.4vw, 34px);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .app-topbar { background: var(--card); }
}

.topbar-title { min-width: 0; }
.topbar-title h1 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title small {
  display: block;
  margin-top: 1px;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.btn-icon:hover,
.btn-icon:focus-visible {
  border-color: var(--brand-line);
  color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: .8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(140deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 8px 16px -10px rgba(0, 109, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: .72rem; }

/* ---------------------------------------------------------------
   6. BUTTONS
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: .55rem .95rem;
  font-family: var(--font);
  font-size: .8438rem;
  font-weight: 500;
  line-height: 1.35;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  color: var(--text);
  transition: var(--t);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) !important; }
.btn i { font-size: 1.0625rem; line-height: 1; }

.btn-brand {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-brand:hover,
.btn-brand:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -14px rgba(0, 109, 240, .9), inset 0 1px 0 rgba(255, 255, 255, .28);
}

.btn-outline-brand {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
}
.btn-outline-brand:hover,
.btn-outline-brand:focus-visible {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-dark);
}

.btn-outline-secondary {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--muted);
  box-shadow: var(--shadow-xs);
}
.btn-outline-secondary:hover {
  background: var(--brand-soft);
  border-color: var(--brand-line);
  color: var(--brand-dark);
}

.btn-outline-danger {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--neg);
  box-shadow: var(--shadow-xs);
}
.btn-outline-danger:hover { background: var(--neg-soft); border-color: var(--neg-line); color: var(--neg); }

.btn-outline-success {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--pos);
  box-shadow: var(--shadow-xs);
}
.btn-outline-success:hover { background: var(--pos-soft); border-color: var(--pos-line); color: var(--pos); }

.btn-light {
  background: var(--card-2);
  border-color: var(--border);
  color: var(--text-2);
}
.btn-light:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }

.btn-sm { padding: .36rem .7rem; font-size: .7812rem; border-radius: var(--radius-xs); }
.btn-lg { padding: .72rem 1.25rem; font-size: .9375rem; border-radius: var(--radius-md); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* segmented control (tab pil) */
.nav-pills { gap: 6px; }
.nav-pills .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .45rem .95rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  transition: var(--t);
}
.nav-pills .nav-link:hover { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }
.nav-pills .nav-link.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: var(--shadow-brand);
}

/* ---------------------------------------------------------------
   7. CARDS
   --------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
  transition: var(--t);
}

.card-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 17px 22px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.card-header > i:first-child {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 1rem;
  color: var(--brand);
  background: var(--brand-soft);
}
.card-header .card-title-sm { margin: 0; }
.card-header .ms-auto { margin-left: auto; }

.card-body { padding: 20px 22px; }
.card-footer { background: transparent; border-top: 1px solid var(--border); padding: 14px 22px; }
.card-title-sm { margin: 0; font-size: .9375rem; font-weight: 600; letter-spacing: -.015em; }

/* stat card — icon tile kiri, teks kanan */
.stat-card { position: relative; height: 100%; }
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  opacity: 0;
  transition: var(--t);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.stat-card:hover::before { opacity: 1; }

.stat-card .card-body {
  position: relative;
  padding: 20px 22px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stat-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 1.2rem;
  color: var(--brand);
  background: linear-gradient(150deg, var(--brand-soft), color-mix(in srgb, var(--brand) 4%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent);
}
.stat-icon.is-in {
  color: var(--pos);
  background: linear-gradient(150deg, var(--pos-soft), color-mix(in srgb, var(--pos) 4%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pos) 18%, transparent);
}
.stat-icon.is-out {
  color: var(--neg);
  background: linear-gradient(150deg, var(--neg-soft), color-mix(in srgb, var(--neg) 4%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--neg) 18%, transparent);
}
.stat-icon.is-neutral {
  color: var(--muted);
  background: linear-gradient(150deg, var(--card-3), var(--card));
  box-shadow: inset 0 0 0 1px var(--border);
}

.stat-label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 2.3em;
  max-width: calc(100% - 52px);
  font-size: .6875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  margin-top: 3px;
  padding-right: 52px;
  font-family: var(--font);
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1.25;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat-sub { margin-top: 4px; font-size: .75rem; font-weight: 500; color: var(--muted); }

.text-brand { color: var(--brand) !important; }
.text-in { color: var(--pos) !important; }
.text-out { color: var(--neg) !important; }
.text-muted { color: var(--muted) !important; }

/* ---------------------------------------------------------------
   8. HERO + PAGE HEAD
   --------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px);
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
  padding: clamp(22px, 3vw, 32px) clamp(22px, 3vw, 34px);
  margin-bottom: 18px;
  border-radius: 22px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(760px 320px at 88% -30%, rgba(255, 255, 255, .22), transparent 62%),
    linear-gradient(125deg, #0a6bff 0%, #0050cc 62%, #0b3fa6 100%);
  box-shadow: 0 28px 56px -30px rgba(0, 71, 163, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 255, 255, .08);
}
.hero::before { width: 280px; height: 280px; right: -70px; top: -120px; }
.hero::after { width: 190px; height: 190px; right: 120px; bottom: -130px; background: rgba(255, 255, 255, .06); }

.hero-main { position: relative; z-index: 1; min-width: 0; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 9px;
  margin-bottom: 12px;
  border-radius: var(--radius-pill);
  font-size: .7188rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.hero-eyebrow i { font-size: .95rem; }

.hero h1 {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 2.1vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -.03em;
  color: #fff;
}
.hero p {
  margin: 0;
  max-width: 52ch;
  font-size: .8125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 1px 2px rgba(0, 40, 100, .18);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: .7812rem;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  transition: var(--t);
}
.hero-chip:hover { background: rgba(255, 255, 255, .24); color: #fff; transform: translateY(-1px); }
.hero-chip.is-solid { background: #fff; color: var(--brand-deep); box-shadow: 0 10px 22px -14px rgba(0, 0, 0, .55); }
.hero-chip.is-solid:hover { background: #fff; color: var(--brand-deep); }

.hero-panel {
  position: relative;
  z-index: 1;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px);
}
.hero-panel .hp-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .80);
}
.hero-panel .hp-value {
  margin: 6px 0 12px;
  font-size: clamp(1.125rem, 1.7vw, 1.4375rem);
  font-weight: 600;
  letter-spacing: -.035em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hero-panel .hp-meter {
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .22);
  overflow: hidden;
}
.hero-panel .hp-meter > span {
  display: block;
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #ffffff, #d7e8ff);
  box-shadow: 0 0 12px rgba(255, 255, 255, .55);
  transition: width .6s var(--ease);
}
.hero-panel .hp-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  font-size: .7rem;
  white-space: nowrap;
  color: rgba(255, 255, 255, .86);
}

.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pagehead h2 { margin: 0; font-size: 1.1875rem; font-weight: 600; letter-spacing: -.025em; }
.crumb { display: flex; align-items: center; gap: 7px; margin-top: 4px; font-size: .75rem; color: var(--muted); flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { color: var(--muted-2); opacity: .6; }
.crumb .cur { color: var(--brand); font-weight: 600; }

/* ---------------------------------------------------------------
   9. TABLES
   --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  margin: 0;
  width: 100%;
  font-size: .8438rem;
  color: var(--text);
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  --bs-table-hover-bg: transparent;
  --bs-table-hover-color: var(--text);
}

.table > :not(caption) > * > * {
  padding: .78rem .9rem;
  vertical-align: middle;
  background: transparent;
  border-color: var(--border);
}
.table > :not(caption) > * > *:first-child { padding-left: 22px; }
.table > :not(caption) > * > *:last-child { padding-right: 22px; }

.table thead th {
  font-size: .6563rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  background: var(--card-2);
  border-bottom: 1px solid var(--border);
}

.table tbody tr { transition: background .16s ease; }
.table tbody tr:hover { background: var(--brand-tint); }
.table tbody td { border-color: var(--border); }
.table tbody tr:last-child td { border-bottom: 0; }

.table tfoot td,
.table tfoot th {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: var(--card-2);
  font-weight: 600;
}

.table .amount,
.table .num { white-space: nowrap; text-align: right; font-size: .8438rem; font-weight: 500; }

.table td .mono,
.table td code,
.table td .cat-pill,
.table td .badge { white-space: nowrap; }

.sortable { cursor: pointer; user-select: none; }
.sortable::after {
  content: '\2195';
  margin-left: 5px;
  font-size: .7rem;
  opacity: .4;
}
.sortable:hover { color: var(--brand); }
.sortable.sort-asc::after { content: '\2191'; opacity: .95; }
.sortable.sort-desc::after { content: '\2193'; opacity: .95; }

/* ---------------------------------------------------------------
   10. BADGES / PILLS / DOTS
   --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: .34em .7em;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .005em;
  line-height: 1.35;
}
.badge-soft {
  background: var(--card-3);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge .dot { margin-right: 0; }

.bg-success-subtle { background: var(--pos-soft) !important; }
.text-success-emphasis { color: var(--pos) !important; }
.border-success-subtle { border-color: var(--pos-line) !important; }
.bg-warning-subtle { background: var(--warn-soft) !important; }
.text-warning-emphasis { color: var(--warn) !important; }
.border-warning-subtle { border-color: var(--warn-line) !important; }
.bg-danger-subtle { background: var(--neg-soft) !important; }
.text-danger-emphasis { color: var(--neg) !important; }
.border-danger-subtle { border-color: var(--neg-line) !important; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  flex: 0 0 auto;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: .6875rem;
  font-weight: 600;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}
.cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, var(--brand));
  flex: 0 0 auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 500;
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* ---------------------------------------------------------------
   11. FORMS
   --------------------------------------------------------------- */
.form-label {
  margin-bottom: .35rem;
  font-size: .7812rem;
  font-weight: 500;
  color: var(--text-2);
}

.form-control,
.form-select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: .5rem .8rem;
  font-family: var(--font);
  font-size: .8438rem;
  color: var(--text);
  background-color: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.form-control::placeholder { color: var(--muted-2); opacity: 1; }

.form-control:focus,
.form-select:focus {
  color: var(--text);
  background-color: var(--card);
  border-color: var(--brand);
  box-shadow: var(--ring);
  outline: none;
}

.form-control:disabled,
.form-control[readonly] { background-color: var(--card-2); color: var(--muted); box-shadow: none; }
.form-control.is-invalid,
.form-select.is-invalid { border-color: var(--neg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--neg) 12%, transparent); }

.form-control-sm { min-height: 34px; font-size: .7812rem; }
.form-text { font-size: .7188rem; color: var(--muted); }

.input-group-text {
  background: var(--card-2);
  border-color: var(--border-strong);
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.form-check-input { border-color: var(--border-strong); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: var(--ring); }

.required::after { content: ' *'; color: var(--neg); }

/* ---------------------------------------------------------------
   12. DROPDOWN / MODAL / ALERT / PAGINATION
   --------------------------------------------------------------- */
.dropdown-menu {
  padding: 7px;
  font-size: .8438rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: .5rem .7rem;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-weight: 500;
  transition: var(--t);
}
.dropdown-item:hover,
.dropdown-item:focus { background: var(--brand-soft); color: var(--brand-dark); }
.dropdown-item.text-danger:hover { background: var(--neg-soft); color: var(--neg); }
.dropdown-divider { border-color: var(--border); margin: 6px 0; }

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.modal-header,
.modal-footer { border-color: var(--border); }
.modal-header { padding: 16px 22px; }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 20px 22px; }
.modal-footer { padding: 14px 22px; }
.modal-backdrop.show { opacity: .5; }

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: .75rem 1rem;
  font-size: .8438rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
}
.alert > i { font-size: 1.0625rem; flex: 0 0 auto; }
.alert-light { background: var(--card-2); border-color: var(--border); color: var(--text-2); }
.alert-danger { background: var(--neg-soft); border-color: var(--neg-line); color: var(--neg); }
.alert-warning { background: var(--warn-soft); border-color: var(--warn-line); color: var(--warn); }
.alert-success { background: var(--pos-soft); border-color: var(--pos-line); color: var(--pos); }
.alert-info { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-dark); }

.pagination { gap: 5px; }
.pagination .page-link {
  min-width: 34px;
  text-align: center;
  padding: .35rem .6rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-xs);
  transition: var(--t);
}
.pagination .page-link:hover { background: var(--brand-soft); color: var(--brand-dark); border-color: var(--brand-line); }
.pagination .page-item.active .page-link {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: var(--shadow-brand);
}
.pagination .page-item.disabled .page-link { background: var(--card-2); color: var(--muted-2); opacity: .7; box-shadow: none; }

/* ---------------------------------------------------------------
   13. PROGRESS
   --------------------------------------------------------------- */
.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  overflow: hidden;
}
.progress-bar {
  border-radius: var(--radius-pill);
  transition: width .6s var(--ease);
}
.progress-lg { height: 12px; }
.bg-success { background: linear-gradient(90deg, #16a34a, #22c55e) !important; }
.bg-warning { background: linear-gradient(90deg, #d97706, #f59e0b) !important; }
.bg-danger { background: linear-gradient(90deg, #dc2626, #ef4444) !important; }

/* ---------------------------------------------------------------
   14. AUTH (split premium)
   --------------------------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background:
    radial-gradient(1000px 480px at 8% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 62%),
    radial-gradient(820px 400px at 102% 4%, color-mix(in srgb, #7c3aed 10%, transparent), transparent 58%),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border-radius: 26px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 40px 90px -50px rgba(16, 24, 40, .55), 0 2px 8px rgba(16, 24, 40, .05);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: clamp(26px, 3.4vw, 40px);
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(620px 300px at 88% -20%, rgba(255, 255, 255, .20), transparent 62%),
    linear-gradient(150deg, #0a6bff 0%, #0050cc 58%, #0b3fa6 100%);
}
.auth-aside::before,
.auth-aside::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  pointer-events: none;
}
.auth-aside::before { width: 260px; height: 260px; right: -80px; top: -90px; }
.auth-aside::after { width: 200px; height: 200px; left: -70px; bottom: -100px; }

.auth-aside > * { position: relative; z-index: 1; }
.auth-aside .aa-brand { display: flex; align-items: center; gap: 12px; }
.auth-aside .aa-brand .brand-mark { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.auth-aside .aa-brand .brand-mark::after { border-color: rgba(255, 255, 255, .25); }
.auth-aside .aa-brand strong { display: block; font-size: .9375rem; font-weight: 600; }
.auth-aside .aa-brand small { display: block; font-size: .7188rem; color: rgba(255, 255, 255, .80); }

.auth-aside h2 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.3;
  color: #fff;
}
.auth-aside p { margin: 0; max-width: 40ch; font-size: .8125rem; line-height: 1.65; color: rgba(255, 255, 255, .84); }

.auth-points { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 11px; }
.auth-points li { display: flex; align-items: center; gap: 11px; font-size: .8125rem; color: rgba(255, 255, 255, .92); }
.auth-points i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 10px;
  font-size: .95rem;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

.auth-aside .aa-foot { font-size: .7188rem; color: rgba(255, 255, 255, .72); }

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 3.4vw, 44px);
  background: var(--card);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth-brand strong { font-size: .9375rem; font-weight: 600; }
.auth-brand small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.auth-card h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; }
.auth-sub { font-size: .8125rem; color: var(--muted); }

/* ---------------------------------------------------------------
   15. GALLERY
   --------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 16px;
}
.gallery-item {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--t);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.gallery-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--card-3);
  cursor: zoom-in;
  transition: var(--t);
}
.gallery-item:hover .gallery-thumb { transform: scale(1.03); }
.gallery-body { padding: 12px 14px 14px; }
.gallery-title { margin: 0 0 3px; font-size: .8125rem; font-weight: 600; color: var(--text); }
.gallery-meta { font-size: .7188rem; color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------
   16. MISC
   --------------------------------------------------------------- */
.empty-state { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-state > i {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 20px;
  font-size: 1.7rem;
  color: var(--brand);
  background: linear-gradient(150deg, var(--brand-soft), color-mix(in srgb, var(--brand) 4%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent);
}
.empty-state p { margin: 0; font-size: .8125rem; }

.section-title { margin: 0; font-size: .9375rem; font-weight: 600; }

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

.receipt-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transition: var(--t);
}
.receipt-thumb:hover { border-color: var(--brand); transform: scale(1.05); box-shadow: var(--shadow); }

.offcanvas-body .sidebar-section:first-child { padding-top: 6px; }

/* SweetAlert2 selaras tema */
.swal2-popup {
  font-family: var(--font) !important;
  border-radius: var(--radius) !important;
  border: 1px solid var(--border);
  background: var(--card) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-lg) !important;
}
.swal2-title { font-size: 1.0625rem !important; font-weight: 600 !important; color: var(--text) !important; }
.swal2-html-container { font-size: .875rem !important; color: var(--muted) !important; }
.swal2-confirm,
.swal2-cancel {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font) !important;
  font-size: .8438rem !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
.swal2-confirm { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)) !important; }
.swal2-cancel { background: var(--card-2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; }

/* Bootstrap parity untuk dark mode */
html[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.7); }
html[data-bs-theme="dark"] .offcanvas { --bs-offcanvas-bg: var(--card); --bs-offcanvas-color: var(--text); --bs-offcanvas-border-color: var(--border); }
html[data-bs-theme="dark"] .table { --bs-table-striped-bg: var(--card-2); }
html[data-bs-theme="dark"] .form-select { color-scheme: dark; }
html[data-bs-theme="dark"] .dropdown-menu { --bs-dropdown-bg: var(--card); --bs-dropdown-link-color: var(--text-2); }

/* ---------------------------------------------------------------
   17. RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .hero { grid-template-columns: 1fr; }
  .hero-panel { max-width: 420px; }
}

/* ---------------------------------------------------------------
   27. SIDEBAR COLLAPSE — bisa dikecilkan / diperbesar
   --------------------------------------------------------------- */
:root { --sidebar-w: 272px; --sidebar-rail: 76px; }

/* tombol toggle di dalam sidebar */
.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: -13px;
  z-index: 5;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--muted);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: var(--t);
}
.sidebar-toggle:hover { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
.sidebar-toggle .i { width: 14px; height: 14px; transition: transform .25s var(--ease); }

/* ---- keadaan mengecil (rail) ---- */
html[data-sidebar="rail"] { --sidebar-w: var(--sidebar-rail); }
html[data-sidebar="rail"] .sidebar { width: var(--sidebar-w); align-items: center; padding-inline: 0; }
html[data-sidebar="rail"] .sidebar-brand { justify-content: center; padding-inline: 0; }
html[data-sidebar="rail"] .sidebar-brand .brand-text { display: none; }
html[data-sidebar="rail"] .sidebar-nav { align-items: center; padding-inline: 0; }
html[data-sidebar="rail"] .sidebar-nav .sidebar-section { display: none; }
html[data-sidebar="rail"] .sidebar-nav .nav-link {
  justify-content: center; width: 46px; height: 46px; padding: 0;
  border-radius: 13px; margin-inline: auto;
}
html[data-sidebar="rail"] .sidebar-nav .nav-link span { display: none; }
html[data-sidebar="rail"] .sidebar-nav .nav-link.active::after { display: none; }
html[data-sidebar="rail"] .sidebar-footer { align-items: center; padding-inline: 0; }
html[data-sidebar="rail"] .sidebar-footer > div { flex-direction: column; gap: 8px; justify-content: center; }
html[data-sidebar="rail"] .sidebar-footer #sideAcct,
html[data-sidebar="rail"] .sidebar-footer #sidePhone { display: none; }
html[data-sidebar="rail"] .sidebar-toggle .i { transform: rotate(180deg); }

/* tooltip saat rail */
html[data-sidebar="rail"] .sidebar-nav .nav-link { position: relative; }
html[data-sidebar="rail"] .sidebar-nav .nav-link::before {
  content: attr(data-label);
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%) translateX(-4px);
  padding: 5px 10px; border-radius: 8px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
  color: #fff; background: #0f1726;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; z-index: 1200;
  transition: opacity .15s, transform .15s;
}
html[data-sidebar="rail"] .sidebar-nav .nav-link:hover::before {
  opacity: 1; transform: translateY(-50%) translateX(0);
}

/* transisi halus */
.sidebar { transition: width .25s var(--ease), padding .25s var(--ease); }
.app-main { transition: margin-left .25s var(--ease); }

/* ---- MOBILE: sidebar tersembunyi total, muncul saat diklik ---- */
@media (max-width: 991.98px) {
  .app-shell { display: block; }
  .app-main { margin-left: 0 !important; width: 100%; min-width: 0; }
  html[data-sidebar="full"] .app-main,
  html[data-sidebar="rail"] .app-main { margin-left: 0 !important; }

  /* sidebar = panel geser dari kiri, default TERSEMBUNYI */
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 272px;
    max-width: 84vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 12px 12px;
    border-right: 1px solid var(--border);
    background: var(--card);
    z-index: 1040;
    transform: translateX(-104%);
    transition: transform .28s var(--ease), box-shadow .28s var(--ease);
    box-shadow: none;
    overflow-y: auto;
  }

  /* state terbuka */
  html[data-sidebar="open"] .sidebar {
    transform: translateX(0);
    box-shadow: 0 0 0 100vmax rgba(8, 14, 26, .45), 24px 0 60px -30px rgba(0,0,0,.55);
  }

  /* label selalu tampil saat panel terbuka */
  .sidebar-brand { height: auto; padding: 0 6px 16px; border-bottom: 0; justify-content: flex-start; }
  .sidebar-brand .brand-text { display: block; }

  .sidebar-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 0; margin: 0; flex: 1 1 auto; overflow: visible; width: 100%;
  }
  .sidebar-nav .sidebar-section { display: flex; }
  .sidebar-nav .nav-link {
    justify-content: flex-start; width: 100%; height: auto;
    padding: 10px 12px; margin: 0; border-radius: var(--radius-sm);
  }
  .sidebar-nav .nav-link span { display: inline; }
  .sidebar-nav .nav-link i.i { width: 20px; height: 20px; flex: 0 0 20px; }
  .sidebar-nav .nav-link.active::after { display: block; }
  .sidebar-nav .nav-link:hover { transform: none; }

  .sidebar-footer {
    padding: 12px 0 0; border-top: 1px solid var(--border); background: transparent;
    width: 100%; display: block;
  }
  .sidebar-footer > div { flex-direction: row !important; gap: 10px !important; justify-content: flex-start; }
  .sidebar-footer .mono, .sidebar-footer #sideAcct, .sidebar-footer #sidePhone { display: block; }
  .sidebar-footer .avatar { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; font-size: .75rem; }

  /* toggle di dalam panel: tombol tutup */
  .sidebar-toggle { top: 16px; right: 10px; position: absolute; }
  .sidebar-toggle .i { transform: rotate(180deg); }

  .app-topbar { display: flex; }
  .mobile-head { display: none !important; }
  .app-content { padding-top: 18px; padding-inline: 16px; }
  .app-footer { padding-inline: 16px; }
}

/* tombol buka sidebar (hanya mobile) */
.sb-open {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  padding: 0;
  transition: var(--t);
}
.sb-open:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.sb-open svg { width: 24px; height: 24px; display: block; }

@media (max-width: 991.98px) {
  .sb-open { display: inline-flex; }
}

/* ---------------------------------------------------------------
   28. MOBILE TOPBAR — judul tidak boleh terpotong
   --------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .app-topbar {
    gap: 8px;
    padding-inline: 14px;
    min-height: 60px;
  }
  .topbar-title { flex: 1 1 auto; min-width: 0; }
  .topbar-title h1 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .topbar-title small { display: none; }

  /* badge rate dipersingkat di layar kecil */
  #pillRate { font-size: .625rem; padding: .3em .55em; flex: 0 0 auto; }
  #pillRate .dot { width: 6px; height: 6px; margin-right: 5px; }

  .app-topbar .btn-icon { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; }
  .app-topbar .btn-icon .i { width: 16px; height: 16px; }
}

@media (max-width: 420px) {
  .app-topbar { padding-inline: 12px; gap: 6px; }
  .topbar-title h1 { font-size: .9375rem; }
  /* sembunyikan badge rate di layar sangat kecil, info ada di beranda */
  #pillRate { display: none; }
}

/* hero lebih lega di layar sempit */
@media (max-width: 991.98px) {
  .hero { padding: 18px; gap: 16px; border-radius: 18px; }
  .hero h1 { font-size: 1.125rem; line-height: 1.3; }
  .hero p { font-size: .7812rem; line-height: 1.6; }
  .hero-panel { padding: 14px; border-radius: 15px; }
  .hero-panel .hp-value { font-size: 1.0625rem; }
}
@media (max-width: 520px) {
  .hero-actions { gap: 6px; }
  .hero-chip { font-size: .7188rem; padding: 7px 12px; }
}

/* ---------------------------------------------------------------
   19. GETCONTACT CONSOLE — komponen tambahan
   --------------------------------------------------------------- */
.stat-card.q-low::before { background: linear-gradient(90deg, #d97706, #f59e0b); opacity: 1; }
.stat-card.q-out::before { background: linear-gradient(90deg, #dc2626, #ef4444); opacity: 1; }
.stat-card.q-low .stat-icon { color: var(--warn); background: linear-gradient(150deg, var(--warn-soft), var(--card)); box-shadow: inset 0 0 0 1px var(--warn-line); }
.stat-card.q-out .stat-icon { color: var(--neg); background: linear-gradient(150deg, var(--neg-soft), var(--card)); box-shadow: inset 0 0 0 1px var(--neg-line); }
.stat-meter { margin-top: 9px; height: 5px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--muted) 20%, transparent); overflow: hidden; }
.stat-meter > span { display: block; height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, #16a34a, #22c55e); transition: width .6s var(--ease); }
.stat-card.q-low .stat-meter > span { background: linear-gradient(90deg, #d97706, #f59e0b); }
.stat-card.q-out .stat-meter > span { background: linear-gradient(90deg, #dc2626, #ef4444); }

.searchbar { display: flex; gap: 10px; flex-wrap: wrap; }
.searchbar .form-control { flex: 1 1 240px; min-width: 0; font-family: var(--mono); font-size: .875rem; letter-spacing: .01em; }
.searchbar .form-select { flex: 0 0 auto; min-width: 150px; }

.profile-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px; border-radius: var(--radius-md); background: linear-gradient(150deg, var(--brand-tint), var(--card)); border: 1px solid var(--border); }
.profile-avatar { width: 62px; height: 62px; flex: 0 0 62px; border-radius: 20px; display: grid; place-items: center; overflow: hidden; font-size: 1.5rem; font-weight: 600; color: #fff; background: linear-gradient(140deg, var(--grad-a), var(--grad-b)); box-shadow: 0 12px 24px -12px rgba(0,109,240,.9), inset 0 1px 0 rgba(255,255,255,.3); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-meta { flex: 1 1 180px; min-width: 0; }
.profile-name { font-size: 1.125rem; font-weight: 600; letter-spacing: -.025em; line-height: 1.25; }
.profile-num { font-family: var(--mono); font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.profile-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-radius: var(--radius-pill); font-size: .8125rem; font-weight: 500; background: var(--card-2); border: 1px solid var(--border); color: var(--text-2); transition: var(--t); }
.tag-pill:hover { border-color: var(--brand-line); background: var(--brand-tint); color: var(--brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.tag-pill .cnt { font-family: var(--mono); font-size: .6875rem; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-pill); background: var(--brand-soft); color: var(--brand); }
.tag-pill .cnt.hot { background: var(--warn-soft); color: var(--warn); }

.captcha-panel { margin-top: 16px; padding: 18px; border-radius: var(--radius-md); background: var(--warn-soft); border: 1px solid var(--warn-line); }
.captcha-panel h4 { margin: 0 0 4px; font-size: .875rem; font-weight: 600; color: var(--warn); display: flex; align-items: center; gap: 8px; }
.captcha-panel .cap-sub { font-size: .7812rem; color: var(--text-2); margin-bottom: 14px; }
.captcha-img-box { display: inline-block; padding: 8px; margin-bottom: 14px; line-height: 0; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--warn-line); box-shadow: var(--shadow-xs); }
.captcha-img-box img { display: block; width: 240px; max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 6px; }
.captcha-form { display: flex; gap: 8px; flex-wrap: wrap; }
.captcha-form .form-control { flex: 1 1 140px; max-width: 200px; font-family: var(--mono); font-size: 1rem; letter-spacing: .12em; }

.hist-list { display: flex; flex-direction: column; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--t); font-size: .8438rem; border-bottom: 1px solid var(--border); }
.hist-row:last-child { border-bottom: 0; }
.hist-row:hover { background: var(--brand-tint); }
.hist-row .h-phone { font-family: var(--mono); font-size: .8125rem; color: var(--text-2); flex: 0 0 auto; }
.hist-row .h-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hist-row .h-time { font-size: .7188rem; color: var(--muted); flex: 0 0 auto; }

.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 1090; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 44px)); }
.toast-item { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: .8438rem; color: var(--text); animation: toastIn .28s var(--ease); }
.toast-item.out { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }
.toast-item .ti { flex: 0 0 18px; font-size: 1rem; line-height: 1.3; }
.toast-item.ok { border-color: var(--pos-line); background: var(--pos-soft); }
.toast-item.ok .ti { color: var(--pos); }
.toast-item.err { border-color: var(--neg-line); background: var(--neg-soft); }
.toast-item.err .ti { color: var(--neg); }
.toast-item.warn { border-color: var(--warn-line); background: var(--warn-soft); }
.toast-item.warn .ti { color: var(--warn); }

.sk { background: linear-gradient(90deg, color-mix(in srgb, var(--muted) 10%, transparent), color-mix(in srgb, var(--muted) 20%, transparent), color-mix(in srgb, var(--muted) 10%, transparent)); background-size: 200% 100%; animation: skShine 1.4s infinite; border-radius: 6px; }
@keyframes skShine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sp .65s linear infinite; vertical-align: -2px; margin-right: 7px; }
@keyframes sp { to { transform: rotate(360deg); } }

.theme-toggle .ic-sun, .theme-toggle .ic-moon { font-size: 1.0625rem; line-height: 1; }
html[data-bs-theme="dark"] .theme-toggle .i-sun { display: inline-block; }
html[data-bs-theme="dark"] .theme-toggle .i-moon { display: none; }
html:not([data-bs-theme="dark"]) .theme-toggle .i-sun { display: none; }
html:not([data-bs-theme="dark"]) .theme-toggle .i-moon { display: inline-block; }

.stack-sm > * + * { margin-top: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------
   20. DARK-MODE REFINEMENT
   --------------------------------------------------------------- */
html[data-bs-theme="dark"] .hero { background: radial-gradient(760px 320px at 88% -30%, rgba(255,255,255,.10), transparent 62%), linear-gradient(125deg, #1b4fae 0%, #123a86 62%, #0d2a63 100%); box-shadow: 0 28px 56px -34px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.10); }
html[data-bs-theme="dark"] .hero p { color: rgba(255,255,255,.90); text-shadow: none; }
html[data-bs-theme="dark"] .hero-eyebrow { background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
html[data-bs-theme="dark"] .hero-panel { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
html[data-bs-theme="dark"] .hero-chip { background: rgba(255,255,255,.09); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
html[data-bs-theme="dark"] .hero-chip.is-solid { background: #eaf2ff; color: #0d2a63; }
html[data-bs-theme="dark"] .stat-meter { background: rgba(255,255,255,.10); }

/* ---------------------------------------------------------------
   21. MOBILE HEAD
   --------------------------------------------------------------- */
.mobile-head { display: none; }

/* ---------------------------------------------------------------
   22-23. FORM + LOGIN RESPONSIVE
   --------------------------------------------------------------- */
.login-shell { max-width: min(1000px, 100%); }
.login-card { min-width: 0; }
.login-card form, .login-card .field-group, .login-card .input-wrap { min-width: 0; width: 100%; }
.login-card .input-wrap .form-control { width: 100%; max-width: 100%; display: block; }
.login-card #password { padding-right: 64px; }
.btn-login { width: 100%; display: flex; }

@media (max-width: 860px) {
  .login-wrap { padding: 14px; align-items: flex-start; padding-top: 24px; }
  .login-shell { max-width: 100%; border-radius: 20px; }
  .login-card { padding: 26px 20px 24px; }
  .lc-head h1 { font-size: 1.25rem; }
}
@media (max-width: 420px) {
  .login-wrap { padding: 10px; padding-top: 18px; }
  .login-shell { border-radius: 18px; }
  .login-card { padding: 22px 16px 20px; }
  .lc-head { margin-bottom: 18px; }
  .lc-head .lc-brand { margin-bottom: 16px; }
  .lc-head h1 { font-size: 1.125rem; }
  .lc-head p { font-size: .7812rem; }
  .field-group label { font-size: .75rem; }
  .login-card .input-wrap .form-control { min-height: 44px; font-size: .875rem; }
  .input-wrap .in-ic { left: 11px; font-size: .875rem; }
  .login-card .input-wrap .form-control { padding-left: 36px; }
  .login-card #password { padding-right: 60px; }
  .input-wrap .toggle-pw { font-size: .75rem; padding: 5px 7px; right: 6px; }
  .row-between { margin-bottom: 16px; }
  .check-line { font-size: .75rem; }
  .btn-login { min-height: 46px; font-size: .875rem; }
  .lc-foot { margin-top: 20px; padding-top: 14px; font-size: .6875rem; }
}
@media (max-width: 320px) {
  .login-card { padding: 18px 13px 16px; }
  .lc-head h1 { font-size: 1.0625rem; }
  .login-card .input-wrap .form-control { padding-left: 33px; font-size: .8125rem; }
  .login-card #password { padding-right: 56px; }
}
@media (max-width: 991.98px) {
  .login-card .input-wrap .form-control, .login-card #username, .login-card #password { font-size: 16px !important; }
  .searchbar .form-control, .captcha-form .form-control { font-size: 16px !important; }
}
.login-card .check-line { min-height: 44px; padding: 6px 0; display: inline-flex; align-items: center; }
.login-card .check-line input { width: 18px; height: 18px; flex: 0 0 18px; }
.login-card .lc-head p { color: var(--text-2); }
.login-card .lc-foot { color: var(--muted); }
.login-card .field-group label { color: var(--text-2); }
.input-wrap .toggle-pw { color: var(--muted); }

/* ---------------------------------------------------------------
   24. LOGO
   --------------------------------------------------------------- */
.sidebar-brand .brand-mark { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: block; object-fit: contain; padding: 0; background: transparent; box-shadow: none; }
.sidebar-brand .brand-mark::after { display: none; }
.brand-mark[src] { font-size: 0; }
svg.brand-mark { display: block; shape-rendering: geometricPrecision; overflow: visible; }
.login-aside svg.brand-mark { width: 44px; height: 44px; }
.login-card svg.brand-mark { width: 38px; height: 38px; }
svg.brand-mark, .login-aside svg.brand-mark, .login-card svg.brand-mark,
.la-brand svg.brand-mark, .lc-head .lc-brand svg.brand-mark, .sidebar-brand svg.brand-mark {
  background: transparent !important; box-shadow: none !important; padding: 0 !important;
  border: 0 !important; filter: none !important; border-radius: 0 !important;
}
html[data-bs-theme="dark"] svg.brand-mark { background: transparent !important; box-shadow: none !important; }

/* ---------------------------------------------------------------
   25. IKON SVG
   --------------------------------------------------------------- */
.nav-link .i { font-size: 1.05rem; }
.sidebar-nav .nav-link i.i { width: 20px; height: 20px; flex: 0 0 20px; text-align: center; }
.sidebar-nav .nav-link.active i.i { color: #fff; }
.btn-icon .i { width: 18px; height: 18px; }
.hero-eyebrow .i { width: 15px; height: 15px; }
.hero-chip .i { width: 15px; height: 15px; }
.hp-label .i { width: 14px; height: 14px; }
.card-header > i.i:first-child { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--brand); background: var(--brand-soft); }
.card-header > i.i:first-child.i { width: 30px; height: 30px; }
.stat-icon .i { width: 20px; height: 20px; }
.empty-state .i { color: var(--brand); }
.btn .i { width: 1em; height: 1em; }
.toast-item .ti { display: inline-flex; align-items: center; justify-content: center; }
.toast-item .ti .i { width: 16px; height: 16px; }
.la-points .pt-ic .i { width: 16px; height: 16px; }
.input-wrap .in-ic .i { width: 17px; height: 17px; }
.input-wrap .in-ic { display: inline-flex; align-items: center; }
.alert-line .i { width: 16px; height: 16px; }
.alert-line > span:first-child { display: inline-flex; align-items: center; }
html:not([data-bs-theme="dark"]) .theme-toggle .i-sun,
html[data-bs-theme="dark"] .theme-toggle .i-moon { display: none; }
html:not([data-bs-theme="dark"]) .theme-toggle .i-moon,
html[data-bs-theme="dark"] .theme-toggle .i-sun { display: inline-block; }
#mTheme .i-sun, #mTheme .i-moon { width: 17px; height: 17px; }

/* ---------------------------------------------------------------
   26. HALAMAN TERPISAH
   --------------------------------------------------------------- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.action-card { text-decoration: none; color: inherit; display: block; }
.action-card .card-body { padding: 20px 22px 18px; }
.action-card .stat-icon { position: static; margin-bottom: 14px; }
.action-card .ac-title { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.action-card .ac-desc { margin-top: 4px; font-size: .8125rem; line-height: 1.55; color: var(--muted); min-height: 2.6em; }
.action-card .ac-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: .8125rem; font-weight: 600; color: var(--brand); }
.action-card .ac-link .i { width: 14px; height: 14px; transition: var(--t); }
.action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-line); }
.action-card:hover .ac-link .i { transform: translateX(3px); }

.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; margin: 16px 0 0; font-size: .8438rem; }
.kv-grid dt { color: var(--muted); font-size: .7812rem; }
.kv-grid dd { margin: 0; min-width: 0; word-break: break-word; }
.kv-grid dd.muted { color: var(--muted); }
.kv-grid .na { color: var(--muted-2); font-style: italic; }

.quota-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qc { display: inline-flex; align-items: baseline; gap: 5px; padding: 6px 12px; border-radius: var(--radius-pill); font-size: .75rem; font-weight: 500; background: var(--card-2); border: 1px solid var(--border); color: var(--muted); }
.qc b { font-family: var(--mono); font-size: .875rem; font-weight: 700; color: var(--pos); }
.qc.low b { color: var(--warn); }
.qc.low { border-color: var(--warn-line); background: var(--warn-soft); }
.qc.out b { color: var(--neg); }
.qc.out { border-color: var(--neg-line); background: var(--neg-soft); }
.qc .qc-of { font-size: .6875rem; color: var(--muted-2); font-weight: 500; }

a.hist-row { text-decoration: none; color: inherit; }
a.hist-row:hover { background: var(--brand-tint); }
.hist-row .i { flex: 0 0 auto; }

@media (max-width: 767.98px) {
  .home-grid { grid-template-columns: 1fr; gap: 12px; }
  .action-card .card-body { padding: 16px; }
  .action-card .ac-desc { min-height: 0; }
  .kv-grid { grid-template-columns: 1fr; gap: 2px 0; }
  .kv-grid dt { margin-top: 8px; }
  .kv-grid dt:first-child { margin-top: 0; }
  .quota-chips { gap: 6px; }
  .qc { font-size: .6875rem; padding: 5px 10px; }
  .qc .qc-of { font-size: .625rem; }
  .searchbar { flex-direction: column; }
  .searchbar .form-control, .searchbar .form-select, .searchbar .btn { width: 100%; flex: 1 1 auto; min-width: 0; }
  .card-header { padding: 13px 15px; }
  .card-body { padding: 15px; }
  .profile-hero { padding: 14px; gap: 12px; }
  .profile-avatar { width: 48px; height: 48px; flex-basis: 48px; border-radius: 15px; font-size: 1.125rem; }
  .tag-pill { font-size: .75rem; padding: 5px 7px 5px 10px; }
  .captcha-form .form-control { max-width: none; flex: 1 1 100%; }
  .captcha-form .btn { flex: 1 1 auto; }
  .hist-row { padding: 9px 8px; gap: 8px; font-size: .7812rem; }
  .hist-row .h-time { font-size: .6563rem; }
  .toast-stack { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .toast-item { font-size: .8125rem; padding: 11px 13px; }
  .app-footer { font-size: .6563rem; padding-block: 12px; }
  .app-footer .mono { display: none; }
  #quotaRow { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-card .card-body { padding: 14px !important; min-height: 0 !important; }
  .stat-icon { width: 34px !important; height: 34px !important; border-radius: 10px !important; font-size: .95rem !important; top: 12px !important; right: 12px !important; }
  .stat-label { font-size: .625rem !important; max-width: calc(100% - 40px) !important; min-height: 0 !important; }
  .stat-value { font-size: .9375rem !important; padding-right: 40px !important; }
  .stat-value span { font-size: .6875rem !important; }
  .stat-sub { font-size: .6563rem !important; }
  .stat-meter { height: 4px; margin-top: 7px; }
}
@media (max-width: 400px) {
  #quotaRow { grid-template-columns: 1fr !important; }
}


/* ---------------------------------------------------------------
   29. DESKTOP rail state (data-sidebar="rail")
   --------------------------------------------------------------- */
@media (min-width: 992px) {
  html[data-sidebar="rail"] { --sidebar-w: 76px; }
  html[data-sidebar="rail"] .sidebar { width: var(--sidebar-w); align-items: center; padding-inline: 0; }
  html[data-sidebar="rail"] .sidebar-brand { justify-content: center; padding-inline: 0; }
  html[data-sidebar="rail"] .sidebar-brand .brand-text { display: none; }
  html[data-sidebar="rail"] .sidebar-nav { align-items: center; padding-inline: 0; }
  html[data-sidebar="rail"] .sidebar-nav .sidebar-section { display: none; }
  html[data-sidebar="rail"] .sidebar-nav .nav-link {
    justify-content: center; width: 46px; height: 46px; padding: 0;
    border-radius: 13px; margin-inline: auto;
  }
  html[data-sidebar="rail"] .sidebar-nav .nav-link span { display: none; }
  html[data-sidebar="rail"] .sidebar-nav .nav-link.active::after { display: none; }
  html[data-sidebar="rail"] .sidebar-footer { align-items: center; padding-inline: 0; }
  html[data-sidebar="rail"] .sidebar-footer > div { flex-direction: column; gap: 8px; justify-content: center; }
  html[data-sidebar="rail"] .sidebar-footer #sideAcct,
  html[data-sidebar="rail"] .sidebar-footer #sidePhone { display: none; }
  html[data-sidebar="rail"] .sidebar-toggle .i { transform: rotate(180deg); }

  html[data-sidebar="rail"] .sidebar-nav .nav-link { position: relative; }
  html[data-sidebar="rail"] .sidebar-nav .nav-link::before {
    content: attr(data-label);
    position: absolute; left: calc(100% + 10px); top: 50%;
    transform: translateY(-50%) translateX(-4px);
    padding: 5px 10px; border-radius: 8px;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
    color: #fff; background: #0f1726;
    box-shadow: 0 6px 16px -6px rgba(0,0,0,.5);
    opacity: 0; pointer-events: none; z-index: 1200;
    transition: opacity .15s, transform .15s;
  }
  html[data-sidebar="rail"] .sidebar-nav .nav-link:hover::before {
    opacity: 1; transform: translateY(-50%) translateX(0);
  }
}


/* ---------------------------------------------------------------
   30. GANTI SANDI
   --------------------------------------------------------------- */
.field-group { margin-bottom: 15px; }
.field-group label {
  display: block; margin-bottom: .38rem;
  font-size: .7812rem; font-weight: 500; color: var(--text-2);
}
.input-wrap { position: relative; }
.input-wrap .in-ic {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: .95rem; color: var(--muted-2); pointer-events: none;
  display: inline-flex; align-items: center;
}
.input-wrap .form-control {
  padding-left: 40px;
  padding-right: 74px;
  min-height: 46px;
  font-size: .875rem;
}
.input-wrap .toggle-pw {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; padding: 6px 8px; border-radius: 8px;
  font-size: .8125rem; font-weight: 500; line-height: 1;
  transition: var(--t);
}
.input-wrap .toggle-pw:hover { color: var(--brand); background: var(--brand-soft); }

/* meter kekuatan */
.pw-meter {
  height: 4px; margin-top: 8px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--muted) 18%, transparent);
  overflow: hidden;
}
.pw-meter > span {
  display: block; height: 100%; width: 0;
  border-radius: var(--radius-pill);
  background: var(--neg);
  transition: width .3s var(--ease), background .3s var(--ease);
}
.pw-meter > span.lv0 { background: #dc2626; }
.pw-meter > span.lv1 { background: #f59e0b; }
.pw-meter > span.lv2 { background: #eab308; }
.pw-meter > span.lv3 { background: #22c55e; }
.pw-meter > span.lv4 { background: #16a34a; }

.pw-hint { margin-top: 6px; font-size: .7188rem; color: var(--muted); }
.pw-hint.ok { color: var(--pos); }
.pw-hint.bad { color: var(--neg); }

/* alert di halaman sandi */
.alert-line {
  display: none; align-items: center; gap: 9px;
  margin-bottom: 16px; padding: .7rem .9rem;
  font-size: .8125rem; border-radius: var(--radius-sm);
  background: var(--neg-soft); border: 1px solid var(--neg-line); color: var(--neg);
}
.alert-line.show { display: flex; }
.alert-line.ok { background: var(--pos-soft); border-color: var(--pos-line); color: var(--pos); }
.alert-line.err { background: var(--neg-soft); border-color: var(--neg-line); color: var(--neg); }

/* link aksi di halaman akun */
.acct-links { display: flex; flex-direction: column; gap: 2px; }
.acct-link-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px; text-decoration: none; color: inherit;
  border-bottom: 1px solid var(--border); transition: var(--t);
}
.acct-link-row:last-child { border-bottom: 0; }
.acct-link-row:hover { background: var(--brand-tint); border-radius: var(--radius-sm); padding-inline: 10px; }
.acct-link-row .ic-box {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--brand); background: var(--brand-soft);
}
.acct-link-row .ic-box .i { width: 17px; height: 17px; }
.acct-link-row .txt { flex: 1 1 auto; min-width: 0; }
.acct-link-row .txt b { display: block; font-size: .8438rem; font-weight: 600; color: var(--text); }
.acct-link-row .txt span { font-size: .75rem; color: var(--muted); }
.acct-link-row .i-chevron-right { width: 15px; height: 15px; color: var(--muted-2); flex: 0 0 15px; }

@media (max-width: 991.98px) {
  .input-wrap .form-control { font-size: 16px !important; }
}
