:root{
  --page-bg:#f6f7f9;
  --card-bg:#ffffff;
  --card-muted:#f9fafb;
  --card-hover:#f4f5f7;
  --input-bg:#ffffff;
  --overlay-bg:rgba(15,23,42,.52);
  --sidebar-bg:rgba(255,255,255,.97);
  --text-strong:#111827;
  --text-normal:#374151;
  --text-muted:#6b7280;
  --text-faint:#9ca3af;
  --line:#e5e7eb;
  --line-strong:#d1d5db;
  --accent-text:#4f46e5;
  --accent-panel:#f1efff;
  --accent-border:#d9d4ff;
  --neutral-chip:#f3f4f6;
  --neutral-chip-text:#52525b;
  --blue-panel:#eff6ff;
  --blue-text:#2563eb;
  --green-panel:#ecfdf3;
  --green-text:#15803d;
  --amber-panel:#fff7ed;
  --amber-text:#b45309;
  --red-panel:#fff1f2;
  --red-text:#b42318;
  --shadow-ui:0 12px 30px rgba(16,24,40,.08);
}
.dark-theme{
  --page-bg:#0d1016;
  --card-bg:#171a22;
  --card-muted:#1d212b;
  --card-hover:#232833;
  --input-bg:#12151c;
  --overlay-bg:rgba(0,0,0,.66);
  --sidebar-bg:rgba(20,23,31,.98);
  --text-strong:#f5f7fb;
  --text-normal:#d9dde7;
  --text-muted:#a8afbd;
  --text-faint:#7d8595;
  --line:#2b313d;
  --line-strong:#3b4352;
  --accent-text:#b9b2ff;
  --accent-panel:#282442;
  --accent-border:#4a426f;
  --neutral-chip:#262b35;
  --neutral-chip-text:#d4d8e1;
  --blue-panel:#17243a;
  --blue-text:#8ebcff;
  --green-panel:#163226;
  --green-text:#7ee2a8;
  --amber-panel:#392918;
  --amber-text:#f3bd72;
  --red-panel:#3a1d24;
  --red-text:#ff9ba8;
  --shadow-ui:0 18px 44px rgba(0,0,0,.35);
}
html,body,.main{background:var(--page-bg);color:var(--text-strong)}
.sidebar{background:var(--sidebar-bg)!important;border-color:var(--line)!important}
.topbar{border-color:var(--line)}
.panel,.stat,.inventory-card,.stock-card,.data-card,.inventory-summary article,.table-surface,.data-list,.modal-card,.command-panel,.notification-center,.auth-card,.quote-document,.calendar-grid,.empty-state{background:var(--card-bg)!important;color:var(--text-strong);border-color:var(--line)!important}
.stat,.panel,.inventory-card,.stock-card,.data-card,.inventory-summary article,.trial-badge,.theme-switcher{box-shadow:var(--shadow-sm)}
label,.nav-item,.quick-action{color:var(--text-normal)}
.topbar p,.page-title p,.dashboard-welcome p,.panel-copy,.data-card p,.data-card small,.event-item div span,.chart-summary span,.task-row small,.stock-head small,.stock-card footer,.muted,.quote-meta,.quote-money small,.account-trigger-copy small,.command-item small,.notification-item small{color:var(--text-muted)!important}
input,select,textarea{background:var(--input-bg)!important;color:var(--text-strong)!important;border-color:var(--line-strong)!important}
input::placeholder,textarea::placeholder{color:var(--text-faint)!important}
input:hover,select:hover,textarea:hover{border-color:color-mix(in srgb,var(--line-strong) 60%,var(--accent) 40%)!important}
.primary{background:var(--surface-strong);color:var(--page-bg)}
.dark-theme .primary{background:#f4f4f5;color:#111827}
.secondary,.icon-btn,.quick-action,.account-trigger,.mobile-menu-btn{background:var(--card-bg)!important;color:var(--text-normal)!important;border-color:var(--line)!important}
.secondary:hover,.icon-btn:hover,.quick-action:hover,.account-trigger:hover,.mobile-menu-btn:hover{background:var(--card-hover)!important;color:var(--text-strong)!important;border-color:var(--line-strong)!important}
.nav-item{background:transparent!important}
.nav-item:hover{background:var(--card-hover)!important;color:var(--text-strong)!important}
.nav-item.active{background:var(--accent-panel)!important;color:var(--accent-text)!important}
.purple,.link-btn,.featured strong,.date-chip,.count-badge{color:var(--accent-text)!important}
.accent,.recommended,.featured,.date-chip,.count-badge,.stat-icon,.command-item:hover,.command-item.active{background:var(--accent-panel)!important;border-color:var(--accent-border)!important}
.price-row>div,.result-price,.addons label,.event-item time,.reservation-columns section,.calendar-weekday,.muted-day,.notification-item,.command-search kbd,.command-item kbd,.command-panel footer{background:var(--card-muted)!important;border-color:var(--line)!important}
.data-list .data-card:hover,.table-surface .data-card:hover{background:var(--card-hover)!important}
.empty-state{border-style:dashed!important}
.modal,.command-backdrop,.auth-modal-backdrop{background:var(--overlay-bg)!important}


.account-menu-separator{background:var(--line)!important}
.trial-badge{background:linear-gradient(135deg,var(--accent-panel),var(--card-muted))!important;border-color:var(--accent-border)!important}
.trial-badge:hover{background:var(--accent-panel)!important}
.inventory-tabs{background:var(--card-muted)!important}
.inventory-tabs button{color:var(--text-muted)!important}
.inventory-tabs button.active{background:var(--card-bg)!important;color:var(--text-strong)!important}
.stock-card.low-stock{background:color-mix(in srgb,var(--red-panel) 45%,var(--card-bg))!important;border-color:color-mix(in srgb,var(--red-text) 40%,var(--line))!important}
.inventory-card .bar,.stock-card .bar{background:var(--card-hover)!important}
.status-lead,.status-draft,.event-item em.waiting{background:var(--neutral-chip)!important;color:var(--neutral-chip-text)!important}
.status-quoted,.status-sent{background:var(--blue-panel)!important;color:var(--blue-text)!important}
.status-approved,.status-completed,.trend-pill,.ai-status{background:var(--green-panel)!important;color:var(--green-text)!important}
.status-preparing{background:var(--amber-panel)!important;color:var(--amber-text)!important}
.status-cancelled,.status-rejected,.status-expired,.risk-alert{background:var(--red-panel)!important;color:var(--red-text)!important;border-color:color-mix(in srgb,var(--red-text) 35%,var(--line))!important}
.ai-result{background:var(--accent-panel)!important;border-color:var(--accent-border)!important}
.ai-result-grid div{background:var(--card-bg)!important;border-color:var(--line)!important}
.bar-chart i{background:color-mix(in srgb,var(--accent) 35%,var(--card-muted))!important}
.bar-chart .current i{background:var(--accent)!important}
.calendar-day{border-color:var(--line)!important}
.calendar-event{color:var(--text-strong)}
.command-icon{background:var(--card-muted)!important;color:var(--text-strong)}
.command-item.active .command-icon{background:var(--card-bg)!important}
.notification-dot{border-color:var(--card-bg)!important}
.notification-center header,.command-search,.command-panel footer{border-color:var(--line)!important}
.notification-item:hover{background:var(--card-hover)!important}
.toast{background:var(--text-strong);color:var(--page-bg)}
.auth-screen{background:radial-gradient(circle at 20% 0,color-mix(in srgb,var(--accent) 10%,transparent),transparent 32%),var(--page-bg)!important}
.auth-tabs{background:var(--card-muted)!important}
.auth-tabs button{color:var(--text-muted)!important}
.auth-tabs button.active{background:var(--card-bg)!important;color:var(--text-strong)!important}
.theme-switcher.sidebar-theme-switcher{position:static!important;inset:auto!important;width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;margin-top:auto;background:var(--card-muted)!important;border:1px solid var(--line)!important;border-radius:13px;box-shadow:none!important;backdrop-filter:none}
.theme-switcher.sidebar-theme-switcher button{width:auto;height:42px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 7px;border:0;border-radius:9px;background:transparent;color:var(--text-muted)}
.theme-switcher.sidebar-theme-switcher button small{font-size:10px;font-weight:700;color:inherit}
.theme-switcher.sidebar-theme-switcher button span{font-size:15px;line-height:1}
.theme-switcher.sidebar-theme-switcher button:hover{background:var(--card-hover);color:var(--text-strong)}
.theme-switcher.sidebar-theme-switcher button.active{background:var(--card-bg)!important;color:var(--accent-text)!important;box-shadow:var(--shadow-sm)}
.sidebar-account-host{margin-top:8px!important}
@media(max-width:1100px) and (min-width:701px){
  .theme-switcher.sidebar-theme-switcher{grid-template-columns:1fr;padding:4px}
  .theme-switcher.sidebar-theme-switcher button{height:34px}
  .theme-switcher.sidebar-theme-switcher button small{display:none}
}
@media(max-width:700px){
  body{background:var(--page-bg)!important}
  .sidebar{background:var(--sidebar-bg)!important}
  .theme-switcher.sidebar-theme-switcher{margin-top:8px}
  .theme-switcher.sidebar-theme-switcher button{height:38px}
  .mobile-sidebar-backdrop{background:var(--overlay-bg)!important}
  .notification-center{top:70px;left:14px;right:14px;width:auto}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
/* Public landing and authentication theme completion */
.dark-theme .landing-shell,.dark-theme .landing-header,.dark-theme .landing-hero,.dark-theme .landing-section,.dark-theme .final-cta{background:var(--page-bg)!important;color:var(--text-strong)!important}
.dark-theme .landing-header{border-color:var(--line)!important}
.dark-theme .landing-logo,.dark-theme .landing-nav a,.dark-theme .landing-login,.dark-theme .hero-copy h1,.dark-theme .section-heading h2,.dark-theme .audience-card h2,.dark-theme .final-cta h2,.dark-theme .feature-grid h3{color:var(--text-strong)!important}
.dark-theme .hero-copy p,.dark-theme .hero-proof,.dark-theme .section-heading p,.dark-theme .audience-card p,.dark-theme .final-cta p,.dark-theme .feature-grid p,.dark-theme .landing-footer{color:var(--text-muted)!important}
.dark-theme .landing-hero{background:radial-gradient(circle at 12% 15%,rgba(31,183,240,.10),transparent 30%),radial-gradient(circle at 88% 25%,rgba(121,55,235,.13),transparent 35%),var(--page-bg)!important}
.dark-theme .visual-window,.dark-theme .feature-grid article,.dark-theme .audience-card,.dark-theme .floating-card{background:var(--card-bg)!important;color:var(--text-strong)!important;border-color:var(--line)!important}
.dark-theme .visual-top,.dark-theme .visual-sidebar,.dark-theme .visual-stats article,.dark-theme .visual-chart,.dark-theme .visual-events{background:var(--card-muted)!important;border-color:var(--line)!important}
.dark-theme .visual-title{background:var(--text-strong)!important}
.dark-theme .visual-sidebar b,.dark-theme .visual-events b{background:var(--card-hover)!important}
.dark-theme .visual-stats strong,.dark-theme .floating-card strong{color:var(--text-strong)!important}
.dark-theme .visual-stats small,.dark-theme .floating-card span{color:var(--text-muted)!important}
.dark-theme .logo-strip,.dark-theme .landing-footer{background:var(--page-bg)!important;border-color:var(--line)!important}
.dark-theme .logo-strip span{color:var(--text-normal)!important}
.dark-theme .audience-section{background:color-mix(in srgb,var(--page-bg) 90%,var(--accent) 10%)!important}
.dark-theme .audience-metrics article{background:linear-gradient(135deg,var(--card-muted),var(--accent-panel))!important}
.dark-theme .auth-close{background:var(--card-muted)!important;color:var(--text-normal)!important}

/* ChatGPT-inspired icon-only theme control */
.theme-switcher.sidebar-theme-switcher{
  width:max-content;
  min-width:132px;
  align-self:center;
  grid-template-columns:repeat(3,40px);
  gap:2px;
  padding:3px;
  border-radius:12px;
  background:var(--card-muted)!important;
}
.theme-switcher.sidebar-theme-switcher button{
  position:relative;
  width:40px;
  height:36px;
  min-width:40px;
  padding:0;
  border-radius:9px;
  color:var(--text-muted);
  overflow:visible;
}
.theme-switcher.sidebar-theme-switcher button svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.75;
  stroke-linecap:round;
  stroke-linejoin:round;
  pointer-events:none;
}
.theme-switcher.sidebar-theme-switcher button[data-theme="auto"] svg path{fill:currentColor;stroke:none;opacity:.9}
.theme-switcher.sidebar-theme-switcher button:hover{background:var(--card-hover)!important;color:var(--text-strong)!important}
.theme-switcher.sidebar-theme-switcher button.active{
  background:var(--card-bg)!important;
  color:var(--text-strong)!important;
  box-shadow:0 1px 3px rgba(15,23,42,.12),0 0 0 1px var(--line)!important;
}
.theme-switcher.sidebar-theme-switcher button::after{
  content:attr(title);
  position:absolute;
  right:50%;
  bottom:calc(100% + 8px);
  transform:translateX(50%) translateY(3px);
  padding:5px 8px;
  border-radius:7px;
  background:var(--text-strong);
  color:var(--page-bg);
  font-size:10px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .14s ease,transform .14s ease,visibility .14s ease;
  z-index:20;
}
.theme-switcher.sidebar-theme-switcher button:hover::after,
.theme-switcher.sidebar-theme-switcher button:focus-visible::after{
  opacity:1;
  visibility:visible;
  transform:translateX(50%) translateY(0);
}
.theme-switcher.sidebar-theme-switcher button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:1100px) and (min-width:701px){
  .theme-switcher.sidebar-theme-switcher{min-width:44px;grid-template-columns:40px;gap:2px}
  .theme-switcher.sidebar-theme-switcher button{width:40px;height:36px}
}
@media(max-width:700px){
  .theme-switcher.sidebar-theme-switcher{width:max-content;min-width:144px;grid-template-columns:repeat(3,44px);padding:4px}
  .theme-switcher.sidebar-theme-switcher button{width:44px;height:42px;min-width:44px}
  .theme-switcher.sidebar-theme-switcher button svg{width:19px;height:19px}
  .theme-switcher.sidebar-theme-switcher button::after{display:none}
}

/* Unified BLC outline icon system */
.blc-icon{width:18px;height:18px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.icon-btn .blc-icon,.modal-close .blc-icon{width:18px;height:18px}
.command-icon .blc-icon{width:17px;height:17px;margin:auto}
.toast-symbol .blc-icon{width:16px;height:16px}
.theme-switcher .blc-icon{width:18px;height:18px}
