/* Scoped fidelity layer: legacy global styles must not restyle these workspaces. */
body:has(:is(#servicesPage,#financialsPage).is-active) #globalSearchPanel { display:none !important; }
body:has(:is(#servicesPage,#financialsPage).is-active) .page-header { margin-bottom:18px !important; }
body:has(:is(#servicesPage,#financialsPage).is-active) .page-header h1 { font-size:26px !important; }
body:has(:is(#servicesPage,#financialsPage).is-active) .page-header .eyebrow { display:none !important; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) {
  --af-surface:#fff; --af-ink:#102746; --af-muted:#536c89; --af-line:#dce6f0; --af-blue:#0068b4; --af-soft:#f4f8fc;
  color:var(--af-ink);
}
:is(#servicesPage,#financialsPage) > :is(.recent-submissions,.form-section):not([hidden]) { display:block !important; padding:22px !important; background:var(--af-surface) !important; border:0 !important; border-radius:0 !important; box-shadow:none !important; }
#serviceEditorPanel[hidden] { display:none !important; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) :is(h2,h3,strong) { color:var(--af-ink); }
:is(#servicesPage,#financialsPage) h2 { font-size:30px !important; line-height:1.2 !important; margin:0 0 5px !important; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) .section-heading { gap:14px !important; margin:0 0 18px !important; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) .section-heading p { font-size:14px !important; margin:0 !important; color:var(--af-muted) !important; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) button { min-height:36px !important; padding:8px 13px !important; border-radius:5px !important; font-size:13px !important; line-height:1.3 !important; font-weight:600 !important; box-shadow:none !important; transform:none !important; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) button.secondary-button { color:var(--af-blue) !important; background:var(--af-surface) !important; border:1px solid var(--af-line) !important; }
:is(#addServiceButton,#newFinancialTransactionButton,#serviceSaveButton) { background:#0068b4 !important; color:#fff !important; border:1px solid #0068b4 !important; flex-shrink:0; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) :is(input:not([type=checkbox]),select,textarea) { min-height:38px !important; padding:8px 10px !important; font-size:13px !important; border:1px solid var(--af-line) !important; border-radius:5px !important; background:var(--af-surface) !important; color:var(--af-ink) !important; box-shadow:none !important; min-width:0; }
:is(#servicesPage,#financialsPage,#serviceEditorPanel) button:focus-visible { outline:3px solid #83c2ef !important; outline-offset:2px; }
#servicesPage .admin-policy { background:#eaf5ff !important; border:1px solid #bfddf6 !important; border-radius:5px !important; padding:13px 16px !important; margin:0 0 14px !important; font-size:14px !important; color:#214e75 !important; }
:is(#servicePricingTabs,#financialViewTabs) { display:flex !important; flex-wrap:nowrap !important; overflow-x:auto; justify-content:flex-start !important; gap:8px !important; padding:0 !important; margin:0 0 18px !important; border:0 !important; border-bottom:1px solid var(--af-line) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; width:100% !important; }
:is(#servicePricingTabs,#financialViewTabs) button { flex:0 0 auto !important; width:auto !important; border:0 !important; border-bottom:3px solid transparent !important; border-radius:0 !important; background:transparent !important; color:var(--af-muted) !important; padding:12px 16px !important; white-space:nowrap; }
:is(#servicePricingTabs,#financialViewTabs) button.is-active { color:var(--af-blue) !important; border-bottom-color:var(--af-blue) !important; }
#servicePricingTabs .tab-count { background:transparent !important; }
#servicesPage #servicePricingTabs button { border:0 !important; border-bottom:3px solid transparent !important; background:transparent !important; box-shadow:none !important; }
#servicesPage #servicePricingTabs button.is-active { border-bottom-color:var(--af-blue) !important; }
#servicesPage #servicePricingTabs { flex-direction:row !important; }
#financialsPage #financialViewTabs { max-width:none !important; }
#servicesPage .table-toolbar { display:flex !important; gap:12px !important; margin:0 0 16px !important; padding:0 !important; }
#servicesPage #serviceSearch { max-width:400px; }
#servicesPage #serviceCategoryFilter { margin-left:auto; flex-basis:210px; }
#servicesPage .service-table-wrap { border:1px solid var(--af-line) !important; border-radius:5px !important; box-shadow:none !important; padding:0 !important; margin:0 !important; }
#servicesPage .data-table { width:100%; min-width:650px; }
#servicesPage .data-table :is(th,td) { padding:10px 13px !important; vertical-align:middle !important; font-size:13px !important; line-height:1.45 !important; border-color:var(--af-line) !important; }
#servicesPage .data-table th { background:var(--af-soft) !important; text-transform:none !important; letter-spacing:0 !important; font-weight:600 !important; }
#servicesPage .data-table td:first-child { width:28%; }
#servicesPage .data-table td strong { font-weight:600 !important; }
#servicesPage .data-table small { font-size:11px !important; margin:0 !important; }
#servicesPage .catalog-details { margin-top:3px; font-size:11px; }
#servicesPage .admin-chip { font-size:11px; background:transparent; font-weight:400; padding:0; }
#servicesPage .admin-chip.is-good::before { content:''; display:inline-block; width:7px; height:7px; margin-right:7px; background:#16a34a; border-radius:50%; }
#serviceCatalogCount { font-size:12px !important; color:var(--af-muted) !important; margin:16px 0 0 !important; }
#serviceEditorPanel:not([hidden]) { display:block !important; width:min(720px,calc(100vw - 32px)) !important; max-height:calc(100dvh - 40px) !important; padding:24px !important; background:var(--af-surface) !important; border:1px solid var(--af-line) !important; border-radius:9px !important; backdrop-filter:none !important; }
#serviceEditorPanel .section-heading > span,#serviceEditorPanel .section-heading p { display:none !important; }
#serviceEditorPanel h2 { font-size:23px !important; margin:0 !important; }
#serviceEditorPanel .tracker-form { display:grid !important; gap:18px !important; }
#serviceEditorPanel .field-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:16px !important; }
#serviceEditorPanel label { font-size:13px !important; font-weight:600 !important; color:var(--af-ink) !important; padding:0 !important; margin:0 !important; }
#serviceEditorPanel label > :is(.field-label,.field-label-text) { text-transform:none !important; letter-spacing:0 !important; font-size:13px !important; }
#serviceEditorPanel label .field-label-text > span { text-transform:none !important; letter-spacing:0 !important; font-size:13px !important; }
#serviceEditorPanel .field-help { position:absolute !important; width:1px !important; height:1px !important; overflow:hidden !important; clip-path:inset(50%); white-space:nowrap; }
#serviceEditorPanel .field-error:empty { display:none !important; }
#closeServiceModalButton { margin-left:auto; }
#serviceEditorPanel .checklist { display:flex !important; flex-wrap:wrap !important; gap:14px !important; background:transparent !important; border:0 !important; padding:0 !important; box-shadow:none !important; }
#serviceEditorPanel .flag-option { display:flex !important; align-items:center !important; gap:8px !important; background:transparent !important; border:0 !important; box-shadow:none !important; min-height:28px !important; }
#serviceEditorPanel input[type=checkbox] { width:18px !important; height:18px !important; accent-color:var(--af-blue); }
#serviceEditorPanel .service-info-icon { width:16px !important; height:16px !important; flex:0 0 16px !important; }
#serviceEditorPanel .service-info-icon img { width:16px !important; height:16px !important; }
#serviceEditorPanel .service-advanced { border-top:1px solid var(--af-line); padding-top:15px; }
#serviceEditorPanel .service-advanced > summary { cursor:pointer; font-size:14px; font-weight:600; color:var(--af-ink); }
#serviceEditorPanel .service-advanced > summary small { display:block; margin:5px 0 0 18px; font-size:12px; font-weight:400; color:var(--af-muted); }
#serviceEditorPanel .service-advanced[open] > :not(summary) { margin-top:18px !important; }
#serviceEditorPanel .button-row { display:flex !important; flex-wrap:wrap !important; gap:9px !important; position:sticky; bottom:-24px; background:var(--af-surface); padding:15px 0 !important; margin:0 !important; border-top:1px solid var(--af-line); z-index:2; }
#serviceSaveButton { order:3; }
#resetServiceForm { order:2; margin-left:auto; }
#serviceEditorPanel #removeServiceButton { order:1; color:#a92332 !important; }
#financialsPage .financial-toolbar { display:flex !important; align-items:end !important; flex-wrap:wrap !important; gap:10px !important; margin:0 0 16px !important; padding:0 !important; }
#financialsPage .financial-toolbar > label { flex:0 1 140px; font-size:10px !important; gap:3px !important; }
#financialsPage .financial-quick-ranges { display:flex !important; gap:0 !important; margin:0 !important; }
#financialsPage .financial-quick-ranges button { padding:8px !important; font-size:11px !important; border-radius:0 !important; }
#financialsPage #financialPeriodControl { margin-left:auto !important; gap:0 !important; background:transparent !important; border:1px solid var(--af-line) !important; padding:0 !important; box-shadow:none !important; border-radius:5px !important; }
#financialsPage #financialPeriodControl button { background:transparent !important; color:var(--af-muted) !important; border:0 !important; border-radius:3px !important; padding:8px 10px !important; font-size:11px !important; }
#financialsPage #financialPeriodControl button.is-active { background:#e5f2ff !important; color:var(--af-blue) !important; }
#financialsPage #financialResetRangeButton { font-size:11px !important; padding:8px !important; }
#financialsPage #financialCards { display:grid !important; grid-template-columns:repeat(6,minmax(0,1fr)) !important; gap:10px !important; margin:0 0 14px !important; }
#financialsPage #financialCards > article { display:flex !important; flex-direction:column !important; min-height:0 !important; padding:14px !important; border:1px solid var(--af-line) !important; border-radius:5px !important; background:var(--af-surface) !important; box-shadow:none !important; gap:5px !important; }
#financialsPage #financialCards > article:nth-child(-n+3) { grid-column:span 2; }
#financialsPage #financialCards > article { min-width:0 !important; width:auto !important; }
#financialsPage #financialCards > article > span { font-size:12px !important; font-weight:500 !important; text-transform:none !important; letter-spacing:0 !important; color:var(--af-muted) !important; }
#financialsPage #financialCards > article > strong { font-size:clamp(15px,1.45vw,22px) !important; line-height:1.25 !important; color:var(--af-ink) !important; }
#financialsPage #financialCards > article:nth-child(-n+3) > strong { font-size:clamp(24px,2.6vw,36px) !important; }
#financialsPage #financialCards > article:nth-child(1) > strong { color:#0068b4 !important; }
#financialsPage #financialCards > article:nth-child(2) > strong { color:#c52b35 !important; }
#financialsPage #financialCards > article:nth-child(3) > strong { color:#14883e !important; }
#financialsPage #financialCards > article > p { display:none !important; }
#financialsPage #financialCards > article:last-child > p { display:block !important; font-size:10px !important; margin:0 !important; }
#financialsPage #financialCards .financial-card-link { font-size:10px !important; padding:3px 0 !important; min-height:22px !important; margin:0 !important; text-align:left !important; white-space:nowrap; }
#financialsPage .financial-chart-panel { padding:16px !important; margin:0 !important; border:1px solid var(--af-line) !important; border-radius:5px !important; background:var(--af-surface) !important; box-shadow:none !important; }
#financialsPage .financial-chart-panel { display:block !important; }
#financialsPage .financial-chart-heading { margin:0 !important; }
#financialsPage .financial-chart-heading h3 { font-size:16px !important; margin:0 !important; }
#financialsPage .financial-chart-heading p { font-size:11px !important; margin:4px 0 0 !important; }
#financialsPage .financial-chart-legend { font-size:11px !important; }
#financialsPage .financial-income-chart { background:transparent !important; border:0 !important; padding:0 !important; margin-top:12px !important; min-height:0 !important; }
#financialsPage .financial-income-chart svg { width:100% !important; height:auto !important; max-height:250px !important; }
#financialsPage .financial-income-chart svg { min-width:0 !important; }
#financialsPage .financial-chart-info { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
#financialsPage .financial-ledger-status { font-size:10px !important; margin:0 !important; }
#financialsPage .financial-ledger-status span { background:transparent !important; padding:0 !important; }
#financialsPage .financial-methodology { margin:0 !important; font-size:11px !important; }
#financialsPage .financial-methodology[open] { flex-basis:100%; }
#financialsPage .financial-chart-info:has(details[open]) { flex-wrap:wrap; }
#financialsPage .financial-breakdown-details { margin:12px 0; font-size:12px; color:var(--af-muted); }
#financialsPage .financial-breakdown-details summary { cursor:pointer; }
#financialsPage [data-financial-panel=transactions] { margin-top:18px; }
#financialsPage .financial-line-items-header h3 { font-size:20px !important; }
#financialsPage .financial-line-items-header p { font-size:12px !important; }
#financialsPage .financial-line-items-filters { gap:9px !important; margin:14px 0 !important; }
#financialsPage .financial-line-items-filters label { font-size:11px !important; }
#financialsPage .data-table :is(th,td) { padding:10px !important; font-size:12px !important; }
#financialsPage .data-table th { background:var(--af-soft) !important; letter-spacing:0 !important; }
@media(max-width:1150px) { #financialsPage #financialCards > article:nth-child(n+4) { grid-column:span 2; } }
@media(max-width:600px) {
  body:has(:is(#servicesPage,#financialsPage).is-active) .page-header > div:first-child { display:none !important; }
  body:has(:is(#servicesPage,#financialsPage).is-active) .page-header .user-card { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:7px !important; padding:12px !important; width:100%; min-width:0; }
  body:has(:is(#servicesPage,#financialsPage).is-active) .page-header .user-card > div { grid-column:1/-1; }
  body:has(:is(#servicesPage,#financialsPage).is-active) .page-header .user-card button { width:100% !important; min-height:34px !important; padding:6px !important; font-size:11px !important; }
  :is(#servicesPage,#financialsPage) > :is(.recent-submissions,.form-section) { padding:14px !important; }
  :is(#servicesPage,#financialsPage) h2 { font-size:24px !important; }
  :is(#servicesPage,#financialsPage) .section-heading { flex-wrap:wrap !important; }
  :is(#servicesPage,#financialsPage) .section-heading p { font-size:12px !important; }
  #servicesPage .admin-policy { font-size:12px !important; }
  #servicePricingTabs button { font-size:11px !important; padding:12px 8px !important; }
  #servicesPage #serviceCategoryFilter { width:100%; flex-basis:auto; }
  #servicesPage .service-table-wrap { border:0 !important; }
  #servicesPage .data-table { min-width:0 !important; }
  #servicesPage .data-table tr { gap:9px !important; padding:13px !important; }
  #servicesPage .data-table td { width:auto !important; padding:0 !important; }
  #servicesPage .data-table td:last-child button { min-height:40px !important; }
  #serviceEditorPanel:not([hidden]) { padding:18px !important; width:calc(100vw - 20px) !important; }
  #serviceEditorPanel .field-grid { grid-template-columns:1fr !important; gap:12px !important; }
  #serviceEditorPanel .button-row { bottom:-18px; }
  #financialViewTabs button { padding:12px 8px !important; font-size:12px !important; }
  #financialsPage .financial-toolbar > label { flex:1 1 40%; }
  #financialsPage .financial-quick-ranges { width:100%; }
  #financialsPage .financial-quick-ranges button { flex:1; }
  #financialsPage #financialCards { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #financialsPage #financialCards > article:nth-child(n) { grid-column:span 1; padding:12px !important; }
  #financialsPage #financialCards > article:nth-child(3) { grid-column:span 2; }
  #financialsPage #financialCards > article > strong { font-size:19px !important; }
  #financialsPage #financialCards > article:nth-child(-n+3) > strong { font-size:24px !important; }
  #financialsPage .financial-chart-info { flex-wrap:wrap; }
  #financialsPage .financial-line-items-header { flex-wrap:wrap; }
  #financialsPage .financial-line-items-filters { grid-template-columns:1fr !important; }
}
:root[data-theme=dark] :is(#servicesPage,#financialsPage,#serviceEditorPanel) { --af-surface:#142c43; --af-ink:#e2edfa; --af-muted:#a6bbd0; --af-line:#35506c; --af-soft:#203d59; }
:root[data-theme=dark] #financialsPage #financialCards > article:nth-child(1) > strong { color:#75baff !important; }
:root[data-theme=dark] #financialsPage #financialCards > article:nth-child(2) > strong { color:#ff8991 !important; }
:root[data-theme=dark] #financialsPage #financialCards > article:nth-child(3) > strong { color:#74dda3 !important; }
