/* ══════════════════════════════════════════════════════
   FW-BO GLASS THEME — LIGHT MODE
   Activated when: html:not([data-theme="dark"])
   Based on warm stone palette from login prototype
   ══════════════════════════════════════════════════════ */

html:not([data-theme="dark"]) {

  /* ── Core Palette ── */
  --fw-bo-bg-deep: #fafaf9;
  --fw-bo-bg-charcoal: #f5f5f4;
  --fw-bo-bg-warm: #e7e5e4;
  --fw-bo-glass-bg: rgba(255, 255, 255, 0.7);
  --fw-bo-glass-bg-dark: rgba(0, 0, 0, 0.03);
  --fw-bo-glass-bg-hover: rgba(0, 0, 0, 0.02);
  --fw-bo-glass-border: rgba(0, 0, 0, 0.08);
  --fw-bo-glass-border-light: rgba(0, 0, 0, 0.05);

  /* ── Accents (slightly darker for light bg readability) ── */
  --fw-bo-orange: #ea580c;
  --fw-bo-orange-dark: #c2410c;
  --fw-bo-orange-glow: rgba(234, 88, 12, 0.25);
  --fw-bo-orange-subtle: rgba(234, 88, 12, 0.08);
  --fw-bo-amber: #d97706;
  --fw-bo-copper: #92400e;

  /* ── Semantic ── */
  --fw-bo-success: #059669;
  --fw-bo-success-light: #047857;
  --fw-bo-success-bg: rgba(5, 150, 105, 0.08);
  --fw-bo-success-border: rgba(5, 150, 105, 0.2);
  --fw-bo-danger: #dc2626;
  --fw-bo-danger-light: #b91c1c;
  --fw-bo-danger-bg: rgba(220, 38, 38, 0.08);
  --fw-bo-danger-border: rgba(220, 38, 38, 0.2);
  --fw-bo-warning: #d97706;
  --fw-bo-warning-light: #b45309;
  --fw-bo-warning-bg: rgba(217, 119, 6, 0.08);
  --fw-bo-warning-border: rgba(217, 119, 6, 0.2);
  --fw-bo-info: #2563eb;
  --fw-bo-info-light: #1d4ed8;
  --fw-bo-info-bg: rgba(37, 99, 235, 0.08);
  --fw-bo-info-border: rgba(37, 99, 235, 0.2);

  /* ── Text ── */
  --fw-bo-text-primary: #1c1917;
  --fw-bo-text-secondary: #44403c;
  --fw-bo-text-muted: #57534e;
  --fw-bo-text-dim: #78716c;
  --fw-bo-text-ghost: #a8a29e;

  /* ── Overlay / Semi-transparent ── */
  --fw-bo-overlay-light: rgba(0, 0, 0, 0.03);
  --fw-bo-overlay-lighter: rgba(0, 0, 0, 0.02);
  --fw-bo-overlay-lightest: rgba(0, 0, 0, 0.01);
  --fw-bo-overlay-medium: rgba(0, 0, 0, 0.04);
  --fw-bo-overlay-strong: rgba(0, 0, 0, 0.06);
  --fw-bo-overlay-dark: rgba(0, 0, 0, 0.06);
  --fw-bo-overlay-darker: rgba(0, 0, 0, 0.1);
  --fw-bo-overlay-modal: rgba(0, 0, 0, 0.4);
  --fw-bo-border-subtle: rgba(0, 0, 0, 0.1);
  --fw-bo-border-faint: rgba(0, 0, 0, 0.05);
  --fw-bo-border-hairline: rgba(0, 0, 0, 0.06);
  --fw-bo-border-light: rgba(0, 0, 0, 0.08);

  /* ── Component Surfaces ── */
  --fw-bo-input-bg: rgba(255, 255, 255, 0.9);
  --fw-bo-accent-text: #c2410c;
  --fw-bo-tbody-bg: rgba(0, 0, 0, 0.015);
  --fw-bo-footer-bg: rgba(0, 0, 0, 0.02);
  --fw-bo-pagination-bg: rgba(0, 0, 0, 0.02);
  --fw-bo-fee-item-bg: rgba(0, 0, 0, 0.02);
  --fw-bo-skeleton-from: rgba(0, 0, 0, 0.04);
  --fw-bo-skeleton-to: rgba(0, 0, 0, 0.08);
  --fw-bo-ambient-primary: rgba(249, 115, 22, 0.04);
  --fw-bo-ambient-secondary: rgba(251, 191, 36, 0.03);
  --fw-bo-badge-neutral-bg: rgba(120, 113, 108, 0.08);
  --fw-bo-badge-neutral-border: rgba(120, 113, 108, 0.15);
  --fw-bo-card-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.5) 100%);
  --fw-bo-modal-bg: linear-gradient(135deg, #ffffff 0%, #f5f5f4 100%);

  /* ── Shadows ── */
  --fw-bo-shadow-glass: 0 4px 24px 0 rgba(0, 0, 0, 0.06);
  --fw-bo-shadow-inner: inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
  --fw-bo-shadow-glow: 0 4px 16px rgba(234, 88, 12, 0.2);
  --fw-bo-shadow-glow-strong: 0 8px 30px rgba(234, 88, 12, 0.3);
  --fw-bo-shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}


