/**
 * Core Lexes — Approved Phase 1 site theme (Poppins typography + black/matte silver).
 * Authoritative tokens; active when html[data-clx-phase1-theme="1"] (staging gate).
 * Poppins files: static/fonts/poppins/ (OFL, via Fontsource/Google Fonts).
 * Do not change spacing, padding, margins, or dimensions here.
 */

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins/Poppins-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html[data-clx-phase1-theme="1"] {
  /* ----- Approved palette (single source) ----- */
  --clx-ap-bg-primary: #000000;
  --clx-ap-bg-panel: #000000;
  --clx-ap-bg-secondary: #000000;
  --clx-ap-cobalt: #0d6efd;
  --clx-ap-cobalt-hover: #0b5ed7;
  --clx-ap-silver: #c0c7d6;
  --clx-ap-text: #ffffff;
  --clx-ap-text-secondary: #aeb4c2;
  --clx-ap-font: "Poppins", system-ui, sans-serif;
  --clx-ap-fs-12: 12px;
  --clx-ap-fs-13: 13px;
  --clx-ap-fs-14: 14px;
  --clx-ap-fs-16: 16px;
  --clx-ap-fs-18: 18px;
  --clx-ap-on-silver: #000000;
  --clx-ap-btn-matte: #aeb4c2;
  --clx-ap-btn-matte-hover: #c0c7d6;
  --clx-ap-silver-gradient: #aeb4c2;
  --clx-ap-silver-gradient-hover: #c0c7d6;

  /* Legacy design-system / chrome tokens → approved palette (no theme gold/navy) */
  --clx-navy: var(--clx-ap-bg-primary);
  --clx-gold: var(--clx-ap-silver);
  --clx-gold-hover: var(--clx-ap-silver);
  --clx-content-bg: var(--clx-ap-bg-panel);
  --clx-border: var(--clx-ap-silver);
  --clx-font: var(--clx-ap-font);
  --clx-text-navy: var(--clx-ap-text);
  --clx-chrome-font: var(--clx-ap-font);
  --clx-chrome-navy: var(--clx-ap-bg-primary);
  --clx-chrome-navy-2: var(--clx-ap-bg-panel);
  --clx-chrome-gold: var(--clx-ap-silver);
  --clx-chrome-gold-soft: rgba(192, 199, 214, 0.22);
  --chrome-sidebar-bg: var(--clx-ap-bg-primary);
  --primary-banner-bg: var(--clx-ap-bg-primary);
  --clx-ms-navy: var(--clx-ap-bg-primary);
  --clx-ms-content-bg: var(--clx-ap-bg-panel);
  --ws-navy: var(--clx-ap-bg-primary);
  --ml-navy: var(--clx-ap-bg-primary);
  --cd-navy: var(--clx-ap-bg-primary);
  --fr-navy: var(--clx-ap-bg-primary);
  --fr-navy-mid: var(--clx-ap-bg-panel);
  --es-navy: var(--clx-ap-bg-primary);
  --ds-navy: var(--clx-ap-bg-primary);
  --ds-navy3: var(--clx-ap-bg-panel);
  --ssw-navy: var(--clx-ap-bg-primary);
  --clx-dd-navy: var(--clx-ap-bg-primary);
  --tkc-navy: var(--clx-ap-bg-primary);
  --tkc-navy-mid: var(--clx-ap-bg-panel);
  --tkc-gold: var(--clx-ap-silver);
  --tkc-gold-hover: var(--clx-ap-silver);
  --tkc-ink: var(--clx-ap-text);
  --tkc-hdr: var(--clx-ap-bg-primary);
  --tkc-text: var(--clx-ap-text);

  --ws-gold: var(--clx-ap-silver);
  --ws-gold-hover: var(--clx-ap-silver);
  --ws-gold-soft: rgba(192, 199, 214, 0.22);
  --ws-text: var(--clx-ap-text);
  --ws-muted: var(--clx-ap-text-secondary);

  --clx-dd-gold: var(--clx-ap-silver);
  --clx-dd-gold-border: var(--clx-ap-silver);
  --clx-dd-gold-soft: rgba(13, 110, 253, 0.18);
  --clx-dd-text: var(--clx-ap-text);
  --clx-dd-muted: var(--clx-ap-text-secondary);

  --fr-gold: var(--clx-ap-silver);
  --fr-gold-soft: rgba(192, 199, 214, 0.22);
  --fr-text: var(--clx-ap-text);
  --fr-muted: var(--clx-ap-text-secondary);
  --fr-font: var(--clx-ap-font);
  --fr-bg: var(--clx-ap-bg-primary);
  --fr-card: var(--clx-ap-bg-panel);
  --fr-border: rgba(192, 199, 214, 0.35);

  --clx-live-bg: var(--clx-ap-bg-primary);
  --clx-live-panel: var(--clx-ap-bg-panel);
  --clx-live-border: var(--clx-ap-silver);
  --clx-live-heading: var(--clx-ap-text);
  --clx-live-text: var(--clx-ap-text);
  --clx-live-text-soft: var(--clx-ap-text-secondary);
  --clx-live-action-bg: var(--clx-ap-btn-matte);
  --clx-live-action-fg: var(--clx-ap-on-silver);
  --clx-live-action-border: rgba(138, 147, 163, 0.45);
  --clx-live-nav-active-bg: var(--clx-ap-btn-matte);
  --clx-live-nav-active-fg: var(--clx-ap-on-silver);
  --clx-live-input-bg: var(--clx-ap-bg-panel);
  --clx-live-input-border: var(--clx-ap-silver);
  --clx-live-table-hdr-bg: var(--clx-ap-bg-primary);
  --clx-live-table-hdr-ink: var(--clx-ap-text);

  --clx-ref-gold: var(--clx-ap-silver);
  --clx-ref-gold-deep: var(--clx-ap-silver);
  --clx-ref-blue: var(--clx-ap-cobalt);
  --clx-ref-blue-bright: var(--clx-ap-cobalt);
  --clx-ref-neon-blue: var(--clx-ap-cobalt);
  --clx-ref-neon-blue-hot: var(--clx-ap-cobalt);
  --clx-ref-blue-line: var(--clx-ap-silver);
  --clx-ref-tab-active-bg: var(--clx-ap-cobalt);
  --clx-ref-tab-active-fg: var(--clx-ap-text);
  --clx-ref-hdr-border: var(--clx-ap-silver);
  --clx-ref-heading: var(--clx-ap-text);
  --clx-ref-text: var(--clx-ap-text);
  --clx-ref-text-soft: var(--clx-ap-text-secondary);
  --clx-ref-action-bg: var(--clx-ap-btn-matte);
  --clx-ref-action-fg: var(--clx-ap-on-silver);
  --clx-ref-action-border: rgba(138, 147, 163, 0.45);
}

