/* ==============================================================================
   NSM - ERP SYSTEM - Executive BioTime & POS Enterprise Styling
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   Theme: Signature Ocean Blue (#2563EB) & Modern Hostinger.com DM Sans Standards
   Doktrin Tipografi Mutlak: 1 Jenis Font DM Sans Tunggal Seragam untuk Seluruh Proyek
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
  /* ═══════════════════════════════════════════════════════════════
     PALETTE: MODERN IRIS / ROYAL PURPLE SAAS (ala contoh-konsep.jpg)
     1. Iris Purple #6060E0 / #5B4DF5 → Primary Brand & Interactive Accent
     2. Surface     #FFFFFF           → Card & Container Surface
     3. Canvas      #F4F5FA           → Cool Soft Gray Canvas
     4. Trio Pastel Accents:
        - Lavender/Iris: #EEEBFF / #6060E0
        - Soft Pink:     #FDEBF5 / #D946EF
        - Fresh Cyan:    #E6F7F8 / #0D9488
     5. Dark Slate  #1E293B / #0F172A → Text Headers & Dark Elements
     ═══════════════════════════════════════════════════════════════ */

  /* ─── 1. BRAND NUSAMANDA (BIRU TUA & PUTIH) ─── */
  --primary:        #1E3A8A; /* Biru Tua Resmi Logo NUSAMANDA */
  --primary-hover:  #172554; /* Deep Navy Hover */
  --primary-dark:   #0F172A; /* Midnight Navy */
  --primary-soft:   #EFF6FF; /* Soft Ice Blue Tint */
  --primary-border: #BFDBFE; /* Clean Light Blue Border */
  --primary-text:   #1E3A8A; /* Biru Tua Teks Resmi */
  --accent-blue:    #2563EB; /* Aksen Biru Interaktif */

  /* ─── 2. NEUTRAL & SURFACE ─── */
  --canvas:         #F4F5FA;
  --surface:        #FFFFFF;
  --surface-hover:  #F8F9FD;
  --border:         #E8EAF2;
  --border-strong:  #CBD2E1;

  --text-main:      #1E293B;
  --text-muted:     #64748B;
  --text-subtle:    #8C97AC;
  --text-inverse:   #FFFFFF;

  /* ─── 3. STATUS SIGNALS (Harmonized with Iris Theme) ─── */
  --success:        #0D9488;
  --success-soft:   #E6F7F8;
  --success-border: #BCEAEB;
  --success-text:   #0F766E;

  --warning:        #EA580C;
  --warning-soft:   #FFF7ED;
  --warning-border: #FED7AA;
  --warning-text:   #C2410C;

  --danger:         #E11D48;
  --danger-soft:    #FDEBF5;
  --danger-border:  #FCCEE8;
  --danger-text:    #BE123C;

  --info:           #6060E0;
  --info-soft:      #EEEBFF;
  --info-border:    #D8D4FD;
  --info-text:      #4338CA;

  /* ─── LAYOUT ─── */
  --topbar-height:           64px;
  --sidebar-width:           236px;
  --sidebar-collapsed-width: 68px;

  /* ─── RADIUS ─── */
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   14px;
  --radius-pill: 9999px;

  /* ─── SHADOW (semua shadow pakai slate #0F172A bukan hitam pekat) ─── */
  --shadow-sm:    0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-md:    0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg:    0 10px 15px -3px rgba(15, 23, 42, 0.06), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* ─── FONT STANDARDIZATION: DM SANS MUTLAK TUNGGAL SELURUH PROYEK (ALA HOSTINGER.COM) ─── */
  --font-sans:   'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-brand:  'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:   'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

[data-theme="dark"] {
  /* Slate neutral dark (seirama blue-slate cool undertone) */
  --canvas:        #080C14;
  --surface:       #0F172A;
  --surface-hover: #1A2234;
  --border:        #1E293B;
  --border-strong: #2D3A50;

  --text-main:    #F1F5F9;
  --text-muted:   #94A3B8;
  --text-subtle:  #64748B;

  /* Primary blue — sedikit lebih terang di dark bg */
  --primary:        #3B82F6;
  --primary-hover:  #2563EB;
  --primary-soft:   rgba(37, 99, 235, 0.14);
  --primary-border: rgba(59, 130, 246, 0.30);
  --primary-text:   #93C5FD;

  /* Status signals dark — strict Blue & Purple */
  --success:        #60A5FA;
  --success-soft:   rgba(37, 99, 235, 0.18);
  --success-border: rgba(59, 130, 246, 0.35);
  --success-text:   #93C5FD;

  --warning:        #818CF8;
  --warning-soft:   rgba(99, 102, 241, 0.18);
  --warning-border: rgba(99, 102, 241, 0.35);
  --warning-text:   #C7D2FE;

  --danger:         #A78BFA;
  --danger-soft:    rgba(124, 58, 237, 0.18);
  --danger-border:  rgba(124, 58, 237, 0.35);
  --danger-text:    #DDD6FE;

  --info:           #3B82F6;
  --info-soft:      rgba(37, 99, 235, 0.14);
  --info-border:    rgba(59, 130, 246, 0.30);
  --info-text:      #93C5FD;

  --shadow-sm:    0 1px 2px 0 rgba(0, 0, 0, 0.40);
  --shadow-md:    0 4px 6px -1px rgba(0, 0, 0, 0.50), 0 2px 4px -2px rgba(0, 0, 0, 0.30);
  --shadow-lg:    0 10px 15px -3px rgba(0, 0, 0, 0.60), 0 4px 6px -4px rgba(0, 0, 0, 0.40);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.70), 0 8px 10px -6px rgba(0, 0, 0, 0.50);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 🔤 UNIFIKASI TIPOGRAFI LINTAS ELEMEN: Mutlak Single-Font DM Sans Standar Hostinger.com */
input, button, select, textarea, optgroup, table, th, td, pre, code, kbd, samp, span, p, a, div, h1, h2, h3, h4, h5, h6, label {
  font-family: var(--font-sans);
}

/* 🔢 STANDAR NOMINAL & ANGKA ENTERPRISE: Tabular Figures (Lining Numerals) */
.font-num,
.ref-metric-val,
.table-amount,
.tabular-num,
td.num-cell,
[data-num],
.amount-in,
.amount-out,
.invoice-amount,
.task-count,
.filter-pill-count,
.metric-val,
.gauge-pct,
.stat-num,
.stat-val,
.currency-val,
.date-val {
  font-family: var(--font-sans) !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1 !important;
  letter-spacing: -0.015em;
}

/* ==============================================================================
   STANDAR TIPOGRAFI RESMI & MINIMALIS EKSEKUTIF (NUSAMANDA CALIBRATION)
   Disesuaikan dengan presisi halaman #employee-create: Teks rapi, bersih, resmi,
   bebas huruf tebal berlebihan (bold-hygiene).
   ============================================================================== */

/* 1. Judul Halaman & Section (Hostinger Typography Signature: Bold 700 & Tight Tracking) */
h1, .page-title-group h1, .modal-header h3, .brand-name {
  font-size: clamp(20px, 1.8vw + 12px, 26px);
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
  line-height: 1.25;
}

h2, .card-title-group h3, .treasury-title, .let-ledger-title {
  font-size: clamp(16.5px, 1.2vw + 12px, 22px);
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3;
}

h3, .form-section-title, .dossier-card-title, .treasury-pnl-title, .pay-table-title {
  font-size: clamp(14.5px, 0.8vw + 11.5px, 18px);
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
  line-height: 1.35;
}

h4 {
  font-size: clamp(13.5px, 0.4vw + 11.5px, 15.5px);
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.4;
}

/* 2. Label & Formulir (Comfortable Corporate Legibility) */
label, .form-label, .login-quick-label {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #334155;
  line-height: 1.4;
}

[data-theme="dark"] label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .login-quick-label {
  color: #CBD5E1;
}

/* 3. Tabel Data Korporat: Header bersih, abu-abu netral, uppercase 12px */
table th, table.data-table th, .cash-table th, .pay-slip-table thead th,
.inv-print-th, .treasury-coa-table th {
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase;
  color: #64748B !important;
  background: #F8FAFC !important;
  padding: 11px 14px;
}

[data-theme="dark"] table th,
[data-theme="dark"] table.data-table th,
[data-theme="dark"] .cash-table th,
[data-theme="dark"] .pay-slip-table thead th,
[data-theme="dark"] .inv-print-th,
[data-theme="dark"] .treasury-coa-table th {
  color: #94A3B8 !important;
  background: #0F172A !important;
}

/* Tabel Data: Cell reguler 13.5px (Mudah dibaca di semua monitor) */
table td, table.data-table td, .cash-table td {
  font-weight: 400;
  font-size: 13.5px !important;
  color: var(--text-main);
  line-height: 1.5;
  padding: 11px 14px;
}

/* 4. Status Badges, Chips, Pills: Medium 500 & Minimum 12px */
.badge, .cash-data-context-pill, .cash-data-count-badge, .filter-pill-count,
.pill-badge, .status-pill, .tag, .health-badge-pill, .ref-bank-chip,
.pill-inflow, .pill-outflow, .metric-label {
  font-weight: 500 !important;
  font-size: 12px !important;
}

/* 5. Angka & Tabular Figures: Semibold 600 presisi */
.font-num, .metric-value, .ref-metric-val, .td-amount, .cash-amt-val,
.fin-metric-val, .treasury-balance-val, .treasury-metric-val, .stat-val {
  font-weight: 600 !important;
  font-size: 14px;
}

/* 6. Tombol / Button: Hostinger Style (Semibold 600 & Crisp Tracking) */
.btn, .ref-hero-btn, .btn-emp-submit, .btn-emp-back {
  font-weight: 600 !important;
  font-size: 13.5px !important;
  letter-spacing: -0.01em !important;
}
button.btn-sm, .action-btn-group .btn-sm {
  font-weight: 600 !important;
  font-size: 12.5px !important;
  letter-spacing: -0.005em !important;
}

/* 7. Navigasi Sidebar */
.nav-item {
  font-weight: 500 !important;
  font-size: 13.5px !important;
}
.nav-item.active {
  font-weight: 600 !important;
}
.sidebar-section-title {
  font-weight: 600 !important;
  font-size: 12.5px !important;
  letter-spacing: 0.04em !important;
}

/* Universal Vector Icon Sizing (Uci Anti-Slop Guard) */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  max-width: 100%;
}

/* App Structure */
#app {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Top Loading Progress Line (Linear / GitHub / Vercel style) */
.top-loading-bar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #6060E0 0%, #8B5CF6 50%, #06B6D4 100%);
  background-size: 200% 100%;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.15s ease, left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-loading-bar.active {
  opacity: 1;
  transform: scaleX(0.75);
  animation: topBarShimmer 1s linear infinite;
}

.top-loading-bar.finish {
  opacity: 1;
  transform: scaleX(1);
  transition: transform 0.1s ease-out, opacity 0.2s ease 0.08s;
}

@keyframes topBarShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

body.sidebar-collapsed .top-loading-bar {
  left: var(--sidebar-collapsed-width);
}

/* Top Bar (Strictly begins at sidebar right boundary, never passes over sidebar) */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 40;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
}

body.sidebar-collapsed .topbar {
  left: var(--sidebar-collapsed-width);
}

.topbar-left {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-module-icon,
.topbar-module-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  flex-shrink: 0;
  padding: 0;
  box-shadow: 0 1px 2px rgba(96, 96, 224, 0.06);
  transition: all 0.2s ease;
}

.topbar-module-icon svg,
.topbar-module-icon-box svg {
  width: 18px !important;
  height: 18px !important;
  stroke: var(--primary) !important;
  stroke-width: 2.2 !important;
  display: block;
}

.topbar-sidebar-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.topbar-sidebar-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--primary);
  border-color: var(--primary-border);
}

.topbar-breadcrumb {
  display: none !important;
}

.mac-traffic-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-right: 4px;
}

.mac-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.mac-dot:hover {
  transform: scale(1.15);
}

.mac-dot.red    { background: #6D28D9; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.mac-dot.yellow { background: #6366F1; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.mac-dot.green  { background: #2563EB; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }

h1, h2, h3, h4, .brand-name, .btn, .sidebar-group-title, .user-text-name, .metric-value, .stat-value {
  font-family: var(--font-brand);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo-img {
  display: block;
  height: 38px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-badge:hover .brand-logo-img {
  transform: scale(1.04);
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
}

.brand-tag {
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  padding: 1.5px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.brand-sub {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-subtle);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-protocol-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.live-clock-wrapper {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-center-search {
  flex: 0 1 440px;
  width: 100%;
  max-width: 460px;
  margin: 0 20px;
  position: relative;
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 14px;
  height: 38px;
  gap: 10px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.search-input-box:focus-within {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(96, 96, 224, 0.12);
}

.search-input-box svg {
  color: var(--text-subtle);
  flex-shrink: 0;
}

.search-input-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  font-family: var(--font-sans);
  color: var(--text-main);
  width: 100%;
}

.search-input-box input::placeholder {
  color: var(--text-subtle);
  font-weight: 400;
}

.search-kbd-badge {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.topbar-right {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.topbar-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.status-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
  animation: pulse-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.topbar-icon-action-btn {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.topbar-icon-action-btn:hover {
  background: var(--surface-hover);
  color: var(--primary);
  border-color: var(--primary-border);
}

.notif-pulse-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 1.5px solid var(--surface);
}

.theme-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--primary);
  border-color: var(--primary-border);
}

.topbar-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}

.user-selector-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 14px 4px 5px;
  border-radius: var(--radius-pill);
  height: 38px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.user-selector-menu:hover {
  border-color: var(--primary-border);
  background: var(--surface-hover);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 12.5px;
  font-family: var(--font-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.user-text-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-text-greeting {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 500;
}

.user-text-greeting strong {
  font-weight: 600;
  color: var(--text-main);
}

.user-text-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-main);
}

.user-text-role {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 500;
}

/* Mobile Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modern Full-Height Executive Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow: hidden;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Sidebar Boundary Toggle Button ───────────────────────────────────────
   Diposisikan FIXED di garis batas kanan sidebar & sejajar vertikal dengan header bar.
   Bukan di header/topbar. Bergeser otomatis mengikuti lebar sidebar (expanded ↔ collapsed).
   ──────────────────────────────────────────────────────────────────────── */
.sidebar-boundary-toggle {
  position: fixed;
  top: calc((var(--topbar-height) - 26px) / 2);
  left: calc(var(--sidebar-width) - 13px);
  z-index: 70;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.2s ease,
              color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              transform 0.15s ease;
}
.sidebar-boundary-toggle:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: var(--border-hover);
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Ikon transisi rotasi saat toggle */
.sidebar-boundary-toggle .sidebar-toggle-icon {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* State TERTUTUP (Collapsed): Selaras & proporsional dengan garis batas layout */
body.sidebar-collapsed .sidebar-boundary-toggle {
  left: calc(var(--sidebar-collapsed-width) - 13px);
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}
body.sidebar-collapsed .sidebar-boundary-toggle:hover {
  background: var(--surface-hover);
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transform: scale(1.08);
}
body.sidebar-collapsed .sidebar-boundary-toggle .sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* ─── Sidebar Collapsed: icon-only 68px ────────────────────────────────────
   Sidebar menyempit ke 68px tanpa merubah posisi vertikal masing-masing ikon.
   ──────────────────────────────────────────────────────────────────────── */
body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  overflow: hidden;
}

/* Sembunyikan teks label, pertahankan posisi vertikal tombol */
body.sidebar-collapsed .sidebar-brand-meta,
body.sidebar-collapsed .nav-item span {
  display: none;
}

/* Section title tetap mempertahankan tinggi vertikal (30px) sebagai divider pemisah */
body.sidebar-collapsed .sidebar-section-title {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  font-size: 0;
  color: transparent;
  user-select: none;
}
body.sidebar-collapsed .sidebar-section-title::after {
  content: '';
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--border);
  border-radius: 1px;
}

/* Pusatkan logo di header dengan tinggi tetap sama */
body.sidebar-collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}
body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
}
body.sidebar-collapsed .sidebar-nav-list {
  padding: 0 10px;
}
body.sidebar-collapsed .nav-item {
  height: 38px;
  padding: 0;
  justify-content: center;
  width: 100%;
}
body.sidebar-collapsed .nav-item-left {
  gap: 0;
  justify-content: center;
  width: 100%;
}
body.sidebar-collapsed .nav-item.active {
  box-shadow: none;
}

/* Bottom Actions & Footer di Collapsed */
body.sidebar-collapsed .sidebar-bottom-actions {
  padding: 10px 8px;
}
body.sidebar-collapsed .bottom-item {
  height: 38px;
  padding: 0;
  justify-content: center;
  width: 100%;
}

/* ─── 1. Akun: Informasi Status Online & Profil Operator (Sidebar Footer Proportional) ─── */
.sidebar-user-card {
  margin: 4px 4px 6px;
  padding: 8px 8px 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  cursor: default;
  user-select: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-user-status-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1.5px 7px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.24);
  border-radius: var(--radius-pill);
  margin-bottom: 2px;
}
.sidebar-user-online-text {
  font-size: 11px;
  font-weight: 600 !important;
  color: var(--success);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.sidebar-user-avatar-wrap {
  width: 44px;
  height: 44px;
  position: relative;
  flex-shrink: 0;
  margin: 1px 0 3px;
}
.sidebar-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--primary-border);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.sidebar-user-photo-img,
.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.sidebar-user-pulse-dot {
  display: none;
}
.sidebar-user-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  width: 100%;
  line-height: 1.25;
}
.sidebar-user-name {
  font-size: 12.5px;
  font-weight: 600 !important;
  color: var(--text-main);
  font-family: var(--font-brand);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
  margin-top: 1px;
}
body.sidebar-collapsed .sidebar-user-card {
  margin: 4px auto 2px;
  padding: 4px 0;
  width: 40px;
  background: transparent;
  border: none;
  box-shadow: none;
  justify-content: center;
}
body.sidebar-collapsed .sidebar-user-meta,
body.sidebar-collapsed .sidebar-user-status-line {
  display: none;
}
body.sidebar-collapsed .sidebar-user-avatar-wrap {
  width: 36px;
  height: 36px;
  margin: 0;
}
body.sidebar-collapsed .sidebar-user-avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

/* ─── 2. Garis: Divider Pemisah Tipis ────────────────────────────────────── */
.sidebar-footer-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
  border-radius: 1px;
}
body.sidebar-collapsed .sidebar-footer-divider {
  margin: 4px auto;
  width: 20px;
}

/* ─── 3. Titik Bulat: 3 Traffic Dots Center ──────────────────────────────── */
.sidebar-traffic-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px 0 4px;
  width: 100%;
}
.sidebar-traffic-center .mac-traffic-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

/* ─── Global Avatar Photo Support (Header, Dropdown, Settings) ───────────── */
.avatar-photo-img,
.user-avatar-circle img,
.dropdown-avatar-circle img,
.settings-avatar-circle img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.sidebar-header {
  height: var(--topbar-height);
  min-height: var(--topbar-height);
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.sidebar-brand,
a.sidebar-brand,
a.sidebar-brand:visited {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
  color: inherit !important;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}
.sidebar-brand:hover,
a.sidebar-brand:hover {
  text-decoration: none !important;
  color: inherit !important;
}

.sidebar-brand-logo {
  height: 26px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-brand-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.sidebar-brand-name {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-transform: uppercase;
}

.sidebar-brand-sub {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.sidebar-close-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

/* Scrollable nav area fills remaining sidebar height */
.sidebar-nav-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 0;
  scrollbar-width: none;
}
.sidebar-nav-container::-webkit-scrollbar { display: none; }

.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  padding: 14px 10px 4px 10px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}
.sidebar-section-title:first-child,
.sidebar-nav-list > .sidebar-section-title:first-of-type {
  margin-top: 2px;
  border-top: none;
  padding-top: 6px;
}

.nav-item,
a.nav-item,
a.nav-item:visited {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  margin: 1px 0;
  color: var(--text-muted);
  text-decoration: none !important;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
  position: relative;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.nav-item svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
  color: var(--text-subtle);
  transition: color 0.14s ease;
}

.nav-item:hover,
a.nav-item:hover {
  background: #F1F5F9;
  color: #0F172A !important;
  text-decoration: none !important;
}

.nav-item:hover svg,
a.nav-item:hover svg {
  color: #0F172A;
}

.nav-item.active,
a.nav-item.active,
a.nav-item.active:visited {
  color: #1D4ED8 !important;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  box-shadow: inset 3px 0 0 #2563EB;
  font-weight: 600;
  text-decoration: none !important;
}

.nav-item.active svg,
a.nav-item.active svg {
  color: #2563EB;
}

.nav-item.active .icon-home .home-roof {
  fill: currentColor;
}

.nav-item.active .icon-home .home-door {
  stroke: #EFF6FF;
  stroke-width: 2.5;
}

/* ========================================================================== */
/* Sidebar Nav Accordion Groups & Sub-Menus (Swiss Enterprise SaaS Standard)  */
/* ========================================================================== */
.nav-group {
  margin-bottom: 2px;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7.5px 10px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  user-select: none;
  text-align: left;
}

.nav-group-header:hover {
  background: #F1F5F9;
  color: #0F172A;
}

.nav-group-header:hover svg.icon-nav {
  color: #2563EB;
}

.nav-group-header .nav-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.nav-group-header svg.icon-nav {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
  color: var(--text-subtle);
  transition: color 0.14s ease;
}

.nav-group-header .nav-chevron {
  width: 13px;
  height: 13px;
  stroke-width: 2;
  color: var(--text-subtle);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.14s ease;
}

.nav-group-header:hover .nav-chevron {
  color: #2563EB;
}

.nav-group.open .nav-group-header .nav-chevron {
  transform: rotate(90deg);
}

.nav-group.open .nav-group-header {
  color: #0F172A;
}

/* Menu Induk saat membawahi sub-menu aktif: Bersih, Terbingkai, Berwibawa */
.nav-group.has-active .nav-group-header {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #0F172A !important;
  font-weight: 600;
}

.nav-group.has-active .nav-group-header svg.icon-nav {
  color: #2563EB;
}

.nav-group.has-active .nav-group-header .nav-chevron {
  color: #2563EB;
}

/* Garis penghubung vertikal sub-menu: Lurus, Bersih, Presisi */
.nav-group-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 10px;
  margin-left: 19px;
  border-left: 1.5px solid #E2E8F0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-2px);
  transition: max-height 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), margin 0.2s ease;
  margin-top: 0;
  margin-bottom: 0;
}

.nav-group.open .nav-group-children {
  max-height: 380px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 2px;
  margin-bottom: 4px;
}

/* Sub-Item: Tampilan rapi, mudah diklik, nyaman di mata */
.nav-sub-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6.5px 10px;
  font-size: 13px;
  font-weight: 500;
  color: #64748B;
  text-decoration: none !important;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
  position: relative;
}

.nav-sub-item:hover {
  color: #0F172A !important;
  background: #F1F5F9;
  text-decoration: none !important;
}

.nav-sub-item:hover svg.icon-subnav,
.nav-sub-item:hover .nav-sub-item-icon svg {
  color: #2563EB;
}

/* Sub-Menu yang dipilih: Soft Ice Blue Pill dengan Inset Accent Bar 3px */
.nav-sub-item.active {
  color: #1D4ED8 !important;
  font-weight: 600;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  box-shadow: inset 3px 0 0 #2563EB;
  text-decoration: none !important;
}

.nav-sub-item .nav-sub-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-sub-item svg.icon-subnav,
.nav-sub-item .nav-sub-item-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
  color: #94A3B8;
  transition: color 0.14s ease;
  flex-shrink: 0;
}

.nav-sub-item.active svg.icon-subnav,
.nav-sub-item.active .nav-sub-item-icon svg {
  color: #2563EB;
}

.nav-sub-item-label {
  display: inline-block;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-sub-item-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #CBD5E1;
  transition: background-color 0.14s ease;
  flex-shrink: 0;
}

.nav-sub-item:hover .nav-sub-item-dot {
  background: #2563EB;
}

.nav-sub-item.active .nav-sub-item-dot {
  background: #2563EB;
}

/* ─── Dark Mode Refinements (Swiss Dark Standard) ─── */
[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] a.nav-item:hover,
[data-theme="dark"] .nav-group-header:hover,
[data-theme="dark"] .nav-sub-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #F8FAFC !important;
}

[data-theme="dark"] .nav-item:hover svg,
[data-theme="dark"] a.nav-item:hover svg,
[data-theme="dark"] .nav-group-header:hover svg.icon-nav,
[data-theme="dark"] .nav-sub-item:hover svg.icon-subnav,
[data-theme="dark"] .nav-sub-item:hover .nav-sub-item-icon svg {
  color: #60A5FA;
}

[data-theme="dark"] .nav-item.active,
[data-theme="dark"] a.nav-item.active {
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: inset 3px 0 0 #3B82F6;
  color: #93C5FD !important;
}

[data-theme="dark"] .nav-item.active svg,
[data-theme="dark"] a.nav-item.active svg {
  color: #60A5FA;
}

[data-theme="dark"] .nav-group.open .nav-group-header {
  color: #F8FAFC;
}

[data-theme="dark"] .nav-group.has-active .nav-group-header {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #F8FAFC !important;
}

[data-theme="dark"] .nav-group.has-active .nav-group-header svg.icon-nav,
[data-theme="dark"] .nav-group.has-active .nav-group-header .nav-chevron {
  color: #60A5FA;
}

[data-theme="dark"] .nav-group-children {
  border-left: 1.5px solid #1E293B;
}

[data-theme="dark"] .nav-sub-item.active {
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: inset 3px 0 0 #3B82F6;
  color: #93C5FD !important;
}

[data-theme="dark"] .nav-sub-item.active svg.icon-subnav,
[data-theme="dark"] .nav-sub-item.active .nav-sub-item-icon svg {
  color: #60A5FA;
}

[data-theme="dark"] .nav-sub-item-dot {
  background: #475569;
}

[data-theme="dark"] .nav-sub-item.active .nav-sub-item-dot {
  background: #60A5FA;
}

/* Collapsed Sidebar overrides for Accordion */
body.sidebar-collapsed .nav-group-children {
  display: none !important;
}
body.sidebar-collapsed .nav-group-header .nav-chevron {
  display: none;
}
body.sidebar-collapsed .nav-group-header span {
  display: none;
}
body.sidebar-collapsed .nav-group-header {
  padding: 0;
  height: 38px;
  justify-content: center;
}
body.sidebar-collapsed .nav-group-header .nav-item-left {
  justify-content: center;
  gap: 0;
}

.sidebar-bottom-actions {
  padding: 6px 8px 6px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bottom-item {
  font-size: 12.5px;
  padding: 8px 12px;
}

.nav-badge {
  font-size: 12.5px;
  font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.nav-badge.urgent {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-subtle);
}

.sidebar-footer-stat {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Main Content Area (Horizontally Centered & Bound to Sidebar) */
.main-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  width: calc(100% - var(--sidebar-width));
  min-height: calc(100vh - var(--topbar-height));
  transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 28px 36px 64px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

body.sidebar-collapsed .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

/* Strict horizontal centering & calibrated executive desktop boundaries (Boxed Layout, Anti-Stretching) */
.main-wrapper > * {
  width: 100%;
  max-width: 1540px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@media (min-width: 1920px) {
  .main-wrapper > * {
    max-width: 1560px;
  }
}

@media (min-width: 2560px) {
  .main-wrapper > * {
    max-width: 1620px;
  }
}

/* ==============================================================================
   KHUSUS HALAMAN DAFTAR PROYEK (Portofolio Proyek & Kontrak Kerja):
   Pelebaran body & workstation container agar 11 kolom tabel portofolio
   leluasa, utuh terbaca tanpa terpotong, dan tidak perlu scroll horizontal ke kanan.
   ============================================================================== */
body.page-daftar-proyek-wide .main-wrapper,
body[data-page-path*="/daftar-proyek/"] .main-wrapper,
body[data-page-path*="/proyek/daftar-proyek"] .main-wrapper,
body[data-module="projects"] .main-wrapper {
  padding-left: 20px;
  padding-right: 20px;
}

body.page-daftar-proyek-wide .main-wrapper > *,
body[data-page-path*="/daftar-proyek/"] .main-wrapper > *,
body[data-page-path*="/proyek/daftar-proyek"] .main-wrapper > *,
body[data-module="projects"] .main-wrapper > * {
  max-width: 98.5%;
  width: 100%;
}

@media (min-width: 1600px) {
  body.page-daftar-proyek-wide .main-wrapper > *,
  body[data-page-path*="/daftar-proyek/"] .main-wrapper > *,
  body[data-page-path*="/proyek/daftar-proyek"] .main-wrapper > *,
  body[data-module="projects"] .main-wrapper > * {
    max-width: 99%;
  }
}

@media (min-width: 1920px) {
  body.page-daftar-proyek-wide .main-wrapper > *,
  body[data-page-path*="/daftar-proyek/"] .main-wrapper > *,
  body[data-page-path*="/proyek/daftar-proyek"] .main-wrapper > *,
  body[data-module="projects"] .main-wrapper > * {
    max-width: 1780px;
  }
}

@media (min-width: 2560px) {
  body.page-daftar-proyek-wide .main-wrapper > *,
  body[data-page-path*="/daftar-proyek/"] .main-wrapper > *,
  body[data-page-path*="/proyek/daftar-proyek"] .main-wrapper > *,
  body[data-module="projects"] .main-wrapper > * {
    max-width: 1880px;
  }
}

/* Kalibrasi padding sel tabel khusus portofolio proyek agar efisien & anti-overflow */
body.page-daftar-proyek-wide .cash-table th,
body[data-page-path*="/daftar-proyek/"] .cash-table th,
body[data-page-path*="/proyek/daftar-proyek"] .cash-table th,
body[data-module="projects"] .cash-table th {
  padding: 11px 12px;
}

body.page-daftar-proyek-wide .cash-table td,
body[data-page-path*="/daftar-proyek/"] .cash-table td,
body[data-page-path*="/proyek/daftar-proyek"] .cash-table td,
body[data-module="projects"] .cash-table td {
  padding: 11px 12px;
}

/* Header telemetry strip 5-node proporsional dalam 1 baris eksekutif */
body.page-daftar-proyek-wide .exec-telemetry-strip,
body[data-page-path*="/daftar-proyek/"] .exec-telemetry-strip,
body[data-page-path*="/proyek/daftar-proyek"] .exec-telemetry-strip,
body[data-module="projects"] .exec-telemetry-strip {
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
  body.page-daftar-proyek-wide .exec-telemetry-strip,
  body[data-page-path*="/daftar-proyek/"] .exec-telemetry-strip,
  body[data-page-path*="/proyek/daftar-proyek"] .exec-telemetry-strip,
  body[data-module="projects"] .exec-telemetry-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  body.page-daftar-proyek-wide .exec-telemetry-strip,
  body[data-page-path*="/daftar-proyek/"] .exec-telemetry-strip,
  body[data-page-path*="/proyek/daftar-proyek"] .exec-telemetry-strip,
  body[data-module="projects"] .exec-telemetry-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* Modern View Transition Animation (Zero-Displacement Silky Dissolve) */
@keyframes nsmViewEnter {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.nsm-view-enter {
  animation: nsmViewEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: opacity;
}

.nsm-view-switching {
  opacity: 0.65;
  transition: opacity 0.12s ease-out;
  pointer-events: none;
}

/* Skeleton Loading Shimmer for Instant Seamless Refresh */
@keyframes nsmSkeletonShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: nsmSkeletonShimmer 1.5s ease-in-out infinite;
}

body.dark .skeleton-shimmer {
  background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%);
  background-size: 200% 100%;
}

/* Micro-Interaction Hover Lift for Cards */
.ref-metric-card,
.cash-kpi-card,
.ref-bank-item,
.ref-approval-item,
.dossier-card,
.treasury-card {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.18s ease;
}

.ref-metric-card:hover,
.cash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
}

/* Breadcrumb & Header Bar (Minimalist Executive Standard) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

.page-title-group h1 {
  font-family: var(--font-brand);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 9px;
  line-height: 1.25;
}

.page-title-group h1 svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: var(--primary);
  flex-shrink: 0;
}

.page-title-group p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 3px;
  line-height: 1.5;
  letter-spacing: 0;
}

.page-actions-group,
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Standard Buttons - Ultra-Precise Corporate Architecture */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  font-family: inherit;
  text-decoration: none;
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
}

.btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
  flex-shrink: 0;
  display: block;
}

