/* ═══════════════════════════════════════════════════════════════════
 * MJP AGEN — r15p8 Design System (Pipedrive/FUB-grade)
 * Loaded LAST — overrides all earlier CSS.
 * Mobile-first. 8px grid. Touch-friendly 44px min.
 * ═══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  /* Color — brand */
  --p8-brand: #0F6E56;
  --p8-brand-soft: #ECFDF5;
  --p8-brand-dark: #0A4D3D;
  --p8-brand-darker: #064E3B;

  /* Color — ink (text) */
  --p8-ink: #1F2937;
  --p8-ink-2: #374151;
  --p8-ink-3: #6B7280;
  --p8-ink-muted: #9CA3AF;
  --p8-ink-on-brand: #FFFFFF;

  /* Color — surface */
  --p8-bg: #FFFFFF;
  --p8-bg-subtle: #F9FAFB;
  --p8-bg-soft: #F3F4F6;
  --p8-border: #E5E7EB;
  --p8-border-strong: #D1D5DB;

  /* Color — semantic */
  --p8-success: #10B981;
  --p8-success-soft: #D1FAE5;
  --p8-warning: #F59E0B;
  --p8-warning-soft: #FEF3C7;
  --p8-danger: #EF4444;
  --p8-danger-soft: #FEE2E2;
  --p8-info: #3B82F6;
  --p8-info-soft: #DBEAFE;

  /* Color — badges */
  --p8-hot: #DC2626;
  --p8-hot-bg: #FEE2E2;
  --p8-warm: #B45309;
  --p8-warm-bg: #FEF3C7;
  --p8-cold: #4B5563;
  --p8-cold-bg: #F3F4F6;
  --p8-booking: #1D4ED8;
  --p8-booking-bg: #DBEAFE;
  --p8-akad: #6D28D9;
  --p8-akad-bg: #EDE9FE;
  --p8-sold: #DC2626;
  --p8-sold-bg: #FEE2E2;
  --p8-available: #047857;
  --p8-available-bg: #D1FAE5;

  /* Typography */
  --p8-font-display: 'Fraunces', Georgia, serif;
  --p8-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sizes (12,14,16,18,20,24,32px) */
  --p8-fs-xs: 12px;
  --p8-fs-sm: 14px;
  --p8-fs-md: 16px;
  --p8-fs-lg: 18px;
  --p8-fs-xl: 20px;
  --p8-fs-2xl: 24px;
  --p8-fs-3xl: 32px;

  /* Spacing 8px grid (4,8,12,16,20,24,32,40,48,64) */
  --p8-sp-1: 4px;
  --p8-sp-2: 8px;
  --p8-sp-3: 12px;
  --p8-sp-4: 16px;
  --p8-sp-5: 20px;
  --p8-sp-6: 24px;
  --p8-sp-8: 32px;
  --p8-sp-10: 40px;
  --p8-sp-12: 48px;
  --p8-sp-16: 64px;

  /* Radius */
  --p8-r-sm: 6px;
  --p8-r-md: 8px;
  --p8-r-lg: 12px;
  --p8-r-xl: 16px;
  --p8-r-full: 9999px;

  /* Shadows */
  --p8-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --p8-shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --p8-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --p8-shadow-xl: 0 20px 25px rgba(0,0,0,0.1);

  /* Layout */
  --p8-sidebar-w: 240px;
  --p8-sidebar-w-collapsed: 60px;
  --p8-bottom-nav-h: 64px;
  --p8-header-h: 56px;
}

/* ─── Base reset (gentle, not aggressive) ─── */
.p8-app, .p8-app * { box-sizing: border-box; }
.p8-app {
  font-family: var(--p8-font-body);
  font-size: var(--p8-fs-sm);
  color: var(--p8-ink);
  background: var(--p8-bg-subtle);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
.p8-h1 { font-family: var(--p8-font-display); font-size: var(--p8-fs-3xl); font-weight: 600; letter-spacing: -0.02em; color: var(--p8-ink); margin: 0; }
.p8-h2 { font-size: var(--p8-fs-2xl); font-weight: 700; color: var(--p8-ink); margin: 0; }
.p8-h3 { font-size: var(--p8-fs-xl); font-weight: 600; color: var(--p8-ink); margin: 0; }
.p8-h4 { font-size: var(--p8-fs-lg); font-weight: 600; color: var(--p8-ink); margin: 0; }
.p8-text { font-size: var(--p8-fs-sm); color: var(--p8-ink-2); }
.p8-text-sm { font-size: var(--p8-fs-xs); color: var(--p8-ink-3); }
.p8-text-muted { color: var(--p8-ink-muted); }
.p8-text-strong { font-weight: 600; color: var(--p8-ink); }

/* ─── Buttons ─── */
.p8-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--p8-sp-2);
  padding: var(--p8-sp-3) var(--p8-sp-5);
  border-radius: var(--p8-r-md);
  font-family: inherit;
  font-size: var(--p8-fs-sm);
  font-weight: 600;
  line-height: 1.2;
  min-height: 44px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.p8-btn:active { transform: translateY(0); }
.p8-btn:hover { transform: translateY(-1px); }
.p8-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.p8-btn-primary { background: var(--p8-brand); color: var(--p8-ink-on-brand); border-color: var(--p8-brand); }
.p8-btn-primary:hover { background: var(--p8-brand-dark); border-color: var(--p8-brand-dark); }

.p8-btn-secondary { background: transparent; color: var(--p8-brand); border-color: var(--p8-brand); }
.p8-btn-secondary:hover { background: var(--p8-brand-soft); }

.p8-btn-ghost { background: transparent; color: var(--p8-ink-2); border-color: transparent; }
.p8-btn-ghost:hover { background: var(--p8-bg-soft); color: var(--p8-ink); }