/* ----- Base page chrome ----- */
html[data-clx-phase1-theme="1"],
html[data-clx-phase1-theme="1"] body {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
  color: var(--clx-ap-text);
  background-color: var(--clx-ap-bg-primary) !important;
}

html[data-clx-phase1-theme="1"] .app-header,
html[data-clx-phase1-theme="1"] .app-sidebar {
  background: var(--clx-ap-bg-primary) !important;
}

html[data-clx-phase1-theme="1"] .header-label,
html[data-clx-phase1-theme="1"] .header-app-kicker {
  color: var(--clx-ap-text) !important;
  font-family: var(--clx-ap-font) !important;
}

html[data-clx-phase1-theme="1"] .header-app-salutation,
html[data-clx-phase1-theme="1"] .clx-header-daily-block .header-app-salutation {
  font-size: var(--clx-ap-fs-18) !important;
  color: var(--clx-ap-text) !important;
  font-family: var(--clx-ap-font) !important;
}

html[data-clx-phase1-theme="1"] .header-subtitle {
  color: var(--clx-ap-text-secondary) !important;
  font-family: var(--clx-ap-font) !important;
}

/* ----- Typography tiers (sizes only; weights unchanged) ----- */
html[data-clx-phase1-theme="1"] .app-sidebar .nav-link,
html[data-clx-phase1-theme="1"] .sidebar-section-title-office,
html[data-clx-phase1-theme="1"] .sidebar-section-title-email,
html[data-clx-phase1-theme="1"] .sidebar-section-title-draft,
html[data-clx-phase1-theme="1"] .sidebar-section-title-user,
html[data-clx-phase1-theme="1"] .sidebar-doc-drafting-block__links .nav-link {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-13) !important;
}

html[data-clx-phase1-theme="1"] .btn,
html[data-clx-phase1-theme="1"] .form-control,
html[data-clx-phase1-theme="1"] .form-select,
html[data-clx-phase1-theme="1"] label,
html[data-clx-phase1-theme="1"] .table,
html[data-clx-phase1-theme="1"] .modal,
html[data-clx-phase1-theme="1"] .dropdown-menu {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
}

html[data-clx-phase1-theme="1"] .badge,
html[data-clx-phase1-theme="1"] .text-muted,
html[data-clx-phase1-theme="1"] small,
html[data-clx-phase1-theme="1"] .clx-ws-card-hdr .clx-ws-card-sub,
html[data-clx-phase1-theme="1"] .summary-detail-label,
html[data-clx-phase1-theme="1"] time,
html[data-clx-phase1-theme="1"] .clx-nt-date,
html[data-clx-phase1-theme="1"] .clx-tk-date {
  font-size: var(--clx-ap-fs-12) !important;
  color: var(--clx-ap-text-secondary);
}