.btn span {
  display: inline-block;
  line-height: 1;
}

.btn-sm svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
  flex-shrink: 0;
  display: block;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-main);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  background: var(--success-text);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-text);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary-border);
}

.btn-outline-primary:hover {
  background: var(--primary-soft);
}

.btn-outline-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-outline-danger:hover {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  gap: 5px;
  border-radius: 6px;
}

.btn-sm span {
  display: inline-block;
  line-height: 1;
}

/* Standardized Table & List Action Button Group */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  vertical-align: middle;
}

.action-btn-group .btn-sm {
  height: 28px;
  padding: 0 8px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  white-space: nowrap;
}

/* Metric KPI Cards Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  container-type: inline-size;
  container-name: kpiCard;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: clamp(16px, 4cqi, 20px) clamp(16px, 4.5cqi, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px -2px rgba(50, 50, 93, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
  min-width: 0;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px -4px rgba(50, 50, 93, 0.1);
}

/* ==============================================================================
   EXECUTIVE CORPORATE METRIC CARDS (Mature, Clean, Anti-Slop Standard)
   ============================================================================== */
.metric-card.theme-emerald {
  background: var(--surface) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
}

.metric-card.theme-rose {
  background: var(--surface) !important;
  border: 1px solid rgba(124, 58, 237, 0.25) !important;
}

