/* ==========================================================
   INSURELY — ADVANCED PRODUCT DESIGN SYSTEM & COMPONENT ENGINE
   Modern Fintech SaaS Aesthetics & Insurance Operations Workspace
   ========================================================== */

/* ----------------------------------------------------------
   1. DESIGN TOKENS (LIGHT DEFAULT — LUKANA INSPIRED)
   ---------------------------------------------------------- */
:root, [data-theme="light"] {
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  /* Canvas & Surfaces (Pale Mint Background & Clean White Surfaces) */
  --color-bg: #E7F0EB;
  --color-surface: #FFFFFF;
  --color-surface-subtle: #DCE9E2;
  --color-surface-raised: #FFFFFF;
  --color-surface-hover: #F2F7F4;
  --color-overlay: rgba(32, 39, 34, 0.45);

  /* Text (Charcoal & Muted Slate) */
  --color-text-primary: #202722;
  --color-text-secondary: #68756E;
  --color-text-muted: #8A968F;
  --color-text-subtle: #8A968F;
  --color-text-placeholder: #8A968F;

  /* Borders (Subtle Crisp Thin Borders) */
  --color-border: #DFE7E1;
  --color-border-subtle: #EBF1ED;
  --color-border-strong: #CDD8D0;
  --color-border-focus: #4F8B70;

  /* Primary Brand — Forest Sage Green (#4F8B70) & Hover (#3D745B) */
  --color-primary: #4F8B70;
  --color-primary-hover: #3D745B;
  --color-primary-active: #315F49;
  --color-primary-soft: #E6F1E9;
  --color-primary-border: #CBE2D4;
  --color-primary-text: #FFFFFF;

  /* Secondary Brand & Dark Contrast */
  --color-dark-green: #202622;
  --color-secondary: #202622;
  --color-secondary-surface: #202622;
  --color-secondary-hover: #2E3731;

  /* Accent Tones */
  --color-accent: #4F8B70;
  --color-accent-lime: #4F8B70;
  --color-accent-soft: #E6F1E9;
  --color-accent-border: #CBE2D4;

  /* Input Background */
  --color-input-bg: #F8FAF8;

  /* Pastel Status & Accent Palette */
  --pastel-mint: #DDEFE3;
  --pastel-mint-text: #347553;
  --pastel-blue: #E0EAF6;
  --pastel-blue-text: #416C99;
  --pastel-pink: #F6E1E6;
  --pastel-pink-text: #B84A52;
  --pastel-yellow: #F6EBD0;
  --pastel-yellow-text: #936B22;
  --pastel-lavender: #E9E4F5;
  --pastel-lavender-text: #6D55A6;

  /* Semantic Feedback (Exact Hex Codes) */
  --color-success: #347553;
  --color-success-light: #DDEFE3;
  --color-success-border: #C6E4CF;
  --color-success-text: #347553;

  --color-warning: #936B22;
  --color-warning-light: #F6EBD0;
  --color-warning-border: #EAD9B0;
  --color-warning-text: #936B22;

  --color-danger: #B84A52;
  --color-danger-light: #F6E1E6;
  --color-danger-border: #EFC2CB;
  --color-danger-text: #B84A52;

  --color-info: #416C99;
  --color-info-light: #E0EAF6;
  --color-info-border: #C7D9EE;
  --color-info-text: #416C99;

  /* Sidebar Tokens (Dark Charcoal Navigation Rail / Sidebar) */
  --sidebar-width: 256px;
  --sidebar-collapsed-width: 68px;
  --sidebar-bg: #202622;
  --sidebar-surface: #191E1A;
  --sidebar-border: #2C352F;
  --sidebar-text: #A2ADA6;
  --sidebar-text-muted: #748078;
  --sidebar-text-bright: #FFFFFF;
  --sidebar-hover-bg: #2A332C;
  --sidebar-hover-text: #FFFFFF;
  --sidebar-active-bg: #4F8B70;
  --sidebar-active-text: #FFFFFF;
  --sidebar-active-icon: #FFFFFF;
  --sidebar-active-border: transparent;
  --sidebar-indicator: transparent;

  /* Layout Metrics */
  --header-height: 68px;

  /* Radii (Modern Soft Rounded Corners) */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Elevation Shadows (Soft, Minimal, Restrained) */
  --shadow-xs: 0 1px 2px rgba(32, 39, 34, 0.03);
  --shadow-sm: 0 2px 6px rgba(32, 39, 34, 0.04), 0 1px 2px rgba(32, 39, 34, 0.02);
  --shadow-md: 0 4px 12px rgba(32, 39, 34, 0.05), 0 2px 4px rgba(32, 39, 34, 0.02);
  --shadow-lg: 0 10px 24px -4px rgba(32, 39, 34, 0.06);
  --shadow-xl: 0 20px 32px -6px rgba(32, 39, 34, 0.07);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Backward Compatibility Aliases */
  --bg-main: var(--color-bg);
  --bg-card: var(--color-surface);
  --bg-sidebar: var(--sidebar-bg);
  --primary: var(--color-primary);
  --primary-hover: var(--color-primary-hover);
  --primary-light: var(--color-primary-soft);
  --text-main: var(--color-text-primary);
  --text-muted: var(--color-text-muted);
  --border-color: var(--color-border);
  --sidebar-link: var(--sidebar-text);
  --sidebar-link-hover: var(--sidebar-hover-bg);
  --sidebar-active-bg: var(--sidebar-active-bg);
  --sidebar-active-text: var(--sidebar-active-text);
  --card-shadow: var(--shadow-xs);
  --success: var(--color-success);
  --warning: var(--color-warning);
  --danger: var(--color-danger);
  --info: var(--color-info);
  --success-bg: var(--color-success-light);
  --warning-bg: var(--color-warning-light);
  --danger-bg: var(--color-danger-light);
  --info-bg: var(--color-info-light);
  --success-text: var(--color-success-text);
  --warning-text: var(--color-warning-text);
  --danger-text: var(--color-danger-text);
  --info-text: var(--color-info-text);
}

/* ----------------------------------------------------------
   2. DARK THEME SPECIFICATION
   ---------------------------------------------------------- */