html[data-clx-phase1-theme="1"] .clx-ws-card-hdr,
html[data-clx-phase1-theme="1"] .clx-card-header,
html[data-clx-phase1-theme="1"] .card-header,
html[data-clx-phase1-theme="1"] .clx-panel-header,
html[data-clx-phase1-theme="1"] .clx-ml-card-hdr,
html[data-clx-phase1-theme="1"] #ml-filters-hdr,
html[data-clx-phase1-theme="1"] #ml-results-hdr,
html[data-clx-phase1-theme="1"] .workspace-toggle,
html[data-clx-phase1-theme="1"] .clx-cd-pane-hdr,
html[data-clx-phase1-theme="1"] .clx-esign-ws-hdr,
html[data-clx-phase1-theme="1"] .pi-med-card-hdr,
html[data-clx-phase1-theme="1"] .clx-pim-hdr {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-16) !important;
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  border-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-metric-val,
html[data-clx-phase1-theme="1"] .clx-ws-metric strong,
html[data-clx-phase1-theme="1"] .page-title,
html[data-clx-phase1-theme="1"] .clx-ws-greeting {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-18) !important;
}

/* Draft Studio — Poppins (Phase 1 staging supersedes prior Segoe UI exception). */
html[data-clx-phase1-theme="1"] body.clx-templates-page,
html[data-clx-phase1-theme="1"] body.clx-templates-page .clx-ds,
html[data-clx-phase1-theme="1"] body.clx-templates-page .clx-ds-overlay,
html[data-clx-phase1-theme="1"] body.clx-templates-page .clx-ds-menu,
html[data-clx-phase1-theme="1"] body.clx-templates-page .clx-ds-toast,
html[data-clx-phase1-theme="1"] body.clx-templates-page .clx-ds * {
  font-family: var(--clx-ap-font) !important;
}

