/* Shared application palette. Semantic colors, charts and user goal artwork stay independent. */
:root {
  /* Clean royal purple for device validation. Brand and financial semantics are separate. */
  --brand-primary:#6836D9; --brand-secondary:#B2A1F5; --brand-accent:#78CBD8;
  --brand-primary-end:#6030CF; --brand-rgb:104,54,217;
  --ux-bg:#11131C; --ux-panel:#1B1F2B; --ux-text:#F3F4FA; --ux-muted:#B5BDCF;
  --ux-line:#343B4C; --ux-accent:var(--brand-secondary); --ux-soft:#29243E; --ux-primary:var(--brand-primary);
  --surface-elevated:var(--ux-soft); --primary-hover:var(--brand-primary-end); --primary-pressed:#5424B8;
  --green:#64D3A2; --red:#FF899B; --yellow:#F0C878; --blue:var(--brand-accent);
  --success:var(--green); --income:var(--green); --expense:var(--red); --warning:var(--yellow); --error:var(--red);
  --chart-primary:var(--brand-secondary); --chart-secondary:var(--brand-accent); --chart-neutral:#BDC5D2;
  --bg:var(--ux-bg); --surface:var(--ux-bg); --surface2:var(--ux-panel); --surface3:var(--ux-panel); --card:var(--ux-panel);
  --text:var(--ux-text); --text2:var(--ux-text); --muted:var(--ux-muted); --muted2:var(--ux-muted);
  --border:var(--ux-line); --border-active:var(--ux-accent);
  --primary:var(--ux-primary); --primary-light:var(--ux-accent); --primary-dim:var(--ux-soft); --primary-glow:none;
  /* Small value shift within one violet hue; no pink gradient endpoint. */
  --primary-gradient:linear-gradient(135deg,var(--primary),var(--brand-primary-end));
  --on-primary:#FFFFFF;
  --oliver-account-surface:var(--ux-panel); --oliver-account-border:var(--ux-line);
}
html body { background-color:var(--ux-bg); color:var(--ux-text); }
/* Explicit negative amounts override decorative tones; privacy selectors remain more specific. */
.is-negative { color:var(--red)!important; }
body.ux-r311 :is(#sidebar,.sidebar-mobile-hub,.sidebar-mobile-head,.sidebar-mobile-footer,.sidebar-footer,.sidebar-brand,.sidebar-menu,.sidebar-mobile-nav,.sidebar-mobile-account,
  #appScreen,.page,.app-header,.bottom-tabs,.month-pills-row,.ofx-dashboard-month-filter,
  .sheet,.small-sheet,.workspace-modal-card,.business-tx-sheet,.ofx-invest-detail-sheet,.ux-entry-review,
  .fab-menu,.workspace-popover,.chat-wrap,.chat-composer,.chat-input-wrap) {
  background:var(--ux-bg)!important; border-color:var(--ux-line)!important; box-shadow:none!important;
}
body.ux-r311 :is(#goalModal .sheet,.goal-card,.goal-body,.goal-stats,.goal-insight,.goals-empty,
  .profile-card,.profile-account-card,.profile-settings-panel,.profile-settings-block,.profile-integration-card,.profile-plan-section,
  .account-destination-card,.settings-preference-card,.support-faq-card,.reminder-settings-card,.family-mode-card,.family-member-row,.family-invite-row,
  .widget-preview,.widget-preview-card,.calendar-card,.calendar-panel,.calendar-main,.calendar-day-detail,.calendar-agenda-card,
  .panel-card,.report-hero,.report-kpi,.report-compare,.report-compare-item,.chart-card,.insight-card,
  .ofx-panel,.ofx-kpi,.ofx-dashboard-hero,.ofx-action-strip article,.ofx-risk-plan,
  .wallet-mobile-hero,.wallet-kpi,.wallet-total,.wallet-card,.wallet-account-card,.tx-item,
  .business-hero,.business-panel,.business-management-card,.business-primary-metrics article,.business-management-metrics article,
  .ofx-invest-panel,.ofx-invest-v2-header,.ofx-invest-asset-card,.ofx-invest-return-hero,.ofx-invest-detail-list,
  .chat-msg.bot,.assistant-draft-card,.assistant-artifact,.assistant-insight-card,
  .plan-card,.pricing-card,.import-card,.import-step,.notification-item,.notif-item,
  .sidebar-mobile-profile,.sidebar-profile-link,.workspace-trigger,.ux-summary,.ux-context-options) {
  background:var(--ux-panel)!important; border-color:var(--ux-line)!important; box-shadow:none!important;
}
/* Remove decorative light washes only; do not remove financial marks or goal images. */
body.ux-r311 :is(#sidebar,.profile-card,.profile-settings-block,.goal-card,.business-management-card,.ofx-panel,.wallet-kpi)::before,
body.ux-r311 :is(#sidebar,.profile-card,.profile-settings-block,.goal-card,.business-management-card,.ofx-panel,.wallet-kpi)::after {
  background:none!important; box-shadow:none!important;
}
body.ux-r311 :is(#sidebar .sidebar-mobile-nav button,#sidebar .ol-nav-btn,.sidebar-mobile-profile,.sidebar-profile-link,
  .btn-secondary,.ofx-invest-tabs button,.ofx-invest-filters button,.ofx-invest-periods button,.profile-settings-tabs button,
  .filter-row button,.month-pill-btn,.goal-actions button:not(.add-btn):not(.danger),.business-tx-more,.ux-shortcuts button,.business-fab-actions section button) {
  background:var(--ux-panel)!important; color:var(--ux-text)!important; border-color:var(--ux-line)!important; box-shadow:none!important;
}
body.ux-r311 :is(#sidebar .sidebar-mobile-nav button.active,#sidebar .ol-nav-btn.active,
  .bottom-tabs button.active,.ofx-invest-tabs button.active,.ofx-invest-filters button.active,.ofx-invest-periods button.active,
  .profile-settings-tabs button.active,.filter-row button.active,.month-pill-btn.active,.workspace-popover-item.active,
  .ux-context-options button[aria-pressed=true],.calendar-day.selected,.reminder-day-options label:has(input:checked)) {
  background:var(--ux-soft)!important; color:var(--ux-accent)!important; border-color:var(--ux-line)!important; box-shadow:none!important;
}
body.ux-r311 :is(#appScreen .btn-primary,.btn-primary,.nav-fab,.fab-menu .primary,.business-dashboard-actions .primary,
  .ofx-invest-actions button:last-child,.chat-send-btn,.send-btn) {
  background:var(--primary)!important; color:var(--on-primary)!important; border-color:var(--primary)!important; box-shadow:none!important;
}
body.ux-r311 :is(#txModal input,#txModal select,#txModal textarea,input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),select,textarea) {
  background-color:var(--ux-bg)!important; color:var(--ux-text); border-color:var(--ux-line)!important; box-shadow:none;
}
body.ux-r311 :is(input,textarea)::placeholder { color:var(--ux-muted); opacity:1; }
body.ux-r311 :is(input,select,textarea):focus-visible { border-color:var(--ux-accent)!important; outline:2px solid var(--ux-accent); outline-offset:2px; }
body.ux-r311 :is(.goal-label,.goal-target-txt,.goal-progress-label,.goal-stat span,.goal-insight,.profile-settings-panel p,.settings-preference-card p) { color:var(--ux-muted); }
body.ux-r311 :is(#sidebar .sidebar-mobile-nav-icon,.ofx-invest-asset-icon,.reminder-settings-icon) { background:var(--ux-soft)!important; color:var(--ux-accent)!important; box-shadow:none!important; }
body.ux-r311 :is(.goal-bar,.goal-progress-track) { background:var(--ux-line)!important; }
body.ux-r311 :is(#sidebarLogoutBtn,.goal-actions button.danger,.family-remove-btn) { color:#fda4af!important; background:rgba(225,29,72,.12)!important; border-color:rgba(225,29,72,.3)!important; }
/* Login uses the same base even before authenticated workspace initialization. */
html body.ol-auth-active,html:not(.cap-native) #authScreen.auth-screen,
#authScreen,.auth-card,.auth-form-panel { background:var(--ux-bg)!important; border-color:var(--ux-line)!important; }
#authScreen :is(.auth-tabs,.auth-tab,.auth-input-wrap,.auth-social-button) { background:var(--ux-panel); border-color:var(--ux-line); }
#authScreen .btn-primary { background:var(--ux-primary)!important; box-shadow:none!important; }
/* Navigation uses spacing and selection color instead of outlined boxes. */
body.ux-r311 #sidebar.sidebar,
body.ux-r311 #sidebar.sidebar :is(.sidebar-mobile-hub,.sidebar-mobile-head,.sidebar-mobile-footer,.sidebar-footer,.sidebar-brand,
  .sidebar-menu,.sidebar-mobile-nav,.sidebar-mobile-account,.workspace-switcher,button,a),
body.ux-r311 #appScreen .bottom-tabs { border-color:transparent!important; box-shadow:none!important; }
body.ux-r311 #sidebar.sidebar :is(.sidebar-mobile-nav button,.ol-nav-btn):not(.active),
body.ux-r311 #sidebar.sidebar :is(.sidebar-mobile-profile,.sidebar-profile-link) { background:transparent!important; }
/* Profile links share active navigation's accent; filled actions share the primary CTA. */
body.ux-r311 :is(#sidebar .sidebar-mobile-profile,#sidebar .sidebar-mobile-profile-icon,#sidebar .sidebar-user-copy small,.profile-account-link) {
  color:var(--primary-light)!important;
}
body.ux-r311 :is(#sidebar .sidebar-mobile-profile-icon,.profile-account-link) {
  background:var(--primary-dim)!important; border-color:var(--ux-line)!important;
}
body.ux-r311 :is(.profile-account-link small,.workspace-popover-item small,.workspace-trigger-copy small) { color:var(--ux-muted)!important; }
body.ux-r311 .avatar-menu-indicator {
  background:var(--primary)!important; color:var(--on-primary)!important; border-color:var(--ux-bg)!important; box-shadow:none!important;
}
body.ux-r311 :is(.workspace-popover-item.selected,.workspace-popover-item:hover,.workspace-popover-item:focus-visible,.workspace-popover-add:hover) {
  background:var(--primary-dim)!important;
}
body.ux-r311 :is(.workspace-popover-add,.workspace-popover-add.locked,.workspace-popover-lock) { color:var(--primary-light)!important; }
body.ux-r311 :is(.workspace-popover-icon.business,.workspace-popover-add span,.workspace-popover-lock) {
  background:var(--primary-dim)!important; border-color:var(--ux-line)!important;
}