.p8-btn-danger { background: var(--p8-danger); color: var(--p8-ink-on-brand); border-color: var(--p8-danger); }
.p8-btn-danger:hover { background: #DC2626; }

.p8-btn-sm { padding: var(--p8-sp-2) var(--p8-sp-3); font-size: var(--p8-fs-xs); min-height: 32px; }
.p8-btn-icon { padding: var(--p8-sp-2); min-width: 44px; }
.p8-btn-block { width: 100%; }

/* ─── Cards ─── */
.p8-card {
  background: var(--p8-bg);
  border: 1px solid var(--p8-border);
  border-radius: var(--p8-r-lg);
  padding: var(--p8-sp-4);
}
.p8-card-elev { box-shadow: var(--p8-shadow-sm); }
.p8-card-hover { transition: all 150ms ease; }
.p8-card-hover:hover { border-color: var(--p8-brand-soft); box-shadow: var(--p8-shadow-md); }

/* ─── Badges ─── */
.p8-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--p8-sp-1);
  padding: 2px var(--p8-sp-2);
  border-radius: var(--p8-r-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.p8-badge-hot { background: var(--p8-hot-bg); color: var(--p8-hot); }
.p8-badge-warm { background: var(--p8-warm-bg); color: var(--p8-warm); }
.p8-badge-cold { background: var(--p8-cold-bg); color: var(--p8-cold); }
.p8-badge-booking { background: var(--p8-booking-bg); color: var(--p8-booking); }
.p8-badge-akad { background: var(--p8-akad-bg); color: var(--p8-akad); }
.p8-badge-sold { background: var(--p8-sold-bg); color: var(--p8-sold); }
.p8-badge-available { background: var(--p8-available-bg); color: var(--p8-available); }
.p8-badge-success { background: var(--p8-success-soft); color: var(--p8-success); }
.p8-badge-warning { background: var(--p8-warning-soft); color: var(--p8-warning); }
.p8-badge-danger { background: var(--p8-danger-soft); color: var(--p8-danger); }
.p8-badge-info { background: var(--p8-info-soft); color: var(--p8-info); }

/* ─── Inputs ─── */
.p8-input, .p8-select, .p8-textarea {
  width: 100%;
  padding: 10px var(--p8-sp-3);
  border: 1px solid var(--p8-border);
  border-radius: var(--p8-r-md);
  font-family: inherit;
  font-size: var(--p8-fs-sm);
  color: var(--p8-ink);
  background: var(--p8-bg);
  min-height: 44px;
  transition: border-color 150ms;
}
.p8-input:focus, .p8-select:focus, .p8-textarea:focus {
  outline: none;
  border-color: var(--p8-brand);
  box-shadow: 0 0 0 3px var(--p8-brand-soft);
}
.p8-textarea { min-height: 80px; resize: vertical; }
.p8-label { display: block; font-size: var(--p8-fs-xs); font-weight: 600; color: var(--p8-ink-2); margin-bottom: var(--p8-sp-1); }

/* ─── KPI Card ─── */
.p8-kpi {
  background: var(--p8-bg);
  border: 1px solid var(--p8-border);
  border-radius: var(--p8-r-lg);
  padding: var(--p8-sp-4);
  min-width: 120px;
  flex: 1 1 0;
}
.p8-kpi-value { font-size: var(--p8-fs-2xl); font-weight: 700; color: var(--p8-ink); line-height: 1.1; }
.p8-kpi-label { font-size: 11px; font-weight: 600; color: var(--p8-ink-3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.p8-kpi-strip { display: flex; gap: var(--p8-sp-3); overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: thin; }
.p8-kpi-strip > .p8-kpi { min-width: 130px; flex-shrink: 0; }
@media (min-width: 768px) {
  .p8-kpi-strip { overflow-x: visible; }
}

/* ─── Hero Greeting ─── */
.p8-hero {
  padding: var(--p8-sp-5) var(--p8-sp-4);
  background: linear-gradient(135deg, var(--p8-brand) 0%, var(--p8-brand-darker) 100%);
  color: var(--p8-ink-on-brand);
  border-radius: var(--p8-r-lg);
  margin-bottom: var(--p8-sp-4);
}
.p8-hero-greet { font-family: var(--p8-font-display); font-size: var(--p8-fs-2xl); font-weight: 600; letter-spacing: -0.01em; }
.p8-hero-ref { display: inline-flex; align-items: center; gap: var(--p8-sp-2); margin-top: var(--p8-sp-2); padding: 6px 10px; background: rgba(255,255,255,0.15); border-radius: var(--p8-r-md); font-size: var(--p8-fs-xs); font-family: ui-monospace, SFMono-Regular, monospace; }
.p8-hero-ref-copy { background: transparent; border: 0; color: inherit; cursor: pointer; padding: 2px; opacity: 0.85; }
.p8-hero-ref-copy:hover { opacity: 1; }

/* ─── Komisi Card ─── */
.p8-komisi-card {
  background: linear-gradient(135deg, #ECFDF5 0%, #FEF3C7 100%);
  border: 1px solid var(--p8-border);
  border-radius: var(--p8-r-lg);
  padding: var(--p8-sp-5);
  margin-bottom: var(--p8-sp-4);
}
.p8-komisi-label { font-size: 11px; font-weight: 700; color: var(--p8-brand-darker); text-transform: uppercase; letter-spacing: 0.06em; }
.p8-komisi-amount { font-family: var(--p8-font-display); font-size: var(--p8-fs-3xl); font-weight: 600; color: var(--p8-brand-darker); margin-top: 4px; line-height: 1; }
.p8-komisi-progress { margin-top: var(--p8-sp-3); height: 8px; background: rgba(15,110,86,0.15); border-radius: var(--p8-r-full); overflow: hidden; }
.p8-komisi-progress-fill { height: 100%; background: var(--p8-brand); transition: width 300ms ease; }
.p8-komisi-pipeline { font-size: var(--p8-fs-xs); color: var(--p8-ink-3); margin-top: var(--p8-sp-2); }
.p8-komisi-pipeline strong { color: var(--p8-ink); }

/* ─── Quick Actions (3 max) ─── */
.p8-qa-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--p8-sp-3); margin-bottom: var(--p8-sp-4); }
.p8-qa {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--p8-sp-4) var(--p8-sp-3);
  background: var(--p8-bg);
  border: 1px solid var(--p8-border);
  border-radius: var(--p8-r-lg);
  color: var(--p8-ink-2);
  font-size: var(--p8-fs-xs);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 150ms;
  min-height: 80px;
}
.p8-qa:hover { border-color: var(--p8-brand); color: var(--p8-brand); transform: translateY(-2px); box-shadow: var(--p8-shadow-md); }
.p8-qa-ic { font-size: 22px; line-height: 1; color: var(--p8-brand); }

/* ─── Tier Card ─── */
.p8-tier-card { background: var(--p8-bg); border: 1px solid var(--p8-border); border-radius: var(--p8-r-lg); padding: var(--p8-sp-4); margin-bottom: var(--p8-sp-4); }
.p8-tier-row { display: flex; align-items: center; justify-content: space-between; }
.p8-tier-label { font-size: var(--p8-fs-xs); font-weight: 600; color: var(--p8-ink-3); }
.p8-tier-name { font-family: var(--p8-font-display); font-size: var(--p8-fs-lg); font-weight: 600; color: var(--p8-ink); margin-top: 4px; }
.p8-tier-progress { margin-top: var(--p8-sp-3); height: 6px; background: var(--p8-bg-soft); border-radius: var(--p8-r-full); overflow: hidden; }
.p8-tier-fill { height: 100%; background: linear-gradient(90deg, var(--p8-brand) 0%, var(--p8-warning) 100%); }

/* ─── Activity Item ─── */
.p8-activity { display: flex; gap: var(--p8-sp-3); padding: var(--p8-sp-3) 0; border-bottom: 1px solid var(--p8-border); }
.p8-activity:last-child { border-bottom: 0; }
.p8-activity-ic { width: 32px; height: 32px; border-radius: var(--p8-r-full); background: var(--p8-bg-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
.p8-activity-ic.is-success { background: var(--p8-success-soft); color: var(--p8-success); }
.p8-activity-ic.is-pending { background: var(--p8-warning-soft); color: var(--p8-warning); }
.p8-activity-text { flex: 1; min-width: 0; font-size: var(--p8-fs-sm); color: var(--p8-ink-2); }
.p8-activity-time { font-size: 11px; color: var(--p8-ink-muted); margin-top: 2px; }

/* ─── Section Header ─── */
.p8-section { margin-bottom: var(--p8-sp-4); }
.p8-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--p8-sp-3); }
.p8-section-title { font-size: var(--p8-fs-md); font-weight: 700; color: var(--p8-ink); }
.p8-section-link { font-size: var(--p8-fs-xs); color: var(--p8-brand); font-weight: 600; text-decoration: none; }

/* ─── Toolbar ─── */
.p8-toolbar { display: flex; gap: var(--p8-sp-2); align-items: center; padding: var(--p8-sp-3) var(--p8-sp-4); background: var(--p8-bg); border-bottom: 1px solid var(--p8-border); flex-wrap: wrap; }
.p8-toolbar > .p8-toolbar-search { flex: 1 1 200px; min-width: 0; }

/* ─── Tabs ─── */
.p8-tabs { display: flex; gap: 2px; padding: var(--p8-sp-1); background: var(--p8-bg-soft); border-radius: var(--p8-r-md); margin-bottom: var(--p8-sp-3); overflow-x: auto; }
.p8-tab { padding: var(--p8-sp-2) var(--p8-sp-3); border: 0; background: transparent; color: var(--p8-ink-3); font-size: var(--p8-fs-xs); font-weight: 600; cursor: pointer; border-radius: var(--p8-r-sm); white-space: nowrap; min-height: 36px; }
.p8-tab.is-active { background: var(--p8-bg); color: var(--p8-ink); box-shadow: var(--p8-shadow-sm); }
.p8-tab:hover:not(.is-active) { color: var(--p8-ink-2); }

/* ─── Lead Card (list) ─── */
.p8-lead-card { display: flex; gap: var(--p8-sp-3); padding: var(--p8-sp-3) var(--p8-sp-4); background: var(--p8-bg); border-bottom: 1px solid var(--p8-border); cursor: pointer; transition: background 100ms; min-height: 72px; }
.p8-lead-card:hover { background: var(--p8-bg-subtle); }
.p8-lead-card.is-active { background: var(--p8-brand-soft); border-left: 3px solid var(--p8-brand); padding-left: calc(var(--p8-sp-4) - 3px); }
.p8-lead-avatar { width: 40px; height: 40px; border-radius: var(--p8-r-full); background: var(--p8-brand-soft); color: var(--p8-brand-darker); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--p8-fs-sm); flex-shrink: 0; }
.p8-lead-body { flex: 1; min-width: 0; }
.p8-lead-name { font-size: var(--p8-fs-sm); font-weight: 600; color: var(--p8-ink); display: flex; align-items: center; gap: 6px; }
.p8-lead-meta { font-size: var(--p8-fs-xs); color: var(--p8-ink-3); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p8-lead-meta .dot { width: 3px; height: 3px; border-radius: var(--p8-r-full); background: var(--p8-ink-muted); }
.p8-lead-badges { display: flex; gap: 4px; flex-shrink: 0; align-self: flex-start; }

/* ─── Lead Detail Panel ─── */
.p8-lead-detail { background: var(--p8-bg); height: 100%; display: flex; flex-direction: column; }
.p8-lead-detail-header { padding: var(--p8-sp-4); border-bottom: 1px solid var(--p8-border); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--p8-sp-3); }
.p8-lead-detail-actions { display: flex; gap: var(--p8-sp-2); padding: var(--p8-sp-3) var(--p8-sp-4); background: var(--p8-bg-subtle); border-bottom: 1px solid var(--p8-border); }
.p8-lead-detail-body { flex: 1; overflow-y: auto; padding: var(--p8-sp-4); }
.p8-lead-info { display: grid; grid-template-columns: 1fr 1fr; gap: var(--p8-sp-3); padding: var(--p8-sp-3); background: var(--p8-bg-subtle); border-radius: var(--p8-r-md); margin-bottom: var(--p8-sp-4); }
.p8-info-cell { min-width: 0; }
.p8-info-label { font-size: 11px; font-weight: 600; color: var(--p8-ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.p8-info-val { font-size: var(--p8-fs-sm); color: var(--p8-ink); margin-top: 2px; }

/* ─── Pipeline Stages ─── */
.p8-pipeline { display: flex; gap: 4px; overflow-x: auto; padding: var(--p8-sp-2) 0; }
.p8-pipe-stage { flex: 1 1 0; min-width: 70px; padding: 8px 6px; background: var(--p8-bg-soft); color: var(--p8-ink-3); font-size: 11px; font-weight: 600; text-align: center; border-radius: var(--p8-r-sm); cursor: pointer; transition: all 100ms; }
.p8-pipe-stage:hover { background: var(--p8-border); }
.p8-pipe-stage.is-current { background: var(--p8-brand); color: var(--p8-ink-on-brand); }
.p8-pipe-stage.is-done { background: var(--p8-success-soft); color: var(--p8-success); }

/* ─── Site Plan Grid ─── */
.p8-sp-stats { display: flex; gap: var(--p8-sp-3); padding: var(--p8-sp-4); background: var(--p8-bg); border-bottom: 1px solid var(--p8-border); align-items: center; flex-wrap: wrap; }
.p8-sp-stat { font-size: var(--p8-fs-sm); color: var(--p8-ink-2); }
.p8-sp-stat strong { color: var(--p8-ink); font-weight: 700; font-size: var(--p8-fs-md); }
.p8-sp-filters { display: flex; gap: var(--p8-sp-2); padding: var(--p8-sp-3) var(--p8-sp-4); overflow-x: auto; background: var(--p8-bg); border-bottom: 1px solid var(--p8-border); }
.p8-sp-filter { padding: 6px 12px; border: 1px solid var(--p8-border); background: var(--p8-bg); color: var(--p8-ink-2); font-size: var(--p8-fs-xs); font-weight: 600; border-radius: var(--p8-r-full); cursor: pointer; white-space: nowrap; min-height: 32px; }
.p8-sp-filter.is-active { background: var(--p8-brand); border-color: var(--p8-brand); color: var(--p8-ink-on-brand); }
.p8-sp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: var(--p8-sp-4); }
@media (min-width: 480px) { .p8-sp-grid { grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 768px) { .p8-sp-grid { grid-template-columns: repeat(12, 1fr); } }
@media (min-width: 1280px) { .p8-sp-grid { grid-template-columns: repeat(15, 1fr); } }
.p8-sp-block-label { grid-column: 1 / -1; font-size: 11px; font-weight: 700; color: var(--p8-ink-3); text-transform: uppercase; letter-spacing: 0.05em; padding: var(--p8-sp-3) 0 var(--p8-sp-1); }
.p8-sp-unit { aspect-ratio: 1; border-radius: var(--p8-r-sm); display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; cursor: pointer; transition: transform 100ms; border: 0; padding: 0; }
.p8-sp-unit:hover { transform: scale(1.1); z-index: 1; }
.p8-sp-unit.s-available { background: var(--p8-available-bg); color: var(--p8-available); }
.p8-sp-unit.s-booked { background: #FED7AA; color: #C2410C; }
.p8-sp-unit.s-akad { background: var(--p8-booking-bg); color: var(--p8-booking); }
.p8-sp-unit.s-sold { background: var(--p8-sold-bg); color: var(--p8-sold); }
.p8-sp-unit.s-reserved { background: #E9D5FF; color: #6D28D9; }

/* ─── Tasks Card (horizontal layout, no overflow) ─── */
.p8-task { display: grid; grid-template-columns: auto 1fr auto; gap: var(--p8-sp-3); padding: var(--p8-sp-4); background: var(--p8-bg); border: 1px solid var(--p8-border); border-radius: var(--p8-r-lg); margin-bottom: var(--p8-sp-3); align-items: start; }
.p8-task-check { width: 22px; height: 22px; border-radius: var(--p8-r-sm); border: 2px solid var(--p8-border-strong); background: var(--p8-bg); cursor: pointer; flex-shrink: 0; padding: 0; }
.p8-task-check.is-done { background: var(--p8-brand); border-color: var(--p8-brand); }
.p8-task-body { min-width: 0; }
.p8-task-title { font-size: var(--p8-fs-sm); font-weight: 600; color: var(--p8-ink); word-break: break-word; }
.p8-task-meta { font-size: var(--p8-fs-xs); color: var(--p8-ink-3); margin-top: 4px; }
.p8-task-meta.is-overdue { color: var(--p8-danger); font-weight: 600; }
.p8-task-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ─── Empty State ─── */
.p8-empty { padding: var(--p8-sp-12) var(--p8-sp-6); text-align: center; }
.p8-empty-icon { font-size: 48px; line-height: 1; color: var(--p8-ink-muted); margin-bottom: var(--p8-sp-4); }
.p8-empty-title { font-family: var(--p8-font-display); font-size: var(--p8-fs-lg); font-weight: 600; color: var(--p8-ink); margin-bottom: var(--p8-sp-2); }
.p8-empty-sub { font-size: var(--p8-fs-sm); color: var(--p8-ink-3); margin-bottom: var(--p8-sp-5); max-width: 320px; margin-left: auto; margin-right: auto; }

/* ─── Responsive Container ─── */
.p8-container { padding: var(--p8-sp-4); max-width: 100%; }
@media (min-width: 768px) { .p8-container { padding: var(--p8-sp-5); } }
@media (min-width: 1024px) { .p8-container { padding: var(--p8-sp-6); max-width: 1280px; margin: 0 auto; } }

/* ─── Split Layout (lead list + detail) ─── */
.p8-split { display: flex; flex-direction: column; min-height: calc(100vh - var(--p8-header-h) - var(--p8-bottom-nav-h)); }
@media (min-width: 1024px) {
  .p8-split { flex-direction: row; }
  .p8-split-list { flex: 0 0 60%; max-width: 60%; border-right: 1px solid var(--p8-border); overflow-y: auto; }
  .p8-split-detail { flex: 1; overflow-y: auto; }
}

/* ─── Mobile detail overlay (slide from right) ─── */
@media (max-width: 1023px) {
  .p8-detail-overlay { position: fixed; inset: 0; background: var(--p8-bg); z-index: 100; display: none; }
  .p8-detail-overlay.is-open { display: flex; flex-direction: column; }
}

/* ─── Komisi tabs + items ─── */
.p8-komisi-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--p8-sp-3); padding: var(--p8-sp-4); }
@media (min-width: 768px) { .p8-komisi-stats { grid-template-columns: repeat(4, 1fr); } }
.p8-komisi-stat { background: var(--p8-bg); border: 1px solid var(--p8-border); border-radius: var(--p8-r-lg); padding: var(--p8-sp-4); }
.p8-komisi-stat-label { font-size: 11px; font-weight: 600; color: var(--p8-ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.p8-komisi-stat-value { font-size: var(--p8-fs-xl); font-weight: 700; color: var(--p8-ink); margin-top: 4px; line-height: 1.1; }
.p8-komisi-stat-value.is-good { color: var(--p8-success); }
.p8-komisi-item { display: grid; grid-template-columns: 1fr auto; gap: var(--p8-sp-3); padding: var(--p8-sp-3) var(--p8-sp-4); border-bottom: 1px solid var(--p8-border); align-items: center; }
.p8-komisi-item:last-child { border-bottom: 0; }
.p8-komisi-name { font-size: var(--p8-fs-sm); font-weight: 600; color: var(--p8-ink); }
.p8-komisi-sub { font-size: var(--p8-fs-xs); color: var(--p8-ink-3); margin-top: 2px; }
.p8-komisi-amount { font-size: var(--p8-fs-md); font-weight: 700; color: var(--p8-ink); text-align: right; white-space: nowrap; }

/* ═══════════════════════════════════════════════
 * NAVIGATION — Bottom (mobile) + Sidebar (desktop)
 * ═══════════════════════════════════════════════ */

/* Bottom Nav (mobile-first) */
.p8-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex;
  height: var(--p8-bottom-nav-h);
  background: var(--p8-bg);
  border-top: 1px solid var(--p8-border);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.p8-bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  text-decoration: none;
  color: var(--p8-ink-3);
  font-size: 10px;
  font-weight: 500;
  transition: color 150ms;
  position: relative;
  min-height: 44px;
}
.p8-bn-item.is-active { color: var(--p8-brand); }
.p8-bn-item.is-active::before { content: ''; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--p8-brand); border-radius: 0 0 3px 3px; }
.p8-bn-icon { font-size: 22px; line-height: 1; }
.p8-bn-badge { position: absolute; top: 6px; right: calc(50% - 18px); background: var(--p8-danger); color: white; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }

/* Hide bottom nav on desktop */
@media (min-width: 1024px) { .p8-bottom-nav { display: none; } body { padding-bottom: 0 !important; } }

/* Sidebar (desktop only) */
.p8-sidebar {
  display: none;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--p8-sidebar-w);
  background: var(--p8-bg);
  border-right: 1px solid var(--p8-border);
  flex-direction: column;
  z-index: 30;
  transition: width 200ms ease;
  overflow: hidden;
}
.p8-sidebar.is-collapsed { width: var(--p8-sidebar-w-collapsed); }
@media (min-width: 1024px) { .p8-sidebar { display: flex; } }
.p8-sb-brand { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--p8-border); height: var(--p8-header-h); }
.p8-sb-brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--p8-brand); color: white; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.p8-sb-brand-text { font-weight: 700; font-size: 14px; color: var(--p8-ink); white-space: nowrap; overflow: hidden; }
.p8-sidebar.is-collapsed .p8-sb-brand-text { display: none; }
.p8-sb-nav { flex: 1; overflow-y: auto; padding: 12px 8px; }
.p8-sb-group { margin-bottom: 16px; }
.p8-sb-group-label { font-size: 10px; font-weight: 700; color: var(--p8-ink-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 4px 12px 8px; }
.p8-sidebar.is-collapsed .p8-sb-group-label { display: none; }
.p8-sb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--p8-ink-2);
  font-size: 14px;
  font-weight: 500;
  transition: all 100ms;
  position: relative;
  min-height: 40px;
}
.p8-sb-item:hover { background: var(--p8-bg-soft); color: var(--p8-ink); }
.p8-sb-item.is-active { background: var(--p8-brand-soft); color: var(--p8-brand-darker); font-weight: 600; }
.p8-sb-item.is-active::before { content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px; width: 3px; background: var(--p8-brand); border-radius: 0 3px 3px 0; }
.p8-sb-ic { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.p8-sb-lbl { flex: 1; white-space: nowrap; overflow: hidden; }
.p8-sidebar.is-collapsed .p8-sb-lbl { display: none; }
.p8-sb-toggle { padding: 12px 20px; border: 0; border-top: 1px solid var(--p8-border); background: transparent; color: var(--p8-ink-3); cursor: pointer; font-size: 12px; }
.p8-sb-toggle:hover { color: var(--p8-ink); background: var(--p8-bg-soft); }

/* App shell with sidebar offset */
@media (min-width: 1024px) {
  .p8-app-shell { padding-left: var(--p8-sidebar-w); transition: padding-left 200ms ease; }
  .p8-app-shell.sb-collapsed { padding-left: var(--p8-sidebar-w-collapsed); }
}

/* Header */
.p8-header { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--p8-sp-4); height: var(--p8-header-h); background: var(--p8-bg); border-bottom: 1px solid var(--p8-border); position: sticky; top: 0; z-index: 20; }
.p8-header-title { font-family: var(--p8-font-display); font-size: var(--p8-fs-lg); font-weight: 600; color: var(--p8-ink); }
.p8-header-actions { display: flex; gap: 4px; align-items: center; }