/* ----- Surfaces: pure black with silver borders ----- */
html[data-clx-phase1-theme="1"] .app-main,
html[data-clx-phase1-theme="1"] .app-main-content,
html[data-clx-phase1-theme="1"] .page-body {
  background-color: var(--clx-ap-bg-primary) !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-card,
html[data-clx-phase1-theme="1"] .clx-panel,
html[data-clx-phase1-theme="1"] .clx-panel-body,
html[data-clx-phase1-theme="1"] .card:not(#financial-box),
html[data-clx-phase1-theme="1"] .clx-card:not(#financial-box),
html[data-clx-phase1-theme="1"] #ml-filters-card,
html[data-clx-phase1-theme="1"] #ml-results-card,
html[data-clx-phase1-theme="1"] .clx-cd-pane,
html[data-clx-phase1-theme="1"] .modal-content {
  background-color: var(--clx-ap-bg-panel) !important;
  border-color: var(--clx-ap-silver) !important;
  color: var(--clx-ap-text);
}

html[data-clx-phase1-theme="1"] .clx-panel-body,
html[data-clx-phase1-theme="1"] .clx-ws-card-body {
  background-color: var(--clx-ap-bg-panel) !important;
  color: var(--clx-ap-text);
}

/* ----- Primary actions & active nav (silver primary, dark ink; cobalt = focus/highlight only) ----- */
html[data-clx-phase1-theme="1"] .app-sidebar .nav-link.active,
html[data-clx-phase1-theme="1"] .sidebar-nav-flat .nav-link.active {
  background: var(--clx-ap-btn-matte) !important;
  background-color: var(--clx-ap-btn-matte) !important;
  background-image: none !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  border: 1px solid rgba(138, 147, 163, 0.45) !important;
}

html[data-clx-phase1-theme="1"] .clx-btn-gold,
html[data-clx-phase1-theme="1"] .summary-banner-action-btn.clx-ms-btn-gold,
html[data-clx-phase1-theme="1"] .btn-primary,
html[data-clx-phase1-theme="1"] .clx-live-action-btn,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-ws-btn-gold,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-dd-btn-gold,
html[data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link,
html[data-clx-phase1-theme="1"] body.clx-workspace-page .clx-ws-connect-cta {
  background: var(--clx-ap-silver-gradient) !important;
  background-color: var(--clx-ap-btn-matte) !important;
  background-image: none !important;
  border-color: rgba(138, 147, 163, 0.45) !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
}

html[data-clx-phase1-theme="1"] .clx-btn-gold:hover,
html[data-clx-phase1-theme="1"] .clx-btn-gold:focus,
html[data-clx-phase1-theme="1"] .btn-primary:hover,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-ws-btn-gold:hover,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-dd-btn-gold:hover,
html[data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:hover,
html[data-clx-phase1-theme="1"] body.clx-workspace-page .clx-ws-connect-cta:hover {
  background: var(--clx-ap-silver-gradient-hover) !important;
  background-color: var(--clx-ap-btn-matte-hover) !important;
  background-image: none !important;
  border-color: var(--clx-ap-silver) !important;
  color: var(--clx-ap-on-silver) !important;
}

html[data-clx-phase1-theme="1"] .clx-btn-gold:focus-visible,
html[data-clx-phase1-theme="1"] .btn-primary:focus-visible,
html[data-clx-phase1-theme="1"] .app-sidebar .nav-link:focus-visible {
  outline: 2px solid var(--clx-ap-cobalt) !important;
  outline-offset: 1px;
}

/* Matter primary tabs — active silver (not gold/navy) */
html[data-clx-phase1-theme="1"] #matter-tabs .nav-link.active,
html[data-clx-phase1-theme="1"] .matter-tabs .nav-link.active {
  background: var(--clx-ap-btn-matte) !important;
  background-color: var(--clx-ap-btn-matte) !important;
  background-image: none !important;
  color: var(--clx-ap-on-silver) !important;
  border-color: rgba(138, 147, 163, 0.45) !important;
  box-shadow: none !important;
}

html[data-clx-phase1-theme="1"] #pi-pane .nav-link.active,
html[data-clx-phase1-theme="1"] .clx-pi-subtabs .nav-link.active {
  background: var(--clx-ap-btn-matte) !important;
  background-color: var(--clx-ap-btn-matte) !important;
  background-image: none !important;
  color: var(--clx-ap-on-silver) !important;
  border-bottom-color: var(--clx-ap-silver) !important;
}

/* Section title ink (was light blue in staging-bw) */
html[data-clx-phase1-theme="1"] .sidebar-section-title-office,
html[data-clx-phase1-theme="1"] .sidebar-section-title-email,
html[data-clx-phase1-theme="1"] .sidebar-section-title-draft,
html[data-clx-phase1-theme="1"] .sidebar-section-title-user {
  color: var(--clx-ap-text-secondary) !important;
}

/* Staging-bw illuminated header overrides → silver border, white title */
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .clx-ws-card-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .clx-ml-card-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] #ml-filters-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] #ml-results-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .card:not(#financial-box) > .card-header,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .clx-card:not(#financial-box) > .clx-card-header {
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  border-color: var(--clx-ap-silver) !important;
  background: var(--clx-ap-bg-primary) !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .clx-ws-card-hdr::before,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .clx-ml-card-hdr::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--clx-ap-cobalt) 22%,
    var(--clx-ap-silver) 50%,
    var(--clx-ap-cobalt) 78%,
    transparent 100%
  ) !important;
  box-shadow: none !important;
}

/* ----- Staging-bw + Phase 1: reassert tokens (loads after clx-staging-bw-theme.css) ----- */
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] {
  --clx-live-heading: var(--clx-ap-text);
  --clx-live-border: var(--clx-ap-silver);
  --clx-live-text-soft: var(--clx-ap-text-secondary);
  --clx-live-nav-active-bg: var(--clx-ap-silver);
  --clx-live-nav-active-fg: var(--clx-ap-on-silver);
  --clx-live-action-bg: var(--clx-ap-silver);
  --clx-live-action-fg: var(--clx-ap-on-silver);
  --clx-live-action-border: var(--clx-ap-silver);
  --clx-ref-blue-bright: var(--clx-ap-text);
  --clx-ref-neon-blue: var(--clx-ap-cobalt);
  --clx-ref-neon-blue-hot: var(--clx-ap-cobalt);
  --clx-ref-blue-soft: rgba(13, 110, 253, 0.12);
  --clx-ref-gold-grad: none;
  --ws-border: var(--clx-ap-silver);
  --cd-border: var(--clx-ap-silver);
}

