/* Measured references: bank statements / supplier returns / original price-type action.
   Title and vertical rhythm retain the existing fluid --u scale. The original
   price-type button measured 174.56 × 40 px at 1363 px; its base width is rounded to 175. */
:root {
  --page-title-size: clamp(24px, 2.12vw, 32px);
  --page-title-weight: 600;
  --page-title-color: #252d3d;
  --page-title-line: 1.2;
  --page-title-inset: calc(12 * var(--u, 1px));
  --page-filter-gap: calc(20 * var(--u, 1px));
  --page-action-height: 40px;
  --page-action-width: 175px;
  --page-control-radius: 8px;
  --page-control-gap: calc(10 * var(--u));
  --page-action-background: linear-gradient(#0999ff, #0667fa);
  --page-selected: #ff7900;
}
.page-detail-action {width:42px;height:42px;min-height:42px;padding:9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#59749a;vertical-align:middle;}
.page-detail-action .icon {width:22px;height:22px;stroke-width:1.8;}
button.page-detail-action:hover, [data-open]:hover .page-detail-action {background:#f0f6ff;}
button.page-detail-action:active, [data-open]:active .page-detail-action {background:#e5f0ff;}
td.chevron:has(> .page-detail-action) {padding-top:0;padding-bottom:0;}
td.chevron > .page-detail-action {display:flex;margin:auto;}
#content :is(.acc-heading, .ag-page-heading, .sec-heading, .dev-header, .push-page-heading) {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex: none; flex-wrap: nowrap; gap: 16px; margin: 0; min-width: 0;
}
#content :is(.acc-heading, .ag-page-heading, .sec-heading, .dev-header, .push-page-heading) > :first-child { min-width: 0; }
#content :is(.page-heading, .ag-page-heading > div:first-child, .dev-header > div:first-child) { margin: 0 0 calc(8 * var(--u)); }
#content :is(.page-heading, .ag-page-heading, .sec-heading, .dev-header, .push-page-heading, .iam-page) h1,
#content > h1, .alp-page-title-row > h1 {
  font-size: var(--page-title-size); font-weight: var(--page-title-weight);
  line-height: var(--page-title-line); letter-spacing: normal; color: var(--page-title-color);
  margin: var(--page-title-inset) 0 var(--page-title-inset);
  white-space: normal; overflow-wrap: anywhere;
}
#content .acc-heading > .page-heading { flex: 1 1 auto; max-width: 100%; }
/* One title row in every ALP shell. Descriptions never create a second row. */
#content :is(.page-heading, .ag-page-heading > div:first-child, .ag-intro > div:first-child,
  .dev-header > div:first-child, .mono-title > div > div, .id-brand > div,
  .oc-hero > div, .diia-hero > div, .oai-header > div:first-child), .alp-page-title-row {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; min-width: 0;
}
#content :is(.page-heading, .ag-page-heading, .ag-intro, .dev-header, .mono-title,
  .id-heading, .oc-hero, .diia-hero, .oai-header) h1 { flex: 0 1 auto; min-width: 0; }
