/* FundYourDreams dashboard, LIGHT mode. Loaded AFTER dashboard-theme.css.
   Switch: Settings > Theme > Light Mode adds body.dash-light (settings-theme.js).
   Dark rules in dashboard-theme.css are untouched; this file only re-points tokens
   and fixes hard-coded colors under body.dash-light. Neutrals invert, accents keep
   their hue (Classic blue, Gold, Bloody red, Emerald); --gold-ink is the darker
   shade of the same hue used for TEXT only. Variants: add dash-light-v2 (warm
   off-white) or dash-light-v3 (light-grey cards) next to dash-light. */

/* ---- tokens: default variant = page and cards are a very light tint of the theme accent
   (--lt-accent, set per theme on body so modals outside #dashboardView get it too).
   Page 10%, cards 5%, inset fields 14% of the accent mixed into white. ---- */
body.dash-light { --lt-accent: rgb(46,91,255); --lt-tint: var(--lt-accent); --lt-title: rgb(46,91,255); --lt-block: rgb(46,91,255); }
body.dash-light.gold-theme { --lt-accent: rgb(255,215,0); --lt-title: rgb(255,215,0); --lt-block: rgb(255,215,0); --lt-on-block: #0a1f44; --sb-fg: #0a1f44; } /* gold stays real yellow everywhere; the pitch block takes navy text (white on yellow is unreadable) */
body.dash-light.bloody-theme { --lt-accent: rgb(163,0,0); --lt-title: rgb(163,0,0); --lt-block: rgb(163,0,0); }
body.dash-light.emerald-theme { --lt-accent: rgb(0,68,0); --lt-tint: rgb(0,200,80); /* brighter green so the tint reads green, not grey */ --lt-title: rgb(0,68,0); --lt-block: rgb(0,68,0); }
body.dash-light, body.dash-light #dashboardView {
  --bg: color-mix(in srgb, var(--lt-tint) 10%, white);
  --panel: color-mix(in srgb, #fff 73.8%, transparent); /* white, same for all themes (Hugo 2026-10-19); alpha .738 = the dark theme's card alpha, so the rain shows through */
  --panel-2: #F2F2F2; /* neutral very light grey, separates from the white cards: no theme tint */
  --surface-modal: color-mix(in srgb, var(--lt-tint) 5%, white);
  --nav-bg: color-mix(in srgb, var(--lt-tint) 8%, rgb(255 255 255 / 0.92));
  --field-fill: rgba(20,20,40,0.04);
  --line: rgba(20,20,40,0.16);
  --line-strong: rgba(20,20,40,0.30);
  --line-faint: rgba(20,20,40,0.09);
  --text: #14141c;
  --text-dim: #4a4c5a;
  --text-faint: #5f6170;
  --pos: #0D924A;
  --neg: #b42318;
  --gold-ink: #FFC800;
  --shadow-contour: 0 1px 3px rgba(20,20,40,0.08), 0 6px 18px rgba(20,20,40,0.06);
  --contour-line: rgba(255,215,0,0.9);
  --hero-line: var(--contour-line); --hero-glow: var(--shadow-contour); /* the hero/logo card's border and glow, kept reachable from inside the sidebar (which re-points the contour tokens) */
  --bg-primary: var(--bg);
  --bg-secondary: var(--panel-2);
  --bg-card: var(--panel);
  --bg-card-hover: var(--panel-2);
  --border-color: rgba(20,20,40,0.16);
  --text-primary: #14141c;
  --text-secondary: #4a4c5a;
  --text-muted: #5f6170;
  --positive: #0D924A;
  --positive-bg: rgba(13,146,74,0.10);
  --negative: #b42318;
  --negative-bg: rgba(180,35,24,0.10);
  --error: #b42318;
  --error-bg: rgba(180,35,24,0.10);
  --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
}
/* page behind the rain stays pure white (Hugo, 2026-10-19); --bg keeps the tint for the rest */
body.dash-light { background: #ffffff; color: var(--text); color-scheme: light; }
body.dash-light #dashboardView { color: var(--text); }

/* ---- accents: same hue per theme; --gold-ink for text; softer contour (no neon glow) ---- */
body.dash-light.gold-theme #dashboardView {
  --gold-ink: #FFC800;
  --contour-line: rgba(255,215,0,0.95);
  --shadow-contour: 0 1px 3px rgba(20,20,40,0.08), 0 6px 18px rgba(255,200,0,0.14);
}
body.dash-light:not(.gold-theme):not(.bloody-theme):not(.emerald-theme) #dashboardView {
  --gold-ink: #2447d4;
  --contour-line: rgba(46,91,255,0.7);
  --shadow-contour: 0 1px 3px rgba(20,20,40,0.08), 0 6px 18px rgba(46,91,255,0.12);
}
body.dash-light.bloody-theme #dashboardView {
  --gold-ink: #a30000;
  --contour-line: rgba(163,0,0,0.7);
  --shadow-contour: 0 1px 3px rgba(20,20,40,0.08), 0 6px 18px rgba(163,0,0,0.12);
}
body.dash-light.emerald-theme #dashboardView {
  --gold-ink: #004400;
  --contour-line: rgba(0,68,0,0.7);
  --shadow-contour: 0 1px 3px rgba(20,20,40,0.08), 0 6px 18px rgba(0,68,0,0.12);
}

