/* Phase 1 staging — five workspace correction baselines (WORKSPACE_CORRECTIONS.json).
   Scope: html[data-clx-phase1-theme="1"] only; staging via settings_stage. */

/* --- Contacts: enlarge Lex / Ask widget (Lex was too small in baseline) --- */
html[data-clx-phase1-theme="1"] body.clx-contacts-page:not(.clx-dash-page) .app-header .header-actions .clx-asklex {
  width: clamp(300px, 34vw, 520px) !important;
  height: 88px !important;
}
html[data-clx-phase1-theme="1"] body.clx-contacts-page:not(.clx-dash-page) .app-header .clx-asklex-panel {
  right: 10% !important;
}

/* --- Calendar: keep Lex robot size; long narrow short Ask Lex panel --- */
html[data-clx-phase1-theme="1"] body.clx-calendar-page:not(.clx-dash-page) .app-header .header-actions .clx-asklex {
  width: clamp(280px, 38vw, 560px) !important;
  height: 58px !important;
}
html[data-clx-phase1-theme="1"] body.clx-calendar-page:not(.clx-dash-page) .app-header .clx-asklex-panel {
  top: 12% !important;
  bottom: 6% !important;
  gap: 4% !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
html[data-clx-phase1-theme="1"] body.clx-calendar-page:not(.clx-dash-page) .app-header .clx-asklex-title {
  font-size: clamp(9px, 14cqh, 13px) !important;
  line-height: 1.05 !important;
}
html[data-clx-phase1-theme="1"] body.clx-calendar-page:not(.clx-dash-page) .app-header .clx-asklex-row {
  height: 56% !important;
  min-height: 22px !important;
}
html[data-clx-phase1-theme="1"] body.clx-calendar-page .app-main-content {
  padding-bottom: 0.35rem !important;
}
html[data-clx-phase1-theme="1"] body.clx-calendar-page .app-page-wrapper > .global-site-footer {
  position: relative !important;
  visibility: visible !important;
}

/* --- Global Tasks: enlarge Lex only (preserve rest of page) --- */
html[data-clx-phase1-theme="1"] body.clx-tasks-page:not(.clx-dash-page) .app-header .header-actions .clx-asklex {
  width: clamp(320px, 36vw, 500px) !important;
  height: 92px !important;
}

/* --- Reports hub: long thin Ask Lex + compact KPI / charts --- */
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page:not(.clx-dash-page) .app-header .header-actions .clx-asklex {
  width: clamp(300px, 40vw, 580px) !important;
  height: 56px !important;
}
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page:not(.clx-dash-page) .app-header .clx-asklex-panel {
  top: 10% !important;
  bottom: 8% !important;
}
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-kpi,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-stat,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-kpi-card {
  padding: 0.35rem 0.5rem !important;
}
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-kpi-value,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-kpi-value {
  font-size: 1.05rem !important;
  font-weight: 600 !important;
}
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-chart-wrap,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-chart-slot {
  max-height: 11.5rem !important;
}
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-section,
html[data-clx-phase1-theme="1"] body.clx-financial-reports-page .fr-hub-card {
  margin-bottom: 0.5rem !important;
}

/* --- Intake (pipeline lead list): full-width bg, thin Ask Lex, compact cards --- */
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page:not(.clx-dash-page) .app-header .header-actions .clx-asklex {
  width: clamp(280px, 42vw, 600px) !important;
  height: 54px !important;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .app-main-content,
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .page-body,
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .app-content {
  max-width: none !important;
  width: 100% !important;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .card,
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .pipeline-card {
  padding: 0.4rem 0.55rem !important;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .badge,
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .pipeline-pill {
  font-weight: 500 !important;
  padding: 0.15rem 0.45rem !important;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-kpi-row {
  flex-wrap: wrap;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-kpi {
  min-width: 7.5rem;
  padding: 0.35rem 0.65rem !important;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-kpi-lbl {
  font-size: 0.72rem;
  font-weight: 500;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-kpi-val {
  font-size: 1.15rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.1;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-kpi.is-warn .clx-intake-kpi-val {
  color: #b45309;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
html[data-clx-phase1-theme="1"] body.clx-pipeline-leads-page .clx-intake-table th {
  font-weight: 600;
  font-size: 0.78rem;
}

/* Hide legacy header silver Lex when approved Ask Lex widget is present */
html[data-clx-phase1-theme="1"] body:not(.clx-dash-page) .app-header:has(.clx-asklex) .clxp-lex {
  display: none !important;
}