.metric-card.theme-iris,
.metric-card.theme-navy {
  background: var(--surface) !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

.metric-card.theme-amber {
  background: var(--surface) !important;
  border: 1px solid rgba(99, 102, 241, 0.25) !important;
}

.metric-card.theme-cyan,
.metric-card.theme-slate {
  background: var(--surface) !important;
  border: 1px solid rgba(71, 85, 105, 0.25) !important;
}

/* Financial Sparkline Vector Layer */
.metric-card-art {
  position: absolute;
  right: 10px;
  bottom: 6px;
  width: 140px;
  height: 50px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.metric-card:hover .metric-card-art {
  opacity: 1;
  transform: translateY(-1px);
}

.card-art-sparkline {
  width: 100%;
  height: 100%;
  display: block;
}

.card-art-watermark {
  width: 68px;
  height: 68px;
  display: block;
}

.metric-card .metric-header,
.metric-card .metric-value,
.metric-card .metric-footer {
  position: relative;
  z-index: 2;
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.metric-label {
  font-size: clamp(12.5px, 3.5cqi, 14px);
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.metric-icon-box svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.banner-icon-box svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.metric-icon-box.success {
  background: var(--success-soft);
  color: var(--success);
}

.metric-icon-box.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.metric-icon-box.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.metric-icon-box.info {
  background: var(--info-soft);
  color: var(--info);
}

.metric-value {
  font-size: clamp(20px, 8.5cqi, 32px);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 6px;
  word-break: normal;
  overflow-wrap: break-word;
}

.metric-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(12.5px, 3cqi, 14px);
  color: var(--text-muted);
  flex-wrap: wrap;
}

.metric-trend-up {
  color: var(--success);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.metric-trend-down {
  color: var(--danger);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

/* Card Container (Clean Enterprise Architectural Standard) */
.card {
  container-type: inline-size;
  container-name: erpCard;
  background: var(--surface);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  overflow: hidden;
  margin-bottom: 22px;
}

.card-header {
  padding: 14px 20px;
  background: #FAFBFD;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.card-title-group h3 {
  font-size: clamp(14px, 3.5cqi, 16px);
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-group h3 svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  color: var(--primary);
  flex-shrink: 0;
}

.card-title-group p {
  font-size: clamp(12.5px, 2.6cqi, 14px);
  color: var(--text-subtle);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

.card-body.no-padding {
  padding: 0;
}

/* Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

table.data-table th {
  background: var(--canvas);
  color: var(--text-subtle);
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

table.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
  font-size: 12px;
  vertical-align: middle;
  transition: background-color 0.12s ease;
}

table.data-table tbody tr:hover td {
  background-color: var(--surface-hover);
}

table.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Badges - Enterprise Clean Hierarchy (Subtle 5px Radius, Not Pill AI-Slop) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.35;
}

.badge-paid, .badge-online, .badge-completed, .badge-diterima, .badge-ditandatangani {
  background: var(--success-soft);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}

.badge-sent, .badge-dikirim, .badge-in_progress, .badge-diproses {
  background: var(--primary-soft);
  color: var(--primary-text);
  border: 1px solid var(--primary-border);
}

.badge-overdue, .badge-offline, .badge-urgent {
  background: var(--danger-soft);
  color: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.badge-draft, .badge-menunggu, .badge-backlog, .badge-low {
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-warning, .badge-in_review, .badge-medium, .badge-high {
  background: var(--warning-soft);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

/* Enterprise Metadata Breadcrumb Strip (Clean Text Hierarchy - Replaces Pill Clutter) */
.ent-meta-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
}
.ent-meta-strip strong {
  color: #0F172A;
  font-weight: 600;
}
.ent-meta-sep {
  color: #CBD5E1;
  font-size: 12.5px;
}

/* Enterprise Document Attachment Chip (Replaces Rainbow Badges in Modals) */
.ent-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  color: #0F172A;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ent-doc-chip:hover {
  border-color: #94A3B8;
  background: #F8FAFC;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.08);
}
.ent-doc-chip svg {
  color: #64748B;
  flex-shrink: 0;
}
.ent-doc-chip-tag {
  font-size: 12px;
  font-family: var(--font-mono);
  color: #64748B;
  background: #F1F5F9;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Tab Count Indicator (Clean Muted Typography) */
.tab-count-num {
  font-size: 12.5px;
  color: #64748B;
  font-weight: 600;
  margin-left: 4px;
}

/* Fallback subtle tag definitions for legacy .cash-data-* classes */
.cash-data-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
}
.cash-data-context-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
}

/* Enterprise Leadership & Role Label (Subtle, No Candy Background) */
.ent-role-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
}
.ent-role-label.rank-1 { color: #1E40AF; }
.ent-role-label.rank-2 { color: #065F46; }
.ent-role-label.rank-3 { color: #6D28D9; }

/* Inflow / Outflow Pills */
.pill-inflow {
  background: var(--success-soft);
  color: var(--success);
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.pill-outflow {
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

/* Task Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: start;
}

.kanban-column {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.kanban-column-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
}

.kanban-cards-container {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.kanban-card {
  container-type: inline-size;
  container-name: kanbanCard;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: clamp(10px, 3.8cqi, 14px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.15s ease;
  cursor: grab;
  min-width: 0;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.kanban-card-project {
  font-size: clamp(12.5px, 2.8cqi, 14px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
}

.kanban-card-title {
  font-weight: 700;
  font-size: clamp(12.5px, 3.6cqi, 14px);
  color: var(--text-main);
  line-height: 1.35;
}

.kanban-card-desc {
  font-size: clamp(12.5px, 3.2cqi, 14px);
  color: var(--text-muted);
  line-height: 1.4;
}

.kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12.5px;
}

.kanban-assignee {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
}

.kanban-card svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Modal Windows */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99990 !important;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s ease;
}

.modal-backdrop.active .modal-dialog {
  transform: scale(1);
}

.modal-dialog.modal-lg {
  max-width: 900px;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  color: var(--primary);
  flex-shrink: 0;
}

.modal-close-btn {
  background: none;
  border: 1px solid transparent;
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
  border-color: var(--border);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--canvas);
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748B;
  margin-bottom: 6px;
  letter-spacing: 0.015em;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

/* Toast Notification (Mode 1: Pojok Kanan Atas Sesuai Doktrin Pak Dir) */
#toast-container {
  position: fixed;
  top: 76px;
  right: 28px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.08);
  padding: 12px 18px;
  min-width: 320px;
  max-width: 440px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: toast-in-top 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.toast.success { border-left-color: var(--success); }
.toast.danger, .toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes toast-in-top {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Executive Modal Popup Notification (Mode 2: Pop-Up Tengah Layar) */
.nsm-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.nsm-popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.nsm-popup-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.28), 0 8px 18px -4px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 410px;
  padding: 26px 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.nsm-popup-overlay.active .nsm-popup-card {
  transform: scale(1) translateY(0);
}

.nsm-popup-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.nsm-popup-icon-wrap.success {
  background: #ECFDF5;
  color: #10B981;
  border: 1px solid #A7F3D0;
}

.nsm-popup-icon-wrap.danger,
.nsm-popup-icon-wrap.error {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.nsm-popup-icon-wrap.warning {
  background: #FFFBEB;
  color: #F59E0B;
  border: 1px solid #FDE68A;
}

.nsm-popup-icon-wrap.info {
  background: #EEF2FF;
  color: #6366F1;
  border: 1px solid #C7D2FE;
}

.nsm-popup-title {
  font-family: var(--font-brand);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.nsm-popup-msg {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 18px;
  word-break: break-word;
}

.nsm-popup-btn {
  width: 100%;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(96, 96, 224, 0.28);
  transition: all 0.15s ease;
}

.nsm-popup-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(96, 96, 224, 0.38);
}

.nsm-popup-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.nsm-popup-btn-cancel {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border, #E2E8F0);
  background: var(--canvas, #F8FAFC);
  color: var(--text-main, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nsm-popup-btn-cancel:hover {
  background: var(--border, #E2E8F0);
  color: #0F172A;
}

.nsm-popup-btn-confirm {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: var(--primary, #6060E0);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(96, 96, 224, 0.28);
  transition: all 0.15s ease;
}

.nsm-popup-btn-confirm:hover {
  background: var(--primary-hover, #4F46E5);
}

.nsm-popup-btn-confirm.danger {
  background: #E11D48;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
}

.nsm-popup-btn-confirm.danger:hover {
  background: #BE123C;
}

.nsm-popup-btn-confirm.warning {
  background: #D97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}

.nsm-popup-btn-confirm.warning:hover {
  background: #B45309;
}

.nsm-popup-input-wrap {
  width: 100%;
  margin-bottom: 16px;
}

.nsm-popup-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border, #CBD5E1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-main, #0F172A);
  background: var(--surface, #FFFFFF);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nsm-popup-input:focus {
  border-color: var(--primary, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.nsm-popup-close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.nsm-popup-close-x:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

/* Kolom Belum Terisi: Aksen Merah Lembut Sesuai Arahan Pak Dir */
.form-control.emp-field-unfilled,
input.emp-field-unfilled,
select.emp-field-unfilled,
textarea.emp-field-unfilled {
  border-color: #F43F5E !important;
  background-color: #FFF5F5 !important;
  box-shadow: 0 0 0 1px rgba(244, 63, 94, 0.22) !important;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="dark"] .form-control.emp-field-unfilled,
[data-theme="dark"] input.emp-field-unfilled,
[data-theme="dark"] select.emp-field-unfilled,
[data-theme="dark"] textarea.emp-field-unfilled {
  border-color: #E11D48 !important;
  background-color: rgba(225, 29, 72, 0.12) !important;
  box-shadow: 0 0 0 1px rgba(225, 29, 72, 0.35) !important;
}

.form-control.emp-field-unfilled:focus,
input.emp-field-unfilled:focus,
select.emp-field-unfilled:focus {
  border-color: #E11D48 !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25) !important;
}

/* Print Invoice Styling */
@media print {
  .topbar, .sidebar, .page-actions-group, .btn, #toast-container {
    display: none !important;
  }
  .main-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: var(--shadow-modal);
  }
  .topbar {
    left: 0 !important;
    width: 100% !important;
    padding: 0 16px;
  }
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 16px 16px 48px;
  }
  .kanban-board {
    grid-template-columns: 1fr;
  }
  .topbar-center {
    display: none;
  }
}

/* ==============================================================================
   Bagan Struktur Perusahaan & Naungan Jabatan (Visual Canvas) - Equal Co-Owners
   ============================================================================== */
.org-canvas-viewport {
  position: relative;
  background-color: var(--canvas);
  background-image: radial-gradient(var(--border-strong) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 32px 24px 44px;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 480px;
}

.org-board-header {
  text-align: center;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-board-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-pill);
  font-family: var(--font-brand);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.org-board-subtitle {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.org-grid-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  min-width: 900px;
  align-items: start;
}

.org-column,
.org-pillar-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
}

.org-card {
  container-type: inline-size;
  container-name: orgCard;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(12px, 4cqi, 16px) clamp(14px, 4.5cqi, 18px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  width: 100%;
}

.org-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
  border-color: var(--primary);
}

.org-card.owner-card {
  border: 1.5px solid var(--primary-border);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(37, 99, 235, 0.03) 100%);
}

.org-card.owner-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.16);
}

.org-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.org-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.org-card-info {
  overflow: hidden;
  flex: 1;
}

.org-card-name {
  font-weight: 600;
  font-size: clamp(12.5px, 4cqi, 14px);
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-card-user {
  font-size: clamp(12.5px, 3.2cqi, 14px);
  color: var(--primary);
  font-family: var(--font-brand);
  font-weight: 700;
}

.org-card-body {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.org-card-title {
  font-size: clamp(12.5px, 3.6cqi, 14px);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.org-card-div {
  font-size: clamp(12.5px, 3.2cqi, 14px);
  color: var(--text-muted);
}

.org-card-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  width: fit-content;
  margin-top: 4px;
}

.org-card-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Vertical Straight Connector Line */
.org-stem,
.org-pillar-stem {
  width: 2px;
  height: 28px;
  background: var(--primary);
}

.org-subordinates-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.org-sub-stem {
  width: 2px;
  height: 20px;
  background: var(--primary);
}

.org-card.sub-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 14px 16px;
}

.org-card.sub-card:hover {
  border-color: var(--primary);
}

.view-mode-toggle {
  display: flex;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.view-mode-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.view-mode-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ==============================================================================
   ULTRA-MODERN EXECUTIVE FINTECH DASHBOARD (Ref: Modern Clean Inspiring UI/UX)
   ============================================================================== */

.fin-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

/* ROW 1: Hero Grid */
.fin-hero-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* Dark Executive Balance Card */
.fin-hero-dark-card {
  container-type: inline-size;
  container-name: heroCard;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 55%, #1E3A8A 100%);
  border-radius: 16px;
  padding: 18px 24px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(11, 19, 43, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.fin-hero-dark-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.fin-hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
}

.fin-hero-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fin-hero-label {
  font-size: clamp(12.5px, 2.8cqi, 15px);
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: 0.02em;
}

.fin-eye-btn {
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.fin-eye-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.1);
}

.fin-pill-badge.success {
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  font-size: clamp(12.5px, 2.4cqi, 14px);
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.fin-hero-val-row {
  margin: clamp(10px, 2.5cqi, 16px) 0 clamp(12px, 3cqi, 20px);
  z-index: 2;
}

.fin-hero-val {
  font-family: var(--font-brand);
  font-size: clamp(26px, 6.2cqi, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  line-height: 1.15;
  word-break: normal;
  overflow-wrap: break-word;
}

.fin-hero-sub {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(12.5px, 2.6cqi, 14.5px);
  flex-wrap: wrap;
}

.fin-hero-sub .trend-up {
  color: var(--success-text);
  font-weight: 700;
}

.fin-hero-sub .trend-amount {
  color: #94A3B8;
}

.fin-hero-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}

.fin-timeframe-pills {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.fin-time-pill {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: clamp(12.5px, 2.2cqi, 14px);
  font-weight: 700;
  padding: clamp(4px, 0.9cqi, 5px) clamp(8px, 2cqi, 12px);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.fin-time-pill:hover {
  color: #FFFFFF;
}

.fin-time-pill.active {
  background: #3B82F6;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.45);
}

.fin-hero-sparkline {
  width: 140px;
  height: 46px;
}
.fin-sparkline-svg {
  width: 100%;
  height: 100%;
}

/* Goal Progress Card */
.fin-goal-card {
  container-type: inline-size;
  container-name: goalCard;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-width: 0;
  padding: 18px 22px;
}

.fin-goal-body {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3.5cqi, 20px);
  margin-top: 10px;
  flex: 1;
}

.fin-radial-box {
  position: relative;
  width: clamp(84px, 20cqi, 108px);
  height: clamp(84px, 20cqi, 108px);
  flex-shrink: 0;
}

.fin-radial-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fin-radial-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 9;
}

.fin-radial-progress {
  fill: none;
  stroke: #6366F1;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 251.2;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fin-radial-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fin-radial-percent {
  font-family: var(--font-brand);
  font-size: clamp(18px, 6.2cqi, 24px);
  font-weight: 600;
  color: var(--text-main);
}

.fin-goal-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fin-goal-subtitle {
  font-size: clamp(13.5px, 3.8cqi, 16px);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.fin-goal-numbers {
  font-size: clamp(16.5px, 5.5cqi, 24px);
  color: var(--primary);
  font-family: var(--font-brand);
  line-height: 1.25;
}

.fin-goal-target-max {
  font-size: clamp(12.5px, 3.4cqi, 15px);
  color: var(--text-subtle);
  font-weight: 500;
}

.fin-goal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(12.5px, 2.8cqi, 14px);
  color: var(--text-muted);
  margin-top: 4px;
  flex-wrap: wrap;
}

.fin-goal-status .status-dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

/* General Fin Card */
.fin-card {
  container-type: inline-size;
  container-name: finCard;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(14px, 3.5cqi, 20px) clamp(14px, 4cqi, 22px);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.fin-card:hover {
  box-shadow: 0 8px 26px -4px rgba(0, 0, 0, 0.06);
}

.fin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.fin-card-title {
  font-size: clamp(13px, 3.4cqi, 14.5px);
  font-weight: 600;
  font-family: var(--font-brand);
  color: var(--text-main);
}

.fin-card-link {
  font-size: clamp(12.5px, 2.6cqi, 14px);
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}
.fin-card-link:hover {
  text-decoration: underline;
}

/* ROW 2: 4 Metrics Strip */
.fin-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.fin-metric-card {
  container-type: inline-size;
  container-name: metricCard;
  padding: clamp(14px, 4.5cqi, 20px) clamp(14px, 5cqi, 22px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  min-height: 126px;
  justify-content: space-between;
}

.fin-metric-top {
  display: flex;
  align-items: center;
  gap: clamp(8px, 3cqi, 12px);
}

.fin-metric-icon-wrap {
  width: clamp(34px, 11cqi, 40px);
  height: clamp(34px, 11cqi, 40px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Fin metric icon: semua pakai primary blue atau teal seirama — tidak ada hue ke-3+ */
.fin-metric-icon-wrap.violet  { background: var(--primary-soft);   color: var(--primary); }
.fin-metric-icon-wrap.cyan    { background: var(--primary-soft);   color: var(--primary); }
.fin-metric-icon-wrap.purple  { background: var(--primary-soft);   color: var(--primary-dark); }
.fin-metric-icon-wrap.emerald { background: var(--success-soft);   color: var(--success); }

[data-theme="dark"] .fin-metric-icon-wrap.violet  { background: var(--primary-soft);  color: var(--primary-text); }
[data-theme="dark"] .fin-metric-icon-wrap.cyan    { background: var(--primary-soft);  color: var(--primary-text); }
[data-theme="dark"] .fin-metric-icon-wrap.purple  { background: var(--primary-soft);  color: var(--primary-text); }
[data-theme="dark"] .fin-metric-icon-wrap.emerald { background: var(--success-soft);  color: var(--success-text); }

.fin-metric-label {
  font-size: clamp(12.5px, 4.2cqi, 14px);
  font-weight: 600;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-metric-val {
  font-family: var(--font-brand);
  font-size: clamp(18px, 9cqi, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-top: clamp(4px, 1.5cqi, 8px);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-metric-trend {
  font-size: clamp(12.5px, 3.8cqi, 14px);
  font-weight: 700;
  white-space: nowrap;
  margin-top: 2px;
}

.fin-metric-trend.up   { color: var(--success); }
.fin-metric-trend.down { color: var(--danger); }

/* ROW 3: Charts Grid */
.fin-charts-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.fin-chart-header-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.fin-chart-total {
  font-family: var(--font-brand);
  font-size: clamp(18px, 5.2cqi, 26px);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.fin-chart-pct {
  font-size: clamp(12.5px, 3.2cqi, 14.5px);
  font-weight: 700;
  color: var(--success-text);
  white-space: nowrap;
}

.fin-dropdown-btn {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.fin-dropdown-btn:hover {
  background: var(--surface-hover);
  color: var(--text-main);
}

.fin-chart-viewport {
  width: 100%;
  height: 200px;
  margin-top: 10px;
  position: relative;
}

.fin-perf-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.fin-grid-line {
  stroke: var(--border);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.fin-axis-label {
  font-size: 12px;
  font-family: var(--font-sans);
  fill: var(--text-subtle);
}

.fin-month-labels text {
  font-size: 12px;
  font-weight: 600;
  fill: var(--text-subtle);
  font-family: var(--font-sans);
}

/* Donut Chart Styling */
.fin-alloc-body {
  display: flex;
  align-items: center;
  gap: clamp(16px, 4cqi, 28px);
  margin-top: 14px;
}

.fin-donut-box {
  position: relative;
  width: 155px;
  height: 155px;
  flex-shrink: 0;
}

.fin-donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.fin-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.fin-donut-val {
  font-family: var(--font-brand);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.15;
  white-space: nowrap;
}

.fin-donut-sub {
  font-size: clamp(12.5px, 2.2cqi, 14px);
  font-weight: 600;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.fin-alloc-legend {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.8cqi, 10px);
  flex: 1;
  min-width: 0;
}

.fin-legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: clamp(12.5px, 3cqi, 14px);
}

.fin-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.fin-legend-bullet {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fin-legend-name {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: clamp(160px, 42cqi, 280px);
  font-size: clamp(12.5px, 3cqi, 14px);
}

.fin-legend-pct {
  font-weight: 700;
  color: var(--text-main);
  font-size: clamp(12.5px, 3cqi, 14px);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ROW 4: 3 Operational Detail Widgets */
.fin-tri-widgets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.fin-table-header-mini {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  font-size: clamp(12.5px, 2.6cqi, 14px);
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.fin-watchlist-list,
.fin-tx-list,
.fin-insights-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fin-watchlist-item {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.fin-watchlist-item:last-child {
  border-bottom: none;
}

.fin-watch-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.fin-watch-sym-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--canvas);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  flex-shrink: 0;
}

.fin-watch-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fin-watch-sym {
  font-size: clamp(12.5px, 2.8cqi, 14px);
  font-weight: 600;
  color: var(--text-main);
}

.fin-watch-name {
  font-size: clamp(12.5px, 2.4cqi, 14px);
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-watch-price {
  font-size: clamp(12.5px, 2.8cqi, 14px);
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
}

.fin-watch-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.fin-watch-badge {
  font-size: clamp(12.5px, 2.2cqi, 14px);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.fin-watch-badge.up {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success-text);
}
.fin-watch-badge.down {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
}

/* Recent Transactions */
.fin-tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.fin-tx-item:last-child {
  border-bottom: none;
}

.fin-tx-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fin-tx-icon.in {
  background: var(--success-soft);
  color: var(--success);
}
.fin-tx-icon.out {
  background: var(--danger-soft);
  color: var(--danger);
  transform: rotate(90deg);
}

[data-theme="dark"] .fin-tx-icon.in  { background: var(--success-soft); color: var(--success-text); }
[data-theme="dark"] .fin-tx-icon.out { background: var(--danger-soft);  color: var(--danger-text); }

.fin-tx-info {
  flex: 1;
  overflow: hidden;
}

.fin-tx-title {
  font-size: clamp(12.5px, 3cqi, 14px);
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fin-tx-sub {
  font-size: clamp(12.5px, 2.5cqi, 14px);
  color: var(--text-subtle);
  white-space: nowrap;
}

.fin-tx-amount {
  font-family: var(--font-brand);
  font-size: clamp(12.5px, 3cqi, 14px);
  font-weight: 600;
  white-space: nowrap;
}
.fin-tx-amount.plus {
  color: var(--success-text);
}
.fin-tx-amount.minus {
  color: #0F172A;
}
[data-theme="dark"] .fin-tx-amount.minus {
  color: #F1F5F9;
}

/* Market Insights */
.fin-insight-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.fin-insight-item:last-child {
  border-bottom: none;
}

.fin-insight-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fin-insight-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fin-insight-title {
  font-size: clamp(12.5px, 2.8cqi, 14px);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.fin-insight-snippet {
  font-size: clamp(12.5px, 2.5cqi, 14px);
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.fin-insight-time {
  font-size: clamp(12.5px, 2.2cqi, 14px);
  color: var(--text-subtle);
  margin-top: 2px;
}

/* ========================================================================== */
/* RESPONSIVE CARD CONTAINER QUERIES & BREAKPOINTS (Uci Responsive Engine)    */
/* ========================================================================== */

@container metricCard (max-width: 220px) {
  .fin-metric-card {
    padding: 12px 14px;
    gap: 4px;
  }
  .fin-metric-icon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }
  .fin-metric-icon-wrap svg {
    width: 15px;
    height: 15px;
  }
}

@container metricCard (max-width: 175px) {
  .fin-metric-card {
    padding: 10px 10px;
    gap: 3px;
  }
  .fin-metric-val {
    font-size: 13.5px;
  }
  .fin-metric-label {
    font-size: 12px;
  }
  .fin-metric-trend {
    font-size: 12px;
  }
}

@container heroCard (max-width: 480px) {
  .fin-hero-dark-card {
    padding: 16px;
    min-height: auto;
  }
  .fin-hero-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .fin-hero-sparkline {
    width: 100%;
    height: 36px;
  }
  .fin-timeframe-pills {
    width: 100%;
    justify-content: space-between;
  }
  .fin-time-pill {
    flex: 1;
    text-align: center;
    padding: 5px 2px;
  }
}

@container goalCard (max-width: 330px) {
  .fin-goal-body {
    gap: 12px;
  }
  .fin-radial-box {
    width: 76px;
    height: 76px;
  }
}

@container goalCard (max-width: 260px) {
  .fin-goal-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@container finCard (max-width: 340px) {
  .fin-alloc-body {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .fin-legend-name {
    max-width: 140px;
  }
  .fin-donut-box {
    width: 120px;
    height: 120px;
  }
}

@container erpCard (max-width: 480px) {
  .card-header {
    padding: 12px 14px;
  }
  .card-body {
    padding: 14px;
  }
}

/* ========================================================================== */
/* RESPONSIVE VIEWPORT BREAKPOINTS                                            */
/* ========================================================================== */

@media (max-width: 1280px) {
  .fin-metrics-strip {
    gap: 14px;
  }
}

@media (max-width: 1140px) {
  .fin-hero-grid {
    grid-template-columns: 1fr;
  }
  .fin-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .fin-charts-grid {
    grid-template-columns: 1fr;
  }
  .fin-tri-widgets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .fin-metrics-strip {
    grid-template-columns: 1fr;
  }
  .topbar-center-search {
    display: none;
  }
  .fin-hero-val-row {
    margin: 10px 0 14px;
  }
}

/* ========================================================================== */
/* LOGIN SCREEN & AUTHENTICATION PORTAL                                       */
/* ========================================================================== */

/* Auth gate: the backoffice shell (topbar, sidebar, content stage) stays hidden
   until a session is confirmed. `auth-locked` is applied by app.js bootstrap /
   checkAuthState, removed on a successful login and re-applied on logout. Making
   it the default state prevents the sidebar from flashing behind the login
   portal on first paint, before app.js has run. */
/* Strict Auth Gate: backoffice shell (#app, sidebar, topbar, content) is 100% hidden
   when auth-locked. Absolutely no leakage can occur. */
body.auth-locked #app,
body.auth-locked #sidebar,
body.auth-locked .sidebar,
body.auth-locked .topbar,
body.auth-locked .main-wrapper,
body.auth-locked .modal-backdrop {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.auth-locked #login-screen {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body:not(.auth-locked) #login-screen {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body:not(.auth-locked) #app {
  display: flex !important;
}

.login-screen-wrapper {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.login-backdrop-glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 350px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.16) 0%, rgba(37, 99, 235, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.login-card-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 410px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 38px 32px 30px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 0 4px 16px -2px rgba(15, 23, 42, 0.03);
}

.login-brand-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.login-logo-img {
  height: 50px;
  object-fit: contain;
}

.login-title {
  font-family: var(--font-brand);
  font-size: clamp(17px, 1.5vw + 14px, 22px);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: clamp(12.5px, 0.4vw + 10.5px, 14px);
  color: var(--text-muted);
  line-height: 1.4;
}

.login-alert-box {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 18px;
  line-height: 1.35;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
  margin-bottom: 2px;
}

.login-remember-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.login-checkbox {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.login-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-subtle);
  font-weight: 500;
}

.login-pwd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  display: flex;
  align-items: center;
  color: var(--text-subtle);
  pointer-events: none;
}

.login-input {
  padding-left: 42px !important;
  padding-right: 44px !important;
  height: 46px;
  font-size: 13.5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--canvas);
  transition: all 0.2s ease;
}

.login-input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(96, 96, 224, 0.15);
}

.pwd-toggle-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.pwd-toggle-btn:hover {
  color: var(--text-main);
}

.login-submit-btn {
  width: 100%;
  height: 46px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  cursor: pointer;
  background: var(--primary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(96, 96, 224, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-submit-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(96, 96, 224, 0.36);
  transform: translateY(-1px);
}

.login-submit-btn:active {
  transform: scale(0.99);
}

.login-quick-section {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border);
}

.login-quick-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.login-quick-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.login-quick-pill {
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-quick-pill:hover {
  background: var(--surface-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.login-quick-pill.active {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.login-footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-subtle);
  margin-top: 18px;
}

.login-footer-note svg {
  color: var(--text-subtle);
}

/* ========================================================================== */
/* SETTINGS & PROFILE VIEW STYLING                                            */
/* ========================================================================== */

.settings-hero-card {
  background: linear-gradient(140deg, #EFF6FF 0%, #DBEAFE 55%, #BFDBFE 100%);
  border: 1px solid #BFDBFE;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.08);
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
}

.settings-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.settings-avatar-circle {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #FFFFFF;
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
  overflow: hidden;
}

.settings-photo-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.settings-photo-preview {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--primary-border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.settings-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

.settings-preview-init {
  font-size: 18px;
  font-weight: 700 !important;
  color: var(--primary);
  font-family: var(--font-brand);
}

.settings-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-photo-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-photo-hint {
  font-size: 12.5px;
  color: var(--text-subtle);
}

.settings-hero-name {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.settings-hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.settings-badge-role {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.settings-user-tag {
  font-size: 12px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.settings-status-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--success);
}

.settings-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.settings-div-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
}

.settings-job-tag {
  font-size: 12px;
  color: var(--text-subtle);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.settings-card {
  padding: 0;
  overflow: hidden;
}

.settings-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

.notice-icon {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.45;
}

.notice-text code {
  background: rgba(37, 99, 235, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .form-control {
  padding-right: 42px;
}

.password-input-wrap .pwd-toggle-btn {
  right: 10px;
}

.input-with-badge {
  position: relative;
  display: flex;
  align-items: center;
}

.field-fixed-badge {
  position: absolute;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-subtle);
  background: var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.settings-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ========================================================================== */
/* TOPBAR USER PROFILE DROPDOWN WIDGET                                        */
/* ========================================================================== */

.user-profile-widget-container {
  position: relative;
}

.user-selector-menu {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.user-selector-menu:hover {
  background: var(--surface-hover, var(--canvas));
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.user-menu-chevron {
  color: var(--text-subtle);
  transition: transform 0.2s ease;
  margin-left: 2px;
}

.user-profile-widget-container.active .user-menu-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 8px;
  z-index: 1000;
  animation: dropdown-pop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

@keyframes dropdown-pop {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
}

.dropdown-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #2563EB;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  flex-shrink: 0;
}

.dropdown-user-meta {
  min-width: 0;
  flex: 1;
}

.dropdown-user-name {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-role {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1px;
}

.dropdown-user-tag {
  font-size: 12.5px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 2px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9.5px 12px;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.dropdown-item svg {
  color: var(--text-subtle);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.dropdown-item:hover {
  background: var(--canvas);
  color: var(--primary);
}

.dropdown-item:hover svg {
  color: var(--primary);
}

.dropdown-item-danger {
  color: var(--danger) !important;
}

.dropdown-item-danger svg {
  color: var(--danger) !important;
}

.dropdown-item-danger:hover {
  background: rgba(239, 68, 68, 0.08) !important;
  color: var(--danger) !important;
}

/* ========================================================================== */
/* SETTINGS HERO ACTION BUTTONS                                               */
/* ========================================================================== */

.settings-meta-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.settings-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hero-pill svg {
  flex-shrink: 0;
}

.btn-hero-pill.secondary:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-hero-pill.danger {
  border-color: rgba(239, 68, 68, 0.25);
  color: var(--danger);
  background: rgba(239, 68, 68, 0.04);
}

.btn-hero-pill.danger:hover {
  background: var(--danger);
  color: #FFFFFF;
  border-color: var(--danger);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
  transform: translateY(-1px);
}

/* ========================================================================== */
/* SWITCH USER MODAL CARDS                                                    */
/* ========================================================================== */

.user-switch-card {
  padding: 12px 16px;
  background: var(--canvas);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-switch-card:hover {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.user-switch-card.active-user {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.05);
  box-shadow: 0 0 0 1px var(--primary);
}

.user-switch-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-switch-name {
  font-weight: 600;
  font-family: var(--font-brand);
  font-size: 13.5px;
  color: var(--text-main);
}

.user-switch-role {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1px;
}

.user-switch-holder {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin-top: 1px;
}

@media (max-width: 860px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .settings-hero-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-hero-right {
    align-items: flex-start;
    width: 100%;
  }
  .settings-meta-box {
    align-items: flex-start;
  }
  .settings-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}



/* Topbar Page Heading (Bold per Pak Dir Directive; 2x subtitle ~16px) */
.topbar-heading-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.topbar-page-title,
h1.topbar-page-title {
  font-family: var(--font-brand);
  font-size: clamp(15px, 0.5vw + 13px, 18px) !important;
  font-weight: 700 !important;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none !important;
  margin: 0;
  padding: 0;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.topbar-page-subtitle,
p.topbar-page-subtitle {
  font-size: 13px !important;
  color: var(--text-muted);
  font-weight: 400 !important;
  line-height: 1.35;
  margin: 2px 0 0 0;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 720px;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sidebar Brand Name (Bold per Pak Dir Directive; sejajar header title 16px) */
.sidebar-brand-name,
div.sidebar-brand-name {
  font-family: var(--font-family);
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.15;
  text-transform: uppercase;
}



/* ==============================================================================
   EXECUTIVE MODULE HERO HEADER (Matching Reference Standard)
   ============================================================================== */
.module-hero-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding: 2px 0 0;
  width: 100%;
}

.module-hero-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 3px 10px;
  border-radius: 9999px;
  width: fit-content;
}

.module-hero-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.25;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.module-hero-title svg {
  color: var(--primary);
  flex-shrink: 0;
}

.module-hero-subtitle {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  max-width: 650px;
}

.module-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0F172A;
  color: #FFFFFF !important;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px -1px rgba(15, 23, 42, 0.20);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-primary:hover {
  background: #1E293B;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(15, 23, 42, 0.30);
  color: #FFFFFF !important;
}

.btn-hero-primary svg {
  stroke: #FFFFFF;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  color: var(--text-main) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* Subpage Action Bar */
.subpage-action-bar,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.page-header .page-title-group {
  display: none !important;
}

.subpage-action-bar .page-actions,
.page-header .page-actions,
.page-header .page-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.subpage-meta-counter {
  font-size: 12px;
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px solid #EAEFF6;
  padding: 6px 14px;
  border-radius: 9999px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.subpage-meta-counter .dot-active {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ─── Enterprise Universal UI Enhancements ───────────────────────────────── */
.erp-search-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.erp-search-box svg {
  position: absolute;
  left: 11px;
  color: var(--text-subtle);
  pointer-events: none;
}
.erp-search-box input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 7px 16px 7px 34px;
  font-size: 13.5px;
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 210px;
}
.erp-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  width: 260px;
}
.erp-search-box input::placeholder {
  color: var(--text-subtle);
}

/* Filter Pill Segments */
.filter-pill-group {
  display: inline-flex;
  align-items: center;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 4px;
  gap: 3px;
}
.filter-pill-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.filter-pill-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}
.filter-pill-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.filter-pill-count {
  font-size: 12.5px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: var(--canvas);
  color: var(--text-subtle);
}
.filter-pill-btn.active .filter-pill-count {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Table Footer Summary */
.table-footer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  background: var(--canvas);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Enhanced Empty State */
.table-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-subtle);
}
.table-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-hover);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.table-empty-title {
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.table-empty-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto 16px;
  line-height: 1.5;
}

/* Enhanced Kanban Polish */
.kanban-card {
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  padding: 14px !important;
}
.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
}
.kanban-column {
  border-radius: 16px !important;
  background: var(--canvas) !important;
}
.kanban-column-header {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: var(--surface);
  padding: 12px 16px;
}

/* Priority Border accents for Kanban Cards (Clean Corporate Standard) */
.kanban-card.prio-urgent {
  border: 1px solid #E2E8F0 !important;
}
.kanban-card.prio-urgent:hover {
  border-left-color: #5B21B6 !important;
  box-shadow: 0 4px 12px -2px rgba(109, 40, 217, 0.12) !important;
}

.kanban-card.prio-high {
  border: 1px solid #E2E8F0 !important;
}
.kanban-card.prio-high:hover {
  border-left-color: #4F46E5 !important;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.12) !important;
}

.kanban-card.prio-medium {
  border: 1px solid #E2E8F0 !important;
}
.kanban-card.prio-medium:hover {
  border-left-color: #1D4ED8 !important;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.12) !important;
}

.kanban-card.prio-normal {
  border: 1px solid #E2E8F0 !important;
}

/* ==============================================================================
   EXECUTIVE COMMAND DASHBOARD (SWISS ENTERPRISE SAAS)
   Doktrin: Clean Swiss Monolith, High Contrast Typography, Zero AI-Slop
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   ============================================================================== */

/* Master Container */
.dash-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 4px 0 40px;
  color: var(--text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

/* 1. EXECUTIVE COMMAND HEADER */
/* 1. EXECUTIVE COMMAND HEADER: Royal Iris Purple & CS Assistant (Hostinger/Iris Standards) */
.dash-exec-header {
  background: linear-gradient(135deg, #6060E0 0%, #5B4DF5 45%, #4338CA 100%);
  border-radius: 20px;
  padding: clamp(22px, 2vw + 14px, 28px) clamp(22px, 2.5vw + 14px, 32px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(20px, 2.5vw, 36px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 14px 34px -6px rgba(96, 96, 224, 0.35);
  position: relative;
  overflow: visible;
}

.dash-exec-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 20px;
}

.dash-exec-lead {
  flex: 1 1 auto;
  min-width: 0;
  z-index: 1;
}

.dash-exec-date-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 10px;
}

.dash-exec-date-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-exec-date-text {
  color: #FFFFFF;
}

.dash-exec-date-sep {
  opacity: 0.5;
}

.dash-exec-date-qtr {
  color: #FDE047;
  font-weight: 700;
}

.dash-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.dash-status-chip.is-online {
  background: rgba(16, 185, 129, 0.2);
  color: #A7F3D0;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.dash-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
}

.dash-status-chip.is-secure {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.dash-exec-title {
  font-size: clamp(20px, 1.3vw + 16px, 26px);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.dash-exec-desc {
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 640px;
}

.dash-exec-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

.dash-exec-actions-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  text-align: left;
}

.dash-exec-actions-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.dash-action-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.dash-action-btn:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.28);
}

.dash-btn-icon-rich {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.dash-action-btn:hover .dash-btn-icon-rich {
  transform: scale(1.1);
}

/* Executive CS Assistant Art & Speech Bubble */
.dash-exec-art {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 5;
}

.dash-exec-avatar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-exec-avatar-img {
  height: clamp(140px, 12vw, 185px);
  max-height: 185px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(17, 18, 30, 0.35));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  z-index: 2;
  display: block;
}

.dash-exec-avatar-img:hover {
  transform: translateY(-4px) scale(1.03);
}

/* Floating Executive Speech Bubble Card */
.ref-hero-speech-bubble {
  display: block;
  position: relative;
  width: clamp(240px, 19vw, 290px);
  max-width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 14px 32px -4px rgba(17, 18, 30, 0.22), 0 0 0 1px rgba(96, 96, 224, 0.1);
  z-index: 5;
  pointer-events: auto;
  text-align: left;
  cursor: default;
  user-select: none;
  animation: ref-bubble-float 4s ease-in-out infinite alternate;
}

.ref-hero-speech-bubble:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -4px rgba(17, 18, 30, 0.26), 0 0 0 1px rgba(96, 96, 224, 0.16);
}

.ref-hero-speech-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 8px solid rgba(255, 255, 255, 0.98);
}

.ref-bubble-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ref-bubble-status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: ref-pulse-glow 2s infinite;
}

.ref-bubble-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #475569;
  text-transform: uppercase;
}

.ref-bubble-text {
  font-size: clamp(11px, 0.35vw + 10px, 12px);
  color: #1E293B;
  line-height: 1.5;
  font-weight: 500;
  margin: 0;
}

@keyframes ref-bubble-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-5px); }
}

@keyframes ref-pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

[data-theme="dark"] .ref-hero-speech-bubble {
  background: rgba(15, 23, 42, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 32px -4px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(96, 96, 224, 0.25);
}

[data-theme="dark"] .ref-hero-speech-bubble::after {
  border-left-color: rgba(15, 23, 42, 0.96);
}

[data-theme="dark"] .ref-bubble-title {
  color: #94A3B8;
}

[data-theme="dark"] .ref-bubble-text {
  color: #E2E8F0;
}


/* 2. EXECUTIVE 4-KPI METRIC GRID (COMPACT & HIGH-DENSITY, NO-SLOP, UNIFORM BORDER) */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dash-kpi-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 80px;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -2px rgba(15, 23, 42, 0.06);
  border-color: #CBD5E1;
}

.dash-kpi-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.dash-kpi-header-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.dash-kpi-icon-wrap {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: none;
}

.dash-kpi-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.dash-kpi-eye-btn {
  background: transparent;
  border: 1px solid #E2E8F0;
  color: #64748B;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.dash-kpi-eye-btn:hover {
  background: #EFF6FF;
  color: #2563EB;
  border-color: #BFDBFE;
}

.dash-kpi-val {
  font-size: 19px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
  margin: 2px 0 1px;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-sub {
  font-size: 11px;
  font-weight: 500;
  color: #64748B;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dark mode overrides for 4-KPI */
[data-theme="dark"] .dash-kpi-card {
  background: #1E293B;
  border-color: #334155;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .dash-kpi-card:hover {
  box-shadow: 0 6px 14px -2px rgba(0, 0, 0, 0.4);
  border-color: #475569;
}

[data-theme="dark"] .dash-kpi-label {
  color: #94A3B8;
}

[data-theme="dark"] .dash-kpi-val {
  color: #F8FAFC;
}

[data-theme="dark"] .dash-kpi-sub {
  color: #94A3B8;
}

[data-theme="dark"] .dash-kpi-eye-btn {
  border-color: #334155;
  color: #94A3B8;
}

[data-theme="dark"] .dash-kpi-eye-btn:hover {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border-color: #3B82F6;
}

/* 3. TARGET REALISASI PENDAPATAN Q3 (RUNWAY STRIP — COMPACT & SLEEK) */
.dash-runway-strip {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
}

.dash-runway-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-runway-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.dash-runway-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.dash-runway-sep {
  color: #CBD5E1;
  font-size: 11px;
}

.dash-runway-desc {
  font-size: 11.5px;
  color: #64748B;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-runway-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.dash-runway-percent {
  font-size: 14.5px;
  font-weight: 800;
  color: #2563EB;
  font-variant-numeric: tabular-nums;
}

.dash-runway-target-label {
  font-size: 11.5px;
  color: #64748B;
}

.dash-runway-target-label strong {
  color: #0F172A;
  font-weight: 700;
}

.btn-target-adjust {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #2563EB;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-target-adjust:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

.dash-progress-track {
  width: 100%;
  height: 5px;
  border-radius: 9999px;
  background: #E2E8F0;
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563EB 0%, #3B82F6 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.dash-runway-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748B;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-runway-footer strong {
  color: #0F172A;
  font-weight: 700;
}

.dash-runway-link {
  font-size: 11px;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
  transition: color 0.15s ease;
}

.dash-runway-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

.dash-runway-note {
  color: #94A3B8;
  font-size: 11px;
}

[data-theme="dark"] .dash-runway-strip {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .dash-runway-title {
  color: #F8FAFC;
}

[data-theme="dark"] .dash-runway-desc {
  color: #94A3B8;
}

[data-theme="dark"] .dash-runway-sep {
  color: #475569;
}

[data-theme="dark"] .dash-runway-target-label strong,
[data-theme="dark"] .dash-runway-footer strong {
  color: #F8FAFC;
}

[data-theme="dark"] .dash-progress-track {
  background: #334155;
}

[data-theme="dark"] .btn-target-adjust {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
  color: #93C5FD;
}

[data-theme="dark"] .btn-target-adjust:hover {
  background: #2563EB;
  color: #FFFFFF;
}

/* 4. TWO-COLUMN SPLIT: MAIN WORKSPACE & RIGHT EXECUTIVE RAIL */
.dash-split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.dash-main-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.dash-rail-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 76px;
}

/* Standard Section Cards */
.dash-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.dash-card-header {
  padding: 16px 22px;
  border-bottom: 1px solid #E2E8F0;
  background: #FAFAFC;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.dash-card-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-card-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-card-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.dash-card-subtitle {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

.btn-dash-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #2563EB;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.15s ease;
  font-family: var(--font-family);
}

.btn-dash-link:hover {
  background: #EFF6FF;
  color: #1D4ED8;
}

.dash-card-body {
  padding: 20px 22px;
}

/* Empty States */
.dash-empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dash-empty-state.in-table {
  padding: 36px 16px;
}

.dash-empty-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.dash-empty-icon-wrap.sm {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.dash-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 6px;
}

.dash-empty-desc {
  font-size: 13.5px;
  color: #64748B;
  max-width: 520px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.dash-empty-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==============================================================================
   NSM - ERP SYSTEM — 1-Row 4-Card Executive Project Strip (Swiss SaaS Minimalist)
   Ultra-Compact, Fast-Scan Highlights, Single-Row Desktop Presentation
   ============================================================================== */
/* ==============================================================================
   EDITORIAL SHOWCASE SLIDER REEL (REFERENCE STYLE: SALOMON/EDITORIAL DECK)
   ============================================================================== */
.dash-showcase-container {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: visible;
  padding: 18px 20px 16px;
  position: relative;
}

.dash-showcase-stage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 8px 16px;
  align-items: center;
}

.dash-showcase-card {
  position: relative;
  height: 240px;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, border-color 0.3s ease;
  user-select: none;
  opacity: 0.88;
  transform: scale(0.96);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dash-showcase-card:hover {
  opacity: 1;
  transform: translateY(-4px) scale(0.98);
}

/* Active Floating Spotlight Card (Salomon Style!) */
.dash-showcase-card.active {
  opacity: 1;
  transform: translateY(-14px) scale(1.04);
  z-index: 10;
  box-shadow: 0 28px 56px -12px rgba(0, 0, 0, 0.42), 0 10px 24px -6px rgba(0, 0, 0, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
}

.dash-showcase-card.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #FFFFFF;
  z-index: 3;
}

/* Background Artwork & Gradient (Clean Cinematic Full-Color Display) */
.dash-showcase-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.88;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  pointer-events: none;
}

.dash-showcase-card.active .dash-showcase-bg-img {
  opacity: 1;
  transform: scale(1.06);
}

.dash-showcase-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.32) 40%, rgba(15, 23, 42, 0.94) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Card Header Layer */
.dash-showcase-top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-showcase-monogram {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
}

.dash-showcase-badge {
  font-size: 10px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Card Body Overlay (Editorial Style) */
.dash-showcase-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-showcase-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-showcase-subtitle {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-showcase-termin-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
}

.dash-showcase-termin-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  overflow: hidden;
}

.dash-showcase-termin-fill {
  height: 100%;
  background: #FFFFFF;
  border-radius: 9999px;
  transition: width 0.3s ease;
}

/* Signature Palettes Inspired by Reference */
.dash-card-crimson {
  background: linear-gradient(145deg, #701A75 0%, #881337 35%, #BE123C 75%, #E11D48 100%);
}

.dash-card-slate {
  background: linear-gradient(145deg, #0F172A 0%, #1E293B 50%, #334155 100%);
}

.dash-card-olive {
  background: linear-gradient(145deg, #1C2D18 0%, #365314 45%, #4D7C0F 100%);
}

.dash-card-cyan {
  background: linear-gradient(145deg, #083344 0%, #0E7490 50%, #06B6D4 100%);
}

/* Lower Controls & Executive Context */
.dash-showcase-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 10px 4px;
  border-top: 1px solid var(--border);
  gap: 20px;
  flex-wrap: wrap;
}

.dash-showcase-meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.dash-showcase-meta-slogan {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.dash-showcase-meta-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-main);
}

.dash-showcase-meta-details strong {
  color: var(--text-main);
  font-weight: 700;
}

.dash-showcase-meta-pic {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-hover);
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
}

.dash-showcase-meta-pic-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  font-weight: 700;
}

/* Right Modern Auto-Spotlight Controls (Tanpa Panah & Angka Kaku) */
.dash-showcase-controls-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-showcase-segments {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-showcase-seg-pill {
  width: 22px;
  height: 5px;
  border-radius: 9999px;
  background: var(--border);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.dash-showcase-seg-pill.active {
  width: 44px;
  background: #E11D48;
  box-shadow: 0 0 10px rgba(225, 29, 72, 0.45);
}

.dash-showcase-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dash-showcase-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

.dash-showcase-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22);
}

.dash-showcase-cta-btn:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.32);
}

@media (max-width: 1024px) {
  .dash-showcase-stage {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .dash-showcase-stage {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .dash-showcase-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dash-projects-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dash-project-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  cursor: pointer;
  min-width: 0;
}

.dash-project-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.08);
  border-color: #93C5FD;
}

/* 1. Ultra-Compact Visual Cover Banner */
.dash-mini-cover-wrap {
  position: relative;
  width: 100%;
  height: 72px;
  overflow: hidden;
  background: #0F172A;
}

.dash-mini-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.dash-project-item:hover .dash-mini-cover-img {
  transform: scale(1.04);
}

.dash-mini-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.08) 40%, rgba(15, 23, 42, 0.65) 100%);
  pointer-events: none;
}

.dash-mini-badge-overlay {
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
}

.dash-mini-cat-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

.dash-mini-status-chip {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 4px;
}

.dash-mini-status-chip.status-in-progress {
  color: #FFFFFF;
  background: #10B981;
}

.dash-mini-status-chip.status-completed {
  color: #FFFFFF;
  background: #2563EB;
}

.dash-mini-status-chip.status-uat {
  color: #FFFFFF;
  background: #8B5CF6;
}

.dash-mini-status-chip.status-planning {
  color: #FFFFFF;
  background: #F59E0B;
}

/* 2. Mini Card Body (Executive Highlights Only) */
.dash-mini-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.dash-mini-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-mini-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}

.dash-mini-client {
  font-size: 11px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. Metric: Nilai Kontrak Highlight */
.dash-mini-val-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 5px;
}

.dash-mini-val-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748B;
}

.dash-mini-val-amt {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.1;
}

/* 4. Metric: Realisasi Termin Progress */
.dash-mini-termin-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dash-mini-termin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.dash-mini-termin-lbl {
  font-size: 10.5px;
  color: #64748B;
}

.dash-mini-termin-pct {
  font-size: 11.5px;
  font-weight: 700;
  color: #2563EB;
}

.dash-mini-progress-bar {
  width: 100%;
  height: 4px;
  border-radius: 9999px;
  background: #E2E8F0;
  overflow: hidden;
}

.dash-mini-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: #2563EB;
}

/* 5. Footer: PIC & Subtle Arrow */
.dash-mini-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid #F1F5F9;
  margin-top: auto;
}

.dash-mini-pic {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.dash-mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5 0%, #3730A3 100%);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-mini-pic-name {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-mini-arrow {
  font-size: 13px;
  color: #94A3B8;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.dash-project-item:hover .dash-mini-arrow {
  color: #2563EB;
  transform: translateX(2px);
}

/* Slot Tambah Proyek B2B jika kapasitas belum penuh (<= 4 card) */
.dash-project-add-card {
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 220px;
}

.dash-project-add-card:hover {
  background: #F1F5F9;
  border-color: #2563EB;
  transform: translateY(-2px);
}

.dash-add-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.dash-add-card-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.dash-add-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #1E293B;
  margin: 0;
}

.dash-add-card-desc {
  font-size: 10px;
  color: #64748B;
  margin: 0;
  line-height: 1.3;
}

.dash-add-card-btn {
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #2563EB;
}

@media (max-width: 1024px) {
  .dash-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .dash-projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Data Table */
.dash-table-wrapper {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.dash-table thead tr {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.dash-table th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #475569;
  padding: 12px 18px;
}

.dash-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
  font-size: 13.5px;
}

.dash-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.dash-table tbody tr:hover {
  background: #F8FAFC;
}

.dash-table tbody tr:last-child td {
  border-bottom: none;
}

.dash-table-date {
  font-size: 12.5px;
  color: #64748B;
  white-space: nowrap;
}

.dash-table-entity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-entity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-entity-icon.is-in {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.dash-entity-icon.is-out {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.dash-entity-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dash-entity-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-entity-sub {
  font-size: 12.5px;
  color: #64748B;
}

.dash-table-pill {
  font-size: 12px;
  font-weight: 600;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #E2E8F0;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.dash-category-pill {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.dash-category-pill.inflow {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.dash-category-pill.outflow {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.dash-table-amount {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dash-table-amount.plus {
  color: #059669;
}

.dash-table-amount.minus {
  color: #E11D48;
}

/* ─── Minimalist Compact Financials Card in Dashboard ─── */
.dash-card-financials {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dash-table-compact {
  table-layout: fixed;
  width: 100%;
}

.dash-table-compact th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #64748B;
  background: #F8FAFC;
}

.dash-table-compact td {
  padding: 10px 14px;
  font-size: 13px;
  vertical-align: middle;
}

.dash-tx-compact-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-tx-dot {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-tx-dot.dot-in {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.dash-tx-dot.dot-out {
  background: #FFF1F2;
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.dash-tx-compact-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1.5px;
  overflow: hidden;
}

.dash-tx-compact-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-tx-compact-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-tx-compact-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.dash-tx-compact-cat.cat-in {
  color: #059669;
}

.dash-tx-compact-cat.cat-out {
  color: #E11D48;
}

.dash-tx-compact-cat .cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dash-tx-compact-cat.cat-in .cat-dot {
  background: #10B981;
}

.dash-tx-compact-cat.cat-out .cat-dot {
  background: #F43F5E;
}

.dash-tx-compact-amount-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  max-width: 100%;
}

.dash-tx-compact-amount {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dash-tx-compact-amount.amount-plus {
  color: #059669;
}

.dash-tx-compact-amount.amount-minus {
  color: #E11D48;
}

.dash-tx-arrow-indicator {
  color: #94A3B8;
  transition: transform 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.dash-tx-row:hover .dash-tx-arrow-indicator {
  color: #2563EB;
  transform: translate(1px, -1px);
}

[data-theme="dark"] .dash-table-compact th {
  background: rgba(255, 255, 255, 0.03);
  color: #94A3B8;
}

.dash-row-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-row-action-btn:hover {
  border-color: var(--primary, #1E3A8A);
  color: var(--primary, #1E3A8A);
  background: var(--primary-soft, #EFF6FF);
}

/* Dashboard Realtime Transaction Filter Tabs */
.dash-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-hover, #F1F5F9);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border, #E2E8F0);
}

.dash-filter-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #64748B);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.dash-filter-btn:hover {
  color: var(--text-main, #0F172A);
  background: rgba(255, 255, 255, 0.6);
}

.dash-filter-btn.active {
  background: var(--primary, #1E3A8A) !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(30, 58, 138, 0.25);
}

/* Dashboard Modal Cashflow Type Segmented Switch */
.dash-modal-type-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  background: var(--surface-hover, #F8FAFC);
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border, #E2E8F0);
}

.dash-type-radio {
  cursor: pointer;
  margin: 0;
  display: block;
}

.dash-type-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dash-type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  color: var(--text-muted, #64748B);
  background: transparent;
  transition: all 0.15s ease;
  user-select: none;
}

.dash-type-radio input:checked + .dash-type-btn.is-in {
  background: #ECFDF5;
  color: #065F46;
  border-color: #6EE7B7;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.15);
}

.dash-type-radio input:checked + .dash-type-btn.is-out {
  background: #FEF2F2;
  color: #991B1B;
  border-color: #FECACA;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.15);
}

.dash-type-radio:hover .dash-type-btn {
  border-color: var(--border, #CBD5E1);
  color: var(--text-main, #0F172A);
}

/* RIGHT RAIL CARDS */
.dash-rail-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04);
}

.dash-rail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 2px;
}

.dash-rail-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.dash-rail-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-rail-icon-box.is-amber {
  background: #FEF3C7;
  color: #D97706;
}

.dash-rail-icon-box.is-blue {
  background: #EFF6FF;
  color: #2563EB;
}

[data-theme="dark"] .dash-rail-icon-box.is-amber {
  background: rgba(217, 119, 6, 0.2);
  color: #FBBF24;
}

[data-theme="dark"] .dash-rail-icon-box.is-blue {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
}

.dash-rail-title-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.dash-rail-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.dash-rail-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.3;
}

.dash-badge-count {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-badge-count.is-active {
  background: #FEF3C7;
  color: #B45309;
  border-color: #FCD34D;
}

[data-theme="dark"] .dash-badge-count.is-active {
  background: rgba(217, 119, 6, 0.2);
  color: #FBBF24;
  border-color: rgba(217, 119, 6, 0.4);
}

.dash-rail-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-rail-link:hover {
  text-decoration: underline;
  color: var(--primary-dark, #1D4ED8);
}

/* Rail Approval List */
.dash-approval-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-empty-approval {
  text-align: center;
  padding: 24px 14px;
  background: var(--surface-hover);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.dash-approval-check-icon {
  color: #059669;
  margin-bottom: 6px;
  display: flex;
  justify-content: center;
}

.dash-approval-check-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 3px;
}

.dash-approval-check-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.dash-approval-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.18s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.dash-approval-item:hover {
  border-color: var(--primary-light, #93C5FD);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.dash-approval-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-approval-tag {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2.5px 7px;
  border-radius: 5px;
  letter-spacing: 0.04em;
}

.dash-approval-tag.tag-invoice {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

[data-theme="dark"] .dash-approval-tag.tag-invoice {
  background: rgba(5, 150, 105, 0.15);
  color: #34D399;
  border-color: rgba(5, 150, 105, 0.3);
}

.dash-approval-tag.tag-doc {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

[data-theme="dark"] .dash-approval-tag.tag-doc {
  background: rgba(37, 99, 235, 0.15);
  color: #60A5FA;
  border-color: rgba(37, 99, 235, 0.3);
}

.dash-approval-amount {
  font-size: 12.5px;
  font-weight: 700;
  color: #059669;
}

.dash-approval-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-approval-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.dash-approval-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.dash-approval-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.dash-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  border: none;
}

.dash-action-chip.primary {
  background: var(--primary);
  color: #FFFFFF;
}

.dash-action-chip.primary:hover {
  background: var(--primary-dark, #1D4ED8);
  transform: translateY(-1px);
}

.dash-action-chip.secondary {
  background: var(--surface-hover);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.dash-action-chip.secondary:hover {
  background: var(--surface-active, #E2E8F0);
}

/* Rail Bank Balances (Clean Modern Fintech Layout) */
.dash-bank-summary-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  gap: 12px;
}

.dash-bank-summary-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-bank-summary-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.dash-bank-summary-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
}

.dash-bank-shield-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

[data-theme="dark"] .dash-bank-shield-pill {
  background: rgba(5, 150, 105, 0.15);
  color: #34D399;
  border-color: rgba(5, 150, 105, 0.3);
}

.dash-bank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.15s ease;
}

.dash-bank-item:hover {
  border-color: var(--primary-light, #93C5FD);
  background: var(--surface-hover);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.dash-bank-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-bank-pill {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.dash-bank-pill.mandiri { background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 100%); }
.dash-bank-pill.bca     { background: linear-gradient(135deg, #0369A1 0%, #0284C7 100%); }
.dash-bank-pill.bri     { background: linear-gradient(135deg, #0F766E 0%, #0D9488 100%); }
.dash-bank-pill.cash    { background: linear-gradient(135deg, #047857 0%, #059669 100%); }

.dash-bank-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-bank-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-bank-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.dash-bank-balance {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
}

.dash-btn-full {
  width: 100%;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dash-btn-full:hover {
  background: var(--surface-active, #E2E8F0);
  border-color: var(--primary);
  color: var(--primary);
}

/* Button & Modal Atur Target Anggaran */
.btn-target-adjust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 8px;
  background: #EFF6FF;
  border: 1.5px solid #93C5FD;
  font-size: 12.5px;
  font-weight: 700;
  color: #1D4ED8;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.1);
  white-space: nowrap;
}

.btn-target-adjust:hover {
  background: #2563EB;
  border-color: #1D4ED8;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.dash-runway-link {
  font-size: 12px;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.dash-runway-link:hover {
  color: #1D4ED8;
  text-decoration: underline;
}

/* Rail Audit Activities */
.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-activity-item {
  display: flex;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
}

.dash-activity-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563EB;
  margin-top: 6px;
  flex-shrink: 0;
}

.dash-activity-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dash-activity-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dash-activity-tag {
  font-size: 11px;
  font-weight: 700;
  color: #2563EB;
  text-transform: uppercase;
}

.dash-activity-time {
  font-size: 11.5px;
  color: #94A3B8;
}

.dash-activity-text {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.35;
}

.dash-activity-user {
  font-size: 11.5px;
  color: #64748B;
}

/* DARK MODE OVERRIDES */
html[data-theme="dark"] .dash-kpi-card,
html[data-theme="dark"] .dash-runway-strip,
html[data-theme="dark"] .dash-card,
html[data-theme="dark"] .dash-rail-card,
html[data-theme="dark"] .dash-project-item,
html[data-theme="dark"] .dash-approval-item,
html[data-theme="dark"] .dash-bank-item {
  background: #0F172A !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-card-header,
html[data-theme="dark"] .dash-table thead tr,
html[data-theme="dark"] .dash-bank-summary-box,
html[data-theme="dark"] .dash-empty-approval,
html[data-theme="dark"] .dash-activity-item,
html[data-theme="dark"] .dash-project-scope-box,
html[data-theme="dark"] .dash-metric-card {
  background: #141E33 !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-project-scope-head,
html[data-theme="dark"] .dash-project-footer {
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-kpi-val,
html[data-theme="dark"] .dash-runway-title,
html[data-theme="dark"] .dash-card-title,
html[data-theme="dark"] .dash-empty-title,
html[data-theme="dark"] .dash-project-name,
html[data-theme="dark"] .dash-project-val,
html[data-theme="dark"] .dash-metric-val,
html[data-theme="dark"] .dash-scope-headline,
html[data-theme="dark"] .dash-entity-title,
html[data-theme="dark"] .dash-table-amount,
html[data-theme="dark"] .dash-rail-title,
html[data-theme="dark"] .dash-approval-name,
html[data-theme="dark"] .dash-bank-summary-val,
html[data-theme="dark"] .dash-bank-name,
html[data-theme="dark"] .dash-bank-balance {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .dash-kpi-label,
html[data-theme="dark"] .dash-table th,
html[data-theme="dark"] .dash-runway-target-label,
html[data-theme="dark"] .dash-scope-item {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .dash-metric-bar,
html[data-theme="dark"] .dash-metric-mini-bar {
  background: #1E293B !important;
}

html[data-theme="dark"] .dash-project-metric-strip {
  background: #141E33 !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-metric-val-compact {
  color: #F8FAFC !important;
}

/* Dark Mode support untuk Dash Mini Executive Project Strip */
html[data-theme="dark"] .dash-project-item {
  background: #0F172A !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-project-item:hover {
  border-color: #3B82F6 !important;
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .dash-mini-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .dash-mini-client {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .dash-mini-val-block {
  background: #141E33 !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-mini-val-lbl {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .dash-mini-val-amt {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .dash-mini-termin-lbl {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .dash-mini-termin-pct {
  color: #60A5FA !important;
}

html[data-theme="dark"] .dash-mini-progress-bar {
  background: #1E293B !important;
}

html[data-theme="dark"] .dash-mini-progress-fill {
  background: #3B82F6 !important;
}

html[data-theme="dark"] .dash-mini-footer {
  border-top-color: #1E293B !important;
}

html[data-theme="dark"] .dash-mini-pic-name {
  color: #CBD5E1 !important;
}

html[data-theme="dark"] .dash-mini-arrow {
  color: #64748B !important;
}

html[data-theme="dark"] .dash-project-item:hover .dash-mini-arrow {
  color: #60A5FA !important;
}

html[data-theme="dark"] .dash-project-add-card {
  background: #0B1120 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .dash-project-add-card:hover {
  background: #141E33 !important;
  border-color: #60A5FA !important;
}

html[data-theme="dark"] .dash-add-card-title {
  color: #F8FAFC !important;
}

html[data-theme="dark"] .dash-add-card-desc {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .dash-add-card-icon-wrap {
  background: #1E293B !important;
  color: #818CF8 !important;
}

html[data-theme="dark"] .btn-dash-open-project {
  background: #1E293B !important;
  color: #60A5FA !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .btn-dash-open-project:hover {
  background: #2563EB !important;
  color: #FFFFFF !important;
  border-color: #2563EB !important;
}

html[data-theme="dark"] .dash-table td {
  border-color: #1E293B !important;
}

html[data-theme="dark"] .dash-table tbody tr:hover {
  background: #162238 !important;
}

html[data-theme="dark"] .dash-btn-full,
html[data-theme="dark"] .dash-kpi-eye-btn,
html[data-theme="dark"] .dash-row-action-btn,
html[data-theme="dark"] .dash-action-chip.secondary {
  background: #1E293B !important;
  border-color: #334155 !important;
  color: #E2E8F0 !important;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1240px) {
  .dash-split-layout {
    grid-template-columns: 1fr;
  }
  .dash-rail-col {
    position: static;
  }
  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dash-exec-header {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 20px;
  }
  .dash-exec-actions-label {
    text-align: left;
  }
  .dash-exec-art {
    justify-content: flex-start;
    width: 100%;
  }
  .dash-exec-avatar-wrap {
    width: 100%;
    justify-content: flex-start;
  }
  .ref-hero-speech-bubble {
    width: 100%;
    max-width: 100%;
  }
  .ref-hero-speech-bubble::after {
    display: none;
  }
  .dash-exec-avatar-img {
    display: none;
  }
}

@media (max-width: 640px) {
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
  .dash-exec-dock {
    width: 100%;
    justify-content: space-around;
  }
  .dash-dock-item {
    flex: 1 1 auto;
    padding: 7px 10px;
    font-size: 12px;
  }
  .dash-dock-divider {
    display: none;
  }
  .dash-table th:nth-child(3),
  .dash-table td:nth-child(3),
  .dash-table th:nth-child(4),
  .dash-table td:nth-child(4) {
    display: none;
  }
}

/* ==============================================================================
   COMMAND PALETTE & LIVE GLOBAL SEARCH DROPDOWN (⌘K)
   ============================================================================== */
.topbar-center-search {
  position: relative;
}

.search-palette-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid #EAEFF6;
  border-radius: 18px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  max-height: 420px;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: palette-drop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes palette-drop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.palette-section-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: 6px 12px 2px;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-main);
  text-decoration: none;
}

.palette-item:hover,
.palette-item.active {
  background: var(--surface-hover);
  color: var(--primary);
}

.palette-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.palette-item-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.palette-item-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.palette-item-title {
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-item-sub {
  font-size: 12.5px;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.palette-badge {
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 9999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.palette-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-subtle);
}

/* ==============================================================================
   TOPBAR NOTIFICATION DROPDOWN PANEL
   ============================================================================== */
.topbar-notif-container {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid #EAEFF6;
  border-radius: 20px;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: notif-drop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notif-drop {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 8px;
  border-bottom: 1px solid #F1F5F9;
  font-size: 12.5px;
  color: var(--text-main);
}

.notif-clear-btn {
  background: none;
  border: none;
  font-size: 12.5px;
  color: var(--primary);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.notif-clear-btn:hover {
  background: var(--primary-soft);
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.notif-row:hover {
  background: var(--surface-hover);
}

.notif-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-row-icon.in { background: #EFF6FF; color: #2563EB; }
.notif-row-icon.out { background: #F5F3FF; color: #7C3AED; }
.notif-row-icon.auth { background: #EEF2FF; color: #4F46E5; }
.notif-row-icon.letter { background: #DBEAFE; color: #1D4ED8; }

.notif-row-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-row-title {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.35;
}

.notif-row-time {
  font-size: 12px;
  color: var(--text-subtle);
}

/* ==============================================================================
   PRINT TO PDF / A4 STYLESHEET (Official Invoice Printing)
   ============================================================================== */
@media print {
  @page {
    size: A4;
    margin: 12mm 15mm;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-family: var(--font-sans) !important;
  }
  #sidebar, .sidebar, #topbar, .topbar, .sidebar-backdrop, .btn, .page-actions, .subpage-action-bar, .modal-close-btn, .modal-footer, .modal-header, #toast, .metrics-grid, .card:not(#modal-view-invoice *):not(#modal-view-employee-form *), .dashboard-ref-container, .kanban-board, .org-chart-wrapper, .search-palette-dropdown, .notif-dropdown {
    display: none !important;
  }
  .modal-backdrop:not(#modal-view-invoice) {
    display: none !important;
  }
  #modal-view-invoice {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
  #modal-view-invoice .modal-dialog {
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  #modal-view-invoice .modal-body {
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    max-height: none !important;
  }
  #invoice-preview-body > div {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
  }
}

/* ─── Formulir Registrasi Karyawan Baru (Pratinjau PDF & A4 Dokumen) ─── */
.emp-form-pdf-paper {
  background: #FFFFFF;
  color: #0F172A;
  font-family: var(--font-sans);
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
}
.emp-pdf-page {
  padding: 34px 38px 28px 38px;
  background: #FFFFFF;
  box-sizing: border-box;
}
.emp-pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.emp-pdf-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.emp-pdf-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
.emp-pdf-brand-text {
  display: flex;
  flex-direction: column;
}
.emp-pdf-comp-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #1E3A8A;
  letter-spacing: 0.04em;
}
.emp-pdf-comp-sub {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  margin-top: 1px;
  letter-spacing: 0.02em;
}
.emp-pdf-comp-addr {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}
.emp-pdf-meta-table {
  border-collapse: collapse;
  font-size: 12.5px;
}
.emp-pdf-meta-table td {
  padding: 2px 4px;
}
.emp-pdf-meta-table .meta-lbl {
  color: #64748B;
  font-weight: 500;
}
.emp-pdf-meta-table .meta-val {
  font-weight: 600;
  color: #0F172A;
}
.emp-pdf-divider {
  height: 2px;
  background: #1E3A8A;
  margin: 12px 0 14px 0;
  position: relative;
}
.emp-pdf-divider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: #94A3B8;
}
.emp-pdf-title-block {
  text-align: center;
  margin-bottom: 12px;
}
.emp-pdf-doc-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.05em;
  margin: 0;
  text-transform: uppercase;
}
.emp-pdf-doc-subtitle {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}
.emp-pdf-instructions {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-left: 3.5px solid #1D4ED8;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: #334155;
  line-height: 1.45;
  text-align: left;
  margin-top: 8px;
}
.emp-pdf-section {
  margin-bottom: 11px;
}
.emp-pdf-sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1E3A8A;
  border-bottom: 1.5px solid #1E3A8A;
  padding-bottom: 3px;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.sec-badge {
  background: #1E3A8A;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
}
.emp-pdf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 2px;
}
.emp-pdf-table td {
  border: 1px solid #CBD5E1;
  padding: 4px 7px;
  vertical-align: middle;
}
.tbl-lbl {
  background: #F8FAFC;
  font-weight: 600;
  color: #334155;
}
.tbl-val {
  color: #0F172A;
}
.fill-line {
  color: #94A3B8;
  font-family: var(--font-sans);
  font-size: 12px;
  min-height: 13px;
}
.fill-line-multi {
  color: #94A3B8;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.55;
}
.opt-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
}
.chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.nik-grid {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}
.nik-grid span {
  display: inline-block;
  width: 16px;
  height: 19px;
  border: 1px solid #64748B;
  background: #FFFFFF;
}
.hint-small {
  font-size: 12px;
  color: #64748B;
  margin-left: 5px;
  font-style: italic;
}
.emp-pdf-page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94A3B8;
  border-top: 1px solid #E2E8F0;
  padding-top: 6px;
  margin-top: 8px;
}
.emp-pdf-page-break {
  page-break-before: always;
  height: 14px;
  margin: 12px 0;
  border-bottom: 2px dashed #94A3B8;
  position: relative;
}
.emp-pdf-page-break::after {
  content: 'BATAS HALAMAN A4 (PAGE 2)';
  position: absolute;
  top: 4px;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  background: #E2E8F0;
  padding: 1px 6px;
  border-radius: 3px;
}
.emp-pdf-page2-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #475569;
  border-bottom: 1.5px solid #1E3A8A;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
.chk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  padding: 7px 10px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
}
.chk-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: #1E293B;
}
.chk-box-sq {
  width: 12px;
  height: 12px;
  border: 1.5px solid #475569;
  background: #FFFFFF;
  margin-top: 1px;
  flex-shrink: 0;
}
.chk-sub {
  font-size: 12px;
  color: #64748B;
}
.statement-box {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 12px;
  color: #1E293B;
  line-height: 1.45;
  text-align: justify;
  margin-bottom: 8px;
}
.sig-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
}
.sig-cell {
  border: 1px solid #CBD5E1;
  padding: 8px 12px;
  text-align: center;
  vertical-align: top;
}
.sig-title {
  font-size: 12px;
  color: #64748B;
}
.sig-role {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 2px;
}
.sig-space {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stamp-box, .sign-hint {
  font-size: 12px;
  color: #94A3B8;
  font-style: italic;
}
.sig-name {
  font-size: 12px;
  font-weight: 700;
  color: #0F172A;
}
.sig-date {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}
.ai-intake-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 8px;
  font-size: 12px;
  color: #1E40AF;
  line-height: 1.4;
}
.ai-intake-icon {
  font-size: 13px;
  line-height: 1;
}

/* ==============================================================================
   MODERN CORPORATE ERP SUITE - PROJECT COCKPIT & RAB MANAGEMENT
   ============================================================================== */
.project-cockpit-card {
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.03), 0 4px 12px -2px rgba(15, 23, 42, 0.02);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.22s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.project-cockpit-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

.client-monogram-squircle {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  box-shadow: 0 2px 6px -1px rgba(0, 0, 0, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.client-mono-pln { background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%); }
.client-mono-upos { background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%); }
.client-mono-psi { background: linear-gradient(135deg, #4F46E5 0%, #312E81 100%); }
.client-mono-resto { background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%); }
.client-mono-billing { background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%); }
.client-mono-default { background: linear-gradient(135deg, #64748B 0%, #475569 100%); }

/* 4-Stage Milestone Stepper */
.milestone-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
  padding: 10px 14px;
  background: var(--canvas);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.6);
  position: relative;
}

.milestone-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

.milestone-step.is-done {
  color: #6366F1;
}

.milestone-step.is-active {
  color: #2563EB;
}

.milestone-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--border);
  color: #64748B;
  transition: all 0.2s ease;
}

.milestone-step.is-done .milestone-dot {
  background: #6366F1;
  color: #FFFFFF;
}

.milestone-step.is-active .milestone-dot {
  background: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.milestone-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  transition: background 0.2s ease;
}

.milestone-connector.is-done {
  background: #6366F1;
}

/* Financial Pillows */
.financial-pillow-box {
  background: var(--canvas);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.health-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.health-badge-pill.on-track {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.health-badge-pill.uat {
  background: rgba(139, 92, 246, 0.1);
  color: #7C3AED;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.health-badge-pill.completed {
  background: rgba(37, 99, 235, 0.1);
  color: #1D4ED8;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.health-badge-pill.planning {
  background: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.health-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ==============================================================================
   EXECUTIVE SEGMENTED CONTROLS & FILTER PILLS (Apple / Linear Enterprise Standard)
   ============================================================================== */
.filter-segmented-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 3px !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.filter-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 9px !important;
  border: none !important;
  background: transparent !important;
  color: #64748B !important;
  font-family: var(--font-sans) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
  white-space: nowrap !important;
  user-select: none !important;
  line-height: 1.4 !important;
}

.filter-pill:hover {
  color: #0F172A !important;
  background: rgba(255, 255, 255, 0.65) !important;
}

.filter-pill.active {
  background: #FFFFFF !important;
  color: #0F172A !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.filter-pill svg {
  color: inherit !important;
  flex-shrink: 0 !important;
}

/* Inside Table Card Header Filter Groups */
.filter-pill-group {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
}

.filter-pill-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 6px 13px !important;
  border-radius: 8px !important;
  border: 1px solid #E2E8F0 !important;
  background: #FFFFFF !important;
  color: #64748B !important;
  font-family: var(--font-sans) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
}

.filter-pill-btn:hover {
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  background: #F8FAFC !important;
}

.filter-pill-btn.active {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border-color: #0F172A !important;
  font-weight: 600 !important;
}

.filter-pill-btn.active .filter-pill-count {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
}

.filter-pill-count {
  padding: 1px 6px !important;
  border-radius: 10px !important;
  background: #F1F5F9 !important;
  color: #64748B !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

/* Dark Mode Overrides for Filters */
html[data-theme="dark"] .filter-segmented-wrap {
  background: #1E293B !important;
  border-color: #334155 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}
html[data-theme="dark"] .filter-pill {
  color: #94A3B8 !important;
}
html[data-theme="dark"] .filter-pill:hover {
  color: #F8FAFC !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="dark"] .filter-pill.active {
  background: #0F172A !important;
  color: #F8FAFC !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
html[data-theme="dark"] .filter-pill-btn {
  background: #1E293B !important;
  border-color: #334155 !important;
  color: #94A3B8 !important;
}
html[data-theme="dark"] .filter-pill-btn:hover {
  background: #334155 !important;
  color: #F8FAFC !important;
}
html[data-theme="dark"] .filter-pill-btn.active {
  background: #3B82F6 !important;
  border-color: #3B82F6 !important;
  color: #FFFFFF !important;
}

/* ==============================================================================
   MODERN CORPORATE PROJECT CARDS (Clean Linear & Stripe Enterprise Aesthetic)
   ============================================================================== */
.project-corp-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.02);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.project-corp-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

.project-corp-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.project-corp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.project-corp-code {
  color: #2563EB;
  background: #EFF6FF;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid #DBEAFE;
}

.project-corp-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 6px 0 4px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.project-corp-client {
  font-size: 13px;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-corp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-corp-status.in-progress {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
}
.project-corp-status.uat {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}
.project-corp-status.completed {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}
.project-corp-status.planning {
  background: #F5F3FF;
  color: #6D28D9;
  border: 1px solid #DDD6FE;
}

.project-corp-finance {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.project-corp-finance-item .lbl {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.project-corp-finance-item .val {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
}

.project-corp-finance-item .sub {
  font-size: 12.5px;
  margin-top: 3px;
}

.project-corp-progress-bar {
  height: 6px;
  width: 100%;
  background: #E2E8F0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 10px;
}

.project-corp-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: #2563EB;
  transition: width 0.3s ease;
}

.project-corp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid #F1F5F9;
  font-size: 12px;
  color: #64748B;
}

html[data-theme="dark"] .project-corp-card {
  background: #0F172A;
  border-color: #1E293B;
}
html[data-theme="dark"] .project-corp-title {
  color: #F8FAFC;
}
html[data-theme="dark"] .project-corp-finance {
  background: #1E293B;
  border-color: #334155;
}
html[data-theme="dark"] .project-corp-finance-item .val {
  color: #F8FAFC;
}
html[data-theme="dark"] .project-corp-footer {
  border-top-color: #1E293B;
}

/* ==============================================================================
   TREASURY & CASHFLOW SUITE — Corporate Ocean Blue (Token-Driven, Unique to #cashflow)
   Doktrin: 3 warna seirama (Ocean Blue #2563EB + Slate neutral + status desaturated),
   font Inter tunggal, tabular figures. Semua warna memakai design token — zero rainbow hex.
   ============================================================================== */

.treasury-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* ─── 1. Executive Command Bar (Soft Corporate, modern) ─── */
.treasury-command-bar {
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--canvas) 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.treasury-title-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}

.treasury-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary-text);
  width: fit-content;
}

.treasury-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}

.treasury-title {
  font-size: 21px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.treasury-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  max-width: 500px;
}

.treasury-actions-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-treasury-primary,
.btn-treasury-secondary,
.btn-treasury-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-treasury-primary {
  background: var(--primary);
  color: var(--text-inverse);
  border: 1px solid var(--primary);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}
.btn-treasury-primary:hover {
  transform: translateY(-1px);
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-treasury-secondary {
  background: var(--surface);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
}
.btn-treasury-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--primary-border);
  transform: translateY(-1px);
}

.btn-treasury-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid transparent;
}
.btn-treasury-ghost:hover {
  background: var(--primary-soft);
}

/* Live Telemetry — bordered stat cards (readable) */
/* Minimalist Bank Balance Strip (header, right) */
.treasury-balance-strip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 264px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.treasury-balance-strip:hover {
  border-color: var(--border-strong);
}

.treasury-balance-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.treasury-balance-row + .treasury-balance-row {
  border-top: 1px solid var(--border);
}

.treasury-balance-chip {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-inverse);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.treasury-balance-chip.mandiri { background: var(--primary); }
.treasury-balance-chip.bca     { background: var(--primary-hover); }
.treasury-balance-chip.cash    { background: var(--success); }

.treasury-balance-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.treasury-balance-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}
.treasury-balance-tag {
  font-size: 12px;
  color: var(--text-subtle);
}
.treasury-balance-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .treasury-balance-strip {
    width: 100%;
    min-width: 0;
  }
}

/* ─── 3. Financial Metric Cards (token-driven, no rainbow) ─── */
.treasury-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .treasury-metrics-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .treasury-metrics-row { grid-template-columns: 1fr; }
}

.treasury-metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
  position: relative;
}

.treasury-metric-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.treasury-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.treasury-metric-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.treasury-metric-card.is-success .treasury-metric-icon { background: var(--success-soft); color: var(--success); }
.treasury-metric-card.is-danger  .treasury-metric-icon { background: var(--danger-soft);  color: var(--danger); }
.treasury-metric-card.is-primary .treasury-metric-icon { background: var(--primary-soft);  color: var(--primary); }
.treasury-metric-card.is-warning .treasury-metric-icon { background: var(--warning-soft);  color: var(--warning); }

.treasury-metric-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  letter-spacing: 0.04em;
}
.treasury-metric-tag.is-success { background: var(--success-soft); color: var(--success-text); }
.treasury-metric-tag.is-danger  { background: var(--danger-soft);  color: var(--danger-text); }
.treasury-metric-tag.is-primary { background: var(--primary-soft);  color: var(--primary-text); }
.treasury-metric-tag.is-warning { background: var(--warning-soft);  color: var(--warning-text); }

.treasury-metric-caption {
  font-size: clamp(12.5px, 0.25vw + 9.5px, 14px);
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.treasury-metric-val {
  font-size: clamp(15px, 1vw + 12.5px, 20px);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.treasury-metric-val.is-success { color: var(--success); }
.treasury-metric-val.is-danger  { color: var(--danger); }
.treasury-metric-val.is-primary { color: var(--primary); }
.treasury-metric-val.is-warning { color: var(--warning); }

.treasury-metric-sub {
  font-size: clamp(12.5px, 0.2vw + 9.5px, 14px);
  color: var(--text-subtle);
  line-height: 1.35;
}

/* ─── 4. Segmented Nav Row ─── */
.treasury-segment-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── 5. Split Treasury Workspace ─── */
.treasury-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .treasury-workspace-layout {
    grid-template-columns: 1fr;
  }
}

/* Ledger card */
.treasury-ledger-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.treasury-ledger-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Ledger table cells */
.td-date {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.td-type-badge {
  font-size: 12.5px;
  font-weight: 600;
}
.td-category-chip {
  font-size: 12.5px;
  background: var(--canvas);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
}
.td-description {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
}
.td-ref {
  font-size: 12.5px;
  background: var(--primary-soft);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  display: inline-block;
  transition: background 0.15s ease;
}
.td-ref:hover { background: var(--primary-border); }
.td-empty { color: var(--text-subtle); }
.td-author {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}
.td-amount {
  text-align: right;
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
}
.td-amount.is-inflow  { color: var(--success); }
.td-amount.is-outflow { color: var(--danger); }
.td-action { text-align: center; }
.td-delete-btn {
  color: var(--text-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.td-delete-btn:hover { color: var(--danger); background: var(--danger-soft); }

/* Ledger footer summary */
.treasury-ledger-footer {
  padding: 14px 20px;
  background: var(--canvas);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.treasury-ledger-footer-count {
  font-size: 12.5px;
  color: var(--text-muted);
}
.treasury-ledger-footer-filter {
  margin-left: 8px;
  color: var(--primary);
}
.treasury-ledger-footer-totals {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.font-num.is-inflow  { color: var(--success); font-weight: 700; }
.font-num.is-outflow { color: var(--danger);  font-weight: 700; }

/* ─── P&L View ─── */
.treasury-pnl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px) {
  .treasury-pnl-grid { grid-template-columns: 1fr; }
}

.treasury-pnl-card {
  border-radius: var(--radius-xl);
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.treasury-pnl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.treasury-pnl-head.is-revenue { border-bottom-color: var(--success); }
.treasury-pnl-head.is-expense { border-bottom-color: var(--danger); }

.treasury-pnl-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.treasury-pnl-caption {
  font-size: 12.5px;
  color: var(--text-muted);
}
.treasury-pnl-total {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.treasury-pnl-table {
  width: 100%;
  font-size: 12.5px;
  border-collapse: collapse;
}
.treasury-pnl-table tr { border-bottom: 1px solid var(--border); }
.treasury-pnl-table tr:last-child { border-bottom: none; }
.treasury-pnl-cat {
  padding: 10px 0;
  font-weight: 600;
  color: var(--text-main);
}
.treasury-pnl-count {
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 12.5px;
}
.treasury-pnl-amt {
  padding: 10px 0;
  text-align: right;
  font-weight: 700;
}
.treasury-pnl-amt.is-inflow  { color: var(--success); }
.treasury-pnl-amt.is-outflow { color: var(--danger); }

.treasury-pnl-summary {
  grid-column: 1 / -1;
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  background: var(--success-soft);
  border: 1px solid var(--success-border);
  box-shadow: var(--shadow-sm);
}
.treasury-pnl-summary-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.treasury-pnl-summary-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.treasury-pnl-summary-title {
  margin: 5px 0 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.treasury-pnl-summary-desc {
  margin: 5px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.treasury-pnl-summary-figure { text-align: right; }
.treasury-pnl-summary-val {
  font-size: 26px;
  font-weight: 600;
  color: var(--success);
  letter-spacing: -0.02em;
}
.treasury-pnl-summary-margin {
  font-size: 12px;
  padding: 4px 12px;
  font-weight: 700;
  margin-top: 4px;
}

/* ─── Chart of Accounts View ─── */
.treasury-coa-header {
  border-radius: var(--radius-xl);
  padding: 18px 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.treasury-coa-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.treasury-coa-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.treasury-coa-caption {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.treasury-coa-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.treasury-coa-table-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.treasury-coa-table {
  width: 100%;
  margin: 0;
}
.treasury-coa-code { font-weight: 700; color: var(--primary); }
.treasury-coa-name { font-weight: 600; color: var(--text-main); }
.treasury-coa-type { font-size: 12px; font-weight: 700; }
.treasury-coa-category { color: var(--text-muted); font-size: 12.5px; }
.treasury-coa-balance {
  text-align: right;
  font-weight: 700;
  font-size: 13.5px;
}
.treasury-coa-balance.is-primary { color: var(--primary); }
.treasury-coa-balance.is-inflow  { color: var(--success); }
.treasury-coa-balance.is-outflow { color: var(--danger); }
.treasury-coa-desc { font-size: 12.5px; color: var(--text-muted); }

/* ─── Sidebar (Financial Intelligence) ─── */
.treasury-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}

.treasury-side-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.treasury-divider {
  height: 1px;
  background: var(--border);
}

.treasury-side-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: -0.01em;
  margin: 0;
}
.treasury-side-badge { font-size: 12px; }

.treasury-expense-bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.treasury-exp-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.treasury-exp-header {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
}
.treasury-exp-header .exp-name { color: var(--text-muted); }
.treasury-exp-header .exp-val {
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.treasury-progress-track {
  width: 100%;
  height: 6px;
  background: var(--surface-hover);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.treasury-progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--primary);
  transition: width 0.4s ease;
}

.treasury-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.treasury-upcoming-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  background: var(--canvas);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.treasury-upcoming-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.treasury-upcoming-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}
.treasury-upcoming-date {
  font-size: 12.5px;
  color: var(--text-subtle);
}
.treasury-upcoming-amount {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.treasury-upcoming-amount.inflow  { color: var(--success); }
.treasury-upcoming-amount.outflow { color: var(--danger); }

.treasury-authbox {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.treasury-authbox-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--primary);
}
.treasury-authbox-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}
.treasury-authbox-text {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}


/* ==============================================================================
   INVOICES MODULE — Corporate Minimalist (Token-Driven, Unique to #invoices)
   Selaras kontrak desain #cashflow: reuse .treasury-* + .data-table + .badge-*.
   Blok ini hanya menambah utilitas khusus faktur (prefiks .inv-). Zero rainbow hex,
   semua warna via var(--token). Tanpa aksen garis kiri, tanpa glow bertumpuk.
   ============================================================================== */

/* 3 metric cards agar rapi di grid treasury (default 4 kolom) */
.inv-metrics-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1000px) {
  .inv-metrics-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .inv-metrics-3 { grid-template-columns: 1fr; }
}

.treasury-metric-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Chip nomor invoice (interaktif, salin ke clipboard) */
.inv-no-chip {
  font-size: 13px;
  color: var(--primary);
  background: var(--canvas);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  display: inline-block;
  font-family: var(--font-mono);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.inv-no-chip:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}
.inv-no-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Sel klien */
.inv-client-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}
.inv-client-email {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* Sel tanggal & angka tabel */
.inv-cell-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.inv-cell-date.is-overdue {
  color: var(--danger);
  font-weight: 700;
}
.inv-cell-num-muted {
  text-align: right;
  font-size: 13.5px;
  color: var(--text-muted);
}
.inv-cell-num-subtle {
  text-align: right;
  font-size: 13.5px;
  color: var(--text-subtle);
}
.inv-cell-total {
  text-align: right;
  font-weight: 700;
  color: var(--text-main);
  font-size: 14.5px;
  white-space: nowrap;
}

/* Cluster tombol aksi baris */
.inv-action-cluster {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.inv-delete-btn {
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.inv-delete-btn:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* Footer summary tambahan */
.inv-footer-filter {
  margin-left: 8px;
  color: var(--primary);
}
.inv-footer-total {
  font-size: 13.5px;
}
.inv-footer-total-val {
  color: var(--primary);
  font-size: 14.5px;
  font-weight: 700;
}

/* Ikon state danger (error) */
.inv-state-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ─── Pratinjau Cetak Faktur A4 (dalam modal) ─── */
.inv-print-doc {
  padding: 24px;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.inv-print-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.inv-print-brand {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.inv-print-brand-sub {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin-top: 2px;
}
.inv-print-head-right {
  text-align: right;
}
.inv-print-doctitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 1px;
}
.inv-print-docno {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
}
.inv-print-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: 12.5px;
  gap: 20px;
}
.inv-print-meta-to {
  flex: 1;
}
.inv-print-meta-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
}
.inv-print-meta-client {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 2px;
}
.inv-print-meta-line {
  color: var(--text-muted);
}
.inv-print-meta-right {
  text-align: right;
}
.inv-print-meta-row {
  margin-bottom: 4px;
}
.inv-print-meta-muted {
  color: var(--text-subtle);
}
.inv-print-meta-strong {
  font-weight: 600;
  color: var(--text-main);
}
.inv-print-meta-due {
  color: var(--danger);
  font-weight: 700;
}
.inv-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 12.5px;
}
.inv-print-th {
  text-align: left;
  padding: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}
.inv-print-th-qty { width: 60px; text-align: center; }
.inv-print-th-price { width: 140px; text-align: right; }
.inv-print-th-total { width: 150px; text-align: right; }
.inv-print-tr {
  border-bottom: 1px solid var(--border);
}
.inv-print-td {
  padding: 10px;
  font-weight: 500;
  color: var(--text-main);
}
.inv-print-td-center { text-align: center; font-weight: 600; }
.inv-print-td-right { text-align: right; }
.inv-print-td-strong { font-weight: 700; }
.inv-print-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 12.5px;
  gap: 20px;
}
.inv-print-payment {
  max-width: 320px;
  background: var(--canvas);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.inv-print-payment-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.inv-print-payment-bank {
  font-weight: 500;
  color: var(--text-main);
}
.inv-print-payment-acc {
  font-weight: 700;
  color: var(--primary);
  font-size: 14px;
}
.inv-print-payment-note {
  font-size: 12.5px;
  color: var(--text-subtle);
}
.inv-print-payment-hint {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin-top: 4px;
}
.inv-print-totals {
  width: 250px;
}
.inv-print-totals-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.inv-print-totals-grand {
  display: flex;
  justify-content: space-between;
  border-top: 2px solid var(--primary);
  padding-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}



/* ==============================================================================
   PROJECTS MODULE (Portofolio Proyek & Margin RAB) - Corporate Minimalist
   Selaras kontrak desain #cashflow: reuse .treasury-* + .data-table + .badge-*.
   Blok ini hanya menambah utilitas khusus portofolio (prefiks .proj-).
   Zero rainbow hex, semua warna via var(--token). Tanpa aksen garis kiri,
   tanpa glow bertumpuk. Dial ENERGY 1 / RHYTHM 2 / MOTION 1.
   ============================================================================== */

/* Grid 4 metric card (selaras treasury metrics row) */
.proj-metrics-4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) {
  .proj-metrics-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .proj-metrics-4 { grid-template-columns: 1fr; }
}

/* Action bar: filter pills kiri, tools kanan */
.proj-action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.proj-action-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* View mode toggle (Kartu / Tabel RAB) */
.proj-view-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2px;
}
.proj-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.proj-view-btn:hover {
  color: var(--text-main);
  background: var(--surface-hover);
}
.proj-view-btn.active {
  color: var(--primary-text);
  background: var(--primary-soft);
}
.proj-view-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Sort dropdown */
.proj-sort-select {
  width: 190px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text-main);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.proj-sort-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary-border);
}

/* Card grid portofolio */
.proj-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}
@media (max-width: 480px) {
  .proj-card-grid { grid-template-columns: 1fr; }
}

/* Kartu proyek (flat, hover subtle, tanpa shadow idle) */
.proj-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.proj-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.proj-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.proj-card-codeline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.proj-card-code {
  color: var(--primary);
  font-weight: 700;
}
.proj-card-sector {
  color: var(--text-subtle);
}
.proj-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 6px;
  line-height: 1.3;
}
.proj-card-client {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.proj-card-client strong {
  color: var(--text-main);
}
.proj-card-status {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Ringkasan finansial 2 kolom */
.proj-card-finance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.proj-fin-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.proj-fin-lbl {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-subtle);
}
.proj-fin-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.proj-fin-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Fase delivery & progress serapan */
.proj-card-stage {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.proj-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-muted);
}
.proj-stage-head strong {
  color: var(--text-main);
}
.proj-stage-pct {
  font-weight: 600;
  color: var(--text-main);
}
.proj-progress-track {
  height: 6px;
  width: 100%;
  background: var(--surface-hover);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.proj-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-sm);
  transition: width 0.3s ease;
}
.proj-progress-fill.is-over {
  background: var(--danger);
}

/* Footer kartu: timeline, PIC, aksi */
.proj-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.proj-card-timeline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.proj-card-timeline strong {
  color: var(--text-main);
}
.proj-days {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  margin-left: 2px;
}
.proj-days.is-urgent {
  color: var(--danger);
}
.proj-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.proj-card-pic {
  font-size: 12.5px;
  color: var(--text-muted);
}
.proj-card-pic strong {
  color: var(--text-main);
}
.proj-update-btn {
  padding: 5px 10px;
  font-size: 12.5px;
}

/* Sel tabel master RAB */
.proj-td-name {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
}
.proj-td-code {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
}
.proj-td-client {
  font-weight: 600;
  color: var(--text-main);
  font-size: 13px;
}
.proj-td-sector {
  font-size: 12.5px;
  color: var(--text-muted);
}
.proj-td-contract {
  font-weight: 700;
  color: var(--text-main);
}
.proj-td-muted {
  color: var(--text-muted);
}
.proj-td-pic {
  font-size: 12px;
  color: var(--text-muted);
}

/* State cards (empty / error) jujur, keyboard-safe */
.proj-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 44px 24px;
}
.proj-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 4px;
}
.proj-state-icon.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.proj-state-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.proj-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 0 6px;
  line-height: 1.5;
}
.proj-state-desc strong {
  color: var(--text-main);
}
.proj-state-action {
  display: inline-flex;
  gap: 8px;
}

/* Modal helpers */
.proj-modal-lg {
  max-width: 740px !important;
  width: 95% !important;
  max-height: 90vh !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

.proj-modal-lg .modal-header {
  padding: 16px 24px !important;
  flex-shrink: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--surface) !important;
}

.proj-modal-lg form {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.proj-modal-lg .modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  padding: 20px 24px !important;
  max-height: calc(90vh - 130px) !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.proj-modal-lg .modal-footer {
  padding: 14px 24px !important;
  flex-shrink: 0 !important;
  border-top: 1px solid var(--border) !important;
  background: var(--canvas) !important;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Table & Stream Project Cover Thumbnails */
.prj-table-thumb {
  width: 44px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: #0F172A;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: block;
}

.prj-table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prj-stream-thumb {
  width: 84px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #0F172A;
  flex-shrink: 0;
  border: 1px solid var(--border);
  position: relative;
}

.prj-stream-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.prj-stream-cat-chip {
  position: absolute;
  bottom: 3px;
  left: 3px;
  right: 3px;
  font-size: 8px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(15, 23, 42, 0.8);
  padding: 1px 4px;
  border-radius: 3px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proj-modal-xl {
  max-width: 960px !important;
  width: 95% !important;
  max-height: 90vh !important;
  margin: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}
.proj-modal-xl .modal-header {
  padding: 16px 26px !important;
  flex-shrink: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--surface) !important;
}
.proj-modal-xl form {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.proj-modal-xl .modal-body {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  min-height: 0 !important;
  padding: 22px 26px !important;
  max-height: calc(90vh - 130px) !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proj-modal-xl .modal-footer {
  padding: 14px 26px !important;
  flex-shrink: 0 !important;
  border-top: 1px solid var(--border) !important;
  background: var(--canvas) !important;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.proj-modal-sm { max-width: 440px; }
.proj-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.proj-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.proj-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.proj-modal-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.proj-form-grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px;
}
.proj-form-grid3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .proj-form-grid2, .proj-form-grid3 { grid-template-columns: 1fr; }
  .proj-modal-xl { width: 96% !important; max-height: 92vh !important; }
  .proj-modal-xl .modal-body { padding: 16px !important; }
}
.proj-form-mb {
  margin-bottom: 12px;
}
.proj-form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* Clear Visual Hierarchy: Distinct Column Title (Label) vs Column Content (Value) */
.proj-modal-xl .form-label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #64748B !important;
  margin-bottom: 6px !important;
  line-height: 1.2 !important;
}
[data-theme="dark"] .proj-modal-xl .form-label {
  color: #94A3B8 !important;
}
.proj-modal-xl .form-control {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: var(--text-main) !important;
  background-color: var(--canvas) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.proj-modal-xl .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-soft) !important;
  outline: none !important;
}
.proj-modal-xl .form-control.font-num {
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}
.proj-modal-xl textarea.form-control,
#prj-desc,
#dash-prj-desc {
  min-height: 125px !important;
  line-height: 1.55 !important;
  resize: vertical !important;
  font-family: var(--font-sans) !important;
}


/* 1-Door Dossier & Multi-Tier Styling */
.proj-sec-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.proj-sec-box:hover {
  border-color: rgba(37, 99, 235, 0.3);
}
.proj-sec-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: 6px;
  padding: 5px 12px;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Workflow Pipeline Nav & Dossier Cards */
.proj-workflow-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  font-size: 11px;
}
.proj-workflow-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.proj-workflow-arrow {
  color: var(--text-muted);
  font-size: 10px;
  opacity: 0.5;
  margin: 0 2px;
}
.proj-doc-card {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.proj-doc-card:hover {
  border-color: var(--primary-border);
}
.proj-doc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.proj-doc-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}
.proj-doc-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  flex: 1;
}
.proj-doc-upload-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.proj-doc-file-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  max-width: 180px;
}
.proj-doc-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  margin: 0;
}
.proj-doc-check input {
  cursor: pointer;
  accent-color: var(--primary);
}
.proj-scheme-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.proj-scheme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.15s ease;
  font-size: 12px;
  color: var(--text-main);
  user-select: none;
}
.proj-scheme-opt:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}
.proj-scheme-opt.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}
.proj-chain-banner {
  display: flex;
  align-items: center;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  overflow-x: auto;
  gap: 6px;
}
.proj-chain-step {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  white-space: nowrap;
}
.proj-chain-step.done {
  color: var(--primary);
}
.proj-chain-step.next {
  color: var(--text-muted);
  opacity: 0.6;
}


/* ==============================================================================
   LETTERS MODULE (Sekretariat Digital & Tata Naskah) - prefiks .let-
   Corporate minimalist, token-driven. Reuse .treasury-* untuk header, metric,
   ledger card, dan footer. Blok ini hanya menambah kelas khusus persuratan.
   ZERO hex mentah, semua warna via var(--token). Balanced braces.
   ============================================================================== */
.let-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* --- Generator nomor naskah (panel di dalam command bar) --------------------- */
.let-gen-panel {
  min-width: 288px;
  background: var(--surface);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.let-gen-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.let-gen-format {
  font-size: 12.5px;
  color: var(--primary-text);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  align-self: flex-start;
}
.let-gen-controls {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.let-gen-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.let-gen-select {
  width: 100%;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--canvas);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  font-family: var(--font-sans);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.let-gen-select:hover {
  border-color: var(--primary-border);
}
.let-gen-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}
.let-gen-result {
  display: flex;
  align-items: center;
  gap: 8px;
}
.let-gen-no {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.let-gen-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: background 0.15s ease;
}
.let-gen-copy:hover {
  background: var(--primary-hover);
}
.let-gen-copy:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Tabs segmen ------------------------------------------------------------- */
.let-segment-nav {
  display: flex;
}

/* --- Judul kartu kerja utama ------------------------------------------------- */
.let-ledger-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.let-ledger-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.let-ledger-caption {
  font-size: 12.5px;
  color: var(--text-muted);
}
.let-ledger-footer-note {
  font-size: 12.5px;
  color: var(--text-subtle);
}

/* --- Sel tabel persuratan ---------------------------------------------------- */
.let-no-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.let-no-chip:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}
.let-no-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.let-cat-badge,
.let-status-badge {
  font-size: 12.5px;
  font-weight: 600;
}
.let-party-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}
.let-party-sub {
  font-size: 12px;
  color: var(--text-subtle);
  margin-top: 2px;
}
.let-subject {
  max-width: 320px;
  font-size: 13.5px;
  color: var(--text-main);
  font-weight: 500;
}
.let-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}
.let-signer {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.let-deadline {
  font-size: 13px;
  color: var(--text-subtle);
  white-space: nowrap;
}
.let-deadline.is-due {
  color: var(--danger);
  font-weight: 700;
}

/* --- Cluster aksi baris ------------------------------------------------------ */
.let-action-cluster {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.let-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}
.let-del-btn {
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.let-del-btn:hover {
  color: var(--danger);
  background: var(--danger-soft);
}
.let-del-btn:focus-visible,
.let-action-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Kartu state (error/empty penuh halaman) --------------------------------- */
.let-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 56px 24px;
}
.let-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--surface-hover);
  color: var(--text-muted);
}
.let-state-icon.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.let-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.let-state-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 460px;
}

/* --- Responsif --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .let-gen-panel {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 620px) {
  .let-ledger-caption {
    display: none;
  }
  .let-action-btn span {
    display: none;
  }
}
@media (max-width: 480px) {
  .let-subject {
    max-width: 200px;
  }
}



/* ==============================================================================
   TASKS MODULE (Papan Kanban Sprint & Delivery Bukti) - prefiks .task-
   Selaras kontrak desain #cashflow: reuse .treasury-* untuk command bar & metric,
   .filter-pill-btn untuk filter proyek, .badge-* untuk status. Blok ini hanya
   menambah kelas khusus papan Kanban (kolom flat + kartu task).
   ZERO hex mentah, semua warna via var(--token). Tanpa aksen garis kiri dekoratif,
   tanpa glow bertumpuk. Dial ENERGY 1 / RHYTHM 2 / MOTION 1. Balanced braces.
   ============================================================================== */
.task-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* --- Sisi kanan command bar: search + ringkasan hitung ----------------------- */
.task-command-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}
.task-command-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}
.task-command-hint strong {
  color: var(--text-main);
}

/* --- Bar filter proyek ------------------------------------------------------- */
.task-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.task-filter-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-subtle);
  white-space: nowrap;
}
.task-filter-pills {
  flex: 1;
  min-width: 0;
}

/* --- Papan Kanban 4 kolom ---------------------------------------------------- */
.task-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

/* Kolom flat: penanda status pakai border-top tipis (bukan aksen kiri dekoratif) */
.task-column {
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-top: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  min-height: 120px;
}
.task-column.is-neutral { border-top-color: var(--border-strong); }
.task-column.is-primary { border-top-color: var(--primary); }
.task-column.is-warning { border-top-color: var(--warning); }
.task-column.is-success { border-top-color: var(--success); }

.task-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.task-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-column-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--surface-hover);
  color: var(--text-muted);
}
.task-column.is-primary .task-column-icon { background: var(--primary-soft); color: var(--primary); }
.task-column.is-warning .task-column-icon { background: var(--warning-soft); color: var(--warning); }
.task-column.is-success .task-column-icon { background: var(--success-soft); color: var(--success); }
.task-column-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}
.task-column-count {
  font-size: 12.5px;
  font-weight: 700;
}

.task-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

/* Empty state per kolom (jujur: bedakan hasil pencarian vs kolom kosong) */
.task-column-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 28px 12px;
}
.task-column-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-hover);
  color: var(--text-subtle);
}
.task-column-empty-text {
  font-size: 12.5px;
  color: var(--text-subtle);
  line-height: 1.5;
  max-width: 200px;
}

/* --- Kartu task (flat, hover subtle, tanpa shadow idle) ---------------------- */
.task-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.task-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}
.task-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.task-card-project {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.task-card-prio {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.task-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin: 2px 0 0;
}
.task-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Pil bukti kerja (tautan nyata ke commit / dokumen) */
.task-card-evidence {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.task-card-evidence:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
}
.task-card-evidence:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.task-card-evidence-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Meta baris: assignee + jatuh tempo */
.task-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.task-card-assignee {
  display: flex;
  align-items: center;
  gap: 7px;
}
.task-card-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full, 50%);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
}
.task-card-assignee-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.task-card-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-subtle);
  white-space: nowrap;
}

/* Aksi kartu: pindah status, bukti, hapus */
.task-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.task-move-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--primary-text);
  background: var(--primary-soft);
  border: 1px solid var(--primary-border);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.task-move-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.task-move-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.task-done-flag {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--success);
  background: var(--success-soft);
}
.task-evidence-btn,
.task-del-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.task-evidence-btn:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}
.task-del-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}
.task-evidence-btn:focus-visible,
.task-del-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* --- Kartu state error (penuh halaman) --------------------------------------- */
.task-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  padding: 56px 24px;
}
.task-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--surface-hover);
  color: var(--text-muted);
}
.task-state-icon.is-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.task-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.task-state-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 460px;
}

