/* Shared presentation only: no modal visibility, transaction or scroll-lock state. */
html.ctr-workspace-v1{--ws-radius:14px;--ws-gap:14px;--ws-font:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;--ws-stroke:var(--border,#dbe3ee);--ws-surface:var(--card-bg,var(--card,#fff));--ws-ink:var(--text,#172338);--ws-muted:var(--text-secondary,#64748b)}
.ctr-workspace-v1 body{font-family:var(--ws-font)}
.ctr-workspace-v1 :is(.main,.module-page,.content,.module-head,.module-actions,.m-card,.m-card-body,.m-field){min-width:0;box-sizing:border-box}
.ctr-workspace-v1 .sidebar-nav button.nav-item{appearance:none;width:100%;text-align:left;font-family:inherit;font-size:inherit;cursor:pointer;white-space:normal;background:transparent;border:0}
.ctr-workspace-v1 .sidebar-nav .submenu a{white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.ctr-workspace-v1 .sidebar .nav-group.open > .submenu{max-height:none;overflow:visible}
.ctr-workspace-v1 .sidebar .nav-group:not(.open) > .submenu{display:none;margin:0;padding:0;border:0}
.ctr-workspace-v1 .sidebar .sidebar-nav{gap:4px}
.ctr-workspace-v1 .sidebar .sidebar-nav > .nav-group{margin:0}
.ctr-workspace-v1 .sidebar .sidebar-nav > *{flex-shrink:0}
.ctr-workspace-v1 .sidebar .sidebar-nav:has(> .nav-group.open)::after{content:"";display:block;flex:0 0 calc(32px + env(safe-area-inset-bottom));min-height:32px;pointer-events:none}
.ctr-workspace-v1 .sidebar .sidebar-profile{flex-shrink:0}
.ctr-workspace-v1 .sidebar-nav button.nav-item:focus-visible{outline:2px solid var(--blue,#2f6fea);outline-offset:-2px}
.ctr-workspace-v1 .ctr-module-context{flex:0 0 auto;min-width:0;margin:0;padding:12px 26px 0;background:var(--bg,#f5f7fb);color:var(--ws-ink);box-sizing:border-box}
.ctr-workspace-v1 .ctr-module-context-title{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:11px;font-weight:750;color:var(--ws-muted);margin-bottom:8px;letter-spacing:.025em}
.ctr-workspace-v1 .ctr-workflow-state{font-size:10px;font-weight:500}
.ctr-workspace-v1 .ctr-module-tabs{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding:3px 2px 10px;scrollbar-width:thin;overscroll-behavior-x:contain}
.ctr-workspace-v1 .ctr-module-tabs a{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:38px;padding:8px 12px;box-sizing:border-box;border:1px solid var(--ws-stroke);border-radius:10px;background:var(--ws-surface);color:var(--ws-muted);font:600 12px/1.35 var(--ws-font);text-decoration:none;white-space:nowrap;transition:background .15s,border-color .15s}
.ctr-workspace-v1 .ctr-module-tabs a:hover{border-color:var(--blue,#2f6fea);color:var(--blue,#2f6fea)}
.ctr-workspace-v1 .ctr-module-tabs a.active{background:var(--blue,#2f6fea);color:var(--theme-on-primary,#fff);border-color:var(--blue,#2f6fea)}
.ctr-workspace-v1 .main :is(.module-head,.page-header,.report-head,.pb-head){gap:12px;flex-wrap:wrap}
.ctr-workspace-v1 .main :is(.module-head,.page-header,.report-head,.pb-head) h1{font-family:var(--ws-font)!important;font-size:clamp(20px,2.2vw,26px)!important;line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere}
.ctr-workspace-v1 .main :is(.module-actions,.head-actions,.pb-head-actions,.m-filter,.m-filters,.filter-actions){display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
.ctr-workspace-v1 .main :is(.m-card,.finance-status,.finance-kpi,.report-data-card){border-radius:var(--ws-radius);border-color:var(--ws-stroke)}
.ctr-workspace-v1 .main :is(.m-card-head,.m-card-body){padding:16px}
.ctr-workspace-v1 .main :is(.m-card-head h2,.m-card-head h3){font-family:var(--ws-font);font-size:15px;line-height:1.4}
.ctr-workspace-v1 .main :is(.m-input,.m-select,.m-textarea){box-sizing:border-box;max-width:100%;min-width:0;border-radius:10px;font-family:var(--ws-font);font-size:13px}
.ctr-workspace-v1 .main :is(.m-input,.m-select){min-height:40px}
.ctr-workspace-v1 .main :is(.m-btn,.btn-primary,.btn-secondary){font-family:var(--ws-font);border-radius:10px;min-height:38px;line-height:1.35;white-space:normal;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.ctr-workspace-v1 :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--blue,#2f6fea);outline-offset:2px}
.ctr-workspace-v1 :is(button,[role=button]):disabled{cursor:not-allowed;opacity:.6}
.ctr-workspace-v1 .main :is(.m-table-wrap,.table-wrap,.table-responsive,.ws-table-scroll){max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}
.ctr-workspace-v1 .main .m-table{font-family:var(--ws-font);font-size:12px}
.ctr-workspace-v1 .main .m-table :is(th,td){padding:10px 12px;line-height:1.45}
.ctr-workspace-v1 .main .m-table th{font-size:11px}
.ctr-workspace-v1 :is(.m-modal-card,.m-modal-dialog,.modal-content,.att-modal-card){box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow:auto;border-radius:var(--ws-radius);font-family:var(--ws-font)}
.ctr-workspace-v1 .ctr-workspace-progress{position:fixed;inset:0 0 auto;height:3px;background:var(--blue,#2f6fea);z-index:100000;transform:scaleX(0);transform-origin:left;pointer-events:none;transition:transform .25s,opacity .2s;opacity:0}
.ctr-workspace-v1.ws-navigating .ctr-workspace-progress{transform:scaleX(.8);opacity:1}
@media(max-width:1180px){.ctr-workspace-v1 .ctr-module-context{padding:10px 18px 0}.ctr-workspace-v1 .main .finance-two{grid-template-columns:minmax(0,1fr)}.ctr-workspace-v1 .main .finance-hero{grid-template-columns:minmax(0,1fr)}}
@media(max-width:767px){
 .ctr-workspace-v1 .ctr-module-context{padding:8px 12px 0}
 .ctr-workspace-v1 .ctr-module-tabs a{min-height:42px;font-size:11px;padding:8px 10px}
 .ctr-workspace-v1 .main :is(.module-page,.opening-shift-page){padding-left:12px!important;padding-right:12px!important;max-width:100%}
 .ctr-workspace-v1 .main :is(.m-card-head,.m-card-body){padding:12px}
 .ctr-workspace-v1 .main :is(.m-input,.m-select,.m-textarea){font-size:16px}
 .ctr-workspace-v1 .main :is(.m-btn,.btn-primary,.btn-secondary){min-height:42px}
 .ctr-workspace-v1 .main .finance-kpi-grid{grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr))}
 .ctr-workspace-v1 :is(.m-modal-card,.m-modal-dialog,.modal-content,.att-modal-card){max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px)}
}
@media(prefers-reduced-motion:reduce){.ctr-workspace-v1 .ctr-module-tabs a,.ctr-workspace-v1 .ctr-workspace-progress{transition:none}}
@media print{.ctr-workspace-v1 .ctr-module-context,.ctr-workspace-v1 .ctr-workspace-progress{display:none!important}.ctr-workspace-v1 .ws-table-scroll{overflow:visible!important}}

/* Page hierarchy: heading, actions, module tabs, then page content. */
html.ctr-workspace-v1 .main .ws-title-first {
 display:flex!important;flex-direction:column!important;align-items:stretch!important;
 justify-content:flex-start!important;gap:12px!important;
}
html.ctr-workspace-v1 .main .ws-title-first > * {min-width:0;max-width:100%}
html.ctr-workspace-v1 .main .ws-title-first > :is(.module-actions,.head-actions,.page-head-actions,.pb-head-actions,.date-filter) {
 position:relative!important;inset:auto!important;align-self:flex-start!important;
 margin-left:0!important;margin-top:0!important;
}
html.ctr-workspace-v1 .main .ws-title-first > :is(.module-actions,.head-actions,.page-head-actions,.pb-head-actions) {
 display:flex!important;flex-wrap:wrap!important;justify-content:flex-start!important;gap:8px!important;
}
html.ctr-workspace-v1 .main .ws-context-after-title {
 padding:0!important;margin:0 0 16px!important;width:100%;min-width:0;box-sizing:border-box;
}

/* Share spare header width while keeping the title first in reading order.
   Narrow viewports retain the existing stacked, touch-friendly controls. */
@media screen and (min-width:768px) {
 html.ctr-workspace-v1 .main .ws-title-first {
  flex-direction:row!important;flex-wrap:wrap!important;align-items:flex-end!important;
  gap:12px 20px!important;min-height:0!important;
 }
 html.ctr-workspace-v1 .main .ws-title-first > :first-child {flex:1 1 360px;min-width:0}
 html.ctr-workspace-v1 .main .ws-title-first > :is(.module-actions,.head-actions,.page-head-actions,.pb-head-actions,.date-filter,button) {
  flex:0 1 auto!important;width:auto!important;align-self:flex-end!important;
 }
 html.ctr-workspace-v1 .main .ws-shared-tools > .ws-context-after-title {
  flex:1 1 100%;width:100%!important;margin:0!important;background:transparent;
 }
 html.ctr-workspace-v1 .main .ws-shared-tools .ctr-module-context-title {margin-bottom:5px}
 html.ctr-workspace-v1 .main .ws-shared-tools .ctr-module-tabs {flex-wrap:wrap;overflow:visible;padding:0;gap:6px}
 html.ctr-workspace-v1 .main .dashboard-head > #ctrLayoutBar {
  flex:0 1 auto;width:auto;margin:0;padding:0;border:0;background:transparent;box-shadow:none;
 }
 html.ctr-workspace-v1 .main .dashboard-head > #ctrLayoutBar .ctr-layout-mode {font-size:10px}
 html.ctr-workspace-v1 .main .dashboard-head > #ctrLayoutBar[hidden] {display:none!important}
 html.ctr-workspace-v1 .main.ctr-layout-editing .dashboard-head > #ctrLayoutBar,
 html.ctr-workspace-v1 .main .ctr-layout-editing .dashboard-head > #ctrLayoutBar {
  flex:1 1 100%;width:100%;padding:10px;border:1px solid var(--ws-stroke);background:var(--ws-surface);
 }
 /* Five purchasing KPIs fill each row, including an incomplete final row. */
 html.ctr-workspace-v1 .main #pbSummaryCards {
  display:flex!important;flex-wrap:wrap!important;gap:12px!important;align-items:stretch;
 }
 html.ctr-workspace-v1 .main #pbSummaryCards > .pb-stat {
  flex:1 1 180px!important;width:auto!important;min-width:0!important;max-width:100%!important;
  grid-column:auto!important;box-sizing:border-box;
 }
 html.ctr-workspace-v1 .main #pbSummaryCards .pb-stat-body {min-width:0}
 html.ctr-workspace-v1 .main #pbSummaryCards .pb-stat-value {overflow-wrap:anywhere;white-space:normal}
}

