/* 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;
}
/* #320: page descriptions do not reserve a title row or content space.
   Labels, form help, errors and operational status blocks retain their markup. */
#content :is(.page-heading, .ag-page-heading > 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):not([role]),
.alp-page-title-row > p:not([role]),
#content :is(.org-demo-note, .commerce-demo-note, .oc-demo-note) {
  display:none;
}
.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; }
.alp-source-status{align-self:center;flex:none;border:1px solid var(--border,#dce6f0);border-radius:8px;padding:5px 9px;color:var(--muted,#687a90);font-size:13px;font-weight:400;white-space:nowrap}
#content .page-heading:has(> .alp-source-status){display:flex;align-items:center;gap:10px;min-width:0}
#content .page-heading:has(> .alp-source-status) h1{min-width:0}



/* All section titles share the notifications row. Actual elements stay inside
   #content so delegated events, async updates and access checks keep working. */
#content .alp-top-heading {
  position:absolute!important;left:var(--top-heading-left,0px)!important;
  top:var(--top-heading-top,-44px)!important;width:var(--top-heading-width,calc(100% - 160px))!important;
  max-width:none!important;height:44px!important;min-height:44px!important;
  margin:0!important;padding:0!important;display:flex!important;align-items:center!important;
  flex-wrap:nowrap!important;gap:8px!important;z-index:20;box-sizing:border-box;
  border:0!important;background:transparent!important;box-shadow:none!important;
}
#content .alp-top-heading .page-heading {
  margin:0!important;padding:0!important;min-height:44px!important;
  display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 auto;
}
#content .alp-top-heading h1, #content h1.alp-top-heading {
  margin:0!important;padding:0!important;font-size:var(--page-title-size);
  font-weight:var(--page-title-weight);line-height:1.15;
  min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto;
}
#content .alp-top-heading .acc-heading-actions {margin:0 0 0 auto;flex:none}
#content .alp-top-heading > :is(.subtitle,p),
#content .alp-top-heading > div > :is(.subtitle,p) {display:none}
#content .alp-top-heading :is(.erp-title-create,.erp-create-menu) {flex-shrink:0}
@media(max-width:700px){
 #content .alp-top-heading h1,#content h1.alp-top-heading{font-size:clamp(18px,5vw,24px)}
}
@media print{#content .alp-top-heading{position:static!important;width:auto!important;height:auto!important}}

#content .alp-top-heading.tm-heading > div:first-child {display:flex;align-items:center;gap:8px;min-width:0;height:44px}
#content .alp-top-heading.tm-heading h1 {order:-1}
#content .alp-top-heading.xl-head .xl-title > div {display:flex;align-items:center;min-width:0;height:44px}
#content .alp-top-heading.xl-head .xl-title small {display:none}
#content .alp-top-heading.xl-head .xl-title img {width:36px;height:36px}
#content .alp-top-heading.xl-head .xl-title {min-width:0;flex:1}

#content .alp-top-heading {flex-direction:row!important}
#content .alp-top-heading.id-heading .id-brand {flex-direction:row!important;align-items:center!important;min-width:0}
#content .alp-top-heading.id-heading .id-brand > div {min-width:0}
#content .alp-top-heading.tm-heading .tm-actions {flex-wrap:nowrap;flex:none;width:auto}
#content .alp-top-heading.tm-heading .tm-back {display:none}
#content .alp-top-heading.mono-title > div {min-width:0;flex:1}
#content .alp-top-heading.mono-title .mono-actions {flex:none}

/* Integration command panels retain their space in the page on narrow screens. */
#content .alp-top-heading.id-brand {flex-wrap:nowrap!important;min-width:0}
#content .alp-top-heading.id-brand > div {min-width:0;flex:1}
#content .alp-top-heading.id-brand .biz-provider-logo {width:36px;height:36px;flex:none}
#content h1.alp-top-heading {display:block!important;line-height:44px;overflow:hidden;text-overflow:ellipsis}

/* Page actions retain their spacing; utility icons share the section title row. */
@media screen {
 :root { --alp-header-controls-offset:12px; }
 body #top { margin-bottom:var(--alp-header-controls-offset); }
 body #top > :is(#country,#searchform) { translate:0 var(--alp-header-controls-offset); }
 #content .alp-top-heading :is(button,a,[role=button]) { translate:0 var(--alp-header-controls-offset); }
}



/* Quiet section actions share the notification bell's surface and geometry. */
body #content .erp-title-create,body #content .erp-create-menu>summary {
 --create-bg:rgba(8,124,250,.045);--create-hover:rgba(8,124,250,.09);--create-active:rgba(8,124,250,.14);
 --create-line:rgba(8,124,250,.16);--create-ink:#2676b5;
 display:inline-flex;align-items:center;justify-content:center;gap:8px;
 box-sizing:border-box;flex:0 0 auto;width:auto;min-width:108px;max-width:none;
 height:44px;min-height:44px;margin:0;padding:0 14px;
 border:1px solid var(--create-line);border-radius:8px;
 background:var(--create-bg);color:var(--create-ink);
 font:500 15px/1.2 Arial,sans-serif;white-space:nowrap;
 box-shadow:none;translate:none;cursor:pointer;
 transition:background-color .14s ease,border-color .14s ease;
}
html body.erp-compact #content .erp-title-create {flex:0 0 auto;width:auto;min-width:108px;max-width:none;padding:0 14px;background:var(--create-bg);color:var(--create-ink);border:1px solid var(--create-line);box-shadow:none}
body #content .erp-create-menu {flex:0 0 auto;width:auto;translate:none}
body #content .erp-create-menu>summary {list-style:none}
body #content .erp-create-menu>summary::-webkit-details-marker {display:none}
body #content .erp-title-create>.icon,body #content .erp-create-menu>summary>.icon {width:20px;height:20px;flex:none;stroke-width:1.8}
body #content .erp-create-menu>summary>.create-action-chevron {width:14px;height:14px}
body #content .erp-title-create:hover:not(:disabled),body #content .erp-create-menu>summary:hover,body #content .erp-create-menu[open]>summary {background:var(--create-hover);border-color:rgba(8,124,250,.28);filter:none}
html body.erp-compact #content .erp-title-create:hover:not(:disabled) {background:var(--create-hover);border-color:rgba(8,124,250,.28)}
body #content .erp-title-create:active:not(:disabled),html body.erp-compact #content .erp-title-create:active:not(:disabled),body #content .erp-create-menu>summary:active {background:var(--create-active);transform:none}
body #content .erp-title-create:focus-visible,body #content .erp-create-menu>summary:focus-visible {outline:2px solid #087cfa;outline-offset:3px}
body #content .erp-title-create:disabled {opacity:.5;cursor:not-allowed}
body #content .alp-top-heading :is(.erp-title-create,.erp-create-menu,.erp-create-menu>summary) {translate:none}
body #content .erp-create-options {top:calc(100% + 6px);max-width:min(320px,calc(100vw - 32px))}
@media(max-width:700px) {
 body #content .erp-title-create,html body.erp-compact #content .erp-title-create,body #content .erp-create-menu>summary {width:44px;min-width:44px;max-width:44px;padding:0;gap:0}
 body #content :is(.erp-title-create,.erp-create-menu>summary)>.create-action-label {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body #content .erp-create-menu>summary>.create-action-chevron {display:none}
}
@media(prefers-reduced-motion:reduce) {body #content :is(.erp-title-create,.erp-create-menu>summary) {transition:none}}
@media print {body #content :is(.erp-title-create,.erp-create-menu) {display:none!important}}


/* Shared page creation action: the same pencil and 40px face in TEST and DEMO. */
html body #content .erp-title-create,
html body #content .erp-create-menu > summary {
 --create-bg:rgba(8,124,250,.045);--create-hover:rgba(8,124,250,.09);--create-line:rgba(8,124,250,.16);--create-ink:#2676b5;
 display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;
 flex:0 0 40px!important;width:40px!important;min-width:40px!important;max-width:40px!important;
 height:40px!important;min-height:40px!important;max-height:40px!important;
 padding:0!important;margin:0;gap:0!important;translate:none!important;
 border:1px solid var(--create-line)!important;border-radius:8px!important;
 background:var(--create-bg)!important;color:var(--create-ink)!important;box-shadow:none!important;
 cursor:pointer;list-style:none;
}
html body #content .erp-create-menu {flex:0 0 40px!important;width:40px!important;min-width:40px!important;translate:none!important}
html body #content :is(.erp-title-create,.erp-create-menu > summary) > .icon {width:20px!important;height:20px!important;flex:none}
html body #content :is(.erp-title-create,.erp-create-menu > summary) > .create-action-label {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html body #content .erp-create-menu > summary > .create-action-chevron {display:none}
html body #content .erp-create-menu > summary::-webkit-details-marker {display:none}
html body #content .erp-title-create:hover:not(:disabled),html body #content .erp-create-menu > summary:hover {background:var(--create-hover)!important;filter:none}
html body #content :is(.erp-title-create,.erp-create-menu > summary):focus-visible {outline:2px solid #087cfa;outline-offset:3px}
html body #content .erp-title-create:disabled {opacity:.5;cursor:not-allowed}
@media print {html body #content :is(.erp-title-create,.erp-create-menu) {display:none!important}}