[data-theme="dark"] {
  --color-bg: #141A16;
  --color-surface: #1B221E;
  --color-surface-subtle: #222B26;
  --color-surface-raised: #252F29;
  --color-surface-hover: #232C27;
  --color-overlay: rgba(10, 14, 12, 0.75);

  --color-text-primary: #F0F4F1;
  --color-text-secondary: #A6B4AA;
  --color-text-muted: #7E8D82;
  --color-text-subtle: #5C6A60;
  --color-text-placeholder: #5C6A60;

  --color-border: #28332B;
  --color-border-subtle: #1F2722;
  --color-border-strong: #37463C;
  --color-border-focus: #4F8B70;

  /* Sidebar Tokens (Dark) */
  --sidebar-bg: #111613;
  --sidebar-surface: #161D18;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #96A59A;
  --sidebar-text-muted: #647368;
  --sidebar-text-bright: #F0F4F1;
  --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
  --sidebar-hover-text: #FFFFFF;
  --sidebar-active-bg: #4F8B70;
  --sidebar-active-text: #FFFFFF;
  --sidebar-active-icon: #FFFFFF;
  --sidebar-active-border: transparent;
  --sidebar-indicator: #4F8B70;

  --color-primary: #4F8B70;
  --color-primary-hover: #5DA585;
  --color-primary-soft: rgba(79, 139, 112, 0.18);
  --color-primary-border: rgba(79, 139, 112, 0.35);
  --color-primary-text: #FFFFFF;

  --color-input-bg: #161D18;

  --pastel-mint: rgba(52, 117, 83, 0.25);
  --pastel-mint-text: #8FD4AB;
  --pastel-blue: rgba(65, 108, 153, 0.25);
  --pastel-blue-text: #9DC4F0;
  --pastel-pink: rgba(184, 74, 82, 0.25);
  --pastel-pink-text: #F7A8AE;
  --pastel-yellow: rgba(147, 107, 34, 0.25);
  --pastel-yellow-text: #FAD48E;
  --pastel-lavender: rgba(109, 85, 166, 0.25);
  --pastel-lavender-text: #C4B5FD;

  --color-success-light: rgba(52, 117, 83, 0.22);
  --color-success-border: rgba(52, 117, 83, 0.4);
  --color-success-text: #8FD4AB;

  --color-warning-light: rgba(147, 107, 34, 0.22);
  --color-warning-border: rgba(147, 107, 34, 0.4);
  --color-warning-text: #FAD48E;

  --color-danger-light: rgba(184, 74, 82, 0.22);
  --color-danger-border: rgba(184, 74, 82, 0.4);
  --color-danger-text: #F7A8AE;

  --color-info-light: rgba(65, 108, 153, 0.22);
  --color-info-border: rgba(65, 108, 153, 0.4);
  --color-info-text: #9DC4F0;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #141A16;
    --color-surface: #1B221E;
    --color-surface-subtle: #222B26;
    --color-surface-raised: #252F29;
    --color-surface-hover: #232C27;
    --color-overlay: rgba(10, 14, 12, 0.75);

    --color-text-primary: #F0F4F1;
    --color-text-secondary: #A6B4AA;
    --color-text-muted: #7E8D82;
    --color-text-subtle: #5C6A60;
    --color-text-placeholder: #5C6A60;

    --color-border: #28332B;
    --color-border-subtle: #1F2722;
    --color-border-strong: #37463C;
    --color-border-focus: #4F8B70;

    --sidebar-bg: #111613;
    --sidebar-surface: #161D18;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #96A59A;
    --sidebar-text-muted: #647368;
    --sidebar-text-bright: #F0F4F1;
    --sidebar-hover-bg: rgba(255, 255, 255, 0.06);
    --sidebar-hover-text: #FFFFFF;
    --sidebar-active-bg: #4F8B70;
    --sidebar-active-text: #FFFFFF;
    --sidebar-active-icon: #FFFFFF;
    --sidebar-active-border: transparent;
    --sidebar-indicator: #4F8B70;

    --color-primary: #4F8B70;
    --color-primary-hover: #5DA585;
    --color-primary-soft: rgba(79, 139, 112, 0.18);
    --color-primary-border: rgba(79, 139, 112, 0.35);
    --color-primary-text: #FFFFFF;

    --color-input-bg: #161D18;

    --pastel-mint: rgba(52, 117, 83, 0.25);
    --pastel-mint-text: #8FD4AB;
    --pastel-blue: rgba(65, 108, 153, 0.25);
    --pastel-blue-text: #9DC4F0;
    --pastel-pink: rgba(184, 74, 82, 0.25);
    --pastel-pink-text: #F7A8AE;
    --pastel-yellow: rgba(147, 107, 34, 0.25);
    --pastel-yellow-text: #FAD48E;
    --pastel-lavender: rgba(109, 85, 166, 0.25);
    --pastel-lavender-text: #C4B5FD;

    --color-success-light: rgba(52, 117, 83, 0.22);
    --color-success-border: rgba(52, 117, 83, 0.4);
    --color-success-text: #8FD4AB;

    --color-warning-light: rgba(147, 107, 34, 0.22);
    --color-warning-border: rgba(147, 107, 34, 0.4);
    --color-warning-text: #FAD48E;

    --color-danger-light: rgba(184, 74, 82, 0.22);
    --color-danger-border: rgba(184, 74, 82, 0.4);
    --color-danger-text: #F7A8AE;

    --color-info-light: rgba(65, 108, 153, 0.22);
    --color-info-border: rgba(65, 108, 153, 0.4);
    --color-info-text: #9DC4F0;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
  }
}
/* ----------------------------------------------------------
   2B. USER COLOR THEMES (9 SIGNATURE PALETTES)
   ---------------------------------------------------------- */

/* 1. Emerald Sage (Default) */
[data-color-theme="emerald"],
:root:not([data-color-theme]) {
  --color-primary: #4F8B70;
  --color-primary-hover: #3D745B;
  --color-primary-active: #315F49;
  --color-primary-soft: #E6F1E9;
  --color-primary-border: #CBE2D4;
  --color-border-focus: #4F8B70;
  --color-accent: #4F8B70;
  --color-accent-soft: #E6F1E9;
  --color-accent-border: #CBE2D4;
  --sidebar-active-bg: #4F8B70;
  --sidebar-bg: #1B2420;
  --sidebar-surface: #151D19;
  --sidebar-border: #28362F;
  --sidebar-hover-bg: #23302A;
  --sidebar-glow: rgba(79, 139, 112, 0.4);
}
:root:not([data-theme="dark"])[data-color-theme="emerald"],
:root:not([data-theme="dark"]):not([data-color-theme]) {
  --color-bg: #E7F0EB;
  --color-surface-subtle: #DCE9E2;
}

/* 2. Royal Indigo */
[data-color-theme="indigo"] {
  --color-primary: #4F46E5;
  --color-primary-hover: #4338CA;
  --color-primary-active: #3730A3;
  --color-primary-soft: #EEF2FF;
  --color-primary-border: #C7D2FE;
  --color-border-focus: #4F46E5;
  --color-accent: #4F46E5;
  --color-accent-soft: #EEF2FF;
  --color-accent-border: #C7D2FE;
  --sidebar-active-bg: #4F46E5;
  --sidebar-bg: #141728;
  --sidebar-surface: #0F1220;
  --sidebar-border: #232845;
  --sidebar-hover-bg: #1D213B;
  --sidebar-glow: rgba(79, 70, 229, 0.45);
}
:root:not([data-theme="dark"])[data-color-theme="indigo"] {
  --color-bg: #EDF0F7;
  --color-surface-subtle: #E0E7FF;
}

/* 3. Forest Green */
[data-color-theme="green"] {
  --color-primary: #16A34A;
  --color-primary-hover: #15803D;
  --color-primary-active: #166534;
  --color-primary-soft: #F0FDF4;
  --color-primary-border: #BBF7D0;
  --color-border-focus: #16A34A;
  --color-accent: #16A34A;
  --color-accent-soft: #F0FDF4;
  --color-accent-border: #BBF7D0;
  --sidebar-active-bg: #16A34A;
  --sidebar-bg: #132217;
  --sidebar-surface: #0E1A11;
  --sidebar-border: #203626;
  --sidebar-hover-bg: #1B3021;
  --sidebar-glow: rgba(22, 163, 74, 0.4);
}
:root:not([data-theme="dark"])[data-color-theme="green"] {
  --color-bg: #EAF5ED;
  --color-surface-subtle: #DCFCE7;
}

