/* Shared theme tokens and logo selection, loaded after the app skin. */
:root { color-scheme: dark; }
.brand-logo-light { display: none; }
html[data-theme="light"] { color-scheme: light;
  --ui-bg: #f5f7f9; --ui-panel: #fff; --ui-raised: #edf2f5;
  --ui-field: #fff; --ui-border: #cbd5de; --ui-divider: #dde4ea;
  --ui-text: #192c39; --ui-muted: #526574; --ui-green: #087c56;
  --ui-purple: #7350b1; --ui-shadow: none;
}
html[data-theme="light"] .brand-logo-dark { display: none; }
html[data-theme="light"] .brand-logo-light { display: block; object-fit: contain; }
html[data-theme="light"] ::selection { background: #c6eddd; color: #163b2d; }
html[data-theme="light"] body,
html[data-theme="light"] .content-area { background: var(--ui-bg); color: var(--ui-text); }
html[data-theme="light"] .topbar,
html[data-theme="light"] .sidebar { background: #fff; border-color: var(--ui-border); }
html[data-theme="light"] .menu-btn,
html[data-theme="light"] .nav-item,
html[data-theme="light"] .sidebar-footer .nav-item { color: var(--ui-muted); }
html[data-theme="light"] .menu-btn:hover,
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .sidebar-footer .nav-item:hover { background: var(--ui-raised); color: var(--ui-text); }
html[data-theme="light"] .nav-item.active { background: #f0eafa; color: #58388e; border-color: #d6c8eb; }
html[data-theme="light"] .journal-select,
html[data-theme="light"] .journal-select:hover { background-color: var(--ui-field); color: var(--ui-text); border-color: var(--ui-border); }
html[data-theme="light"] .journal-create-btn,
html[data-theme="light"] .journal-create-btn:hover { background: #e5f5ed; color: #08744e; border-color: #b1d9c6; box-shadow: none; }
html[data-theme="light"] .theme-setting { color: var(--ui-text); }
html[data-theme="light"] .theme-toggle:focus-visible { outline: 2px solid var(--ui-green); outline-offset: 4px; }
html[data-theme="light"] .home-dashboard .calendar-grid,
html[data-theme="light"] .home-dashboard .week-header { background: #fff; border-color: var(--ui-border); }
html[data-theme="light"] .home-dashboard .month-nav a,
html[data-theme="light"] .home-dashboard .month-nav a:hover { background: #fff; color: var(--ui-text); border-color: var(--ui-border); }
html[data-theme="light"] .home-dashboard .day,
html[data-theme="light"] .home-dashboard .week-summary { --cl-day-accent: #a0b0bd; --cl-day-fill: #f0f4f7; border-color: #c7d5dd; }
html[data-theme="light"] .home-dashboard .day.green,
html[data-theme="light"] .home-dashboard .week-summary.green { --cl-day-accent: #16875f; --cl-day-fill: #d9efe5; }
html[data-theme="light"] .home-dashboard .day.lightgreen,
html[data-theme="light"] .home-dashboard .week-summary.lightgreen { --cl-day-accent: #2583a4; --cl-day-fill: #dfedf5; }
html[data-theme="light"] .home-dashboard .day.yellow,
html[data-theme="light"] .home-dashboard .week-summary.yellow { --cl-day-accent: #a47a17; --cl-day-fill: #fff0c9; }
html[data-theme="light"] .home-dashboard .day.orange,
html[data-theme="light"] .home-dashboard .week-summary.orange { --cl-day-accent: #b76628; --cl-day-fill: #ffead9; }
html[data-theme="light"] .home-dashboard .day.red,
html[data-theme="light"] .home-dashboard .week-summary.red { --cl-day-accent: #b9495a; --cl-day-fill: #f8e0e5; }
html[data-theme="light"] .home-dashboard .day.blank,
html[data-theme="light"] .home-dashboard .day.blank.weekday,
html[data-theme="light"] .home-dashboard .day.blank:not(a),
html[data-theme="light"] .home-dashboard .week-summary.blank { background: #edf1f4; border-color: #dbe2e7; }
html[data-theme="light"] .home-dashboard .day.blank.filler { background: #f8fafb; }
html[data-theme="light"] .home-dashboard .calendar-grid > .header,
html[data-theme="light"] .home-dashboard .week-label,
html[data-theme="light"] .home-dashboard .day-number { color: var(--ui-muted); }
html[data-theme="light"] .home-dashboard .day .grade,
html[data-theme="light"] .home-dashboard .week-summary .grade,
html[data-theme="light"] .home-dashboard .day .score,
html[data-theme="light"] .home-dashboard .week-summary .score,
html[data-theme="light"] .home-dashboard .day .fire-badge,
html[data-theme="light"] .home-dashboard .day .missed-badge,
html[data-theme="light"] .home-dashboard .week-summary .fire-badge,
html[data-theme="light"] .home-dashboard .week-summary .missed-badge { color: var(--ui-text); }
html[data-theme="light"] .analytics-card { --cl-accent: #346998; --cl-tint: #e6eff9; }
html[data-theme="light"] .analytics-card.achievement-neutral,
html[data-theme="light"] .analytics-card.rating-neutral { --cl-accent: #526574; --cl-tint: #edf1f4; }
html[data-theme="light"] .home-dashboard .analytics-card.capture-unavailable {
  --cl-accent: #256c93;
  --cl-tint: #e6eff9;
}
/* Empty streak cards previously retained the white dark-theme metric color. */
html[data-theme="light"] .home-dashboard .achievement-grid .analytics-card.achievement-neutral .analytics-value,
html[data-theme="light"] .home-dashboard .achievement-grid .analytics-card.achievement-neutral .small-text { color: #5a6d76 !important; }
html[data-theme="light"] .analytics-card.achievement-green,
html[data-theme="light"] .analytics-card.grade-a,
html[data-theme="light"] .analytics-card.rating-great { --cl-accent: #126d4f; --cl-tint: #e2f3ea; }
html[data-theme="light"] .analytics-card.grade-b,
html[data-theme="light"] .analytics-card.rating-average { --cl-accent: #1e6d89; --cl-tint: #e4f1f8; }
html[data-theme="light"] .analytics-card.grade-c,
html[data-theme="light"] .analytics-card.rating-concerning { --cl-accent: #865f0f; --cl-tint: #fff3d7; }
html[data-theme="light"] .analytics-card.grade-d { --cl-accent: #a15122; --cl-tint: #ffeadc; }
html[data-theme="light"] .analytics-card.grade-f,
html[data-theme="light"] .analytics-card.rating-poor,
html[data-theme="light"] .analytics-card.rating-critical { --cl-accent: #a53b51; --cl-tint: #fbe7ec; }
html[data-theme="light"] .home-dashboard .analytics-label { color: var(--ui-muted) !important; }
html[data-theme="light"] .home-dashboard .analytics-status { color: var(--cl-accent); }
html[data-theme="light"] .home-dashboard .curve-title,
html[data-theme="light"] .page-title,
html[data-theme="light"] .container h1,
html[data-theme="light"] .container h2,
html[data-theme="light"] .day-page h1,
html[data-theme="light"] .day-page h2,
html[data-theme="light"] .day-page h3,
html[data-theme="light"] .day-scorecard-form .trade-title,
html[data-theme="light"] .day-scorecard-form h4.trade-heading { color: var(--ui-text); }
html[data-theme="light"] .day-page .day-scorecard-form label,
html[data-theme="light"] .day-scorecard-form .missed-r-help,
html[data-theme="light"] .day-scorecard-form .skipped-trade-notes summary { color: var(--ui-muted); }
html[data-theme="light"] .day-scorecard-form .session-card,
html[data-theme="light"] .day-scorecard-form .session-card.collapsed,
html[data-theme="light"] .day-scorecard-form .session-card:not(.collapsed) { background: var(--ui-panel); border-color: var(--ui-border); box-shadow: none; }
.day-scorecard-form .session-card.session-london {
  --session-fill: #211b30;
  --session-border: #665384;
  --session-title: #dfccff;
  --session-light-fill: #f1eafb;
  --session-light-border: #bca8dc;
  --session-light-title: #5c358c;
}
.day-scorecard-form .session-card.session-0 {
  --session-fill: #162737;
  --session-border: #35607b;
  --session-title: #a9e2ff;
  --session-light-fill: #e7f4fc;
  --session-light-border: #9bc9e4;
  --session-light-title: #17658f;
}
.day-scorecard-form .session-card.session-1 {
  --session-fill: #2a2218;
  --session-border: #795b2b;
  --session-title: #ffd89a;
  --session-light-fill: #fff4e2;
  --session-light-border: #e5c68f;
  --session-light-title: #87540e;
}
.day-scorecard-form .session-card.session-2 {
  --session-fill: #132b2b;
  --session-border: #347574;
  --session-title: #9af3ed;
  --session-light-fill: #e6f7f4;
  --session-light-border: #98d5d0;
  --session-light-title: #156d68;
}
.day-scorecard-form .session-card.session-3 {
  --session-fill: #2b1b2b;
  --session-border: #835077;
  --session-title: #ffc3e1;
  --session-light-fill: #fcebf5;
  --session-light-border: #e4afce;
  --session-light-title: #913568;
}
.day-scorecard-form .session-card,
.day-scorecard-form .session-card.collapsed {
  background: linear-gradient(120deg, var(--session-fill), var(--ui-panel) 55%);
  border-color: var(--session-border);
}
.day-scorecard-form .session-card h3 { color: var(--session-title); }
.day-scorecard-form .session-card.session-london::before {
  background: #ad8af2;
  box-shadow: 0 0 14px rgba(173, 138, 242, .3);
}
html[data-theme="light"] .day-scorecard-form .session-card,
html[data-theme="light"] .day-scorecard-form .session-card.collapsed,
html[data-theme="light"] .day-scorecard-form .session-card:not(.collapsed) {
  background: linear-gradient(120deg, var(--session-light-fill), var(--ui-panel) 55%);
  border-color: var(--session-light-border);
}
html[data-theme="light"] .day-scorecard-form .session-card h3 { color: var(--session-light-title); }
html[data-theme="light"] .day-scorecard-form .session-header,
html[data-theme="light"] .day-scorecard-form .collapsed .session-header { background: transparent; border-color: var(--ui-border); }
html[data-theme="light"] .day-scorecard-form .session-toggle,
html[data-theme="light"] .day-scorecard-form .session-header:hover .session-toggle { background: var(--ui-raised); color: var(--ui-text); }
html[data-theme="light"] .day-page .day-scorecard-form input,
html[data-theme="light"] .day-page .day-scorecard-form select,
html[data-theme="light"] .day-page .day-scorecard-form textarea,
html[data-theme="light"] .day-page .day-scorecard-form input:hover,
html[data-theme="light"] .day-page .day-scorecard-form select:hover,
html[data-theme="light"] .day-page .day-scorecard-form select:focus { background-color: var(--ui-field); color: var(--ui-text); border-color: var(--ui-border); box-shadow: none; }
html[data-theme="light"] .day-scorecard-form .add-trade-btn,
html[data-theme="light"] .day-scorecard-form .add-skipped-trade,
html[data-theme="light"] .day-scorecard-form .remove-skipped-trade { background: #edf3f6; color: #355366; border-color: #bacbd6; }
html[data-theme="light"] .day-scorecard-form button[type="submit"],
html[data-theme="light"] .feedback-submit,
html[data-theme="light"] .journal-create-actions button { background: #087c56; color: #fff; border-color: #087c56; box-shadow: none; }
html[data-theme="light"] .day-scorecard-form button[type="submit"]:hover,
html[data-theme="light"] .feedback-submit:hover,
html[data-theme="light"] .journal-create-actions button:hover { background: #056443; color: #fff; }
html[data-theme="light"] .day-page .day-save-button,
html[data-theme="light"] .day-page .day-save-button:hover { background: #087c56; color: #fff; border-color: #087c56; }
html[data-theme="light"] .delete-button { background: #fce9ed; color: #a32d45; border-color: #e5aebb; }
html[data-theme="light"] .trade-insights-page .loss-header,
html[data-theme="light"] .trade-insights-page .loss-header span:last-child { color: var(--ui-text); }
html[data-theme="light"] .trade-insights-page .loss-bar:hover { background: #e5edf2; border-color: #adbfcc; }
html[data-theme="light"] .bar-track,
html[data-theme="light"] .variance-week-track { background: #dce5eb; }
html[data-theme="light"] .variance-ledger,
html[data-theme="light"] .variance-week { background: var(--ui-panel); border-color: var(--ui-border); box-shadow: none; }
html[data-theme="light"] .variance-ledger-heading,
html[data-theme="light"] .variance-week-date,
html[data-theme="light"] .variance-day-list { border-color: var(--ui-border); }
html[data-theme="light"] .variance-day-row,
html[data-theme="light"] .variance-day-no-losses,
html[data-theme="light"] .variance-day-no-trades,
html[data-theme="light"] .variance-day-upcoming,
html[data-theme="light"] .variance-week-clear { background: var(--ui-raised); border-color: var(--ui-border); }
html[data-theme="light"] .variance-day-link:hover { background: #e8f2ee; border-color: var(--ui-green); }
html[data-theme="light"] .variance-month-arrow,
html[data-theme="light"] .variance-month-arrow:hover { background: #fff; color: var(--ui-text); border-color: var(--ui-border); }
html[data-theme="light"] .variance-ledger-eyebrow { color: var(--ui-green); }
html[data-theme="light"] .variance-week-date strong,
html[data-theme="light"] .variance-day-date strong,
html[data-theme="light"] .variance-month-current strong,
html[data-theme="light"] .variance-day-total,
html[data-theme="light"] .variance-day-total strong,
html[data-theme="light"] .variance-day-state strong,
html[data-theme="light"] .variance-summary-total,
html[data-theme="light"] .variance-summary-total strong,
html[data-theme="light"] .variance-dominant strong,
html[data-theme="light"] .variance-month-summary-title strong,
html[data-theme="light"] .variance-week-category,
html[data-theme="light"] .variance-week-category > div:first-child { color: var(--ui-text); }
html[data-theme="light"] .variance-week-date span,
html[data-theme="light"] .variance-week-date small,
html[data-theme="light"] .variance-month-current span,
html[data-theme="light"] .variance-day-date span,
html[data-theme="light"] .variance-mistake,
html[data-theme="light"] .variance-summary-label,
html[data-theme="light"] .variance-week-summary .variance-summary-label,
html[data-theme="light"] .variance-summary-total span,
html[data-theme="light"] .variance-day-total span,
html[data-theme="light"] .variance-summary-note,
html[data-theme="light"] .variance-dominant span,
html[data-theme="light"] .variance-month-summary-title span,
html[data-theme="light"] .variance-day-total-muted strong,
html[data-theme="light"] .variance-week-clear small { color: var(--ui-muted); }
html[data-theme="light"] .variance-week-summary,
html[data-theme="light"] .variance-month-summary { --variance-accent: #087c56; --variance-background: #e5f4ec; --variance-border: #b1d5c2; --variance-glow: transparent; box-shadow: none; }
html[data-theme="light"] .variance-summary-market { --variance-accent: #bb4052; --variance-background: #fbe9ed; --variance-border: #e9bfca; }
html[data-theme="light"] .variance-summary-trader { --variance-accent: #946611; --variance-background: #fff4d7; --variance-border: #e5d2a0; }
html[data-theme="light"] .variance-summary-model { --variance-accent: #236f9e; --variance-background: #e7f2fc; --variance-border: #bdd7e9; }
html[data-theme="light"] .variance-summary-unspecified,
html[data-theme="light"] .variance-summary-upcoming { --variance-accent: #536979; --variance-background: #edf2f5; --variance-border: #c9d5de; }
html[data-theme="light"] .variance-week-summary::after,
html[data-theme="light"] .variance-month-summary::after { display: none; }
html[data-theme="light"] .variance-chip-market { background: #fbe0e6; color: #a12f46; border-color: #efbdc9; }
html[data-theme="light"] .variance-chip-trader { background: #fff0c4; color: #795710; border-color: #e5d08c; }
html[data-theme="light"] .variance-chip-model { background: #dfeffa; color: #225f88; border-color: #b5d2e7; }
html[data-theme="light"] .variance-chip-unspecified { background: #e7edf2; color: #485e6e; }
html[data-theme="light"] .variance-no-losses,
html[data-theme="light"] .variance-no-losses strong,
html[data-theme="light"] .variance-day-no-losses .variance-day-state span { color: #087c56; }
html[data-theme="light"] .variance-day-state span,
html[data-theme="light"] .variance-week-upcoming,
html[data-theme="light"] .variance-week-upcoming > span,
html[data-theme="light"] .variance-upcoming-label > span { color: var(--ui-muted); }
html[data-theme="light"] .capital-hero-card,
html[data-theme="light"] .capital-card,
html[data-theme="light"] .capital-metric-card { background: #fff; border-color: var(--ui-border); box-shadow: none; }
html[data-theme="light"] .capital-metric-card.success { background: #e3f3eb; border-color: #badaca; }
html[data-theme="light"] .capital-metric-card.warning { background: #fff3d4; border-color: #e7d5a6; }
html[data-theme="light"] .capital-metric-card.danger { background: #fbe4e9; border-color: #e6bdc7; }
html[data-theme="light"] .capital-title h1,
html[data-theme="light"] .account-name,
html[data-theme="light"] .account-capital,
html[data-theme="light"] .capital-total span,
html[data-theme="light"] .capital-total strong,
html[data-theme="light"] .card-header h2,
html[data-theme="light"] .metric-title { color: var(--ui-text); }
html[data-theme="light"] .capital-label,
html[data-theme="light"] .account-percent,
html[data-theme="light"] .capital-date-row,
html[data-theme="light"] .x-axis-label,
html[data-theme="light"] .y-axis-label { color: var(--ui-muted); }
html[data-theme="light"] .success-text,
html[data-theme="light"] .success-value,
html[data-theme="light"] .capital-date-row span:last-child { color: #087c56; text-shadow: none; }
html[data-theme="light"] .warning-text,
html[data-theme="light"] .warning-value { color: #865e0e; text-shadow: none; }
html[data-theme="light"] .danger-text,
html[data-theme="light"] .danger-value { color: #b6384d; text-shadow: none; }
html[data-theme="light"] .capital-account-row,
html[data-theme="light"] .capital-total { border-color: var(--ui-border); }
html[data-theme="light"] .btn-primary { background: #087c56; color: white; box-shadow: none; }
html[data-theme="light"] .btn-secondary { background: #edf2f5; color: var(--ui-text); border-color: var(--ui-border); }
html[data-theme="light"] .type-card-content,
html[data-theme="light"] .feedback-upload,
html[data-theme="light"] .feedback-context { background: var(--ui-raised); color: var(--ui-text); border-color: var(--ui-border); }
html[data-theme="light"] .type-icon,
html[data-theme="light"] .feedback-upload input::file-selector-button { background: #dce7ee; color: #36596e; border-color: var(--ui-border); }
html[data-theme="light"] .feedback-type-card input:checked + .type-card-content { background: #e2f4e9; }
html[data-theme="light"] .feedback-type-card input:checked + .type-card-content .type-icon { background: #c8e9d7; color: #096a46; }
html[data-theme="light"] .feedback-type-card input:checked + .type-card-content .type-check { color: #fff; }
html[data-theme="light"] .feedback-field textarea,
html[data-theme="light"] .feedback-field input:not([type=file]),
html[data-theme="light"] .feedback-field select { color: var(--ui-text); border-color: var(--ui-border); }
html[data-theme="light"] .feedback-heading > p,
html[data-theme="light"] .type-hint,
html[data-theme="light"] .field-meta,
html[data-theme="light"] .feedback-field .field-meta,
html[data-theme="light"] .feedback-upload p,
html[data-theme="light"] .feedback-upload input[type=file],
html[data-theme="light"] .feedback-form-footer > span,
html[data-theme="light"] .optional-label,
html[data-theme="light"] .feedback-aside p,
html[data-theme="light"] .feedback-aside li,
html[data-theme="light"] .feedback-aside .feedback-aside-note,
html[data-theme="light"] .feedback-page-foot,
html[data-theme="light"] .feedback-success > p:not(.feedback-eyebrow) { color: var(--ui-muted); }
html[data-theme="light"] .required-label,
html[data-theme="light"] .feedback-submit-status,
html[data-theme="light"] .feedback-text-link,
html[data-theme="light"] .feedback-aside li span { color: #087c56; }
html[data-theme="light"] .feedback-aside-card,
html[data-theme="light"] .feedback-success { background: #eaf5ef; border-color: #bdd9ca; }
html[data-theme="light"] .feedback-aside-divider { background: #c8ddd2; }
html[data-theme="light"] .feedback-errors,
html[data-theme="light"] .field-error { color: #a62644; }
html[data-theme="light"] .feedback-page-foot { border-color: var(--ui-border); }
html[data-theme="light"] .feedback-field ::placeholder,
html[data-theme="light"] .journal-create-form input::placeholder { color: #657784; }
html[data-theme="light"] .feedback-type-card input:focus-visible + .type-card-content,
html[data-theme="light"] .feedback-submit:focus-visible,
html[data-theme="light"] .feedback-text-link:focus-visible,
html[data-theme="light"] .public-app-return:focus-visible { outline-color: var(--ui-green); }

html[data-theme="light"] .day-page-eyebrow { color: var(--ui-green); }
html[data-theme="light"] .journal-create-form input { border-color: var(--ui-border); }