/* Body padding for fixed nav */
body.p8-bottom-nav-on { padding-bottom: calc(var(--p8-bottom-nav-h) + env(safe-area-inset-bottom)); }

/* ─── Hide legacy injectors when p8 active ─── */
/* r15-p20b-portal sidenav is sibling of #app — use body.p8-bottom-nav-on as anchor */
body.p8-bottom-nav-on #r15p20bSideNav,
body.p8-bottom-nav-on .agen-app-footer,
body.p8-bottom-nav-on .agen-sidebar-backdrop,
body.p8-bottom-nav-on #r11ChatFAB,
body.p8-bottom-nav-on .agen-fab-stack,
body.p8-bottom-nav-on #r15p20bFab,
body.p8-bottom-nav-on #r15p20bFabMenu,
body.p8-bottom-nav-on .mbt-bar,
body.p8-bottom-nav-on .bottom-nav,
body.p8-bottom-nav-on .agen-app-header,
body.p8-bottom-nav-on .agen-shell { display: none !important; }

/* Override legacy body padding-left when r15-p20b adds it */
@media (min-width: 1024px) {
  body { padding-left: 0 !important; }
}

/* ─── Mobile: ensure content fits without horizontal scroll ─── */
.p8-app, .p8-app * { max-width: 100%; }
.p8-app .p8-container { width: 100%; }

