/* ==========================================================================
   Design Tokens: Pure Monochrome Black & White Theme
   ========================================================================== */

/* 1. Theme: Monochrome Dark (True OLED Black) */
:root, [data-theme="black-plus"], [data-theme="black"], html.dark {
  --bg-canvas: #000000 !important;
  --bg-base: #030304 !important;
  --bg-surface: #070709 !important;
  --bg-surface-elevated: #0d0d10 !important;
  --card-bg: rgba(14, 14, 18, 0.75) !important;
  --card-bg-hover: rgba(22, 22, 28, 0.88) !important;
  --card-bg-active: rgba(30, 30, 38, 0.96) !important;
  --card-bg-selected: rgba(38, 38, 48, 0.98) !important;
  --border-subtle: rgba(255, 255, 255, 0.08) !important;
  --border-medium: rgba(255, 255, 255, 0.16) !important;
  --border-active: rgba(255, 255, 255, 0.28) !important;
  --border-glow: #272730 !important;
  --accent-primary: #ffffff !important;
  --accent-primary-hover: #e4e4e7 !important;
  --accent-primary-glow: transparent !important;
  --text-primary: #f5f5f7 !important;
  --text-secondary: #a1a1a6 !important;
  --text-tertiary: #6e6e73 !important;
  --text-muted: #515154 !important;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.9), 0 0 1px 1px rgba(255, 255, 255, 0.06);
  --shadow-card-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.95), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  --backdrop-blur: blur(20px) saturate(190%);
  color-scheme: dark;
  --app-height: 100dvh;

  --chat-canvas: #000000;
  --chat-sidebar: #040405;
  --chat-surface: rgba(14, 14, 18, 0.75);
  --chat-hover: rgba(22, 22, 28, 0.88);
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-text: #f5f5f7;
  --chat-muted: #a1a1a6;
  --chat-disabled: #6e6e73;
}

/* 2. Theme: Red Theme neutralized to OLED Monochrome */
[data-theme="red"], html.dark[data-theme="red"] {
  --bg-canvas: #000000 !important;
  --bg-base: #030304 !important;
  --bg-surface: #070709 !important;
  --bg-surface-elevated: #0d0d10 !important;
  --card-bg: rgba(14, 14, 18, 0.75) !important;
  --card-bg-hover: rgba(22, 22, 28, 0.88) !important;
  --card-bg-active: rgba(30, 30, 38, 0.96) !important;
  --card-bg-selected: rgba(38, 38, 48, 0.98) !important;
  --border-subtle: rgba(255, 255, 255, 0.08) !important;
  --border-medium: rgba(255, 255, 255, 0.16) !important;
  --border-active: rgba(255, 255, 255, 0.28) !important;
  --border-glow: #272730 !important;
  --accent-primary: #ffffff !important;
  --accent-primary-hover: #e4e4e7 !important;
  --accent-primary-glow: transparent !important;
  --text-primary: #f5f5f7 !important;
  --text-secondary: #a1a1a6 !important;
  --text-tertiary: #6e6e73 !important;
  --text-muted: #515154 !important;
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.9), 0 0 1px 1px rgba(255, 255, 255, 0.06);
  --shadow-card-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.95), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  --backdrop-blur: blur(20px) saturate(190%);
  color-scheme: dark;
  --app-height: 100dvh;

  --chat-canvas: #000000;
  --chat-sidebar: #040405;
  --chat-surface: rgba(14, 14, 18, 0.75);
  --chat-hover: rgba(22, 22, 28, 0.88);
  --chat-border: rgba(255, 255, 255, 0.08);
  --chat-text: #f5f5f7;
  --chat-muted: #a1a1a6;
  --chat-disabled: #6e6e73;
}

/* 3. Theme: Monochrome Light (Studio Clean) */
[data-theme="white-plus"], html:not(.dark) {
  --bg-canvas: #ffffff !important;
  --bg-base: #f8fafc !important;
  --bg-surface: #ffffff !important;
  --bg-surface-elevated: #f1f5f9 !important;
  --card-bg: #ffffff !important;
  --card-bg-hover: #f8fafc !important;
  --card-bg-active: #f1f5f9 !important;
  --card-bg-selected: #e2e8f0 !important;
  --border-subtle: #e2e8f0 !important;
  --border-medium: #cbd5e1 !important;
  --border-active: #94a3b8 !important;
  --border-glow: #e2e8f0 !important;
  --accent-primary: #09090b !important;
  --accent-primary-hover: #18181b !important;
  --accent-primary-glow: transparent !important;
  --text-primary: #09090b !important;
  --text-secondary: #334155 !important;
  --text-tertiary: #64748b !important;
  --text-muted: #94a3b8 !important;
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 10px 30px -4px rgba(0, 0, 0, 0.08);
  --backdrop-blur: blur(20px);
  color-scheme: light;
  --app-height: 100dvh;

  --chat-canvas: #ffffff;
  --chat-sidebar: #f8fafc;
  --chat-surface: #ffffff;
  --chat-hover: #f1f5f9;
  --chat-border: #e2e8f0;
  --chat-text: #09090b;
  --chat-muted: #64748b;
  --chat-disabled: #94a3b8;
}

/* Neutralized Buttons and Controls */
[data-theme="red"] .ambient-aurora,
.ambient-aurora {
  display: none !important;
}
[data-theme="red"] .bg-accent-500,
[data-theme="red"] .bg-accent-600 {
  background-color: #ffffff !important;
  color: #000000 !important;
}
[data-theme="red"] .text-accent-500 {
  color: #ffffff !important;
}
[data-theme="red"] .bg-accent-500\/10 {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}
[data-theme="red"] .border-accent-500 {
  border-color: #ffffff !important;
}
[data-theme="red"] .from-accent-600.to-accent-500,
[data-theme="red"] .from-accent-600.to-indigo-500,
[data-theme="red"] .dash-btn-primary {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: none !important;
}
[data-theme="red"] #send-btn {
  background: #ffffff !important;
  color: #000000 !important;
}
[data-theme="red"] #send-btn:hover {
  background: #e4e4e7 !important;
}

/* White+ Clean Theme Overrides */
[data-theme="white-plus"] .ambient-aurora {
  display: none !important;
}
[data-theme="white-plus"] .glass-panel,
[data-theme="white-plus"] .dash-card {
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}