/* --- Responsif --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .task-board {
    grid-template-columns: repeat(2, 1fr);
  }
  .task-command-side {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 620px) {
  .task-board {
    grid-template-columns: 1fr;
  }
  .task-card-project {
    max-width: 130px;
  }
}
@media (max-width: 480px) {
  .task-move-btn span {
    font-size: 12.5px;
  }
}


/* ============================================================================ */
/* PAYROLL MODULE (.pay-) - Corporate Minimalist, token-driven, no rainbow      */
/* Reuse .treasury-command-bar / .treasury-metric-card / .data-table / .badge   */
/* ============================================================================ */

.pay-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Ringkasan komitmen payroll di header (monitoring) */
.pay-commit-strip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 264px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 6px 12px;
  cursor: pointer;
  transition: border-color 0.18s ease;
}
.pay-commit-strip:hover {
  border-color: var(--border-strong);
}
.pay-commit-strip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.pay-commit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.pay-commit-row + .pay-commit-row {
  border-top: 1px solid var(--border);
}
.pay-commit-chip {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-inverse);
  flex-shrink: 0;
  letter-spacing: 0.02em;
  background: var(--primary);
}
.pay-commit-chip.alt { background: var(--primary-hover); }
.pay-commit-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.pay-commit-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}
.pay-commit-tag {
  font-size: 12px;
  color: var(--text-subtle);
}
.pay-commit-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Metric card fokus keyboard (reuse treasury-metric-card) */
.treasury-metric-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Toolbar tab + periode */
.pay-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pay-period-picker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-period-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.pay-period-select {
  width: 150px;
  padding: 7px 12px;
  font-weight: 600;
}