/* ─── More menu on mobile (when user taps More tab) ─── */
.p8-more-sheet {
  position: fixed; bottom: var(--p8-bottom-nav-h); left: 0; right: 0;
  background: var(--p8-bg);
  border-top: 1px solid var(--p8-border);
  padding: var(--p8-sp-3);
  box-shadow: var(--p8-shadow-lg);
  z-index: 49;
  max-height: 70vh;
  overflow-y: auto;
  display: none;
  padding-bottom: calc(var(--p8-sp-3) + env(safe-area-inset-bottom));
}
.p8-more-sheet.is-open { display: block; }
.p8-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--p8-sp-3); }
.p8-more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--p8-sp-3) 8px; border-radius: var(--p8-r-md); text-decoration: none; color: var(--p8-ink-2); font-size: 11px; font-weight: 600; text-align: center; transition: background 100ms; }
.p8-more-item:hover { background: var(--p8-bg-soft); }
.p8-more-item-ic { font-size: 22px; color: var(--p8-brand); }

/* ═══════════════════════════════════════════════
 * KYC (r15p9) — Banner + Modal + Lock
 * ═══════════════════════════════════════════════ */
.p9-kyc-banner {
  display: flex;
  align-items: center;
  gap: var(--p8-sp-3);
  padding: var(--p8-sp-3) var(--p8-sp-4);
  border-radius: var(--p8-r-lg);
  margin-bottom: var(--p8-sp-4);
  border: 1px solid var(--p8-border);
}
.p9-kyc-banner-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.p9-kyc-banner-body { flex: 1; min-width: 0; }
.p9-kyc-banner-title { font-size: var(--p8-fs-sm); font-weight: 700; color: var(--p8-ink); }
.p9-kyc-banner-sub { font-size: var(--p8-fs-xs); color: var(--p8-ink-2); margin-top: 2px; line-height: 1.45; }
.p9-kyc-none { background: linear-gradient(135deg, #FEF3C7 0%, #FFFBEB 100%); border-color: #F59E0B; }
.p9-kyc-pending { background: var(--p8-info-soft); border-color: var(--p8-info); }
.p9-kyc-rejected { background: var(--p8-danger-soft); border-color: var(--p8-danger); }
@media (max-width: 480px) {
  .p9-kyc-banner { flex-wrap: wrap; }
  .p9-kyc-banner > .p8-btn { width: 100%; }
}

/* KYC Modal */
.p9-kyc-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: p9FadeIn 150ms ease;
}
@media (min-width: 768px) {
  .p9-kyc-modal-backdrop { align-items: center; padding: var(--p8-sp-4); }
}
@keyframes p9FadeIn { from { opacity: 0; } to { opacity: 1; } }
.p9-kyc-modal {
  background: var(--p8-bg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--p8-r-xl) var(--p8-r-xl) 0 0;
  padding: var(--p8-sp-5);
  box-shadow: var(--p8-shadow-xl);
  padding-bottom: calc(var(--p8-sp-5) + env(safe-area-inset-bottom));
}
@media (min-width: 768px) {
  .p9-kyc-modal { border-radius: var(--p8-r-xl); padding-bottom: var(--p8-sp-5); }
}
.p9-kyc-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--p8-sp-3);
  margin-bottom: var(--p8-sp-4);
}
.p9-kyc-file {
  border: 2px dashed var(--p8-border-strong);
  background: var(--p8-bg-subtle);
  padding: var(--p8-sp-3);
  cursor: pointer;
}
.p9-kyc-file:hover { border-color: var(--p8-brand); background: var(--p8-brand-soft); }