/* ---- text that was var(--gold) in dark: darker shade of the same hue ---- */
body.dash-light #dashboardView .bot-gauge-percent,
body.dash-light #dashboardView .strategy-badge,
body.dash-light #dashboardView .view-indicator,
body.dash-light #dashboardView .view-indicator.global,
body.dash-light #dashboardView .strategy-badge svg,
body.dash-light #dashboardView .role-badge,
body.dash-light #dashboardView .role-badge.admin,
body.dash-light #dashboardView .role-badge.client,
body.dash-light #dashboardView .admin-panel-title svg,
body.dash-light #dashboardView #pendingRequestsBanner strong,
body.dash-light #dashboardView .kpi-card .kpi-value,
body.dash-light #dashboardView .kpi-card-premium .kpi-value,
body.dash-light #dashboardView .kpi-icon,
body.dash-light #dashboardView .kpi-icon.purple,
body.dash-light #dashboardView .kpi-icon.green,
body.dash-light #dashboardView .kpi-icon.orange,
body.dash-light #dashboardView .kpi-icon svg,
body.dash-light #dashboardView .tooltip-value,
body.dash-light #dashboardView .goal-current,
body.dash-light #dashboardView .goal-percentage,
body.dash-light #dashboardView .capital-amount,
body.dash-light #dashboardView .hero-word-box .hero-word,
body.dash-light #dashboardView .guest-hero-title .hero-icon svg { color: var(--gold-ink); }
body.dash-light #dashboardView .strategy-badge svg,
body.dash-light #dashboardView .kpi-icon svg { stroke: var(--gold-ink); }
body.dash-light #dashboardView .chart-line { stroke: var(--gold-ink); }

/* ---- sidebar (Hugo, 2026-10-19): OPAQUE white (Hugo: back to white), so rain digits never show behind it; the thin right border separates it from the page. Writing is dark (white on the light tint is far below 4.5:1): navy, near-black on Bloody (navy is 4.29 there).
   The active item / FR-EN is full opaque accent with white text (navy on Gold). Tokens are re-pointed on .sidebar so every dark-theme
   sidebar rule (active = var(--gold) fill + var(--on-gold) text) follows. --sb-fg is the writing color. ---- */