#content :is(.oc-hero, .diia-hero) h1 { margin: var(--page-title-inset) 0; }
#content :is(.page-heading, .ag-page-heading > div:first-child, .ag-intro > div:first-child,
  .dev-header > div:first-child, .mono-title > div > div, .id-brand > div,
  .oc-hero > div, .diia-hero > div, .oai-header > div:first-child) > :is(.subtitle, p), .alp-page-title-row > p {
  margin: 0; min-width: 0; flex: 0 1 auto; line-height: 1.4;
  color: var(--muted, #64748b); font-size: .875rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
#content .oai-header > div:first-child { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 0 12px; }
#content .oai-header > div:first-child > a { grid-column: 1 / -1; }
#content .acc-heading-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--page-control-gap);
  flex: none; max-width: 100%; margin: var(--page-title-inset) 0 0 auto;
}
#content .acc-heading-actions:empty { display: none; }
#content :is(.ag-page-heading, .dev-header, .push-page-heading) > :last-child:not(:first-child) { margin-top: var(--page-title-inset); }
#content :is(.acc-heading-actions .primary, .ag-page-heading .primary, .dev-header > .primary, .push-page-heading > .primary),
button.primary.create-action, button.page-primary-action {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; flex: 0 0 auto; width: auto; min-width: var(--page-action-width); max-width: 100%;
  height: var(--page-action-height); min-height: var(--page-action-height);
  padding: 9px 15px; border: 0; border-radius: var(--page-control-radius);
  font: inherit; font-size: 1rem; font-weight: 400; line-height: 22px; white-space: nowrap;
  color: #fff; background: var(--page-action-background); box-shadow: none;
  text-decoration: none; cursor: pointer;
}
#content :is(.acc-heading-actions .primary, .ag-page-heading .primary, .page-primary-action):hover,
button.primary.create-action:hover { filter: brightness(.95); background: var(--page-action-background); }
#content :is(.acc-heading-actions .primary, .ag-page-heading .primary, .page-primary-action):active,
button.primary.create-action:active { transform: translateY(1px); }
#content :is(.acc-heading-actions .primary, .ag-page-heading .primary, .page-primary-action):focus-visible,
button.primary.create-action:focus-visible { outline: 3px solid #172b4d; outline-offset: 3px; }
#content :is(.acc-heading-actions .primary, .ag-page-heading .primary, .page-primary-action):disabled,
button.primary.create-action:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }
#content [aria-busy="true"].page-primary-action { cursor: progress; opacity: .7; }
.create-action-icon, .create-action-icon > .icon { width: 20px; height: 20px; flex: none; }
.create-action-icon { display: inline-flex; }
#content :is(.shortcuts, .tabs, .access-navigation, .report-view-switch, .sec-tabs, .res-tabs, .ag-mode-tabs, .ag-filter-tabs, .ao-switch, .oc-tabs, .tm-tabs, .np-tabs, .tg-tabs, .gpt-tabs, .gml-tabs, .zad-tabs, .org-entry-tabs, .utilities-view-tabs, .vc-tabs, .people-view-switch, .metric-tabs, .id-tabs, .access-status-tabs, .cloud-tabs, .diia-tabs, .biz-folder-tabs, .admin-integration-filter [role="group"]) {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--page-control-gap);
}
#content :is(.shortcuts, .tabs, .access-navigation, .report-view-switch, .sec-tabs, .res-tabs, .ag-mode-tabs, .ag-filter-tabs, .ao-switch, .oc-tabs, .tm-tabs, .np-tabs, .tg-tabs, .gpt-tabs, .gml-tabs, .zad-tabs, .org-entry-tabs, .utilities-view-tabs, .vc-tabs, .people-view-switch, .metric-tabs, .id-tabs, .access-status-tabs, .cloud-tabs, .diia-tabs, .biz-folder-tabs, .admin-integration-filter [role="group"]) > button {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; min-height: 40px; padding: 8px calc(12 * var(--u));
  border: 1px solid #d6e1ee; border-radius: var(--page-control-radius);
  font: inherit; font-size: 1rem; font-weight: 400; line-height: 22px; white-space: nowrap;
  color: #526989; background: #fff; box-shadow: none;
}
#content :is(.shortcuts, .tabs, .access-navigation, .report-view-switch, .sec-tabs, .res-tabs, .ag-mode-tabs, .ag-filter-tabs, .ao-switch, .oc-tabs, .tm-tabs, .np-tabs, .tg-tabs, .gpt-tabs, .gml-tabs, .zad-tabs, .org-entry-tabs, .utilities-view-tabs, .vc-tabs, .people-view-switch, .metric-tabs, .id-tabs, .access-status-tabs, .cloud-tabs, .diia-tabs, .biz-folder-tabs, .admin-integration-filter [role="group"]) > button:is(.active, .selected, [aria-pressed="true"], [aria-current="page"]) {
  color: #fff; background: var(--page-selected) !important; border-color: var(--page-selected); box-shadow: none;
}
#content :is(.shortcuts, .tabs, .access-navigation, .report-view-switch, .sec-tabs, .res-tabs, .ag-mode-tabs, .ag-filter-tabs, .ao-switch, .oc-tabs, .tm-tabs, .np-tabs, .tg-tabs, .gpt-tabs, .gml-tabs, .zad-tabs, .org-entry-tabs, .utilities-view-tabs, .vc-tabs, .people-view-switch, .metric-tabs, .id-tabs, .access-status-tabs, .cloud-tabs, .diia-tabs, .biz-folder-tabs, .admin-integration-filter [role="group"]) > button:focus-visible { outline: 2px solid #172b4d; outline-offset: 2px; }
/* Supplementary document handlers remain in document-actions.js, including dialog tools. */
#content :is(.acc-heading, .page-heading, .ag-page-heading, .sec-heading, .dev-header) .document-tools,
.acc-demo, .res-demo-tag, .res-demo-note, .ag-demo, .workspace-demo-label,
.commerce-demo-note, .sec-demo-options, .org-demo-note, .admin-demo-banner { display: none; }
.integration-tools { display: grid; gap: 16px; margin-top: 20px; }
.integration-tools:empty { display: none; }
@media (max-width: 700px) {
  #content :is(.acc-heading, .ag-page-heading, .sec-heading, .dev-header, .push-page-heading) { flex-wrap: wrap; gap: 0 16px; }
  #content .acc-heading-actions { margin: 0 0 var(--page-filter-gap) auto; }
}

.page-secondary-actions { display: flex; flex-wrap: wrap; gap: var(--page-control-gap); margin-bottom: var(--page-filter-gap); }
#content .acc-heading-actions > .primary { order: 1; }
#content .acc-heading-actions .primary svg { width: 20px; height: 20px; flex: none; }

#content [data-agent-operations] .ao-toolbar > [data-operation-action="create"] { display: none; }
.bw-preview-tag, .bw-modal-note, .page-review-note { display: none; }

#content :is(.oai-header,.mono-title,.id-heading,.oc-hero,.diia-hero,.tm-heading,.org-titlebar,.ag-catalog-header) h1 {
  letter-spacing: normal;
  font-size: var(--page-title-size); font-weight: var(--page-title-weight); line-height: var(--page-title-line);
}
#content :is(.res-provider,.ai-model).selected { border-color: var(--page-selected); box-shadow: inset 0 0 0 1px var(--page-selected); background: #fff4ea; }

.oc-demo-note { display: none; }
#content :is(.gpt-status,.gml-badge,.tg-badge,.md-status,.tm-tag):empty { display: none; }

#content .ag-view[data-agent-id] { margin: 0; max-width: none; padding: 0 0 32px; }
#content .ag-page-heading p { margin: 0; line-height: 1.4; }
/* Keep existing horizontal scrolling strips on one line under shared tabs. */
#content .ag-filter-tabs.ag-business-filters,
#content .utility-tabs-row > .tabs { flex-wrap: nowrap; }