/* Sidebar brand text (staging-bw gold gradient → approved white) */
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar .clx-sb-word,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar .clx-sb-plus {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  color: var(--clx-ap-text) !important;
  filter: none !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar [class*="sidebar-section-title-"] {
  color: var(--clx-ap-text-secondary) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar .nav-ico {
  color: var(--clx-ap-silver) !important;
  filter: none !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar .nav-link.active,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar .nav-link.active .nav-ico {
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-sidebar .sidebar-brand {
  border-bottom-color: rgba(192, 199, 214, 0.35) !important;
}

/* Header greeting (hardcoded gold in staging-bw) */
html[data-clx-phase1-theme="1"] .app-header .clx-header-personal-greeting {
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  font-size: var(--clx-ap-fs-18) !important;
  font-family: var(--clx-ap-font) !important;
}

html[data-clx-phase1-theme="1"] .app-header .clx-header-personal-affirmation {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
}

/* Illuminated header accents → cobalt/silver, no neon glow */
html[data-clx-phase1-theme="1"] .clx-ws-card-hdr::before,
html[data-clx-phase1-theme="1"] .clx-ml-card-hdr::before,
html[data-clx-phase1-theme="1"] #ml-filters-hdr::before,
html[data-clx-phase1-theme="1"] #ml-results-hdr::before,
html[data-clx-phase1-theme="1"] .clx-cd-pane-hdr::before,
html[data-clx-phase1-theme="1"] .clx-cd-tb-hdr::before,
html[data-clx-phase1-theme="1"] .clx-cd-list-hdr::before,
html[data-clx-phase1-theme="1"] .clx-cd-detail-hdr::before,
html[data-clx-phase1-theme="1"] .clx-cal-card-hdr::before,
html[data-clx-phase1-theme="1"] .clx-cal-hdr::before,
html[data-clx-phase1-theme="1"] .fr-panel-hdr::before,
html[data-clx-phase1-theme="1"] .fr-modal-hdr::before,
html[data-clx-phase1-theme="1"] .card:not(#financial-box) > .card-header::before,
html[data-clx-phase1-theme="1"] .clx-card:not(#financial-box) > .clx-card-header::before,
html[data-clx-phase1-theme="1"] .clx-esign-ws-hdr::before,
html[data-clx-phase1-theme="1"] .clx-ds-hero::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--clx-ap-cobalt) 50%,
    transparent 100%
  ) !important;
  box-shadow: none !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-card-hdr::after,
html[data-clx-phase1-theme="1"] .clx-ml-card-hdr::after,
html[data-clx-phase1-theme="1"] #ml-filters-hdr::after,
html[data-clx-phase1-theme="1"] #ml-results-hdr::after,
html[data-clx-phase1-theme="1"] .clx-cd-pane-hdr::after {
  background: linear-gradient(90deg, transparent, rgba(192, 199, 214, 0.55), transparent) !important;
  box-shadow: none !important;
}

/* Modals / dropdowns — silver dividers (not gold rgba) */
html[data-clx-phase1-theme="1"] .modal-header,
html[data-clx-phase1-theme="1"] .modal-footer {
  border-color: rgba(192, 199, 214, 0.45) !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-metric,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .clx-ws-metric {
  border-color: var(--clx-ap-silver) !important;
}

/* PI / Overview headers (hardcoded #60a5fa / gold borders in staging-bw) */
html[data-clx-phase1-theme="1"] #pi-unified-dash .pi-dash-main .pi-med-card-hdr,
html[data-clx-phase1-theme="1"] #pi-unified-dash .pi-ov-bottom .pi-med-card-hdr,
html[data-clx-phase1-theme="1"] #pi-unified-dash .pi-dash-main .pi-med-card-title,
html[data-clx-phase1-theme="1"] #pi-unified-dash .pi-ov-bottom .pi-med-card-title {
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  border-bottom-color: var(--clx-ap-silver) !important;
}

/* SSDI workspace accents (preserve .is-error validation colors) */
html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-top,
html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-head {
  border-bottom-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-title h2,
html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-head-name {
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-status:not(.is-error) {
  border-left-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-stage {
  border-color: rgba(192, 199, 214, 0.45) !important;
}

html[data-clx-phase1-theme="1"] #ssdi-pane .clx-ssw-stage.is-current {
  background: rgba(13, 110, 253, 0.12) !important;
  border-top-color: var(--clx-ap-cobalt) !important;
}

/* Financial ledger view toggle — cobalt selected (layout unchanged) */
html[data-clx-phase1-theme="1"] #billing-legacy-ledger .fl-controls-row .fl-view-btn.is-selected,
html[data-clx-phase1-theme="1"] #billing-legacy-ledger .fl-controls-row .fl-view-btn[aria-selected="true"] {
  background: var(--clx-ap-silver-gradient) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-on-silver) !important;
}

html[data-clx-phase1-theme="1"] #billing-legacy-ledger .fl-controls-row .fl-view-btn:hover,
html[data-clx-phase1-theme="1"] #billing-legacy-ledger .fl-controls-row .fl-view-btn:focus {
  border-color: rgba(192, 199, 214, 0.55) !important;
}

html[data-clx-phase1-theme="1"] #billing-legacy-ledger .fl-controls-row .fl-clear-filters {
  border-color: rgba(192, 199, 214, 0.45) !important;
}

/* E-Sign workspace tabs */
html[data-clx-phase1-theme="1"] .clx-esign-ws-tab.active,
html[data-clx-phase1-theme="1"] .clx-esign-status-card.is-active {
  border-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] .clx-esign-status-card.is-active {
  box-shadow: inset 0 -3px 0 var(--clx-ap-cobalt) !important;
}

/* Impersonation banner — keep yellow alert; cobalt exit control */
html[data-clx-phase1-theme="1"] .clx-impersonation-banner {
  border-bottom-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] .clx-impersonation-banner button[type="submit"] {
  background: var(--clx-ap-cobalt) !important;
  border-color: var(--clx-ap-silver) !important;
  color: var(--clx-ap-text) !important;
}

/* Search field (base.html inline skipped when phase1) */
html[data-clx-phase1-theme="1"] .app-search .form-control {
  background: rgba(23, 27, 36, 0.85) !important;
  color: var(--clx-ap-text) !important;
  border: 1px solid rgba(192, 199, 214, 0.35) !important;
}

html[data-clx-phase1-theme="1"] .app-search .form-control::placeholder {
  color: var(--clx-ap-text-secondary) !important;
}

html[data-clx-phase1-theme="1"] .card-header:not(#financial-box .card-header):not(#financial-box #global-financial-header) {
  background: var(--clx-ap-bg-primary) !important;
  color: var(--clx-ap-text) !important;
}

/* Matter / global tabs (staging-bw var fallbacks) */
html[data-clx-phase1-theme="1"] .nav-tabs .nav-link.active,
html[data-clx-phase1-theme="1"] .nav-pills .nav-link.active,
html[data-clx-phase1-theme="1"] .subtab-pills .nav-link.active,
html[data-clx-phase1-theme="1"] #pi-unified-dash .pi-subtab-pills .nav-link.active,
html[data-clx-phase1-theme="1"] #pi-pane .nav-pills .nav-link.active {
  background: var(--clx-ap-silver-gradient) !important;
  background-color: transparent !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  border-bottom-color: var(--clx-ap-cobalt) !important;
}

html[data-clx-phase1-theme="1"] body.clx-contacts-page {
  --cd-border: var(--clx-ap-silver);
  --cd-muted: var(--clx-ap-text-secondary);
}

html[data-clx-phase1-theme="1"] .clx-caret,
html[data-clx-phase1-theme="1"] .clx-details-caret,
html[data-clx-phase1-theme="1"] button.clx-caret .clx-caret {
  color: #ffffff !important;
}

html[data-clx-phase1-theme="1"] .page-title,
html[data-clx-phase1-theme="1"] .page-subtitle {
  font-family: var(--clx-ap-font) !important;
}

html[data-clx-phase1-theme="1"] .page-subtitle {
  color: var(--clx-ap-text-secondary) !important;
  font-size: var(--clx-ap-fs-13) !important;
}

/* ----- Phase 1 pass 2: workspace shells, document drafting, financial reports ----- */

html[data-clx-phase1-theme="1"] body.clx-ws-page .app-content,
html[data-clx-phase1-theme="1"] body.clx-dd-page:not(.clx-templates-page) .app-content {
  background: var(--clx-ap-bg-primary) !important;
}

html[data-clx-phase1-theme="1"] #clx-access-ws,
html[data-clx-phase1-theme="1"] #clx-timekeeping-ws,
html[data-clx-phase1-theme="1"] #clx-ca-ws,
html[data-clx-phase1-theme="1"] #clx-q-ws,
html[data-clx-phase1-theme="1"] body.clx-bl-page .clx-dd,
html[data-clx-phase1-theme="1"] body.clx-li-page .clx-dd {
  color: var(--clx-ap-text);
}

html[data-clx-phase1-theme="1"] .clx-ws-hero-title,
html[data-clx-phase1-theme="1"] .clx-dd-hero-title,
html[data-clx-phase1-theme="1"] .fr-hub-title {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-18) !important;
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-hero-sub,
html[data-clx-phase1-theme="1"] .clx-dd-hero-sub,
html[data-clx-phase1-theme="1"] .fr-hub-sub {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-13) !important;
  color: var(--clx-ap-text-secondary) !important;
}