body.dash-light { --sb-fg: #0a1f44; --sb-on-active: #fff; }
body.dash-light.gold-theme { --sb-on-active: #0a1f44; }
body.dash-light.bloody-theme { --sb-fg: #0a0a14; }
body.dash-light #dashboardView .sidebar {
  background: #fff; color: var(--sb-fg); border-right-color: color-mix(in srgb, var(--sb-fg) 25%, transparent);
  --text: var(--sb-fg); --text-dim: var(--sb-fg); --text-faint: color-mix(in srgb, var(--sb-fg) 80%, transparent);
  --text-primary: var(--sb-fg); --text-secondary: var(--sb-fg); --text-muted: color-mix(in srgb, var(--sb-fg) 80%, transparent);
  --line: color-mix(in srgb, var(--sb-fg) 25%, transparent); --line-strong: color-mix(in srgb, var(--sb-fg) 40%, transparent); --line-faint: color-mix(in srgb, var(--sb-fg) 15%, transparent);
  --panel: color-mix(in srgb, var(--sb-fg) 6%, transparent); --panel-2: color-mix(in srgb, var(--sb-fg) 8%, transparent);
  --gold: var(--lt-accent); --gold-ink: var(--sb-fg); --on-gold: var(--sb-on-active);
  --contour-line: color-mix(in srgb, var(--sb-fg) 45%, transparent); --shadow-contour: none;
}
/* sidebar edge (Hugo, 2026-10-19): desktop only (on phones the sidebar is a full-width bottom sheet, a side line would look broken); was 1px grey. */
@media (min-width: 769px) { body.dash-light #dashboardView .sidebar { border-right-width: 2px; border-right-color: var(--lt-block); } }
/* suns: no background (sidebar is already white); colours below */
body.dash-light #dashboardView .sidebar .theme-quick-btn[data-dashboard-theme="gold"] { color: #FFC800; }
body.dash-light #dashboardView .sidebar .theme-quick-btn[data-dashboard-theme="classic"] { color: #2E5BFF; }
body.dash-light #dashboardView .sidebar .theme-quick-btn[data-dashboard-theme="bloody"] { color: #A30000; }
body.dash-light #dashboardView .sidebar .theme-quick-btn[data-dashboard-theme="emerald"] { color: #004400; }
body.dash-light #dashboardView .sidebar .theme-quick-btn.active::after { background: var(--sb-fg); }
/* ---- top bar (Hugo, 2026-10-19): opaque theme accent (--lt-accent: emerald is its deep rgb(0,68,0), which reads right with white text), white writing, navy on Gold; badges = outline + same writing ---- */
body.dash-light { --hdr-fg: #fff; --lt-on-block: #fff; }
body.dash-light.gold-theme { --hdr-fg: #0a1f44; }
body.dash-light #dashboardView .header { background: var(--lt-accent); border-bottom-color: var(--hdr-fg); color: var(--hdr-fg); }
body.dash-light #dashboardView .header .page-title, body.dash-light #dashboardView .header .mobile-menu-btn,
body.dash-light #dashboardView .header .strategy-badge, body.dash-light #dashboardView .header .strategy-badge svg, body.dash-light #dashboardView .header .strategy-badge span,
body.dash-light #dashboardView .header .role-badge, body.dash-light #dashboardView .header .role-badge.admin, body.dash-light #dashboardView .header .role-badge.client,
body.dash-light #dashboardView .header .user-name, body.dash-light #dashboardView .header .user-role, body.dash-light #dashboardView .header .user-avatar { color: var(--hdr-fg); }
body.dash-light #dashboardView .header .strategy-badge svg { stroke: var(--hdr-fg); }
body.dash-light #dashboardView .header .strategy-badge, body.dash-light #dashboardView .header-left .strategy-badge,
body.dash-light #dashboardView .header .role-badge, body.dash-light #dashboardView .header .role-badge.admin, body.dash-light #dashboardView .header .role-badge.client { border-color: var(--hdr-fg); background-color: transparent; }
body.dash-light #dashboardView .header .user-profile { background-color: transparent; border-color: var(--hdr-fg); }
body.dash-light #dashboardView .header .user-avatar { background: transparent; border-color: var(--hdr-fg); box-shadow: 0 0 0 1px var(--hdr-fg); }
/* Bot Powered card: all text dark whatever the sidebar writing is (Hugo, 2026-10-19) */
body.dash-light #dashboardView .sidebar .bot-status-label, body.dash-light #dashboardView .sidebar #botEngagedCount, body.dash-light #dashboardView .sidebar .bot-status-header > svg,
body.dash-light #dashboardView .sidebar .bot-gauge-label,
body.dash-light #dashboardView .sidebar .bot-info-label, body.dash-light #dashboardView .sidebar .bot-info-value { color: #0a0a14; }
/* Bots Actifs panel (#botsOpenPositionsCard, admin): all text dark; rows carry inline #fff so !important is load-bearing */
body.dash-light #dashboardView .sidebar #botsOpenPositionsCard, body.dash-light #dashboardView .sidebar #botsOpenPositionsCard span,
body.dash-light #dashboardView .sidebar #botsOpenPositionsList, body.dash-light #dashboardView .sidebar #botsOpenPositionsList div,
body.dash-light #dashboardView .sidebar #botsOpenPositionsList span { color: #0a0a14 !important; }
body.dash-light #dashboardView .sidebar #botsOpenPositionsList span[style*="4ade80"] { color: #0D924A !important; }
/* Bot Powered percentage and ring: theme accent; count and labels stay dark; the card border and glow are the hero card's (Hugo, 2026-10-19) */
body.dash-light #dashboardView .sidebar .bot-gauge-percent, body.dash-light.gold-theme #dashboardView .sidebar .bot-gauge-percent { color: var(--lt-accent) !important; } /* gold twin outranks the gold-ink rule below */
body.dash-light #dashboardView .sidebar .bot-status-card, body.dash-light #dashboardView .sidebar .bot-status-card-mobile { --contour-line: var(--hero-line); --shadow-contour: var(--hero-glow); }
body.dash-light #dashboardView .sidebar .bot-gauge-fill { stroke: var(--lt-accent) !important; }

/* ---- rain: same canvas, white base, faint darker glyphs ---- */

/* =====================================================================
   Slice 2: hard-coded colors (colors only, no geometry)
   ===================================================================== */
/* gold-theme rules in index.html force #FFD700 / #fff text with !important */
body.dash-light.gold-theme #dashboardView .bot-gauge-percent,
body.dash-light.gold-theme #dashboardView .goal-percentage,
body.dash-light.gold-theme #dashboardView .capital-amount,
body.dash-light.gold-theme .status-badge.deposit { color: var(--gold-ink) !important; }
body.dash-light.gold-theme .status-badge.withdrawal { color: var(--text) !important; border-color: var(--text) !important; }
/* Deposit / Withdraw (Hugo, 2026-10-19): every light theme copies what Gold already did: Deposit = theme accent (text --gold-ink, border --lt-block, which is exactly Gold's yellow there), Withdraw = dark (--text), both outlined on transparent. !important because the markup is inline-styled and index.html forces the gold-theme colors; the gold twin selector wins that tie */
body.dash-light #depositBtn, body.dash-light.gold-theme #depositBtn { background: transparent !important; color: var(--gold-ink) !important; border-color: var(--lt-block) !important; }
body.dash-light #withdrawBtn, body.dash-light.gold-theme #withdrawBtn { background: transparent !important; color: var(--text) !important; border-color: var(--text) !important; }
/* Gold chart area: index.html points .chart-area at an undefined #goldGradient (no fill at all), so use the shared #chartGradient, yellow (dark theme's #ffd700 stop-color rule still applies), top stop-opacity raised .3 -> .6 (yellow on white is much fainter than the other accents at .3) */
body.dash-light.gold-theme .chart-area { fill: url(#chartGradient); }
body.dash-light.gold-theme #dashboardView #chartGradient stop:first-child { stop-opacity: 0.6 !important; }
body.dash-light.gold-theme .chart-tooltip-value { color: var(--text); text-shadow: none; }
/* hero title was #fff */
/* hero title = badge (Hugo, 2026-10-19): opaque theme block, white writing (navy on Gold); padding faked with a same-color spread shadow like the pitch, so the fitted font size and the layout do not move */
body.dash-light #dashboardView .guest-hero-title { color: var(--lt-on-block); background: var(--lt-block); border-radius: 12px; box-shadow: 0 0 0 8px var(--lt-block); }
body.dash-light #dashboardView .guest-hero-title .hero-icon svg { color: var(--lt-on-block); }
/* pitch (Hugo, 2026-10-19): no block, plain dark navy text on the page; the fade override keeps the typewriter from dimming it */
body.dash-light #dashboardView .hero-pitch { background: rgba(255,255,255,0.6); color: #0a1f44; border-radius: 12px; box-shadow: 0 0 0 8px rgba(255,255,255,0.6); } /* white glass badge (Hugo, 2026-10-19), padding faked by the spread like the title so layout does not move */
/* pitch text, typewriter overlay and cursor: theme accent; the slow fade (opacity .1) would dim it */
body.dash-light #dashboardView .hero-pitch, body.dash-light #dashboardView .hero-pitch * { color: #0a1f44; }
body.dash-light #dashboardView .hero-pitch.fx-on .hero-pitch-fx.fading { opacity: 1; } /* same specificity as the dark fade rule, loaded later */
body.dash-light #dashboardView .hero-pitch-fx.typing .hero-pitch-typed::after { border-right-color: #0a1f44; }
/* simulator labels / intro were pale lavender (#cbd5f5) */
body.dash-light #dashboardView .invite-controls label,
body.dash-light #dashboardView .invite-calculator-intro p { color: var(--text-dim); }
/* simulator date field: white text + inverted calendar icon were made for the dark page */
body.dash-light .invite-controls input[type="date"] { color: var(--text) !important; }
body.dash-light .invite-controls input[type="date"]::-webkit-calendar-picker-indicator { filter: none; }
body.dash-light #dashRain { opacity: 0.6; } /* canvas base = the page tint (dashboard-rain.js), so only the digits show */

/* ---- profit pop-up (outside #dashboardView): white card, darker accent text ---- */
body.dash-light:not(.gold-theme):not(.bloody-theme):not(.emerald-theme) #profitPopup { --gold-ink: #2447d4; }
body.dash-light.bloody-theme #profitPopup { --gold-ink: #a30000; }
body.dash-light.emerald-theme #profitPopup { --gold-ink: #004400; }
body.dash-light .profit-popup-content { box-shadow: 0 8px 30px rgba(20,20,40,0.18); }
body.dash-light .profit-popup-headline, body.dash-light .profit-popup-subdate { text-shadow: none; } /* color = navy below: white would vanish on the near-white card */
body.dash-light #profitPopup .profit-popup-headline, body.dash-light #profitPopup .profit-popup-subdate { color: #0a1f44; }
body.dash-light .profit-popup-close { background: rgba(20,20,40,0.12); color: var(--text); }

/* =====================================================================
   Variants (colors only). Default = pure white. To compare, in the console:
     document.body.classList.add('dash-light-v2')     // warm off-white page, cream cards
     document.body.classList.add('dash-light-v3')     // white page, light-grey cards
     document.body.classList.remove('dash-light-v2','dash-light-v3')   // back to default
   ===================================================================== */
body.dash-light.dash-light-v2, body.dash-light.dash-light-v2 #dashboardView {
  --bg: #f7f3ea; --panel: #fffdf8; --panel-2: #efe9dc; --surface-modal: #fffdf8;
  --nav-bg: rgba(247,243,234,0.92); --field-fill: rgba(60,45,20,0.05);
  --line: rgba(60,45,20,0.18); --line-strong: rgba(60,45,20,0.32); --line-faint: rgba(60,45,20,0.10);
  --text: #1c1a14; --text-dim: #57524a; --text-faint: #6b6558;
  --bg-primary: #f7f3ea; --bg-secondary: #efe9dc; --bg-card: #fffdf8; --bg-card-hover: #efe9dc;
  --border-color: rgba(60,45,20,0.18); --text-primary: #1c1a14; --text-secondary: #57524a; --text-muted: #6b6558;
}
body.dash-light.dash-light-v3, body.dash-light.dash-light-v3 #dashboardView {
  --bg: #ffffff; --panel: #f1f2f6; --panel-2: #e6e8ee; --surface-modal: #f1f2f6;
  --nav-bg: rgba(255,255,255,0.92); --field-fill: #ffffff;
  --bg-secondary: #eceef3; --bg-card: #f1f2f6; --bg-card-hover: #e6e8ee;
}
