/* =========================================================
   Catat Digital — Design System
   Tema: gradient indigo/violet, kartu glassmorphic, modern & lembut
   ========================================================= */
:root {
  --indigo: #4F46E5;
  --violet: #8B5CF6;
  --indigo-600: #4338CA;
  --violet-soft: #A78BFA;
  --sky: #38BDF8;
  --pink: #F472B6;

  --bg: #F3F0FF;
  --bg-2: #FBFAFF;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-solid: #FFFFFF;
  --surface-strong: rgba(255, 255, 255, 0.86);
  --line: rgba(79, 70, 229, 0.14);
  --line-strong: rgba(79, 70, 229, 0.26);

  --ink: #1F1B3A;
  --ink-soft: #3B3757;
  --muted: #635F82;
  --muted-2: #8A87A5;

  --income: #3B82F6;
  --expense: #EF4444;
  --net: #FFFFFF;
  --success: #10B981;
  --warn: #F59E0B;
  --dark-bg: #0F172A;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 10px rgba(31, 27, 58, 0.06);
  --shadow: 0 16px 40px -18px rgba(49, 40, 110, 0.28);
  --shadow-lg: 0 30px 70px -28px rgba(49, 40, 110, 0.42);
  --blur: saturate(180%) blur(20px);

  --gap: 20px;
  --section: 44px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --header-h: 68px;
}

html[data-theme='dark'] {
  --bg: #0F172A;
  --bg-2: #131C33;
  --surface: rgba(30, 41, 59, 0.62);
  --surface-solid: #1B2440;
  --surface-strong: rgba(30, 41, 59, 0.9);
  --line: rgba(148, 163, 255, 0.16);
  --line-strong: rgba(148, 163, 255, 0.32);
  --ink: #EEF0FF;
  --ink-soft: #D6DAF5;
  --muted: #A5ADD0;
  --muted-2: #8B93B8;
  --net: #FFFFFF;
  --shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.65);
  --shadow-lg: 0 34px 80px -30px rgba(0, 0, 0, 0.75);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(139, 92, 246, 0.28), transparent 62%),
    radial-gradient(760px 460px at 96% 4%, rgba(56, 189, 248, 0.22), transparent 60%),
    radial-gradient(720px 520px at 60% 100%, rgba(244, 114, 182, 0.16), transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg) 100%);
  pointer-events: none;
}
html[data-theme='dark'] body::before {
  background:
    radial-gradient(900px 520px at 8% -5%, rgba(99, 102, 241, 0.26), transparent 62%),
    radial-gradient(760px 460px at 96% 4%, rgba(56, 189, 248, 0.16), transparent 60%),
    radial-gradient(700px 520px at 60% 100%, rgba(139, 92, 246, 0.16), transparent 65%),
    linear-gradient(180deg, #0F172A 0%, #101830 60%, #0F172A 100%);
}
img { max-width: 100%; display: block; }
a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--violet); }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.22; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 800; }
h2 { font-size: clamp(22px, 2.8vw, 32px); font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; color: var(--muted); }
small { color: var(--muted); }
::selection { background: rgba(139, 92, 246, 0.25); }