html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-ws-btn-gold:hover,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-dd-btn-gold:hover,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-ws-btn-gold:focus-visible,
html[data-clx-phase1-theme="1"] body:not(.clx-templates-page) .clx-dd-btn-gold:focus-visible {
  background: var(--clx-ap-silver-gradient-hover) !important;
  border-color: var(--clx-ap-silver) !important;
  color: var(--clx-ap-on-silver) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-card-actions .btn-primary {
  background: var(--clx-ap-silver-gradient) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-on-silver) !important;
}
html[data-clx-phase1-theme="1"] body.clx-dd-page:not(.clx-templates-page) .clx-dd-hero,
html[data-clx-phase1-theme="1"] body.clx-dd-page:not(.clx-templates-page) .eid-tabs .eid-tab.active,
html[data-clx-phase1-theme="1"] body.clx-dd-page:not(.clx-templates-page) .clx-dd-tab.is-active {
  border-bottom-color: var(--clx-ap-cobalt) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-dd-page:not(.clx-templates-page) .clx-dd-panel,
html[data-clx-phase1-theme="1"] body.clx-dd-page:not(.clx-templates-page) .clx-dd-card,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-side,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-card {
  background: var(--clx-ap-bg-panel) !important;
  border-color: var(--fr-border) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page {
  font-family: var(--clx-ap-font) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-card-title,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-side-title {
  color: var(--clx-ap-text) !important;
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-card-desc,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-side-link {
  color: var(--clx-ap-text-secondary) !important;
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-13) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-side-link.is-active {
  border-left-color: var(--clx-ap-cobalt) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-tone-gold {
  background: var(--clx-ap-silver-gradient) !important;
  color: var(--clx-ap-on-silver) !important;
}

html[data-clx-phase1-theme="1"] #clx-tasks-center,
html[data-clx-phase1-theme="1"] #clx-tasks-center .clx-tkc-hdr,
html[data-clx-phase1-theme="1"] #clx-tasks-center .clx-tkc-panel {
  color: var(--clx-ap-text);
}

html[data-clx-phase1-theme="1"] #clx-tasks-center .clx-tkc-hdr {
  background: var(--clx-ap-bg-primary) !important;
  border-color: var(--clx-ap-silver) !important;
  font-size: var(--clx-ap-fs-16) !important;
}

html[data-clx-phase1-theme="1"] #clx-tasks-center .clx-tkc-mini a.is-today {
  box-shadow: inset 0 0 0 1px var(--clx-ap-cobalt) !important;
}

html[data-clx-phase1-theme="1"] #reports-dashboard-page .card,
html[data-clx-phase1-theme="1"] #reports-financial-unified-card {
  background: var(--clx-ap-bg-panel) !important;
  border-color: rgba(192, 199, 214, 0.35) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] #reports-dashboard-page .card-body,
html[data-clx-phase1-theme="1"] #reports-financial-unified-card .card-body {
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-metric-value.is-gold {
  color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] .clx-ws-card-hdr .clx-ws-card-title,
html[data-clx-phase1-theme="1"] .clx-ws-panel-hdr {
  background: var(--clx-ap-bg-primary) !important;
  color: var(--clx-ap-text) !important;
  border-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] [data-clx-theme="signature"] body:not(.clx-templates-page) .clx-ms-btn-gold,
html[data-clx-phase1-theme="1"] [data-clx-theme="signature"] body:not(.clx-templates-page) .btn-gold,
html[data-clx-phase1-theme="1"] [data-clx-theme="signature"] body:not(.clx-templates-page) .clx-btn-gold {
  background: var(--clx-ap-silver-gradient) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-on-silver) !important;
}

