/* ChartMaster Services palette, based on the supplied #BF062F logo red. */
.brand-mark { color: #fff; box-shadow: none; }
.sidebar-nav .nav-link.active,
body.client-mode .sidebar-nav .nav-link[href="#reports"] { color: var(--brand-dark); background: var(--brand-light); }
.icon-button:hover { color: var(--brand); border-color: #e5c3c7; background: #fffafa; }
.report-search:focus-within { border-color: #dd949d; box-shadow: 0 0 0 3px rgba(191,6,47,.08); }
.form-control:focus, .form-select:focus { border-color: #dc8e98; box-shadow: 0 0 0 .2rem rgba(191,6,47,.08); }
.upload-dropzone.dragging { border-color: var(--brand); background: #fff1f3; }
.client-access-banner,
body.client-mode .client-access-banner { background: linear-gradient(118deg, #2a292b, #8a0422 48%, var(--brand-solid)); box-shadow: 0 14px 32px rgba(138,0,17,.2); }
.client-access-icon { color: var(--brand); background: #fff; }
.client-access-copy span,
body.client-mode .client-access-copy > span:first-child,
.client-access-copy .client-featured-meta span { color: #ffe1e5; }
.client-report-progress i { background: #fff; }
.client-access-banner .btn-light { color: var(--brand-dark); }
.report-section-nav.active { color: var(--brand-dark); background: var(--brand-light); }
.report-section-nav.active small { color: #8e5960; }
.report-section-nav:focus-visible { outline-color: rgba(191,6,47,.3); }
.score-ring { border-color: #f1d9dc; border-top-color: var(--brand); border-right-color: var(--brand); }
.meridian-take { border-color: #efd1d5; background: #fff3f4; }
.meridian-take > span { color: var(--brand-dark); background: #f2bcc8; }
.recommendation-card { background: linear-gradient(145deg, #6b041a, var(--brand-solid)); }
.recommendation-card .panel-kicker { color: #ffd0d5; }
.recommendation-card p { color: #ffe2e5; }
.recommendation-card .btn { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.13); }
.comp-map { background-color: #ededed; background-image: linear-gradient(30deg, rgba(255,255,255,.8) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.8) 87.5%), linear-gradient(150deg, rgba(255,255,255,.62) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.62) 87.5%); }
.map-park { background: #d7d7d7; }
.map-pin:hover, .map-pin.active { color: var(--brand-dark); background: #fff; box-shadow: 0 0 0 2px var(--brand), 0 6px 14px rgba(70,0,8,.2); }
.value-meter i { background: linear-gradient(90deg, #888, var(--brand)); }
.report-next-section { border-color: #ecc5ca; background: linear-gradient(115deg, #fff2f4, #fff); box-shadow: 0 7px 20px rgba(74,0,9,.06); }
.report-next-section:hover { border-color: #dc9099; background: linear-gradient(115deg, #ffe7ea, #fffafa); box-shadow: 0 10px 24px rgba(74,0,9,.1); }
.report-next-section:focus-visible { outline-color: rgba(191,6,47,.2); }
.rail-input:focus-within,
.mobile-tool-input:focus-within,
.mobile-tool-panel textarea:focus { border-color: #dd939c; box-shadow: 0 0 0 3px rgba(191,6,47,.08); }
.mobile-report-actions { box-shadow: 0 12px 32px rgba(50,0,6,.14); }
.mobile-report-actions button:hover, .mobile-report-actions button.active { color: var(--brand-dark); background: var(--brand-light); }
.mobile-report-actions button:focus-visible, .mobile-tool-sheet button:focus-visible { outline-color: rgba(191,6,47,.36); }
.mobile-content-nav:hover { border-color: #e3b9be; background: #fffafa; }
.mobile-content-nav.active { color: var(--brand-dark); border-color: #dfa8ae; background: var(--brand-light); box-shadow: 0 5px 14px rgba(74,0,9,.06); }
.service-options input:checked + span { border-color: var(--brand); background: #fff1f3; box-shadow: 0 0 0 2px rgba(191,6,47,.08); }
body.client-mode .brand-mark { color: #fff; }
body.client-mode .role-icon { color: var(--brand-dark); background: #f2bcc8; }
.client-library-order > span:first-child { color: var(--brand-dark); }
body.client-mode .client-library-row.unreviewed { border-left-color: var(--brand); background: #fffafa; }
body.client-mode .client-library-row.latest { background: #fff5f6; }
body.client-mode .client-library-row:hover { background: #fff0f2; }
.client-review-badge { color: var(--brand-dark); background: var(--brand-light); }
.client-report-cta > i { border-color: #e4bdc2; }

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .preview-index,
html[data-theme="dark"] .report-tools-rail { background: #141414; }
html[data-theme="dark"] .topbar { border-bottom-color: rgba(54,54,54,.92); background: rgba(16,16,16,.9); }
html[data-theme="dark"] .report-preview,
html[data-theme="dark"] .preview-page { background: #121212; }
html[data-theme="dark"] .top-search,
html[data-theme="dark"] .report-search,
html[data-theme="dark"] .filter-button,
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .upload-dropzone,
html[data-theme="dark"] .share-setting,
html[data-theme="dark"] .rail-input,
html[data-theme="dark"] .notes-card textarea,
html[data-theme="dark"] .mobile-tool-input,
html[data-theme="dark"] .mobile-tool-input input,
html[data-theme="dark"] .mobile-tool-panel textarea { background: #202020; }
html[data-theme="dark"] .top-search kbd { color: #b6b6b6; border-color: #414141; background: #272727; }
html[data-theme="dark"] .dropdown-menu { background: #202020; }
html[data-theme="dark"] .dropdown-item { color: #e3e3e3; }
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus { background: #2a2a2a; }
html[data-theme="dark"] .notification-dot { border-color: #101010; }
html[data-theme="dark"] .sidebar-nav .nav-link { color: #aaa; }
html[data-theme="dark"] .brand-name > small { color: #aaa; }
html[data-theme="dark"] .sidebar-nav .nav-link:hover,
html[data-theme="dark"] .report-section-nav:hover { color: var(--ink); background: #262626; }
html[data-theme="dark"] .sidebar-nav .nav-link.active,
html[data-theme="dark"] body.client-mode .sidebar-nav .nav-link[href="#reports"],
html[data-theme="dark"] .report-section-nav.active { color: #f8a2b5; background: #3a171c; }
html[data-theme="dark"] .workspace-avatar,
html[data-theme="dark"] .security-icon,
html[data-theme="dark"] .report-type-pill { color: #f8a2b5; }
html[data-theme="dark"] .role-switch,
html[data-theme="dark"] .support-card,
html[data-theme="dark"] .scenario-value-card,
html[data-theme="dark"] .chart-hover-value { background: #090909; }
html[data-theme="dark"] .role-switch:hover { background: #242424; }
html[data-theme="dark"] .btn-soft:hover { color: #f8a2b5; border-color: #68434a; background: #261b1d; }
html[data-theme="dark"] .view-toggle,
html[data-theme="dark"] .chart-metric-switch,
html[data-theme="dark"] .comp-filter,
html[data-theme="dark"] .scenario-presets { background: #151515; }
html[data-theme="dark"] .view-toggle button.active,
html[data-theme="dark"] .chart-metric-switch button.active,
html[data-theme="dark"] .comp-filter button.active,
html[data-theme="dark"] .scenario-presets button.active { color: #f8a2b5; background: #2c2425; }
html[data-theme="dark"] .report-section-nav > span:first-child,
html[data-theme="dark"] .secure-view-pill { background: #292929; }
html[data-theme="dark"] .section-number { color: #353535; }
html[data-theme="dark"] .report-row,
html[data-theme="dark"] .activity-item,
html[data-theme="dark"] .submarket-row,
html[data-theme="dark"] .comp-table td { border-color: #333; }
html[data-theme="dark"] .report-row:hover,
html[data-theme="dark"] .comp-table tr:hover td { background: #232323; }
html[data-theme="dark"] .row-menu:hover,
html[data-theme="dark"] .activity-type { color: #c1c1c1; background: #292929; }
html[data-theme="dark"] .mini-chart span,
html[data-theme="dark"] .market-bars button { background: #523036; }
html[data-theme="dark"] .market-chart-grid i { border-color: #393939; }
html[data-theme="dark"] .score-ring { border-color: #4b292e; border-top-color: var(--brand); border-right-color: var(--brand); }
html[data-theme="dark"] .upload-dropzone.dragging,
html[data-theme="dark"] .secure-callout,
html[data-theme="dark"] .meridian-take,
html[data-theme="dark"] .scenario-insight,
html[data-theme="dark"] .report-answer,
html[data-theme="dark"] .mobile-report-answer { border-color: #5b2b31; background: #30191d; }
html[data-theme="dark"] .report-note,
html[data-theme="dark"] .analyst-note,
html[data-theme="dark"] .question-chips button,
html[data-theme="dark"] .mobile-question-chips button,
html[data-theme="dark"] .assumption-note { background: #242424; }
html[data-theme="dark"] .report-answer > span,
html[data-theme="dark"] .mobile-report-answer > span { background: #3b1c21; }
html[data-theme="dark"] .service-options input:checked + span { border-color: var(--brand); background: #34171c; }
html[data-theme="dark"] .submarket-row.header,
html[data-theme="dark"] .comp-table th { color: #aaa; background: #1d1d1d; }
html[data-theme="dark"] .submarket-row.featured { background: #28191b; }
html[data-theme="dark"] .comp-map { background-color: #242424; background-image: linear-gradient(30deg, rgba(255,255,255,.035) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.035) 87.5%), linear-gradient(150deg, rgba(255,255,255,.025) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.025) 87.5%); }
html[data-theme="dark"] .map-road { background: #383838; box-shadow: 0 0 0 1px #464646; }
html[data-theme="dark"] .map-park { background: #303030; }
html[data-theme="dark"] .map-pin { border-color: #242424; }
html[data-theme="dark"] .map-detail { border-color: rgba(90,90,90,.72); background: rgba(29,29,29,.95); }
html[data-theme="dark"] .sensitivity-grid b { color: #b6b6b6; background: #292929; }
html[data-theme="dark"] .report-next-section { border-color: #64323a; background: linear-gradient(115deg, #30191d, #191919); }
html[data-theme="dark"] .report-next-section:hover { border-color: #8d4650; background: linear-gradient(115deg, #3c1c22, #242020); }
html[data-theme="dark"] .mobile-report-actions { border-color: rgba(65,65,65,.9); background: rgba(25,25,25,.95); }
html[data-theme="dark"] .mobile-report-actions button { color: #b6b6b6; }
html[data-theme="dark"] .mobile-report-actions button:hover,
html[data-theme="dark"] .mobile-report-actions button.active,
html[data-theme="dark"] .mobile-contents-trigger.active,
html[data-theme="dark"] .mobile-content-nav.active { color: #f8a2b5; border-color: #6c363e; background: #3a171c; }
html[data-theme="dark"] .mobile-contents-trigger,
html[data-theme="dark"] .mobile-content-nav { background: #202020; }
html[data-theme="dark"] .mobile-content-nav:hover { border-color: #5a3d41; background: #2a2223; }
html[data-theme="dark"] .mobile-content-number,
html[data-theme="dark"] .mobile-contents-progress { background: #292929; }
html[data-theme="dark"] .mobile-content-nav.active .mobile-content-state { color: #f8a2b5; background: #4a2026; }
html[data-theme="dark"] .mobile-contents-progress-bar { background: #393939; }
html[data-theme="dark"] body.client-mode .client-library-row.unreviewed { background: #24191a; }
html[data-theme="dark"] body.client-mode .client-library-row.latest,
html[data-theme="dark"] body.client-mode .client-library-row:hover { background: #2b171a; }
html[data-theme="dark"] .latest-report-badge { color: #f8a2b5; background: #43171d; }
html[data-theme="dark"] .client-review-badge { color: #f8a2b5; background: #43171d; }
html[data-theme="dark"] .client-report-cta > i { background: #242424; }


/* Keep filled actions on the exact brand red in both themes. Text accents can
 * brighten in dark mode without reducing white button-label contrast. */
:root, html[data-theme="dark"] {
  --bs-primary: var(--brand-solid);
  --bs-primary-rgb: 191, 6, 47;
  --bs-primary-text-emphasis: var(--brand-dark);
  --bs-primary-bg-subtle: var(--brand-light);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-dark);
}
.btn-primary, .btn-primary:disabled, .live-admin .btn-primary:disabled {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand-solid);
  --bs-btn-border-color: var(--brand-solid);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-solid-hover);
  --bs-btn-hover-border-color: var(--brand-solid-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-solid-hover);
  --bs-btn-active-border-color: var(--brand-solid-hover);
  --bs-btn-disabled-bg: var(--brand-solid);
  --bs-btn-disabled-border-color: var(--brand-solid);
  --bs-btn-focus-shadow-rgb: 191, 6, 47;
  color: #fff; border-color: var(--brand-solid); background: var(--brand-solid);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { color: #fff; border-color: var(--brand-solid-hover); background: var(--brand-solid-hover); }
.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand-solid);
  --bs-btn-hover-border-color: var(--brand-solid);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand-solid-hover);
  --bs-btn-active-border-color: var(--brand-solid-hover);
  --bs-btn-disabled-color: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: 191, 6, 47;
}
.form-check-input:checked { background-color: var(--brand-solid); border-color: var(--brand-solid); }