/* ------------------------------- Layout --------------------------------- */
.app-root { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.container-narrow { width: min(880px, 100% - 40px); margin-inline: auto; }
.section { padding: var(--section) 0; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid { display: grid; gap: var(--gap); }
.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)); }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px } .mt-4 { margin-top: 36px }
.mb-0 { margin-bottom: 0 } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.sm { font-size: 13px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.gradient-text {
  background: linear-gradient(120deg, var(--indigo), var(--violet) 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ------------------------------- Splash --------------------------------- */
.boot-splash { min-height: 100vh; display: grid; place-items: center; gap: 14px; text-align: center; color: var(--muted); }
.boot-splash .boot-logo {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff;
  font-size: 26px; box-shadow: var(--shadow); margin: 0 auto 12px; animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1 } 50% { transform: scale(.88); opacity: .72 } }

/* -------------------------------- Cards --------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 22px;
}
.card-tight { padding: 16px; border-radius: var(--radius); }
.card-flat { box-shadow: var(--shadow-sm); }
.card-hover { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.card-sub { font-size: 12.5px; color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: rgba(79, 70, 229, 0.09); color: var(--indigo); font-size: 12px; font-weight: 600;
  border: 1px solid rgba(79, 70, 229, 0.14);
}
.chip-success { background: rgba(16, 185, 129, 0.12); color: #047857; border-color: rgba(16, 185, 129, 0.2); }
.chip-warn { background: rgba(245, 158, 11, 0.14); color: #B45309; border-color: rgba(245, 158, 11, 0.24); }
.chip-danger { background: rgba(239, 68, 68, 0.12); color: #B91C1C; border-color: rgba(239, 68, 68, 0.22); }
.chip-muted { background: rgba(99, 95, 130, 0.1); color: var(--muted); border-color: rgba(99, 95, 130, 0.16); }
.chip-premium { background: linear-gradient(120deg, rgba(79,70,229,.16), rgba(139,92,246,.2)); color: var(--violet); border-color: rgba(139, 92, 246, 0.28); }
html[data-theme='dark'] .chip-success { color: #6EE7B7 }
html[data-theme='dark'] .chip-warn { color: #FCD34D }
html[data-theme='dark'] .chip-danger { color: #FCA5A5 }

/* ------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .18s ease;
  background: var(--surface-strong); color: var(--ink); box-shadow: var(--shadow-sm);
  white-space: nowrap; text-decoration: none; line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); color: var(--ink); }
.btn:active { transform: translateY(0) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(120deg, var(--indigo), var(--violet));
  color: #fff; box-shadow: 0 14px 30px -14px rgba(79, 70, 229, 0.75); border-color: transparent;
}
.btn-primary:hover { color: #fff; box-shadow: 0 18px 36px -14px rgba(79, 70, 229, 0.85); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); box-shadow: none; }
.btn-ghost:hover { background: rgba(79, 70, 229, 0.06); }
.btn-soft { background: rgba(79, 70, 229, 0.1); color: var(--indigo); border-color: rgba(79, 70, 229, 0.16); box-shadow: none; }
.btn-danger { background: rgba(239, 68, 68, 0.12); color: #B91C1C; border-color: rgba(239, 68, 68, 0.25); box-shadow: none; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.18); color: #B91C1C; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { padding: 9px; border-radius: 10px; }
.btn-link { background: none; border: none; color: var(--indigo); padding: 0; box-shadow: none; font-weight: 600; font-size: 13px; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }

/* -------------------------------- Forms --------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72); color: var(--ink); font-size: 14px; font-family: inherit;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
html[data-theme='dark'] .input, html[data-theme='dark'] .select, html[data-theme='dark'] .textarea { background: rgba(15, 23, 42, 0.55); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
  background: #fff;
}
html[data-theme='dark'] .input:focus, html[data-theme='dark'] .select:focus, html[data-theme='dark'] .textarea:focus { background: rgba(15, 23, 42, .85); }
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.check input[type='checkbox'] { width: 17px; height: 17px; accent-color: var(--indigo); margin-top: 1px; flex: 0 0 auto; }
.help { font-size: 12px; color: var(--muted-2); }
.error-text { color: var(--expense); font-size: 12.5px; font-weight: 500; }
.switch { position: relative; width: 44px; height: 25px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; background: rgba(99, 95, 130, 0.28); border-radius: 999px;
  transition: .2s; cursor: pointer;
}
.switch span::after {
  content: ''; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: #fff;
  top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.switch input:checked + span { background: linear-gradient(120deg, var(--indigo), var(--violet)); }
.switch input:checked + span::after { transform: translateX(19px); }

/* ------------------------------- Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  background: rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid var(--line);
}
html[data-theme='dark'] .site-header { background: rgba(15, 23, 42, 0.72); }
.site-header .header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink); letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; font-size: 17px;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, 0.8);
}
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link {
  padding: 8px 13px; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; border: none; background: none; transition: .16s;
}
.nav-link:hover { background: rgba(79, 70, 229, 0.08); color: var(--indigo); }
.nav-link.active { background: rgba(79, 70, 229, 0.12); color: var(--indigo); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--indigo), var(--violet));
  cursor: pointer; border: 2px solid rgba(255, 255, 255, 0.7); flex: 0 0 auto;
}
.menu-pop {
  position: absolute; right: 20px; top: calc(var(--header-h) - 6px); width: 240px;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 80;
}
.menu-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  font-size: 13.5px; color: var(--ink); cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.menu-item:hover { background: rgba(79, 70, 229, 0.08); color: var(--indigo); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ------------------------------- Footer --------------------------------- */
.site-footer { margin-top: auto; padding: 40px 0 26px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.36); }
html[data-theme='dark'] .site-footer { background: rgba(15, 23, 42, 0.4); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-col h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a, .footer-col button { font-size: 13px; color: var(--muted); background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.footer-col a:hover, .footer-col button:hover { color: var(--indigo); }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted-2); }

/* ------------------------------- Landing -------------------------------- */
.hero { padding: 56px 0 32px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: 16px; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { display: flex; gap: 18px; margin-top: 26px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.hero-note span { display: flex; align-items: center; gap: 6px; }
.hero-visual { position: relative; }
.phone {
  width: 100%; max-width: 340px; margin-inline: auto; border-radius: 34px; padding: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.55));
  border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow-lg);
}
html[data-theme='dark'] .phone { background: linear-gradient(160deg, rgba(30,41,59,.9), rgba(15,23,42,.7)); border-color: var(--line); }
.phone-screen { border-radius: 24px; background: var(--bg-2); padding: 16px; min-height: 430px; display: flex; flex-direction: column; gap: 12px; }
html[data-theme='dark'] .phone-screen { background: #0F172A; }
.mock-bar { height: 7px; border-radius: 999px; background: rgba(99, 95, 130, .18); }
.mock-balance { border-radius: 16px; padding: 16px; background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; }
.mock-balance strong { font-size: 22px; display: block; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.72); box-shadow: var(--shadow-sm); }
html[data-theme='dark'] .mock-row { background: rgba(30,41,59,.8); }
.mock-dot { width: 30px; height: 30px; border-radius: 9px; background: rgba(79,70,229,.14); display: grid; place-items: center; font-size: 13px; }
.float-badge {
  position: absolute; padding: 10px 14px; border-radius: 14px; background: var(--surface-solid);
  box-shadow: var(--shadow-lg); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line);
}
.float-badge.one { top: 12%; left: -6%; }
.float-badge.two { bottom: 10%; right: -4%; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px;
  background: linear-gradient(135deg, rgba(79,70,229,.16), rgba(139,92,246,.2)); margin-bottom: 14px;
}
.section-head { max-width: 62ch; margin-bottom: 30px; }
.section-head.center { margin-inline: auto; text-align: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 14px; position: relative; }
.plan.popular { border-color: rgba(139, 92, 246, 0.5); box-shadow: var(--shadow-lg); }
.plan .price { font-size: 32px; font-weight: 800; letter-spacing: -.03em; }
.plan .price small { font-size: 13px; font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; color: var(--muted); }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li::before { content: '✓'; color: var(--success); font-weight: 800; }
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-q { display: flex; justify-content: space-between; gap: 14px; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.faq-a { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.cta-band {
  border-radius: var(--radius-xl); padding: 40px; text-align: center;
  background: linear-gradient(120deg, rgba(79,70,229,.95), rgba(139,92,246,.95));
  color: #fff; box-shadow: var(--shadow-lg);
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { opacity: .88; max-width: 58ch; margin-inline: auto; }
.legal-body { font-size: 14px; color: var(--ink-soft); }
.legal-body h3 { margin-top: 22px; }
.legal-body p, .legal-body li { color: var(--muted); }

/* ------------------------------ Auth screen ----------------------------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-brand { display: grid; place-items: center; gap: 10px; text-align: center; margin-bottom: 22px; }
.auth-brand .brand-mark { width: 52px; height: 52px; border-radius: 16px; font-size: 24px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 13px; background: rgba(79, 70, 229, 0.08); margin-bottom: 20px; }
.tab-btn {
  flex: 1; padding: 9px; border-radius: 9px; border: none; background: transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--muted); transition: .16s;
}
.tab-btn.active { background: var(--surface-solid); color: var(--indigo); box-shadow: var(--shadow-sm); }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted-2); font-size: 12px; }
.divider::before, .divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }

/* ------------------------------ App layout ------------------------------ */
.app-frame { width: min(480px, 100%); margin: 0 auto; padding: 0 16px 120px; min-height: 100vh; }
.app-topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px;
  padding: 14px 0 12px; backdrop-filter: var(--blur); background: rgba(243, 240, 255, .8);
  margin: 0 -16px; padding-inline: 16px;
}
html[data-theme='dark'] .app-topbar { background: rgba(15, 23, 42, .82); }
.app-hello small { display: block; font-size: 11.5px; color: var(--muted); }
.app-hello strong { font-size: 15px; }
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(480px, 100%);
  background: rgba(255, 255, 255, 0.86); backdrop-filter: var(--blur); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 70;
}
html[data-theme='dark'] .bottom-nav { background: rgba(15, 23, 42, 0.9); }
.bnav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 0; border: none;
  background: none; cursor: pointer; color: var(--muted); font-size: 10.5px; font-weight: 600; border-radius: 12px;
}
.bnav-item .ic { font-size: 18px; line-height: 1; }
.bnav-item.active { color: var(--indigo); background: rgba(79, 70, 229, 0.1); }
.fab {
  position: fixed; right: max(18px, calc(50% - 224px)); bottom: calc(84px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; z-index: 72;
  background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; font-size: 26px;
  box-shadow: 0 18px 32px -12px rgba(79, 70, 229, .8); display: grid; place-items: center; transition: .18s;
}
.fab:hover { transform: scale(1.06) rotate(90deg); }
.fab-web { right: 28px; bottom: 28px; }

/* ------------------------------ Dashboard ------------------------------- */
.tabbar { display: flex; gap: 6px; padding: 5px; border-radius: 13px; background: rgba(79,70,229,.07); border: 1px solid var(--line); }
.tabbar .tab-btn { display: flex; align-items: center; justify-content: center; gap: 7px; }
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat {
  border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  background: var(--surface); backdrop-filter: var(--blur);
}
.stat .label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .value { font-size: clamp(18px, 2.4vw, 26px); font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.stat .sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.stat.income { background: linear-gradient(140deg, rgba(59,130,246,.14), rgba(59,130,246,.04)); border-color: rgba(59,130,246,.28); }
.stat.income .value { color: var(--income); }
.stat.expense { background: linear-gradient(140deg, rgba(239,68,68,.13), rgba(239,68,68,.04)); border-color: rgba(239,68,68,.26); }
.stat.expense .value { color: var(--expense); }
.stat.net { background: linear-gradient(140deg, rgba(255,255,255,.92), rgba(255,255,255,.62)); border-color: rgba(255,255,255,.9); }
html[data-theme='dark'] .stat.net { background: linear-gradient(140deg, rgba(51,65,85,.9), rgba(30,41,59,.7)); border-color: rgba(148,163,255,.3); }
.stat.net .value { color: var(--net); text-shadow: 0 1px 0 rgba(31,27,58,.06); }
html[data-theme='dark'] .stat.net .value { color: #fff; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 130px; }
.search-wrap { position: relative; flex: 1 1 220px; min-width: 180px; }
.search-wrap .input { padding-left: 36px; width: 100%; }
.search-wrap .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 14px; }
.quick-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip-btn { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.chip-btn.active { background: rgba(79,70,229,.12); color: var(--indigo); border-color: rgba(79,70,229,.3); }
.tx-list { display: flex; flex-direction: column; gap: 10px; }
.tx-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface-strong); border: 1px solid var(--line); transition: .16s;
}
.tx-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.tx-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; flex: 0 0 auto; background: rgba(79,70,229,.1); }
.tx-ic.out { background: rgba(239,68,68,.1); }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 11.5px; color: var(--muted-2); display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.tx-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.tx-amount.in { color: var(--income); }
.tx-amount.out { color: var(--expense); }
.tx-actions { display: flex; gap: 4px; opacity: .55; transition: .16s; }
.tx-item:hover .tx-actions { opacity: 1; }
.icon-btn { border: none; background: transparent; cursor: pointer; padding: 5px; border-radius: 8px; font-size: 13px; color: var(--muted); }
.icon-btn:hover { background: rgba(79,70,229,.1); color: var(--indigo); }
.icon-btn.danger:hover { background: rgba(239,68,68,.12); color: var(--expense); }
.empty {
  text-align: center; padding: 34px 20px; border-radius: var(--radius); border: 1px dashed var(--line-strong);
  color: var(--muted); font-size: 13.5px; background: rgba(255,255,255,.35);
}
.empty .big { font-size: 30px; margin-bottom: 8px; }