body {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-width: 0;
  min-height: var(--app-height);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  background-color: var(--bg-canvas) !important;
  color: var(--text-primary) !important;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: var(--app-height);
  background-color: var(--bg-canvas) !important;
}

button, a, [role="button"], input[type="submit"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button:active, a:active, [role="button"]:active, input[type="submit"]:active {
  transform: scale(0.98) !important;
  transition: transform 0.08s ease !important;
}

/* Glass Panel Component for Shell & Dashboard pages */
.glass-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 1.5rem;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-card);
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

#sidebar, #main-chat-container, #chat-container {
  min-width: 0;
}

/* Ambient Glow Background - Disabled */
.ambient-aurora {
  display: none !important;
}

/* Glassmorphism 2.0 */
.glass-sidebar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: background-color 0.22s ease, border-color 0.22s ease;
}
.dark .glass-sidebar {
  background: rgba(4, 4, 5, 0.92);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-color: var(--border-subtle);
}

.glass-header {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background-color 0.22s ease, border-color 0.22s ease;
}
.dark .glass-header {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-color: var(--border-subtle);
}

.glass-composer {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.dark .glass-composer {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}
.dark .glass-composer:focus-within {
  border-color: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.9), 0 0 0 2px rgba(255, 255, 255, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }

/* Code block styling */
.markdown-code-block { direction: ltr; text-align: left; }
.markdown-inline-code {
  font-family: 'JetBrains Mono', monospace;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  font-size: 0.85em;
}
.light .markdown-inline-code { background: #f1f5f9; color: #111115; border: 1px solid #e2e8f0; }
.dark .markdown-inline-code { background: var(--bg-surface-elevated); color: #f5f5f7; border: 1px solid var(--border-subtle); }

/* Typing Dots */
.typing-dot {
  animation: typingBounce 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

/* Smooth UI Utilities */
input, textarea { font-size: 16px !important; }
.safe-pt { padding-top: max(12px, env(safe-area-inset-top)); }
.safe-pb { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.ambient-aurora-delayed {
  display: none !important;
}

.daily-usage-fill { width: 0; }

@media (max-width: 768px) {
  body { height: var(--app-height); min-height: var(--app-height); position: fixed; inset: 0; }
  main { height: var(--app-height) !important; }
  #chat-container { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  #sidebar { width: min(300px, 88vw); height: var(--app-height) !important; }
  .glass-header { min-height: 4rem; }
  #welcome-screen { padding-top: 1.5rem; padding-bottom: 2rem; justify-content: flex-start; }
  #welcome-screen > h1 { padding-inline: .5rem; font-size: 1.35rem; line-height: 1.8; }
  #welcome-screen > p { padding-inline: .75rem; }
  #chat-container { padding-inline: .75rem; }
  #messages-area { gap: 1rem; padding-block: 1rem; }
  #chat-form { border-radius: 1.25rem; padding: .5rem; }
  #chat-form textarea { max-height: 120px; padding-inline: .25rem; }
  #chat-form .w-10 { width: 2.5rem; height: 2.5rem; }
  #image-preview-bar { gap: .5rem; padding: .5rem; }
  #settings-modal > div:last-child { flex-wrap: wrap; }
  #settings-modal > div:last-child button { flex: 1 1 120px; }
  .markdown-code-block pre { max-width: 100%; overflow-x: auto; }
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    body, main, #sidebar { min-height: -webkit-fill-available; }
  }
}

@media (max-width: 380px) {
  #header-model-display { max-width: 124px; overflow: hidden; white-space: nowrap; }
  #chat-container { padding-inline: .75rem; }
  #settings-modal > div { padding-inline: 1rem; }
}

/* ==========================================================================
   Monochrome Dashboard Panels
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-display: 'Outfit', 'Vazirmatn', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Vazirmatn', sans-serif;
}

/* Ambient Canvas Glow Orbs - Disabled for Pure Monochrome */
.jl-ambient-glow,
.jl-ambient-orb-purple,
.jl-ambient-orb-blue,
.jl-ambient-orb-pink {
  display: none !important;
}

/* Chrome Browser Frame / Address Pill */
.chrome-browser-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 20px 20px 0 0;
}
.dark .chrome-browser-bar {
  background: rgba(17, 24, 39, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mac-window-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}
.mac-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
  transition: transform 0.15s ease;
}
.mac-dot:hover { transform: scale(1.15); }
.mac-dot-close { display: none !important; }
.mac-dot-min { background: #ffbd2e; }
.mac-dot-max { background: #27c93f; }

.chrome-address-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e6e9f2;
  border-radius: 9999px;
  padding: 5px 16px;
  font-family: var(--font-body);
  font-size: 0.775rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.dark .chrome-address-pill {
  background: #111115;
  color: #f5f5f7;
  border-color: #272730;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Segmented Floating Pill Navigation */
.segmented-pill-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  border-radius: 9999px;
  padding: 4px;
  box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.dark .segmented-pill-nav {
  background: rgba(17, 17, 21, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
}
.pill-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-size: 0.825rem;
  font-weight: 800;
  color: #09090b !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  background: transparent;
  white-space: nowrap;
  text-decoration: none;
}
.pill-tab-btn i,
.pill-tab-btn span {
  color: inherit !important;
}
.dark .pill-tab-btn {
  color: #f4f4f5 !important;
}
.pill-tab-btn:hover {
  color: #000000 !important;
  background: #e4e4e7;
  transform: translateY(-1px);
}
.dark .pill-tab-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12);
}
.pill-tab-btn.active {
  background: #09090b !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
}
.pill-tab-btn.active span,
.pill-tab-btn.active i {
  color: #ffffff !important;
}
.pill-tab-btn.active .pill-dot {
  background-color: #ffffff !important;
}
.dark .pill-tab-btn.active {
  background: #ffffff !important;
  color: #000000 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}
.dark .pill-tab-btn.active span,
.dark .pill-tab-btn.active i {
  color: #000000 !important;
}
.dark .pill-tab-btn.active .pill-dot {
  background-color: #000000 !important;
}

/* Hero Cards Grid - Monochrome */
.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
@media (max-width: 1024px) {
  .hero-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.hero-card {
  border-radius: 20px;
  padding: 12px 14px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85);
}
.hero-card:hover {
  transform: translateY(-3px);
}

/* Alexa 1.6 Hero Cards - Dark Glassmorphism */
.card-today-revenue {
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 70%), #111115 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.95), 0 0 24px rgba(255, 255, 255, 0.05) !important;
}
.card-today-revenue:hover {
  border-color: rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 20px 42px -8px rgba(0, 0, 0, 0.98), 0 0 30px rgba(255, 255, 255, 0.08) !important;
}
.card-yesterday-revenue,
.card-repeat-rate {
  background: #111115 !important;
  color: #ffffff !important;
  border: 1px solid #272730 !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85) !important;
}
.card-yesterday-revenue:hover,
.card-repeat-rate:hover {
  box-shadow: 0 20px 42px -8px rgba(0, 0, 0, 0.95) !important;
}

/* Card 1: Monochrome Sales Pipeline */
.card-sales-pipeline {
  background: #111115 !important;
  color: #ffffff !important;
  border: 1px solid #272730 !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85) !important;
}
.card-sales-pipeline:hover {
  box-shadow: 0 20px 42px -8px rgba(0, 0, 0, 0.95) !important;
}
.card-inner-glow {
  display: none !important;
}

/* ==========================================================================
   Store AI Agents & Bots Command Center (مرکز دستیار و ربات‌های فروشگاهی - فوق فشرده و بدون اسکرول)
   ========================================================================== */
.store-agents-hub-container {
  width: 100%;
  border-radius: 22px;
  background: rgba(14, 14, 18, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

[data-theme="white-plus"] .store-agents-hub-container,
html:not(.dark) .store-agents-hub-container {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 6px 20px -3px rgba(0, 0, 0, 0.05) !important;
}

.store-agent-compact-card {
  border-radius: 14px;
  background: rgba(24, 24, 30, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  cursor: pointer;
  min-height: 54px;
}

.store-agent-compact-card:hover {
  transform: translateY(-2px);
  background: rgba(34, 34, 44, 0.9);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.5), 0 0 12px rgba(168, 85, 247, 0.12);
}

[data-theme="white-plus"] .store-agent-compact-card,
html:not(.dark) .store-agent-compact-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="white-plus"] .store-agent-compact-card:hover,
html:not(.dark) .store-agent-compact-card:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06) !important;
}

.agent-icon-box-compact {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.store-agent-compact-card:hover .agent-icon-box-compact {
  transform: scale(1.08);
}

.store-agent-card {
  border-radius: 16px;
  background: rgba(24, 24, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.store-agent-card:hover {
  transform: translateY(-2px);
  background: rgba(30, 30, 38, 0.85);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="white-plus"] .store-agent-card,
html:not(.dark) .store-agent-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.agent-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.store-agent-card:hover .agent-icon-box {
  transform: scale(1.08) rotate(3deg);
}

/* Card 2: Minimalist Lead Number & Arc Slider */
.card-lead-number {
  background: #111115 !important;
  border: 1px solid #272730 !important;
  color: #ffffff !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85) !important;
}
.dark .card-lead-number {
  background: #111115 !important;
  border: 1px solid #272730 !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85) !important;
}
.card-lead-number:hover {
  box-shadow: 0 20px 42px -8px rgba(0, 0, 0, 0.95) !important;
}

.hot-radial-orb {
  display: none !important;
}

.orb-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  font-family: var(--font-display);
}

.hero-number-center {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  position: relative;
  z-index: 2;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
.percent-dot {
  color: #ffffff;
}

/* Interactive Arc Slider */
.interactive-arc-slider-wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6px;
}
.arc-svg {
  width: 100%;
  max-width: 270px;
  height: 48px;
  overflow: visible;
  cursor: pointer;
}
.arc-path-track {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-linecap: round;
}
.dark .arc-path-track {
  stroke: rgba(255, 255, 255, 0.4);
}
.arc-bead {
  fill: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
  cursor: grab;
  transition: transform 0.1s ease;
}
.arc-bead:active {
  cursor: grabbing;
  transform: scale(1.25);
}

/* Card 3: Monochrome AI Efficiency */
.card-ai-efficiency {
  background: #111115 !important;
  color: #ffffff !important;
  border: 1px solid #272730 !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.85) !important;
}
.card-ai-efficiency:hover {
  box-shadow: 0 20px 42px -8px rgba(0, 0, 0, 0.95) !important;
}

/* Pulsing Status Beacon */
.pulse-beacon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.725rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.beacon-circle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff !important;
  box-shadow: none !important;
  animation: beaconPing 1.8s ease-in-out infinite;
  display: inline-block;
}
@keyframes beaconPing {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* Typography & General Hero Metric Styles */
.card-title-jl {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-stat-large {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.stat-caption-jl {
  font-size: 0.8rem;
  opacity: 0.85;
  font-weight: 600;
  font-family: var(--font-body);
}

.eff-bar-item {
  margin-top: 10px;
}
.eff-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 5px;
  opacity: 0.92;
}
.bar-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: none;
  transition: width 0.8s ease;
}

.meta-row-jl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.775rem;
  font-weight: 600;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
  position: relative;
  z-index: 2;
}
.meta-trend-positive {
  color: #ffffff !important;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ==========================================================================
   Comprehensive Light Mode ([data-theme="white-plus"] & html:not(.dark)) Overrides
   ========================================================================== */

/* Universal Button Overrides in Light Mode */
[data-theme="white-plus"] .dash-btn-primary,
html:not(.dark) .dash-btn-primary,
[data-theme="white-plus"] .btn-primary,
html:not(.dark) .btn-primary {
  background: #09090b !important;
  color: #ffffff !important;
  border: 1px solid #09090b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}
[data-theme="white-plus"] .dash-btn-primary:hover,
html:not(.dark) .dash-btn-primary:hover,
[data-theme="white-plus"] .btn-primary:hover,
html:not(.dark) .btn-primary:hover {
  background: #27272a !important;
  color: #ffffff !important;
  border-color: #27272a !important;
}

[data-theme="white-plus"] .dash-btn-secondary,
html:not(.dark) .dash-btn-secondary,
[data-theme="white-plus"] .btn-secondary,
html:not(.dark) .btn-secondary {
  background: #ffffff !important;
  color: #09090b !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="white-plus"] .dash-btn-secondary:hover,
html:not(.dark) .dash-btn-secondary:hover,
[data-theme="white-plus"] .btn-secondary:hover,
html:not(.dark) .btn-secondary:hover {
  background: #f4f4f5 !important;
  border-color: #cbd5e1 !important;
  color: #09090b !important;
}

/* Glass Panels & Dash Cards in Light Mode */
[data-theme="white-plus"] .glass-panel,
html:not(.dark) .glass-panel,
[data-theme="white-plus"] .glass-card,
html:not(.dark) .glass-card,
[data-theme="white-plus"] .dash-card,
html:not(.dark) .dash-card,
[data-theme="white-plus"] .management-hub,
html:not(.dark) .management-hub {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #09090b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
}

/* Headings inside cards/panels in Light Mode */
[data-theme="white-plus"] .glass-panel h1, [data-theme="white-plus"] .glass-panel h2, [data-theme="white-plus"] .glass-panel h3, [data-theme="white-plus"] .glass-panel h4,
html:not(.dark) .glass-panel h1, html:not(.dark) .glass-panel h2, html:not(.dark) .glass-panel h3, html:not(.dark) .glass-panel h4,
[data-theme="white-plus"] .dash-card h1, [data-theme="white-plus"] .dash-card h2, [data-theme="white-plus"] .dash-card h3, [data-theme="white-plus"] .dash-card h4,
html:not(.dark) .dash-card h1, html:not(.dark) .dash-card h2, html:not(.dark) .dash-card h3, html:not(.dark) .dash-card h4,
[data-theme="white-plus"] .management-hub h1, [data-theme="white-plus"] .management-hub h2, [data-theme="white-plus"] .management-hub h3, [data-theme="white-plus"] .management-hub h4,
html:not(.dark) .management-hub h1, html:not(.dark) .management-hub h2, html:not(.dark) .management-hub h3, html:not(.dark) .management-hub h4 {
  color: #09090b !important;
}

/* Universal text-white fix in Light Mode (except buttons and dark badges) */
[data-theme="white-plus"] .glass-panel .text-white:not(.dash-btn-primary):not(.btn-primary):not([class*="bg-sky-500"]):not([class*="bg-indigo-600"]):not([class*="bg-emerald-500"]):not([class*="bg-rose-600"]):not([class*="bg-red-600"]):not([class*="bg-black"]),
html:not(.dark) .glass-panel .text-white:not(.dash-btn-primary):not(.btn-primary):not([class*="bg-sky-500"]):not([class*="bg-indigo-600"]):not([class*="bg-emerald-500"]):not([class*="bg-rose-600"]):not([class*="bg-red-600"]):not([class*="bg-black"]),
[data-theme="white-plus"] .dash-card .text-white:not(.dash-btn-primary):not(.btn-primary):not([class*="bg-sky-500"]):not([class*="bg-indigo-600"]):not([class*="bg-emerald-500"]):not([class*="bg-rose-600"]):not([class*="bg-red-600"]):not([class*="bg-black"]),
html:not(.dark) .dash-card .text-white:not(.dash-btn-primary):not(.btn-primary):not([class*="bg-sky-500"]):not([class*="bg-indigo-600"]):not([class*="bg-emerald-500"]):not([class*="bg-rose-600"]):not([class*="bg-red-600"]):not([class*="bg-black"]),
[data-theme="white-plus"] .management-hub .text-white:not(.dash-btn-primary):not(.btn-primary):not([class*="bg-sky-500"]):not([class*="bg-indigo-600"]):not([class*="bg-emerald-500"]):not([class*="bg-rose-600"]):not([class*="bg-red-600"]):not([class*="bg-black"]),
html:not(.dark) .management-hub .text-white:not(.dash-btn-primary):not(.btn-primary):not([class*="bg-sky-500"]):not([class*="bg-indigo-600"]):not([class*="bg-emerald-500"]):not([class*="bg-rose-600"]):not([class*="bg-red-600"]):not([class*="bg-black"]) {
  color: #09090b !important;
}

[data-theme="white-plus"] .glass-panel .text-zinc-200, [data-theme="white-plus"] .glass-panel .text-zinc-300,
html:not(.dark) .glass-panel .text-zinc-200, html:not(.dark) .glass-panel .text-zinc-300,
[data-theme="white-plus"] .dash-card .text-zinc-200, [data-theme="white-plus"] .dash-card .text-zinc-300,
html:not(.dark) .dash-card .text-zinc-200, html:not(.dark) .dash-card .text-zinc-300 {
  color: #1e293b !important;
}

[data-theme="white-plus"] .glass-panel .text-zinc-400, [data-theme="white-plus"] .glass-panel .text-slate-400,
html:not(.dark) .glass-panel .text-zinc-400, html:not(.dark) .glass-panel .text-slate-400,
[data-theme="white-plus"] .dash-card .text-zinc-400, [data-theme="white-plus"] .dash-card .text-slate-400,
html:not(.dark) .dash-card .text-zinc-400, html:not(.dark) .dash-card .text-slate-400 {
  color: #64748b !important;
}

/* Form Inputs in Light Mode */
[data-theme="white-plus"] input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
html:not(.dark) input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
[data-theme="white-plus"] select,
html:not(.dark) select,
[data-theme="white-plus"] textarea,
html:not(.dark) textarea,
[data-theme="white-plus"] .dash-input,
html:not(.dark) .dash-input,
[data-theme="white-plus"] .bg-darkinput,
html:not(.dark) .bg-darkinput {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] input::placeholder,
html:not(.dark) input::placeholder,
[data-theme="white-plus"] textarea::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important;
}
[data-theme="white-plus"] input:focus,
html:not(.dark) input:focus,
[data-theme="white-plus"] select:focus,
html:not(.dark) select:focus,
[data-theme="white-plus"] textarea:focus,
html:not(.dark) textarea:focus {
  border-color: #09090b !important;
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.1) !important;
}

/* Sidebar Overrides in Light Mode */
[data-theme="white-plus"] #sidebar,
html:not(.dark) #sidebar {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

[data-theme="white-plus"] #sidebar .text-white,
html:not(.dark) #sidebar .text-white {
  color: #09090b !important;
}
[data-theme="white-plus"] #sidebar .text-zinc-200,
html:not(.dark) #sidebar .text-zinc-200,
[data-theme="white-plus"] #sidebar .text-zinc-300,
html:not(.dark) #sidebar .text-zinc-300 {
  color: #18181b !important;
}
[data-theme="white-plus"] #sidebar .text-zinc-400,
html:not(.dark) #sidebar .text-zinc-400,
[data-theme="white-plus"] #sidebar .text-slate-400,
html:not(.dark) #sidebar .text-slate-400 {
  color: #71717a !important;
}

/* Active links in sidebar */
[data-theme="white-plus"] #sidebar a.bg-white\/10,
html:not(.dark) #sidebar a.bg-white\/10,
[data-theme="white-plus"] #sidebar button.bg-white\/10,
html:not(.dark) #sidebar button.bg-white\/10 {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] #sidebar a.bg-white\/10 i,
html:not(.dark) #sidebar a.bg-white\/10 i,
[data-theme="white-plus"] #sidebar button.bg-white\/10 i,
html:not(.dark) #sidebar button.bg-white\/10 i {
  color: #09090b !important;
}

/* Badges in sidebar */
[data-theme="white-plus"] #sidebar .bg-white\/10,
html:not(.dark) #sidebar .bg-white\/10,
[data-theme="white-plus"] #sidebar .bg-white\/5,
html:not(.dark) #sidebar .bg-white\/5,
[data-theme="white-plus"] #sidebar .bg-\[\#111115\],
html:not(.dark) #sidebar .bg-\[\#111115\],
[data-theme="white-plus"] #sidebar .bg-\[\#1c1c22\],
html:not(.dark) #sidebar .bg-\[\#1c1c22\],
[data-theme="white-plus"] #sidebar .bg-\[\#0a0a0c\],
html:not(.dark) #sidebar .bg-\[\#0a0a0c\] {
  background: #f4f4f5 !important;
  border-color: #e4e4e7 !important;
  color: #09090b !important;
}

