/* ============================================================
   ALPHAVAULT CRM DASHBOARD — crm-dashboard.css v2.0
   ULTRA PRO / MINIMALIST — 100% aligné sur checkout.css / im-*.css
   Design monochrome "ink" — zéro dégradé coloré, institutionnel
   ============================================================ */

   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

   *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   html, body { height: 100%; overflow: hidden; }
   html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
   
   /* ════════════════════════════════════════════════════════════
      1. CSS VARIABLES — LIGHT MODE (default)
   ════════════════════════════════════════════════════════════ */
   :root {
       --crm-ink:            #0a0a0a;
       --crm-ink-soft:       #404040;
       --crm-text-muted:     #737373;
       --crm-text-faint:     #a3a3a3;
       --crm-border:         #e5e5e5;
       --crm-border-soft:    #f5f5f5;
       --crm-bg:             #fafafa;
       --crm-surface:        #ffffff;
       --crm-surface-hover:  #fafafa;
       --crm-card:           #ffffff;
       --crm-sidebar-bg:     #ffffff;
       --crm-header-bg:      rgba(255,255,255,0.97);
       --crm-input-bg:       #ffffff;
   
       --crm-border-hover:   #d4d4d4;
   
       --crm-text:           #0a0a0a;
       --crm-text-inverse:   #ffffff;
   
       --crm-success:        #16a34a;
       --crm-success-bg:     #f0fdf4;
       --crm-danger:         #dc2626;
       --crm-danger-bg:      #fef2f2;
   
       /* Compat rétro — tout pointe vers l'ink monochrome */
       --crm-primary:        #0a0a0a;
       --crm-primary-dark:   #262626;
       --crm-green:          #16a34a;
       --crm-amber:          #0a0a0a;
       --crm-red:            #dc2626;
       --crm-purple:         #0a0a0a;
       --crm-cyan:           #0a0a0a;
       --crm-orange:         #0a0a0a;
   
       --crm-radius:         6px;
       --crm-radius-lg:      10px;
       --crm-radius-xl:      12px;
   
       --crm-shadow:         0 1px 3px rgba(0,0,0,0.04);
       --crm-shadow-lg:      0 4px 12px rgba(0,0,0,0.06);
       --crm-shadow-xl:      0 12px 32px rgba(0,0,0,0.10);
   
       --crm-sidebar-w:      252px;
       --crm-header-h:       56px;
   
       --crm-transition:     0.15s ease;
   }
   
   /* ── Dark mode overrides ──────────────────────────────────── */
   body.crm-dark-mode {
       --crm-ink:            #fafafa;
       --crm-ink-soft:       #d4d4d4;
       --crm-text-muted:     #a3a3a3;
       --crm-text-faint:     #737373;
       --crm-border:         #262626;
       --crm-border-soft:    #171717;
       --crm-bg:             #0a0a0a;
       --crm-surface:        #141414;
       --crm-surface-hover:  #1a1a1a;
       --crm-card:           #0f0f0f;
       --crm-sidebar-bg:     #0a0a0a;
       --crm-header-bg:      rgba(10,10,10,0.97);
       --crm-input-bg:       #141414;
   
       --crm-border-hover:   #404040;
   
       --crm-text:           #fafafa;
       --crm-text-inverse:   #0a0a0a;
   
       --crm-success-bg:     rgba(22,163,74,0.12);
       --crm-danger-bg:      rgba(220,38,38,0.12);
   
       --crm-primary:        #fafafa;
       --crm-primary-dark:   #d4d4d4;
       --crm-green:          #4ade80;
   
       --crm-shadow:         0 1px 3px rgba(0,0,0,0.3);
       --crm-shadow-lg:      0 4px 12px rgba(0,0,0,0.5);
       --crm-shadow-xl:      0 12px 32px rgba(0,0,0,0.6);
   }
   
   /* ════════════════════════════════════════════════════════════
      2. RESET & BASE
   ════════════════════════════════════════════════════════════ */
   body.crm-page {
       font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
       background: var(--crm-bg);
       color: var(--crm-text);
       font-size: 13px;
       -webkit-font-smoothing: antialiased;
       line-height: 1.5;
       transition: background .2s ease, color .2s ease;
   }
   
   a  { color: inherit; text-decoration: none; }
   button { font-family: inherit; cursor: pointer; }
   select option { background: var(--crm-surface); color: var(--crm-text); }
   
   /* ════════════════════════════════════════════════════════════
      3. APP LAYOUT
   ════════════════════════════════════════════════════════════ */
   #crmApp {
       display: flex;
       height: 100vh;
       overflow: hidden;
       position: relative;
   }
   
   /* ════════════════════════════════════════════════════════════
      4. SIDEBAR
   ════════════════════════════════════════════════════════════ */
   #crmSidebar {
       width: var(--crm-sidebar-w);
       flex-shrink: 0;
       background: var(--crm-sidebar-bg);
       border-right: 1px solid var(--crm-border);
       display: flex;
       flex-direction: column;
       height: 100vh;
       overflow: visible;
       position: relative;
       z-index: 200;
       transition: width 0.2s ease, transform 0.25s ease, background .2s ease, border-color .2s ease;
   }
   
   /* ── Collapsed ──────────────────────────────────────────── */
   #crmSidebar.collapsed { width: 68px; }
   
   #crmSidebar.collapsed .crm-nav-item-text,
   #crmSidebar.collapsed .crm-nav-badge,
   #crmSidebar.collapsed .crm-nav-label,
   #crmSidebar.collapsed .crm-new-btn-text,
   #crmSidebar.collapsed .crm-new-chevron,
   #crmSidebar.collapsed .crm-platform-section,
   #crmSidebar.collapsed .crm-nav-divider,
   #crmSidebar.collapsed .crm-sidebar-user-name,
   #crmSidebar.collapsed .crm-sidebar-user-email,
   #crmSidebar.collapsed .crm-sidebar-plan-badge,
   #crmSidebar.collapsed #crmUserChevron,
   #crmSidebar.collapsed .crm-nav-tool-link .crm-nav-item-text { display: none; }
   
   #crmSidebar.collapsed .crm-nav-item      { justify-content: center; padding: 10px; }
   #crmSidebar.collapsed .crm-nav-item-icon { margin: 0; }
   #crmSidebar.collapsed .crm-new-btn       { justify-content: center; padding: 10px; min-width: 0; }
   #crmSidebar.collapsed .crm-nav-tool-link { justify-content: center; padding: 10px; }
   #crmSidebar.collapsed .crm-sidebar-footer{ display: none; }
   
   /* ── Logo ───────────────────────────────────────────────── */
   .crm-sidebar-logo-wrap {
       display: flex;
       align-items: center;
       justify-content: center;
       padding: 18px 16px 14px;
       min-height: 56px;
       text-decoration: none;
       flex-shrink: 0;
       border-bottom: 1px solid var(--crm-border-soft);
   }
   
   .crm-sidebar-logo-text { display: block; height: 22px; max-width: 170px; object-fit: contain; }
   body.crm-dark-mode .crm-sidebar-logo-text { filter: invert(1) brightness(1.8); }
   .crm-sidebar-logo-icon { display: none; height: 28px; width: 28px; object-fit: contain; }
   
   #crmSidebar.collapsed .crm-sidebar-logo-wrap { padding: 18px 6px 14px; gap: 0; }
   #crmSidebar.collapsed .crm-sidebar-logo-text { display: none; }
   #crmSidebar.collapsed .crm-sidebar-logo-icon {
       display: flex; align-items: center; justify-content: center; width: 100%;
   }
   
   /* ── Scroll area ────────────────────────────────────────── */
   .crm-sidebar-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0; scrollbar-width: thin; scrollbar-color: var(--crm-border) transparent; }
   .crm-sidebar-scroll::-webkit-scrollbar { width: 4px; }
   .crm-sidebar-scroll::-webkit-scrollbar-thumb { background: var(--crm-border); border-radius: 4px; }
   
   /* ════════════════════════════════════════════════════════════
      5. SIDEBAR TOGGLE
   ════════════════════════════════════════════════════════════ */
   .crm-sidebar-toggle {
       position: absolute;
       right: -14px;
       top: 50%;
       transform: translateY(-50%);
       width: 26px;
       height: 26px;
       border-radius: 50%;
       background: var(--crm-card-bg, var(--crm-surface));
       border: 1px solid var(--crm-border);
       display: flex;
       align-items: center;
       justify-content: center;
       cursor: pointer;
       color: var(--crm-text-muted);
       font-size: 9px;
       z-index: 300;
       transition: var(--crm-transition);
       box-shadow: var(--crm-shadow-lg);
       flex-shrink: 0;
       user-select: none;
   }
   
   .crm-sidebar-toggle:hover {
       background: var(--crm-ink);
       color: var(--crm-bg);
       border-color: var(--crm-ink);
   }
   
   /* ── Mobile close button ────────────────────────────────── */
   .crm-mobile-close-btn {
       display: none;
       position: absolute;
       top: 12px;
       right: 12px;
       width: 28px;
       height: 28px;
       border-radius: var(--crm-radius);
       background: var(--crm-border-soft);
       border: 1px solid var(--crm-border);
       color: var(--crm-text-muted);
       font-size: 12px;
       cursor: pointer;
       align-items: center;
       justify-content: center;
       z-index: 10;
       transition: var(--crm-transition);
   }
   
   .crm-mobile-close-btn:hover {
       background: var(--crm-danger-bg);
       color: var(--crm-danger);
       border-color: transparent;
   }
   
   /* ════════════════════════════════════════════════════════════
      6. MAIN CONTENT
   ════════════════════════════════════════════════════════════ */
   #crmMain {
       flex: 1;
       display: flex;
       flex-direction: column;
       height: 100vh;
       overflow: hidden;
       min-width: 0;
       transition: margin-left 0.2s ease;
   }
   
   /* ════════════════════════════════════════════════════════════
      7. HEADER
   ════════════════════════════════════════════════════════════ */
   #crmHeader {
       height: var(--crm-header-h);
       background: var(--crm-header-bg);
       border-bottom: 1px solid var(--crm-border);
       display: flex;
       align-items: center;
       gap: 10px;
       padding: 0 20px;
       flex-shrink: 0;
       backdrop-filter: blur(10px);
       -webkit-backdrop-filter: blur(10px);
       position: relative;
       z-index: 100;
   }
   
   /* ── Breadcrumb ─────────────────────────────────────────── */
   .crm-breadcrumb { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
   .crm-breadcrumb-item { font-size: 12px; font-weight: 700; color: var(--crm-text-muted); white-space: nowrap; transition: color 0.15s; }
   .crm-breadcrumb-item.active { color: var(--crm-text); }
   .crm-breadcrumb-sep { font-size: 9px; color: var(--crm-text-faint); }
   
   /* ── Header Search ──────────────────────────────────────── */
   .crm-search-wrap { flex: 1; max-width: 400px; position: relative; display: flex; align-items: center; }
   .crm-search-icon { position: absolute; left: 12px; color: var(--crm-text-faint); font-size: 11px; pointer-events: none; z-index: 1; }
   
   .crm-search-input {
       width: 100%;
       background: var(--crm-input-bg);
       border: 1px solid var(--crm-border);
       border-radius: var(--crm-radius);
       padding: 9px 12px 9px 34px;
       font-family: inherit;
       font-size: 12px;
       color: var(--crm-text);
       outline: none;
       transition: var(--crm-transition);
   }
   
   .crm-search-input::placeholder { color: var(--crm-text-faint); }
   .crm-search-input:focus { border-color: var(--crm-ink); }
   
   /* Search Dropdown */
   .crm-search-dropdown {
       display: none;
       position: absolute;
       top: calc(100% + 8px);
       left: 0;
       right: 0;
       background: var(--crm-surface);
       border: 1px solid var(--crm-border);
       border-radius: var(--crm-radius-lg);
       padding: 6px;
       z-index: 2000;
       box-shadow: var(--crm-shadow-lg);
   }
   
   .crm-search-section-label {
       font-size: 9px;
       font-weight: 800;
       text-transform: uppercase;
       letter-spacing: 1px;
       color: var(--crm-text-faint);
       padding: 4px 10px;
   }
   
   .crm-search-result-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--crm-radius); cursor: pointer; transition: var(--crm-transition); }
   .crm-search-result-item:hover { background: var(--crm-border-soft); }
   
   .crm-search-result-icon {
       width: 28px; height: 28px; border-radius: var(--crm-radius);
       display: flex; align-items: center; justify-content: center; flex-shrink: 0;
       background: var(--crm-border-soft); color: var(--crm-text);
   }
   
   .crm-search-result-name { font-size: 12px; font-weight: 700; color: var(--crm-text); }
   .crm-search-result-sub  { font-size: 10px; color: var(--crm-text-faint); margin-top: 1px; }
   
   /* ── Header Controls ────────────────────────────────────── */
   .crm-header-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
   
   .crm-header-btn {
       display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
       background: var(--crm-input-bg); border: 1px solid var(--crm-border); border-radius: var(--crm-radius);
       font-size: 13px; color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition);
       flex-shrink: 0; position: relative;
   }
   
   .crm-header-btn:hover { background: var(--crm-border-soft); color: var(--crm-text); border-color: var(--crm-ink-soft); }
   
   .crm-header-alert-dot {
       position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; border-radius: 50%;
       background: var(--crm-danger); border: 2px solid var(--crm-header-bg);
       animation: crmPulse 2s ease-in-out infinite;
   }
   
   .crm-theme-toggle {
       width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
       background: var(--crm-input-bg); border: 1px solid var(--crm-border); border-radius: var(--crm-radius);
       cursor: pointer; color: var(--crm-text-muted); font-size: 13px; transition: var(--crm-transition); flex-shrink: 0;
   }
   .crm-theme-toggle:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   
   .crm-status-dot {
       width: 8px; height: 8px; border-radius: 50%; background: var(--crm-success); flex-shrink: 0;
   }
   
   .crm-role-badge {
       font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px;
       background: var(--crm-border-soft); color: var(--crm-text); border: 1px solid var(--crm-border); white-space: nowrap;
   }
   
   .crm-header-avatar {
       width: 34px; height: 34px; border-radius: 50%; background: var(--crm-ink);
       display: flex; align-items: center; justify-content: center; color: var(--crm-bg);
       font-size: 12px; font-weight: 800; cursor: pointer; transition: var(--crm-transition);
       flex-shrink: 0; position: relative; overflow: hidden;
   }
   .crm-header-avatar:hover { opacity: 0.85; }
   .crm-header-avatar-fallback { font-size: 12px; font-weight: 800; color: var(--crm-bg); }
   
   /* Header User Menu */
   .crm-header-user-menu {
       position: absolute; top: calc(var(--crm-header-h) + 4px); right: 16px;
       background: var(--crm-surface); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       padding: 6px; min-width: 210px; z-index: 2000; box-shadow: var(--crm-shadow-lg);
       animation: crmFadeIn 0.15s ease;
   }
   
   .crm-header-user-menu-top { padding: 10px 12px; border-bottom: 1px solid var(--crm-border-soft); margin-bottom: 4px; }
   .crm-header-user-menu-name  { font-size: 13px; font-weight: 800; color: var(--crm-text); }
   .crm-header-user-menu-email { font-size: 10px; color: var(--crm-text-faint); margin-top: 2px; }
   
   .crm-ctx-item {
       display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--crm-radius);
       font-size: 12px; font-weight: 600; color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition);
   }
   .crm-ctx-item:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   .crm-ctx-item.danger { color: var(--crm-danger); }
   .crm-ctx-item.danger:hover { background: var(--crm-danger-bg); }
   .crm-ctx-item i { font-size: 12px; width: 14px; text-align: center; }
   
   /* ════════════════════════════════════════════════════════════
      8. SIDEBAR NAV
   ════════════════════════════════════════════════════════════ */
   .crm-nav { padding: 2px 8px; }
   
   .crm-nav-label {
       padding: 10px 10px 5px;
       font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px;
       color: var(--crm-text-faint);
   }
   
   .crm-nav-item {
       display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--crm-radius);
       cursor: pointer; transition: var(--crm-transition); color: var(--crm-text-muted); text-decoration: none;
       position: relative; margin-bottom: 1px; border: 1px solid transparent;
   }
   
   .crm-nav-item:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   .crm-nav-item.active { background: var(--crm-ink); color: var(--crm-bg); font-weight: 700; }
   .crm-nav-item.active .crm-nav-badge { background: rgba(255,255,255,0.2); color: var(--crm-bg); }
   
   .crm-nav-item-icon { width: 20px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
   .crm-nav-item-text { flex: 1; font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   
   .crm-nav-badge {
       font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 20px;
       background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border);
       min-width: 20px; text-align: center; flex-shrink: 0;
   }
   
   /* Toutes les variantes badge = monochrome sauf success/danger */
   .crm-badge-deal  { background: var(--crm-border-soft); color: var(--crm-text-muted); }
   .crm-badge-green { background: var(--crm-success-bg);  color: var(--crm-success); border-color: transparent; }
   .crm-badge-ai    { background: var(--crm-border-soft); color: var(--crm-text); }
   
   .crm-nav-divider { border: none; border-top: 1px solid var(--crm-border-soft); margin: 8px 10px; }
   
   /* ════════════════════════════════════════════════════════════
      9. PLATFORM NAV
   ════════════════════════════════════════════════════════════ */
   .crm-platform-section { margin-bottom: 1px; }
   
   .crm-platform-folder {
       display: flex; align-items: center; gap: 8px; padding: 8px 10px;
       font-size: 12px; font-weight: 600; color: var(--crm-text-muted); cursor: pointer;
       border-radius: var(--crm-radius); margin: 0 2px; transition: var(--crm-transition);
       position: relative; background: none; border: none; width: calc(100% - 4px); text-align: left;
   }
   .crm-platform-folder:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   .crm-platform-folder i:first-child { font-size: 12px; width: 16px; text-align: center; color: var(--crm-text-muted) !important; }
   
   .crm-arrow { margin-left: auto; font-size: 9px; transition: transform 0.2s; color: var(--crm-text-faint); }
   .crm-platform-folder.open .crm-arrow { transform: rotate(180deg); }
   
   .crm-platform-submenu { display: none; padding: 2px 0; }
   .crm-platform-submenu.open { display: block; }
   
   .crm-platform-link {
       display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 32px;
       font-size: 11px; font-weight: 600; color: var(--crm-text-faint); text-decoration: none;
       border-radius: 8px; margin: 0 2px; transition: var(--crm-transition);
   }
   .crm-platform-link:hover { background: var(--crm-border-soft); color: var(--crm-text-muted); }
   .crm-platform-link i { font-size: 11px; width: 14px; text-align: center; color: var(--crm-text-faint) !important; }
   
   /* ── Nav Tool Links ─────────────────────────────────────── */
   .crm-nav-tool-link {
       display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--crm-radius);
       margin: 1px 2px; text-decoration: none; color: var(--crm-text-muted); font-size: 12px; font-weight: 600;
       transition: var(--crm-transition);
   }
   .crm-nav-tool-link:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   
   .crm-nav-tool-icon {
       width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
       font-size: 11px; flex-shrink: 0; background: var(--crm-border-soft) !important; color: var(--crm-text-muted) !important;
   }
   
   /* ════════════════════════════════════════════════════════════
      10. NEW BUTTON & DROPDOWN
   ════════════════════════════════════════════════════════════ */
   .crm-new-wrap { padding: 10px 10px 6px; position: relative; }
   
   .crm-new-btn {
       width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
       background: var(--crm-ink); border: none; border-radius: var(--crm-radius);
       font-family: inherit; font-size: 13px; font-weight: 700; color: var(--crm-bg); cursor: pointer;
       transition: var(--crm-transition);
   }
   .crm-new-btn:hover { opacity: 0.85; }
   .crm-new-btn-text { flex: 1; text-align: left; }
   
   .crm-new-dropdown {
       display: none; position: absolute; top: calc(100% - 4px); left: 10px; right: 10px;
       background: var(--crm-surface); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       padding: 8px; z-index: 600; box-shadow: var(--crm-shadow-lg); animation: crmFadeIn 0.15s ease;
   }
   .crm-new-dropdown.open { display: block; }
   
   .crm-new-drop-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--crm-radius); cursor: pointer; transition: var(--crm-transition); }
   .crm-new-drop-item:hover { background: var(--crm-border-soft); }
   
   .crm-new-drop-icon {
       width: 36px; height: 36px; border-radius: var(--crm-radius); display: flex; align-items: center;
       justify-content: center; flex-shrink: 0; font-size: 14px;
       background: var(--crm-border-soft) !important; color: var(--crm-text) !important;
   }
   
   .crm-new-drop-title { font-size: 12px; font-weight: 700; color: var(--crm-text); }
   .crm-new-drop-sub   { font-size: 10px; color: var(--crm-text-faint); margin-top: 1px; }
   .crm-new-drop-divider { border: none; border-top: 1px solid var(--crm-border-soft); margin: 4px 0; }
   
   /* ════════════════════════════════════════════════════════════
      11. SIDEBAR FOOTER
   ════════════════════════════════════════════════════════════ */
   .crm-sidebar-footer { border-top: 1px solid var(--crm-border-soft); position: relative; flex-shrink: 0; }
   
   .crm-sidebar-user-trigger { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; transition: var(--crm-transition); }
   .crm-sidebar-user-trigger:hover { background: var(--crm-border-soft); }
   
   .crm-sidebar-user-name { font-size: 12px; font-weight: 700; color: var(--crm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .crm-sidebar-user-email { font-size: 10px; color: var(--crm-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   
   .crm-sidebar-plan-badge {
       font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 20px;
       background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border); flex-shrink: 0;
   }
   
   .crm-sidebar-user-chevron { font-size: 9px; color: var(--crm-text-faint); transition: transform 0.2s; flex-shrink: 0; }
   
   /* Sidebar User Dropdown */
   .crm-sidebar-user-dropdown {
       display: none; position: absolute; bottom: 100%; left: 0; right: 0;
       background: var(--crm-surface); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       padding: 8px; margin: 0 8px 6px; box-shadow: var(--crm-shadow-lg); z-index: 1000; animation: crmFadeIn 0.15s ease;
   }
   .crm-sidebar-user-dropdown.open { display: block; }
   
   .crm-sidebar-dropdown-header { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--crm-border-soft); margin-bottom: 6px; }
   .crm-dropdown-name  { font-size: 12px; font-weight: 700; color: var(--crm-text); }
   .crm-dropdown-email { font-size: 10px; color: var(--crm-text-faint); margin-top: 1px; }
   
   .crm-sidebar-dropdown-link {
       display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--crm-text-muted);
       text-decoration: none; font-size: 12px; font-weight: 600; border-radius: 8px; transition: var(--crm-transition);
   }
   .crm-sidebar-dropdown-link:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   .crm-sidebar-dropdown-link i { font-size: 12px; width: 16px; text-align: center; color: var(--crm-text-faint); }
   
   .crm-sidebar-dropdown-logout {
       display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--crm-danger);
       font-size: 12px; font-weight: 700; border-radius: 8px; cursor: pointer; transition: var(--crm-transition);
       background: none; border: none; width: 100%; text-align: left; margin-top: 4px; border-top: 1px solid var(--crm-border-soft);
   }
   .crm-sidebar-dropdown-logout:hover { background: var(--crm-danger-bg); }
   
   /* ════════════════════════════════════════════════════════════
      12. CONTENT AREA
   ════════════════════════════════════════════════════════════ */
   #crmContent { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 28px 32px; }
   #crmContent::-webkit-scrollbar { width: 5px; }
   #crmContent::-webkit-scrollbar-thumb { background: var(--crm-border); border-radius: 4px; }
   
   /* ════════════════════════════════════════════════════════════
      13. HERO SECTION
   ════════════════════════════════════════════════════════════ */
   .crm-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
   .crm-hero-left { flex: 1; min-width: 0; }
   .crm-hero-title { font-size: 24px; font-weight: 700; color: var(--crm-text); margin-bottom: 4px; line-height: 1.3; letter-spacing: -0.01em; }
   .crm-hero-sub { font-size: 12.5px; color: var(--crm-text-muted); font-weight: 500; }
   .crm-hero-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
   .crm-hero-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--crm-text-muted); font-weight: 600; }
   .crm-hero-sync { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--crm-success); font-weight: 600; }
   .crm-sync-dot { color: var(--crm-success); font-size: 8px; animation: crmPulse 2s ease-in-out infinite; }
   
   /* ════════════════════════════════════════════════════════════
      14. BUTTONS
   ════════════════════════════════════════════════════════════ */
   .crm-btn {
       display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--crm-radius);
       font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer; transition: var(--crm-transition);
       border: 1px solid transparent; text-decoration: none; white-space: nowrap;
   }
   
   .crm-btn-primary { background: var(--crm-ink); color: var(--crm-bg); }
   .crm-btn-primary:hover { opacity: 0.85; }
   
   .crm-btn-secondary { background: var(--crm-surface); border-color: var(--crm-border); color: var(--crm-text); }
   .crm-btn-secondary:hover { border-color: var(--crm-ink); }
   
   .crm-btn-danger { background: var(--crm-danger-bg); border-color: transparent; color: var(--crm-danger); }
   .crm-btn-danger:hover { opacity: 0.85; }
   
   .crm-btn-sm { padding: 6px 12px; font-size: 11px; }
   
   .crm-view-all-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--crm-text); text-decoration: none; transition: var(--crm-transition); white-space: nowrap; }
   .crm-view-all-link:hover { opacity: 0.7; }
   
   .crm-refresh-btn {
       display: flex; align-items: center; gap: 5px; padding: 5px 10px; background: var(--crm-border-soft);
       border: 1px solid var(--crm-border); border-radius: 8px; font-family: inherit; font-size: 10px; font-weight: 700;
       color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition);
   }
   .crm-refresh-btn:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   
   /* ════════════════════════════════════════════════════════════
      15. QUICK ACTIONS BAR
   ════════════════════════════════════════════════════════════ */
   .crm-quick-actions-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
   
   .crm-quick-action-btn {
       display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--crm-surface);
       border: 1px solid var(--crm-border); border-radius: var(--crm-radius); font-family: inherit;
       font-size: 12px; font-weight: 700; color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition);
       white-space: nowrap;
   }
   .crm-quick-action-btn:hover { color: var(--crm-text); border-color: var(--crm-ink-soft); }
   
   .crm-qa-icon {
       width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
       font-size: 12px; flex-shrink: 0; background: var(--crm-border-soft) !important; color: var(--crm-text) !important;
   }
   .crm-qa-label { font-size: 12px; font-weight: 700; }
   
   /* ════════════════════════════════════════════════════════════
      16. KPI GRID & CARDS
   ════════════════════════════════════════════════════════════ */
   .crm-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
   
   .crm-kpi-card {
       background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       padding: 18px; position: relative; overflow: hidden; cursor: pointer; transition: var(--crm-transition);
       display: flex; flex-direction: column; gap: 4px; box-shadow: var(--crm-shadow);
   }
   .crm-kpi-card:hover { border-color: var(--crm-ink-soft); }
   
   .crm-kpi-pulse { display: none; } /* supprimé — trop décoratif pour le style minimaliste */
   
   .crm-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
   
   .crm-kpi-icon {
       width: 38px; height: 38px; border-radius: var(--crm-radius); display: flex; align-items: center;
       justify-content: center; font-size: 15px; flex-shrink: 0;
       background: var(--crm-border-soft) !important; color: var(--crm-text) !important;
   }
   
   .crm-kpi-badge { font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 20px; white-space: nowrap; background: var(--crm-border-soft); color: var(--crm-text-muted); }
   
   .crm-kpi-value { font-size: 22px; font-weight: 700; color: var(--crm-text); line-height: 1.2; letter-spacing: -0.01em; }
   .crm-kpi-label { font-size: 10.5px; font-weight: 700; color: var(--crm-text-muted); }
   .crm-kpi-sub   { font-size: 10px; color: var(--crm-text-faint); }
   
   .crm-kpi-progress-bar { height: 3px; background: var(--crm-border); border-radius: 3px; overflow: hidden; margin-top: 6px; }
   .crm-kpi-progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; background: var(--crm-ink) !important; }
   
   .crm-kpi-skeleton { background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg); height: 120px; animation: crmSkeletonPulse 1.5s ease-in-out infinite; }
   
   @keyframes crmSkeletonPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
   
   .crm-animate-glow { animation: none; } /* supprimé le glow violet décoratif */
   
   /* ════════════════════════════════════════════════════════════
      17. BENTO LAYOUT ROWS
   ════════════════════════════════════════════════════════════ */
   .crm-bento-row { display: grid; gap: 16px; margin-bottom: 16px; }
   .crm-row-split-7-5   { grid-template-columns: 7fr 5fr; }
   .crm-row-split-6-6   { grid-template-columns: 1fr 1fr; }
   .crm-row-split-5-4-3 { grid-template-columns: 5fr 4fr 3fr; }
   
   /* ════════════════════════════════════════════════════════════
      18. WIDGET BASE
   ════════════════════════════════════════════════════════════ */
   .crm-widget { background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg); padding: 20px; box-shadow: var(--crm-shadow); transition: border-color .15s ease; }
   .crm-widget:hover { border-color: var(--crm-ink-soft); }
   
   .crm-widget-full { grid-column: 1 / -1; margin-bottom: 16px; }
   .crm-widget-tall { min-height: 300px; display: flex; flex-direction: column; }
   
   .crm-widget-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
   
   .crm-section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--crm-text); }
   .crm-section-title i { color: var(--crm-text-muted) !important; }
   
   .crm-widget-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; gap: 12px; color: var(--crm-text-faint); font-size: 12px; font-weight: 600; }
   
   .crm-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; }
   .crm-empty-link { font-size: 12px; font-weight: 700; color: var(--crm-text); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
   .crm-empty-link:hover { opacity: 0.7; }
   
   .crm-spinner-ring {
       display: inline-block; width: 20px; height: 20px; border: 2px solid var(--crm-border);
       border-top-color: var(--crm-ink); border-radius: 50%; animation: crmSpin 0.7s linear infinite; flex-shrink: 0;
   }
   
   .crm-table-skeleton { height: 44px; background: var(--crm-border-soft); border-radius: var(--crm-radius); margin-bottom: 6px; animation: crmSkeletonPulse 1.5s ease-in-out infinite; }
   
   /* ════════════════════════════════════════════════════════════
      19. DEAL FUNNEL WIDGET — monochrome
   ════════════════════════════════════════════════════════════ */
   .crm-funnel-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
   .crm-funnel-stages { display: flex; flex-direction: column; gap: 8px; }
   .crm-funnel-stage { cursor: pointer; padding: 6px 8px; border-radius: var(--crm-radius); transition: var(--crm-transition); }
   .crm-funnel-stage:hover { background: var(--crm-border-soft); }
   
   .crm-funnel-stage-header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
   .crm-funnel-stage-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--crm-ink); }
   .crm-funnel-stage-name { font-size: 11px; font-weight: 700; color: var(--crm-text); flex: 1; }
   .crm-funnel-conv { font-size: 9px; font-weight: 800; display: flex; align-items: center; gap: 2px; color: var(--crm-text-muted); }
   .crm-funnel-count { font-size: 12px; font-weight: 800; min-width: 20px; text-align: right; color: var(--crm-text); }
   
   .crm-funnel-bar-wrap { height: 4px; background: var(--crm-border); border-radius: 4px; overflow: hidden; margin-bottom: 3px; }
   .crm-funnel-bar { height: 100%; border-radius: 4px; transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); min-width: 4px; background: var(--crm-ink) !important; }
   .crm-funnel-value { font-size: 10px; font-weight: 700; color: var(--crm-text-faint); text-align: right; }
   
   /* ════════════════════════════════════════════════════════════
      20. FUNDRAISING WIDGET
   ════════════════════════════════════════════════════════════ */
   .crm-fundraising-body { display: flex; gap: 20px; align-items: flex-start; }
   .crm-fundraising-left { flex: 0 0 140px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
   .crm-fundraising-right { flex: 1; min-width: 0; }
   .crm-fundraising-fund-name { font-size: 12px; font-weight: 700; color: var(--crm-text-muted); text-align: center; }
   
   .crm-thermometer-wrap { display: flex; align-items: flex-end; gap: 12px; }
   .crm-thermometer { width: 22px; height: 140px; background: var(--crm-border-soft); border-radius: 11px; position: relative; overflow: hidden; border: 1px solid var(--crm-border); flex-shrink: 0; }
   .crm-thermometer-fill { position: absolute; bottom: 0; left: 0; right: 0; border-radius: 0 0 11px 11px; transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); background: var(--crm-ink) !important; }
   .crm-thermometer-markers { position: absolute; inset: 0; }
   .crm-thermometer-marker { position: absolute; left: 100%; width: 8px; height: 1px; background: var(--crm-border); margin-left: 2px; transform: translateY(-50%); }
   .crm-thermometer-marker span { position: absolute; left: 10px; top: -5px; font-size: 8px; color: var(--crm-text-faint); font-weight: 600; white-space: nowrap; }
   
   .crm-thermometer-info { display: flex; flex-direction: column; gap: 2px; }
   .crm-thermo-pct    { font-size: 22px; font-weight: 700; line-height: 1; color: var(--crm-text); }
   .crm-thermo-label  { font-size: 9px;  font-weight: 700; color: var(--crm-text-faint); text-transform: uppercase; letter-spacing: 0.5px; }
   .crm-thermo-amount { font-size: 13px; font-weight: 800; color: var(--crm-text); margin-top: 6px; }
   .crm-thermo-target { font-size: 10px; color: var(--crm-text-faint); font-weight: 600; }
   .crm-thermo-gap    { font-size: 10px; font-weight: 700; margin-top: 4px; color: var(--crm-danger) !important; }
   
   .crm-commits-row { display: flex; gap: 6px; flex-wrap: wrap; }
   .crm-commit-badge { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 20px; }
   .crm-commit-badge.soft { background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border); }
   .crm-commit-badge.hard { background: var(--crm-success-bg); color: var(--crm-success); border: 1px solid transparent; }
   
   .crm-fundraising-pipeline-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.8px; color: var(--crm-text-faint); margin-bottom: 10px; }
   
   .crm-lp-stage-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; transition: var(--crm-transition); margin-bottom: 4px; }
   .crm-lp-stage-row:hover { background: var(--crm-border-soft); }
   .crm-lp-stage-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--crm-ink); }
   .crm-lp-stage-label { font-size: 11px; font-weight: 600; color: var(--crm-text-muted); min-width: 120px; }
   .crm-lp-stage-bar-wrap { flex: 1; height: 3px; background: var(--crm-border); border-radius: 3px; overflow: hidden; }
   .crm-lp-stage-bar { height: 100%; border-radius: 3px; transition: width 0.4s ease; min-width: 2px; background: var(--crm-ink) !important; }
   .crm-lp-stage-count { font-size: 11px; font-weight: 800; min-width: 20px; text-align: center; color: var(--crm-text); }
   .crm-lp-stage-amount { font-size: 10px; font-weight: 600; color: var(--crm-text-faint); min-width: 40px; text-align: right; }
   
   .crm-deadline-badge {
       display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; padding: 3px 8px;
       border-radius: 20px; background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border);
   }
   
   /* ════════════════════════════════════════════════════════════
      21. AI PRESETS (inside widget)
   ════════════════════════════════════════════════════════════ */
   .crm-ai-presets { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--crm-border-soft); }
   .crm-ai-preset-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--crm-text-faint); margin-bottom: 8px; }
   .crm-ai-preset-chips { display: flex; gap: 6px; flex-wrap: wrap; }
   
   .crm-ai-preset-chip {
       display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; background: var(--crm-border-soft);
       border: 1px solid var(--crm-border); border-radius: 20px; font-family: inherit; font-size: 10px; font-weight: 700;
       color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition); white-space: nowrap;
   }
   .crm-ai-preset-chip:hover { background: var(--crm-ink); border-color: var(--crm-ink); color: var(--crm-bg); }
   
   /* ════════════════════════════════════════════════════════════
      22. SCROLLBARS (global)
   ════════════════════════════════════════════════════════════ */
   * { scrollbar-width: thin; scrollbar-color: var(--crm-border) transparent; }
   *::-webkit-scrollbar { width: 5px; height: 5px; }
   *::-webkit-scrollbar-track { background: transparent; }
   *::-webkit-scrollbar-thumb { background: var(--crm-border); border-radius: 5px; }
   *::-webkit-scrollbar-thumb:hover { background: var(--crm-text-faint); }
   
   /* ════════════════════════════════════════════════════════════
      23. ANIMATIONS
   ════════════════════════════════════════════════════════════ */
   @keyframes crmSpin    { to { transform: rotate(360deg); } }
   @keyframes crmFadeIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
   @keyframes crmSlideIn { from { transform: translateX(-12px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
   @keyframes crmPulse   { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
   @keyframes crmCountUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
   
   .crm-fade-in  { animation: crmFadeIn  0.3s ease forwards; }
   .crm-slide-in { animation: crmSlideIn 0.25s ease forwards; }
   .crm-pulse    { animation: crmPulse   2s ease-in-out infinite; }
   .crm-count-up { animation: crmCountUp 0.3s ease forwards; }
   .crm-spin     { animation: crmSpin    0.7s linear infinite; }
   
   /* ════════════════════════════════════════════════════════════
      24-25. LIGHT/DARK MODE — Polish générique
   ════════════════════════════════════════════════════════════ */
   body:not(.crm-dark-mode) #crmSidebar { box-shadow: none; }
   body:not(.crm-dark-mode) .crm-kpi-card:hover { box-shadow: var(--crm-shadow-lg); }
   body:not(.crm-dark-mode) .crm-widget:hover   { box-shadow: var(--crm-shadow-lg); }
   body:not(.crm-dark-mode) .crm-header-user-menu { box-shadow: var(--crm-shadow-xl); }
   body:not(.crm-dark-mode) .crm-new-dropdown     { box-shadow: var(--crm-shadow-xl); }
   body:not(.crm-dark-mode) .crm-sidebar-user-dropdown { box-shadow: var(--crm-shadow-xl); }
   
   /* ════════════════════════════════════════════════════════════
      26-27. RESPONSIVE — LARGE / TABLET
   ════════════════════════════════════════════════════════════ */
   @media (max-width: 1400px) {
       .crm-kpi-grid        { grid-template-columns: repeat(4, 1fr); }
       .crm-row-split-5-4-3 { grid-template-columns: 1fr 1fr 1fr; }
   }
   
   @media (max-width: 1200px) {
       :root { --crm-sidebar-w: 220px; }
       .crm-kpi-grid        { grid-template-columns: repeat(4, 1fr); }
       .crm-row-split-7-5   { grid-template-columns: 1fr; }
       .crm-row-split-5-4-3 { grid-template-columns: 1fr 1fr; }
   
       .crm-fundraising-body { flex-direction: column; }
       .crm-fundraising-left { flex: none; width: 100%; flex-direction: row; align-items: flex-start; justify-content: flex-start; }
   }
   
   /* ════════════════════════════════════════════════════════════
      28. RESPONSIVE — MOBILE (≤ 768px)
   ════════════════════════════════════════════════════════════ */
   @media (max-width: 768px) {
       html, body { overflow: hidden; }
   
       #crmSidebar {
           position: fixed; left: 0; top: 0; bottom: 0; z-index: 1000;
           transform: translateX(-100%); width: 280px !important;
           overflow-y: auto; overflow-x: hidden;
       }
       #crmSidebar.mobile-open { transform: translateX(0); box-shadow: var(--crm-shadow-xl); }
   
       .crm-sidebar-toggle    { display: none !important; }
       .crm-mobile-close-btn  { display: flex !important; }
       #crmMobileMenuBtn      { display: flex !important; }
   
       #crmHeader    { padding: 0 14px; gap: 8px; }
       .crm-breadcrumb { display: none; }
       .crm-search-wrap { max-width: none; flex: 1; }
       .crm-role-badge  { display: none; }
   
       #crmContent { padding: 18px; }
   
       .crm-kpi-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
       .crm-kpi-card  { padding: 14px; }
       .crm-kpi-value { font-size: 18px; }
       .crm-kpi-icon  { width: 32px; height: 32px; font-size: 13px; }
   
       .crm-hero            { flex-direction: column; align-items: flex-start; gap: 10px; }
       .crm-hero-title      { font-size: 19px; }
       .crm-hero-sub        { font-size: 11px; }
       .crm-hero-right      { width: 100%; }
   
       .crm-bento-row       { grid-template-columns: 1fr !important; gap: 12px; }
   
       .crm-quick-actions-bar { gap: 6px; }
       .crm-quick-action-btn  { padding: 7px 10px; font-size: 11px; }
   
       .crm-fundraising-body  { flex-direction: column; }
       .crm-fundraising-left  { flex: none; width: 100%; }
       .crm-lp-stage-label    { min-width: 80px; }
   
       .crm-ai-preset-chips   { gap: 4px; }
       .crm-ai-preset-chip    { font-size: 9px; padding: 4px 8px; }
   }
   
   @media (max-width: 480px) {
       :root { --crm-header-h: 52px; }
       #crmHeader  { padding: 0 10px; }
       #crmContent { padding: 14px; }
       .crm-kpi-grid  { grid-template-columns: 1fr 1fr; gap: 8px; }
       .crm-kpi-card  { padding: 12px; }
       .crm-kpi-value { font-size: 16px; }
       .crm-hero-title { font-size: 16px; }
       .crm-quick-action-btn .crm-qa-label { display: none; }
       .crm-quick-action-btn { padding: 10px; border-radius: 50%; width: 44px; height: 44px; justify-content: center; }
       .crm-quick-action-btn .crm-qa-icon { margin: 0; width: 22px; height: 22px; }
   }
   
   @media (min-width: 1600px) {
       :root { --crm-sidebar-w: 280px; }
       .crm-kpi-grid { grid-template-columns: repeat(4, 1fr); }
       #crmContent   { padding: 32px 36px; }
   }
   
   /* ════════════════════════════════════════════════════════════
      31. ACCESSIBILITY & PERFORMANCE
   ════════════════════════════════════════════════════════════ */
   .crm-btn:focus-visible,
   .crm-header-btn:focus-visible,
   .crm-nav-item:focus-visible,
   .crm-quick-action-btn:focus-visible { outline: 1px solid var(--crm-ink); outline-offset: 2px; }
   
   ::selection { background: var(--crm-border); color: var(--crm-text); }
   
   @media (max-width: 768px) {
       .crm-form-input, .crm-form-select, .crm-form-textarea,
       .crm-search-input, .crm-ai-chat-input { font-size: 16px; }
       .crm-form-input:not(:focus), .crm-form-select:not(:focus), .crm-form-textarea:not(:focus),
       .crm-search-input:not(:focus), .crm-ai-chat-input:not(:focus) { font-size: 12px; }
   }
   
   @media (prefers-reduced-motion: reduce) {
       *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
       .crm-sync-dot, .crm-status-dot, .crm-header-alert-dot { animation: none; }
   }
   
   .crm-kpi-card, .crm-widget, .crm-ai-chat-panel, #crmSidebar, #crmMain {
       will-change: transform;
       -webkit-backface-visibility: hidden;
       backface-visibility: hidden;
   }
   
   #crmContent, .crm-sidebar-scroll, .crm-ai-chat-messages, .crm-team-members-list { -webkit-overflow-scrolling: touch; }
   
   .crm-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .crm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
   
   /* ════════════════════════════════════════════════════════════
      32. CONTACT CARDS GRID (Top Contacts Widget)
   ════════════════════════════════════════════════════════════ */
   .crm-contacts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
   
   .crm-contact-card {
       background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       padding: 14px; cursor: pointer; transition: var(--crm-transition); position: relative; overflow: hidden;
       display: flex; flex-direction: column; gap: 8px;
   }
   .crm-contact-card:hover { border-color: var(--crm-ink-soft); box-shadow: var(--crm-shadow-lg); }
   
   .crm-contact-card-top { display: flex; align-items: flex-start; gap: 10px; }
   
   .crm-contact-avatar {
       width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
       font-size: 13px; font-weight: 800; color: var(--crm-bg); flex-shrink: 0; position: relative; background: var(--crm-ink);
   }
   
   .crm-contact-health-dot {
       position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%;
       border: 2px solid var(--crm-card); transition: var(--crm-transition);
   }
   
   .crm-contact-info { flex: 1; min-width: 0; }
   .crm-contact-name { font-size: 12px; font-weight: 800; color: var(--crm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
   .crm-contact-title { font-size: 10px; color: var(--crm-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
   .crm-contact-company { font-size: 10px; color: var(--crm-text-muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   
   .crm-contact-score-badge {
       display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 800; padding: 3px 7px;
       border-radius: 20px; flex-shrink: 0; white-space: nowrap;
   }
   
   .crm-contact-stats { display: flex; gap: 10px; flex-wrap: wrap; }
   .crm-contact-stat { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--crm-text-faint); font-weight: 600; }
   
   .crm-contact-tags { display: flex; gap: 4px; flex-wrap: wrap; }
   .crm-tag {
       display: inline-flex; align-items: center; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
       background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border);
   }
   
   .crm-warm-path {
       display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--crm-text-faint);
       background: var(--crm-border-soft); border-radius: 6px; padding: 5px 8px;
   }
   .crm-warm-path strong { color: var(--crm-text-muted); font-weight: 700; }
   
   .crm-contact-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; margin-top: 2px; }
   .crm-contact-card:hover .crm-contact-actions { opacity: 1; }
   
   .crm-contact-action-btn {
       width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--crm-border);
       background: var(--crm-border-soft); color: var(--crm-text-faint); font-size: 11px; cursor: pointer;
       display: flex; align-items: center; justify-content: center; transition: var(--crm-transition);
   }
   .crm-contact-action-btn:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   
   /* ════════════════════════════════════════════════════════════
      33. RECENT ACTIVITY TIMELINE
   ════════════════════════════════════════════════════════════ */
   .crm-timeline { display: flex; flex-direction: column; gap: 0; flex: 1; }
   
   .crm-timeline-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--crm-border-soft); position: relative; animation: crmFadeIn 0.3s ease forwards; }
   .crm-timeline-item:last-child { border-bottom: none; }
   
   .crm-timeline-icon {
       width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--crm-border);
       display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
       background: var(--crm-border-soft) !important;
   }
   .crm-timeline-icon i { color: var(--crm-text-muted) !important; }
   
   .crm-timeline-connector { position: absolute; left: 14px; top: 40px; bottom: 0; width: 1px; background: var(--crm-border); }
   .crm-timeline-body { flex: 1; min-width: 0; }
   
   .crm-timeline-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
   .crm-timeline-type { font-size: 11px; font-weight: 700; color: var(--crm-text) !important; }
   .crm-timeline-time { font-size: 10px; color: var(--crm-text-faint); white-space: nowrap; }
   
   .crm-timeline-contact { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--crm-text-muted); margin-bottom: 4px; }
   .crm-timeline-note { font-size: 11px; color: var(--crm-text-muted); line-height: 1.5; background: var(--crm-border-soft); border-radius: 6px; padding: 5px 8px; }
   
   .crm-timeline-actions-count { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--crm-text-muted); font-weight: 600; margin-top: 4px; }
   
   /* ════════════════════════════════════════════════════════════
      34. FOLLOW-UPS WIDGET
   ════════════════════════════════════════════════════════════ */
   .crm-followup-count { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: 20px; background: var(--crm-border-soft); color: var(--crm-text-faint); }
   .crm-followup-count.urgent { background: var(--crm-danger-bg); color: var(--crm-danger); }
   
   .crm-followup-empty { display: flex; flex-direction: column; align-items: center; padding: 32px 24px; text-align: center; }
   .crm-followup-list { display: flex; flex-direction: column; gap: 8px; flex: 1; }
   
   .crm-followup-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--crm-radius); border: 1px solid var(--crm-border); transition: var(--crm-transition); }
   .crm-followup-item.overdue { background: var(--crm-danger-bg); border-color: transparent; }
   .crm-followup-item.dormant { background: var(--crm-border-soft); border-color: var(--crm-border); }
   .crm-followup-item:hover { border-color: var(--crm-ink-soft); }
   
   .crm-followup-avatar {
       width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
       font-size: 12px; font-weight: 800; color: var(--crm-bg); flex-shrink: 0; position: relative; background: var(--crm-ink);
   }
   .crm-followup-avatar.dormant { opacity: 0.6; }
   
   .crm-dormant-icon {
       position: absolute; bottom: -2px; right: -2px; font-size: 8px; color: var(--crm-text-faint);
       background: var(--crm-card); border-radius: 50%; width: 14px; height: 14px; display: flex; align-items: center;
       justify-content: center; border: 1px solid var(--crm-border);
   }
   
   .crm-followup-info { flex: 1; min-width: 0; }
   .crm-followup-name { font-size: 12px; font-weight: 700; color: var(--crm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .crm-followup-company { font-size: 10px; color: var(--crm-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
   
   .crm-followup-due { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; color: var(--crm-danger); margin-top: 3px; }
   .crm-followup-due.dormant-label { color: var(--crm-text-faint); }
   
   .crm-followup-actions { display: flex; gap: 4px; flex-shrink: 0; }
   .crm-followup-btn {
       width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--crm-border);
       background: var(--crm-border-soft); color: var(--crm-text-faint); font-size: 11px; cursor: pointer;
       display: flex; align-items: center; justify-content: center; transition: var(--crm-transition);
   }
   .crm-followup-btn:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   .crm-followup-btn.primary { background: var(--crm-success-bg); border-color: transparent; color: var(--crm-success); }
   .crm-followup-btn.primary:hover { background: var(--crm-success); color: #fff; }
   
   /* ════════════════════════════════════════════════════════════
      35. AI INTELLIGENCE ALERTS PANEL
   ════════════════════════════════════════════════════════════ */
   .crm-ai-badge {
       display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 20px; font-size: 9px; font-weight: 800;
       background: var(--crm-border-soft); color: var(--crm-text); border: 1px solid var(--crm-border); letter-spacing: 0.5px;
   }
   
   .crm-ai-refresh-time { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--crm-text-faint); font-weight: 600; }
   .crm-alerts-list { display: flex; flex-direction: column; gap: 10px; }
   
   .crm-alert-card { border-radius: var(--crm-radius-lg); padding: 14px; transition: var(--crm-transition); animation: crmFadeIn 0.3s ease forwards; border: 1px solid var(--crm-border); background: var(--crm-card) !important; }
   .crm-alert-card:hover { border-color: var(--crm-ink-soft); }
   
   .crm-alert-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
   .crm-alert-icon-wrap {
       width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
       background: var(--crm-border-soft) !important; border: 1px solid var(--crm-border);
   }
   .crm-alert-icon-wrap i { color: var(--crm-text-muted) !important; }
   
   .crm-alert-content { flex: 1; min-width: 0; }
   .crm-alert-title { font-size: 12px; font-weight: 800; color: var(--crm-text); margin-bottom: 4px; line-height: 1.3; }
   .crm-alert-message { font-size: 11px; color: var(--crm-text-muted); line-height: 1.5; }
   
   .crm-priority-badge { font-size: 9px; font-weight: 800; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0; white-space: nowrap; }
   
   .crm-alert-action {
       display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--crm-text-muted);
       background: var(--crm-border-soft); border-radius: 8px; padding: 6px 10px; margin-top: 4px;
   }
   
   .crm-alert-action-btn {
       display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 3px 10px; border-radius: 6px;
       border: 1px solid var(--crm-border); background: var(--crm-card); color: var(--crm-text);
       font-family: inherit; font-size: 10px; font-weight: 700; cursor: pointer; text-decoration: none;
       transition: var(--crm-transition); flex-shrink: 0;
   }
   .crm-alert-action-btn:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   
   .crm-alert-ai-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; color: var(--crm-text-faint); margin-top: 6px; }
   
   .crm-ai-empty { display: flex; flex-direction: column; align-items: center; padding: 32px 24px; text-align: center; }
   
   .crm-ai-thinking { text-align: center; }
   .crm-ai-thinking-dots { display: inline-flex; gap: 5px; align-items: center; }
   .crm-ai-thinking-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--crm-ink); animation: crmPulse 0.8s ease-in-out infinite; display: inline-block; }
   .crm-ai-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
   .crm-ai-thinking-dots span:nth-child(3) { animation-delay: 0.30s; }
   
   /* ════════════════════════════════════════════════════════════
      36. AI NARRATIVE INSIGHT WIDGET
   ════════════════════════════════════════════════════════════ */
   .crm-narrative-loading { display: flex; align-items: center; gap: 10px; padding: 12px; color: var(--crm-text-faint); font-size: 12px; font-weight: 600; }
   .crm-narrative-content { display: flex; flex-direction: column; gap: 10px; }
   
   .crm-narrative-icon {
       width: 32px; height: 32px; border-radius: 8px; background: var(--crm-border-soft); display: flex;
       align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--crm-border);
   }
   
   .crm-narrative-text { font-size: 12px; color: var(--crm-text-muted); line-height: 1.7; white-space: pre-wrap; background: var(--crm-border-soft); border-radius: 8px; padding: 12px; }
   .crm-narrative-footer { display: flex; align-items: center; gap: 5px; font-size: 10px; color: var(--crm-text-faint); }
   
   .crm-narrative-error { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--crm-text-muted); padding: 10px; background: var(--crm-border-soft); border-radius: 8px; }
   
   /* ════════════════════════════════════════════════════════════
      37. TEAM PRESENCE WIDGET
   ════════════════════════════════════════════════════════════ */
   .crm-team-count-badge {
       display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800;
       padding: 2px 7px; border-radius: 20px; background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border);
   }
   
   .crm-online-badge { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: var(--crm-success); }
   .crm-online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--crm-success); animation: crmPulse 2s ease-in-out infinite; }
   
   .crm-team-manage-btn {
       display: flex; align-items: center; gap: 5px; padding: 5px 10px; background: var(--crm-border-soft);
       border: 1px solid var(--crm-border); border-radius: 8px; font-family: inherit; font-size: 10px; font-weight: 700;
       color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition);
   }
   .crm-team-manage-btn:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   
   .crm-team-grid-new { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-bottom: 12px; }
   
   .crm-team-card-new {
       display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px; border-radius: var(--crm-radius);
       background: var(--crm-border-soft); border: 1px solid var(--crm-border); cursor: default; transition: var(--crm-transition); text-align: center;
   }
   .crm-team-card-new:hover { border-color: var(--crm-ink-soft); }
   
   .crm-team-avatar-new {
       width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
       font-size: 12px; font-weight: 800; color: var(--crm-bg); flex-shrink: 0; position: relative; overflow: hidden; background: var(--crm-ink);
   }
   
   .crm-team-status-dot { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--crm-card); transition: var(--crm-transition); }
   .crm-team-name-new { font-size: 10px; font-weight: 700; color: var(--crm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
   
   .crm-team-role-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 8px; font-weight: 800; padding: 2px 6px; border-radius: 20px; white-space: nowrap; }
   
   .crm-team-full-manage-btn {
       display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px;
       background: var(--crm-border-soft); border: 1px solid var(--crm-border); border-radius: var(--crm-radius);
       font-family: inherit; font-size: 11px; font-weight: 700; color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition);
   }
   .crm-team-full-manage-btn:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   
   .crm-team-empty-widget { display: flex; flex-direction: column; align-items: center; padding: 24px; text-align: center; }
   
   /* ════════════════════════════════════════════════════════════
      38. DEAL MINI TABLE
   ════════════════════════════════════════════════════════════ */
   .crm-deal-mini-table { width: 100%; overflow-x: auto; }
   
   .crm-deal-mini-header {
       display: grid; grid-template-columns: 2fr 1fr 1.2fr 0.8fr 0.8fr 0.6fr 0.8fr; gap: 8px; padding: 8px 12px;
       font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; color: var(--crm-text-faint);
       background: var(--crm-border-soft); border-radius: var(--crm-radius); margin-bottom: 4px; min-width: 680px;
   }
   
   .crm-deal-mini-row {
       display: grid; grid-template-columns: 2fr 1fr 1.2fr 0.8fr 0.8fr 0.6fr 0.8fr; gap: 8px; padding: 10px 12px;
       border-radius: var(--crm-radius); cursor: pointer; transition: var(--crm-transition); border: 1px solid transparent;
       align-items: center; min-width: 680px;
   }
   .crm-deal-mini-row:hover { background: var(--crm-border-soft); border-color: var(--crm-border); }
   .crm-deal-mini-row.stagnant { background: var(--crm-border-soft); border-color: var(--crm-border); }
   
   .crm-deal-mini-name { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--crm-text); overflow: hidden; }
   .crm-deal-mini-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .crm-deal-mini-sector { font-size: 11px; color: var(--crm-text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   
   .crm-deal-stage-pill {
       display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
       white-space: nowrap; background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border);
   }
   
   .crm-deal-mini-ev, .crm-deal-mini-ticket { font-size: 11px; font-weight: 700; color: var(--crm-text); }
   .crm-deal-mini-irr  { font-size: 11px; font-weight: 800; color: var(--crm-text); }
   .crm-deal-mini-date { font-size: 10px; font-weight: 600; white-space: nowrap; color: var(--crm-text-muted); }
   
   /* ════════════════════════════════════════════════════════════
      39. AI CHAT FAB & PANEL — monochrome (identique im-ai-fab)
   ════════════════════════════════════════════════════════════ */
   .crm-ai-fab {
       position: fixed; bottom: 28px; right: 28px; width: 50px; height: 50px; border-radius: var(--crm-radius-xl);
       border: none; background: #ffffff; box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
       cursor: pointer; z-index: 1000; display: flex; align-items: center; justify-content: center;
       overflow: hidden; padding: 0; transition: box-shadow .2s ease, transform .2s ease; gap: 0;
   }
   .crm-ai-fab:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.16), 0 2px 6px rgba(0,0,0,0.1); }
   .crm-ai-fab-text { display: none; }
   .crm-ai-fab-pulse { display: none; }
   
   .crm-ai-chat-panel {
       position: fixed; bottom: 28px; right: 28px; width: 400px; max-height: 600px;
       background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       z-index: 1001; flex-direction: column; box-shadow: var(--crm-shadow-xl); overflow: hidden;
   }
   
   .crm-ai-chat-header {
       display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
       border-bottom: 1px solid var(--crm-border); background: var(--crm-ink); flex-shrink: 0;
   }
   .crm-ai-chat-header-left { display: flex; align-items: center; gap: 10px; }
   
   .crm-ai-chat-avatar {
       width: 34px; height: 34px; border-radius: 10px; background: #ffffff; border: 1px solid var(--crm-border);
       display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0;
   }
   
   .crm-ai-chat-title { font-size: 13px; font-weight: 800; color: var(--crm-bg); }
   .crm-ai-chat-sub   { font-size: 10px; color: rgba(255,255,255,.7); margin-top: 1px; }
   
   .crm-ai-chat-header-actions { display: flex; gap: 5px; }
   .crm-ai-chat-header-btn {
       width: 28px; height: 28px; border-radius: 7px; border: none; background: rgba(255,255,255,.12);
       color: var(--crm-bg); font-size: 11px; cursor: pointer; display: flex; align-items: center;
       justify-content: center; transition: var(--crm-transition);
   }
   .crm-ai-chat-header-btn:hover { background: rgba(255,255,255,.22); }
   
   .crm-ai-chat-presets { display: flex; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--crm-border); overflow-x: auto; flex-shrink: 0; }
   .crm-ai-chat-presets::-webkit-scrollbar { height: 0; }
   
   .crm-ai-chat-preset {
       display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 20px;
       border: 1px solid var(--crm-border); background: var(--crm-border-soft); font-family: inherit; font-size: 10px;
       font-weight: 700; color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition); white-space: nowrap; flex-shrink: 0;
   }
   .crm-ai-chat-preset:hover { background: var(--crm-ink); color: var(--crm-bg); border-color: var(--crm-ink); }
   
   .crm-ai-chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; min-height: 220px; }
   
   .crm-chat-msg { display: flex; align-items: flex-start; gap: 8px; animation: crmFadeIn 0.2s ease; }
   .crm-chat-msg-user { flex-direction: row-reverse; }
   
   .crm-chat-ai-avatar {
       width: 26px; height: 26px; border-radius: 8px; background: #ffffff; border: 1px solid var(--crm-border);
       display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0;
   }
   
   .crm-chat-bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 12px; line-height: 1.6; }
   .crm-chat-bubble.ai { background: var(--crm-border-soft); color: var(--crm-text); border-radius: 4px 14px 14px 14px; border: 1px solid var(--crm-border); }
   .crm-chat-bubble.user { background: var(--crm-ink); color: var(--crm-bg); border-radius: 14px 4px 14px 14px; }
   
   .crm-ai-chat-input-wrap { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--crm-border); background: var(--crm-border-soft); flex-shrink: 0; }
   
   .crm-ai-chat-input {
       flex: 1; background: var(--crm-surface); border: 1px solid var(--crm-border); border-radius: 10px;
       padding: 8px 12px; font-family: inherit; font-size: 12px; color: var(--crm-text); outline: none; resize: none;
       max-height: 100px; line-height: 1.5; transition: var(--crm-transition);
   }
   .crm-ai-chat-input::placeholder { color: var(--crm-text-faint); }
   .crm-ai-chat-input:focus { border-color: var(--crm-ink); }
   
   .crm-ai-chat-send {
       width: 34px; height: 34px; border-radius: 10px; border: none; background: var(--crm-ink);
       color: var(--crm-bg); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
       flex-shrink: 0; transition: var(--crm-transition);
   }
   .crm-ai-chat-send:hover { opacity: 0.85; }
   
   .crm-ai-chat-footer { display: flex; align-items: center; gap: 5px; padding: 6px 12px; font-size: 9px; color: var(--crm-text-faint); border-top: 1px solid var(--crm-border); flex-shrink: 0; }
   
   /* ════════════════════════════════════════════════════════════
      40. MODALS — style Ultra Pro
   ════════════════════════════════════════════════════════════ */
   .crm-modal-overlay {
       display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(3px);
       -webkit-backdrop-filter: blur(3px); z-index: 10000; align-items: center; justify-content: center; padding: 16px;
       animation: crmFadeIn 0.15s ease;
   }
   .crm-modal-overlay[style*="flex"] { display: flex !important; }
   
   .crm-modal {
       background: var(--crm-card); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       max-width: 520px; width: 100%; box-shadow: var(--crm-shadow-xl); max-height: 90vh; display: flex;
       flex-direction: column; overflow: hidden; animation: crmFadeIn 0.2s ease;
   }
   .crm-modal-wide { max-width: 680px; }
   
   .crm-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--crm-border); flex-shrink: 0; }
   .crm-modal-title-wrap { display: flex; align-items: center; gap: 12px; }
   
   .crm-modal-title-icon {
       width: 36px; height: 36px; border-radius: 10px; background: var(--crm-border-soft); border: 1px solid var(--crm-border);
       display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--crm-text); flex-shrink: 0;
   }
   
   .crm-modal-close {
       width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--crm-border); background: var(--crm-border-soft);
       color: var(--crm-text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: var(--crm-transition);
   }
   .crm-modal-close:hover { background: var(--crm-danger); color: #fff; border-color: var(--crm-danger); }
   
   .crm-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
   .crm-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--crm-border); flex-shrink: 0; flex-wrap: wrap; }
   
   /* ════════════════════════════════════════════════════════════
      41. FORMS
   ════════════════════════════════════════════════════════════ */
   .crm-form-group { margin-bottom: 14px; position: relative; }
   .crm-form-label { display: block; font-size: 10px; font-weight: 700; color: var(--crm-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
   
   .crm-form-input, .crm-form-select, .crm-form-textarea {
       width: 100%; background: var(--crm-input-bg); border: 1px solid var(--crm-border); border-radius: var(--crm-radius);
       padding: 9px 12px; font-family: inherit; font-size: 12px; color: var(--crm-text); outline: none; transition: var(--crm-transition);
   }
   .crm-form-input::placeholder, .crm-form-textarea::placeholder { color: var(--crm-text-faint); }
   .crm-form-input:focus, .crm-form-select:focus, .crm-form-textarea:focus { border-color: var(--crm-ink); }
   .crm-form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
   
   .crm-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
   .crm-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--crm-border); }
   
   .crm-suggestions {
       position: absolute; top: 100%; left: 0; right: 0; background: var(--crm-surface); border: 1px solid var(--crm-border);
       border-radius: var(--crm-radius); z-index: 100; box-shadow: var(--crm-shadow-lg); max-height: 180px; overflow-y: auto; margin-top: 2px;
   }
   .crm-suggestion-item { padding: 8px 12px; cursor: pointer; transition: var(--crm-transition); border-bottom: 1px solid var(--crm-border-soft); }
   .crm-suggestion-item:last-child { border-bottom: none; }
   .crm-suggestion-item:hover { background: var(--crm-border-soft); }
   
   /* ════════════════════════════════════════════════════════════
      42. CRM TEAM MANAGER MODAL
   ════════════════════════════════════════════════════════════ */
   .crm-team-modal-section { padding: 16px 0; border-bottom: 1px solid var(--crm-border-soft); }
   .crm-team-modal-section:last-child { border-bottom: none; }
   .crm-team-modal-section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; color: var(--crm-text); margin-bottom: 14px; }
   .crm-team-modal-section-title i { color: var(--crm-text-muted) !important; }
   
   .crm-team-members-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
   
   .crm-team-member-row {
       display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px;
       background: var(--crm-border-soft); border: 1px solid var(--crm-border); border-radius: var(--crm-radius); transition: var(--crm-transition);
   }
   .crm-team-member-row:hover { border-color: var(--crm-ink-soft); }
   
   .crm-team-member-row-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
   
   .crm-team-avatar-wrap {
       width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
       font-size: 13px; font-weight: 800; color: var(--crm-bg); flex-shrink: 0; position: relative; overflow: hidden; background: var(--crm-ink);
   }
   
   .crm-team-member-info { flex: 1; min-width: 0; }
   .crm-team-member-name { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--crm-text); flex-wrap: wrap; }
   .crm-team-member-email { font-size: 10px; color: var(--crm-text-faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .crm-team-member-added { font-size: 9px; color: var(--crm-text-faint); margin-top: 2px; }
   
   .crm-team-you-badge { font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 20px; background: var(--crm-border-soft); color: var(--crm-text); border: 1px solid var(--crm-border); }
   .crm-team-admin-badge {
       display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 20px;
       background: var(--crm-border-soft); color: var(--crm-text); border: 1px solid var(--crm-border);
   }
   
   .crm-team-member-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
   
   .crm-team-role-select {
       background: var(--crm-surface); border: 1px solid var(--crm-border); border-radius: 8px; padding: 5px 8px;
       font-family: inherit; font-size: 11px; font-weight: 700; color: var(--crm-text-muted); cursor: pointer; outline: none; transition: var(--crm-transition);
   }
   .crm-team-role-select:focus { border-color: var(--crm-ink); }
   
   .crm-team-role-badge-static {
       display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
       white-space: nowrap; background: var(--crm-border-soft); color: var(--crm-text-muted); border: 1px solid var(--crm-border);
   }
   
   .crm-team-remove-btn {
       width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--crm-border); background: var(--crm-border-soft);
       color: var(--crm-text-faint); font-size: 11px; cursor: pointer; display: flex; align-items: center; justify-content: center;
       transition: var(--crm-transition); flex-shrink: 0;
   }
   .crm-team-remove-btn:hover { background: var(--crm-danger-bg); color: var(--crm-danger); border-color: transparent; }
   
   .crm-team-invite-wrap { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
   
   .crm-team-role-descriptions { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 12px; background: var(--crm-border-soft); border-radius: var(--crm-radius); }
   .crm-team-role-desc-item { display: flex; align-items: center; gap: 10px; }
   
   .crm-team-role-badge {
       display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
       white-space: nowrap; flex-shrink: 0; min-width: 80px; background: var(--crm-surface); color: var(--crm-text); border: 1px solid var(--crm-border);
   }
   
   .crm-team-role-desc-text { font-size: 11px; color: var(--crm-text-muted); }
   
   .crm-team-empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px; text-align: center; color: var(--crm-text-faint); font-size: 12px; }
   .crm-team-no-admin-notice { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--crm-border-soft); border-radius: var(--crm-radius); font-size: 12px; color: var(--crm-text-muted); margin-top: 12px; }
   
   /* ════════════════════════════════════════════════════════════
      43. CONTEXT MENU
   ════════════════════════════════════════════════════════════ */
   .crm-context-menu {
       position: fixed; background: var(--crm-surface); border: 1px solid var(--crm-border); border-radius: var(--crm-radius-lg);
       padding: 6px; min-width: 180px; z-index: 20000; box-shadow: var(--crm-shadow-xl); animation: crmFadeIn 0.15s ease;
   }
   
   .crm-context-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--crm-text-muted); cursor: pointer; transition: var(--crm-transition); }
   .crm-context-item:hover { background: var(--crm-border-soft); color: var(--crm-text); }
   .crm-context-item.danger { color: var(--crm-danger); }
   .crm-context-item.danger:hover { background: var(--crm-danger-bg); }
   .crm-context-item i { font-size: 12px; width: 14px; text-align: center; }
   
   .crm-context-divider { border: none; border-top: 1px solid var(--crm-border-soft); margin: 4px 0; }
   
   /* ════════════════════════════════════════════════════════════
      44. TOAST NOTIFICATIONS
   ════════════════════════════════════════════════════════════ */
   #crmToastContainer { position: fixed; bottom: 24px; right: 24px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
   
   /* ════════════════════════════════════════════════════════════
      FIX — Centrage Empty State dans grilles
   ════════════════════════════════════════════════════════════ */
   .crm-contacts-grid > .crm-empty-state,
   .crm-team-grid-new  > .crm-empty-state {
       grid-column: 1 / -1;
       width: 100%;
   }
   
   /* ════════════════════════════════════════════════════════════
      45. RESPONSIVE PART 2 — Widgets (≤ 768px)
   ════════════════════════════════════════════════════════════ */
   @media (max-width: 768px) {
       .crm-contacts-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
       .crm-contact-actions { opacity: 1; }
   
       .crm-deal-mini-header, .crm-deal-mini-row { grid-template-columns: 2fr 1.2fr 0.8fr 0.8fr; }
       .crm-deal-mini-sector, .crm-deal-mini-irr { display: none; }
   
       .crm-ai-chat-panel { left: 10px; right: 10px; bottom: 80px; width: auto; max-height: 70vh; }
       .crm-ai-fab { bottom: 20px; right: 20px; }
   
       .crm-modal-overlay { padding: 10px; align-items: flex-end; }
       .crm-modal { border-radius: var(--crm-radius-lg); max-height: 95vh; }
       .crm-modal-wide { max-width: 100%; }
   
       .crm-form-row { grid-template-columns: 1fr; }
       .crm-team-grid-new { grid-template-columns: repeat(4, 1fr); }
       .crm-lp-stage-label { min-width: 80px; }
       .crm-narrative-text { font-size: 11px; }
   
       .crm-team-invite-wrap { flex-direction: column; }
       .crm-team-member-row  { flex-direction: column; align-items: flex-start; gap: 8px; }
       .crm-team-member-row-right { width: 100%; justify-content: flex-start; }
   }
   
   @media (max-width: 480px) {
       .crm-contacts-grid { grid-template-columns: 1fr; }
       .crm-team-grid-new { grid-template-columns: repeat(3, 1fr); }
   
       .crm-deal-mini-header, .crm-deal-mini-row { grid-template-columns: 2fr 1.2fr 0.8fr; min-width: 340px; }
       .crm-deal-mini-ev { display: none; }
   
       .crm-ai-chat-panel { left: 6px; right: 6px; }
       .crm-ai-chat-presets { gap: 4px; }
       .crm-ai-chat-preset { font-size: 9px; padding: 4px 7px; }
   
       .crm-followup-item { flex-wrap: wrap; }
       .crm-form-row { grid-template-columns: 1fr; }
   }
   
   @media (max-width: 768px) and (orientation: landscape) {
       #crmContent { padding: 10px 14px; }
       .crm-hero   { margin-bottom: 10px; }
       .crm-hero-title { font-size: 16px; }
       .crm-kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
       .crm-ai-chat-panel { max-height: 80vh; }
   }
   
   /* ════════════════════════════════════════════════════════════
      48-49. DARK/LIGHT MODE — Polish générique Part 2
   ════════════════════════════════════════════════════════════ */
   body:not(.crm-dark-mode) .crm-contact-card:hover { box-shadow: var(--crm-shadow-lg); }
   body:not(.crm-dark-mode) .crm-modal              { box-shadow: var(--crm-shadow-xl); }
   body:not(.crm-dark-mode) .crm-context-menu       { box-shadow: var(--crm-shadow-xl); }
   body:not(.crm-dark-mode) .crm-ai-chat-panel      { box-shadow: var(--crm-shadow-xl); }
   body:not(.crm-dark-mode) .crm-suggestions        { box-shadow: var(--crm-shadow-lg); }
   
   /* ════════════════════════════════════════════════════════════
      50. PRINT
   ════════════════════════════════════════════════════════════ */
   @media print {
       #crmSidebar, #crmHeader, .crm-quick-actions-bar, .crm-hero-right,
       .crm-ai-fab, .crm-ai-chat-panel, .crm-sidebar-toggle, #crmQuickActions { display: none !important; }
   
       #crmApp     { display: block; }
       #crmMain    { width: 100%; }
       #crmContent { padding: 0; overflow: visible; }
   
       .crm-bento-row { display: grid !important; }
       .crm-widget    { page-break-inside: avoid; }
       .crm-kpi-card  { page-break-inside: avoid; }
   
       body { background: #fff !important; color: #000 !important; }
   }
   
   /* ════════════════════════════════════════════════════════════
      51. UTILITIES & MICRO-HELPERS
   ════════════════════════════════════════════════════════════ */
   .crm-ai-spin { animation: crmSpin 1s linear infinite; }
   
   .crm-drag-over {
       border-color: var(--crm-ink-soft) !important;
       background: var(--crm-border-soft) !important;
       box-shadow: 0 0 0 2px var(--crm-border) !important;
   }
   
   .crm-score-up { animation: crmCountUp 0.3s ease forwards; }
   
   .crm-kpi-card.crm-urgent { border-color: var(--crm-danger) !important; }
   
   [title] { cursor: help; }
   .crm-nav-item[title], .crm-quick-action-btn[title] { cursor: pointer; }
   #crmSidebar.collapsed .crm-nav-item { position: relative; }
   #crmAdminSection[style*="none"] { display: none !important; }
   
   .crm-modal-body { scrollbar-width: thin; }
   .crm-modal-body::-webkit-scrollbar { width: 4px; }
   .crm-modal-body::-webkit-scrollbar-thumb { background: var(--crm-border); border-radius: 4px; }
   
   .crm-team-members-list::-webkit-scrollbar { width: 3px; }
   .crm-team-members-list::-webkit-scrollbar-thumb { background: var(--crm-border); border-radius: 3px; }
   
   .crm-ai-chat-messages::-webkit-scrollbar { width: 3px; }
   .crm-ai-chat-messages::-webkit-scrollbar-thumb { background: var(--crm-border); border-radius: 3px; }
   
   /* ════════════════════════════════════════════════════════════
      Logo Claude — fond blanc plein (comme secondary-market)
   ════════════════════════════════════════════════════════════ */
   .crm-logo-white-bg {
       background: #ffffff !important; width: 100%; height: 100%; border-radius: inherit;
       display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 1px solid var(--crm-border);
   }
   .crm-logo-white-bg img { display: block; width: 62%; height: 62%; object-fit: contain; }
   
   /* ── Thinking block — monochrome (identique sm-think/im-think) ────────────── */
   .crm-think { margin-bottom: 10px; border: 1px solid var(--crm-border); border-radius: 12px; background: var(--crm-card); overflow: hidden; transition: border-color .25s ease; }
   .crm-think.is-active { border-color: var(--crm-ink-soft); box-shadow: var(--crm-shadow); }
   .crm-think-header { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; background: transparent; border: none; cursor: pointer; font-family: inherit; text-align: left; }
   .crm-think-header:hover { background: var(--crm-border-soft); }
   .crm-think-icon { position: relative; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
   .crm-think-ring { position: absolute; inset: -3px; border-radius: 50%; border: 1.6px solid var(--crm-border); border-top-color: var(--crm-text); animation: crmRingSpin .85s linear infinite; opacity: 1; transition: opacity .3s ease; }
   .crm-think:not(.is-active) .crm-think-ring { opacity: 0; }
   @keyframes crmRingSpin { to { transform: rotate(360deg); } }
   .crm-think-logo { width: 11px; height: 11px; object-fit: contain; filter: grayscale(100%) contrast(1.1); opacity: .85; }
   .crm-think-label { flex: 1; font-size: 11.5px; font-weight: 600; color: var(--crm-text); display: flex; align-items: center; gap: 2px; }
   .crm-think-dots { display: inline-flex; gap: 2px; margin-left: 2px; }
   .crm-think-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--crm-text-muted); animation: crmThinkDot 1.1s ease-in-out infinite; display: inline-block; }
   .crm-think-dots i:nth-child(2) { animation-delay: .15s; }
   .crm-think-dots i:nth-child(3) { animation-delay: .3s; }
   .crm-think:not(.is-active) .crm-think-dots { display: none; }
   @keyframes crmThinkDot { 0%,80%,100% { opacity:.25; transform:translateY(0); } 40% { opacity:1; transform:translateY(-1.5px); } }
   .crm-think-chev { font-size: 9px; color: var(--crm-text-muted); transition: transform .25s ease; }
   .crm-think.is-open .crm-think-chev { transform: rotate(180deg); }
   .crm-think-body { max-height: 0; overflow: hidden; transition: max-height .35s cubic-bezier(.4,0,.2,1); }
   .crm-think.is-open .crm-think-body { max-height: 220px; overflow-y: auto; }
   .crm-think-text { padding: 2px 12px 12px 38px; font-size: 11px; line-height: 1.6; color: var(--crm-text-muted); font-style: italic; white-space: pre-wrap; border-top: 1px solid var(--crm-border-soft); margin-top: 2px; padding-top: 8px; }
   
   .crm-stream-live-cursor, .crm-stream-cursor {
       display: inline-block; width: 2px; height: 1em; background: var(--crm-ink); margin-left: 2px;
       vertical-align: text-bottom; animation: crmCursorLiveBlink .8s step-end infinite;
   }
   @keyframes crmCursorLiveBlink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
   
   /* ════════════════════════════════════════════════════════════
      END — crm-dashboard.css v2.0 (Ultra Pro / Minimaliste)
      © AlphaVault AI — All rights reserved
   ════════════════════════════════════════════════════════════ */