/* JR profile circle — silver primary (initials unchanged) */
html[data-clx-phase1-theme="1"] .app-header .header-actions .user-avatar {
  background: var(--clx-ap-silver-gradient) !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  border: 1px solid rgba(192, 199, 214, 0.65) !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:hover,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:focus,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:focus-visible,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:active {
  background: var(--clx-ap-silver-gradient) !important;
  background-color: var(--clx-ap-btn-matte) !important;
  background-image: none !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:hover,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] body.clx-workspace-page a.clx-ws-card-link:focus-visible {
  background-color: var(--clx-ap-btn-matte-hover) !important;
}

/* ----- Signature staff theme remapped under Phase 1 (beats signature.css !important banners) ----- */
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] {
  --gold-banner-grad: var(--clx-ap-silver-gradient);
  --gold-grad: var(--clx-ap-silver-gradient);
  --gold-grad-h: var(--clx-ap-silver-gradient);
  --gold-400: var(--clx-ap-silver);
  --gold-300: var(--clx-ap-silver);
  --gold-200: var(--clx-ap-text);
  --line: rgba(192, 199, 214, 0.45);
  --line-strong: rgba(192, 199, 214, 0.65);
  --line-cool: rgba(192, 199, 214, 0.28);
  --shadow-gold: none;
  --sig-banner-gold: var(--clx-ap-silver);
  --navy-850: var(--clx-ap-bg-panel);
  --navy-900: var(--clx-ap-bg-primary);
  --navy-950: var(--clx-ap-bg-primary);
  --navy-1000: var(--clx-ap-bg-primary);
  --card-bg: var(--clx-ap-bg-panel);
  --ws-gold: var(--clx-ap-silver);
  --clx-chrome-gold: var(--clx-ap-silver);
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] body.app-body {
  background-color: var(--clx-ap-bg-primary) !important;
  background-image: none !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ws-card-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ml-card-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] #ml-filters-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] #ml-results-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cd-pane-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cd-tb-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cd-card-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-card-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-hdr,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-main-hdr {
  background: var(--clx-ap-bg-primary) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  border-color: rgba(192, 199, 214, 0.35) !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ws-card-hdr *,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ml-card-hdr *,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cd-pane-hdr *,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-card-hdr *,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-hdr * {
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
}

/* Primary header actions on black panels — matte silver + black ink (all staff pages) */
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] a.clx-ws-card-link,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ws-card-hdr a.clx-ws-card-link,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ml-card-hdr a,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] #ml-filters-hdr a,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cd-pane-hdr a.clx-btn-gold,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-card-hdr a.clx-cal-btn:not(.clx-cal-btn-outline) {
  background-color: var(--clx-ap-btn-matte) !important;
  background-image: none !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  border: 1px solid rgba(192, 199, 214, 0.55) !important;
  text-decoration: none !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] a.clx-ws-card-link:hover,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] a.clx-ws-card-link:focus,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] a.clx-ws-card-link:focus-visible,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ws-card-hdr a.clx-ws-card-link:hover,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-ml-card-hdr a:hover,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cd-pane-hdr a.clx-btn-gold:hover,
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .clx-cal-card-hdr a.clx-cal-btn:not(.clx-cal-btn-outline):hover {
  background-color: var(--clx-ap-btn-matte-hover) !important;
  color: var(--clx-ap-on-silver) !important;
  -webkit-text-fill-color: var(--clx-ap-on-silver) !important;
  border-color: var(--clx-ap-silver) !important;
}