.chart-card { padding: 20px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.cat-row:last-child { border-bottom: none; }
.cat-row:hover { background: rgba(79,70,229,.04); }
.cat-bar { height: 7px; border-radius: 999px; background: rgba(79,70,229,.12); overflow: hidden; flex: 1; }
.cat-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--indigo), var(--violet)); }

.wallet-card { position: relative; overflow: hidden; }
.wallet-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.wallet-balance { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.share-code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px;
  border-radius: 11px; background: rgba(79,70,229,.08); border: 1px dashed rgba(79,70,229,.35);
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--indigo); letter-spacing: .04em;
}
.member-row { display: flex; align-items: center; gap: 9px; padding: 7px 0; font-size: 13px; }
.member-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--indigo), var(--violet)); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: none; border-right: none; border-top: none; width: 100%; text-align: left; }
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: rgba(79,70,229,.05); }
.list-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(79,70,229,.1); font-size: 15px; flex: 0 0 auto; }
.profile-card { display: flex; align-items: center; gap: 14px; }
.profile-card .avatar { width: 52px; height: 52px; font-size: 18px; }
.stars { display: flex; gap: 6px; font-size: 24px; cursor: pointer; }
.stars span { color: rgba(99,95,130,.3); transition: .14s; }
.stars span.on { color: #F59E0B; transform: scale(1.06); }

/* -------------------------------- Modals -------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; background: rgba(20, 16, 40, .5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 18px; overflow-y: auto;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: var(--surface-solid); border-radius: var(--radius-lg); width: min(440px, 100%);
  padding: 22px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); max-height: 92vh; overflow-y: auto;
  animation: rise .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-lg { width: min(760px, 100%); }
.modal-xl { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-close { border: none; background: rgba(99,95,130,.1); width: 30px; height: 30px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; }
.modal-close:hover { background: rgba(239,68,68,.14); color: var(--expense); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  padding: 12px 15px; border-radius: 12px; background: var(--surface-solid); box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); font-size: 13px; font-weight: 500; display: flex; gap: 10px; align-items: flex-start;
  animation: rise .2s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--expense); }
.toast.info { border-left: 3px solid var(--indigo); }

/* --------------------------------- Ads ---------------------------------- */
.ad-sticky {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; z-index: 90;
  background: linear-gradient(100deg, rgba(31,27,58,.96), rgba(79,70,229,.94)); color: #fff;
  font-size: 12.5px; padding: 10px 16px; display: flex; align-items: center; justify-content: center; gap: 12px;
  text-align: center; flex-wrap: wrap;
}
.ad-sticky .btn { padding: 5px 12px; font-size: 12px; }
.ad-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.16); border: none; color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; }
body.has-ad-sticky { padding-bottom: 54px; }