/* ══════════════════════════════════════════════════════
   COMPONENT-LEVEL OVERRIDES
   For remaining hardcoded values in glass-theme.css
   ══════════════════════════════════════════════════════ */

html:not([data-theme="dark"]) .fw-bo-glass-accent {
  border-color: rgba(234, 88, 12, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-btn-primary {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: white;
}

html:not([data-theme="dark"]) .fw-bo-btn-save {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: white;
}

html:not([data-theme="dark"]) .fw-bo-btn-danger:hover {
  background: rgba(220, 38, 38, 0.12);
}

html:not([data-theme="dark"]) .fw-bo-btn-delete:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}

html:not([data-theme="dark"]) .fw-bo-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2378716c'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

html:not([data-theme="dark"]) .fw-bo-select option {
  background: #ffffff;
  color: #1c1917;
}

html:not([data-theme="dark"]) .fw-bo-modal {
  border-color: rgba(234, 88, 12, 0.15);
}

html:not([data-theme="dark"]) .fw-bo-modal-header {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.06) 0%, transparent 100%);
}

html:not([data-theme="dark"]) .fw-bo-detail-card-header {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.06) 0%, transparent 100%);
}

html:not([data-theme="dark"]) .fw-bo-page-btn-active {
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.4);
  color: #c2410c;
}

/* ── Stat card gradient ── */
html:not([data-theme="dark"]) .fw-bo-stat-card::before {
  background: radial-gradient(circle, rgba(234, 88, 12, 0.06) 0%, transparent 70%);
}

/* ── Toast variants ── */
html:not([data-theme="dark"]) .fw-bo-toast--success {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.2);
  color: #047857;
}

html:not([data-theme="dark"]) .fw-bo-toast--error {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.2);
  color: #b91c1c;
}