/* 4. Ocean Blue */
[data-color-theme="ocean"] {
  --color-primary: #0284C7;
  --color-primary-hover: #0369A1;
  --color-primary-active: #075985;
  --color-primary-soft: #F0F9FF;
  --color-primary-border: #BAE6FD;
  --color-border-focus: #0284C7;
  --color-accent: #0284C7;
  --color-accent-soft: #F0F9FF;
  --color-accent-border: #BAE6FD;
  --sidebar-active-bg: #0284C7;
  --sidebar-bg: #0F1F2D;
  --sidebar-surface: #0B1722;
  --sidebar-border: #1C3349;
  --sidebar-hover-bg: #162B3E;
  --sidebar-glow: rgba(2, 132, 199, 0.45);
}
:root:not([data-theme="dark"])[data-color-theme="ocean"] {
  --color-bg: #EBF3F9;
  --color-surface-subtle: #E0F2FE;
}

/* 5. Amber Copper */
[data-color-theme="amber"] {
  --color-primary: #D97706;
  --color-primary-hover: #B45309;
  --color-primary-active: #92400E;
  --color-primary-soft: #FFFBEB;
  --color-primary-border: #FDE68A;
  --color-border-focus: #D97706;
  --color-accent: #D97706;
  --color-accent-soft: #FFFBEB;
  --color-accent-border: #FDE68A;
  --sidebar-active-bg: #D97706;
  --sidebar-bg: #231B12;
  --sidebar-surface: #1B150D;
  --sidebar-border: #3A2D1F;
  --sidebar-hover-bg: #302519;
  --sidebar-glow: rgba(217, 119, 6, 0.4);
}
:root:not([data-theme="dark"])[data-color-theme="amber"] {
  --color-bg: #FAF4EB;
  --color-surface-subtle: #FEF3C7;
}

/* 6. Rose Crimson */
[data-color-theme="rose"] {
  --color-primary: #E11D48;
  --color-primary-hover: #BE123C;
  --color-primary-active: #9F1239;
  --color-primary-soft: #FFF1F2;
  --color-primary-border: #FECDD3;
  --color-border-focus: #E11D48;
  --color-accent: #E11D48;
  --color-accent-soft: #FFF1F2;
  --color-accent-border: #FECDD3;
  --sidebar-active-bg: #E11D48;
  --sidebar-bg: #251319;
  --sidebar-surface: #1D0E13;
  --sidebar-border: #3E1E28;
  --sidebar-hover-bg: #341A23;
  --sidebar-glow: rgba(225, 29, 72, 0.4);
}
:root:not([data-theme="dark"])[data-color-theme="rose"] {
  --color-bg: #FBF1F3;
  --color-surface-subtle: #FFE4E6;
}

/* 7. Slate Steel */
[data-color-theme="slate"] {
  --color-primary: #475569;
  --color-primary-hover: #334155;
  --color-primary-active: #1E293B;
  --color-primary-soft: #F1F5F9;
  --color-primary-border: #CBD5E1;
  --color-border-focus: #475569;
  --color-accent: #475569;
  --color-accent-soft: #F1F5F9;
  --color-accent-border: #CBD5E1;
  --sidebar-active-bg: #475569;
  --sidebar-bg: #171E27;
  --sidebar-surface: #11171E;
  --sidebar-border: #26313F;
  --sidebar-hover-bg: #1F2834;
  --sidebar-glow: rgba(71, 85, 105, 0.4);
}
:root:not([data-theme="dark"])[data-color-theme="slate"] {
  --color-bg: #EFF2F5;
  --color-surface-subtle: #E2E8F0;
}

/* 8. Royal Purple */
[data-color-theme="purple"] {
  --color-primary: #9333EA;
  --color-primary-hover: #7E22CE;
  --color-primary-active: #6B21A8;
  --color-primary-soft: #FAF5FF;
  --color-primary-border: #E9D5FF;
  --color-border-focus: #9333EA;
  --color-accent: #9333EA;
  --color-accent-soft: #FAF5FF;
  --color-accent-border: #E9D5FF;
  --sidebar-active-bg: #9333EA;
  --sidebar-bg: #1F122A;
  --sidebar-surface: #180D21;
  --sidebar-border: #341E47;
  --sidebar-hover-bg: #2B183B;
  --sidebar-glow: rgba(147, 51, 234, 0.45);
}
:root:not([data-theme="dark"])[data-color-theme="purple"] {
  --color-bg: #F6F1FB;
  --color-surface-subtle: #F3E8FF;
}

/* 9. Teal Cyan */
[data-color-theme="teal"] {
  --color-primary: #0D9488;
  --color-primary-hover: #0F766E;
  --color-primary-active: #115E59;
  --color-primary-soft: #F0FDFA;
  --color-primary-border: #99F6E4;
  --color-border-focus: #0D9488;
  --color-accent: #0D9488;
  --color-accent-soft: #F0FDFA;
  --color-accent-border: #99F6E4;
  --sidebar-active-bg: #0D9488;
  --sidebar-bg: #0F2222;
  --sidebar-surface: #0B1A1A;
  --sidebar-border: #1C3838;
  --sidebar-hover-bg: #162E2E;
  --sidebar-glow: rgba(13, 148, 136, 0.4);
}
:root:not([data-theme="dark"])[data-color-theme="teal"] {
  --color-bg: #E8F5F4;
  --color-surface-subtle: #CCFBF1;
}

/* Dark Mode Adjustments for Color Themes */
[data-theme="dark"][data-color-theme] {
  --color-primary-soft: rgba(255, 255, 255, 0.08);
  --color-primary-border: rgba(255, 255, 255, 0.16);
  --color-accent-soft: rgba(255, 255, 255, 0.08);
  --color-accent-border: rgba(255, 255, 255, 0.16);
}

/* ----------------------------------------------------------
   3. BASE & RESET (ZERO FLICKER INITIAL RENDER)
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: #F8FAFC;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html[data-theme="dark"], body[data-theme="dark"] {
  background-color: #0B0F19;
}

body {
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Client Bottom-Left Launcher & Full Sidebar Flyout Shell */
html .app-sidebar {
  width: 254px;
}
html .app-main {
  margin-left: 0;
  width: 100%;
}

/* Tabular numbers for financial and date precision */
.tnum, .tabular-nums, .stat-value, .cell-value, .ref-code, .amount-cell {
  font-variant-numeric: tabular-nums;
  -webkit-font-feature-settings: "tnum";
  font-feature-settings: "tnum";
}

/* Reference Codes & Badges */
.ref-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  background: var(--color-surface-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ref-code .copy-btn {
  cursor: pointer;
  color: var(--color-text-subtle);
  font-size: 10px;
  transition: color var(--transition-fast);
}

.ref-code .copy-btn:hover {
  color: var(--color-primary);
}

/* ----------------------------------------------------------
   4. APP SHELL & LAYOUT
   ---------------------------------------------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background-color: var(--color-bg);
}

/* ----------------------------------------------------------
   5. FLOATING BOTTOM-LEFT MENU LAUNCHER & FLYOUT SIDEBAR
   ---------------------------------------------------------- */
.client-launcher-wrapper {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 990;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-menu-launcher {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background-color: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 200ms ease, background-color 200ms ease, border-color 200ms ease;
  outline: none;
  padding: 0;
}

.client-menu-launcher:hover {
  transform: scale(1.1);
  background-color: var(--sidebar-hover-bg);
  border-color: var(--color-primary);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45), 0 0 16px var(--sidebar-glow);
}

.client-menu-launcher i {
  font-size: 16px;
  color: #FFFFFF;
  transition: color 150ms ease;
}

.client-menu-launcher:hover i {
  color: var(--color-primary);
}

.launcher-online-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-primary);
  border: 2px solid var(--sidebar-bg);
  box-shadow: 0 0 6px var(--color-primary);
}