[data-theme="white-plus"] #sidebar a:hover,
html:not(.dark) #sidebar a:hover,
[data-theme="white-plus"] #sidebar button:hover,
html:not(.dark) #sidebar button:hover {
  background: #f4f4f5 !important;
  color: #09090b !important;
}

[data-theme="white-plus"] #sidebar .daily-usage-fill,
html:not(.dark) #sidebar .daily-usage-fill {
  background-color: #09090b !important;
}

/* Header in Light Mode */
[data-theme="white-plus"] .glass-header,
html:not(.dark) .glass-header {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: #e2e8f0 !important;
}
[data-theme="white-plus"] .glass-header .text-accent-500,
html:not(.dark) .glass-header .text-accent-500 {
  color: #09090b !important;
}
[data-theme="white-plus"] .glass-header .bg-accent-500\/10,
html:not(.dark) .glass-header .bg-accent-500\/10 {
  background-color: #f1f5f9 !important;
  color: #09090b !important;
}

/* Settings Modal in Light Mode */
[data-theme="white-plus"] #settings-modal,
html:not(.dark) #settings-modal {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] #settings-modal h3,
html:not(.dark) #settings-modal h3,
[data-theme="white-plus"] #settings-modal h4,
html:not(.dark) #settings-modal h4,
[data-theme="white-plus"] #settings-modal label,
html:not(.dark) #settings-modal label {
  color: #09090b !important;
}
[data-theme="white-plus"] #settings-modal .bg-\[\#0a0a0c\],
html:not(.dark) #settings-modal .bg-\[\#0a0a0c\],
[data-theme="white-plus"] #settings-modal .bg-\[\#111115\],
html:not(.dark) #settings-modal .bg-\[\#111115\] {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] #settings-modal select,
html:not(.dark) #settings-modal select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] #settings-modal .border-white\/5,
[data-theme="white-plus"] #settings-modal .border-white\/10,
html:not(.dark) #settings-modal .border-white\/5,
html:not(.dark) #settings-modal .border-white\/10 {
  border-color: #e2e8f0 !important;
}
[data-theme="white-plus"] #settings-modal a,
html:not(.dark) #settings-modal a {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] #settings-modal a:hover,
html:not(.dark) #settings-modal a:hover {
  background: #f1f5f9 !important;
  color: #09090b !important;
}
[data-theme="white-plus"] [data-theme-card].scale-\[1\.03\],
html:not(.dark) [data-theme-card].scale-\[1\.03\] {
  border-color: #09090b !important;
  box-shadow: 0 0 0 2px rgba(9, 9, 11, 0.3) !important;
}

