/* Opt-in palette. The original dark stylesheet remains the default. */
.theme-light {
  --bg-base: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #eef2f8;
  --bg-surface-hover: #e5ebf5;
  --bg-card: rgba(255, 255, 255, .96);
  --border-subtle: #d3dce9;
  --border-active: #4f46e5;
  --text-primary: #172033;
  --text-secondary: #34445c;
  --text-muted: #50627b;
  --accent-primary: #4338ca;
  --accent-primary-hover: #3730a3;
  --accent-cyan: #075985;
  --accent-emerald: #047857;
  --accent-amber: #92400e;
  --accent-rose: #be123c;
  --shadow-sm: 0 1px 3px rgba(22, 34, 54, .12);
  --shadow-md: 0 4px 14px rgba(22, 34, 54, .13);
  --shadow-lg: 0 12px 34px rgba(22, 34, 54, .17);
}
.theme-light .top-nav { background: rgba(255,255,255,.96); }
.theme-light .demo-bar,
.theme-light .saas-footer { background: #edf2f8; }
.theme-light .product-card-img-wrapper { background: #e8eef5; }
.theme-light .terminal-tabs,
.theme-light .cart-customer-bar,
.theme-light .cart-actions,
.theme-light .cart-footer { background: #ffffff; }
.theme-light .cart-items-scroll { scrollbar-color: #a5b4fc #eef2f8; }
.theme-light .cart-items-scroll::-webkit-scrollbar-track { background: #eef2f8; }
.theme-light .product-stock-pill:not(.out-of-stock) { background: rgba(255,255,255,.94); color: #243349; }
.theme-light .first-run-checklist-card { background: linear-gradient(135deg,#fff,#eef2ff); }
.theme-light .footer-brand .brand-title,
.theme-light .footer-col h5,
.theme-light .footer-dev-col .footer-dev-name { color: var(--text-primary); }
.theme-light .footer-dev-col .footer-dev-badge { background: #fff; border-color: var(--border-subtle); }
.theme-light .badge-cancelled { color: #334155; }
.theme-light .top-nav-dropdown-menu { box-shadow: var(--shadow-lg); }
.theme-light input,
.theme-light select,
.theme-light textarea { color-scheme: light; }
.theme-light input::placeholder,
.theme-light textarea::placeholder { color: #64748b; opacity: 1; }
.theme-light .btn-secondary:hover,
.theme-light .demo-role-btn:hover { border-color: #a6b5ca; }
.theme-light .footer-col ul li a:hover { color: #3730a3; }
.theme-light .footer-contact-link:hover,
.theme-light .footer-pill-link:hover { color: #3730a3; }
.theme-light .footer-social-btn { background: #fff; border-color: var(--border-subtle); color: #34445c; }
.theme-light .footer-pill-link { background: #fff; border-color: var(--border-subtle); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  flex: 0 0 auto; min-height: 34px; padding: 6px 10px;
  color: var(--text-primary); background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  font: 600 .78rem var(--font-sans); cursor: pointer;
}
.theme-toggle:hover { background: var(--bg-surface-hover); border-color: var(--border-active); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
@media (max-width: 900px) {
  .theme-toggle { width: 36px; padding: 6px; }
  .theme-toggle-label { display: none; }
}

/* POS compact product cards and view switcher (light theme). */
.theme-light .pos-category-row { background: #f1f5f9; }
.theme-light .product-pos-card-compact .pc-price { color: #4338ca; }
.theme-light .product-pos-card-compact .pc-stock { color: #64748b; }
.theme-light .product-pos-card-compact .pc-stock.is-low { color: #b45309; }
.theme-light .product-pos-card-compact .pc-stock.is-out { color: #dc2626; }
.theme-light .product-pos-card-compact .pc-add { background: #dcfce7; color: #047857; }
.theme-light .pos-view-toggle button { background: #fff; color: #475569; border-color: #cbd5e1; }
.theme-light .pos-view-toggle button.active { background: #4f46e5; border-color: #4f46e5; color: #fff; }

/* Customer / supplier balance tags need darker ink on the light surface. */
.theme-light .balance-tag.badge-success { background: #dcfce7; color: #047857; border-color: #86efac; }
.theme-light .balance-tag.badge-danger { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.theme-light .balance-tag.badge-subtle { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