/* Flyout Sidebar (Hidden by default, reveals on hover or click) */
.app-sidebar {
  position: fixed;
  top: 14px;
  left: 14px;
  bottom: 14px;
  height: calc(100vh - 28px);
  height: calc(100dvh - 28px);
  width: 254px;
  background-color: var(--sidebar-bg);
  border-radius: 24px;
  border: 1px solid var(--sidebar-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateX(-24px) scale(0.96);
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1), visibility 220ms, background-color 200ms ease, border-color 200ms ease;
  user-select: none;
}

/* Open / Hover state */
.client-launcher-wrapper:hover ~ .app-sidebar,
.app-sidebar:hover,
.app-sidebar.flyout-open,
.app-sidebar.open {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  transform: translateX(0) scale(1) !important;
}

/* Brand area in flyout sidebar */
.sidebar-brand {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background-color: transparent;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  gap: 10px;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  flex: 1;
  padding: 0;
  box-sizing: border-box;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 10px var(--sidebar-glow);
  transition: background 200ms ease, box-shadow 200ms ease;
}

.brand-text-wrap {
  display: flex !important;
  opacity: 1 !important;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  max-width: 170px;
  transform: none !important;
}

.brand-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.brand-subtitle {
  font-size: 9px;
  color: var(--color-primary, #4F8B70);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.sidebar-collapse-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #8A968F;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  margin-left: auto;
  transition: all 150ms ease;
}

.sidebar-collapse-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

/* Navigation List in flyout */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
  box-sizing: border-box;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.nav-section-title {
  display: block !important;
  opacity: 1 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #8A968F !important;
  padding: 0 12px !important;
  margin-top: 14px !important;
  margin-bottom: 4px !important;
  user-select: none;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  height: auto;
  min-height: 38px;
  padding: 9px 12px;
  margin: 0;
  color: #8A968F;
  text-decoration: none;
  position: relative;
  box-sizing: border-box;
  flex-shrink: 0;
  border-radius: 8px;
  transition: background-color 150ms ease, color 150ms ease;
}

.nav-link-custom i {
  font-size: 14px;
  width: 18px;
  min-width: 18px;
  text-align: center;
  color: #8A968F;
  flex-shrink: 0;
  transition: color 150ms ease;
}

.nav-link-custom span {
  display: inline-block !important;
  opacity: 1 !important;
  font-size: 13px;
  white-space: nowrap;
}

.nav-link-badge {
  display: inline-block !important;
  opacity: 1 !important;
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.nav-link-custom:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.nav-link-custom:hover i {
  color: var(--color-primary);
}

/* Active navigation item */
.nav-link-custom.active {
  background-color: var(--sidebar-active-bg, var(--color-primary)) !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px var(--sidebar-glow) !important;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.nav-link-custom.active i {
  color: #FFFFFF !important;
}

/* Footer in flyout */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: transparent;
  flex-shrink: 0;
}

.sidebar-plan-badge {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
  margin-bottom: 8px;
  gap: 8px;
}

.sidebar-plan-compact-icon {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #f59e0b;
  flex-shrink: 0;
}

.sidebar-plan-info {
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.sidebar-plan-info .plan-label {
  font-size: 8.5px !important;
  color: #A0ADA5 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-weight: 700 !important;
}

.sidebar-plan-info .plan-name {
  font-size: 11px !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.status-pill {
  display: inline-flex !important;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.btn-renew-sidebar {
  display: flex !important;
}

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px;
  width: 100%;
  height: auto;
  gap: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none !important;
  color: #FFFFFF !important;
  position: relative;
  transition: background-color 150ms ease;
}

.sidebar-user:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2E3731;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: relative;
}

.sidebar-user-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--sidebar-bg);
  box-shadow: 0 0 4px var(--color-primary);
}

.sidebar-user-info {
  display: flex !important;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.sidebar-user-name {
  color: #FFFFFF !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3 !important;
}

.sidebar-user-role {
  color: #8A968F !important;
  font-size: 11px !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-chevron {
  display: block !important;
  color: #8A968F !important;
}

/* ----------------------------------------------------------
   6. MAIN WORKSPACE & FLOATING HEADER
   ---------------------------------------------------------- */
.app-main {
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg);
  margin-left: 0;
  width: 100%;
  overflow-x: clip;
  transition: margin-left 260ms cubic-bezier(0.16, 1, 0.3, 1), width 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-header {
  height: 58px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 22px;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 14px;
  z-index: 800;
  margin: 14px 20px 0 20px;
  width: calc(100% - 40px);
  max-width: calc(100% - 40px);
  box-sizing: border-box;
  gap: 12px;
  transition: all var(--transition-fast);
}

.app-header::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background-color: var(--color-bg);
  pointer-events: none;
}

[data-theme="dark"] .app-header {
  background-color: rgba(32, 38, 34, 0.95);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-action-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 13.5px;
  transition: all var(--transition-fast);
  outline: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.header-action-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-primary);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.header-action-btn:active {
  transform: translateY(0);
  background: var(--color-surface-subtle);
}

.header-action-btn:focus-visible {
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 2px var(--color-primary-soft);
}

.header-search {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  height: 36px;
  padding: 0 12px;
  gap: 8px;
  cursor: pointer;
  width: 175px;
  max-width: 200px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  flex-shrink: 0;
  box-sizing: border-box;
}

.header-search:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.header-search i {
  color: var(--color-text-muted);
  font-size: 12.5px;
  flex-shrink: 0;
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12.5px;
  color: var(--color-text-primary);
  flex: 1;
  min-width: 0;
  cursor: pointer;
  padding: 0;
  height: 100%;
}

.header-search-shortcut {
  font-size: 10px;
  font-weight: 700;
  font-family: inherit;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 2px 5px;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* Center Floating Pill Navigation (Reference Screenshot Inspired) */
.header-pill-nav {
  display: inline-flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  height: 38px;
  padding: 3px;
  gap: 3px;
  box-shadow: 0 1px 3px rgba(32, 39, 34, 0.04);
  flex-shrink: 0;
  box-sizing: border-box;
}

.header-pill-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  box-sizing: border-box;
}

.header-pill-item:hover {
  color: var(--color-text-primary);
  background: var(--color-surface-subtle);
}

.header-pill-item.active {
  background: var(--sidebar-bg, #202622);
  color: #FFFFFF !important;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--sidebar-glow, rgba(32, 39, 34, 0.18));
}

.header-pill-item.active i {
  color: #FFFFFF !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-status-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.header-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  background: var(--pastel-mint);
  color: var(--pastel-mint-text);
  border: 1px solid rgba(52, 117, 83, 0.2);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  box-sizing: border-box;
}

.status-dot-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #347553;
  display: inline-block;
}

.header-date-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  box-sizing: border-box;
}

/* Assistant Quick Action Pill */
.header-assistant-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 6px;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.header-assistant-btn:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
  box-shadow: var(--shadow-sm);
}

.header-assistant-btn .assistant-icon-dot {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

/* Theme Switcher Button - Unified 36px Icon */
.theme-switch-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  padding: 0;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
}

.theme-switch-btn span {
  display: none !important;
}

.theme-switch-btn:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
}

/* Color Theme Picker Dropdown & Swatches (Navbar Pill) */
.color-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.color-picker-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 13.5px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
}

[data-theme="dark"] .color-picker-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
}

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

.active-color-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
  transition: background-color var(--transition-fast);
}

[data-theme="dark"] .active-color-dot {
  border-color: #202622;
}