/* Tables in Light Mode */
[data-theme="white-plus"] table thead,
html:not(.dark) table thead {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}
[data-theme="white-plus"] table tbody tr:hover,
html:not(.dark) table tbody tr:hover {
  background-color: #f1f5f9 !important;
}
[data-theme="white-plus"] table td,
[data-theme="white-plus"] table th,
html:not(.dark) table td,
html:not(.dark) table th {
  color: #1e293b !important;
  border-color: #f1f5f9 !important;
}

/* Bento Launchers Light Mode Fallbacks */
[data-theme="white-plus"] .grid .bg-\[\#0a0a0c\],
html:not(.dark) .grid .bg-\[\#0a0a0c\] {
  background-color: #ffffff !important;
  border-color: #e4e4e7 !important;
  box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.04), 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}
[data-theme="white-plus"] .grid .bg-\[\#0a0a0c\]:hover,
html:not(.dark) .grid .bg-\[\#0a0a0c\]:hover {
  background-color: #f8fafc !important;
  border-color: #d4d4d8 !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.07) !important;
}
[data-theme="white-plus"] .grid .bg-\[\#0a0a0c\] h4,
html:not(.dark) .grid .bg-\[\#0a0a0c\] h4 {
  color: #09090b !important;
}
[data-theme="white-plus"] .grid .bg-\[\#0a0a0c\] p,
html:not(.dark) .grid .bg-\[\#0a0a0c\] p {
  color: #71717a !important;
}
[data-theme="white-plus"] .grid .bg-\[\#0a0a0c\] .bg-white\/10,
html:not(.dark) .grid .bg-\[\#0a0a0c\] .bg-white\/10 {
  background-color: #f4f4f5 !important;
  color: #09090b !important;
  border: 1px solid #e4e4e7 !important;
}

/* Chat & Composer in Light Mode */
[data-theme="white-plus"] .glass-composer,
html:not(.dark) .glass-composer {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05) !important;
}
[data-theme="white-plus"] #chat-form textarea,
html:not(.dark) #chat-form textarea {
  color: #09090b !important;
}
[data-theme="white-plus"] #chat-form textarea::placeholder,
html:not(.dark) #chat-form textarea::placeholder {
  color: #71717a !important;
}
[data-theme="white-plus"] #send-btn,
html:not(.dark) #send-btn {
  background: #09090b !important;
  color: #ffffff !important;
}
[data-theme="white-plus"] #send-btn:hover,
html:not(.dark) #send-btn:hover {
  background: #27272a !important;
}
[data-theme="white-plus"] #stop-btn,
html:not(.dark) #stop-btn {
  background: #e4e4e7 !important;
  color: #09090b !important;
}