/* ------------------------------ Owner CMS ------------------------------- */
.cms { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; padding: 26px 0 60px; align-items: start; }
.cms-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
.cms-nav { display: flex; flex-direction: column; gap: 3px; }
.cms-nav button {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; border: none;
  background: none; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); text-align: left; width: 100%;
}
.cms-nav button:hover { background: rgba(79,70,229,.07); color: var(--indigo); }
.cms-nav button.active { background: linear-gradient(120deg, rgba(79,70,229,.16), rgba(139,92,246,.16)); color: var(--indigo); }
.cms-nav .nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted-2); padding: 14px 12px 5px; }
.cms-main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cms-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cms-title h2 { margin: 0; font-size: 22px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-strong); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th {
  text-align: left; padding: 11px 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted-2); background: rgba(79,70,229,.05); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: rgba(79,70,229,.03); }
.cell-user { display: flex; align-items: center; gap: 9px; }
.cell-user .avatar { width: 30px; height: 30px; font-size: 11px; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.builder { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; }
.palette { display: flex; flex-direction: column; gap: 7px; }
.palette button {
  display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 10px; border: 1px dashed var(--line-strong);
  background: rgba(255,255,255,.6); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
html[data-theme='dark'] .palette button { background: rgba(30,41,59,.6); }
.palette button:hover { border-color: var(--indigo); color: var(--indigo); background: rgba(79,70,229,.06); }
.blocks { display: flex; flex-direction: column; gap: 9px; min-height: 220px; padding: 10px; border-radius: var(--radius); border: 1px dashed var(--line-strong); background: rgba(255,255,255,.35); }
html[data-theme='dark'] .blocks { background: rgba(15,23,42,.35); }
.block {
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid); padding: 10px 12px;
  display: flex; align-items: center; gap: 10px; cursor: grab;
}
.block.dragging { opacity: .45; }
.block.drag-over { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79,70,229,.14); }
.block-grip { color: var(--muted-2); cursor: grab; font-size: 13px; }
.block-name { font-size: 12.5px; font-weight: 600; flex: 1; }
.block-type { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.code-editor {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; min-height: 260px; width: 100%;
  border-radius: 12px; border: 1px solid var(--line-strong); padding: 12px; background: #0F172A; color: #E2E8F0;
  resize: vertical; tab-size: 2;
}
.code-tabs { display: flex; gap: 5px; margin-bottom: 8px; }
.code-tabs button { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: transparent; font-size: 11.5px; font-weight: 700; color: var(--muted); cursor: pointer; font-family: var(--mono); }
.code-tabs button.active { background: rgba(79,70,229,.12); color: var(--indigo); border-color: rgba(79,70,229,.3); }
.preview-frame { width: 100%; height: 460px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.preview-frame.mobile { width: 390px; max-width: 100%; height: 560px; margin-inline: auto; }
.layout-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px; background: rgba(79,70,229,.08); border: 1px solid var(--line); }
.layout-switch button { padding: 6px 12px; border-radius: 8px; border: none; background: none; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.layout-switch button.active { background: var(--surface-solid); color: var(--indigo); box-shadow: var(--shadow-sm); }
.sec-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.sec-on { background: rgba(16,185,129,.14); color: #047857; }
.sec-off { background: rgba(239,68,68,.14); color: #B91C1C; }
html[data-theme='dark'] .sec-on { color: #6EE7B7 }
.feature-matrix input[type='number'] { width: 74px; }
.matrix-cell { text-align: center; }
.badge-live { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.18); display: inline-block; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 12.5px; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; color: var(--ink-soft); font-weight: 500; word-break: break-word; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1024px) {
  .cms { grid-template-columns: 1fr; }
  .cms-sidebar { position: static; }
  .cms-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .cms-nav .nav-group { display: none; }
  .cms-nav button { white-space: nowrap; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
  .feature-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --section: 32px; --gap: 14px; }
  .container, .container-narrow { width: min(100% - 28px, 100%); }
  .site-header .header-inner { gap: 12px; height: 62px; }
  .nav-links { display: none; }
  .feature-grid, .pricing-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .builder { grid-template-columns: 1fr; }
  .palette { flex-direction: row; overflow-x: auto; }
  .palette button { white-space: nowrap; }
  .modal { padding: 18px; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
  h1 { font-size: 30px; }
  .float-badge { display: none; }
  .phone { max-width: 300px; }
  .tx-actions { opacity: 1; }
  .table-wrap table.data { min-width: 560px; }
}
@media (min-width: 761px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 760px) {
  .desktop-only { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ------------------------- Tambahan: Auth layout ------------------------ */
.auth-wrap {
  display: grid; grid-template-columns: 1.02fr 1fr; gap: 52px; align-items: center;
  width: min(1060px, 100%); margin-inline: auto;
}
.auth-aside { padding-right: 8px; }
@media (max-width: 980px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 24px; }
}
.header-actions { position: relative; }
.header-actions .menu-pop { right: 0; top: calc(100% + 12px); }
.stat.net {
  background: linear-gradient(135deg, var(--indigo), var(--violet));
  border-color: rgba(139, 92, 246, 0.5);
}
.stat.net .label { color: rgba(255, 255, 255, 0.82); }
.stat.net .value { color: #FFFFFF; }
.stat.net .sub { color: rgba(255, 255, 255, 0.72); }
.cms-nav .nav-sep, .cms-nav .nav-group { pointer-events: none; }

/* Sticky ad di mode app: diletakkan di atas bottom nav agar navigasi tetap bisa diklik */
.ad-sticky.ad-app { bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 68; }
body.has-ad-sticky #fab-add { bottom: calc(130px + env(safe-area-inset-bottom)); }
body.has-ad-sticky .bottom-nav { z-index: 74; }
@media (max-width: 760px) {
  .ad-sticky { font-size: 11.5px; padding: 8px 12px; gap: 8px; }
  .ad-sticky .btn { padding: 4px 10px; font-size: 11.5px; }
}

/* CMS responsive safety: track grid tidak boleh melebar mengikuti min-content anak */
.cms > * { min-width: 0; }
.cms-sidebar { max-width: 100%; }
@media (max-width: 1024px) {
  .cms { grid-template-columns: minmax(0, 1fr); }
  .cms-nav { max-width: 100%; }
  .cms-main { max-width: 100%; }
}

/* Cegah grid item melebar mengikuti konten lebar (tabel) di layar kecil */
.grid > *, .summary-grid > *, .pricing-grid > *, .feature-grid > * { min-width: 0; }
.card { min-width: 0; }
.table-wrap { max-width: 100%; }

/* ===================== Modul baru: picker, filter, RBAC, omnichat ===================== */
.brand-logo { height: 34px; width: auto; max-width: 140px; object-fit: contain; border-radius: 9px; }

/* icon & color picker */
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker button {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.6); font-size: 18px; cursor: pointer; line-height: 1;
}
html[data-theme='dark'] .icon-picker button { background: rgba(15,23,42,.5); }
.icon-picker button.active { border-color: var(--indigo); background: rgba(79,70,229,.14); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.color-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.color-picker button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.color-picker button.active { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(79,70,229,.16); }

/* kategori grid di form transaksi */
.cat-grid { display: flex; flex-wrap: wrap; gap: 7px; max-height: 168px; overflow-y: auto; padding: 2px; }
.cat-opt {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.6); cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
html[data-theme='dark'] .cat-opt { background: rgba(15,23,42,.45); }
.cat-opt .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; }
.cat-opt.active { border-color: var(--indigo); background: rgba(79,70,229,.1); color: var(--indigo); }

/* strip kategori di tab transaksi */
.cat-strip { display: flex; gap: 7px; overflow-x: auto; padding: 2px 0 12px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-strong); cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--ink-soft); white-space: nowrap;
}
.cat-pill .cat-pill-ic { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; }
.cat-pill.active { border-color: var(--indigo); color: var(--indigo); background: rgba(79,70,229,.08); }
.cat-pill.add { border-style: dashed; color: var(--muted); }

/* chart & pie */
.pie-wrap { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: center; }
.pie-legend { display: flex; flex-direction: column; gap: 7px; }
.pie-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-soft); }
.pie-row .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
@media (max-width: 620px) { .pie-wrap { grid-template-columns: 1fr; } }

/* pengingat harian */
.day-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.day-btn { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.6); font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
html[data-theme='dark'] .day-btn { background: rgba(15,23,42,.45); }
.day-btn.active { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; border-color: transparent; }
.time-list { display: flex; flex-direction: column; gap: 8px; }
.time-row { display: flex; align-items: center; gap: 8px; }
.time-row .input { max-width: 160px; }

/* matriks modul RBAC */
.module-group { margin-bottom: 16px; }
.module-group-title { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); margin-bottom: 8px; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.module-item { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.5); font-size: 12px; cursor: pointer; }
html[data-theme='dark'] .module-item { background: rgba(15,23,42,.4); }
.module-item input { margin-top: 2px; accent-color: var(--indigo); }
.module-item strong { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.module-item code { font-size: 10.5px; color: var(--muted-2); }
table.role-matrix td, table.role-matrix th { font-size: 12px; }
.chart-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.chart-types button { padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.6); font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: left; }
html[data-theme='dark'] .chart-types button { background: rgba(15,23,42,.45); }
.chart-types button.active { border-color: var(--indigo); background: rgba(79,70,229,.1); color: var(--indigo); }

/* omnichat */
.omni-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.omni-list { max-height: 560px; overflow-y: auto; }
.conv-row { display: flex; gap: 9px; align-items: center; width: 100%; padding: 9px; border-radius: 11px; border: 1px solid transparent; background: none; text-align: left; cursor: pointer; }
.conv-row:hover { background: rgba(79,70,229,.06); }
.conv-row.active { background: rgba(79,70,229,.1); border-color: rgba(79,70,229,.25); }
.omni-messages { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding: 10px; border-radius: 12px; background: rgba(79,70,229,.04); }
@media (max-width: 900px) { .omni-layout { grid-template-columns: 1fr; } }

/* chat widget */
.chat-fab {
  position: fixed; right: 20px; bottom: 86px; z-index: 95; width: 52px; height: 52px; border-radius: 50%;
  border: none; cursor: pointer; color: #fff; font-size: 22px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--indigo), var(--violet)); box-shadow: 0 16px 30px -12px rgba(79,70,229,.8);
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-panel {
  position: fixed; right: 20px; bottom: 148px; width: min(360px, calc(100vw - 32px)); z-index: 96;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
  display: none; overflow: hidden;
}
.chat-panel.open { display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; }
.chat-head .tiny { color: rgba(255,255,255,.82); }
.chat-avatar { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 14px; }
.chat-close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; }
.chat-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; background: rgba(79,70,229,.03); }
.chat-msg { padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; max-width: 88%; }
.chat-msg.bot { background: rgba(79,70,229,.1); color: var(--ink-soft); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-note { font-size: 11.5px; color: var(--muted); text-align: center; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-suggest button { font-size: 11px; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; }
.chat-suggest button:hover { color: var(--indigo); border-color: var(--indigo); }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: var(--surface-solid); }
.chat-input .input { flex: 1; }

/* ads placement */
.ad-rail { position: fixed; top: 96px; width: 168px; z-index: 40; }
.ad-rail-left { left: max(12px, calc(50% - 700px)); }
.ad-rail-right { right: max(12px, calc(50% - 700px)); }
.ad-rail .ad-box { position: sticky; top: 96px; }
.ad-box {
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm);
}
.ad-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); }
.ad-content { font-size: 11.5px; color: var(--ink-soft); line-height: 1.45; overflow-wrap: anywhere; }
.ad-content img { border-radius: 8px; }
.ad-placeholder { font-size: 11px; color: var(--muted-2); display: grid; place-items: center; min-height: 120px; border-radius: 8px; background: rgba(79,70,229,.05); }
.ad-top-wrap { width: min(1180px, 100% - 40px); margin: 10px auto 0; }
.ad-box.ad-top { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
@media (max-width: 1279px) { .ad-rail { display: none; } }
@media (max-width: 900px) { .ad-top-wrap { width: calc(100% - 28px); } .ad-box.ad-top { flex-direction: column; align-items: stretch; } }

/* modal editor kode mini */
.code-mini { font-family: var(--mono); }
.omni-list::-webkit-scrollbar, .chat-body::-webkit-scrollbar, .cat-strip::-webkit-scrollbar { height: 6px; width: 6px; }
.omni-list::-webkit-scrollbar-thumb, .chat-body::-webkit-scrollbar-thumb, .cat-strip::-webkit-scrollbar-thumb { background: rgba(99,95,130,.25); border-radius: 999px; }

/* ============ v1.3: stat cards dinamis, builder media, chat history ============ */
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
#stat-cards .stat .value { font-size: clamp(16px, 2vw, 22px); }
.od-chart svg { max-height: 280px; }
.owner-sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.conv-row.active { background: rgba(79,70,229,.12); }
.matrix-cell-preview { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 10px; }
@media (max-width: 760px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pie-wrap { grid-template-columns: 1fr; }
}

/* ================= v1.4: header controls, currency, meta, viz ================= */
.header-controls { display: flex; align-items: center; gap: 6px; }
.hc-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.55); cursor: pointer;
  font-size: 13px; color: var(--ink-soft); line-height: 1; position: relative;
}
html[data-theme='dark'] .hc-btn { background: rgba(30,41,59,.55); }
.hc-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.hc-select {
  border: none; background: transparent; font-size: 11.5px; font-weight: 700; color: inherit;
  font-family: inherit; cursor: pointer; padding: 0 2px; outline: none; appearance: none;
}
.hc-select option { color: #1F1B3A; }
@media (max-width: 760px) {
  .header-controls { gap: 4px; }
  .hc-btn { padding: 5px 6px; }
  .hc-btn > span { display: none; }
}

/* metadata transaksi */
.tx-meta strong { font-weight: 600; }
.tx-meta .meta-sep { opacity: .5; }
.tx-meta-line { font-size: 11px; color: var(--muted-2); display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.tx-meta-line b { font-weight: 600; color: var(--ink-soft); }

/* visualisasi aset */
.viz-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.viz-bars { display: flex; flex-direction: column; gap: 9px; }
.viz-bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 110px; gap: 10px; align-items: center; font-size: 12.5px; }
.viz-bar-track { height: 10px; background: rgba(79,70,229,.1); border-radius: 999px; overflow: hidden; }
.viz-bar-track > span { display: block; height: 100%; border-radius: 999px; }
@media (max-width: 620px) { .viz-bar-row { grid-template-columns: 90px minmax(0,1fr) 84px; font-size: 11.5px; } }

/* pricing center */
.pricing-grid { display: flex; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: 20px; }
.pricing-grid > .plan { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; }
.plan-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, var(--indigo), var(--violet)); color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 8px 18px -8px rgba(79,70,229,.8); text-transform: uppercase;
}
.plan { position: relative; }