.color-picker-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 148px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 12px;
  z-index: 1000;
  animation: colorPickerPop 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes colorPickerPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.color-picker-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
  padding-left: 2px;
}

.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
  align-items: center;
}

.color-swatch-item {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms ease;
  position: relative;
}

.color-swatch-item:hover {
  transform: scale(1.15);
}

.color-swatch-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: block;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.color-swatch-item.active .color-swatch-circle {
  box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4.5px var(--swatch-color, #4F8B70);
  transform: scale(0.92);
}

/* Quick Create Button */
.btn-quick-create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: var(--color-primary);
  color: #FFFFFF !important;
  border: none;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 139, 112, 0.35);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.btn-quick-create:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 4px 10px rgba(79, 139, 112, 0.45);
  transform: translateY(-1px);
}

/* Notification Bell - Unified 36px Icon */
.notification-bell-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  font-size: 13.5px;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.notification-bell-btn:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
}

.notification-badge-pill {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-surface);
}

/* Header Dropdowns */
.header-dropdown {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.quick-create-dropdown {
  position: absolute;
  top: 44px;
  right: 0;
  width: 210px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
  z-index: 1000;
}

.quick-create-dropdown.open {
  display: block;
}

.quick-create-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 10px;
  transition: background-color var(--transition-fast);
}

.quick-create-item:hover {
  background: var(--color-surface-subtle);
  color: #123F32;
}

.quick-create-item i {
  font-size: 13px;
  width: 16px;
  color: var(--color-text-muted);
}

/* User Profile Header - Sleek Unified Capsule Pill */
.header-user-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 2px 10px 2px 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-sizing: border-box;
  flex-shrink: 0;
}

.header-user-profile:hover {
  background: #FFFFFF;
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-xs);
}

.header-user-profile .user-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--radius-full);
  background: #191D1B;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  flex-shrink: 0;
}

.header-user-profile .user-info {
  display: flex;
  flex-direction: column;
  max-width: 120px;
}

.header-user-profile .user-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-user-profile .user-role {
  display: none !important;
}

/* Responsive Progressive Disclosure */
@media (max-width: 1600px) {
  .header-status-group {
    display: none !important;
  }
}

@media (max-width: 1350px) {
  .header-user-profile .user-info {
    display: none !important;
  }
}

@media (max-width: 1280px) {
  .header-assistant-btn span:not(.assistant-icon-dot) {
    display: none !important;
  }
  .header-assistant-btn {
    padding: 0 6px !important;
  }
}

@media (max-width: 1180px) {
  .header-pill-nav {
    display: none !important;
  }
}



.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  border-radius: var(--radius-xs);
  text-align: left;
}

.header-dropdown-item:hover {
  background: var(--color-surface-subtle);
}

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

.header-dropdown-item.danger:hover {
  background: var(--color-danger-light);
}

/* SWR Indicator */
.swr-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ----------------------------------------------------------
   7. BREADCRUMBS & PAGE HEADERS
   ---------------------------------------------------------- */
.page-body {
  flex: 1;
  padding: 18px 20px 84px 20px;
  width: 100%;
  box-sizing: border-box;
}

.app-breadcrumbs {
  margin-bottom: 12px;
}

.app-breadcrumbs ol {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
  font-size: 12px;
}

.app-breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.app-breadcrumbs a:hover {
  color: var(--color-primary);
}

.app-breadcrumbs .separator {
  color: var(--color-text-subtle);
  font-size: 9px;
}

.app-breadcrumbs .current {
  color: var(--color-text-primary);
  font-weight: 600;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

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

/* ----------------------------------------------------------
   8. BUTTONS
   ---------------------------------------------------------- */
.btn-crm,
.btn-primary-custom,
.btn-secondary-custom,
.btn-danger-custom,
.btn-crm-primary,
.btn-crm-secondary,
.btn-crm-danger,
.btn-crm-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  line-height: 1.3;
}

.btn-crm-sm {
  padding: 4px 10px;
  font-size: 11.5px;
  border-radius: var(--radius-xs);
}

.btn-crm-lg {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: var(--radius-md);
}

/* Primary Button (Sage Green Pill) */
.btn-primary-custom,
.btn-crm-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-text) !important;
  font-weight: 700;
  border: 1px solid rgba(61, 116, 91, 0.2);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  box-shadow: 0 2px 8px rgba(79, 139, 112, 0.3);
}

.btn-primary-custom:hover,
.btn-crm-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: rgba(61, 116, 91, 0.3);
  color: var(--color-primary-text) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 139, 112, 0.4);
}

.btn-primary-custom:active,
.btn-crm-primary:active {
  background-color: var(--color-primary-active);
  transform: translateY(0);
}

/* Secondary / Outline Button */
.btn-secondary-custom,
.btn-crm-secondary {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  border-radius: var(--radius-full);
  font-weight: 600;
  padding: 8px 16px;
  box-shadow: var(--shadow-xs);
}

.btn-secondary-custom:hover,
.btn-crm-secondary:hover {
  background-color: var(--color-surface-subtle);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
  transform: translateY(-1px);
}

/* Dark Pill Button (Lukana Dark Style) */
.btn-crm-dark {
  background-color: #191D1B;
  color: #FFFFFF !important;
  border: 1px solid #191D1B;
  border-radius: var(--radius-full);
  font-weight: 600;
  padding: 8px 18px;
  transition: all var(--transition-fast);
}

.btn-crm-dark:hover {
  background-color: #2D3330;
  border-color: #2D3330;
  transform: translateY(-1px);
  color: #FFFFFF !important;
}

/* Danger Button */
.btn-danger-custom,
.btn-crm-danger {
  background-color: var(--color-danger);
  color: #FFFFFF;
  border-color: var(--color-danger);
}

.btn-danger-custom:hover,
.btn-crm-danger:hover {
  background-color: #B91C1C;
  border-color: #B91C1C;
  color: #FFFFFF;
}

/* Ghost Button */
.btn-crm-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-text-muted);
}

.btn-crm-ghost:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
}

/* Link Button */
.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font-size: 12.5px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Tab Navigation Component */
.tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--color-primary);
  background: var(--color-surface-subtle);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 700;
  background: var(--color-primary-soft);
}

/* ----------------------------------------------------------
   9. KPI STAT CARDS & ATTENTION CENTER
   ---------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* ----------------------------------------------------------
   9. KPI STAT CARDS & LUKANA DASHBOARD ARCHITECTURE
   ---------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card, .crm-kpi-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.stat-card:hover, .crm-kpi-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border-strong);
}

.stat-card.primary-kpi {
  border-left: 1px solid var(--color-border);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin: 6px 0 4px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-subtext {
  font-size: 11.5px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.stat-badge.success {
  background: var(--color-primary-soft);
  color: #15803D;
}

.stat-badge.warning {
  background: var(--color-warning-light);
  color: var(--color-warning-text);
}

/* ==========================================================
   LUKANA SIGNATURE DASHBOARD COMPONENTS
   ========================================================== */
.lukana-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.lukana-main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  width: 100%;
}

.lukana-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  width: 100%;
}

/* 3-Column Summary Cards Row with Reference Pastel Accents */
.lukana-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.lukana-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: 0 2px 8px rgba(32, 39, 34, 0.04);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

.lukana-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: 0 4px 16px rgba(32, 39, 34, 0.06);
}