/* Preloader in Light Mode */
[data-theme="white-plus"] #page-preloader,
html:not(.dark) #page-preloader {
  background-color: #ffffff !important;
}
[data-theme="white-plus"] .preloader-spinner,
html:not(.dark) .preloader-spinner {
  border-color: rgba(0, 0, 0, 0.12) !important;
  border-top-color: #000000 !important;
}

/* Scrollbar support */
* {
  scrollbar-color: var(--border-medium, rgba(255,255,255,0.15)) transparent;
}

/* ==========================================================================
   Apexi AI Dashboard: High-Contrast Hero & Component Theming
   ========================================================================== */

/* Sleek Island Toast Notification */
.toast-island-pill,
#toast-container > div {
  background: #09090b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
}
.toast-island-pill span,
.toast-island-pill i,
#toast-container > div span {
  color: #ffffff !important;
}

/* Hero Agency Badge */
.agency-engine-badge {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #f4f4f5 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
[data-theme="white-plus"] .agency-engine-badge,
html:not(.dark) .agency-engine-badge {
  background: #f1f5f9 !important;
  color: #09090b !important;
  border-color: #e2e8f0 !important;
}

/* Hero Action CTA Buttons (Always High Contrast & Visible) */
.hero-action-store-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.hero-action-store-btn span,
.hero-action-store-btn i {
  color: #ffffff !important;
}
.hero-action-store-btn span[data-i18n="new_badge"],
.hero-action-store-btn span[data-i18n="pro_badge"] {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

.hero-action-chat-btn {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
}
.hero-action-chat-btn span,
.hero-action-chat-btn i {
  color: #000000 !important;
}

/* Light Theme Hero Actions */
[data-theme="white-plus"] .hero-action-store-btn,
html:not(.dark) .hero-action-store-btn {
  background: #f1f5f9 !important;
  color: #09090b !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="white-plus"] .hero-action-store-btn span,
[data-theme="white-plus"] .hero-action-store-btn i,
html:not(.dark) .hero-action-store-btn span,
html:not(.dark) .hero-action-store-btn i {
  color: #09090b !important;
}
[data-theme="white-plus"] .hero-action-store-btn span[data-i18n="new_badge"],
[data-theme="white-plus"] .hero-action-store-btn span[data-i18n="pro_badge"],
html:not(.dark) .hero-action-store-btn span[data-i18n="new_badge"],
html:not(.dark) .hero-action-store-btn span[data-i18n="pro_badge"] {
  background: #e2e8f0 !important;
  color: #09090b !important;
}

[data-theme="white-plus"] .hero-action-chat-btn,
html:not(.dark) .hero-action-chat-btn {
  background: #09090b !important;
  color: #ffffff !important;
  border: 1px solid #09090b !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}
[data-theme="white-plus"] .hero-action-chat-btn span,
[data-theme="white-plus"] .hero-action-chat-btn i,
html:not(.dark) .hero-action-chat-btn span,
html:not(.dark) .hero-action-chat-btn i {
  color: #ffffff !important;
}

/* Chrome Frame & Address Bar in Light Mode */
[data-theme="white-plus"] .chrome-browser-bar,
html:not(.dark) .chrome-browser-bar {
  background: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}
[data-theme="white-plus"] .chrome-address-pill,
html:not(.dark) .chrome-address-pill {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #09090b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}
[data-theme="white-plus"] .chrome-address-pill svg,
[data-theme="white-plus"] .chrome-address-pill span,
html:not(.dark) .chrome-address-pill svg,
html:not(.dark) .chrome-address-pill span {
  color: #09090b !important;
}
[data-theme="white-plus"] .chrome-address-pill button,
html:not(.dark) .chrome-address-pill button {
  color: #64748b !important;
}
[data-theme="white-plus"] .chrome-browser-bar button,
html:not(.dark) .chrome-browser-bar button {
  color: #09090b !important;
}
[data-theme="white-plus"] #header-model-display,
html:not(.dark) #header-model-display {
  color: #09090b !important;
}
[data-theme="white-plus"] #header-model-display i,
html:not(.dark) #header-model-display i {
  color: #09090b !important;
}

/* Light Theme Hero Cards Complete Contrast */
[data-theme="white-plus"] .card-sales-pipeline,
html:not(.dark) .card-sales-pipeline {
  background: #ffffff !important;
  border: 1px solid #e4e4e7 !important;
  color: #09090b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}
[data-theme="white-plus"] .card-sales-pipeline .card-title-jl,
html:not(.dark) .card-sales-pipeline .card-title-jl,
[data-theme="white-plus"] .card-sales-pipeline .hero-stat-large,
html:not(.dark) .card-sales-pipeline .hero-stat-large {
  color: #09090b !important;
}
[data-theme="white-plus"] .card-sales-pipeline .stat-caption-jl,
html:not(.dark) .card-sales-pipeline .stat-caption-jl,
[data-theme="white-plus"] .card-sales-pipeline .meta-row-jl,
html:not(.dark) .card-sales-pipeline .meta-row-jl {
  color: #64748b !important;
}
[data-theme="white-plus"] .card-sales-pipeline .card-action-arrow-btn,
html:not(.dark) .card-sales-pipeline .card-action-arrow-btn {
  background: #f4f4f5 !important;
  color: #09090b !important;
  border: 1px solid #e4e4e7 !important;
}
[data-theme="white-plus"] .card-sales-pipeline .bg-white\/20,
html:not(.dark) .card-sales-pipeline .bg-white\/20 {
  background: #e4e4e7 !important;
}
[data-theme="white-plus"] .card-sales-pipeline .bg-white,
html:not(.dark) .card-sales-pipeline .bg-white {
  background: #09090b !important;
  box-shadow: none !important;
}

[data-theme="white-plus"] .card-lead-number,
html:not(.dark) .card-lead-number {
  background: #ffffff !important;
  border: 1px solid #e4e4e7 !important;
  color: #09090b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}
[data-theme="white-plus"] .card-lead-number .hero-number-center,
html:not(.dark) .card-lead-number .hero-number-center {
  color: #09090b !important;
  text-shadow: none !important;
}
[data-theme="white-plus"] .card-lead-number .percent-dot,
html:not(.dark) .card-lead-number .percent-dot {
  color: #09090b !important;
}
[data-theme="white-plus"] .card-lead-number .orb-badge,
html:not(.dark) .card-lead-number .orb-badge {
  background: #f4f4f5 !important;
  color: #09090b !important;
  border: 1px solid #e4e4e7 !important;
}
[data-theme="white-plus"] .card-lead-number .arc-path-track,
html:not(.dark) .card-lead-number .arc-path-track {
  stroke: rgba(0, 0, 0, 0.2) !important;
}
[data-theme="white-plus"] .card-lead-number .arc-bead,
html:not(.dark) .card-lead-number .arc-bead {
  fill: #09090b !important;
}
[data-theme="white-plus"] .card-lead-number .meta-row-jl,
html:not(.dark) .card-lead-number .meta-row-jl {
  color: #64748b !important;
  border-top-color: #f1f5f9 !important;
}

[data-theme="white-plus"] .card-ai-efficiency,
html:not(.dark) .card-ai-efficiency {
  background: #ffffff !important;
  border: 1px solid #e4e4e7 !important;
  color: #09090b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03) !important;
}
[data-theme="white-plus"] .card-ai-efficiency .card-title-jl,
html:not(.dark) .card-ai-efficiency .card-title-jl,
[data-theme="white-plus"] .card-ai-efficiency .hero-stat-large,
html:not(.dark) .card-ai-efficiency .hero-stat-large {
  color: #09090b !important;
}
[data-theme="white-plus"] .card-ai-efficiency .pulse-beacon,
html:not(.dark) .card-ai-efficiency .pulse-beacon {
  background: #f4f4f5 !important;
  color: #09090b !important;
  border: 1px solid #e4e4e7 !important;
}
[data-theme="white-plus"] .card-ai-efficiency .stat-caption-jl,
html:not(.dark) .card-ai-efficiency .stat-caption-jl,
[data-theme="white-plus"] .card-ai-efficiency .eff-bar-label,
html:not(.dark) .card-ai-efficiency .eff-bar-label,
[data-theme="white-plus"] .card-ai-efficiency .meta-row-jl,
html:not(.dark) .card-ai-efficiency .meta-row-jl {
  color: #64748b !important;
}
[data-theme="white-plus"] .card-ai-efficiency .bar-track,
html:not(.dark) .card-ai-efficiency .bar-track {
  background: #e4e4e7 !important;
}
[data-theme="white-plus"] .card-ai-efficiency .bar-fill,
html:not(.dark) .card-ai-efficiency .bar-fill {
  background: #09090b !important;
}

/* ==========================================================================
   IPHONE & MOBILE DASHBOARD ADAPTATION (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Safe Area Header */
  .safe-pt {
    padding-top: max(8px, env(safe-area-inset-top)) !important;
  }
  .safe-pb {
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
  }

  /* Browser Chrome Bar */
  .chrome-browser-bar {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  .chrome-address-pill {
    padding: 4px 10px !important;
    font-size: 0.72rem !important;
    max-width: 140px !important;
  }
  .chrome-address-pill span {
    font-size: 0.72rem !important;
  }

  /* Segmented Pill Navigation Bar */
  .segmented-pill-nav {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 3px !important;
    max-width: calc(100% - 44px) !important;
  }
  .segmented-pill-nav::-webkit-scrollbar {
    display: none !important;
  }
  .pill-tab-btn {
    padding: 5px 12px !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }

  /* Chat Container Spacing & Ambient Lighting on Mobile */
  #chat-container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    padding-bottom: max(160px, calc(130px + env(safe-area-inset-bottom))) !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    background: radial-gradient(circle at 50% 12%, rgba(16, 185, 129, 0.08) 0%, rgba(99, 102, 241, 0.05) 35%, transparent 65%), var(--bg-canvas) !important;
  }

  /* Hero Section Typography */
  #welcome-screen {
    padding-top: 14px !important;
    padding-bottom: 24px !important;
    gap: 20px !important;
  }
  .page-title {
    font-size: clamp(22px, 6.5vw, 28px) !important;
    line-height: 1.35 !important;
  }

  /* Hero Cards Grid */
  .hero-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
  }
  .hero-card {
    padding: 18px 16px !important;
    border-radius: 20px !important;
    min-height: auto !important;
  }
  .hero-stat-large {
    font-size: 2.2rem !important;
  }
  .hero-number-center {
    font-size: 2.8rem !important;
  }

  /* Action Launchers Grid (Desktop Overview on smaller screens) */
  #welcome-screen .desktop-overview-wrapper .grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }
  #welcome-screen .desktop-overview-wrapper .grid > * {
    padding: 14px !important;
    border-radius: 18px !important;
    min-height: 52px !important;
  }

  /* Mobile Topic Starter Capsules (Compact 2x2 Grid) */
  #welcome-screen .mobile-topic-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  #welcome-screen .mobile-topic-grid > button {
    padding: 9px 10px !important;
    border-radius: 16px !important;
    min-height: auto !important;
    height: auto !important;
  }

  /* Floating Apple-Grade Frosted Composer */
  .glass-composer {
    border-radius: 28px !important;
    background: rgba(14, 14, 18, 0.85) !important;
    backdrop-filter: blur(24px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(190%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    padding: 6px 8px !important;
  }
  #chat-form textarea, #user-input {
    font-size: 16px !important;
    line-height: 1.45 !important;
    padding: 8px 8px !important;
    max-height: 100px !important;
  }
  #send-btn, #stop-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 18px !important;
  }

  /* Messages Area on Mobile */
  #messages-area {
    gap: 16px !important;
    padding-top: 12px !important;
    padding-bottom: 24px !important;
  }

  /* Mobile Sidebar */
  #sidebar {
    width: min(300px, 86vw) !important;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.7) !important;
  }
}