/* Kartu tabel (reuse .card) */
.pay-table-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pay-table-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pay-table-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pay-table-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.01em;
}
.pay-table-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sel tabel */
.pay-col-num { text-align: right; white-space: nowrap; }
.pay-col-center { text-align: center; }
.pay-emp-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 13px;
}
.pay-emp-nip {
  font-size: 12.5px;
  color: var(--primary);
  font-weight: 600;
}
.pay-cell-primary {
  font-size: 13px;
  color: var(--text-main);
}
.pay-cell-muted {
  font-size: 12.5px;
  color: var(--text-muted);
}
.pay-amt-plus  { color: var(--success); font-weight: 600; }
.pay-amt-minus { color: var(--danger);  font-weight: 600; }
.pay-amt-net   { color: var(--text-main); font-weight: 700; font-size: 13.5px; }
.pay-badge-gap { margin-left: 4px; }
.pay-row-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

/* State cards: empty / loading / error */
.pay-state-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.pay-state-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.pay-state-icon.is-primary { background: var(--primary-soft); color: var(--primary); }
.pay-state-icon.is-danger  { background: var(--danger-soft);  color: var(--danger); }
.pay-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.pay-state-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 460px;
  margin: 0 0 8px;
}
.pay-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: pay-spin 0.7s linear infinite;
  margin-bottom: 6px;
}
@keyframes pay-spin {
  to { transform: rotate(360deg); }
}

/* Modal titles & forms */
.pay-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.pay-gen-dialog { max-width: 440px; }
.pay-emp-dialog { max-width: 580px; }
.pay-slip-dialog { max-width: 660px; }
.pay-gen-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.pay-form-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.pay-form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.pay-form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.pay-form-grid:last-child { margin-bottom: 0; }

/* Slip gaji header */
.pay-slip-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}
.pay-slip-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pay-slip-header-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Slip gaji sheet (dokumen resmi, token-driven) */
.pay-slip-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  color: var(--text-main);
}
.pay-slip-kop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 2px solid var(--border-strong);
  padding-bottom: 16px;
  margin-bottom: 20px;
}
.pay-slip-org-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.pay-slip-org-line {
  font-size: 12.5px;
  color: var(--text-muted);
}
.pay-slip-org-sub {
  font-size: 12.5px;
  color: var(--text-subtle);
}
.pay-slip-kop-meta { text-align: right; }
.pay-slip-doc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}
.pay-slip-doc-ref {
  font-size: 12.5px;
  color: var(--text-muted);
}
.pay-slip-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.pay-slip-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pay-slip-info-label {
  font-size: 12.5px;
  color: var(--text-muted);
}
.pay-slip-info-value {
  font-size: 12.5px;
  color: var(--text-main);
  font-weight: 500;
}
.pay-slip-info-value.strong { font-weight: 700; font-size: 14px; }
.pay-slip-info-value.accent { color: var(--primary); font-weight: 600; }

.pay-slip-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.pay-slip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.pay-slip-table thead th {
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}
.pay-slip-table thead th.pay-col-num { text-align: right; }
.pay-slip-row td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
.pay-slip-row td.font-num { text-align: right; font-weight: 600; }
.pay-slip-total-row td {
  padding: 12px 14px;
  background: var(--canvas);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
}
.pay-slip-total-row td.font-num { text-align: right; color: var(--primary); }

.pay-slip-sign {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  font-size: 12.5px;
  text-align: center;
}
.pay-slip-sign-col {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pay-slip-sign-role { color: var(--text-muted); }
.pay-slip-sign-space {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-slip-sign-space.verified {
  color: var(--success);
  font-weight: 700;
  font-size: 12.5px;
}
.pay-slip-sign-name {
  font-weight: 700;
  color: var(--text-main);
  border-top: 1px solid var(--border-strong);
  padding-top: 4px;
}

/* Responsif payroll */
@media (max-width: 720px) {
  .pay-commit-strip { width: 100%; min-width: 0; }
  .pay-toolbar { flex-direction: column; align-items: stretch; }
  .pay-period-picker { justify-content: space-between; }
  .pay-slip-info { grid-template-columns: 1fr; }
  .pay-form-grid.cols-2,
  .pay-form-grid.cols-3 { grid-template-columns: 1fr; }
  .pay-slip-kop { flex-direction: column; }
  .pay-slip-kop-meta { text-align: left; }
  .pay-slip-sign { flex-direction: column; align-items: center; }
}


/* ============================================================================== */
/* PERMISSIONS & ORGCHART MODULE (Hak Akses, Audit & Bagan Perusahaan)            */
/* Prefiks .perm- & .org-. Corporate-minimalist, token var() saja (ZERO hex).      */
/* Reuse .treasury-command-bar / .treasury-metric-* / .filter-pill / .data-table.  */
/* ============================================================================== */

.perm-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: perm-fade-in 0.25s ease;
}

@keyframes perm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.perm-metrics-row { margin-bottom: 0; }

/* Panel kartu (reuse .card, tambah kepala konsisten) */
.perm-panel { border-radius: var(--radius-xl); overflow: hidden; }

.perm-panel-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.perm-panel-title-group { min-width: 0; }

.perm-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-main);
}

.perm-panel-title svg { color: var(--primary); }

.perm-panel-sub {
  font-size: 13px;
  color: var(--text-subtle);
  margin-top: 3px;
}

.perm-panel-tools { display: flex; align-items: center; gap: 10px; }

/* Toolbar tabel org */
.perm-table-toolbar {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.perm-table-meta { font-size: 13px; color: var(--text-muted); }

/* Sel personil */
.perm-person-cell { display: flex; align-items: center; gap: 12px; }

.perm-avatar-img {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--border);
}

.perm-avatar-init {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-inverse);
}

.perm-person-name { font-weight: 700; font-size: 14px; color: var(--text-main); }
.perm-person-handle { font-size: 12.5px; color: var(--primary); font-weight: 600; margin-top: 1px; }

.perm-td-title { font-size: 13.5px; color: var(--text-main); font-weight: 500; }
.perm-td-handle { font-size: 12px; color: var(--primary); font-weight: 600; }
.perm-td-muted { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.perm-td-time { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.perm-td-details { font-size: 13.5px; color: var(--text-main); }

.perm-badge-owner { display: inline-flex; align-items: center; gap: 4px; }

.perm-role-name { font-weight: 700; font-size: 14px; color: var(--primary); }

/* Chip capability */
.perm-caps { display: flex; flex-wrap: wrap; gap: 6px; }

.perm-cap-chip {
  font-size: 12px; font-weight: 600;
  background: var(--canvas); color: var(--text-main);
  padding: 4px 9px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Aksi baris */
.perm-row-actions { display: inline-flex; align-items: center; gap: 4px; }

.perm-act-role { color: var(--primary); padding: 5px 8px; border-radius: var(--radius-sm); }
.perm-act-del { color: var(--text-muted); padding: 5px 8px; border-radius: var(--radius-sm); transition: color 0.15s ease, background 0.15s ease; }
.perm-act-del:hover { color: var(--danger); background: var(--danger-soft); }

.perm-footer-note {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-subtle);
}
.perm-footer-note svg { color: var(--success); }

/* State panel (empty / error) */
.perm-state-panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 48px 24px;
}

.perm-state-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.perm-state-icon.is-primary { background: var(--primary-soft); color: var(--primary); }
.perm-state-icon.is-danger { background: var(--danger-soft); color: var(--danger); }

.perm-state-title { font-size: 16px; font-weight: 700; color: var(--text-main); }
.perm-state-desc { font-size: 13.5px; color: var(--text-muted); max-width: 440px; line-height: 1.55; }

/* ---------- BAGAN PERUSAHAAN (.org-) ---------- */

.org-view-toggle {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  display: flex;
  gap: 3px;
}

.org-view-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.org-view-btn:hover { color: var(--text-main); }

.org-view-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.org-view-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.org-canvas { padding: 30px 24px; background: var(--canvas); }

.org-canvas-header { text-align: center; margin-bottom: 26px; }

.org-canvas-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 700; color: var(--text-main);
}
.org-canvas-badge svg { color: var(--warning); }

.org-canvas-note {
  font-size: 13px; color: var(--text-muted);
  margin-top: 8px; max-width: 640px; margin-left: auto; margin-right: auto;
  line-height: 1.5;
}

.org-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  align-items: start;
}

.org-column { display: flex; flex-direction: column; align-items: center; }

.org-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.org-card-owner { padding: 18px; }

.org-card-owner:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.org-card-toprow {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 8px;
}

.org-owner-tag { display: inline-flex; align-items: center; gap: 4px; }

.org-card-identity { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.org-avatar-img {
  width: 46px; height: 46px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--border);
}

.org-avatar-init {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  background: var(--text-main); color: var(--surface);
}

.org-card-idmeta { min-width: 0; }
.org-card-name {
  font-size: 15px; font-weight: 700; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.org-card-handle { font-size: 12px; color: var(--text-muted); margin-top: 2px; font-weight: 500; }

.org-card-detail { border-top: 1px solid var(--border); padding-top: 12px; }
.org-card-job { font-size: 13.5px; font-weight: 600; color: var(--text-main); }
.org-card-div { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.org-role-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }

.org-card-actions { display: flex; gap: 8px; margin-top: 14px; }
.org-act-btn { flex: 1; justify-content: center; font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius-md); }

/* Batang penghubung (garis naungan, bukan aksen dekoratif) */
.org-stem { width: 2px; height: 26px; background: var(--border-strong); margin: 0 auto; }
.org-stem-sm { height: 13px; }

.org-sub-flow { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

.org-card-sub { padding: 13px; }
.org-card-sub:hover { border-color: var(--primary-border); }

.org-sub-identity { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.org-sub-avatar-img {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border);
}
.org-sub-avatar-init {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  background: var(--text-muted); color: var(--surface);
}

.org-sub-idmeta { min-width: 0; flex: 1; }
.org-sub-name {
  font-size: 14px; font-weight: 700; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.org-sub-handle { font-size: 12px; color: var(--text-muted); margin-top: 1px; font-weight: 600; }

.org-sub-detail {
  border-top: 1px solid var(--border); padding-top: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.org-sub-job { font-size: 13px; font-weight: 600; color: var(--text-main); }
.org-sub-role { font-size: 12.5px; color: var(--primary); margin-top: 1px; font-weight: 600; }

.org-sub-actions { display: flex; gap: 4px; }
.org-sub-act { padding: 4px 8px; border-radius: var(--radius-sm); color: var(--text-muted); }
.org-sub-act:hover { color: var(--text-main); }
.org-sub-del:hover { color: var(--danger); background: var(--danger-soft); }

/* Tombol rekrut (dashed, kontras token) */
.org-recruit-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 13px; font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.org-recruit-btn:hover {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-soft);
}
.org-recruit-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Fokus keyboard untuk kartu metrik yang bisa diklik & aksi */
.perm-container .treasury-metric-card[role="button"]:focus-visible,
.perm-act-role:focus-visible,
.perm-act-del:focus-visible,
.org-act-btn:focus-visible,
.org-sub-act:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Responsif */
@media (max-width: 1024px) {
  .org-columns { grid-template-columns: 1fr; gap: 18px; max-width: 480px; }
}

@media (max-width: 640px) {
  .perm-panel-header { align-items: flex-start; }
  .perm-table-toolbar { flex-direction: column; align-items: stretch; }
  .org-canvas { padding: 20px 14px; }
  .org-card-actions { flex-direction: column; }
}


/* ============================================================================== */
/* TREASURY & CASHFLOW SUITE (.treasury-)                                         */
/* Corporate Modern Finance — Ocean Blue + Solid Pastel Cards + SVG Art           */
/* Unique namespace: .treasury-* (TIDAK clone dari dashboard .ref-*)              */
/* PT. Amanda Teknologi Nusantara (NUSAMANDA)                                     */
/* ============================================================================== */

.treasury-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  animation: treasury-fade-in 0.3s ease;
}
@keyframes treasury-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ─── 1. EXECUTIVE COMMAND BAR ─── */
.treasury-command-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 32px 26px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1E40AF 100%);
  color: #F1F5F9;
  position: relative;
  overflow: hidden;
}
.treasury-command-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1D4ED8, #2563EB, #4F46E5, #6366F1, #7C3AED);
}

