/* ── Beezifi color system (extracted from crm.beezifi.com) ───────────────────
   Sidebar is always #0f172a (slate-900) in both themes.
   Light theme: white/slate-50 content area (matches the live CRM app).
   Dark  theme: full dark using the same slate scale.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Light theme (default — matches Beezifi CRM) ─────────────────────────── */
:root, [data-theme="light"] {
  /* Content backgrounds */
  --bg-primary:       #f8fafc;   /* slate-50  — page bg */
  --bg-secondary:     #ffffff;   /* white     — cards */
  --bg-tertiary:      #f1f5f9;   /* slate-100 — subtle sections */
  --bg-hover:         #f1f5f9;   /* slate-100 */
  --bg-active:        #3b82f6;   /* blue-500  — active accent */
  --bg-input:         #ffffff;
  --bg-message:       transparent;
  --bg-message-hover: #f8fafc;
  --bg-modal:         #ffffff;
  --bg-dropdown:      #ffffff;

  /* Sidebar — always dark navy */
  --bg-sidebar:       #0f172a;   /* slate-900 */
  --sidebar-border:   rgba(255,255,255,0.08);
  --sidebar-text:     rgba(255,255,255,0.6);
  --sidebar-text-active: #ffffff;
  --sidebar-hover:    rgba(255,255,255,0.08);
  --sidebar-active-bg: rgba(59,130,246,0.2);
  --sidebar-active-border: #3b82f6;
  --sidebar-label:    rgba(255,255,255,0.3);

  /* Text */
  --text-primary:     #0f172a;   /* slate-900 */
  --text-secondary:   #334155;   /* slate-700 */
  --text-muted:       #64748b;   /* slate-500 */
  --text-link:        #3b82f6;   /* blue-500  */
  --text-on-accent:   #ffffff;
  --text-heading:     #0f172a;

  /* Brand / accent */
  --accent:           #3b82f6;   /* blue-500  */
  --accent-hover:     #2563eb;   /* blue-600  */
  --accent-light:     #60a5fa;   /* blue-400  */
  --accent-bg:        #eff6ff;   /* blue-50   */
  --accent-border:    #bfdbfe;   /* blue-200  */

  /* Semantic */
  --danger:           #ef4444;   /* red-500   */
  --danger-light:     #fef2f2;
  --success:          #10b981;   /* emerald-500 */
  --success-light:    #ecfdf5;
  --warning:          #f59e0b;   /* amber-500 */
  --warning-light:    #fffbeb;
  --purple:           #8b5cf6;
  --cyan:             #06b6d4;

  /* Borders & shadows */
  --border:           #e2e8f0;   /* slate-200 */
  --border-light:     #cbd5e1;   /* slate-300 */
  --shadow:           rgba(0,0,0,0.08);
  --shadow-modal:     rgba(0,0,0,0.2);

  /* Mentions */
  --mention-bg:       #eff6ff;
  --mention-color:    #1d4ed8;   /* blue-700  */

  /* Sizing */
  --sidebar-width:    240px;
  --thread-width:     380px;
  --radius-sm:        6px;
  --radius-md:        8px;
  --radius-lg:        12px;
}

/* ── Dark theme ───────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  /* Content backgrounds (slate scale) */
  --bg-primary:       #0f172a;   /* slate-900 */
  --bg-secondary:     #1e293b;   /* slate-800 */
  --bg-tertiary:      #334155;   /* slate-700 */
  --bg-hover:         rgba(255,255,255,0.06);
  --bg-active:        rgba(59,130,246,0.25);
  --bg-input:         #1e293b;
  --bg-message:       transparent;
  --bg-message-hover: #1e293b;
  --bg-modal:         #1e293b;
  --bg-dropdown:      #1e293b;

  /* Sidebar — same dark navy */
  --bg-sidebar:       #0f172a;
  --sidebar-border:   rgba(255,255,255,0.08);
  --sidebar-text:     rgba(255,255,255,0.55);
  --sidebar-text-active: #e2e8f0;
  --sidebar-hover:    rgba(255,255,255,0.08);
  --sidebar-active-bg: rgba(59,130,246,0.2);
  --sidebar-active-border: #3b82f6;
  --sidebar-label:    rgba(255,255,255,0.25);

  /* Text */
  --text-primary:     #e2e8f0;   /* slate-200 */
  --text-secondary:   #94a3b8;   /* slate-400 */
  --text-muted:       #475569;   /* slate-600 */
  --text-link:        #60a5fa;   /* blue-400  */
  --text-on-accent:   #ffffff;
  --text-heading:     #f1f5f9;   /* slate-100 */

  /* Brand / accent */
  --accent:           #3b82f6;
  --accent-hover:     #2563eb;
  --accent-light:     #60a5fa;
  --accent-bg:        rgba(59,130,246,0.15);
  --accent-border:    rgba(59,130,246,0.4);

  /* Semantic */
  --danger:           #ef4444;
  --danger-light:     rgba(239,68,68,0.15);
  --success:          #10b981;
  --success-light:    rgba(16,185,129,0.15);
  --warning:          #f59e0b;
  --warning-light:    rgba(245,158,11,0.15);
  --purple:           #8b5cf6;
  --cyan:             #06b6d4;

  /* Borders & shadows */
  --border:           #1e293b;   /* slate-800 */
  --border-light:     #334155;   /* slate-700 */
  --shadow:           rgba(0,0,0,0.3);
  --shadow-modal:     rgba(0,0,0,0.6);

  /* Mentions */
  --mention-bg:       rgba(59,130,246,0.15);
  --mention-color:    #93c5fd;   /* blue-300  */

  /* Sizing (same as light) */
  --sidebar-width:    240px;
  --thread-width:     380px;
  --radius-sm:        6px;
  --radius-md:        8px;
  --radius-lg:        12px;
}