/* Extra Compact Phones (< 375px) */
@media (max-width: 374px) {
  .chrome-address-pill {
    display: none !important;
  }
  .page-title {
    font-size: 20px !important;
  }
  .hero-stat-large {
    font-size: 1.9rem !important;
  }
}

/* ==========================================================================
   USD Wallet Recharge Modal & Token Top-Up Flow (Theme-Resilient & Mobile-Safe)
   ========================================================================== */
#global-usd-recharge-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

#global-usd-recharge-modal.is-open,
#global-usd-recharge-modal.flex:not(.hidden) {
  display: flex !important;
}

.recharge-modal-card {
  background: var(--bg-surface-elevated, #0a0a0f) !important;
  color: var(--text-primary, #ffffff) !important;
  border: 1px solid var(--border-medium, rgba(255, 255, 255, 0.14)) !important;
  border-radius: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
}

.recharge-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (max-width: 480px) {
  .recharge-presets-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.bank-card-display,
#global-recharge-card-num,
.page-recharge-card-num {
  direction: ltr !important;
  unicode-bidi: isolate !important;
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: 0.12em !important;
}

/* Light Mode Overrides for Token Recharge Flow */
[data-theme="white-plus"] #global-usd-recharge-modal,
html:not(.dark) #global-usd-recharge-modal {
  background: rgba(15, 23, 42, 0.65) !important;
}

[data-theme="white-plus"] .recharge-modal-card,
html:not(.dark) .recharge-modal-card {
  background: #ffffff !important;
  color: #09090b !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="white-plus"] .recharge-modal-card h3,
html:not(.dark) .recharge-modal-card h3 {
  color: #09090b !important;
}

[data-theme="white-plus"] .recharge-modal-card p,
html:not(.dark) .recharge-modal-card p {
  color: #64748b !important;
}

[data-theme="white-plus"] .recharge-modal-card input:not([type="submit"]):not([type="button"]),
html:not(.dark) .recharge-modal-card input:not([type="submit"]):not([type="button"]) {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #09090b !important;
}

[data-theme="white-plus"] .recharge-modal-card .global-usd-preset-btn,
html:not(.dark) .recharge-modal-card .global-usd-preset-btn {
  background-color: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="white-plus"] .recharge-modal-card .global-usd-preset-btn span.text-zinc-300,
html:not(.dark) .recharge-modal-card .global-usd-preset-btn span.text-zinc-300 {
  color: #1e293b !important;
}




/* Shared phone safeguards. This file is appended to every page stylesheet. */
@media (max-width: 700px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  html, body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  img, picture, video, canvas, svg {
    max-width: 100%;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea {
    font-size: 16px !important; /* prevents Safari's focus-zoom */
  }

  button, a, input, select, textarea {
    touch-action: manipulation;
  }

  pre, code {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .overflow-x-auto, .overflow-x-scroll, [class*="overflow-x-auto"], [class*="overflow-x-scroll"] {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  #modal-overlay > *, [role="dialog"] {
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 2rem);
  }
}

/* ==========================================================================
   Package B: Apple HIG & Mobile UX Refinement (PRD 1.2 / MOBILE_UX_SKILL)
   ========================================================================== */

/* 1. Touch-First Target Size & Thumb Zone Layout */
button, a, .chip, input, select, [role="button"] {
  min-height: 44px;
}

/* 2. Horizontal Snap Chips for Categories & Filters */
.mobile-chip-bar,
.category-chips,
.am-categories-grid,
.am-category-chips,
.industry-category-list,
.nexus-category-list {
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 8px 12px !important;
  scrollbar-width: none !important;
}
.mobile-chip-bar::-webkit-scrollbar,
.category-chips::-webkit-scrollbar,
.am-categories-grid::-webkit-scrollbar,
.am-category-chips::-webkit-scrollbar,
.industry-category-list::-webkit-scrollbar,
.nexus-category-list::-webkit-scrollbar {
  display: none !important;
}
.mobile-chip-bar .chip,
.mobile-chip-bar > *,
.category-chips > *,
.industry-category,
.nexus-category,
.am-category-chip,
.am-category-item {
  scroll-snap-align: start !important;
  flex-shrink: 0 !important;
  padding: 8px 16px !important;
  border-radius: 9999px !important;
  font-size: 14px !important;
  white-space: nowrap !important;
}

/* 3. Mobile Product Grid & Uniform Aspect Ratios (< 640px) */
@media (max-width: 639.98px) {
  .product-grid,
  .catalog-grid,
  .am-products-grid,
  .industry-product-grid,
  .industry-catalog-grid,
  .nexus-product-grid,
  .nexus-catalog-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .product-card,
  .catalog-card,
  .am-product-card,
  .industry-product-card,
  .industry-catalog-card,
  .nexus-product-card,
  .nexus-catalog-card {
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    overflow: hidden !important;
  }

  .product-card img,
  .catalog-image img,
  .am-product-img-container img,
  .am-product-card img,
  .industry-product-image img,
  .industry-catalog-image img,
  .nexus-product-image img,
  .nexus-catalog-image img {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
  }

  .product-card .title,
  .catalog-copy h3,
  .catalog-card h3,
  .am-product-title,
  .industry-product-copy h3,
  .industry-catalog-copy h2,
  .nexus-product-copy h3,
  .nexus-catalog-copy h2 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    min-height: 36px !important;
  }
}

/* 4. Floating Action Buttons (FAB) Collision Fix */
@media (max-width: 639.98px) {
  .whatsapp-floating-btn,
  .whatsapp-fab,
  .support-fab,
  .direct-support-fab,
  #whatsapp-floating-btn,
  [data-fab="whatsapp"],
  .floating-contact,
  .am-fab-whatsapp {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 998 !important;
  }

  .ai-assistant-widget,
  .ai-floating-btn,
  .ai-fab,
  #ai-assistant-bubble,
  #ai-chat-fab,
  [data-fab="ai"],
  .floating-ai-btn,
  .am-fab-ai {
    position: fixed !important;
    bottom: 85px !important;
    right: 20px !important;
    z-index: 997 !important;
  }
}

/* 5. Sticky Bottom Purchase Bar (Product Details View) */
.sticky-buy-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(18, 18, 24, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 990;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

@media (min-width: 641px) {
  .sticky-buy-bar.mobile-only {
    display: none !important;
  }
}

/* 6. Bottom Sheet Drawer (Cart & Checkout Modal on Screens < 640px) */
@media (max-width: 640px) {
  .modal-dialog,
  .checkout-modal,
  .cart-drawer,
  .bottom-sheet,
  .modal-sheet,
  .industry-modal-card,
  .nexus-modal-card {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 24px 24px 0 0 !important;
    transform: translateY(0) !important;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