/* Distinct Pastel Header Cards (Inspired by Reference Screenshot) */
.lukana-summary-grid .lukana-card:nth-child(1) {
  background: linear-gradient(180deg, rgba(221, 239, 227, 0.55) 0%, #FFFFFF 44%);
  border-top: 3px solid #4F8B70;
}

.lukana-summary-grid .lukana-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(224, 234, 246, 0.6) 0%, #FFFFFF 44%);
  border-top: 3px solid #416C99;
}

.lukana-summary-grid .lukana-card:nth-child(3) {
  background: linear-gradient(180deg, rgba(246, 235, 208, 0.6) 0%, #FFFFFF 44%);
  border-top: 3px solid #936B22;
}

.lukana-summary-grid .lukana-card:nth-child(4) {
  background: linear-gradient(180deg, rgba(246, 225, 230, 0.6) 0%, #FFFFFF 44%);
  border-top: 3px solid #B84A52;
}

[data-theme="dark"] .lukana-summary-grid .lukana-card:nth-child(1) {
  background: linear-gradient(180deg, rgba(79, 139, 112, 0.16) 0%, #1B221E 46%);
}
[data-theme="dark"] .lukana-summary-grid .lukana-card:nth-child(2) {
  background: linear-gradient(180deg, rgba(65, 108, 153, 0.16) 0%, #1B221E 46%);
}
[data-theme="dark"] .lukana-summary-grid .lukana-card:nth-child(3) {
  background: linear-gradient(180deg, rgba(147, 107, 34, 0.16) 0%, #1B221E 46%);
}
[data-theme="dark"] .lukana-summary-grid .lukana-card:nth-child(4) {
  background: linear-gradient(180deg, rgba(184, 74, 82, 0.16) 0%, #1B221E 46%);
}

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

.lukana-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Minimal Dropdown / Select Capsule */
.lukana-select-pill {
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px 24px 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%238A968F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  outline: none;
  transition: border-color var(--transition-fast);
}

.lukana-select-pill:hover {
  border-color: var(--color-border-strong);
}

/* Trend Pill (Reference style) */
.lukana-trend-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}

.lukana-trend-pill.pos {
  background: var(--pastel-mint);
  color: var(--pastel-mint-text);
  border: 1px solid rgba(52, 117, 83, 0.2);
}

.lukana-trend-pill.neg {
  background: var(--pastel-pink);
  color: var(--pastel-pink-text);
  border: 1px solid rgba(184, 74, 82, 0.2);
}

/* Right Rail: Top Feature Card (VISA Card Style) */
.lukana-agency-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.lukana-agency-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.lukana-agency-brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #191D1B;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lukana-agency-account {
  margin: 14px 0 18px;
}

.lukana-agency-sub {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.lukana-agency-code {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.lukana-agency-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lukana-agency-actions .btn-crm-dark,
.lukana-agency-actions .btn-crm-secondary {
  flex: 1;
  text-align: center;
  justify-content: center;
  font-size: 12px;
  padding: 8px 12px;
}

/* Right Rail: Donut Chart Card (Monthly Expense Style) */
.lukana-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.lukana-donut-chart-box {
  width: 140px;
  height: 140px;
  position: relative;
  flex-shrink: 0;
}

.lukana-donut-center-stat {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.lukana-donut-center-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.1;
}

.lukana-donut-center-lbl {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.lukana-donut-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.lukana-donut-legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  gap: 8px;
}

.lukana-donut-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.lukana-donut-legend-name {
  font-weight: 600;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lukana-donut-legend-pct {
  font-weight: 700;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

/* Right Rail: Assistant Card (How Can I Assist You Today?) */
.lukana-assistant-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-xs);
}

.lukana-assistant-greeting {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.lukana-assistant-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--color-text-primary);
  line-height: 1.25;
  margin-bottom: 14px;
}

.lukana-assistant-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.lukana-assistant-tile {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.lukana-assistant-tile:hover {
  background: #FFFFFF;
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.lukana-assistant-tile-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--color-text-primary);
}

.lukana-assistant-tile-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.lukana-assistant-input-box {
  display: flex;
  align-items: center;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lukana-assistant-input-box:hover {
  background: #FFFFFF;
  border-color: var(--color-border-strong);
}

.lukana-assistant-input-box span {
  font-size: 12px;
  color: var(--color-text-muted);
  flex: 1;
}

.lukana-assistant-input-box i {
  color: var(--color-text-muted);
  font-size: 12px;
}

/* Attention Center */
.attention-center {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(245, 158, 11, 0.04) 100%);
  border: 1px solid var(--color-warning-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
}

.attention-center-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-warning-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.attention-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid rgba(217, 119, 6, 0.15);
  font-size: 12.5px;
  color: var(--color-text-primary);
}

.attention-item a {
  font-weight: 600;
  color: var(--color-warning-text);
  text-decoration: none;
  font-size: 12px;
}

.attention-item a:hover {
  text-decoration: underline;
}

/* ----------------------------------------------------------
   10. CARDS, PANELS & SECTIONS
   ---------------------------------------------------------- */
.crm-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.crm-card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background-color: var(--color-surface);
}

.crm-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crm-card-body {
  padding: 18px 20px;
}

/* Information Detail Grid */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 20px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.detail-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.detail-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}

/* Signature High-Impact Hero Card (Financial SaaS Highlight) */
.crm-card-hero {
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 55%, #2563EB 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.28), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .crm-card-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 60%, #1D4ED8 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px -5px rgba(0, 0, 0, 0.6);
}

.crm-card-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.crm-card-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  align-items: center;
}

.crm-card-hero-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.crm-card-hero-val {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #FFFFFF;
}

.crm-card-hero-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.8);
}

.crm-card-hero-progress-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.22);
  margin: 18px 0 10px;
  overflow: hidden;
}

.crm-card-hero-progress-bar {
  height: 100%;
  background: #FFFFFF;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.crm-card-hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.crm-btn-hero-white {
  background: #FFFFFF;
  color: #1D4ED8 !important;
  font-weight: 700;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.crm-btn-hero-white:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: #1E40AF !important;
}

.crm-btn-hero-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
}

.crm-btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
}

/* ----------------------------------------------------------
   11. DATA TABLES & DATA WORKSPACE
   ---------------------------------------------------------- */
.crm-table-container {
  overflow-x: auto;
  position: relative;
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.crm-table thead {
  background-color: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
}

.crm-table th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.crm-table tbody tr {
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-fast);
}

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

.crm-table tbody tr.selected {
  background-color: var(--color-primary-soft);
}

.crm-table td {
  padding: 12px 14px;
  vertical-align: middle;
  color: var(--color-text-primary);
}