/* Sidebar lock indicator */
.p8-sb-item.is-locked {
  position: relative;
  opacity: 0.7;
}
.p8-sb-item.is-locked::after {
  content: '🔒';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}
.p8-sb-item.is-locked:hover {
  background: var(--p8-warning-soft);
}

/* KYC verified badge for sidebar brand */
.p8-sb-brand.is-verified::after {
  content: '✓';
  display: inline-flex;
  width: 16px;
  height: 16px;
  background: var(--p8-success);
  color: white;
  border-radius: var(--p8-r-full);
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
}

/* ═══════════════════════════════════════════════
 * r15p9 — Setup Checklist + Profile + Wizard + Bank + Onboarding
 * ═══════════════════════════════════════════════ */

/* Setup Checklist Card (dashboard) */
.p9-setup-card {
  background: linear-gradient(135deg, var(--p8-brand-soft) 0%, #FEF3C7 100%);
  border: 1px solid var(--p8-brand);
  border-radius: var(--p8-r-lg);
  padding: var(--p8-sp-5);
  margin-bottom: var(--p8-sp-4);
}
.p9-setup-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--p8-sp-3); flex-wrap: wrap; gap: 8px; }
.p9-setup-title { font-size: var(--p8-fs-md); font-weight: 700; color: var(--p8-ink); display: flex; align-items: center; gap: 8px; }
.p9-setup-pct { font-size: var(--p8-fs-xs); font-weight: 700; color: var(--p8-brand-darker); background: rgba(255,255,255,0.7); padding: 4px 10px; border-radius: var(--p8-r-full); }
.p9-setup-progress { height: 8px; background: rgba(15,110,86,0.15); border-radius: var(--p8-r-full); overflow: hidden; margin-bottom: var(--p8-sp-3); }
.p9-setup-progress-fill { height: 100%; background: var(--p8-brand); transition: width 400ms ease; }
.p9-setup-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.p9-setup-step { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,0.7); border-radius: var(--p8-r-md); font-size: var(--p8-fs-sm); min-height: 44px; }
.p9-setup-step.is-done { opacity: 0.7; }
.p9-setup-step.is-progress { background: rgba(255,255,255,0.9); border: 1px solid var(--p8-info); }
.p9-setup-step.is-error { background: var(--p8-danger-soft); border: 1px solid var(--p8-danger); }
.p9-setup-step-mark { width: 26px; height: 26px; border-radius: var(--p8-r-full); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; background: var(--p8-bg); color: var(--p8-ink-2); border: 1px solid var(--p8-border); }
.p9-setup-step.is-done .p9-setup-step-mark { background: var(--p8-success); color: white; border-color: var(--p8-success); }
.p9-setup-step.is-progress .p9-setup-step-mark { background: var(--p8-info); color: white; border-color: var(--p8-info); }
.p9-setup-step.is-error .p9-setup-step-mark { background: var(--p8-danger); color: white; border-color: var(--p8-danger); }
.p9-setup-step-label { flex: 1; min-width: 0; font-weight: 500; }
.p9-setup-step.is-done .p9-setup-step-label { text-decoration: line-through; color: var(--p8-ink-3); }
.p9-setup-step-action { background: var(--p8-brand); color: white; border: 0; padding: 6px 12px; border-radius: var(--p8-r-md); font-size: var(--p8-fs-xs); font-weight: 600; cursor: pointer; min-height: 32px; }
.p9-setup-step-action:hover { background: var(--p8-brand-dark); }
.p9-setup-step-tag { font-size: 11px; color: var(--p8-success); font-weight: 600; }