/* currency chip di kartu stat */
.stat .value small { font-size: 11px; font-weight: 600; opacity: .7; margin-left: 4px; }

/* WYSIWYG preview editor */
.wys-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-strong);
}
.wys-bar .chip-btn.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.wys-frame-wrap { position: relative; }
.wys-overlay { position: absolute; inset: 0; pointer-events: none; }
.wys-outline {
  position: absolute; border: 2px solid var(--indigo); border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(79,70,229,.18); pointer-events: none; transition: all .08s ease;
}
.wys-toolbar {
  position: absolute; display: flex; gap: 3px; padding: 3px; border-radius: 9px;
  background: var(--indigo); box-shadow: var(--shadow); pointer-events: auto; z-index: 5;
}
.wys-toolbar button {
  border: none; background: rgba(255,255,255,.16); color: #fff; width: 24px; height: 24px;
  border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1;
}
.wys-toolbar button:hover { background: rgba(255,255,255,.32); }
.wys-hint { font-size: 11.5px; color: var(--muted); }

/* kontrol header pada layar auth (mode app) */
.auth-shell { position: relative; }
.auth-top-controls { position: absolute; top: 14px; right: 16px; z-index: 5; }
.auth-top-controls .header-controls { gap: 4px; }
.auth-top-controls .hc-btn { padding: 5px 7px; }