/* ── Fee/Limit Type Badges (darkened for light bg) ── */
html:not([data-theme="dark"]) .fw-bo-badge-com {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-badge-tva {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-badge-ddt {
  background: rgba(75, 85, 99, 0.08);
  color: #4b5563;
  border-color: rgba(75, 85, 99, 0.15);
}

html:not([data-theme="dark"]) .fw-bo-badge-pl {
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
  border-color: rgba(234, 88, 12, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-badge-tx {
  background: rgba(109, 40, 217, 0.08);
  color: #6d28d9;
  border-color: rgba(109, 40, 217, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-badge-1t {
  background: rgba(120, 113, 108, 0.08);
  color: #57534e;
  border-color: rgba(120, 113, 108, 0.15);
}

html:not([data-theme="dark"]) .fw-bo-badge-1d {
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-badge-1w {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-badge-1m {
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
  border-color: rgba(234, 88, 12, 0.2);
}

/* ── Wizard steps ── */
html:not([data-theme="dark"]) .fw-bo-step-number {
  border-color: rgba(0, 0, 0, 0.15);
}

html:not([data-theme="dark"]) .fw-bo-step-active .fw-bo-step-number {
  box-shadow: 0 0 16px rgba(234, 88, 12, 0.3);
}

html:not([data-theme="dark"]) .fw-bo-step-completed .fw-bo-step-number {
  background: #059669;
  border-color: #059669;
}

/* ── Config card hover ── */
html:not([data-theme="dark"]) .fw-bo-config-card:hover {
  border-color: rgba(234, 88, 12, 0.2);
}

html:not([data-theme="dark"]) .fw-bo-card-hover:hover {
  border-color: rgba(234, 88, 12, 0.25);
  box-shadow: 0 8px 24px rgba(234, 88, 12, 0.08);
}

/* ── Icon button hover colors ── */
html:not([data-theme="dark"]) .fw-bo-icon-btn:hover {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.25);
  color: #c2410c;
}

html:not([data-theme="dark"]) .fw-bo-icon-btn-delete:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

/* ── Alert variants ── */
html:not([data-theme="dark"]) .fw-bo-alert-error {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.15);
  color: #b91c1c;
}

html:not([data-theme="dark"]) .fw-bo-alert-success {
  background: rgba(5, 150, 105, 0.06);
  border-color: rgba(5, 150, 105, 0.15);
  color: #047857;
}

html:not([data-theme="dark"]) .fw-bo-alert-warning {
  background: rgba(217, 119, 6, 0.06);
  border-color: rgba(217, 119, 6, 0.15);
  color: #92400e;
}

/* ── Ambient background (softer glow on light) ── */
html:not([data-theme="dark"]) .fw-bo-ambient-bg::before {
  filter: blur(120px);
  opacity: 0.7;
}

html:not([data-theme="dark"]) .fw-bo-ambient-bg::after {
  filter: blur(120px);
  opacity: 0.6;
}

/* ── Body background ── */
html:not([data-theme="dark"]) {
  background-color: #fafaf9;
  color: #1c1917;
}

/* ── Lifecycle badges (light mode — darker text for readability) ── */
html:not([data-theme="dark"]) .fw-bo-lifecycle--completed { color: #059669; border-color: rgba(5,150,105,0.25); background: rgba(5,150,105,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--completed::before { background: #059669; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--simulated { color: #2563eb; border-color: rgba(37,99,235,0.25); background: rgba(37,99,235,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--simulated::before { background: #2563eb; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--rejected-sim { color: #dc2626; border-color: rgba(220,38,38,0.25); background: rgba(220,38,38,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--rejected-sim::before { background: #dc2626; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--reversed { color: #c2410c; border-color: rgba(194,65,12,0.25); background: rgba(194,65,12,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--reversed::before { background: #c2410c; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--reversed-next { color: #9a3412; border-color: rgba(154,52,18,0.25); background: rgba(154,52,18,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--reversed-next::before { background: #9a3412; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--partial { color: #92400e; border-color: rgba(146,64,14,0.25); background: rgba(146,64,14,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--partial::before { background: #d97706; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--rejected { color: #dc2626; border-color: rgba(220,38,38,0.25); background: rgba(220,38,38,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--rejected::before { background: #dc2626; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--processing { color: #2563eb; border-color: rgba(37,99,235,0.25); background: rgba(37,99,235,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--processing::before { background: #2563eb; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--douteuse { color: #92400e; border-color: rgba(217,119,6,0.25); background: rgba(217,119,6,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--douteuse::before { background: #d97706; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--batch { color: #0f766e; border-color: rgba(15,118,110,0.25); background: rgba(15,118,110,0.08); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--batch::before { background: #0d9488; }
html:not([data-theme="dark"]) .fw-bo-lifecycle--unknown { color: #57534e; border-color: rgba(87,83,78,0.2); background: rgba(87,83,78,0.06); }
html:not([data-theme="dark"]) .fw-bo-lifecycle--unknown::before { background: #78716c; }

/* ── Child row + code block ── */
html:not([data-theme="dark"]) .fw-bo-tr--child { background: rgba(0, 0, 0, 0.02); border-left-color: rgba(0, 0, 0, 0.1); }
html:not([data-theme="dark"]) .fw-bo-tr--child-fee { border-left-color: #d97706; }
html:not([data-theme="dark"]) .fw-bo-code-block { background: rgba(0, 0, 0, 0.03); color: #44403c; }
html:not([data-theme="dark"]) .fw-bo-participant { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.08); }
html:not([data-theme="dark"]) .fw-bo-kept-badge { background: rgba(217, 119, 6, 0.1); color: #92400e; border-color: rgba(217, 119, 6, 0.2); }