.treasury-title-area {
  flex: 1;
  min-width: 0;
}
.treasury-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #93C5FD;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}
.treasury-tag-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3B82F6;
  animation: treasury-pulse 2s ease-in-out infinite;
}
@keyframes treasury-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.treasury-title {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.treasury-subtitle {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 560px;
}

/* Action buttons inside command bar */
.treasury-actions-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-treasury-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: #3B82F6;
  color: #FFFFFF;
  border: 1px solid #60A5FA;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease;
}
.btn-treasury-primary:hover { background: #2563EB; transform: translateY(-1px); }
.btn-treasury-primary:focus-visible { outline: 2px solid #93C5FD; outline-offset: 2px; }

.btn-treasury-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.btn-treasury-secondary:hover { background: rgba(255, 255, 255, 0.14); color: #F1F5F9; }
.btn-treasury-secondary:focus-visible { outline: 2px solid #93C5FD; outline-offset: 2px; }

.btn-treasury-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  color: #94A3B8;
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.18s ease;
}
.btn-treasury-ghost:hover { color: #E2E8F0; }
.btn-treasury-ghost:focus-visible { outline: 2px solid #93C5FD; outline-offset: 2px; }

/* ─── BANK BALANCE STRIP (right side of command bar) ─── */
.treasury-balance-strip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 264px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.treasury-balance-strip:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.18);
}
.treasury-balance-strip:focus-visible { outline: 2px solid #93C5FD; outline-offset: 2px; }

.treasury-balance-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.treasury-balance-row + .treasury-balance-row {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.treasury-balance-chip {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.treasury-balance-chip.mandiri { background: #1D4ED8; }
.treasury-balance-chip.bca    { background: #0369A1; }
.treasury-balance-chip.cash   { background: #4F46E5; }

.treasury-balance-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.treasury-balance-name {
  font-size: 12px;
  font-weight: 600;
  color: #E2E8F0;
  line-height: 1.2;
}
.treasury-balance-tag {
  font-size: 12px;
  color: #64748B;
}
.treasury-balance-val {
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
  white-space: nowrap;
}

/* ─── 2. FINANCIAL METRIC CARDS (4-col grid, solid backgrounds) ─── */
.treasury-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.treasury-metric-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.treasury-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.treasury-metric-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Solid themed backgrounds per variant (NO glass/transparent - Dop & Halus) */
.treasury-metric-card.is-success {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.treasury-metric-card.is-danger {
  background: #F5F3FF;
  border-color: #DDD6FE;
}
.treasury-metric-card.is-primary {
  background: #EFF6FF;
  border-color: #BFDBFE;
}
.treasury-metric-card.is-warning {
  background: #EEF2FF;
  border-color: #C7D2FE;
}

.treasury-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.treasury-metric-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-muted);
}
.treasury-metric-card.is-success .treasury-metric-icon { background: #DBEAFE; color: #1D4ED8; }
.treasury-metric-card.is-danger  .treasury-metric-icon { background: #EDE9FE; color: #6D28D9; }
.treasury-metric-card.is-primary .treasury-metric-icon { background: #DBEAFE; color: #2563EB; }
.treasury-metric-card.is-warning .treasury-metric-icon { background: #E0E7FF; color: #4F46E5; }

.treasury-metric-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.treasury-metric-tag.is-success { background: #DBEAFE; color: #1D4ED8; }
.treasury-metric-tag.is-danger  { background: #EDE9FE; color: #6D28D9; }
.treasury-metric-tag.is-primary { background: #DBEAFE; color: #2563EB; }
.treasury-metric-tag.is-warning { background: #E0E7FF; color: #4F46E5; }

.treasury-metric-caption {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}
.treasury-metric-val {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-main);
}
.treasury-metric-val.is-success { color: #1D4ED8; }
.treasury-metric-val.is-danger  { color: #6D28D9; }
.treasury-metric-val.is-primary { color: #2563EB; }
.treasury-metric-val.is-warning { color: #4F46E5; }

.treasury-metric-sub {
  font-size: 12.5px;
  color: var(--text-subtle);
  line-height: 1.3;
}

/* ─── 3. SEGMENTED NAVIGATION PILLS ─── */
.treasury-segment-nav {
  display: flex;
  align-items: center;
}

/* ─── 4. SPLIT WORKSPACE LAYOUT (main + sidebar) ─── */
.treasury-workspace-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}
.treasury-main-content {
  min-width: 0;
}

/* ─── SIDEBAR INTELLIGENCE CARD ─── */
.treasury-sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
}
.treasury-side-section {
  padding: 16px 0;
}
.treasury-side-section:first-child { padding-top: 0; }

.treasury-side-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}
.treasury-side-badge {
  font-size: 12px;
  font-weight: 700;
}

.treasury-divider {
  height: 1px;
  background: var(--border);
}

/* Expense distribution bars */
.treasury-expense-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.treasury-exp-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.treasury-exp-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.exp-name {
  font-size: 12.5px;
  color: var(--text-main);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.exp-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.treasury-progress-track {
  height: 6px;
  background: var(--canvas);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.treasury-progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #3B82F6, #2563EB);
  transition: width 0.4s ease;
}

/* Upcoming commitments list */
.treasury-upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.treasury-upcoming-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.treasury-upcoming-item:last-child { border-bottom: none; }

.treasury-upcoming-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.treasury-upcoming-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}
.treasury-upcoming-date {
  font-size: 12.5px;
  color: var(--text-subtle);
}
.treasury-upcoming-amount {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.treasury-upcoming-amount.inflow  { color: #1D4ED8; }
.treasury-upcoming-amount.outflow { color: #6D28D9; }

/* Authorization box */
.treasury-authbox {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-top: 16px;
}
.treasury-authbox-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}
.treasury-authbox-head svg { color: var(--primary); }
.treasury-authbox-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ─── 5. LEDGER TABLE CARD ─── */
.treasury-ledger-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.treasury-ledger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* Filter pill group inside ledger */
.filter-pill-group {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3px;
}
.filter-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.filter-pill-btn:hover { color: var(--text-main); }
.filter-pill-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.filter-pill-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.filter-pill-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--canvas);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  color: var(--text-subtle);
}
.filter-pill-btn.active .filter-pill-count {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ERP search box */
.erp-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  min-width: 200px;
  transition: border-color 0.15s ease;
}
.erp-search-box:focus-within { border-color: var(--primary); }
.erp-search-box svg { color: var(--text-subtle); flex-shrink: 0; }
.erp-search-box input {
  border: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--text-main);
  outline: none;
  width: 100%;
  font-family: var(--font-sans);
}
.erp-search-box input::placeholder { color: var(--text-subtle); }

/* Ledger footer summary */
.treasury-ledger-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--canvas);
  flex-wrap: wrap;
}
.treasury-ledger-footer-count {
  font-size: 12.5px;
  color: var(--text-muted);
}
.treasury-ledger-footer-filter {
  color: var(--text-subtle);
  font-style: italic;
  margin-left: 4px;
}
.treasury-ledger-footer-totals {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ─── 6. P&L VIEW ─── */
.treasury-pnl-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.treasury-pnl-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}
.treasury-pnl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.treasury-pnl-head.is-revenue { background: #EFF6FF; }
.treasury-pnl-head.is-expense { background: #F5F3FF; }

.treasury-pnl-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-main);
  margin: 0;
}
.treasury-pnl-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.treasury-pnl-total {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.treasury-pnl-table {
  width: 100%;
  border-collapse: collapse;
}
.treasury-pnl-table tr { border-bottom: 1px solid var(--border); }
.treasury-pnl-table tr:last-child { border-bottom: none; }
.treasury-pnl-table td { padding: 10px 22px; font-size: 13px; }

.treasury-pnl-cat { color: var(--text-main); font-weight: 500; }
.treasury-pnl-count { color: var(--text-subtle); font-size: 12px; }
.treasury-pnl-amt { text-align: right; font-weight: 700; }
.treasury-pnl-amt.is-inflow  { color: #1D4ED8; }
.treasury-pnl-amt.is-outflow { color: #6D28D9; }

/* P&L Summary card */
.treasury-pnl-summary {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #1E40AF 100%);
  color: #F1F5F9;
  padding: 0;
  overflow: hidden;
}
.treasury-pnl-summary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
}
.treasury-pnl-summary-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #93C5FD;
  margin-bottom: 6px;
  display: block;
}
.treasury-pnl-summary-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #FFFFFF;
}
.treasury-pnl-summary-desc {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}
.treasury-pnl-summary-figure {
  text-align: right;
  flex-shrink: 0;
}
.treasury-pnl-summary-val {
  font-size: 24px;
  font-weight: 600;
  color: #60A5FA;
  letter-spacing: -0.02em;
}
.treasury-pnl-summary-margin {
  margin-top: 6px;
  display: inline-flex;
}

/* ─── 7. COA TABLE ─── */
.treasury-coa-header {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 0;
  overflow: hidden;
}
.treasury-coa-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: var(--canvas);
}
.treasury-coa-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
.treasury-coa-caption {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 3px 0 0;
  line-height: 1.45;
}
.treasury-coa-total {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}
.treasury-coa-table-card {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
}
.treasury-coa-code {
  font-weight: 700;
  color: var(--primary);
}
.treasury-coa-name {
  font-weight: 600;
  color: var(--text-main);
}
.treasury-coa-type {
  font-size: 12px;
}
.treasury-coa-category {
  font-size: 13px;
  color: var(--text-muted);
}
.treasury-coa-balance {
  text-align: right;
  font-weight: 700;
  font-size: 13.5px;
}
.treasury-coa-balance.is-primary { color: var(--primary); }
.treasury-coa-balance.is-inflow  { color: #1D4ED8; }
.treasury-coa-balance.is-outflow { color: #6D28D9; }
.treasury-coa-desc {
  font-size: 12.5px;
  color: var(--text-subtle);
}

/* ─── 8. SEGMENT NAV (reusable filter pills — treasury scope) ─── */
.filter-segmented-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.filter-pill:hover { color: var(--text-main); }
.filter-pill.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.filter-pill:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.filter-pill svg { width: 14px; height: 14px; }

/* ─── 9. DARK MODE OVERRIDES ─── */
[data-theme="dark"] .treasury-command-bar {
  background: linear-gradient(135deg, #020617 0%, #0F172A 50%, #1E3A5F 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .treasury-metric-card.is-success {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}
[data-theme="dark"] .treasury-metric-card.is-danger {
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(167, 139, 250, 0.20);
}
[data-theme="dark"] .treasury-metric-card.is-primary {
  background: rgba(37, 99, 235, 0.10);
  border-color: rgba(59, 130, 246, 0.20);
}
[data-theme="dark"] .treasury-metric-card.is-warning {
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(129, 140, 248, 0.20);
}

[data-theme="dark"] .treasury-metric-card.is-success .treasury-metric-icon { background: rgba(37, 99, 235, 0.25); color: #93C5FD; }
[data-theme="dark"] .treasury-metric-card.is-danger  .treasury-metric-icon { background: rgba(124, 58, 237, 0.20); color: #DDD6FE; }
[data-theme="dark"] .treasury-metric-card.is-primary .treasury-metric-icon { background: rgba(37, 99, 235, 0.20); color: #60A5FA; }
[data-theme="dark"] .treasury-metric-card.is-warning .treasury-metric-icon { background: rgba(99, 102, 241, 0.20); color: #C7D2FE; }

[data-theme="dark"] .treasury-metric-tag.is-success { background: rgba(37, 99, 235, 0.25); color: #93C5FD; }
[data-theme="dark"] .treasury-metric-tag.is-danger  { background: rgba(124, 58, 237, 0.20); color: #DDD6FE; }
[data-theme="dark"] .treasury-metric-tag.is-primary { background: rgba(37, 99, 235, 0.20); color: #60A5FA; }
[data-theme="dark"] .treasury-metric-tag.is-warning { background: rgba(99, 102, 241, 0.20); color: #C7D2FE; }

[data-theme="dark"] .treasury-metric-val.is-success { color: #93C5FD; }
[data-theme="dark"] .treasury-metric-val.is-danger  { color: #DDD6FE; }
[data-theme="dark"] .treasury-metric-val.is-primary { color: #60A5FA; }
[data-theme="dark"] .treasury-metric-val.is-warning { color: #C7D2FE; }

[data-theme="dark"] .treasury-pnl-head.is-revenue { background: rgba(37, 99, 235, 0.12); }
[data-theme="dark"] .treasury-pnl-head.is-expense { background: rgba(124, 58, 237, 0.10); }

[data-theme="dark"] .treasury-pnl-summary {
  background: linear-gradient(135deg, #020617 0%, #0F172A 50%, #1E3A5F 100%);
  border: 1px solid rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .treasury-authbox {
  background: var(--surface);
  border-color: var(--border);
}

/* ─── 10. RESPONSIVE ─── */
@media (max-width: 1280px) {
  .treasury-workspace-layout {
    grid-template-columns: 1fr;
  }
  .treasury-sidebar-card {
    position: static;
  }
}
@media (max-width: 1024px) {
  .treasury-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .treasury-command-bar {
    flex-direction: column;
    gap: 18px;
  }
  .treasury-balance-strip {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 640px) {
  .treasury-metrics-row {
    grid-template-columns: 1fr;
  }
  .treasury-command-bar {
    padding: 20px 18px;
  }
  .treasury-title {
    font-size: 17px;
  }
  .treasury-actions-cluster {
    flex-wrap: wrap;
  }
  .treasury-ledger-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-pill-group {
    overflow-x: auto;
  }
  .erp-search-box {
    min-width: 0;
    width: 100%;
  }
  .treasury-pnl-summary-inner {
    flex-direction: column;
    text-align: center;
  }
  .treasury-pnl-summary-figure {
    text-align: center;
  }
  .filter-segmented-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ============================================================================== */
/* PROFESSIONAL FINANCIAL DATA MANAGEMENT SUITE (.cash-data-)                     */
/* Calmed Corporate Enterprise Architecture: Controlled Palette, Zero Rainbow     */
/* Clutter, High-Readability Data Grid, Clean Banking Ledger                      */
/* PT. Amanda Teknologi Nusantara (NUSAMANDA)                                     */
/* ============================================================================== */

.cash-data-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  animation: cash-fade-in 0.22s ease;
}
@keyframes cash-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 1. SUBPAGE ACTION BAR (Direct functional toolbar replacing redundant card headers) */
.cash-action-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 2px 0 4px 0;
  margin-bottom: 2px;
}

@media (max-width: 768px) {
  .cash-action-bar {
    justify-content: stretch !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .btn-cash-primary,
  .btn-cash-secondary,
  .btn-cash-outline {
    flex: 1 1 calc(50% - 8px);
    height: 38px !important;
    font-size: clamp(12.5px, 0.4vw + 10.5px, 14px) !important;
    padding: 0 12px !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .btn-cash-primary,
  .btn-cash-secondary,
  .btn-cash-outline {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
}

.btn-cash-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: #2563EB;
  color: #FFFFFF;
  border: 1px solid #2563EB;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
}
.btn-cash-primary svg {
  flex-shrink: 0;
  display: block;
}
.btn-cash-primary span {
  display: inline-block;
  line-height: 1;
}
.btn-cash-primary:hover {
  background: #1D4ED8;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
}

.btn-cash-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  background: #FFFFFF;
  color: #0F172A;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
}
.btn-cash-secondary svg {
  flex-shrink: 0;
  display: block;
}
.btn-cash-secondary span {
  display: inline-block;
  line-height: 1;
}
.btn-cash-secondary:hover {
  border-color: #94A3B8;
  color: #0F172A;
  background: #F8FAFC;
  transform: translateY(-1px);
}

.btn-cash-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 8px;
  background: #FFFFFF;
  color: #475569;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
}
.btn-cash-outline svg {
  flex-shrink: 0;
  display: block;
}
.btn-cash-outline span {
  display: inline-block;
  line-height: 1;
}
.btn-cash-outline:hover {
  color: #0F172A;
  background: #F8FAFC;
  border-color: #94A3B8;
  transform: translateY(-1px);
}

/* Precision Table Action Buttons & Subordinate Action Buttons */
td .btn-cash-outline,
.org-sub-actions .btn-cash-outline {
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 7px !important;
  flex-shrink: 0 !important;
  border: 1px solid #CBD5E1 !important;
  background: #FFFFFF !important;
}
td .btn-cash-outline svg,
.org-sub-actions .btn-cash-outline svg {
  width: 13px !important;
  height: 13px !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  display: block !important;
}

/* 2. CALMED KPI METRIC CARDS (Unified Surface + Subtle Accent Border + Muted 3D Art) */
.cash-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  .cash-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .cash-kpi-row {
    grid-template-columns: 1fr;
  }
}

.cash-kpi-card {
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  color: #FFFFFF !important;
}
.cash-kpi-card:hover {
  transform: translateY(-3px);
}

.cash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Small, crisp icon box (Solid Pure White Pop background) */
.cash-kpi-icon-box,
.cash-kpi-icon-freestanding {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  box-shadow: none !important;
  padding: 0 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cash-kpi-card:hover .cash-kpi-icon-box,
.cash-kpi-card:hover .cash-kpi-icon-freestanding {
  transform: translateY(-2px) scale(1.05);
}
.cash-kpi-icon-box svg,
.cash-kpi-icon-freestanding svg {
  display: block;
}

.cash-kpi-caption {
  font-size: clamp(12.5px, 0.25vw + 9px, 14px) !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: var(--text-muted) !important;
  margin-top: 12px;
  line-height: 1.3 !important;
}

.cash-kpi-val {
  font-size: clamp(15px, 1.2vw + 12px, 22px) !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
  font-variant-numeric: tabular-nums;
  color: var(--text-main) !important;
  margin: 4px 0 3px;
  line-height: 1.25;
  text-shadow: none !important;
}

.cash-kpi-sub {
  font-size: clamp(12.5px, 0.2vw + 9px, 14px) !important;
  color: var(--text-subtle) !important;
  line-height: 1.35;
}


/* ==============================================================================
   CASH KPI CARDS — Modern Iris SaaS (ala contoh-konsep.jpg)
   Clean White Surface + Pastel Trio Icon Boxes (Lavender, Pink, Cyan, Amber)
   ============================================================================== */

/* Card Base Hover */
.cash-kpi-card {
  background: #FFFFFF !important;
  border: 1px solid #E8EAF2 !important;
  border-radius: 18px !important;
  box-shadow: 0 2px 10px rgba(96, 96, 224, 0.04) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.cash-kpi-card:hover {
  border-color: #D8D4FD !important;
  box-shadow: 0 8px 24px -4px rgba(96, 96, 224, 0.12) !important;
  transform: translateY(-2px) !important;
}

/* Card 1 & Lavender: Saldo Kas Likuid / PnL / Primary */
.cash-kpi-card.kpi-balance,
.cash-kpi-card.theme-purple,
.cash-kpi-card.kpi-pnl {
  background: #FFFFFF !important;
  border: 1px solid #E8EAF2 !important;
}
.cash-kpi-card.kpi-balance .cash-kpi-icon-box,
.cash-kpi-card.theme-purple .cash-kpi-icon-box,
.cash-kpi-card.kpi-pnl .cash-kpi-icon-box {
  background: transparent !important;
  border: none !important;
}
.cash-kpi-card.kpi-balance .cash-kpi-top span,
.cash-kpi-card.theme-purple .cash-kpi-top span,
.cash-kpi-card.kpi-pnl .cash-kpi-top span {
  background: transparent !important;
  border: none !important;
  color: #4338CA !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* Card 2 & Soft Pink: Penerimaan / Realisasi */
.cash-kpi-card.kpi-paid,
.cash-kpi-card.theme-pink,
.cash-kpi-card.theme-rose {
  background: #FFFFFF !important;
  border: 1px solid #E8EAF2 !important;
}
.cash-kpi-card.kpi-paid .cash-kpi-icon-box,
.cash-kpi-card.theme-pink .cash-kpi-icon-box,
.cash-kpi-card.theme-rose .cash-kpi-icon-box {
  background: transparent !important;
  border: none !important;
}
.cash-kpi-card.kpi-paid .cash-kpi-top span,
.cash-kpi-card.theme-pink .cash-kpi-top span,
.cash-kpi-card.theme-rose .cash-kpi-top span {
  background: transparent !important;
  border: none !important;
  color: #BE123C !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* Card 3 & Fresh Cyan: Arus Masuk / Inflow */
.cash-kpi-card.kpi-inflow,
.cash-kpi-card.theme-cyan,
.cash-kpi-card.theme-blue {
  background: #FFFFFF !important;
  border: 1px solid #E8EAF2 !important;
}
.cash-kpi-card.kpi-inflow .cash-kpi-icon-box,
.cash-kpi-card.theme-cyan .cash-kpi-icon-box,
.cash-kpi-card.theme-blue .cash-kpi-icon-box {
  background: transparent !important;
  border: none !important;
}
.cash-kpi-card.kpi-inflow .cash-kpi-top span,
.cash-kpi-card.theme-cyan .cash-kpi-top span,
.cash-kpi-card.theme-blue .cash-kpi-top span {
  background: transparent !important;
  border: none !important;
  color: #0F766E !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* Card 4 & Warm Amber: Arus Keluar / Outflow / Overdue / Unpaid */
.cash-kpi-card.kpi-outflow,
.cash-kpi-card.kpi-unpaid,
.cash-kpi-card.kpi-overdue,
.cash-kpi-card.theme-amber {
  background: #FFFFFF !important;
  border: 1px solid #E8EAF2 !important;
}
.cash-kpi-card.kpi-outflow .cash-kpi-icon-box,
.cash-kpi-card.kpi-unpaid .cash-kpi-icon-box,
.cash-kpi-card.kpi-overdue .cash-kpi-icon-box,
.cash-kpi-card.theme-amber .cash-kpi-icon-box {
  background: transparent !important;
  border: none !important;
}
.cash-kpi-card.kpi-outflow .cash-kpi-top span,
.cash-kpi-card.kpi-unpaid .cash-kpi-top span,
.cash-kpi-card.kpi-overdue .cash-kpi-top span,
.cash-kpi-card.theme-amber .cash-kpi-top span {
  background: transparent !important;
  border: none !important;
  color: #C2410C !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 600 !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* Subtle, subdued 3D Vector Art (Hologram Effect) */
.cash-kpi-art {
  position: absolute;
  right: 6px;
  bottom: 4px;
  width: 58px;
  height: 58px;
  opacity: 0.60 !important;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cash-kpi-card:hover .cash-kpi-art {
  opacity: 0.85 !important;
  transform: scale(1.06);
}

/* 3. MULTI-BANK STRIP (Cohesive, Clean Banking Cards) */
.cash-bank-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cash-bank-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.cash-bank-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748B;
}

.cash-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 1.2vw, 14px);
}
@media (max-width: 1160px) {
  .cash-bank-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  }
}
@media (max-width: 680px) {
  .cash-bank-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

.cash-bank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(10px, 1.2vw, 14px);
  padding: clamp(12px, 1.2vw + 8px, 16px) clamp(14px, 1.4vw + 8px, 18px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 14px 0 rgba(15, 23, 42, 0.08);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #0284C7 0%, #2563EB 100%);
}
.cash-bank-item:hover {
  transform: translateY(-3px);
}

.cash-bank-item.mandiri,
.cash-bank-item:nth-child(4n+1) {
  background: linear-gradient(135deg, #003366 0%, #0284C7 100%) !important;
  box-shadow: 0 8px 24px -3px rgba(0, 51, 102, 0.42) !important;
}
.cash-bank-item.mandiri:hover,
.cash-bank-item:nth-child(4n+1):hover {
  box-shadow: 0 12px 28px -3px rgba(0, 51, 102, 0.55) !important;
}

.cash-bank-item.cash,
.cash-bank-item:nth-child(4n+2) {
  background: linear-gradient(135deg, #047857 0%, #10B981 100%) !important;
  box-shadow: 0 8px 24px -3px rgba(4, 120, 87, 0.42) !important;
}
.cash-bank-item.cash:hover,
.cash-bank-item:nth-child(4n+2):hover {
  box-shadow: 0 12px 28px -3px rgba(4, 120, 87, 0.55) !important;
}

.cash-bank-item.bca,
.cash-bank-item:nth-child(4n+3) {
  background: linear-gradient(135deg, #0055A5 0%, #2563EB 100%) !important;
  box-shadow: 0 8px 24px -3px rgba(0, 85, 165, 0.42) !important;
}
.cash-bank-item.bca:hover,
.cash-bank-item:nth-child(4n+3):hover {
  box-shadow: 0 12px 28px -3px rgba(0, 85, 165, 0.55) !important;
}

.cash-bank-item.bri,
.cash-bank-item:nth-child(4n+4) {
  background: linear-gradient(135deg, #00529C 0%, #0284C7 100%) !important;
  box-shadow: 0 8px 24px -3px rgba(0, 82, 156, 0.42) !important;
}
.cash-bank-item.bri:hover,
.cash-bank-item:nth-child(4n+4):hover {
  box-shadow: 0 12px 28px -3px rgba(0, 82, 156, 0.55) !important;
}

.cash-bank-badge-chip,
.cash-bank-logo-clean {
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0;
}

.bank-logo-img {
  max-width: 44px;
  max-height: 28px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.cash-bank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cash-bank-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cash-bank-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

.cash-bank-acc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85) !important;
  font-family: var(--font-mono);
}

.cash-bank-figure {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cash-bank-amount {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}

.cash-bank-status {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95) !important;
}

.cash-bank-edit-action {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #FFFFFF !important;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 4px;
}
.cash-bank-edit-action:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.32);
  transform: scale(1.08);
}

/* 4. DATA WORKSTATION (Clean, Professional Ledger) */
.cash-workstation {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Workstation Top Navigation Tabs */
.cash-ws-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 18px 0;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
  overflow-x: auto;
}

/* Workstation Top Header (For single-purpose workstations without tabs like Employees & OrgChart) */
.cash-ws-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #E2E8F0;
  background: #F8FAFC;
  flex-wrap: wrap;
  gap: 12px;
}

.cash-ws-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cash-ws-tab-btn:hover {
  color: #0F172A;
}
.cash-ws-tab-btn.active {
  color: #2563EB;
  border-bottom-color: #2563EB;
  background: #FFFFFF;
  border-radius: 8px 8px 0 0;
}

.cash-ws-tab-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  padding: 0 2px;
  border-radius: 0;
}
.cash-ws-tab-btn.active .cash-ws-tab-count {
  background: transparent;
  color: #2563EB;
}

/* Workstation Controls Toolbar */
.cash-ws-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.cash-ws-filters-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cash-pill-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #F1F5F9;
  border-radius: 8px;
  padding: 2px;
}

.cash-pill-opt,
.cash-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}
.cash-pill-opt:hover,
.cash-switcher-btn:hover {
  color: #0F172A;
}
.cash-pill-opt.active,
.cash-switcher-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.cash-cat-select {
  padding: 6px 10px;
  font-size: clamp(12.5px, 0.3vw + 10.5px, 14px);
  border-radius: 8px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  min-width: 240px;
  max-width: 100%;
}
.cash-cat-select:focus {
  border-color: #2563EB;
}

.cash-ws-filters-right,
.cash-ws-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cash-ws-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 220px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cash-ws-search:focus-within {
  border-color: #2563EB;
  background: #FFFFFF;
}
.cash-ws-search input {
  border: none;
  background: transparent;
  font-size: clamp(12.5px, 0.3vw + 10.5px, 14px);
  color: #0F172A;
  outline: none;
  width: 100%;
  font-family: var(--font-sans);
}
.cash-ws-search svg {
  color: #94A3B8;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cash-ws-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  .cash-ws-filters-left,
  .cash-ws-filters-right {
    width: 100% !important;
  }
  .cash-cat-select {
    width: 100% !important;
    min-width: 0 !important;
  }
  .cash-ws-search {
    width: 100% !important;
    min-width: 0 !important;
  }
}

/* Professional Clean Ledger Data Table (Zero Badge Rainbow) */
.cash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.cash-table thead tr {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}

.cash-table th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748B;
  padding: 11px 18px;
  white-space: nowrap;
}

.cash-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.cash-table tbody tr {
  transition: background 0.1s ease;
}
.cash-table tbody tr:hover {
  background: #F8FAFC;
}
.cash-table tbody tr:last-child td {
  border-bottom: none;
}

/* Text typography for transaction entity */
.cash-row-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.35;
}

.cash-row-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Clean, calm directional flow indicator (NOT a loud badge) */
.cash-flow-ind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.cash-flow-ind.in  { color: var(--text-main); font-weight: 500; }
.cash-flow-ind.out { color: var(--text-main); font-weight: 500; }

/* Neutral category text */
.cash-cat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Subtle monospace reference with copy icon */
.cash-ref-link {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.cash-ref-link:hover {
  color: var(--text-main);
}

.cash-pic-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* Clean tabular amount */
.cash-amt-col {
  text-align: right;
  white-space: nowrap;
}

.cash-amt-val {
  font-size: 12px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.cash-amt-val.in  { color: var(--text-main); }
.cash-amt-val.out { color: var(--text-main); }

/* Ghost action button */
.cash-del-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.cash-del-btn:hover {
  color: var(--text-main);
  background: var(--canvas);
}

/* Universal Table Action Icon-Only Buttons (Zero Slop, Clean Hover) */
.btn-icon-action {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  flex-shrink: 0;
}
.btn-icon-action:hover {
  background: var(--surface-hover);
  border-color: currentColor;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.btn-icon-action:active {
  transform: scale(0.96);
}

/* Table Summary Footer Bar */
.cash-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(12px, 1.5vw, 20px);
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  font-size: clamp(12.5px, 0.2vw + 10.5px, 14px);
  color: #64748B;
  flex-wrap: wrap;
  gap: 10px;
}

.cash-footer-totals {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(12.5px, 0.25vw + 10.5px, 14px);
}

@media (max-width: 768px) {
  .cash-table-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .cash-footer-totals {
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
    width: 100% !important;
    justify-content: space-between !important;
    padding-top: 8px !important;
    border-top: 1px dashed #E2E8F0 !important;
  }
}

/* Responsive Table Wrapper with Touch Momentum */
.cash-table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==============================================================================
   P&L (PROFIT & LOSS) AND COA WORKSTATION RESPONSIVE SYSTEM
   ============================================================================== */
.cash-pnl-container {
  padding: clamp(14px, 1.8vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cash-pnl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

@media (max-width: 960px) {
  .cash-pnl-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

.cash-pnl-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px clamp(14px, 1.6vw, 20px);
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 8px;
}

.cash-pnl-table-tag {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cash-pnl-table-title {
  font-size: clamp(13px, 0.35vw + 12px, 14.5px);
  font-weight: 700;
  color: #0F172A;
  margin: 2px 0 0;
}

.cash-pnl-table-total {
  font-size: clamp(14px, 0.4vw + 13px, 16px);
  font-weight: 700;
  color: #0F172A;
}

.cash-pnl-net-card {
  background: #0F172A;
  border-radius: 14px;
  padding: clamp(16px, 2vw, 22px) clamp(16px, 2.5vw, 26px);
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid #1E293B;
}

.cash-pnl-net-tag {
  font-size: 12px;
  font-weight: 700;
  color: #94A3B8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cash-pnl-net-title {
  font-size: clamp(14px, 0.4vw + 13px, 16px);
  font-weight: 700;
  color: #FFFFFF;
  margin: 4px 0;
}

.cash-pnl-net-desc {
  font-size: clamp(12.5px, 0.25vw + 10.5px, 14px);
  color: #94A3B8;
  margin: 0;
  max-width: 540px;
  line-height: 1.45;
}

.cash-pnl-net-figure-wrap {
  text-align: right;
}

.cash-pnl-net-amount {
  font-size: clamp(20px, 1.5vw + 16px, 26px);
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.cash-pnl-net-margin {
  font-size: clamp(12.5px, 0.2vw + 10px, 14px);
  color: #94A3B8;
  margin-top: 2px;
}

.cash-pnl-net-margin strong {
  color: #FFFFFF;
}

@media (max-width: 640px) {
  .cash-pnl-net-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
  .cash-pnl-net-figure-wrap {
    text-align: left !important;
    width: 100% !important;
    padding-top: 12px !important;
    border-top: 1px solid #1E293B !important;
  }
}

.cash-coa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px clamp(14px, 1.8vw, 20px);
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
  gap: 10px;
}

.cash-coa-title {
  font-size: clamp(13px, 0.35vw + 12px, 14.5px);
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 2px;
}

.cash-coa-desc {
  font-size: clamp(12.5px, 0.2vw + 10px, 14px);
  color: #64748B;
  margin: 0;
}

.cash-coa-total {
  font-size: clamp(12.5px, 0.3vw + 11.5px, 14px);
  font-weight: 700;
  color: #0F172A;
}

@media (max-width: 640px) {
  .cash-coa-header {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  .cash-coa-total {
    width: 100%;
    padding-top: 6px;
    border-top: 1px dashed #E2E8F0;
  }
}

/* DARK THEME OVERRIDES FOR CALMED SUITE */
html[data-theme="dark"] .cash-data-header,
html[data-theme="dark"] .cash-kpi-card,
html[data-theme="dark"] .cash-bank-item,
html[data-theme="dark"] .cash-workstation {
  background: #0F172A !important;
  border-color: #1E293B !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .cash-data-title,
html[data-theme="dark"] .cash-kpi-val,
html[data-theme="dark"] .cash-bank-title,
html[data-theme="dark"] .cash-bank-amount,
html[data-theme="dark"] .cash-row-main,
html[data-theme="dark"] .cash-amt-val.out,
html[data-theme="dark"] .cash-pnl-table-title,
html[data-theme="dark"] .cash-pnl-table-total,
html[data-theme="dark"] .cash-coa-title,
html[data-theme="dark"] .cash-coa-total {
  color: #F1F5F9 !important;
}

html[data-theme="dark"] .cash-kpi-caption,
html[data-theme="dark"] .cash-kpi-sub {
  color: #94A3B8 !important;
}

html[data-theme="dark"] .cash-ws-tabs,
html[data-theme="dark"] .cash-table thead tr,
html[data-theme="dark"] .cash-table-footer,
html[data-theme="dark"] .cash-pnl-table-header,
html[data-theme="dark"] .cash-coa-header {
  background: #141E33 !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .cash-ws-tab-btn.active {
  background: #0F172A;
  color: #93C5FD;
  border-bottom-color: #3B82F6;
}

html[data-theme="dark"] .cash-table td,
html[data-theme="dark"] .cash-ws-toolbar {
  border-color: #1E293B;
}

html[data-theme="dark"] .cash-table tbody tr:hover {
  background: #162238;
}

html[data-theme="dark"] .cash-ws-search,
html[data-theme="dark"] .cash-cat-select,
html[data-theme="dark"] .btn-cash-secondary {
  background: #1E293B;
  border-color: #334155;
  color: #CBD5E1;
}

html[data-theme="dark"] .cash-ws-search input {
  color: #F1F5F9;
}

html[data-theme="dark"] .cash-pill-switcher {
  background: #1E293B;
}

html[data-theme="dark"] .cash-pill-opt.active,
html[data-theme="dark"] .cash-switcher-btn.active {
  background: #334155;
  color: #F1F5F9;
}

html[data-theme="dark"] .cash-kpi-icon-box {
  background: #FFFFFF !important;
  border: none !important;
}

html[data-theme="dark"] .cash-bank-badge-chip {
  background: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

html[data-theme="dark"] .cash-pnl-net-card {
  background: #020617 !important;
  border-color: #1E293B !important;
}

html[data-theme="dark"] .cash-data-header .btn-cash-secondary {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  color: #FFFFFF !important;
}

html[data-theme="dark"] .cash-data-header .btn-cash-primary {
  background: #FFFFFF !important;
  color: #4338CA !important;
  border-color: #FFFFFF !important;
}

html[data-theme="dark"] .cash-data-header .btn-cash-outline {
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Invoices & AR Management Suite (Consistent Clean Data Workstation) */
.inv-status-ind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.inv-status-ind.paid    { color: #2563EB; }
.inv-status-ind.sent    { color: #3B82F6; }
.inv-status-ind.overdue { color: #6D28D9; }
.inv-status-ind.draft   { color: #64748B; }

.inv-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.inv-status-ind.paid .inv-status-dot    { background: #2563EB; }
.inv-status-ind.sent .inv-status-dot    { background: #3B82F6; }
.inv-status-ind.overdue .inv-status-dot { background: #6D28D9; }
.inv-status-ind.draft .inv-status-dot   { background: #94A3B8; }

html[data-theme="dark"] .inv-status-ind.paid    { color: #60A5FA; }
html[data-theme="dark"] .inv-status-ind.paid .inv-status-dot { background: #60A5FA; }
html[data-theme="dark"] .inv-status-ind.sent    { color: #93C5FD; }
html[data-theme="dark"] .inv-status-ind.sent .inv-status-dot { background: #93C5FD; }
html[data-theme="dark"] .inv-status-ind.overdue { color: #A78BFA; }
html[data-theme="dark"] .inv-status-ind.overdue .inv-status-dot { background: #A78BFA; }
html[data-theme="dark"] .inv-status-ind.draft   { color: #94A3B8; }
html[data-theme="dark"] .inv-status-ind.draft .inv-status-dot { background: #94A3B8; }

/* Projects & Contracts Management Suite (Clean Data Workstation) */
.prj-status-ind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.prj-status-ind.in_progress { color: #2563EB; }
.prj-status-ind.uat         { color: #6366F1; }
.prj-status-ind.planning    { color: #64748B; }
.prj-status-ind.completed   { color: #1D4ED8; }
.prj-status-ind.on_hold     { color: #6D28D9; }

.prj-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.prj-status-ind.in_progress .prj-status-dot { background: #2563EB; }
.prj-status-ind.uat .prj-status-dot         { background: #6366F1; }
.prj-status-ind.planning .prj-status-dot    { background: #94A3B8; }
.prj-status-ind.completed .prj-status-dot   { background: var(--primary); }
.prj-status-ind.on_hold .prj-status-dot     { background: #94A3B8; }

.prj-table-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 3px;
}
.prj-table-progress-track {
  width: 54px;
  height: 4px;
  border-radius: 9999px;
  background: #E2E8F0;
  overflow: hidden;
}
.prj-table-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--primary);
}
.prj-table-progress-fill.warning { background: var(--primary); }
.prj-table-progress-fill.danger  { background: #94A3B8; }

html[data-theme="dark"] .prj-status-ind.in_progress { color: #A5B4FC; }
html[data-theme="dark"] .prj-status-ind.in_progress .prj-status-dot { background: #A5B4FC; }
html[data-theme="dark"] .prj-status-ind.uat { color: #818CF8; }
html[data-theme="dark"] .prj-status-ind.uat .prj-status-dot { background: #818CF8; }
html[data-theme="dark"] .prj-status-ind.planning { color: #94A3B8; }
html[data-theme="dark"] .prj-status-ind.planning .prj-status-dot { background: #94A3B8; }
html[data-theme="dark"] .prj-status-ind.completed { color: #C7D2FE; }
html[data-theme="dark"] .prj-status-ind.completed .prj-status-dot { background: #C7D2FE; }
html[data-theme="dark"] .prj-status-ind.on_hold { color: #CBD5E1; }
html[data-theme="dark"] .prj-status-ind.on_hold .prj-status-dot { background: #CBD5E1; }
html[data-theme="dark"] .prj-table-progress-track { background: #334155; }

/* ==============================================================================
   BESPOKE EXECUTIVE ARCHITECTURE: PROJECTS, ASSETS & ADMS CONSOLE
   Eliminating Generic 4-Card Boxy Grids — Unified Executive Headers & Stream Views
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   ============================================================================== */

.exec-command-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px -2px rgba(11, 19, 43, 0.04);
}

.exec-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.exec-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.exec-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.exec-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3B82F6;
}

.exec-title-main {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
  line-height: 1.25;
}

.exec-title-sub {
  font-size: 12.5px;
  color: #64748B;
  margin: 0;
}

.exec-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.exec-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 18px;
}

@media (max-width: 900px) {
  .exec-telemetry-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .exec-telemetry-strip {
    grid-template-columns: 1fr;
  }
}

.exec-telemetry-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 16px;
  border-right: 1px solid var(--border);
}

.exec-telemetry-node:last-child {
  padding-right: 0;
  border-right: none;
}

.exec-node-label {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
}

.exec-node-val {
  font-size: 20px;
  font-weight: 600;
  color: #0F172A;
  line-height: 1.2;
}

.exec-node-sub {
  font-size: 12px;
  color: #64748B;
}

/* Projects Milestone Stream */
.prj-stream-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
}

.prj-stream-row {
  display: grid;
  grid-template-columns: 300px 1fr 240px;
  align-items: center;
  gap: 20px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.prj-stream-row:hover {
  border-color: var(--primary-border);
  box-shadow: 0 4px 14px rgba(96, 96, 224, 0.08);
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .prj-stream-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.prj-stage-tracker {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.prj-stage-step {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #94A3B8;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.prj-stage-step.active {
  color: #FFFFFF;
  background: var(--primary);
}

.prj-stage-step.done {
  color: #0F172A;
  background: #F1F5F9;
}

.prj-stage-arrow {
  color: #CBD5E1;
  font-size: 12px;
}

/* ADMS Hardware Node Cards */
.adms-rack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  padding: 18px 20px;
}

.adms-rack-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.adms-rack-card:hover {
  border-color: var(--primary-border);
  box-shadow: 0 4px 14px rgba(96, 96, 224, 0.08);
}

/* ==============================================================================
   INTERCONNECTED COMPANY HIERARCHY TREE (BAGAN SIKLUS STRUKTUR RESMI)
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   ============================================================================== */

.org-canvas-viewport {
  position: relative;
  background-color: #F8FAFC;
  background-image: radial-gradient(#CBD5E1 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: auto;
  min-height: 580px;
  padding: 36px 20px 48px;
  box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.03);
}

.org-zoom-toolbar {
  position: sticky;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 8px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  margin-left: auto;
  width: fit-content;
}

.org-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.org-zoom-btn:hover {
  background: #F1F5F9;
  color: #0F172A;
  border-color: #CBD5E1;
}

/* Legend Panduan Hirarki Jabatan & Departemen */
.org-legend-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 14px auto 22px;
  padding: 8px 20px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  width: fit-content;
  max-width: 96%;
}

.org-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
}

.org-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.org-tree-root {
  display: inline-block;
  min-width: 100%;
  text-align: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}

/* Base Tree Connector Logic */
.org-tree, .org-tree ul, .org-tree li {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.org-tree ul {
  display: flex;
  justify-content: center;
  padding-top: 36px;
  gap: 20px;
}

/* Vertical trunk line coming down from parent */
.org-tree ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  border-left: 2px solid #94A3B8;
  width: 0;
  height: 36px;
  transform: translateX(-50%);
}

.org-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding-top: 36px;
}

/* Horizontal branch lines connecting siblings */
.org-tree li::before,
.org-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  border-top: 2px solid #94A3B8;
  width: 50%;
  height: 36px;
}

.org-tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid #94A3B8;
}

/* When only one child, no horizontal bar needed */
.org-tree li:only-child::after,
.org-tree li:only-child::before {
  display: none;
}
.org-tree li:only-child {
  padding-top: 0;
}

/* Rounded corners at branch edges */
.org-tree li:first-child::before {
  border: 0 none;
}
.org-tree li:last-child::after {
  border: 0 none;
}
.org-tree li:last-child::before {
  border-right: 2px solid #94A3B8;
  border-radius: 0 10px 0 0;
}
.org-tree li:first-child::after {
  border-radius: 10px 0 0 0;
}

/* Top root node overrides */
.org-tree > ul {
  padding-top: 0;
}
.org-tree > ul::before {
  display: none;
}
.org-tree > ul > li {
  padding-top: 0;
}
.org-tree > ul > li::before,
.org-tree > ul > li::after {
  display: none;
}

/* Node Card Visual - Minimalis & Compact (Anti-Slop, No Single-Side Border) */
.org-node-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 205px;
  box-sizing: border-box;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  text-align: left;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  z-index: 2;
}

.org-node-card:hover {
  transform: translateY(-2px);
  border-color: #2563EB;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
}

/* Connector pin dots */
.org-node-card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748B;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px #94A3B8;
  z-index: 3;
}
.org-tree > ul > li > .org-node-card::before {
  display: none;
}

.org-node-card.has-children::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563EB;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 1px #3B82F6;
  z-index: 3;
}

/* Inside Node Content */
.org-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 8px;
}

.org-node-role-text {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2563EB;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-node-nip {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.org-node-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.org-node-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 11px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.org-node-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.org-node-avatar-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  border: 1.5px solid #FFFFFF;
}

.org-node-idmeta {
  min-width: 0;
  flex: 1;
}

.org-node-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.org-node-title {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-node-division {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  padding: 1px 6px;
  margin-top: 3px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.org-node-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.org-node-subs-badge {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.org-node-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.org-node-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}
.org-node-btn:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
}

/* ==============================================================================
   EXECUTIVE HERO BANNER & KPI METRICS (SDM / BAGAN STRUKTUR ORGANISASI)
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   ============================================================================== */

.org-hero-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(99, 102, 241, 0.05) 50%, rgba(248, 250, 252, 0.95) 100%);
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px -2px rgba(37, 99, 235, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.org-hero-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.org-hero-content {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 320px;
  flex: 1;
}

.org-hero-iconbox {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px -4px rgba(37, 99, 235, 0.38);
}

.org-hero-text h1 {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.org-hero-text p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 5px 0 0 0;
  line-height: 1.5;
  max-width: 780px;
}

.org-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.org-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.org-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.org-view-toggle {
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.org-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.org-toggle-btn:hover {
  color: var(--text-main);
}

.org-toggle-btn.active {
  background: #2563EB;
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* 4 Bento KPI Metric Cards */
.org-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.org-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.org-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-border);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.08);
}

.org-kpi-icon {
  width: auto;
  height: auto;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: transparent !important;
  color: #2563EB;
}

.org-kpi-info {
  min-width: 0;
  flex: 1;
}

.org-kpi-lbl {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.org-kpi-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2px;
  letter-spacing: -0.3px;
}

.org-kpi-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modal Popup for Details */
.org-detail-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.org-detail-modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: orgModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes orgModalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

html[data-theme="dark"] .org-hero-banner {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(30, 41, 59, 0.8) 100%);
  border-color: rgba(37, 99, 235, 0.3);
}

html[data-theme="dark"] .org-hero-badge {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border);
  color: var(--text-main);
}

html[data-theme="dark"] .org-kpi-icon.indigo {
  background: rgba(79, 70, 229, 0.2);
  color: #818CF8;
}
html[data-theme="dark"] .org-kpi-icon.blue {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
}
html[data-theme="dark"] .org-kpi-icon.amber {
  background: rgba(217, 119, 6, 0.2);
  color: #FBBF24;
}
html[data-theme="dark"] .org-kpi-icon.emerald {
  background: rgba(5, 150, 105, 0.2);
  color: #34D399;
}

/* ==============================================================================
   CORPORATE PERSONNEL UNIFIED SINGLE-PAGE FORM & DOSSIER STYLING
   ============================================================================== */

.form-sections-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px;
}

.form-section-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.form-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
  margin-bottom: 2px;
}

.form-section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  letter-spacing: -0.01em;
}

.form-section-desc {
  font-size: 12.5px;
  color: #64748B;
  margin: 0;
}

.modal-tabs-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.modal-tab-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.modal-tab-trigger:hover {
  color: #0F172A;
}

.modal-tab-trigger.active {
  color: #2563EB;
  border-bottom-color: #2563EB;
  background: #FFFFFF;
}

.modal-tab-content {
  display: none;
  padding: 18px 20px;
}

.modal-tab-content.active {
  display: block;
}

/* Dossier Profile View */
.dossier-banner {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  color: #FFFFFF;
  padding: 22px 24px;
  border-radius: 12px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.dossier-avatar-box {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: #FFFFFF;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 640px) {
  .dossier-grid {
    grid-template-columns: 1fr;
  }
}

.dossier-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dossier-card-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F5F9;
}

.dossier-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.dossier-label {
  color: #64748B;
  font-size: 12.5px;
  flex-shrink: 0;
}

.dossier-value {
  font-weight: 600;
  color: #0F172A;
  text-align: right;
  word-break: break-word;
}

/* ============================================================================== */
/* REKRUT PERSONIL & REGISTRASI KARYAWAN BARU (DEDICATED FULL PAGE WORKSPACE)    */
/* Mengadopsi Konsep Pendaftaran Pelanggan Billing-ISP (Non-Popup / Full Page)    */
/* ============================================================================== */

.emp-page-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: perm-fade-in 0.25s ease;
  padding-bottom: 30px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

/* 1. Hero Header Banner (Modern Iris Royal Purple Gradient Sesuai Kesepakatan) */
.emp-hero-header {
  position: relative;
  background: linear-gradient(135deg, #6060E0 0%, #5B4DF5 50%, #4338CA 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 22px 26px;
  color: #FFFFFF;
  box-shadow: 0 8px 24px -4px rgba(96, 96, 224, 0.28);
  overflow: hidden;
}

.emp-hero-header::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.emp-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.emp-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: clamp(12.5px, 0.25vw + 9px, 14px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 5px;
  letter-spacing: normal;
}

.emp-breadcrumbs a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.emp-breadcrumbs a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.emp-breadcrumbs span {
  color: rgba(255, 255, 255, 0.45);
}

.emp-hero-title {
  font-size: clamp(14px, 1vw + 12px, 18px);
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.emp-hero-subtitle {
  font-size: clamp(12.5px, 0.4vw + 9.5px, 14px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
  max-width: 740px;
  line-height: 1.5;
}

.emp-draft-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  color: #FFFFFF;
  margin-top: 6px;
}

.emp-draft-indicator .draft-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
}

.emp-hero-actions {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Hero Art Graphic (Replacing Buttons in Header) */
.emp-hero-art {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.emp-hero-art-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 8px 16px 8px 10px;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(67, 56, 202, 0.22);
  transition: all 0.25s ease;
}

.emp-hero-art-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(67, 56, 202, 0.3);
}

.emp-hero-art-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.emp-hero-art-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.emp-hero-art-chip {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
}

.emp-hero-art-badge {
  font-family: var(--font-brand);
  font-size: 12.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.02em;
}

/* Required field red asterisk */
.req-star {
  color: #E11D48;
  font-weight: 700;
  margin-left: 3px;
  font-size: 13px;
  display: inline-block;
  line-height: 1;
  vertical-align: baseline;
}

/* Circular Percent Gauge Smooth RGB Transition */
#emp-val-gauge-circle {
  transition: stroke-dasharray 0.45s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.45s ease, filter 0.45s ease;
}

#emp-val-gauge-text {
  transition: color 0.45s ease;
}

.btn-emp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

.btn-emp-back:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-emp-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #FECACA;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  backdrop-filter: blur(4px);
}

.btn-emp-reset:hover {
  background: rgba(239, 68, 68, 0.32);
  color: #FFFFFF;
  border-color: rgba(239, 68, 68, 0.55);
}

.btn-emp-submit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #4338CA;
  background: #FFFFFF;
  border: 1px solid #FFFFFF;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease;
}

.btn-emp-submit:hover {
  background: #F8FAFC;
  color: #3730A3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 2. Preflight Status Strip */
.emp-preflight-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 8px;
  padding: 12px 18px;
}

.emp-preflight-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.emp-preflight-label {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text-muted, #64748B);
}

.emp-preflight-value {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-main, #0F172A);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 3. Layout Grid: Form (Kiri) + Validation Panel (Kanan) */
.emp-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

@media (max-width: 1040px) {
  .emp-workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Form Sections (01, 02, 03, 04, 05, 06) */
.emp-section-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 8px;
  overflow: hidden;
  scroll-margin-top: 80px;
}

.emp-section-header {
  padding: 8px 14px;
  background: var(--canvas, #F8FAFC);
  border-bottom: 1px solid var(--border, #E2E8F0);
  display: flex;
  align-items: center;
  gap: 10px;
}

.emp-section-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #DBEAFE;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  flex-shrink: 0;
}

.emp-section-titles {
  min-width: 0;
}

.emp-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #0F172A);
  margin: 0;
  letter-spacing: -0.01em;
}

.emp-section-desc {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-muted, #64748B);
  margin: 1px 0 0;
}

.emp-section-body {
  padding: 12px 14px;
}

.emp-section-body .form-group {
  display: flex;
  flex-direction: column;
}

.emp-section-body .form-label {
  font-size: 11.5px;
  font-weight: 500;
  color: #64748B;
  margin-bottom: 4px;
  letter-spacing: 0.015em;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.emp-section-body .form-label .emp-label-title {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #334155;
  font-weight: 600;
}

.emp-section-body .form-label .req-star {
  color: #E11D48;
  font-size: 12px;
  font-weight: 700;
  margin-left: 2px;
}

.emp-section-body .form-label .emp-label-hint,
.emp-section-body .form-label > span:last-child:not(:first-child):not(.req-star):not(.emp-label-title) {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: #94A3B8;
}

.emp-section-body .form-control {
  width: 100%;
  height: 33px;
  padding: 5px 9px;
  font-size: 12.5px;
  font-weight: 400;
  color: #0F172A;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emp-section-body select.form-control {
  cursor: pointer;
}

.emp-section-body select.form-control:invalid,
.emp-section-body select.form-control option[value=""] {
  color: #94A3B8;
}

.emp-section-body textarea.form-control {
  height: auto;
  min-height: 62px;
  padding: 8px 11px;
  line-height: 1.45;
}

.emp-section-body .form-control:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.emp-section-body .form-control[readonly] {
  background-color: #F8FAFC;
  border-color: #E2E8F0;
  color: #475569;
  cursor: default;
}

.emp-section-body .form-control::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

/* Dropdown Action Toolbar (Add / Delete) */
.emp-dropdown-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.emp-dropdown-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-dropdown-action {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: all 0.12s ease;
}

.btn-dropdown-action.action-add {
  color: #2563EB;
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.btn-dropdown-action.action-add:hover {
  background: #DBEAFE;
  color: #1D4ED8;
}

.btn-dropdown-action.action-delete {
  color: #EF4444;
  background: #FEF2F2;
  border-color: #FECACA;
}

.btn-dropdown-action.action-delete:hover {
  background: #FEE2E2;
  color: #DC2626;
}

/* NIK Validation Status Feedback */
.emp-nik-feedback {
  font-size: 12.5px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.emp-nik-feedback.invalid {
  color: #EF4444;
}

.emp-nik-feedback.valid {
  color: #10B981;
}

/* Grid layout untuk kolom form */
.emp-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 12px;
  margin-bottom: 10px;
}

.emp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 12px;
  margin-bottom: 10px;
}

.emp-grid-1 {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.emp-grid-1:last-child,
.emp-grid-2:last-child,
.emp-grid-3:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .emp-hero-header {
    padding: 16px 18px;
  }
  .emp-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .emp-hero-art {
    display: none;
  }
  .emp-preflight-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 10px 14px;
    gap: 10px;
  }
  .emp-section-body {
    padding: 14px 14px;
  }
  .emp-grid-2, .emp-grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
  }
  .emp-upload-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .emp-hero-header {
    padding: 14px 14px;
  }
  .emp-preflight-strip {
    grid-template-columns: 1fr;
    padding: 10px 12px;
    gap: 8px;
  }
  .emp-upload-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .emp-section-header {
    padding: 10px 12px;
  }
  .emp-section-body {
    padding: 12px 10px;
  }
}

/* 4. Validation Aside Panel (Kanan ala billing-isp) */
.emp-validation-aside {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.emp-val-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.emp-val-hero {
  position: relative;
  background: linear-gradient(135deg, #6060E0 0%, #5B4DF5 55%, #4338CA 100%);
  padding: 16px 18px;
  color: #FFFFFF;
  overflow: hidden;
}

.emp-val-hero::before {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.emp-val-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
}

.emp-val-gauge-wrapper {
  position: relative;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
}

.emp-val-gauge-wrapper svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.emp-val-gauge-percent,
#emp-val-gauge-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #FFFFFF;
  font-family: inherit;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.emp-val-hero-meta {
  min-width: 0;
}

.emp-val-hero-tag {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
}

.emp-val-hero-title {
  font-size: clamp(12.5px, 0.35vw + 11.5px, 15px);
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}

.emp-val-hero-count {
  font-size: clamp(12.5px, 0.25vw + 9.5px, 14px);
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 400;
}

/* Checklist List Groups */
.emp-val-list {
  list-style: none;
  margin: 0;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emp-val-item-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
}

.emp-val-item-btn:hover {
  background: var(--canvas, #F8FAFC);
  border-color: var(--border, #E2E8F0);
}

.emp-val-item-badge {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #EEEBFF;
  color: #4338CA;
  border: 1px solid #D8D4FD;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.emp-val-item-content {
  flex: 1;
  min-width: 0;
}

.emp-val-item-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #1E293B;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.emp-val-item-bar {
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

.emp-val-item-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: #6060E0;
  transition: width 0.3s ease;
}

.emp-val-item-bar-fill.complete {
  background: #10B981;
}

.emp-val-item-status {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.emp-val-item-count {
  font-size: 12.5px;
  font-weight: 500;
  color: #64748B;
  font-variant-numeric: tabular-nums;
}

.emp-val-item-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
}

.emp-val-item-icon.complete {
  color: #10B981;
}

/* Missing Fields Footer */
.emp-val-missing-footer {
  border-top: 1px solid var(--border, #E2E8F0);
  background: var(--canvas, #F8FAFC);
  padding: 12px 14px;
}

.emp-val-missing-title {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #475569;
  margin: 0 0 8px;
}

.emp-val-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.emp-val-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 12.5px;
  font-weight: 600;
  color: #E11D48;
}

.emp-val-pill::before {
  content: "•";
  color: #E11D48;
  font-size: 14px;
  margin-right: 2px;
}

.emp-val-complete-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12.5px;
  font-weight: 500;
  color: #059669;
}

/* 5. Sticky Bottom Action Bar */
.emp-sticky-footer {
  position: sticky;
  bottom: 14px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 8px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-top: 10px;
}

html[data-theme="dark"] .emp-sticky-footer {
  background: rgba(30, 41, 59, 0.96);
  border-color: rgba(255, 255, 255, 0.1);
}

/* 6. Highlight Kolom Wajib Belum Terisi / Invalid Saat Klik Simpan */
.emp-section-body .form-control.emp-field-unfilled {
  border-color: #F43F5E !important;
  background-color: #FFF5F5 !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.14) !important;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="dark"] .emp-section-body .form-control.emp-field-unfilled {
  border-color: #FB7185 !important;
  background-color: rgba(244, 63, 94, 0.14) !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25) !important;
}

/* Section Header Icon Elegan Murni Tanpa Badge (Zero-Badge) */
.emp-section-icon {
  width: 20px;
  height: 20px;
  border-radius: 0 !important;
  background: transparent !important;
  color: #4F46E5;
  border: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

html[data-theme="dark"] .emp-section-icon {
  background: transparent !important;
  color: #818CF8;
  border: none !important;
}

/* Minimalist Step Number di Aside Panel */
.emp-val-item-num {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748B;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Styling Placeholder Dropdown Belum Terpilih (Anti-Slop & Clear State) */
select.form-control:invalid,
select.form-control:has(option[value=""]:checked) {
  color: #94A3B8 !important;
}

select.form-control option {
  color: #0F172A;
  font-style: normal;
}

select.form-control option[value=""] {
  color: #94A3B8;
}

html[data-theme="dark"] select.form-control:invalid,
html[data-theme="dark"] select.form-control:has(option[value=""]:checked) {
  color: #64748B !important;
}

html[data-theme="dark"] select.form-control option {
  color: #F8FAFC;
  background-color: #0F172A;
}

html[data-theme="dark"] select.form-control option[value=""] {
  color: #64748B;
}

/* ========================================================================== */
/* 10-YEAR ENTERPRISE EMPLOYEE DOSSIER & DOCUMENT UPLOAD STYLING              */
/* ========================================================================== */

.emp-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 6px;
}

.emp-upload-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.emp-upload-card:hover {
  border-color: #CBD5E1;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.05);
}

.emp-upload-card.has-file {
  border-color: #A7F3D0;
  background: #FCFDFD;
}

.emp-upload-card.emp-upload-card-unfilled {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}

.emp-upload-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F1F5F9;
}

.emp-upload-card-title {
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.emp-upload-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #64748B !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.emp-upload-badge.uploaded {
  background: transparent !important;
  color: #059669 !important;
  border: none !important;
}

/* Dropzone (Empty State) */
.emp-upload-dropzone {
  min-height: 155px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #CBD5E1;
  border-radius: 6px;
  background: #F8FAFC;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.emp-upload-dropzone:hover {
  border-color: #2563EB;
  background: #EFF6FF;
}

.emp-upload-icon-circle {
  width: auto;
  height: auto;
  border-radius: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 6px;
}

.emp-upload-hint {
  font-size: 12.5px;
  color: #64748B;
  margin-bottom: 10px;
}

.emp-upload-btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #2563EB;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.emp-upload-btn-upload:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
}

/* Uploaded State (File Terlihat!) */
.emp-upload-preview-wrapper {
  width: 100%;
  height: 155px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
  background: #0F172A;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emp-upload-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.emp-upload-pdf-wrapper {
  background: #FEF2F2;
  border-color: #FEE2E2;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
}

.emp-upload-pdf-badge {
  font-size: 12px;
  font-weight: 600;
  color: #DC2626;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  letter-spacing: 0.04em;
}

.emp-upload-file-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12.5px;
  color: #475569;
}

.emp-upload-filename {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

/* Action Buttons Bar: Ganti & Hapus */
.emp-upload-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
}

.emp-upload-btn-replace {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.emp-upload-btn-replace:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  color: #0F172A;
}

.emp-upload-btn-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.emp-upload-btn-delete:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

.emp-upload-btn-view {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.75);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}

.emp-upload-btn-view:hover {
  background: rgba(15, 23, 42, 0.95);
  color: #FFFFFF;
}

/* ==============================================================================
   NUSAMANDA ALL-DEVICE RESPONSIVE & FLUID TYPOGRAPHY SUITE (EXECUTIVE GRADE)
   Multi-Device Ergonomic Layout & Proportional Fluid Typography:
   - Widescreen & 4K Displays (>= 1440px)
   - Laptops & Ultrabooks (1025px - 1439px)
   - Tablet Landscape (861px - 1024px)
   - Tablet Portrait & Mobile Drawer (769px - 860px)
   - Standard Phablets & Large Mobiles (481px - 768px)
   - Standard Mobile Phones (361px - 480px)
   - Compact & Mini Screens (<= 360px)
   ============================================================================== */

/* 1. Universal Smooth Scrolling, Touch Ergonomics, and Viewport Fit */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  width: 100%;
}

/* 2. Global Fluid Typography Scaling Utilities */
.text-fluid-hero {
  font-size: clamp(17px, 1.5vw + 12px, 24px) !important;
  line-height: 1.25;
}
.text-fluid-title {
  font-size: clamp(14px, 1vw + 11px, 18px) !important;
  line-height: 1.3;
}
.text-fluid-subtitle {
  font-size: clamp(12.5px, 0.5vw + 9.5px, 14px) !important;
  line-height: 1.4;
}
.text-fluid-body {
  font-size: clamp(12.5px, 0.3vw + 10.5px, 14px) !important;
  line-height: 1.5;
}
.text-fluid-caption {
  font-size: clamp(12.5px, 0.2vw + 9px, 14px) !important;
  line-height: 1.35;
}
.text-fluid-metric {
  font-size: clamp(15px, 1.2vw + 12px, 22px) !important;
  line-height: 1.15;
}

/* 3. Universal Horizontal Touch-Scroll for Enterprise Data Tables */
.table-responsive,
.data-table-wrapper,
.cash-table-wrapper,
.emp-table-wrapper,
.treasury-table-container,
.prj-table-wrapper,
.inv-table-wrapper,
.pay-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  border-radius: var(--radius-md, 8px);
}

.table-responsive::-webkit-scrollbar,
.cash-table-wrapper::-webkit-scrollbar,
.emp-table-wrapper::-webkit-scrollbar,
.treasury-table-container::-webkit-scrollbar,
.prj-table-wrapper::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb,
.cash-table-wrapper::-webkit-scrollbar-thumb,
.emp-table-wrapper::-webkit-scrollbar-thumb,
.treasury-table-container::-webkit-scrollbar-thumb,
.prj-table-wrapper::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

html[data-theme="dark"] .table-responsive::-webkit-scrollbar-thumb,
html[data-theme="dark"] .cash-table-wrapper::-webkit-scrollbar-thumb,
html[data-theme="dark"] .emp-table-wrapper::-webkit-scrollbar-thumb {
  background: #334155;
}

/* 4. Enterprise Modal Dialog Fluid Responsiveness */
.modal-dialog {
  transition: transform 0.2s ease, opacity 0.2s ease;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

.modal-content {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

/* 5. BREAKPOINT: Large Displays & Widescreen (>= 1440px) */
@media (min-width: 1440px) {
  .ref-hero-banner {
    padding: 26px 32px;
  }
}

/* 6. BREAKPOINT: Compact Laptops & Tablet Landscape (<= 1024px) */
@media (max-width: 1024px) {
  .main-wrapper {
    padding: 20px 20px 48px;
  }
  .ref-metrics-row.cols-4,
  .ref-metrics-grid,
  .treasury-metrics-grid,
  .prj-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
  .kanban-board {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .emp-workspace-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  .emp-validation-aside {
    position: static;
    top: 0;
  }
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 7. BREAKPOINT: Tablet Portrait & Mobile Drawer (<= 860px) */
@media (max-width: 860px) {
  .topbar {
    left: 0 !important;
    width: 100% !important;
    padding: 0 14px !important;
    height: 56px !important;
  }
  .topbar-left {
    gap: 10px;
  }
  .topbar-module-icon,
  .topbar-module-icon-box {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
  }
  .topbar-module-icon svg,
  .topbar-module-icon-box svg {
    width: 16px !important;
    height: 16px !important;
  }
  .topbar-page-title,
  h1.topbar-page-title {
    font-size: clamp(12.5px, 0.4vw + 11px, 14px) !important;
  }
  .topbar-page-subtitle,
  p.topbar-page-subtitle {
    max-width: 220px;
    font-size: 12px !important;
  }
  .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 14px 14px 44px !important;
    margin-top: 56px;
  }
  /* Mobile Sidebar Off-canvas Drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 84vw !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35) !important;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .sidebar-backdrop.active {
    display: block !important;
    opacity: 1 !important;
  }
  /* Tables horizontally swipable on tablets & mobiles */
  .cash-table,
  .ref-table,
  .data-table,
  .pay-table,
  .inv-table,
  .inv-print-table {
    min-width: 680px;
  }
  /* Orgchart visual canvas touch navigation */
  .org-chart-wrapper,
  .org-canvas-container,
  #org-chart-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  /* Letters split layout */
  .letter-workspace {
    flex-direction: column !important;
    gap: 16px;
  }
  .letter-preview-pane {
    width: 100% !important;
  }
}

/* 8. BREAKPOINT: Phablets & Standard Mobiles (<= 768px) */
@media (max-width: 768px) {
  .modal-dialog {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    margin: 10px auto !important;
  }
  /* Hero Banners Fluid Typography */
  .ref-hero-banner,
  .dashboard-hero-banner,
  .emp-hero-banner,
  .module-hero-header {
    padding: 14px 16px !important;
  }
  .ref-hero-title,
  .module-hero-title {
    font-size: clamp(15px, 2vw + 10px, 18px) !important;
  }
  .ref-hero-desc,
  .module-hero-desc {
    font-size: clamp(12.5px, 1vw + 8.5px, 14px) !important;
  }
  .ref-hero-actions {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }
  /* Metrics Grid 2-columns */
  .ref-metrics-grid,
  .treasury-metrics-grid,
  .prj-metrics-grid,
  .pay-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
  .ref-metric-card,
  .treasury-metric-card {
    padding: 10px 12px !important;
  }
  .ref-metric-val,
  .treasury-metric-val {
    font-size: clamp(14px, 1.5vw + 10px, 18px) !important;
  }
  .ref-metric-caption,
  .treasury-metric-caption {
    font-size: clamp(12.5px, 0.4vw + 8px, 14px) !important;
  }
  /* Toolbar Filters Stacking */
  .filter-bar,
  .cash-filters-bar,
  .treasury-filter-bar,
  .prj-filter-bar,
  .letters-filter-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .filter-bar .form-control,
  .filter-bar .form-select,
  .cash-filters-bar .form-control,
  .cash-filters-bar .form-select {
    width: 100% !important;
  }
  /* Form Layout Grids to 1 Column */
  .emp-grid-2,
  .emp-grid-3,
  .emp-grid-4,
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  /* Employee Dossier Modal Profile Layout */
  .dossier-bio-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
  }
  .dossier-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 4px;
  }
}

/* 9. BREAKPOINT: Standard Phones (<= 640px) */
@media (max-width: 640px) {
  /* Employee Sticky Bottom Bar */
  .emp-sticky-footer {
    flex-direction: column-reverse !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    bottom: 8px !important;
  }
  .emp-sticky-footer > div:last-child {
    flex-direction: column-reverse !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .emp-sticky-footer > div:last-child .btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .emp-sticky-footer > div:first-child {
    text-align: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 2px !important;
  }
  /* Kanban single column on phone */
  .kanban-board {
    grid-template-columns: 1fr !important;
  }
  /* Document upload cards */
  .emp-upload-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  /* Breadcrumbs on mobile */
  .topbar-breadcrumb {
    display: none !important;
  }
}

/* 10. BREAKPOINT: Compact Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .main-wrapper {
    padding: 10px 10px 36px !important;
  }
  /* Topbar minimalism on small phone */
  .topbar-page-subtitle,
  p.topbar-page-subtitle {
    display: none !important;
  }
  .topbar-user-badge .user-text-wrap {
    display: none !important;
  }
  .topbar-user-badge {
    padding: 2px !important;
  }
  .topbar-center-search {
    display: none !important;
  }
  /* Preflight Identity Strip Stack */
  .emp-preflight-strip {
    grid-template-columns: 1fr !important;
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  /* Action Bars & Buttons Stack to Full Width */
  .emp-action-footer,
  .emp-actions-bar,
  .modal-footer {
    flex-direction: column-reverse !important;
    gap: 8px !important;
    padding: 12px 10px !important;
  }
  .emp-action-footer .btn,
  .emp-actions-bar .btn,
  .modal-footer .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 10px 14px !important;
    font-size: 12px !important;
  }
  /* Form Labels & Controls Touch Ergonomics */
  .form-control,
  .form-select,
  select,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  input[type="date"] {
    font-size: 13px !important;
    padding: 9px 12px !important;
    min-height: 40px !important;
  }
  .form-label,
  label {
    font-size: 12.5px !important;
    margin-bottom: 4px !important;
  }
  /* Document Upload Actions */
  .emp-upload-actions-bar {
    flex-direction: column !important;
    gap: 6px !important;
  }
  .emp-upload-btn-replace,
  .emp-upload-btn-delete {
    width: 100% !important;
    justify-content: center !important;
  }
  /* Login Screen Mobile Ergonomics */
  .login-card-box {
    width: 100% !important;
    max-width: calc(100vw - 20px) !important;
    padding: 24px 16px !important;
    margin: 10px auto !important;
  }
  .login-title {
    font-size: 18px !important;
  }
  .login-subtitle {
    font-size: 12.5px !important;
  }
  .login-input {
    font-size: 13px !important;
    padding: 10px 12px 10px 38px !important;
  }
  .login-submit-btn {
    padding: 11px 16px !important;
    font-size: 12.5px !important;
  }
}

/* 11. BREAKPOINT: Ultra-Compact Displays (<= 360px) */
@media (max-width: 360px) {
  .ref-metrics-grid,
  .treasury-metrics-grid,
  .prj-metrics-grid,
  .pay-metrics-grid {
    grid-template-columns: 1fr !important;
  }
  .topbar-page-title,
  h1.topbar-page-title {
    font-size: 12.5px !important;
  }
  .btn {
    font-size: 12.5px !important;
    padding: 7px 10px !important;
  }
  .ref-hero-title,
  .module-hero-title {
    font-size: 14px !important;
  }
}

/* ==============================================================================
   NUSAMANDA ALL-MODULE CARDS RESPONSIVE & FLUID TYPOGRAPHY ENGINE
   Total Card Architecture Audit:
   - Universal Card Structure (.card, .stat-card, .metric-card, .summary-card)
   - Executive Dashboard Cards (.ref-metric-card, .ref-project-card, .ref-rail-card, .ref-chart-card)
   - Treasury & Cashflow Cards (.cash-kpi-card, .cash-bank-card, .treasury-pnl-card, .treasury-coa-card)
   - Project & Kanban Cards (.proj-card, .prj-card, .task-card, .kanban-card)
   - Employee & Dossier Cards (.emp-section-card, .emp-val-card, .emp-upload-card, .dossier-card)
   - Org Chart & Visual Cards (.org-card, .org-node-card, .exec-node-card)
   - Invoices, Letters & Settings Cards (.inv-card, .letter-card, .settings-card)
   ============================================================================== */

/* 1. UNIVERSAL CARD BASE FLUID TYPOGRAPHY */
.card,
.ref-metric-card,
.ref-project-card,
.ref-rail-card,
.cash-kpi-card,
.cash-bank-card,
.treasury-metric-card,
.treasury-pnl-card,
.treasury-pnl-summary-card,
.proj-card,
.prj-card,
.task-card,
.emp-section-card,
.emp-val-card,
.emp-upload-card,
.dossier-card,
.org-card,
.org-node-card,
.settings-card {
  transition: padding 0.2s ease, gap 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Card Titles & Headlines */
.card-title,
.card-header h2,
.card-header h3,
.card-title-group h2,
.card-title-group h3,
.ref-project-title,
.proj-card-title,
.prj-card-title,
.project-corp-title,
.ref-rail-title,
.ref-approval-title,
.ref-chart-title,
.treasury-pnl-title,
.treasury-pnl-summary-title,
.treasury-coa-title,
.treasury-upcoming-title,
.treasury-side-section-title,
.task-card-title,
.task-state-title,
.emp-section-title,
.emp-val-hero-title,
.emp-upload-card-title,
.dossier-card-title,
.org-card-name,
.org-node-name,
.let-party-name,
.let-subject,
.let-ledger-title,
.inv-client-name,
.settings-hero-name,
.setting-item-title {
  font-size: clamp(12.5px, 0.4vw + 11px, 15px) !important;
  line-height: 1.35 !important;
  letter-spacing: -0.01em !important;
}

/* Big Card Headlines (PnL, Dossier Name, Settings Hero) */
.treasury-pnl-summary-title,
.dossier-name,
.settings-hero-name,
.exec-title-main {
  font-size: clamp(14px, 0.8vw + 12px, 18px) !important;
  line-height: 1.25 !important;
}

/* Card Numerical Values & Metrics */
.ref-metric-val,
.cash-kpi-val,
.treasury-metric-val,
.treasury-pnl-summary-val,
.treasury-pnl-summary-figure,
.treasury-pnl-total,
.treasury-balance-val,
.treasury-coa-balance,
.treasury-coa-total,
.cash-bank-amount,
.treasury-upcoming-amount,
.proj-fin-val,
.ref-approval-amount,
.exec-node-val,
.inv-cell-total,
.inv-footer-total-val,
.metric-value,
.stat-value,
.stat-val,
.kpi-val {
  font-size: clamp(14px, 1.2vw + 12px, 21px) !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
}

/* Extra Large Card Numerals (Master Cashflow & PnL Top Figure) */
.treasury-pnl-summary-val,
.treasury-pnl-summary-figure {
  font-size: clamp(16px, 1.5vw + 13px, 24px) !important;
}

/* Card Captions, Labels & Eyebrows */
.card-subtitle,
.card-desc,
.card-caption,
.ref-metric-caption,
.cash-kpi-caption,
.treasury-metric-caption,
.treasury-pnl-summary-eyebrow,
.treasury-coa-caption,
.proj-fin-lbl,
.emp-preflight-label,
.emp-val-hero-tag,
.dossier-label,
.exec-node-label,
.metric-label,
.stat-label,
.kpi-label {
  font-size: clamp(12.5px, 0.2vw + 8.5px, 14px) !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  line-height: 1.3 !important;
}

/* Card Body Descriptions & Sub-Texts */
.card-text,
.card-body p,
.ref-metric-sub,
.cash-kpi-sub,
.treasury-metric-sub,
.treasury-pnl-summary-desc,
.treasury-coa-category,
.ref-project-desc,
.ref-project-meta,
.ref-rail-desc,
.ref-approval-sub,
.proj-card-client,
.proj-card-timeline,
.proj-card-codeline,
.proj-card-pic,
.proj-card-sector,
.proj-fin-sub,
.task-card-desc,
.task-card-project,
.task-card-assignee-name,
.task-card-due,
.emp-section-desc,
.emp-preflight-value,
.emp-val-hero-count,
.emp-val-item-label,
.emp-val-item-title,
.emp-val-item-sub,
.emp-upload-hint,
.emp-upload-filename,
.emp-upload-file-meta,
.dossier-row,
.dossier-value,
.dossier-nip,
.dossier-role,
.org-card-handle,
.org-card-job,
.org-card-div,
.org-node-nip,
.org-node-title,
.org-node-division,
.exec-node-sub,
.let-party-sub,
.let-date,
.let-signer,
.let-deadline,
.inv-client-email,
.settings-hero-meta,
.setting-item-desc {
  font-size: clamp(12.5px, 0.25vw + 9.5px, 14px) !important;
  line-height: 1.4 !important;
}

/* Card Badges, Chips & Status Pills */
.ref-badge-pill,
.ref-approval-tag,
.ref-runway-badge,
.ref-bubble-badge,
.cash-bank-tag,
.cash-bank-status,
.treasury-metric-tag,
.treasury-side-badge,
.treasury-pnl-summary-margin,
.proj-card-status,
.task-card-prio,
.task-card-evidence,
.emp-section-badge,
.emp-upload-badge,
.emp-upload-pdf-badge,
.emp-val-item-badge,
.emp-val-item-num,
.org-card-role-badge,
.org-node-badge,
.org-node-subs-badge,
.let-status-badge,
.let-cat-badge,
.inv-status-ind,
.inv-no-chip,
.settings-badge-role,
.settings-status-tag,
.health-badge-pill {
  font-size: clamp(12.5px, 0.18vw + 8.5px, 14px) !important;
  padding: clamp(1.5px, 0.1vw + 1px, 3px) clamp(6px, 0.2vw + 5px, 9px) !important;
  line-height: 1.25 !important;
}

/* Card Action Buttons & Chips */
.ref-action-chip,
.proj-update-btn,
.task-move-btn,
.emp-upload-btn-upload,
.emp-upload-btn-replace,
.emp-upload-btn-delete,
.emp-upload-btn-view,
.emp-val-item-btn {
  font-size: clamp(12.5px, 0.2vw + 9.5px, 14px) !important;
  line-height: 1.3 !important;
}

/* 2. RESPONSIVE CARD TEXT ADAPTATIONS BY BREAKPOINT */

/* Laptop & Tablet Landscape (<= 1024px) */
@media (max-width: 1024px) {
  .card,
  .ref-metric-card,
  .ref-project-card,
  .cash-kpi-card,
  .cash-bank-card,
  .treasury-metric-card,
  .proj-card,
  .task-card,
  .emp-val-card,
  .emp-upload-card,
  .dossier-card {
    padding: 14px 16px;
  }
}

/* Tablet Portrait & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .card,
  .ref-metric-card,
  .ref-project-card,
  .ref-rail-card,
  .cash-kpi-card,
  .cash-bank-card,
  .treasury-metric-card,
  .treasury-pnl-card,
  .proj-card,
  .task-card,
  .emp-section-card,
  .emp-val-card,
  .emp-upload-card,
  .dossier-card,
  .settings-card {
    padding: 12px 14px;
    border-radius: 8px;
  }
  
  /* Finance 2-column box inside project cards stacks cleanly */
  .proj-card-finance {
    padding: 10px;
    gap: 8px;
  }
  
  /* Card titles wrap gracefully without truncated height */
  .ref-project-title,
  .proj-card-title {
    min-height: auto !important;
    -webkit-line-clamp: 3 !important;
  }

  /* Metric cards value scaling */
  .ref-metric-val,
  .cash-kpi-val,
  .treasury-metric-val {
    font-size: clamp(14px, 2.5vw + 8px, 18px) !important;
  }

  /* Dossier card header responsive */
  .dossier-card-header {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .card,
  .ref-metric-card,
  .ref-project-card,
  .ref-rail-card,
  .cash-kpi-card,
  .cash-bank-card,
  .treasury-metric-card,
  .proj-card,
  .task-card,
  .emp-upload-card,
  .dossier-card {
    padding: 10px 12px;
  }

  /* Metrics Cards on Mobile (Prevent any text overflow) */
  .ref-metric-card,
  .cash-kpi-card,
  .treasury-metric-card {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  
  .ref-metric-val,
  .cash-kpi-val,
  .treasury-metric-val {
    font-size: clamp(13px, 2.8vw + 6px, 16.5px) !important;
    letter-spacing: -0.01em !important;
  }
  
  .ref-metric-caption,
  .cash-kpi-caption,
  .treasury-metric-caption {
    font-size: 12px !important;
    letter-spacing: 0.02em !important;
  }
  
  .ref-metric-sub,
  .cash-kpi-sub,
  .treasury-metric-sub {
    font-size: 12px !important;
  }

  /* Project Cards on Mobile */
  .proj-card-finance {
    grid-template-columns: 1fr 1fr;
    padding: 8px 10px;
    gap: 6px;
  }
  .proj-fin-val {
    font-size: 12.5px !important;
  }
  .proj-fin-lbl {
    font-size: 12px !important;
  }
  
  /* Bank Cards on Mobile */
  .cash-bank-amount {
    font-size: 13px !important;
  }
  
  /* PnL Card on Mobile */
  .treasury-pnl-summary-val,
  .treasury-pnl-summary-figure {
    font-size: 16px !important;
  }
  
  /* Validation Aside Card Hero */
  .emp-val-hero {
    padding: 12px 14px !important;
  }
  .emp-val-hero-title {
    font-size: 12.5px !important;
  }
  .emp-val-hero-count {
    font-size: 12px !important;
  }
  .emp-val-gauge-wrapper {
    width: 46px !important;
    height: 46px !important;
  }
  .emp-val-gauge-percent,
  #emp-val-gauge-text {
    font-size: 12.5px !important;
  }

  /* Upload Cards on Mobile */
  .emp-upload-dropzone,
  .emp-upload-preview-wrapper {
    min-height: 135px !important;
    height: 135px !important;
  }
  .emp-upload-card-title {
    font-size: 12.5px !important;
  }

  /* Card Background Art Scaling on Mobile */
  .ref-metric-art,
  .cash-kpi-art {
    width: 42px !important;
    height: 42px !important;
    opacity: 0.35 !important;
    right: 4px !important;
    bottom: 4px !important;
  }
}

/* Ultra-Compact Screens (<= 360px) */
@media (max-width: 360px) {
  .ref-metric-val,
  .cash-kpi-val,
  .treasury-metric-val {
    font-size: 14px !important;
  }
  .card-title,
  .proj-card-title,
  .ref-project-title,
  .emp-section-title {
    font-size: 12.5px !important;
  }
  .proj-card-finance {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ==============================================================================
   NSM - ERP SYSTEM — Settings & Profile Management Component Styling
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   Human-Crafted, Clean, Minimalist Corporate Settings (Anti-Slop Compliant)
   ============================================================================== */

/* ==============================================================================
   08. PENGATURAN AKUN & SISTEM (MINIMALIST EXECUTIVE PILL DESIGN)
   Reference: Downloads/Screenshot 2026-09-24 082958.png
   PT. Amanda Teknologi Nusantara (NUSAMANDA)
   ============================================================================== */

.settings-page-wrap {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  padding-bottom: 48px;
}

/* Page Header outside card */
.settings-page-header {
  margin-bottom: 18px;
}

.settings-page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  margin: 0;
}

/* Master Big Container */
.settings-panel-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 580px;
  overflow: hidden;
}

/* Left Sidebar Navigation */
.settings-nav-sidebar {
  padding: 24px 16px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
}

.settings-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.settings-nav-item {
  width: 100%;
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.settings-nav-btn:hover {
  color: var(--text-main);
  background: var(--canvas);
}

.settings-nav-btn.active {
  color: #2563EB;
  background: #EBF3FF;
  font-weight: 600;
}

html[data-theme="dark"] .settings-nav-btn.active {
  color: #60A5FA;
  background: rgba(37, 99, 235, 0.18);
}

.settings-nav-btn.danger {
  color: #EF4444;
  margin-top: auto;
}

.settings-nav-btn.danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #DC2626;
}

/* Right Content Area */
.settings-content-pane {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--surface);
}

.settings-pane-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

/* Stacked Information Cards */
.settings-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s ease;
}

.settings-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.settings-card-label-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}

/* Pill Edit Button */
.settings-pill-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.settings-pill-edit-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
  background: var(--canvas);
}

/* Avatar Summary Card Content */
.settings-avatar-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.settings-avatar-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-avatar-circle-box {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-avatar-circle-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-avatar-text-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-user-fullname {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-main);
}

.settings-user-role {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 450;
}

.settings-user-location {
  font-size: 12px;
  color: var(--text-subtle);
  font-weight: 400;
}

/* Field Grid inside Card (Read Mode) */
.settings-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.settings-field-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.settings-field-name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.settings-field-val {
  font-size: 13.5px;
  font-weight: 450;
  color: var(--text-main);
  word-break: break-word;
  line-height: 1.45;
}

/* Field Form Mode (Edit Mode) */
.settings-edit-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-form-btn-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Telemetry & Revenue Specific */
.settings-runway-track {
  width: 100%;
  height: 8px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 8px;
}

.settings-runway-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 100px;
  transition: width 0.3s ease;
}

.settings-preset-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.settings-preset-pill {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.settings-preset-pill:hover {
  background: var(--canvas);
  border-color: var(--border-strong);
}

.settings-preset-pill.active {
  background: #EBF3FF;
  color: #2563EB;
  border-color: #2563EB;
  font-weight: 600;
}

html[data-theme="dark"] .settings-preset-pill.active {
  background: rgba(37, 99, 235, 0.18);
  color: #60A5FA;
  border-color: #60A5FA;
}

/* Theme selector in screenshot style */
.settings-theme-select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-theme-option-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--canvas);
  cursor: pointer;
  transition: all 0.15s ease;
}

.settings-theme-option-box:hover {
  border-color: var(--border-strong);
}

.settings-theme-option-box.active {
  border-color: var(--primary);
  background: var(--surface);
}

/* Tab Panes */
.settings-tab-section {
  display: none;
}

.settings-tab-section.active {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: settingsFadeIn 0.18s ease;
}

@keyframes settingsFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Password Toggle helper */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap .form-control {
  padding-right: 42px !important;
}

.pwd-toggle-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px 8px;
  color: var(--text-subtle);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.pwd-toggle-btn:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 860px) {
  .settings-panel-box {
    grid-template-columns: 1fr;
  }
  .settings-nav-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .settings-nav-list {
    flex-direction: row;
    white-space: nowrap;
  }
  .settings-nav-btn {
    white-space: nowrap;
  }
  .settings-content-pane {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .settings-fields-grid,
  .settings-form-row,
  .settings-theme-select-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .settings-avatar-summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

/* ==============================================================================
   MASTER DARK MODE ENGINE (COMPREHENSIVE MULTI-MODULE OVERRIDES)
   PT. Amanda Teknologi Nusantara — Single Theme Engine Standard
   ============================================================================== */

/* 1. Dashboard Reference Metric Cards (High-Specificity Override) */
html[data-theme="dark"] .ref-metric-card,
html[data-theme="dark"] .ref-metric-card.theme-purple,
html[data-theme="dark"] .ref-metric-card.theme-blue,
html[data-theme="dark"] .ref-metric-card.theme-pink,
html[data-theme="dark"] .ref-metric-card.theme-cyan,
html[data-theme="dark"] .ref-metric-card.theme-green,
html[data-theme="dark"] .ref-metric-card.theme-amber {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .ref-metric-card .ref-metric-label {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .ref-metric-card .ref-metric-val {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-metric-card.theme-purple .ref-metric-icon-box,
html[data-theme="dark"] .ref-metric-card.theme-blue .ref-metric-icon-box,
html[data-theme="dark"] .ref-metric-card.theme-pink .ref-metric-icon-box,
html[data-theme="dark"] .ref-metric-card.theme-cyan .ref-metric-icon-box,
html[data-theme="dark"] .ref-metric-card.theme-green .ref-metric-icon-box,
html[data-theme="dark"] .ref-metric-card.theme-amber .ref-metric-icon-box {
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
}

/* 2. Dashboard Projects & Activity Cards */
html[data-theme="dark"] .ref-project-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .ref-project-body {
  background: var(--surface) !important;
}

html[data-theme="dark"] .ref-project-title {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-pic-meta strong {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-project-footer {
  border-top-color: var(--border) !important;
}

/* 3. Dashboard Tables (Your Lesson & Recent Transactions) */
html[data-theme="dark"] .ref-table-wrapper {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .ref-table thead tr {
  background: #141E33 !important;
  border-bottom-color: var(--border) !important;
}

html[data-theme="dark"] .ref-table th {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .ref-table td {
  border-bottom-color: var(--border) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-table tbody tr:hover {
  background: #162238 !important;
}

html[data-theme="dark"] .ref-entity-meta strong,
html[data-theme="dark"] .ref-amount-val,
html[data-theme="dark"] .ref-amount-val.plus,
html[data-theme="dark"] .ref-amount-val.minus {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-entity-icon.is-in,
html[data-theme="dark"] .ref-entity-icon.is-out {
  background: var(--surface-hover) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .ref-table-footer {
  background: #141E33 !important;
  border-top-color: var(--border) !important;
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .ref-table-footer-meta strong {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-circle-action-btn {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .ref-circle-action-btn:hover {
  background: var(--surface-hover) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* 4. Dashboard Right Rail (Pusat Disposisi & Rekening Likuiditas) */
html[data-theme="dark"] .ref-rail-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

html[data-theme="dark"] .ref-rail-title {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-rail-sep {
  background: var(--border) !important;
}

html[data-theme="dark"] .ref-approval-item {
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .ref-approval-item:hover {
  border-color: var(--primary-border) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

html[data-theme="dark"] .ref-approval-title {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-approval-amount {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-action-chip.secondary {
  background: var(--surface) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .ref-action-chip.secondary:hover {
  background: var(--border) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-runway-badge {
  background: rgba(13, 148, 136, 0.14) !important;
  border-color: rgba(13, 148, 136, 0.3) !important;
  color: #5EEAD4 !important;
}

html[data-theme="dark"] .ref-bank-item {
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .ref-bank-item:hover {
  background: var(--border) !important;
  border-color: var(--border-strong) !important;
}

html[data-theme="dark"] .ref-bank-name,
html[data-theme="dark"] .ref-bank-balance {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-ratio-bar {
  background: var(--border) !important;
}

html[data-theme="dark"] .ref-see-all-full-btn {
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-see-all-full-btn:hover {
  background: var(--border) !important;
}

/* 5. Navigation Segmented Controls & Sub-filters */
html[data-theme="dark"] .ref-nav-segmented {
  background: var(--surface-hover) !important;
}

html[data-theme="dark"] .ref-nav-pill {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .ref-nav-pill:hover {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-nav-pill.active {
  background: var(--surface) !important;
  color: var(--primary) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .ref-subfilter-btn {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .ref-subfilter-btn:hover {
  border-color: var(--border-strong) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-subfilter-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #FFFFFF !important;
}

html[data-theme="dark"] .ref-search-box {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .ref-search-box input {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .ref-bank-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .ref-arrow-btn {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-main) !important;
}

/* 6. Organization Hierarchy & Permissions Canvas */
html[data-theme="dark"] .org-canvas-viewport {
  background: #090E17 !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .org-node-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

html[data-theme="dark"] .org-node-name {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .org-node-title {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .org-node-footer {
  border-top-color: var(--border) !important;
  background: rgba(255, 255, 255, 0.02) !important;
}

html[data-theme="dark"] .org-node-btn {
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .org-node-btn:hover {
  background: var(--border) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .org-tree li::before,
html[data-theme="dark"] .org-tree li::after,
html[data-theme="dark"] .org-tree ul ul::before {
  border-color: #334155 !important;
}

html[data-theme="dark"] .org-zoom-toolbar {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .org-zoom-btn {
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .org-legend-bar {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

/* 7. Universal Form Inputs, Selects & Native Dropdown Menus */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="month"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #0F172A !important;
  border-color: #1E293B !important;
  color: #F1F5F9 !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-soft) !important;
}

html[data-theme="dark"] select option {
  background-color: #0F172A !important;
  color: #F1F5F9 !important;
}

html[data-theme="dark"] .form-label,
html[data-theme="dark"] label {
  color: #94A3B8;
}

html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .text-muted {
  color: #64748B !important;
}

/* 8. Global Modals & Dialogs Surface Harmony */
html[data-theme="dark"] .modal-dialog {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .modal-header {
  border-bottom-color: var(--border) !important;
  background: var(--surface) !important;
}

html[data-theme="dark"] .modal-header h3,
html[data-theme="dark"] .modal-title {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .modal-close-btn {
  color: var(--text-muted) !important;
}

html[data-theme="dark"] .modal-close-btn:hover {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .modal-body {
  background: var(--surface) !important;
  color: var(--text-main) !important;
}

html[data-theme="dark"] .modal-footer {
  border-top-color: var(--border) !important;
  background: var(--canvas) !important;
}

/* 9. Global Smooth Dark Scrollbars */
html[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #080C14;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 6px;
  border: 2px solid #080C14;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* 10. Organization Chart, Employee Badges & Action Contrast in Dark Theme */
html[data-theme="dark"] .ent-role-label.rank-1 { color: #93C5FD !important; }
html[data-theme="dark"] .ent-role-label.rank-2 { color: #6EE7B7 !important; }
html[data-theme="dark"] .ent-role-label.rank-3 { color: #C4B5FD !important; }
html[data-theme="dark"] .ent-role-label { color: var(--text-main) !important; }

html[data-theme="dark"] .org-node-badge {
  background: var(--surface-hover) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .org-card-role-badge,
html[data-theme="dark"] .org-node-subs-badge {
  background: var(--surface-hover) !important;
  color: var(--text-muted) !important;
  border-color: var(--border) !important;
}

html[data-theme="dark"] .btn-cash-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-main);
}

html[data-theme="dark"] .btn-cash-outline:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text-main);
}

/* 11. Dashboard Filter Tabs & Modal Controls in Dark Theme */
html[data-theme="dark"] .dash-filter-tabs {
  background: #1E293B;
  border-color: #334155;
}

html[data-theme="dark"] .dash-filter-btn {
  color: #94A3B8;
}

html[data-theme="dark"] .dash-filter-btn:hover {
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .dash-filter-btn.active {
  background: #2563EB !important;
  color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.4);
}

html[data-theme="dark"] .dash-modal-type-switch {
  background: #0F172A;
  border-color: #1E293B;
}

html[data-theme="dark"] .dash-type-btn {
  color: #94A3B8;
}

html[data-theme="dark"] .dash-type-radio input:checked + .dash-type-btn.is-in {
  background: rgba(5, 150, 105, 0.25);
  color: #6EE7B7;
  border-color: #059669;
}

html[data-theme="dark"] .dash-type-radio input:checked + .dash-type-btn.is-out {
  background: rgba(220, 38, 38, 0.25);
  color: #FCA5A5;
  border-color: #DC2626;
}



/* ==============================================================================
   HEADER REVISIONS: ANCHOR POPUPS, ZERO SLOP BADGES, & AUTHENTIC COLORED ICONS
   ============================================================================== */

/* --- 1. Topbar Trigger Active Connections --- */
.topbar-notif-container {
  position: relative;
}

.topbar-notif-container.active #btn-topbar-notif {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  color: #2563EB !important;
}

.user-profile-widget-container {
  position: relative;
}

.user-profile-widget-container.active .user-selector-menu {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.user-profile-widget-container.active .user-menu-chevron {
  transform: rotate(180deg) !important;
  color: #2563EB !important;
}

/* --- 2. Notification Bell Active / Unread States with Authentic Amber Glow --- */
.topbar-icon-action-btn.has-unread {
  background: rgba(245, 158, 11, 0.08) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  color: #D97706 !important;
}

.topbar-icon-action-btn.has-unread .notif-bell-icon {
  stroke: #D97706 !important;
  fill: rgba(245, 158, 11, 0.2) !important;
}

.topbar-icon-action-btn.has-unread .notif-pulse-dot {
  display: block !important;
  background: #EF4444 !important;
  box-shadow: 0 0 0 2px var(--surface), 0 0 8px rgba(239, 68, 68, 0.8);
  animation: notif-pulse-glow 1.8s infinite ease-in-out;
}

@keyframes notif-pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.8; }
}

/* --- 3. Popover Anchor In Animation (Menciut & Mengarah Langsung ke Tombol) --- */
@keyframes popover-anchor-emerge {
  0% {
    opacity: 0;
    transform: scale(0.86) translateY(-6px);
  }
  65% {
    transform: scale(1.015) translateY(1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- 4. User Profile Dropdown: Minimalist Beak Caret Arrow Pointing To Trigger --- */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.14), 0 3px 10px rgba(0, 0, 0, 0.04);
  padding: 8px 8px 6px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transform-origin: calc(100% - 28px) -6px;
  animation: popover-anchor-emerge 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Segitiga Beak / Caret yang Mengarah ke Tombol Profil */
.user-profile-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 22px;
  width: 10px;
  height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  border-top-left-radius: 2px;
  z-index: 1002;
}

/* Header Akun: NAMA & ROLE Saja (Elegan & Terbingkai Rapi) */
.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 4px 8px;
  border-bottom: 1px solid var(--border);
}

.dropdown-avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 50%, #3B82F6 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.dropdown-user-meta {
  min-width: 0;
  flex: 1;
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.dropdown-user-role {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Menu List Profile: Minimalis & Ringkas */
.dropdown-menu-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 5px;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6.5px 8px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
  text-align: left;
  box-sizing: border-box;
}

.dropdown-menu-item:hover {
  background: var(--surface-hover, #F1F5F9);
}

.dropdown-menu-item.logout {
  color: #DC2626;
}

.dropdown-menu-item.logout:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #B91C1C;
}

/* Larangan Badge pada Icon: Ikon Berdiri Bebas Tanpa Kotak/Badge */
.dropdown-item-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.12s ease;
}

.dropdown-menu-item:hover .dropdown-item-icon {
  transform: scale(1.12);
}

.dropdown-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- 5. Notification Dropdown: Beak Caret Arrow Pointing To Bell Button --- */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 11px);
  right: 0;
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.16), 0 4px 14px rgba(0, 0, 0, 0.04);
  padding: 12px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform-origin: calc(100% - 19px) -6px;
  animation: popover-anchor-emerge 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Segitiga Beak / Caret yang Mengarah ke Tombol Lonceng */
.notif-dropdown::before {
  content: '';
  position: absolute;
  top: -6.5px;
  right: 13px;
  width: 11px;
  height: 11px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
  border-top-left-radius: 2.5px;
  z-index: 1002;
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px 10px;
  border-bottom: 1px solid var(--border);
}

.notif-header-title-box {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.notif-main-title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.notif-status-indicator {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.notif-status-indicator.unread {
  color: #DC2626;
  font-weight: 600;
}

.notif-close-action {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-hover, #F1F5F9);
}

.notif-close-action:hover {
  color: var(--text-main);
}

.notif-dot-unread {
  width: 6.5px;
  height: 6.5px;
  background: #2563EB;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 1.5px var(--surface), 0 0 5px rgba(37, 99, 235, 0.6);
}

/* Larangan Garis Warna Satu Sisi pada Card/Row: Tanpa border-left slop */
.notif-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 8px;
  border-left: none !important;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.notif-row:hover {
  background: var(--surface-hover, #F8FAFC);
}

.notif-row.unread-item {
  background: rgba(37, 99, 235, 0.035);
  border-left: none !important;
}

/* Larangan Badge pada Icon Notifikasi: Ikon Bebas Mandiri Tanpa Kotak/Tile */
.notif-row-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.notif-empty-state {
  padding: 24px 16px;
  text-align: center;
}

.notif-empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.notif-empty-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 13px;
  margin-bottom: 2px;
}

.notif-empty-desc {
  font-size: 11.5px;
  color: var(--text-muted);
}



/* ==============================================================================
   DASHBOARD REVISIONS: ZERO BADGE ON ICONS & TEXT, ZERO SINGLE-SIDED BORDERS
   ============================================================================== */

/* Ikon Header Rail: Berdiri Bebas Tanpa Badge Tile */
.dash-rail-header-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
}

/* Status Indikator "1 Menunggu" Tanpa Badge Pill: Tipografi Murni */
.dash-status-indicator {
  font-size: 11.5px;
  font-weight: 600;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.dash-status-indicator.is-pending {
  color: #D97706 !important; /* Warm Amber */
}

.dash-status-indicator.is-clean {
  color: #059669 !important; /* Clean Emerald */
}

/* Teks Kategori "Faktur Piutang" & "Naskah Dinas" Tanpa Badge Tag: Tipografi Murni */
.dash-approval-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline-block;
  line-height: 1.2;
}

.dash-approval-category.invoice {
  color: #059669 !important; /* Pure Emerald */
}

.dash-approval-category.doc {
  color: #2563EB !important; /* Pure Royal Blue */
}

/* Tombol Aksi Approval Minimalis */
.dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s ease;
  font-family: inherit;
  border: 1px solid transparent;
}

.dash-action-btn.primary {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #1D4ED8;
}

.dash-action-btn.primary:hover {
  background: #1D4ED8;
}

.dash-action-btn.secondary {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}

.dash-action-btn.secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover, #CBD5E1);
}

/* Status 100% Likuid Tipografi Murni */
.dash-bank-shield-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Penegasan Mutlak: Seluruh Card Approval & Rail Bebas Garis Satu Sisi */
.dash-approval-item {
  border: 1px solid var(--border) !important;
  border-left: 1px solid var(--border) !important;
}

.dash-rail-card {
  border: 1px solid var(--border) !important;
  border-left: 1px solid var(--border) !important;
}

/* ==============================================================================
   FINANCIAL MODULES ANTI-SLOP SYSTEM (ARUS KAS, FAKTUR, BIAYA, NERACA, PAJAK)
   Master Rules:
   1. Absolute Zero Badge on Icons (No container boxes, tiles, or background shapes)
   2. Absolute Zero Pill Badges on UI (Pure corporate typography, no rounded capsules)
   3. Authentic Multi-Tone Realistic Vector Icons (Freestanding, vibrant hues)
   4. Absolute Zero Single-Sided Borders (Symmetrical 1px borders all around)
   ============================================================================== */

/* 1. Global Financial KPI Cards Symmetrical Border & Hover */
.cash-kpi-card,
.cash-pnl-net-card,
.expenses-page .card,
.balance-sheet-container .card,
.tax-page-container .card {
  border: 1px solid var(--border) !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  border-top: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* 2. Global Freestanding Financial Icons (Zero Tile / Box) */
.cash-kpi-icon-box,
.cash-kpi-icon-freestanding {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

/* 3. Pure Corporate Typography on Financial Headers & Captions */
.cash-kpi-top span,
.cash-pnl-table-tag,
.cash-pnl-net-tag {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
}

/* 4. Elimination of Table and Status Badges across Financial Workstations */
.inv-status-ind,
.prj-status-ind {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