/* Profile — Status Card */
.p9-status-card { padding: var(--p8-sp-4); border-radius: var(--p8-r-lg); margin-bottom: var(--p8-sp-4); }
.p9-status-warn { background: var(--p8-warning-soft); border: 1px solid var(--p8-warning); }
.p9-status-ok { background: var(--p8-success-soft); border: 1px solid var(--p8-success); }
.p9-status-head { display: flex; align-items: center; gap: 8px; margin-bottom: var(--p8-sp-2); font-size: var(--p8-fs-md); }
.p9-status-msg { font-size: var(--p8-fs-sm); color: var(--p8-ink-2); margin: 0 0 var(--p8-sp-3); }

/* Profile — Account row */
.p9-account-row { display: flex; gap: var(--p8-sp-3); align-items: center; }
.p9-avatar { width: 64px; height: 64px; border-radius: var(--p8-r-full); background: var(--p8-brand-soft); color: var(--p8-brand-darker); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--p8-fs-lg); flex-shrink: 0; overflow: hidden; }
.p9-avatar img { width: 100%; height: 100%; object-fit: cover; }
.p9-account-info { flex: 1; min-width: 0; }
.p9-account-name { font-size: var(--p8-fs-md); font-weight: 700; color: var(--p8-ink); }
.p9-account-meta { font-size: var(--p8-fs-sm); color: var(--p8-ink-3); margin-top: 2px; }

