/* Shared workspace layout. Loaded after feature styles so every role uses the
   same navigation, spacing, controls and information hierarchy. */
:root {
  --sidebar-width: 224px;
  --workspace-gap: 20px;
  --ink: #20372e;
  --muted: #6d7d74;
  --canvas: #f5f7f5;
  --line: #e2e8e3;
  --green: #246b50;
  --green-dark: #173f33;
  --green-deep: #16372e;
  --shadow: 0 16px 60px #17372b1a;
}
body { line-height: 1.5; }
.app-shell { min-width: 0; }
.sidebar {
  width: var(--sidebar-width);
  height: 100dvh;
  padding: 0 12px;
  overflow: hidden;
  background: linear-gradient(165deg, #1c4335 0%, #14362c 55%, #122e27 100%);
}
.brand { padding: 25px 15px 22px; gap: 14px; flex: none; }
.brand-logo { padding: 0; background: transparent; border-radius: 0; }
/* Screen blending removes the original white image background without
   changing the company logo used on business documents. */
.brand-logo img { width: 144px; height: 65px; filter: grayscale(1) invert(1) brightness(2); mix-blend-mode: screen; }
.brand-workspace { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 500; color: #b8cdc1; letter-spacing: .2px; }
.brand-workspace::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #a9c99c; }
.sidebar-navigation {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #456b5b transparent;
  padding-bottom: 8px;
}
.sidebar .nav-list { gap: 2px; margin: 0 0 12px; }
.sidebar .nav-heading { padding: 12px 12px 7px; font-size: 10px; letter-spacing: 1px; color: #91b2a2; }
.sidebar .nav-item { min-height: 38px; padding: 9px 13px; gap: 11px; border-radius: 8px; font-size: 12px; line-height: 20px; transition: background .15s, color .15s; }
.sidebar .nav-item svg { width: 17px; height: 17px; }
.sidebar .nav-item.active { background: #ffffff13; box-shadow: inset 0 0 0 1px #ffffff0b; }
.sidebar .nav-item.active svg { color: #c1dba9; }
.sidebar .nav-item:hover { background: #ffffff0a; }
.sidebar-bottom { margin: 0; padding: 10px 0; flex: none; border-top: 1px solid #ffffff14; }
.sidebar-bottom .nav-list { margin: 0; }
.main-shell { min-width: 0; width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); }
.topbar { height: 64px; min-height: 64px; padding: 0 28px; gap: 18px; box-shadow: 0 1px 4px #16372e03; }
.breadcrumbs { display: flex; gap: 9px; flex: 1; min-width: 0; font-size: 12px; }
.breadcrumbs b { white-space: nowrap; }
.top-actions { width: auto; flex: none; gap: 10px; }
.search-field { width: 228px; min-width: 0; min-height: 36px; padding: 7px 10px; background: #f7f9f7; border-color: #e7ece7; border-radius: 8px; }
.search-field input { font-size: 12px; }
.command-launch { min-height: 36px; width: 36px; padding: 0; justify-content: center; }
.command-launch span,.command-launch kbd { display: none; }
.icon-button { width: 36px; height: 36px; flex: none; }
.account-chip { min-height: 38px; gap: 9px; max-width: 190px; }
.account-chip .avatar { width: 32px; height: 32px; font-size: 12px; }
.account-chip-copy b { font-size: 12px; max-width: 140px; }
.account-chip-copy small { font-size: 11px; }
.content { max-width: 1480px; padding: 24px 28px 32px; min-width: 0; }
.content > * { min-width: 0; }
.page-head { min-height: 36px; margin-bottom: 20px; align-items: center; gap: 16px; }
.page-head h1,.page-head > h1 { font-size: 24px; line-height: 1.4; letter-spacing: -.5px; font-weight: 650; }
.head-buttons { gap: 8px; flex-wrap: wrap; max-width: none; }
.btn { min-height: 36px; font-size: 12px; padding: 8px 13px; border-radius: 8px; line-height: 18px; box-shadow: none; transition: background .15s, border-color .15s; }
.btn.small,.btn.subtle { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.btn.primary { box-shadow: none; }
.date-box { padding: 7px 10px; min-height: 36px; font-size: 11px; }
.card { border-radius: 12px; box-shadow: 0 2px 6px #1e3b2e04; }
.card-header { padding: 16px 20px; min-height: 56px; gap: 12px; }
.card-header h2 { font-size: 14px; }
.card-body { padding: 20px; }
.page-summary,.service-queue-summary .page-summary,.customer-profile-page .page-summary {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.summary-strip { padding: 14px 16px; min-height: 66px; gap: 10px; border-radius: 8px; }
.summary-strip small { font-size: 12px; line-height: 1.5; }
.summary-strip b { font-size: 23px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.metric-grid { gap: 14px; margin-bottom: 20px; }
.metric-card { padding: 19px 20px; min-height: 126px; border-radius: 12px; box-shadow: 0 2px 6px #1e3b2e04; }
.metric-card.featured { background: linear-gradient(120deg, #235e46, #173f33); border-color: #235e46; }
.metric-label { font-size: 12px; }
.metric-value { font-size: clamp(22px, 2.2vw, 30px); margin-top: 12px; letter-spacing: -.7px; }
.metric-foot { font-size: 11px; margin-top: 7px; line-height: 1.5; }
.quick-create { padding: 12px 16px; margin-bottom: 20px; gap: 12px; }
.quick-create > div { gap: 8px; }
.quick-create .btn { min-height: 34px; }
.dashboard-grid { gap: 20px; margin-bottom: 20px; align-items: start; grid-template-columns: minmax(0, 1.5fr) minmax(285px, 1fr); }
.chart { height: 158px; }
.chart-top b { font-size: 23px; }
.chart-labels { font-size: 11px; }
.chart-top small { font-size: 11px; }
.task-row { padding: 11px 18px; gap: 11px; min-height: 57px; }
.task-icon { width: 30px; height: 30px; border-radius: 6px; }
.task-copy b { font-size: 12px; }
.task-count { font-size: 18px; }
.table-toolbar { padding: 12px 18px; min-height: 56px; gap: 12px; flex-wrap: wrap; }
.filters { gap: 4px; }
.filter { min-height: 32px; padding: 6px 10px; font-size: 12px; line-height: 20px; border-radius: 5px; }
.table-wrap { max-width: 100%; }
.table-wrap > table { white-space: normal; }
table { font-size: 13px; }
th { padding: 11px 18px; font-size: 11px; color: #6c7c72; line-height: 1.5; background: #f8faf9; }
td { padding: 14px 18px; font-size: 12px; line-height: 1.6; color: #475d50; }
.table-link { font-size: 12px; line-height: 1.5; }
.table-secondary { font-size: 11px; margin-top: 3px; color: #77877d; }
.table-footer { padding: 12px 18px; font-size: 11px; min-height: 50px; }
.table-footer .icon-button { height: 28px; width: 28px; }
.status { font-size: 11px; padding: 4px 7px; }
.row-actions { gap: 5px; flex-wrap: wrap; }
.customer-cell { min-width: 170px; max-width: 220px; white-space: normal; }
.customer-cell > span:last-child { min-width: 0; }
.table-wrap .bgm-progress { min-width: 180px; }
.table-wrap .bgm-payment-caption { white-space: normal; }
.table-wrap .numeric,.table-wrap .mono { white-space: nowrap; }
.table-wrap td:last-child .btn { white-space: nowrap; }
.order-workflow-filters { gap: 12px; padding: 16px 18px; align-items: end; background: #fafcfb; }
.order-workflow-filters label { min-width: 136px; flex: 1 1 136px; gap: 6px; }
.order-workflow-filters label:first-child { flex-basis: 182px; }
.order-workflow-filters label span { font-size: 11px; }
.order-workflow-filters select,.order-workflow-filters input { min-height: 36px; padding: 7px 9px; }
.order-workflow-list { padding: 18px; gap: 16px; }
.order-workflow-card { padding: 18px 20px; border-radius: 8px; }
.order-workflow-card > header { margin-bottom: 14px; }
.order-workflow-card h3 { margin: 5px 0; font-size: 14px; }
.order-workflow-card header > strong { font-size: 18px; }
.order-workflow-card .bgm-progress-steps { margin: 16px 0; }
.order-workflow-card footer { margin-top: 14px; padding-top: 12px; gap: 7px; }
.order-workflow-files { margin-top: 12px; }
.bgm-progress-list,.bgm-progress-account { margin: 20px 0; }
.bgm-progress-list-body { gap: 0 20px; padding: 0 20px; }
.bgm-progress-record { padding: 16px; background: #fbfcfb; }
.customer-profile-page { gap: 20px; }
.customer-profile-page .page-summary { margin: 0; }
.customer-page-heading { padding: 0; gap: 20px; align-items: center; flex-direction: row; flex-wrap: wrap; }
.customer-page-identity h1 { font-size: 24px; }
.customer-page-avatar { width: 50px; height: 50px; font-size: 23px; border-radius: 10px; }
.customer-page-identity { gap: 14px; }
.customer-page-meta { margin-top: 5px; gap: 9px; font-size: 12px; }
.customer-page-columns { gap: 20px; }
.account-settings-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 20px; gap: 20px; margin-bottom: 20px; }
.settings-account { display: flex; gap: 12px; align-items: center; min-width: 0; }
.settings-account h2 { margin: 0 0 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.settings-account strong { display: block; font-size: 15px; font-weight: 600; }
.settings-account small { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.settings-account .avatar { width: 44px; height: 44px; }
.account-development,.settings-account-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-development { margin-left: auto; }
.account-development label { font-size: 12px; font-weight: 550; cursor: pointer; }
.language-toggle { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f8; }
.language-toggle .btn { border: 0; }
.settings-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.integration-card { padding: 22px; }
.integration-logo { height: 38px; width: 38px; border-radius: 8px; margin-bottom: 15px; }
.integration-logo svg { width: 20px; height: 20px; }
.settings-grid .integration-card h2 { font-size: 15px; margin-bottom: 12px; }
.integration-card .btn { margin-top: 16px; }
.integration-line { padding-top: 12px; margin-top: 16px; gap: 12px; }
.integration-card .inline-actions { margin: 0; }
.catalogue-tabs { padding: 0 20px; gap: 22px; }
.catalogue-tabs > button { padding: 16px 0 13px; font-size: 13px; }
.catalogue-search { padding: 16px 20px 0; gap: 12px; }
.catalogue-search-input input { padding: 9px 11px; border-radius: 6px; min-height: 38px; }
.catalogue-search .btn { min-height: 38px; }
.catalogue-filters { padding: 14px 20px; gap: 9px; }
.catalogue-filters select { min-height: 36px; padding-block: 7px; border-radius: 6px; }
.catalogue-card .tabulator-header .tabulator-col { padding: 7px 10px; }
.catalogue-card .tabulator-row .tabulator-cell { padding: 12px 16px; }
.catalogue-card .tabulator-cell .status { align-self: flex-start; }
.catalogue-card .tabulator .tabulator-frozen-left { border-right: 1px solid var(--line)!important; }
.catalogue-card .tabulator .tabulator-frozen-right { border-left: 1px solid var(--line)!important; }
.logistics-toolbar { margin-bottom: 16px; gap: 12px; }
.logistics-detail-section { border-radius: 8px; padding: 18px; margin-bottom: 18px; }
.logistics-filter-bar { gap: 12px; }
.logistics-form-section { border-radius: 8px; }
.overlay.modal { padding: 24px; }
.panel { width: min(760px, calc(100% - 40px)); min-height: 0; }
.panel.wide { width: min(1040px, calc(100% - 40px)); }
.modal .panel { width: min(920px, 100%); max-height: calc(100dvh - 48px); border-radius: 12px; overflow: hidden; }
.modal .panel.wide { width: min(1040px, 100%); }
.modal .panel.small { width: min(520px, 100%); }
.panel-header { padding: 20px 24px; gap: 16px; align-items: flex-start; flex: none; }
.panel-header h2 { font-size: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.panel-header p { font-size: 12px; line-height: 1.6; margin-top: 5px; overflow-wrap: anywhere; }
.panel-body { padding: 22px 24px; min-height: 0; flex: 1 1 auto; }
.panel-footer { padding: 14px 24px; gap: 8px; flex: none; background: #fafcfb; flex-wrap: wrap; }
.form-grid { gap: 16px 20px; }
.field { gap: 6px; }
.field label { font-size: 12px; line-height: 1.5; color: #536b5d; }
.field input,.field select,.field textarea { min-height: 38px; padding: 9px 11px; font-size: 13px; border-color: #d7e1da; border-radius: 6px; }
.field small { font-size: 11px; color: #7c8b80; }
.field input[type="checkbox"],.field input[type="radio"] { min-height: 0; width: auto; }
.form-section { font-size: 13px; margin: 22px 0 16px; padding-bottom: 10px; }
.detail-summary { padding: 17px 18px; margin-bottom: 20px; border-radius: 8px; }
.detail-summary strong { font-size: 25px; }
.detail-summary small { font-size: 12px; }
.order-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 2px 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.order-amounts small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.order-amounts strong { display: block; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.detail-grid { gap: 18px 24px; margin: 18px 0 22px; }
.detail-field { min-width: 0; }
.detail-field small { font-size: 12px; margin-bottom: 5px; color: #7a897e; }
.detail-field p { font-size: 13px; color: #3e5849; line-height: 1.7; overflow-wrap: anywhere; }
.detail-title { margin-top: 24px; font-size: 14px; gap: 12px; flex-wrap: wrap; }
.detail-table th,.detail-table td { padding: 11px 12px; font-size: 12px; }
.detail-table-wrap { overflow-x: auto; }
.key-value { gap: 12px 18px; font-size: 13px; }
.key-value > * { min-width: 0; overflow-wrap: anywhere; }
.inline-actions { flex-wrap: wrap; gap: 8px; }
.sales-checkpoints,.pi-workflow { padding: 18px; border-radius: 8px; margin: 20px 0; }
.pi-workflow h3,.sales-checkpoint-heading h3 { font-size: 15px; }
.sales-checkpoint-grid { gap: 10px; }
.sales-checkpoint { padding: 12px; }
.pistf-editor .panel-body { padding: 22px 24px; }
.pistf-record-fields { gap: 20px; }
.service-columns { gap: 20px; }
.work-log-card { padding: 16px; }
.audit-row { padding: 16px 20px; }
.footer-note { padding-top: 22px; font-size: 10px; color: #86968b; }
.role-test-banner { margin: 16px 28px 0; padding: 9px 12px; border-radius: 7px; }
.loading-line { left: var(--sidebar-width); }
.toast { left: calc(50% + var(--sidebar-width) / 2); }
.login-shell { background: radial-gradient(ellipse at 20% 0%, #e9f0e7 0%, transparent 55%), #f5f7f4; }
.login-brand img,.error-page img { mix-blend-mode: multiply; }
.login-card { border-color: #e1e8df; border-radius: 18px; box-shadow: 0 20px 70px #193e2810; }
.login-card .field input { background: #fafcf9; border-radius: 9px; }
.login-card .field input:focus { background: #fff; }
.login-submit { border-radius: 9px; }
.login-language { border-color: #e1e8df; border-radius: 9px; }
@media (prefers-reduced-motion: reduce) {
  .sidebar .nav-item,.btn { transition: none; }
}
@media (max-width: 1100px) {
  :root { --sidebar-width: 200px; }
  .topbar { padding-inline: 22px; }
  .content { padding-inline: 22px; }
  .search-field { width: 190px; }
  .breadcrumbs > span { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .task-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-row { border-bottom: 1px solid #edf0ed; }
  .metric-value { font-size: 23px; }
  .page-summary { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
}
@media (max-width: 850px) {
  .topbar { padding-inline: 18px; }
  .content { padding: 22px 18px 28px; }
  .search-field { width: 168px; }
  .account-chip-copy { display: none; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 116px; }
  .quick-create { align-items: flex-start; }
  .quick-create > div { justify-content: flex-end; }
  .catalogue-summary { grid-template-columns: repeat(2, minmax(0, 1fr))!important; }
  .logistics-detail-grid,.service-columns { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  :root { --sidebar-width: 224px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { width: 100%; margin-left: 0; }
  .topbar { height: 60px; min-height: 60px; gap: 8px; padding: 0 14px; }
  .mobile-menu { display: grid; }
  .breadcrumbs { display: none; }
  .top-actions { flex: 1; min-width: 0; gap: 6px; }
  .search-field { flex: 1; width: auto; }
  .top-actions .btn { font-size: 11px; padding: 6px; }
  .top-actions .top-divider { display: none; }
  .content { padding: 20px 14px 28px; }
  .page-head { margin-bottom: 16px; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .page-head h1,.page-head > h1 { font-size: 22px; }
  .head-buttons { justify-content: flex-start; }
  .page-summary,.service-queue-summary .page-summary,.customer-profile-page .page-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .summary-strip { padding: 12px; }
  .metric-card { padding: 14px; }
  .metric-label { font-size: 11px; }
  .metric-value { font-size: 23px; }
  .quick-create { flex-direction: column; }
  .quick-create > div { justify-content: flex-start; }
  .task-list { grid-template-columns: 1fr; }
  .order-workflow-list { padding: 12px; }
  .order-workflow-card { padding: 15px; }
  .order-workflow-card > header { flex-wrap: wrap; gap: 8px; }
  .order-workflow-filters { padding: 14px; }
  .order-workflow-filters label { min-width: 120px; flex-basis: calc(50% - 12px); }
  .order-workflow-filters label:first-child { flex-basis: calc(50% - 12px); }
  .account-settings-row { padding: 18px; gap: 18px; }
  .account-development { margin-left: 0; }
  .settings-account-actions { width: 100%; justify-content: space-between; }
  .settings-grid { grid-template-columns: 1fr; }
  .overlay.modal { padding: 12px; }
  .panel,.panel.wide { width: 100%; }
  .modal .panel { max-height: calc(100dvh - 24px); }
  .panel-header { padding: 18px; }
  .panel-body,.pistf-editor .panel-body { padding: 18px; }
  .panel-footer { padding: 12px 18px; }
  .form-grid { gap: 16px; }
  .customer-page-heading { gap: 16px; }
  .customer-page-identity h1 { font-size: 22px; }
  .role-test-banner { margin: 12px 14px 0; }
  .loading-line { left: 0; }
  .toast { left: 50%; }
}
@media (max-width: 480px) {
  .form-grid,.detail-grid,.pistf-record-fields { grid-template-columns: 1fr; }
  .order-workflow-card footer .btn { flex: 1 1 auto; }
  .panel-footer .btn { white-space: normal; }
}

/* Keep daily work in view; secondary reporting uses native disclosures. */
.card,.metric-card{box-shadow:none}.content>.simple-task-card{margin-bottom:20px}.simple-task-card .task-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.simple-task-card .task-row{border-top:1px solid #edf0ea;border-bottom:0;min-height:58px}.simple-task-card .task-row:nth-child(even){border-left:1px solid #edf0ea}.simple-task-card .empty-state{grid-column:1/-1;padding:25px}.dashboard-secondary>.card{border:0;box-shadow:none}.dashboard-secondary .bgm-progress-list{margin:0}.dashboard-secondary>.sales-checkpoints{margin-top:0}.dashboard-secondary .card-header{padding-left:0;padding-right:0}.order-phase-control{display:flex;align-items:center;gap:10px;color:#7d8e74;font-size:12px}.order-phase-control select{font:inherit;color:#465f3d;background:#fff;border:1px solid #dce5d6;border-radius:6px;padding:8px 30px 8px 10px;min-width:170px}.order-workflow-card{border-radius:8px}.order-workflow-card .bgm-progress-steps{margin:13px 0}.order-workflow-card .bgm-progress-dot{height:21px;width:21px;font-size:10px}.order-workflow-card .bgm-progress-steps>li{font-size:11px;gap:5px}.invoice-workspace-header{padding-top:17px;padding-bottom:14px}.invoice-next-step{padding-top:16px;padding-bottom:16px}.invoice-file-card{background:#fff}.order-invoice-summary .detail-summary{background:transparent;border:0;padding:0 0 9px}.order-invoice-summary .order-amounts{border-bottom:0}.panel-body>.order-invoice-summary{margin-bottom:14px}.order-list-controls{border-bottom:0;padding-bottom:6px}.order-workflow>.table-toolbar{padding-top:8px}.invoice-finance-review-item>.invoice-review-document{padding:14px}.invoice-finance-file-row .btn{flex:none}
@media(max-width:700px){.simple-task-card .task-list{grid-template-columns:1fr}.simple-task-card .task-row:nth-child(even){border-left:0}.order-phase-control select{max-width:100%}.order-filter-details .order-workflow-filters{padding:12px 0}.order-workflow-card .bgm-progress-steps{margin:12px 0}.invoice-tax-summary{gap:14px}}