/* Row Content Hierarchy */
.cell-primary {
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.cell-secondary {
  font-size: 11.5px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.cell-value {
  font-weight: 700;
  color: var(--color-primary);
}

/* Row Actions Cluster */
.row-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.row-action-btn {
  padding: 4px 8px;
  font-size: 11.5px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.row-action-btn:hover {
  background: var(--color-surface-subtle);
  border-color: var(--color-border-strong);
  color: var(--color-text-primary);
}

/* Contextual Bulk Action Floating Bar */
.bulk-actions-toolbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-secondary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 850;
  transition: transform var(--transition-normal);
  font-size: 13px;
  font-weight: 600;
}

.bulk-actions-toolbar.visible {
  transform: translateX(-50%) translateY(0);
}

.bulk-actions-toolbar .bulk-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

/* ----------------------------------------------------------
   12. FILTER BAR & ACTIVE FILTER CHIPS
   ---------------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.filter-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-surface-subtle);
  border-bottom: 1px solid var(--color-border);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.filter-chip .chip-remove {
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 11px;
}

.filter-chip .chip-remove:hover {
  color: var(--color-danger);
}

.clear-all-filters {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}

.clear-all-filters:hover {
  text-decoration: underline;
}

/* ----------------------------------------------------------
   13. STATUS PILLS & BADGES (CALM, ACCESSIBLE TINTED SYSTEM)
   ---------------------------------------------------------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Success / Active / Approved / Renewed / Settled / Won / Paid */
.status-pill.active,
.status-pill.approved,
.status-pill.success,
.status-pill.renewed,
.status-pill.settled,
.status-pill.won,
.status-pill.paid {
  background-color: var(--color-success-light);
  color: var(--color-success-text);
  border: 1px solid var(--color-success-border);
}
.status-pill.active::before,
.status-pill.approved::before,
.status-pill.success::before,
.status-pill.renewed::before,
.status-pill.settled::before,
.status-pill.won::before,
.status-pill.paid::before {
  background-color: var(--color-success);
}

/* Warning / Under Review / Renewal Due / Pending / Survey */
.status-pill.pending,
.status-pill.under-review,
.status-pill.warning,
.status-pill.renewal-due,
.status-pill.survey {
  background-color: var(--color-warning-light);
  color: var(--color-warning-text);
  border: 1px solid var(--color-warning-border);
}
.status-pill.pending::before,
.status-pill.under-review::before,
.status-pill.warning::before,
.status-pill.renewal-due::before,
.status-pill.survey::before {
  background-color: var(--color-warning);
}

/* Danger / Lapsed / Expired / Rejected / Lost / Cancelled / Unpaid */
.status-pill.lapsed,
.status-pill.inactive,
.status-pill.danger,
.status-pill.rejected,
.status-pill.lost,
.status-pill.cancelled,
.status-pill.unpaid,
.status-pill.expired {
  background-color: var(--color-danger-light);
  color: var(--color-danger-text);
  border: 1px solid var(--color-danger-border);
}
.status-pill.lapsed::before,
.status-pill.inactive::before,
.status-pill.danger::before,
.status-pill.rejected::before,
.status-pill.lost::before,
.status-pill.cancelled::before,
.status-pill.unpaid::before,
.status-pill.expired::before {
  background-color: var(--color-danger);
}

/* Info / Lead / Documents / Processing */
.status-pill.info,
.status-pill.lead,
.status-pill.processing {
  background-color: var(--color-info-light);
  color: var(--color-info-text);
  border: 1px solid var(--color-info-border);
}
.status-pill.info::before,
.status-pill.lead::before,
.status-pill.processing::before {
  background-color: var(--color-info);
}
/* ----------------------------------------------------------
   14. FORMS & INPUT CONTROLS
   ---------------------------------------------------------- */
.form-section {
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-section:hover {
  border-color: var(--color-border-strong);
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title i {
  color: var(--color-primary);
  font-size: 13.5px;
}

.form-section-subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

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

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

.form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.form-group-custom,
.form-group-crm,
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label-custom,
.form-label,
.form-label-crm {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.form-label-custom .required-star,
.form-label .required-star,
.form-label-crm .required-star {
  color: var(--color-danger);
}

.form-input-custom,
.form-select-custom,
.form-select-crm,
.form-control-crm,
.form-control,
textarea.form-input-custom,
textarea.form-control-crm,
select.form-control-crm,
select.form-select-crm {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8.5px 12px;
  outline: none;
  line-height: 1.4;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

textarea.form-input-custom,
textarea.form-control-crm {
  height: auto;
  min-height: 68px;
}

.form-input-custom:focus,
.form-select-custom:focus,
.form-select-crm:focus,
.form-control-crm:focus,
.form-control:focus,
textarea.form-input-custom:focus,
textarea.form-control-crm:focus,
select.form-control-crm:focus,
select.form-select-crm:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
  background-color: var(--color-surface);
}

.form-input-custom[readonly],
.form-control-crm[readonly],
.form-select-custom[disabled],
.form-select-crm[disabled],
.form-control-crm[disabled] {
  background-color: var(--color-surface-subtle);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* Input Addon Groups (₹ Currency Prefix, % Suffix) */
.input-group-custom {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-addon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.input-addon.prefix {
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-addon.suffix {
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-group-custom .form-input-custom {
  border-radius: 0;
}

.input-group-custom .form-input-custom:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group-custom .form-input-custom:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Drag & Drop File Upload Zone */
.file-upload-zone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  background: var(--color-surface-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.file-upload-zone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
}

.file-upload-icon {
  font-size: 24px;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.file-upload-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.file-upload-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ----------------------------------------------------------
   15. MODALS & SLIDE-OVER DRAWERS
   ---------------------------------------------------------- */
.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
  animation: modalFadeIn 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .modal-backdrop-custom {
  background: rgba(2, 6, 23, 0.82);
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-backdrop-custom.active {
  display: flex;
}

.modal-dialog-custom {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 220ms cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.modal-header-custom {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title-custom {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-custom {
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 16px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close-custom:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger);
  border-color: var(--color-danger-soft-border);
  transform: rotate(90deg);
}

.modal-footer-custom {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: var(--color-surface);
  position: sticky;
  bottom: 0;
  z-index: 10;
}

/* Slide-Over Drawer */
.crm-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.crm-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.crm-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-xl);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.crm-drawer-backdrop.open .crm-drawer {
  transform: translateX(0);
}

/* ----------------------------------------------------------
   16. COMMAND PALETTE (CTRL+K)
   ---------------------------------------------------------- */
.command-palette-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.command-palette-backdrop.open {
  display: flex;
}

.command-palette {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 580px;
  overflow: hidden;
  animation: scaleUp var(--transition-fast) ease-out;
}

.command-palette-input-wrap {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
}

.command-palette-input-wrap i {
  color: var(--color-primary);
  font-size: 15px;
}

.command-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--color-text-primary);
  font-family: var(--font-sans);
}

.command-palette-shortcut {
  font-size: 10px;
  font-weight: 700;
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--color-text-muted);
}

.command-palette-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}

.command-palette-group-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 8px 10px 4px;
}

.command-palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
}

.command-palette-item i {
  color: var(--color-text-muted);
  font-size: 13px;
  width: 18px;
  text-align: center;
}

.command-palette-item:hover,
.command-palette-item.highlighted {
  background-color: var(--color-primary-soft);
  color: var(--color-primary-text);
}

.command-palette-item:hover i,
.command-palette-item.highlighted i {
  color: var(--color-primary);
}

.command-palette-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.command-palette-footer {
  padding: 8px 16px;
  background: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.command-palette-footer kbd {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ----------------------------------------------------------
   17. EMPTY STATES, SKELETON LOADERS & TOASTS
   ---------------------------------------------------------- */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-full);
  background: var(--color-surface-subtle);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.empty-state-text {
  font-size: 12.5px;
  color: var(--color-text-muted);
  max-width: 360px;
  margin-bottom: 16px;
}

/* Skeleton Loading Shimmer */
.skeleton-box {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-surface-subtle) 25%, var(--color-border) 50%, var(--color-surface-subtle) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-xs);
}

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

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  min-width: 240px;
  animation: slideInRight var(--transition-fast) ease-out;
}

.toast.success {
  border-left: 4px solid var(--color-success);
}

.toast.error {
  border-left: 4px solid var(--color-danger);
}

.toast.info {
  border-left: 4px solid var(--color-info);
}

.toast.warning {
  border-left: 4px solid var(--color-warning);
}

/* ----------------------------------------------------------
   18. TIMELINES & ACTIVITY FEEDS
   ---------------------------------------------------------- */
.crm-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 24px;
}

.crm-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -24px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
}

.timeline-content {
  background: var(--color-surface-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1px solid var(--color-border);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.timeline-time {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.timeline-desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

/* Horizontal Workflow Stepper (Claims & Multi-Stage Pipelines) */
.workflow-stepper-wrap {
  position: relative;
  padding: 12px 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.workflow-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin-top: 10px;
}

.workflow-stepper-line {
  position: absolute;
  top: 15px;
  left: 36px;
  right: 36px;
  height: 3px;
  background: var(--color-border);
  z-index: 1;
  border-radius: var(--radius-full);
}

.workflow-stepper-progress {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
  text-align: center;
}

.workflow-step-node {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
}

.workflow-step.completed .workflow-step-node {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.workflow-step.active .workflow-step-node {
  background: var(--color-surface);
  border: 3px solid var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.workflow-step-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 8px;
  line-height: 1.3;
}

.workflow-step.completed .workflow-step-label {
  color: var(--color-primary);
  font-weight: 600;
}

.workflow-step.active .workflow-step-label {
  color: var(--color-text-primary);
  font-weight: 700;
}

.workflow-step-subtext {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ----------------------------------------------------------
   19. ANIMATIONS & KEYFRAMES
   ---------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ----------------------------------------------------------
   20. RESPONSIVE BREAKPOINTS (320px, 768px, 1024px, 1440px)
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .app-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 260px !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
  }

  .app-sidebar.open {
    transform: translateX(0) !important;
  }

  /* Make sure drawer displays brand, section titles, full labels and user details */
  .app-sidebar .brand-text-wrap,
  .app-sidebar .brand-title,
  .app-sidebar .brand-subtitle,
  .app-sidebar .nav-link-custom span,
  .app-sidebar .nav-link-badge,
  .app-sidebar .sidebar-plan-info,
  .app-sidebar .sidebar-user-info,
  .app-sidebar .btn-renew-sidebar,
  .app-sidebar .sidebar-user-chevron,
  .app-sidebar .nav-section-title {
    display: block !important;
  }

  .app-sidebar .sidebar-brand {
    justify-content: space-between !important;
    padding: 0 14px !important;
    height: var(--header-height) !important;
  }

  .app-sidebar .sidebar-brand-link {
    justify-content: flex-start !important;
    gap: 10px !important;
  }

  .app-sidebar .sidebar-collapse-btn {
    display: flex !important;
  }

  .app-sidebar .sidebar-nav {
    padding: 10px 10px !important;
    align-items: stretch !important;
    gap: 3px !important;
  }

  .app-sidebar .nav-link-custom {
    width: 100% !important;
    height: auto !important;
    min-height: 38px !important;
    justify-content: flex-start !important;
    padding: 9px 12px !important;
    gap: 12px !important;
    margin: 0 !important;
  }

  .app-sidebar .nav-link-custom i {
    width: 18px !important;
    min-width: 18px !important;
    font-size: 14px !important;
  }

  .app-sidebar .sidebar-footer {
    padding: 12px 10px !important;
    align-items: stretch !important;
  }

  .app-sidebar .sidebar-plan-badge {
    width: 100% !important;
    height: auto !important;
    justify-content: space-between !important;
    padding: 8px 12px !important;
    margin: 0 0 8px 0 !important;
  }

  .app-sidebar .sidebar-user {
    width: 100% !important;
    height: auto !important;
    justify-content: flex-start !important;
    padding: 6px 8px !important;
    margin: 0 !important;
  }

  .app-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .app-header {
    margin: 10px 10px 0 10px !important;
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    top: 10px !important;
    border-radius: 16px !important;
  }

  .app-header::before {
    top: -10px !important;
    height: 10px !important;
  }

  .page-body {
    padding: 14px 10px 24px 10px !important;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-overlay);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.open {
    display: block;
  }

  #sidebarToggleBtn {
    display: flex !important;
  }

  .header-user-profile .user-info {
    display: none !important;
  }
  .header-assistant-btn span:not(.assistant-icon-dot) {
    display: none !important;
  }
  .header-assistant-btn {
    padding: 5px !important;
  }
}

@media (max-width: 768px) {
  .page-body {
    padding: 16px;
  }

  .form-grid-2, .form-grid-3, .form-grid-4 {
    grid-template-columns: 1fr !important;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-left {
    flex: 0 0 auto;
  }
  .header-search {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    padding: 0 12px !important;
    gap: 6px !important;
    border-radius: var(--radius-full) !important;
    box-sizing: border-box !important;
  }
  .header-search i {
    font-size: 13px !important;
    color: var(--color-text-muted);
  }
  .header-search input {
    width: 100px !important;
    min-width: 0 !important;
    font-size: 12px !important;
  }
  .header-search-shortcut {
    display: none !important;
  }
  .header-assistant-btn {
    display: none !important;
  }
  .btn-quick-create span {
    display: none !important;
  }
  .btn-quick-create {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    justify-content: center !important;
  }
  .app-header {
    padding: 0 12px !important;
    gap: 10px !important;
  }
  .header-actions {
    gap: 8px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
  .color-picker-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
  }
  .color-picker-dropdown {
    right: -24px !important;
    max-width: calc(100vw - 30px) !important;
  }
}

@media (max-width: 480px) {
  .header-search {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }
  .header-search input {
    display: none !important;
  }
  .app-header {
    padding: 0 10px !important;
    gap: 8px !important;
  }
  .header-actions {
    gap: 6px !important;
  }
  .header-user-profile {
    padding: 2px !important;
    gap: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    justify-content: center !important;
    border-radius: 50% !important;
  }
  .header-user-profile .user-info,
  .header-user-profile i.fa-chevron-down {
    display: none !important;
  }
  .color-picker-dropdown {
    right: -32px !important;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-actions {
    justify-content: flex-start;
  }
}

/* Period & Date Quick Filter State */
.period-btn,
.date-filter-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.period-btn.active,
.date-filter-btn.active {
  background: var(--color-primary) !important;
  color: #123F32 !important;
  font-weight: 700 !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 6px rgba(163, 230, 107, 0.45) !important;
}

/* Core Utility Spacing Classes */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mb-5 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 4px !important; }
.p-2 { padding: 8px !important; }
.p-3 { padding: 16px !important; }
.p-4 { padding: 24px !important; }

/* Tabular Numbers Utility */
.tnum,
.tabular-nums {
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1 !important;
}

/* ----------------------------------------------------------
   GORGEOUS MICRO-DIVIDERS & DOCK ACCENTS (COLLAPSED SIDEBAR)
   ---------------------------------------------------------- */
.sidebar-plan-compact-icon {
  display: none;
  font-size: 13.5px;
  color: #f59e0b;
  position: relative;
  transition: transform 0.2s ease;
}

.sidebar-plan-compact-icon .plan-status-dot {
  position: absolute;
  top: -2px;
  right: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}



/* ----------------------------------------------------------
   LUKANA RESPONSIVE MEDIA QUERIES
   ---------------------------------------------------------- */
@media (max-width: 1280px) {
  .lukana-grid {
    grid-template-columns: 1fr;
  }
  .lukana-side-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .lukana-summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lukana-side-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .lukana-summary-grid {
    grid-template-columns: 1fr;
  }
  .lukana-card {
    padding: 16px;
  }
  .lukana-agency-card,
  .lukana-assistant-card {
    padding: 16px;
  }
  .page-body {
    padding: 14px;
  }
}