/* Profile — Referral Card */
.p9-ref-code { display: flex; align-items: center; gap: 8px; padding: var(--p8-sp-3); background: var(--p8-bg-subtle); border-radius: var(--p8-r-md); margin-bottom: var(--p8-sp-2); }
.p9-ref-code-value { flex: 1; font-family: ui-monospace, monospace; font-size: var(--p8-fs-lg); font-weight: 700; color: var(--p8-brand-darker); letter-spacing: 0.05em; }
.p9-ref-url { padding: var(--p8-sp-2) var(--p8-sp-3); background: var(--p8-bg-subtle); border-radius: var(--p8-r-md); font-family: ui-monospace, monospace; font-size: var(--p8-fs-xs); color: var(--p8-ink-2); word-break: break-all; }

/* Profile — Tier Card */
.p9-tier-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--p8-sp-3); flex-wrap: wrap; gap: 8px; }
.p9-tier-current { display: flex; align-items: center; gap: var(--p8-sp-3); }
.p9-tier-emoji { font-size: 32px; line-height: 1; }
.p9-tier-name { font-family: var(--p8-font-display); font-size: var(--p8-fs-xl); font-weight: 600; color: var(--p8-ink); }
.p9-tier-progress-text { font-size: var(--p8-fs-xl); font-weight: 700; color: var(--p8-ink); line-height: 1; }
.p9-tier-progress { height: 8px; background: var(--p8-bg-soft); border-radius: var(--p8-r-full); overflow: hidden; }
.p9-tier-progress-fill { height: 100%; background: linear-gradient(90deg, var(--p8-brand) 0%, var(--p8-warning) 100%); transition: width 400ms ease; }

/* Profile — Bank info */
.p9-bank-info { display: flex; flex-direction: column; gap: var(--p8-sp-2); }
.p9-bank-row { display: flex; justify-content: space-between; padding: var(--p8-sp-2) 0; border-bottom: 1px solid var(--p8-border); font-size: var(--p8-fs-sm); }
.p9-bank-row:last-child { border-bottom: 0; }
.p9-bank-label { color: var(--p8-ink-3); }
.p9-bank-error { color: var(--p8-danger); font-size: var(--p8-fs-xs); margin-top: 4px; min-height: 16px; }

/* KYC Wizard */
.p9-wiz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--p8-sp-3); }
.p9-wiz-progress-row { display: flex; justify-content: space-between; font-size: var(--p8-fs-xs); color: var(--p8-ink-3); margin-bottom: 6px; }
.p9-wiz-step-pct { font-weight: 700; color: var(--p8-brand-darker); }
.p9-wiz-progress { height: 6px; background: var(--p8-bg-soft); border-radius: var(--p8-r-full); overflow: hidden; margin-bottom: var(--p8-sp-4); }
.p9-wiz-progress-fill { height: 100%; background: linear-gradient(90deg, var(--p8-brand) 0%, var(--p8-warning) 100%); transition: width 300ms ease; }
.p9-wiz-body { padding: var(--p8-sp-3) 0; }
.p9-wiz-icon { font-size: 48px; line-height: 1; text-align: center; margin-bottom: var(--p8-sp-3); }
.p9-wiz-tips { list-style: none; padding: var(--p8-sp-3); margin: var(--p8-sp-4) 0 0; background: var(--p8-bg-subtle); border-radius: var(--p8-r-md); font-size: var(--p8-fs-xs); color: var(--p8-ink-2); }
.p9-wiz-tips li { padding: 2px 0; }
.p9-wiz-foot { display: flex; gap: var(--p8-sp-2); margin-top: var(--p8-sp-4); }