/* Secondary / outline actions on black chrome */
html[data-clx-phase1-theme="1"] .btn-secondary,
html[data-clx-phase1-theme="1"] .btn-outline-secondary,
html[data-clx-phase1-theme="1"] .btn-outline-primary,
html[data-clx-phase1-theme="1"] a.btn-outline-secondary,
html[data-clx-phase1-theme="1"] a.btn-outline-primary {
  background-color: var(--clx-ap-bg-primary) !important;
  background-image: none !important;
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  border: 1px solid rgba(192, 199, 214, 0.55) !important;
}

html[data-clx-phase1-theme="1"] .btn-secondary:hover,
html[data-clx-phase1-theme="1"] .btn-secondary:focus,
html[data-clx-phase1-theme="1"] .btn-outline-secondary:hover,
html[data-clx-phase1-theme="1"] .btn-outline-primary:hover,
html[data-clx-phase1-theme="1"] a.btn-outline-secondary:hover,
html[data-clx-phase1-theme="1"] a.btn-outline-primary:hover {
  background-color: rgba(192, 199, 214, 0.12) !important;
  color: var(--clx-ap-text) !important;
  -webkit-text-fill-color: var(--clx-ap-text) !important;
  border-color: var(--clx-ap-silver) !important;
}

html[data-clx-phase1-theme="1"] .btn-secondary:disabled,
html[data-clx-phase1-theme="1"] .btn-outline-secondary:disabled,
html[data-clx-phase1-theme="1"] .btn-primary:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

html[data-clx-phase1-theme="1"] .app-header {
  border-bottom-color: rgba(192, 199, 214, 0.35) !important;
  box-shadow: none !important;
}

html[data-clx-phase1-theme="1"] .app-header .header-label {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-16) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-header h1 {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-18) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-header .fr-subtitle {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-13) !important;
  color: var(--clx-ap-text-secondary) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-btn,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-btn-gold,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-btn-outline {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-btn-gold,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-btn:not(.fr-btn-outline) {
  background: var(--clx-ap-silver-gradient) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-on-silver) !important;
  box-shadow: none !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-btn-outline {
  background: transparent !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-panel-hdr,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-modal-hdr {
  background: var(--clx-ap-bg-primary) !important;
  color: var(--clx-ap-text) !important;
  border-color: rgba(192, 199, 214, 0.35) !important;
}

html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-tone-navy {
  background: rgba(192, 199, 214, 0.15) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-hero-title {
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-18) !important;
  color: var(--clx-ap-text) !important;
}

html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-btn-gold {
  background: var(--clx-ap-silver-gradient) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
  color: var(--clx-ap-on-silver) !important;
  font-family: var(--clx-ap-font) !important;
  font-size: var(--clx-ap-fs-14) !important;
}

html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-view.is-active,
html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-metric.is-active {
  background: var(--clx-ap-silver-gradient) !important;
  color: var(--clx-ap-on-silver) !important;
  border-color: rgba(192, 199, 214, 0.55) !important;
}

html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-metric-value {
  font-size: var(--clx-ap-fs-18) !important;
}

html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-metric-label,
html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-table th {
  font-size: var(--clx-ap-fs-12) !important;
}

html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-panel-hdr,
html[data-clx-phase1-theme="1"] body.clx-tasks-page .clx-tkc-table-wrap > .clx-tkc-hdr {
  background: var(--clx-ap-bg-primary) !important;
  color: var(--clx-ap-text) !important;
  border-color: rgba(192, 199, 214, 0.35) !important;
  font-size: var(--clx-ap-fs-16) !important;
}

/* ----- Shared header rule under Lex hands (Phase 1 staging) ----- */
html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-header {
  border-bottom: none !important;
  overflow: visible !important;
  position: relative !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"] .app-header::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -5px !important;
  height: 1px !important;
  background: rgba(192, 199, 214, 0.55) !important;
  box-shadow: none !important;
  pointer-events: none !important;
  z-index: 42 !important;
}

html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .app-header .clxp-lex {
  top: auto !important;
  bottom: -7px !important;
  width: 95px !important;
  height: 101px !important;
  right: 12px !important;
  object-fit: contain !important;
  object-position: right bottom !important;
  z-index: 50 !important;
}

@media (max-width: 767px) {
  html[data-clx-staging-bw="1"][data-clx-phase1-theme="1"][data-clx-theme="signature"] .app-header .clxp-lex {
    right: 6px !important;
    width: 55px !important;
    height: 58px !important;
    bottom: -4px !important;
  }
}