/* KYC dropzone */
.p9-kyc-file-hidden { display: none; }
.p9-kyc-dropzone {
  display: block;
  width: 100%;
  border: 2px dashed var(--p8-border-strong);
  background: var(--p8-bg-subtle);
  border-radius: var(--p8-r-lg);
  padding: var(--p8-sp-6);
  text-align: center;
  cursor: pointer;
  transition: all 150ms;
  margin-top: var(--p8-sp-3);
}
.p9-kyc-dropzone:hover { border-color: var(--p8-brand); background: var(--p8-brand-soft); }
.p9-kyc-dropzone-icon { font-size: 36px; margin-bottom: var(--p8-sp-2); }
.p9-kyc-preview { max-width: 100%; max-height: 200px; border-radius: var(--p8-r-md); display: block; margin: 0 auto; }

/* KYC Loading */
.p9-wiz-loading { text-align: center; }
.p9-wiz-spinner { display: flex; justify-content: center; margin: var(--p8-sp-5) 0; }
.p9-spinner { width: 48px; height: 48px; border: 4px solid var(--p8-bg-soft); border-top-color: var(--p8-brand); border-radius: var(--p8-r-full); animation: p9Spin 700ms linear infinite; }
@keyframes p9Spin { to { transform: rotate(360deg); } }
.p9-wiz-checks { list-style: none; padding: 0; margin: var(--p8-sp-4) 0; text-align: left; max-width: 280px; margin-left: auto; margin-right: auto; }
.p9-wiz-checks li { padding: 6px 0; font-size: var(--p8-fs-sm); color: var(--p8-ink-3); }
.p9-wiz-checks li.is-pending::before { content: '⏳ '; }
.p9-wiz-checks li.is-done { color: var(--p8-ink); font-weight: 500; }

/* KYC Result */
.p9-wiz-result { padding: var(--p8-sp-6) var(--p8-sp-4); text-align: center; }
.p9-wiz-result-icon { width: 80px; height: 80px; border-radius: var(--p8-r-full); display: inline-flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; }
.p9-wiz-result-icon.is-success { background: var(--p8-success-soft); color: var(--p8-success); }
.p9-wiz-result-icon.is-pending { background: var(--p8-info-soft); color: var(--p8-info); }
.p9-wiz-result-icon.is-error { background: var(--p8-danger-soft); color: var(--p8-danger); }

/* Onboarding */
.p9-onboard-body { padding: var(--p8-sp-5) var(--p8-sp-4); text-align: center; }
.p9-onboard-icon { font-size: 56px; line-height: 1; margin-bottom: var(--p8-sp-4); }
.p9-onboard-title { font-family: var(--p8-font-display); margin-bottom: var(--p8-sp-3); }
.p9-onboard-msg { color: var(--p8-ink-2); margin-bottom: var(--p8-sp-5); max-width: 380px; margin-left: auto; margin-right: auto; }
.p9-onboard-dots { display: flex; gap: 6px; justify-content: center; }
.p9-onboard-dot { width: 8px; height: 8px; border-radius: var(--p8-r-full); background: var(--p8-border); transition: all 200ms; }
.p9-onboard-dot.is-active { background: var(--p8-brand); width: 24px; }
.p9-onboard-dot.is-done { background: var(--p8-success); }

/* Lock icon */
.p9-lock-icon { font-size: 64px; line-height: 1; color: var(--p8-ink-3); }

/* Tasks p9 */
.p9-task-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--p8-sp-3);
  padding: var(--p8-sp-4);
  background: var(--p8-bg);
  border: 1px solid var(--p8-border);
  border-radius: var(--p8-r-lg);
  margin-bottom: var(--p8-sp-3);
  align-items: start;
  transition: all 150ms;
}
.p9-task-card:hover { border-color: var(--p8-brand-soft); box-shadow: var(--p8-shadow-sm); }
.p9-task-check {
  width: 24px;
  height: 24px;
  border-radius: var(--p8-r-sm);
  border: 2px solid var(--p8-border-strong);
  background: var(--p8-bg);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin-top: 2px;
  transition: all 100ms;
}
.p9-task-check:hover { border-color: var(--p8-brand); }
.p9-task-check.is-done { background: var(--p8-brand); border-color: var(--p8-brand); }
.p9-task-check.is-done::after { content: '✓'; color: white; font-weight: 700; font-size: 14px; line-height: 22px; display: block; }
.p9-task-body { min-width: 0; }
.p9-task-title { font-size: var(--p8-fs-sm); font-weight: 600; color: var(--p8-ink); word-break: break-word; line-height: 1.4; }
.p9-task-meta { font-size: var(--p8-fs-xs); color: var(--p8-ink-3); margin-top: 4px; line-height: 1.45; }
.p9-task-meta.is-overdue { color: var(--p8-danger); }
.p9-task-meta.is-overdue strong { color: var(--p8-danger); }
.p9-task-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
@media (max-width: 480px) {
  .p9-task-card { grid-template-columns: auto 1fr; }
  .p9-task-actions { grid-column: 1 / -1; padding-left: 36px; }
}

/* Banner upgrade */
.p9-kyc-banner.p9-kyc-none {
  background: linear-gradient(135deg, #FEF3C7 0%, #ECFDF5 100%);
  border: 1px solid var(--p8-warning);
  border-left: 4px solid var(--p8-warning);
}
.p9-kyc-banner-progress { display: flex; flex-direction: column; gap: 4px; }
.p9-kyc-banner-bar { height: 4px; background: rgba(15,110,86,0.15); border-radius: var(--p8-r-full); overflow: hidden; margin-top: 6px; }
.p9-kyc-banner-bar-fill { height: 100%; background: var(--p8-brand); width: 60%; }
