:root {
  --oms-font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  --oms-bg: #ffffff;
  --oms-panel: #ffffff;
  --oms-panel-soft: #fbfcfe;
  --oms-ink: #17233b;
  --oms-text-secondary: #526077;
  --oms-muted: #64748b;
  --oms-line: #e2e8f0;
  --oms-line-strong: #d4dce8;
  --oms-blue: #2463eb;
  --oms-blue-deep: #1749b7;
  --oms-blue-soft: #eef4ff;
  --oms-green: #047857;
  --oms-green-soft: #ecfdf5;
  --oms-warning: #92400e;
  --oms-warning-soft: #fff7ed;
  --oms-danger: #b91c1c;
  --oms-danger-soft: #fff1f2;
  --oms-notification: #dc2626;
  --oms-text-page-title: 22px;
  --oms-text-section-title: 16px;
  --oms-text-body: 13px;
  --oms-text-table: 12px;
  --oms-text-label: 12px;
  --oms-text-meta: 11px;
  --oms-weight-regular: 400;
  --oms-weight-medium: 600;
  --oms-weight-bold: 700;
  --oms-radius: 8px;
  --oms-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  --oms-menu-item-font-size: 13px;
  --oms-menu-item-font-weight: 700;
  --oms-menu-item-height: 34px;
}

/* Approval center: one shared workspace for quote, purchase and sales approvals. */
.app:not(.label-fullscreen-mode) #module-approvals {
  min-width: 0;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-tabs {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 54px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--air-border, #dfe6f0);
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-tabs button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 54px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #52637d;
  font-weight: 700;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-tabs button.active {
  color: var(--primary, #2563eb);
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-tabs button.active::after {
  background: var(--primary, #2563eb);
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-tabs button span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb;
  font-size: 14px;
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-filterbar {
  display: grid;
  grid-template-columns: 150px 150px 160px minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-filterbar > select,
.app:not(.label-fullscreen-mode) #module-approvals .approval-search-wrap {
  height: 42px;
  border: 1px solid var(--air-border, #dfe6f0);
  border-radius: 8px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-filterbar > select {
  width: 100%;
  padding: 0 34px 0 12px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-search-wrap {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-search-wrap svg {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  width: 17px;
  height: 17px;
  color: #7d8da7;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-search-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 14px 0 42px;
  border: 1px solid var(--air-border, #dfe6f0);
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .oms-search-field {
  position: relative;
}

.app:not(.label-fullscreen-mode) .oms-search-field > svg {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #7b879d;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transform: translateY(-50%);
}

.app:not(.label-fullscreen-mode) .oms-search-field > input.search {
  padding-left: 44px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  min-height: calc(100vh - 210px);
  border: 1px solid var(--air-border, #dfe6f0);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr) 0;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-list {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap {
  min-width: 0;
  flex: 1;
  overflow: auto;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap table {
  min-width: 930px;
  width: 100%;
  border-collapse: collapse;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap th,
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap td {
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid #e7edf5;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 48px;
  background: #f7f9fc;
  color: #52637d;
  font-size: 13px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap td.num,
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap th.num {
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap tbody tr {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap tbody tr:hover,
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap tbody tr.selected {
  background: #f1f6ff;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-table-wrap td a {
  color: #1f6cf0;
  font-weight: 650;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-footer {
  min-height: 54px;
  padding: 17px 16px;
  border-top: 1px solid #e7edf5;
  color: #71819a;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details {
  position: fixed;
  top: 80px;
  right: 0;
  bottom: 0;
  z-index: 24;
  display: flex;
  width: 390px;
  min-width: 0;
  min-height: 0;
  max-height: none;
  flex-direction: column;
  border-left: 1px solid var(--air-border, #dfe6f0);
  background: #fff;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-approvals .details-closed .approval-center-details {
  display: none;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 19px 20px;
  border-bottom: 1px solid #e7edf5;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-head > div {
  display: grid;
  gap: 8px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-title {
  display: grid;
  gap: 5px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-title > b {
  color: #18263c;
  font-size: 18px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-title > strong {
  color: var(--primary, #2563eb);
  font-size: 15px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-head strong {
  color: #18263c;
  font-size: 16px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-head strong span {
  margin-left: 6px;
  color: #52637d;
  font-size: 13px;
  font-weight: 600;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-head .oms-details-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 28px;
  line-height: 36px;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-scroll .quote-detail-section {
  padding: 20px;
  border-bottom: 1px solid #e7edf5;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-scroll .quote-detail-section h3 {
  margin: 0 0 16px;
  color: #17243a;
  font-size: 15px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 18px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-summary-grid > div {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-summary-grid :is(dt, dd) {
  margin: 0;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-summary-grid dt {
  flex: 0 0 auto;
  color: #8290a5;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-summary-grid dd {
  min-width: 0;
  color: #33445f;
  font-weight: 650;
  text-align: right;
  overflow-wrap: anywhere;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-summary-grid .wide {
  grid-column: 1 / -1;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-risk-alert {
  display: grid;
  gap: 5px;
  margin: 14px 20px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #c35b08;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-total {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e7edf5;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-center-total strong {
  color: #1260e8;
  font-size: 18px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-actions {
  padding: 14px 18px;
  border-top: 1px solid #e7edf5;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-actions textarea {
  width: 100%;
  min-height: 64px;
  margin-bottom: 10px;
  resize: vertical;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-actions > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-details-actions .btn {
  min-width: 96px;
}

#first-password-gate { position:fixed; inset:0; z-index:100000; background:#f4f7fb; display:grid; place-items:center; overflow:auto; padding:24px; }
#first-password-gate[hidden] { display:none; }
#first-password-form { width:min(440px,100%); padding:28px; background:white; border:1px solid #dfe6ef; border-radius:12px; font-size:13px; color:#34425b; }
#first-password-form h2 { font-size:20px; }
#first-password-form label { display:block; margin:14px 0; }
#first-password-form input { display:block; width:100%; margin-top:6px; }
#first-password-error { color:#b42318; }
.notification-tabs, #notification-actions { display:flex; gap:12px; padding:10px 16px; border-bottom:1px solid #e5eaf2; }
.notification-tabs button, #notification-actions button, .notification-message button, #notification-feedback button { font:inherit; font-size:12px; border:0; background:transparent; color:#52637d; cursor:pointer; }
.notification-tabs button { padding:8px 12px; }
.notification-tabs [aria-selected="true"] { color:#2460ed; border-bottom:2px solid #2460ed; }
#notification-actions[hidden] { display:none; }
#notification-actions button:disabled,.notification-message button:disabled { opacity:.5; cursor:default; }
.notification-message { display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid #e5eaf2; }
.notification-message > button:first-child { flex:1; text-align:left; color:#2460ed; }
.notification-message.is-read > button:first-child { color:#64748b; }
.notification-message small { display:block; font-size:11px; color:#64748b; margin-top:6px; }
#topbar-notification-list { max-height:360px; overflow:auto; }
/* Shared screen list alignment includes selectors and approval tables, not print sheets. */
@media screen {
  :is(.module, #modal, .delivery-order-picker-layer) table.oms-aligned-table :is(th, td)[data-cell-kind] {
    text-align: center !important;
    vertical-align: middle;
  }
  :is(.module, #modal, .delivery-order-picker-layer) table.oms-aligned-table :is(th, td)[data-cell-kind] > :is(a, button, input:not([type="checkbox"]):not([type="radio"]), select) {
    text-align: center !important;
  }
  :is(.module, #modal, .delivery-order-picker-layer) table.oms-aligned-table th[data-cell-kind] button {
    justify-content: center !important;
  }
}
/* Business lists share centered headers and values; numeric semantics remain for formatting. */
@media screen {
  .app:not(.label-fullscreen-mode) [id^="module-"]:is(#module-products, .module) table.oms-aligned-table :is(th, td)[data-cell-kind] {
    vertical-align: middle;
    padding-inline: 12px;
  }
  .app:not(.label-fullscreen-mode) [id^="module-"]:is(#module-products, .module) table.oms-aligned-table :is(th, td)[data-cell-kind="text"] {
    text-align: center !important;
  }
  .app:not(.label-fullscreen-mode) [id^="module-"]:is(#module-products, .module) table.oms-aligned-table :is(th, td)[data-cell-kind="number"] {
    text-align: center !important;
    white-space: nowrap;
    overflow-wrap: normal;
    font-variant-numeric: tabular-nums;
  }
  .app:not(.label-fullscreen-mode) [id^="module-"]:is(#module-products, .module) table.oms-aligned-table :is(th, td)[data-cell-kind="center"] {
    text-align: center !important;
  }
  .app:not(.label-fullscreen-mode) .module .oms-aligned-table th[data-cell-kind] button { justify-content: center; }
}

/* Approval details share quotation primitives; keep narrow-panel content readable. */
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details {
  max-width: 100vw;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-head,
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-actions {
  flex-shrink: 0;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-title {
  min-width: 0;
  justify-items: start;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-title strong {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  overflow-wrap: anywhere;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-title strong span { margin-left: 0; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .oms-details-close { flex: 0 0 36px; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-scroll {
  overflow-x: hidden;
  overscroll-behavior: contain;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-detail-title-row {
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-detail-title-row h3 { margin: 0; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-summary-grid > div {
  grid-template-columns: 88px minmax(0, 1fr);
  padding: 0;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-summary-grid dd { max-width: none; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details :is(.quote-detail-list dt, .quote-detail-list dd, .quote-item-table, .quote-approval-timeline b, .quote-record-list) {
  font-size: var(--oms-text-body, 13px);
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-approval-timeline small {
  font-size: var(--oms-text-meta, 11px);
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-item-table { min-width: 600px; table-layout: fixed; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-item-table :is(th, td) {
  text-align: center;
  vertical-align: middle;
  padding: 10px 8px;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-item-table :is(th, td):nth-child(2) { width: 180px; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-item-table td:nth-child(n+4) {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-approval-records summary { font-size: var(--oms-text-body, 13px); }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .quote-approval-records[open] summary svg { transform: rotate(180deg); }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-actions > div { flex-wrap: wrap; }
.app:not(.label-fullscreen-mode) #module-approvals .approval-center-details .approval-details-actions textarea { max-height: 120px; }

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-settings {
  overflow: hidden;
  border: 1px solid var(--air-border, #dfe6f0);
  border-radius: 10px;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  border-bottom: 1px solid #e7edf5;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-intro h2,
.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-intro p,
.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-card h3 {
  margin: 0;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-intro h2 {
  color: #17243a;
  font-size: 18px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-intro p {
  margin-top: 7px;
  color: #7a899f;
  font-size: 13px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  background: #f8fafc;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dfe6f0;
  border-radius: 10px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid #edf1f6;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-card h3 {
  color: #17243a;
  font-size: 16px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-card header span {
  display: block;
  margin-top: 5px;
  color: #7a899f;
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #52637d;
  font-size: 12px;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-switch input {
  accent-color: var(--primary, #2563eb);
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-steps {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-steps > li {
  display: grid;
  grid-template-columns: 28px minmax(105px, .85fr) minmax(138px, 1.15fr) auto;
  gap: 8px;
  align-items: center;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-index {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #eef4ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-steps :is(input, select) {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dfe6f0;
  border-radius: 7px;
  background: #fff;
  color: #33445f;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-actions {
  display: inline-flex;
  gap: 3px;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #687891;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-actions button:first-child svg {
  transform: rotate(180deg);
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-actions button:hover:not(:disabled) {
  background: #eef4ff;
  color: #2563eb;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-actions button:disabled {
  opacity: .32;
  cursor: default;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-step-actions svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-disabled {
  display: block;
  padding: 22px 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: #7a899f;
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-approvals .approval-add-step {
  width: 100%;
  border-style: dashed;
  color: #2563eb;
}

body:has(#module-approvals.active .approval-center-workspace:not(.details-closed)) #remote-sync-status {
  right: 408px !important;
}

/* Global notifications stay in a stable viewport-safe stack. Field-specific
   validation remains inline instead of covering the control that triggered it. */
body > .toast-region {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 10000;
  display: grid;
  width: min(400px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

body > .toast-region > .toast {
  --toast-accent: #2563eb;
  position: relative;
  inset: auto;
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  min-height: 48px;
  margin: 0;
  padding: 12px 12px 12px 14px;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #dbe4f0;
  border-left: 4px solid var(--toast-accent);
  border-radius: 8px;
  background: #fff;
  color: #17233a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: auto;
}

body > .toast-region > .toast.show {
  opacity: 1;
  transform: translateY(0);
}

body > .toast-region > .toast.leaving {
  opacity: 0;
  transform: translateY(-6px);
}

body > .toast-region > .toast-success {
  --toast-accent: #16a34a;
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-left-color: var(--toast-accent);
  color: #166534;
}

body > .toast-region > .toast-warning {
  --toast-accent: #d97706;
  background: #fffaf0;
  border-color: #fed7aa;
  border-left-color: var(--toast-accent);
  color: #9a3412;
}

body > .toast-region > .toast-error {
  --toast-accent: #dc2626;
  background: #fff5f5;
  border-color: #fecaca;
  border-left-color: var(--toast-accent);
  color: #991b1b;
}

body > .toast-region .toast-message {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

body > .toast-region .toast-close {
  flex: 0 0 auto;
  min-width: 40px;
  height: 28px;
  margin: -2px -4px -2px 8px;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: currentColor;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

body > .toast-region .toast-close:hover,
body > .toast-region .toast-close:focus-visible {
  background: rgba(15, 23, 42, .08);
  outline: none;
}

body > .toast-region .toast-close:focus-visible {
  box-shadow: 0 0 0 2px currentColor;
}

@media (max-width: 600px) {
  body > .toast-region {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body > .toast-region > .toast {
    transition: none;
  }
}

.app:not(.label-fullscreen-mode) .nav .nav-count {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

@media (max-width: 1120px) {
  .app:not(.label-fullscreen-mode) #module-approvals .approval-center-filterbar {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .app:not(.label-fullscreen-mode) #module-approvals .approval-search-wrap {
    grid-column: 1 / 4;
  }

  .app:not(.label-fullscreen-mode) #module-approvals .approval-center-workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
  }

  .app:not(.label-fullscreen-mode) #module-approvals .approval-workflow-grid {
    grid-template-columns: 1fr;
  }
}

body {
  background: var(--oms-bg);
  color: var(--oms-ink);
}

.app:not(.label-fullscreen-mode) {
  grid-template-columns: 200px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--oms-bg);
}

.app:not(.label-fullscreen-mode) .sidebar {
  display: flex;
  flex-direction: column;
  background: var(--oms-panel);
  border-right: 1px solid var(--oms-line);
  padding: 20px 14px 16px;
  color: var(--oms-ink);
  box-shadow: none;
  overflow-y: auto;
}

.app:not(.label-fullscreen-mode) .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 8px 16px;
  margin: 0 0 8px;
  border-bottom: 1px solid var(--oms-line);
  color: var(--oms-ink);
}

.app:not(.label-fullscreen-mode) .brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
}

.app:not(.label-fullscreen-mode) .brand-copy {
  display: grid;
  gap: 2px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: .02em;
  line-height: 1.1;
}

.app:not(.label-fullscreen-mode) .brand-copy small {
  color: #8a96a8;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .12em;
}

.app:not(.label-fullscreen-mode) .nav {
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  gap: 2px;
}

.app:not(.label-fullscreen-mode) .nav-home-row {
  position: relative;
  min-width: 0;
}

.app:not(.label-fullscreen-mode) .nav-home-row > [data-module="dashboard"] {
  padding-right: 48px;
  margin-bottom: 0;
}

.app:not(.label-fullscreen-mode) .nav .sidebar-collapse-button {
  position: absolute;
  top: 50%;
  right: 4px;
  z-index: 1;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  display: grid;
  place-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #647188;
  transform: translateY(-50%);
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) .nav .sidebar-collapse-button:hover {
  border: 0;
  background: #eaf2ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .nav .sidebar-collapse-button:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 1px;
}

.sidebar-collapse-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.sidebar-collapse-icon-open {
  display: none;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) {
  grid-template-columns: 72px minmax(0, 1fr);
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .sidebar {
  padding-left: 9px;
  padding-right: 9px;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .brand-copy,
.app.sidebar-collapsed:not(.label-fullscreen-mode) .nav-copy,
.app.sidebar-collapsed:not(.label-fullscreen-mode) .nav-section-label {
  display: none;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .nav button {
  justify-content: center;
  padding-left: 7px;
  padding-right: 7px;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .nav-home-row > [data-module="dashboard"] {
  justify-content: center;
  padding-left: 7px;
  padding-right: 7px;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .nav-home-row {
  padding-bottom: 36px;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .nav .sidebar-collapse-button {
  top: auto;
  bottom: 0;
  right: calc(50% - 16px);
  transform: none;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .sidebar-collapse-icon-close {
  display: none;
}

.app.sidebar-collapsed:not(.label-fullscreen-mode) .sidebar-collapse-icon-open {
  display: block;
}

.app:not(.label-fullscreen-mode) .nav-section-label {
  margin: 11px 0 3px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.app:not(.label-fullscreen-mode) .nav .nav-section-toggle {
  min-height: 30px;
  justify-content: space-between;
  padding: 5px 10px;
  border: 0;
  color: #7b8799;
  background: transparent;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .08em;
}

.app:not(.label-fullscreen-mode) .nav .nav-section-toggle:hover {
  color: var(--oms-ink);
  background: transparent;
}

.nav-section-items {
  display: grid;
  gap: 2px;
}

.nav-section.collapsed .nav-section-items {
  display: none;
}

.nav-section-chevron {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  transform: rotate(180deg);
  transition: transform .16s ease;
}

.nav-section-chevron svg,
.collapse-chevron svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app:not(.label-fullscreen-mode) details > summary {
  list-style: none;
}

.app:not(.label-fullscreen-mode) details > summary::-webkit-details-marker,
.app:not(.label-fullscreen-mode) details > summary::marker {
  display: none;
  content: "";
}

.nav-section.collapsed .nav-section-chevron {
  transform: rotate(0deg);
}

.collapse-chevron {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: grid;
  place-items: center;
  color: currentColor;
  transition: transform .16s ease;
}

details[open] > summary .collapse-chevron {
  transform: rotate(180deg);
}

.app:not(.label-fullscreen-mode) .nav button {
  width: 100%;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #526077;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.app:not(.label-fullscreen-mode) .nav button:hover {
  background: #f5f7fb;
  color: var(--oms-ink);
}

.app:not(.label-fullscreen-mode) .nav button.active {
  background: var(--oms-blue-soft);
  border-color: #dce8ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .nav .icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: currentColor;
  opacity: .9;
}

.app:not(.label-fullscreen-mode) .nav .icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app:not(.label-fullscreen-mode) .main {
  min-width: 0;
  isolation: isolate;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 76px;
  padding: 0 36px;
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid var(--oms-line);
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .topbar h1,
.app:not(.label-fullscreen-mode) .topbar .title {
  color: var(--oms-ink);
  font-size: 21px;
  letter-spacing: -.01em;
}

.app:not(.label-fullscreen-mode) .topbar p,
.app:not(.label-fullscreen-mode) .topbar .subtitle {
  color: var(--oms-muted);
}

.app:not(.label-fullscreen-mode) .topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-notification-menu {
  position: relative;
}

.topbar-notification-menu[open] {
  z-index: 2;
}

.topbar-notification-menu > summary {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #53627a;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.topbar-notification-menu > summary::-webkit-details-marker {
  display: none;
}

.topbar-notification-menu > summary:hover,
.topbar-notification-menu[open] > summary {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.topbar-notification-icon,
.topbar-notification-icon svg {
  width: 21px;
  height: 21px;
}

.topbar-notification-icon svg,
.topbar-notification-chevron svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar-notification-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--oms-notification);
  color: #fff;
  font-size: 10px;
  font-weight: var(--oms-weight-bold);
  line-height: 13px;
  text-align: center;
}

.topbar-notification-popover {
  position: absolute;
  z-index: 3;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100dvh - 92px);
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}

.topbar-notification-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 15px;
  border-bottom: 1px solid var(--oms-line);
}

.topbar-notification-heading strong {
  color: var(--oms-ink);
  font-size: 13px;
}

.topbar-notification-heading span {
  color: var(--oms-muted);
  font-size: 11px;
}

.topbar-notification-list {
  display: grid;
  max-height: min(320px, calc(100dvh - 150px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.topbar-notification-item {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 0;
  border-bottom: 1px solid var(--oms-line);
  background: transparent;
  color: var(--oms-ink);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.topbar-notification-item:last-child {
  border-bottom: 0;
}

.topbar-notification-item:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.topbar-notification-item strong {
  color: var(--oms-blue);
  font-size: 12px;
}

.topbar-notification-chevron,
.topbar-notification-chevron svg {
  width: 16px;
  height: 16px;
}

.topbar-notification-empty {
  padding: 26px 15px;
  color: var(--oms-muted);
  font-size: 12px;
  text-align: center;
}

.app:not(.label-fullscreen-mode) .content {
  position: relative;
  z-index: 0;
  padding: 30px 36px 24px;
}

.app:not(.label-fullscreen-mode) .panel,
.app:not(.label-fullscreen-mode) .card,
.app:not(.label-fullscreen-mode) .table-card {
  border-color: var(--oms-line);
  border-radius: var(--oms-radius);
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .btn,
.app:not(.label-fullscreen-mode) button.btn {
  border-radius: 7px;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) input,
.app:not(.label-fullscreen-mode) select,
.app:not(.label-fullscreen-mode) textarea {
  border-color: var(--oms-line-strong);
  border-radius: 7px;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) input:focus,
.app:not(.label-fullscreen-mode) select:focus,
.app:not(.label-fullscreen-mode) textarea:focus {
  border-color: #8fb2ff;
  box-shadow: 0 0 0 3px rgba(36, 99, 235, .09);
}

.app:not(.label-fullscreen-mode) table th {
  background: #f8fafc;
  color: #58667c;
  border-color: var(--oms-line);
  font-weight: 680;
}

.app:not(.label-fullscreen-mode) table td {
  border-color: var(--oms-line);
}

.dashboard-workspace {
  display: grid;
  grid-template-rows: max-content max-content max-content;
  align-content: start;
  gap: 28px;
  min-height: calc(100vh - 130px);
  min-width: 0;
  margin: 0;
  overflow: visible;
}

.dashboard-shortcuts {
  padding: 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-shortcut-group h3 {
  margin: 0;
  color: var(--oms-ink);
}

.dashboard-shortcut-groups {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(340px, 2fr);
  gap: 24px;
  margin-top: 0;
}

.dashboard-shortcut-group {
  min-width: 0;
}

.dashboard-shortcut-group h3 {
  margin-bottom: 14px;
  color: #758197;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.dashboard-action-rail {
  display: grid;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.dashboard-action-rail-create {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.dashboard-action-rail-tools {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
}

.dashboard-action {
  min-width: 0;
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: var(--oms-panel);
  color: var(--oms-ink);
  font-size: 14px;
  font-weight: 680;
  box-shadow: var(--oms-shadow);
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.dashboard-action:hover {
  border-color: #b8c9e8;
  background: #fbfdff;
  transform: translateY(-1px);
}

.dashboard-action.primary,
.dashboard-action.green {
  background: var(--oms-panel);
  color: var(--oms-ink);
  border-color: var(--oms-line);
}

.dashboard-action-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.dashboard-action.green .dashboard-action-icon {
  background: #ecf9f4;
  color: var(--oms-green);
}

.dashboard-action-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-action-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: left;
}

.dashboard-action-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  margin-left: auto;
  color: #74839a;
}

.dashboard-action-chevron svg,
.dashboard-view-all svg,
.dashboard-todo-chevron svg,
.dashboard-icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-action-copy strong {
  color: var(--oms-ink);
  font-size: 14px;
  font-weight: var(--oms-weight-bold);
}

.dashboard-action-copy small {
  color: var(--oms-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.dashboard-footer {
  position: static;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 0;
  padding-top: 16px;
  border-top: 1px solid #eef1f5;
  color: var(--oms-muted);
  font-size: 11px;
}

.dashboard-data-area {
  display: grid;
  grid-template-rows: max-content max-content;
  gap: 24px;
  min-width: 0;
  min-height: 0;
}

.dashboard-monthly-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  padding: 0;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
  overflow: hidden;
  visibility: visible;
  opacity: 1;
}

.dashboard-monthly-item {
  min-width: 0;
  min-height: 134px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 24px 30px;
  border: 0;
  border-right: 1px solid var(--oms-line);
  background: #fff;
  color: var(--oms-ink);
  text-align: left;
  cursor: pointer;
  visibility: visible;
  opacity: 1;
}

.dashboard-monthly-item:last-child {
  border-right: 0;
}

.dashboard-monthly-item:hover {
  background: #fbfdff;
}

.dashboard-monthly-item > span:first-child {
  display: block;
  color: var(--oms-text-secondary);
  font-size: 12px;
  font-weight: var(--oms-weight-regular);
}

.dashboard-monthly-item > strong {
  display: block;
  color: var(--oms-blue);
  font-size: clamp(24px, 2.25vw, 32px);
  font-weight: var(--oms-weight-bold);
  letter-spacing: -.025em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-monthly-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--oms-muted);
}

.dashboard-monthly-meta small {
  min-width: 0;
  font-size: 11px;
  font-weight: var(--oms-weight-regular);
  white-space: nowrap;
}

.dashboard-monthly-progress {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f8;
}

.dashboard-monthly-progress i {
  display: block;
  width: var(--dashboard-month-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--oms-blue);
}

.dashboard-operations-grid {
  --dashboard-operations-card-height: 340px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  min-height: var(--dashboard-operations-card-height);
  align-items: stretch;
}

.dashboard-todo-panel,
.dashboard-recent-panel {
  height: auto;
  min-height: var(--dashboard-operations-card-height);
}

.dashboard-todo-panel {
  min-width: 0;
  padding: 17px 18px 8px;
  border: 1px solid var(--oms-line);
  border-radius: var(--oms-radius);
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.dashboard-todo-list {
  margin-top: 13px;
}

.dashboard-todo-item {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border: 0;
  border-bottom: 1px solid var(--oms-line);
  background: transparent;
  color: var(--oms-ink);
  text-align: left;
  cursor: pointer;
}

.dashboard-todo-chevron {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #718096;
}

.dashboard-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 2px 6px 10px;
  border: 0;
  background: transparent;
  color: var(--oms-blue);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-view-all:hover {
  color: #174db3;
}

.dashboard-todo-item:last-child {
  border-bottom: 0;
}

.dashboard-todo-item:hover {
  color: var(--oms-blue);
  background: #fbfdff;
}

.dashboard-todo-index {
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
  font-weight: var(--oms-weight-medium);
  font-variant-numeric: tabular-nums;
}

.dashboard-todo-label {
  overflow: hidden;
  font-size: 12px;
  font-weight: var(--oms-weight-medium);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-todo-item strong {
  color: var(--oms-blue);
  font-size: 13px;
  font-weight: var(--oms-weight-bold);
  font-variant-numeric: tabular-nums;
}

.dashboard-section-heading,
.dashboard-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-section-heading h2,
.dashboard-panel-heading h3 {
  margin: 0;
  color: var(--oms-ink);
  font-size: 18px;
  line-height: 1.3;
}

.dashboard-panel-heading h3 {
  font-size: 16px;
}

.dashboard-section-heading span,
.dashboard-panel-heading span {
  display: block;
  margin-top: 4px;
  color: var(--oms-muted);
  font-size: 12px;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 12px;
  min-width: 0;
}

.dashboard-metric-card {
  min-width: 0;
  min-height: 172px;
  padding: 15px;
  border: 1px solid var(--oms-line);
  border-radius: var(--oms-radius);
  background: var(--oms-panel);
  box-shadow: var(--oms-shadow);
}

.dashboard-metric-card:hover {
  border-color: #cbd6e6;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
}

.dashboard-metric-card .dashboard-ring {
  width: 72px;
  height: 72px;
  margin: 10px auto 7px;
}

.dashboard-metric-card .dashboard-ring::before {
  inset: 9px;
}

.dashboard-metric-card .dashboard-ring-copy span {
  font-size: 11px;
}

.dashboard-metric-card .dashboard-ring-copy b {
  font-size: 15px;
}

.dashboard-recent-panel {
  min-width: 0;
  padding: 17px 18px 8px;
  border: 1px solid var(--oms-line);
  border-radius: var(--oms-radius);
  background: var(--oms-panel);
  box-shadow: var(--oms-shadow);
}

.dashboard-recent-table-wrap {
  min-width: 0;
  margin-top: 13px;
  overflow-x: auto;
  overflow-y: hidden;
}

.dashboard-recent-table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.dashboard-recent-table th,
.dashboard-recent-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--oms-line);
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.dashboard-recent-table .serial-col,
.dashboard-inventory-table .serial-col,
.dashboard-chain-table .serial-col,
.quote-item-table .serial-col,
.approval-center-table-wrap .serial-col {
  width: 48px;
  min-width: 48px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.dashboard-recent-table th {
  height: 34px;
  background: transparent;
  color: #788499;
  font-size: 11px;
}

.dashboard-recent-table td {
  height: 44px;
  color: #334158;
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-recent-table .dashboard-recent-actions {
  width: 52px;
  text-align: center;
}

.dashboard-icon-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
}

.dashboard-icon-button:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.dashboard-recent-table tbody tr:hover {
  background: #fafcff;
}

.dashboard-recent-table a {
  color: var(--oms-blue);
  font-weight: 680;
  text-decoration: none;
}

.dashboard-recent-table .num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.dashboard-recent-product {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.dashboard-recent-table .empty {
  padding: 32px 12px;
  color: var(--oms-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Business modules — shared blue/white workspace language
   Visual-only overrides: no business state, document data, PDF or print rules.
   -------------------------------------------------------------------------- */

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) {
  min-width: 0;
  animation: oms-module-in .18s ease-out;
}

@keyframes oms-module-in {
  from { opacity: .35; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) > .toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .toolbar-main {
  min-width: 240px;
  flex: 1 1 420px;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .toolbar-actions {
  flex: 0 1 auto;
  gap: 8px;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(.toolbar, .panel) .search,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(.toolbar, .panel) select {
  min-height: 40px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .toolbar .search {
  width: min(100%, 520px);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) > .panel,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) > .grid > .panel,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .settings-content > .panel,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .settings-content .settings-grid > .panel {
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .panel-head h2,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .panel-head h3 {
  color: var(--oms-ink);
  font-size: 16px;
  font-weight: 720;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .panel-body {
  padding: 20px;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .form-grid,
#modal:not(.large-workspace-modal) .form-grid,
#qr-modal:not(.large-workspace-modal) .form-grid {
  gap: 14px 16px;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .form-grid > label,
#modal:not(.large-workspace-modal) .form-grid > label,
#qr-modal:not(.large-workspace-modal) .form-grid > label {
  display: grid;
  align-content: start;
  gap: 7px;
  color: #526077;
  font-size: 11px;
  font-weight: 670;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(input, select, textarea),
#modal:not(.large-workspace-modal) :is(input, select, textarea),
#qr-modal:not(.large-workspace-modal) :is(input, select, textarea) {
  min-height: 40px;
  border: 1px solid var(--oms-line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--oms-ink);
  box-shadow: none;
}

#modal:not(.large-workspace-modal) .label-stage1-order-choice input[type="radio"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  box-shadow: none;
}

#modal:not(.large-workspace-modal):not(.label-order-picker-modal) .label-stage1-order-choice {
  min-height: 40px;
  padding-block: 4px;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) textarea,
#modal:not(.large-workspace-modal) textarea,
#qr-modal:not(.large-workspace-modal) textarea {
  min-height: 86px;
  padding-top: 10px;
  line-height: 1.55;
  resize: vertical;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(input, select, textarea):focus,
#modal:not(.large-workspace-modal) :is(input, select, textarea):focus,
#qr-modal:not(.large-workspace-modal) :is(input, select, textarea):focus {
  border-color: #8fb2ff;
  box-shadow: 0 0 0 3px rgba(36, 99, 235, .09);
  outline: 0;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(.notice, .note) {
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #5c6b82;
  line-height: 1.55;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(.notice.success, .note.success) {
  border-color: #cdeedf;
  background: #f0fbf6;
  color: #23795c;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(.empty, td.empty) {
  min-height: 180px;
  padding: 46px 20px;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
  text-align: center;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .line-items {
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 9px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .line-items > h3,
#modal:not(.large-workspace-modal) .line-items > h3,
#qr-modal:not(.large-workspace-modal) .line-items > h3 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--oms-line);
  color: var(--oms-ink);
  font-size: 14px;
  font-weight: var(--oms-weight-bold);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .line-items table {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table thead th,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .line-items thead th {
  height: 46px;
  padding: 10px 12px;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid var(--oms-line-strong);
  background: #f8fafc;
  color: #5d6b80;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table tbody td,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .line-items tbody td {
  min-height: 50px;
  padding: 12px;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid #e8edf4;
  background: #fff;
  color: #334158;
  font-size: 12px;
  vertical-align: middle;
}

/* The shared electronic-signature workspace is rendered in the modal root,
   outside the active module tree. Center both headers and saved-file rows so
   the homepage and delivery signature workspaces keep the same table rhythm. */
#modal:not(.large-workspace-modal) .sign-workspace-file-list :is(thead th, tbody td) {
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table tbody tr:last-child td {
  border-bottom-color: transparent;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table tbody tr:hover td {
  background: #f8fbff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table b {
  color: var(--oms-ink);
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .data-table .muted,
.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .product-sub {
  margin-top: 3px;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) :is(.table-scroll, .table-wrap, .sales-table-wrap) {
  min-width: 0;
  overflow: auto;
  scrollbar-color: #c8d2e1 transparent;
  scrollbar-width: thin;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn,
#modal:not(.large-workspace-modal) .btn,
#qr-modal:not(.large-workspace-modal) .btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--oms-line-strong);
  border-radius: 7px;
  background: #fff;
  color: #334158;
  font-size: 12px;
  font-weight: 670;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn:hover,
#modal:not(.large-workspace-modal) .btn:hover,
#qr-modal:not(.large-workspace-modal) .btn:hover {
  border-color: #b7c8e5;
  background: #f8fbff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn.primary,
#modal:not(.large-workspace-modal) .btn.primary,
#qr-modal:not(.large-workspace-modal) .btn.primary {
  border-color: var(--oms-blue);
  background: var(--oms-blue);
  color: #fff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn.primary:hover,
#modal:not(.large-workspace-modal) .btn.primary:hover,
#qr-modal:not(.large-workspace-modal) .btn.primary:hover {
  border-color: var(--oms-blue-deep);
  background: var(--oms-blue-deep);
  color: #fff;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn.green {
  border-color: #bcebdc;
  background: #ecf9f4;
  color: var(--oms-green);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn.red,
#modal:not(.large-workspace-modal) .btn.red {
  border-color: #f4cbd0;
  background: #fff8f8;
  color: var(--oms-danger);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .btn.compact {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-size: var(--oms-text-meta);
  font-weight: var(--oms-weight-medium);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.blue {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.green {
  background: var(--oms-green-soft);
  color: var(--oms-green);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.amber {
  background: var(--oms-warning-soft);
  color: var(--oms-warning);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.red {
  background: var(--oms-danger-soft);
  color: var(--oms-danger);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .table-pagination {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-top: 1px solid var(--oms-line);
  background: #fff;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .table-pagination button {
  min-width: 34px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--oms-line);
  border-radius: 6px;
  background: #fff;
  color: #64748b;
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .table-pagination button.active {
  border-color: var(--oms-blue);
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
  font-weight: var(--oms-weight-bold);
}

.app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .actions,
#modal:not(.large-workspace-modal) .actions,
#qr-modal:not(.large-workspace-modal) .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Sales, finance and statement workspaces */
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-list-head,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .sales-list-head {
  min-height: 58px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-title,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .sales-title {
  color: var(--oms-ink);
  font-size: 15px;
  font-weight: var(--oms-weight-bold);
}

.app:not(.label-fullscreen-mode) .finance-module-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) .finance-summary-item {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 22px 26px;
  border: 0;
  border-right: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) .finance-summary-item:last-child {
  border-right: 0;
}

.app:not(.label-fullscreen-mode) .finance-summary-item span {
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
  font-weight: var(--oms-weight-medium);
}

.app:not(.label-fullscreen-mode) .finance-summary-item strong {
  color: var(--oms-blue);
  font-size: 24px;
  font-weight: var(--oms-weight-bold);
  letter-spacing: -.02em;
}

.app:not(.label-fullscreen-mode) #module-statements > .grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-create-grid {
  gap: 14px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-editor-shell {
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers, #module-products) .product-main,
.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers, #module-products) .partner-table {
  min-width: 0;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers, #module-products) .product-main b {
  color: var(--oms-ink);
}

/* Product materials — focused table with contextual detail rail */
.app:not(.label-fullscreen-mode) #module-products.active {
  height: calc(100dvh - 106px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  padding-right: 0;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-products .product-page-toolbar {
  position: relative;
  z-index: 8;
  min-height: 66px;
  margin: -2px 0 0;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--oms-line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) #module-products .product-filter-bar {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(190px, 250px) minmax(280px, 1fr);
  gap: 12px;
  width: min(900px, 100%);
}

.app:not(.label-fullscreen-mode) #module-products #product-type-filter,
.app:not(.label-fullscreen-mode) #module-products #product-customer-filter,
.app:not(.label-fullscreen-mode) #module-products .product-search-field,
.app:not(.label-fullscreen-mode) #module-products .product-search-field .search {
  width: 100%;
  height: 38px;
  min-height: 38px;
}

.app:not(.label-fullscreen-mode) #module-products #product-type-filter,
.app:not(.label-fullscreen-mode) #module-products #product-customer-filter,
.app:not(.label-fullscreen-mode) #module-products .product-search-field .search {
  border: 1px solid var(--oms-line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--oms-ink);
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) #module-products .product-search-field {
  display: block;
}

.app:not(.label-fullscreen-mode) #module-products .product-search-field .search {
  padding: 0 14px 0 44px;
}

.app:not(.label-fullscreen-mode) #module-products .product-toolbar-actions {
  gap: 10px;
}

.app:not(.label-fullscreen-mode) #module-products .product-action-menu {
  position: relative;
}

.app:not(.label-fullscreen-mode) #module-products .product-action-menu > summary {
  list-style: none;
  min-width: 104px;
  height: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-products .product-action-menu > summary::-webkit-details-marker {
  display: none;
}

.app:not(.label-fullscreen-mode) #module-products .product-action-menu > summary span,
.app:not(.label-fullscreen-mode) #module-products .product-action-menu > summary svg {
  width: 14px;
  height: 14px;
}

.app:not(.label-fullscreen-mode) #module-products .product-create-primary {
  min-width: 112px;
  height: 38px;
  min-height: 38px;
}

.app:not(.label-fullscreen-mode) #module-products .product-action-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 142px;
  padding: 6px;
  border: 1px solid var(--oms-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(39, 62, 99, .16);
}

.app:not(.label-fullscreen-mode) #module-products .product-action-popover button {
  width: 100%;
  min-height: var(--oms-menu-item-height);
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #40506a;
  font-size: var(--oms-menu-item-font-size);
  font-weight: var(--oms-menu-item-font-weight);
  line-height: 1.3;
  text-align: left;
}

.app:not(.label-fullscreen-mode) #module-products .product-action-popover button:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-products .product-workspace {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  min-height: 0;
  height: auto;
  background: #fff;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-products .product-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) #module-products .product-list-panel {
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-products #products-table {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) #module-products .table-panel {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.app:not(.label-fullscreen-mode) #module-products .table-scroll {
  min-height: 0;
  max-height: none;
  border: 0;
  overflow: auto;
}

.app:not(.label-fullscreen-mode) #module-products .product-table {
  width: 100%;
  min-width: 1493px;
  border: 0;
  table-layout: fixed;
}

.app:not(.label-fullscreen-mode) #module-products .product-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid var(--oms-line);
  background: #fbfcfe;
  color: #36445c;
  font-size: 11px !important;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.app:not(.label-fullscreen-mode) #module-products .product-table th,
.app:not(.label-fullscreen-mode) #module-products .product-table td,
.app:not(.label-fullscreen-mode) #module-products .product-table td.num,
.app:not(.label-fullscreen-mode) #module-products .product-table .product-name-cell,
.app:not(.label-fullscreen-mode) #module-products .product-table .product-row-actions {
  text-align: center !important;
  vertical-align: middle !important;
}

.app:not(.label-fullscreen-mode) #module-products .product-table td {
  height: 54px;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--oms-line);
  color: #40506a;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-products .product-table .product-action-sticky {
  position: sticky;
  right: 0;
  z-index: 5;
  background: #fff;
  background-clip: padding-box;
  box-shadow: -2px 0 5px rgb(31 45 70 / 10%);
}

.app:not(.label-fullscreen-mode) #module-products .product-table thead .product-action-sticky {
  z-index: 8;
  background: #fbfcfe;
}

.app:not(.label-fullscreen-mode) #module-products .product-table .product-spec-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-products .product-table .product-customer-cell {
  color: #596984;
}

.app:not(.label-fullscreen-mode) #module-products .product-row {
  cursor: pointer;
  transition: background-color .16s ease;
}

.app:not(.label-fullscreen-mode) #module-products .product-row:hover td {
  background: #f8fbff;
}

.app:not(.label-fullscreen-mode) #module-products .product-row.selected td {
  background: #eef5ff;
}

.app:not(.label-fullscreen-mode) #module-products .product-row.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-products .product-name-cell {
  color: var(--oms-ink);
  font-weight: var(--oms-weight-medium);
}

.app:not(.label-fullscreen-mode) #module-products .product-type-pill,
.app:not(.label-fullscreen-mode) #module-products .product-status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: var(--oms-text-meta);
  font-weight: var(--oms-weight-medium);
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-products .product-type-pill.base {
  background: #eaf3ff;
  color: #1670df;
}

.app:not(.label-fullscreen-mode) #module-products .product-type-pill.customer,
.app:not(.label-fullscreen-mode) #module-products .product-status-pill.enabled {
  background: var(--oms-green-soft);
  color: var(--oms-green);
}

.app:not(.label-fullscreen-mode) #module-products .product-type-pill.customer {
  background: #f1ecff;
  color: #7247c7;
}

.app:not(.label-fullscreen-mode) #module-products .product-status-pill.disabled {
  background: #f2f4f7;
  color: #7a879b;
}

.app:not(.label-fullscreen-mode) #module-products .product-row-actions {
  overflow: visible;
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-products .product-row-menu-trigger {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5d6b81;
  cursor: pointer;
  margin: 0 auto;
}

.app:not(.label-fullscreen-mode) #module-products .product-row-menu-trigger:hover,
.app:not(.label-fullscreen-mode) #module-products .product-row-menu-trigger[aria-expanded="true"] {
  background: #e8f1ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-products .product-row-menu-trigger:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 2px;
}

.app:not(.label-fullscreen-mode) #module-products .product-row-menu-trigger svg {
  width: 18px;
  height: 18px;
}

.product-row-action-popover[hidden] {
  display: none !important;
}

.product-row-action-popover {
  position: fixed;
  z-index: 2600;
  width: 112px;
  padding: 6px;
  border: 1px solid var(--oms-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.product-row-action-popover button {
  width: 100%;
  min-height: var(--oms-menu-item-height);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #42516a;
  font-size: var(--oms-menu-item-font-size);
  font-weight: var(--oms-menu-item-font-weight);
  line-height: 1.3;
  text-align: left;
  padding: 0 10px;
  cursor: pointer;
}

.product-row-action-popover button:hover,
.product-row-action-popover button:focus-visible {
  background: var(--oms-blue-soft);
  outline: none;
}

.product-row-action-popover button.danger {
  color: #d04444;
}

.app:not(.label-fullscreen-mode) #module-products .table-pagination {
  align-self: end;
  position: relative;
  z-index: 4;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border-top: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-panel {
  min-width: 0;
  border-left: 1px solid var(--oms-line);
  background: #fff;
  overflow: auto;
}

.app:not(.label-fullscreen-mode) #module-products .product-workspace.details-closed .product-details-panel {
  display: none;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-head {
  min-height: 70px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) #module-products .product-details-head strong,
.app:not(.label-fullscreen-mode) #module-products .product-details-head span {
  display: block;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-head strong {
  color: var(--oms-ink);
  font-size: 12px;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-head span {
  margin-top: 4px;
  color: #7c889b;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-head button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6f7d92;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-head button:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-products .product-details-section {
  padding: 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) #module-products .product-details-section h3 {
  margin: 0 0 12px;
  color: var(--oms-ink);
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-section dl,
.app:not(.label-fullscreen-mode) #module-products .product-details-accordion dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-section dl > div,
.app:not(.label-fullscreen-mode) #module-products .product-details-accordion dl > div,
.app:not(.label-fullscreen-mode) #module-products .product-detail-static {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-section dt,
.app:not(.label-fullscreen-mode) #module-products .product-detail-static span,
.app:not(.label-fullscreen-mode) #module-products .product-details-accordion dt {
  color: #7b889c;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-section dd,
.app:not(.label-fullscreen-mode) #module-products .product-detail-static b,
.app:not(.label-fullscreen-mode) #module-products .product-details-accordion dd {
  margin: 0;
  color: #40506a;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}

.app:not(.label-fullscreen-mode) #module-products .product-detail-link,
.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion > summary {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #53627a;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion > summary {
  list-style: none;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion > summary::-webkit-details-marker {
  display: none;
}

.app:not(.label-fullscreen-mode) #module-products .product-detail-link > span,
.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion > summary > span {
  color: #53627a;
}

.app:not(.label-fullscreen-mode) #module-products .product-detail-link > b,
.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion > summary > b {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--oms-blue);
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) #module-products .product-detail-link > b svg,
.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion > summary svg,
.app:not(.label-fullscreen-mode) #module-products .product-details-accordion svg {
  width: 13px;
  height: 13px;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion + .product-mapping-accordion {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid #edf1f6;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion ul {
  display: grid;
  gap: 0;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li {
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #e8edf4;
  border-radius: 7px;
  background: #f8fafc;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li + li {
  margin-top: 6px;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li :is(strong, span, b) {
  color: #52617a;
  font-size: 10px;
  line-height: 1.4;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li strong {
  color: #26354d;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li b {
  text-align: right;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li b.enabled {
  color: #16914c;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li b.disabled {
  color: #8b96a8;
}

.app:not(.label-fullscreen-mode) #module-products .product-mapping-accordion li.product-mapping-empty {
  display: block;
  color: #8a96a8;
  line-height: 1.55;
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-accordion {
  padding: 0 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) #module-products .product-details-accordion > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: var(--oms-ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-accordion > summary::-webkit-details-marker {
  display: none;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-accordion dl,
.app:not(.label-fullscreen-mode) #module-products .product-details-accordion p {
  margin: 0 0 14px;
}

.app:not(.label-fullscreen-mode) #module-products .product-details-accordion p {
  color: #68768b;
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode) #module-products .product-workspace {
    grid-template-columns: minmax(0, 1fr) 238px;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-filter-bar {
    grid-template-columns: minmax(130px, 160px) minmax(170px, 210px) minmax(220px, 1fr);
  }
}

/* Sales-order editor: keep the seven visible business columns readable and aligned. */
#modal:not(.large-workspace-modal) .sales-detail-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

#modal:not(.large-workspace-modal) .sales-detail-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(1) { width: 28%; }
#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(2) { width: 12%; }
#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(3) { width: 9%; }
#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(4) { width: 10%; }
#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(5) { width: 14%; }
#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(6) { width: 15%; }
#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td):nth-child(7) { width: 12%; }

#modal:not(.large-workspace-modal) .sales-detail-table :is(th, td) {
  height: 48px;
  padding: 6px;
  text-align: center;
  vertical-align: middle;
}

#modal:not(.large-workspace-modal) .sales-detail-table th {
  white-space: nowrap;
}

#modal:not(.large-workspace-modal) .sales-detail-table td :is(input, select) {
  width: 100%;
  min-width: 0 !important;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
}

#modal:not(.large-workspace-modal) .sales-detail-table .sales-amount,
#modal:not(.large-workspace-modal) .sales-detail-table .sales-line-action {
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

#modal:not(.large-workspace-modal) .sales-detail-table .sales-line-action .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

@media (max-width: 920px) {
  .app:not(.label-fullscreen-mode) #module-products {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-page-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-filter-bar {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-search-field {
    grid-column: 1 / -1;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-toolbar-actions {
    justify-content: flex-end;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-workspace {
    grid-template-columns: minmax(0, 1fr);
    min-height: 560px;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: min(310px, 88vw);
    box-shadow: -14px 0 32px rgba(42, 62, 94, .14);
  }
}

/* Shared full-height list workspaces */
.app:not(.label-fullscreen-mode) .module.active:is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders,
  #module-invoices,
  #module-payments
) {
  height: calc(100dvh - 106px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) .module.active:is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders
) > .oms-list-toolbar {
  flex: 0 0 auto;
}

.app:not(.label-fullscreen-mode) .module.active:is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders,
  #module-invoices,
  #module-payments
) > .oms-list-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) > .oms-list-panel > div,
.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) > .oms-list-panel .table-panel,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-deliveries) > .oms-list-panel > .table-panel,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) > .oms-list-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) .module.active:is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-invoices,
  #module-payments
) .table-scroll,
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-list-panel {
  min-height: 0;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-list-footer {
  flex: 0 0 58px;
  min-height: 58px;
  margin-top: auto;
  border-top: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) :is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-invoices,
  #module-payments
) .table-pagination {
  flex: 0 0 58px;
  margin-top: auto;
}

.app:not(.label-fullscreen-mode) :is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders,
  #module-invoices,
  #module-payments
) .data-table thead th {
  height: 42px !important;
  padding: 8px 10px !important;
  white-space: nowrap;
  font-size: 11px !important;
  line-height: 1.2;
}

.app:not(.label-fullscreen-mode) .module.active:is(
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders,
  #module-invoices,
  #module-payments
) .data-table tbody td {
  height: 48px;
  padding: 9px 10px;
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-module-summary {
  flex: 0 0 auto;
}

.app:not(.label-fullscreen-mode) #module-statements {
  min-height: calc(100dvh - 106px);
}

.app:not(.label-fullscreen-mode) #module-statements > .grid > .panel:last-child .table-wrap,
.app:not(.label-fullscreen-mode) #module-statements #statement-history-table > .table-panel {
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) #module-statements #statement-history-table .table-pagination {
  margin-top: auto;
}

/* Customer statements — quote-style list, filters and on-demand detail rail. */
.app:not(.label-fullscreen-mode) #module-statements.active {
  height: calc(100dvh - 136px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--oms-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 52, 85, .035);
}

.app:not(.label-fullscreen-mode) #module-statements .statement-search-wrap {
  position: relative;
  flex: 1 1 360px;
  max-width: 520px;
  min-width: 220px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-search-wrap svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #7b879d;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.app:not(.label-fullscreen-mode) #module-statements .statement-search-wrap input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border-radius: 10px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--oms-muted);
}

.app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls > .oms-date-field,
.app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls > select {
  flex: 0 0 132px;
  width: 132px;
  height: 44px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls > .oms-date-field > input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 42px 0 10px !important;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls > select {
  padding: 0 10px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls > .oms-date-field > .oms-date-trigger {
  right: 7px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-toolbar .toolbar-actions {
  margin-left: auto;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-toolbar .quote-create-button {
  min-width: 132px;
  height: 44px;
}

.app:not(.label-fullscreen-mode) #statement-workspace-root {
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace {
  min-height: 0;
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1fr) 350px;
}

.app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace.details-closed .statement-details-panel {
  display: none;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-list-panel {
  min-width: 0;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-list-panel > .table-panel {
  height: auto;
  min-height: 0;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-list-panel .table-scroll {
  min-height: 0;
  flex: 1 1 0;
  overflow: auto;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-list-panel .table-pagination {
  flex: 0 0 auto;
  margin-top: auto;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(1) { width: 56px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(2) { width: 132px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(3) { width: 146px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(4) { width: 178px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(5),
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(6),
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(7) { width: 104px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(8) { width: 104px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(9) { width: 98px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-table th:nth-child(10) { width: 54px; }

.app:not(.label-fullscreen-mode) #module-statements .statement-table :is(th, td) {
  height: 52px;
  padding: 9px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table tbody tr {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table tbody tr:hover,
.app:not(.label-fullscreen-mode) #module-statements .statement-table tbody tr.selected {
  background: #f2f7ff;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table .quote-row-menu-trigger {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #5d6b81;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table .quote-row-menu-trigger:hover,
.app:not(.label-fullscreen-mode) #module-statements .statement-table .quote-row-menu-trigger[aria-expanded="true"] {
  color: var(--oms-blue);
  background: #e8f1ff;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table .quote-row-menu-trigger:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 2px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-table .quote-row-menu-trigger svg {
  width: 14px;
  height: 14px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-details-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-details-head {
  flex: 0 0 auto;
  min-height: 70px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) #module-statements .quote-details-identity :is(strong, span) { display: block; }
.app:not(.label-fullscreen-mode) #module-statements .quote-details-identity strong { color: var(--oms-ink); font-size: 12px; line-height: 1.45; }
.app:not(.label-fullscreen-mode) #module-statements .quote-details-identity span { margin-top: 4px; color: var(--oms-blue); font-size: 10px; font-weight: 700; }

.app:not(.label-fullscreen-mode) #module-statements .quote-details-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #65738a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-statements .quote-details-close:hover { background: var(--oms-blue-soft); color: var(--oms-blue); }

.app:not(.label-fullscreen-mode) #module-statements .statement-details-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.app:not(.label-fullscreen-mode) #module-statements .quote-detail-section {
  padding: 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) #module-statements .quote-detail-section h3 {
  margin: 0 0 14px;
  color: var(--oms-ink);
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) #module-statements .quote-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.app:not(.label-fullscreen-mode) #module-statements .quote-detail-title-row h3 { margin-bottom: 0; }
.app:not(.label-fullscreen-mode) #module-statements .quote-detail-list { display: grid; gap: 10px; margin: 14px 0 0; }
.app:not(.label-fullscreen-mode) #module-statements .quote-detail-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.app:not(.label-fullscreen-mode) #module-statements .quote-detail-list :is(dt, dd) { margin: 0; font-size: 10px; line-height: 1.5; }
.app:not(.label-fullscreen-mode) #module-statements .quote-detail-list dt { color: var(--oms-muted); }
.app:not(.label-fullscreen-mode) #module-statements .quote-detail-list dd { max-width: 190px; color: #34445e; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.app:not(.label-fullscreen-mode) #module-statements .quote-approval-heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-print-preview-button { min-width: 80px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-workflow-section .quote-detail-title-row { align-items: flex-start; margin-bottom: 14px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-workflow-section .quote-detail-title-row h3 { flex: 0 0 auto; padding-top: 5px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-workflow-section .quote-approval-heading-actions { max-width: 235px; }

.app:not(.label-fullscreen-mode) #module-statements .quote-item-table-wrap { overflow-x: auto; }
.app:not(.label-fullscreen-mode) #module-statements .quote-item-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 10px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-item-table :is(th, td) { padding: 8px 5px; border-bottom: 1px solid #edf1f6; color: #45536a; text-align: right; }
.app:not(.label-fullscreen-mode) #module-statements .quote-item-table thead th { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.app:not(.label-fullscreen-mode) #module-statements .quote-item-table tbody td { white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.app:not(.label-fullscreen-mode) #module-statements .quote-item-table :is(th, td):first-child { text-align: left; }
.app:not(.label-fullscreen-mode) #module-statements .quote-total-list { display: grid; gap: 8px; margin-top: 14px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-total-list > div { display: flex; justify-content: space-between; gap: 12px; color: #6f7d92; font-size: 12px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-total-list b { color: #34445e; }
.app:not(.label-fullscreen-mode) #module-statements .quote-total-list .grand-total { padding-top: 8px; border-top: 1px solid var(--oms-line); color: var(--oms-ink); font-weight: 700; }
.app:not(.label-fullscreen-mode) #module-statements .quote-total-list .grand-total b { color: var(--oms-blue); font-size: 18px; }

.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline li { position: relative; min-height: 52px; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 9px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline li:not(:last-child)::after { content: ""; position: absolute; top: 12px; bottom: -1px; left: 5px; width: 1px; background: #dbe3ef; }
.app:not(.label-fullscreen-mode) #module-statements .timeline-dot { width: 11px; height: 11px; margin-top: 2px; border: 2px solid #c4cede; border-radius: 50%; background: #fff; z-index: 1; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline li.complete .timeline-dot,
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline li.active .timeline-dot { border-color: var(--oms-blue); }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline li.complete .timeline-dot { background: var(--oms-blue); }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline :is(b, small) { display: block; line-height: 1.45; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline b { color: #35445d; font-size: 10px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline li.active b { color: var(--oms-blue); }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-timeline small { margin-top: 3px; color: #8a96a8; font-size: 10px; }

.app:not(.label-fullscreen-mode) #module-statements .quote-approval-records { padding: 16px; border-bottom: 1px solid var(--oms-line); }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-records summary { min-height: 32px; display: flex; align-items: center; justify-content: space-between; list-style: none; color: var(--oms-ink); font-size: 11px; font-weight: 700; cursor: pointer; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-records summary::-webkit-details-marker { display: none; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-records summary svg { width: 13px; height: 13px; transition: transform .16s ease; }
.app:not(.label-fullscreen-mode) #module-statements .quote-approval-records[open] summary svg { transform: rotate(180deg); }
.app:not(.label-fullscreen-mode) #module-statements .quote-record-list { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.app:not(.label-fullscreen-mode) #module-statements .quote-record-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; color: #53617a; font-size: 11px; }
.app:not(.label-fullscreen-mode) #module-statements .quote-record-list time { grid-column: 1 / -1; color: #8a96a8; }

.app:not(.label-fullscreen-mode) #module-statements .statement-amount-summary > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-amount-summary span {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 7px;
  background: #f7faff;
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-amount-summary small { color: var(--oms-muted); font-size: 9px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-amount-summary b { color: var(--oms-blue); font-size: 12px; }

.app:not(.label-fullscreen-mode) #module-statements .statement-related-table { overflow-x: auto; }
.app:not(.label-fullscreen-mode) #module-statements .statement-related-table table { width: 100%; min-width: 330px; font-size: 10px; table-layout: fixed; }
.app:not(.label-fullscreen-mode) #module-statements .statement-related-table :is(th, td) { padding: 8px 6px; text-align: center; vertical-align: middle; }

.app:not(.label-fullscreen-mode) #module-statements .statement-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline li { position: relative; min-height: 52px; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline li > span { width: 10px; height: 10px; margin-top: 3px; border: 2px solid #c8d2e2; border-radius: 50%; background: #fff; }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline li:not(:last-child)::after { content: ""; position: absolute; top: 13px; bottom: 0; left: 4px; width: 2px; background: #dbe5f4; }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline li.complete > span,
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline li.active > span { border-color: var(--oms-blue); background: var(--oms-blue); }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline b,
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline small { display: block; }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline b { color: var(--oms-ink); font-size: 11px; }
.app:not(.label-fullscreen-mode) #module-statements .statement-timeline small { margin-top: 4px; color: var(--oms-muted); font-size: 9px; }

.app:not(.label-fullscreen-mode) #module-statements .statement-detail-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-statements .statement-detail-actions .btn { min-width: 0; padding-left: 8px; padding-right: 8px; }

.statement-create-modal { display: grid; gap: 16px; }
.statement-create-modal .statement-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.statement-create-modal .span-2 { grid-column: 1 / -1; }
.statement-order-picker { max-height: 360px; overflow: auto; border: 1px solid var(--oms-line); border-radius: 9px; }
.statement-picker-heading { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--oms-line); background: #fff; }
.statement-picker-heading span { color: var(--oms-blue); font-size: 12px; font-weight: 700; }
.statement-order-picker .line-items { margin: 0; }
.statement-order-picker table { width: 100%; }
.statement-order-picker :is(th, td) { text-align: center; vertical-align: middle; }
.statement-order-picker input[type="checkbox"] { width: 16px; height: 16px; }

@media (max-width: 1280px) {
  .app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace { grid-template-columns: minmax(0, 1fr) 310px; }
}

@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode) #module-statements .statement-toolbar { flex-wrap: wrap; }
  .app:not(.label-fullscreen-mode) #module-statements .statement-search-wrap { max-width: none; flex-basis: 100%; }
  .app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls { flex: 1 1 auto; }
  .app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace { grid-template-columns: minmax(0, 1fr) 310px; }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) #module-statements.active { height: auto; overflow: visible; }
  .app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls { width: 100%; flex-wrap: wrap; }
  .app:not(.label-fullscreen-mode) #module-statements .statement-filter-controls > :is(.oms-date-field, select) { flex: 1 1 180px; width: auto; }
  .app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace { display: block; min-height: 620px; overflow: visible; }
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel { position: fixed; z-index: 45; top: 72px; right: 0; bottom: 0; width: min(350px, 92vw); border-left: 1px solid var(--oms-line); box-shadow: -14px 0 32px rgba(42, 62, 94, .14); }
  .statement-create-modal .statement-create-grid { grid-template-columns: 1fr; }
  .statement-create-modal .span-2 { grid-column: auto; }
}

/* Targets and settings */
.app:not(.label-fullscreen-mode) .oms-targets-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
}

.app:not(.label-fullscreen-mode) .oms-targets-main,
.app:not(.label-fullscreen-mode) .oms-targets-summary {
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .oms-targets-main {
  min-width: 0;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) .oms-targets-head {
  align-items: center;
}

.app:not(.label-fullscreen-mode) .oms-targets-head p {
  margin: 5px 0 0;
}

.app:not(.label-fullscreen-mode) .oms-target-year-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.app:not(.label-fullscreen-mode) .oms-target-year-switch strong {
  min-width: 72px;
  color: var(--oms-ink);
  font-size: 14px;
  text-align: center;
}

.app:not(.label-fullscreen-mode) .oms-target-year-switch .btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  font-size: 20px;
}

.app:not(.label-fullscreen-mode) .oms-target-table-wrap {
  min-width: 0;
  max-height: calc(100vh - 232px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.app:not(.label-fullscreen-mode) .oms-target-table {
  min-width: 990px;
  margin: 0;
  table-layout: fixed;
}

.app:not(.label-fullscreen-mode) .oms-target-table :is(th, td) {
  height: 54px;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) .oms-target-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 48px;
  background: #f7f9fc;
  color: var(--oms-text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) .oms-target-table thead th:first-child,
.app:not(.label-fullscreen-mode) .oms-target-table tbody td:first-child,
.app:not(.label-fullscreen-mode) .oms-target-table tfoot th:first-child {
  width: 84px;
}

.app:not(.label-fullscreen-mode) .oms-target-table tbody tr.current td {
  background: #f5f9ff;
}

.app:not(.label-fullscreen-mode) .oms-target-table tbody td:first-child strong {
  color: var(--oms-ink);
  font-size: 13px;
}

.app:not(.label-fullscreen-mode) .oms-target-table tbody td:first-child small {
  display: block;
  margin-top: 3px;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .oms-target-amount-cell {
  display: grid;
  grid-template-columns: 14px minmax(72px, 1fr) 18px;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--oms-muted);
}

.app:not(.label-fullscreen-mode) .oms-target-amount-cell input {
  width: 100%;
  min-width: 0;
  height: 34px;
  min-height: 34px !important;
  padding: 5px 7px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.app:not(.label-fullscreen-mode) .oms-target-amount-cell em {
  font-size: 11px;
  font-style: normal;
}

.app:not(.label-fullscreen-mode) .oms-target-table td.num,
.app:not(.label-fullscreen-mode) .oms-target-table tfoot :is(th, td) {
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.app:not(.label-fullscreen-mode) .oms-target-table tfoot :is(th, td) {
  height: 50px;
  border-top: 1px solid var(--oms-line-strong);
  background: #fbfcfe;
  color: var(--oms-ink);
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) .oms-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.app:not(.label-fullscreen-mode) .oms-target-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--oms-line);
  border-radius: 9px;
  background: #fbfdff;
}

.app:not(.label-fullscreen-mode) .oms-target-card label {
  color: var(--oms-ink);
  font-size: 13px;
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) .oms-target-card-period {
  color: var(--oms-blue);
  font-size: 11px;
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) .oms-target-card input {
  width: 100%;
  min-width: 0;
}

.app:not(.label-fullscreen-mode) .oms-target-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) .oms-targets-summary {
  position: sticky;
  top: 0;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) .oms-targets-summary h3 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid var(--oms-line);
  color: var(--oms-ink);
  font-size: 15px;
}

.app:not(.label-fullscreen-mode) .oms-target-year-summary {
  padding: 0 !important;
}

.app:not(.label-fullscreen-mode) .oms-target-year-item {
  display: grid;
  gap: 5px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) .oms-target-year-item span,
.app:not(.label-fullscreen-mode) .oms-target-year-item small {
  color: var(--oms-muted);
}

.app:not(.label-fullscreen-mode) .oms-target-year-item strong {
  color: var(--oms-blue);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.app:not(.label-fullscreen-mode) .oms-target-year-summary > p {
  margin: 0;
  padding: 15px 18px;
  color: var(--oms-muted);
  font-size: 11px;
  line-height: 1.65;
}

.app:not(.label-fullscreen-mode) .oms-target-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) .oms-target-summary-item:last-child {
  border-bottom: 0;
}

.app:not(.label-fullscreen-mode) .oms-target-summary-item span {
  color: var(--oms-muted);
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) .oms-target-summary-item strong {
  color: var(--oms-blue);
  font-size: 14px;
}

.app:not(.label-fullscreen-mode) .settings-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
}

.app:not(.label-fullscreen-mode) .settings-side {
  position: sticky;
  top: 0;
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .settings-tab {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #58667c;
  font-size: 12px;
  font-weight: 630;
  text-align: left;
}

.app:not(.label-fullscreen-mode) .settings-tab:hover {
  background: #f8fafc;
  color: var(--oms-ink);
}

.app:not(.label-fullscreen-mode) .settings-tab.active {
  border-color: #dce8ff;
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .settings-content,
.app:not(.label-fullscreen-mode) .settings-grid {
  min-width: 0;
}

.app:not(.label-fullscreen-mode) .settings-context {
  position: sticky;
  top: 0;
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .settings-context > * {
  padding: 16px 18px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) .settings-context > *:last-child {
  border-bottom: 0;
}

.app:not(.label-fullscreen-mode) .settings-context-head {
  display: flex;
  align-items: center;
  min-width: 0;
}

.app:not(.label-fullscreen-mode) .settings-context-identity {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  min-width: 0;
  column-gap: 8px;
  row-gap: 2px;
}

.app:not(.label-fullscreen-mode) .settings-context-identity strong {
  color: var(--oms-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.65;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) .settings-context-identity span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app:not(.label-fullscreen-mode) .settings-context dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.app:not(.label-fullscreen-mode) .settings-context dl > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  min-height: 22px;
  column-gap: 18px;
}

.app:not(.label-fullscreen-mode) .settings-context dt,
.app:not(.label-fullscreen-mode) .settings-context dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.app:not(.label-fullscreen-mode) .settings-context dt {
  color: var(--oms-muted);
}

.app:not(.label-fullscreen-mode) .settings-context dd {
  min-width: 0;
  color: var(--oms-ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.app:not(.label-fullscreen-mode) .settings-context h3,
.app:not(.label-fullscreen-mode) .settings-context h4 {
  margin: 0 0 10px;
  color: var(--oms-ink);
  font-size: 14px;
}

.app:not(.label-fullscreen-mode) .settings-context p,
.app:not(.label-fullscreen-mode) .settings-context span {
  margin: 0;
  color: var(--oms-muted);
  font-size: 12px;
  line-height: 1.65;
}

/* Standard edit dialogs only. Full-screen label and QR workspaces stay isolated. */
#modal:not(.large-workspace-modal),
#qr-modal:not(.large-workspace-modal) {
  padding: 28px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(2px);
}

#modal:not(.large-workspace-modal) .modal-card,
#qr-modal:not(.large-workspace-modal) .modal-card {
  max-height: calc(100vh - 56px);
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .18);
}

#modal:not(.large-workspace-modal) .modal-card > .panel-head,
#qr-modal:not(.large-workspace-modal) .modal-card > .panel-head {
  min-height: 64px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--oms-line);
  background: #fff;
}

#modal:not(.large-workspace-modal) .modal-card > .panel-head h2,
#qr-modal:not(.large-workspace-modal) .modal-card > .panel-head h2 {
  color: var(--oms-ink);
  font-size: 18px;
  font-weight: 730;
}

#modal:not(.large-workspace-modal) .modal-card > .panel-body,
#qr-modal:not(.large-workspace-modal) .modal-card > .panel-body {
  max-height: calc(100vh - 122px);
  overflow: auto;
  padding: 20px;
  background: #fff;
}

#modal:not(.large-workspace-modal) label,
#qr-modal:not(.large-workspace-modal) label {
  color: #526077;
  font-size: 11px;
  font-weight: 670;
}

#modal:not(.large-workspace-modal) :is(input, select, textarea),
#qr-modal:not(.large-workspace-modal) :is(input, select, textarea) {
  min-height: 40px;
  border: 1px solid var(--oms-line-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--oms-ink);
  box-shadow: none;
}

#modal:not(.large-workspace-modal) :is(input, select, textarea):focus,
#qr-modal:not(.large-workspace-modal) :is(input, select, textarea):focus {
  border-color: #8fb2ff;
  box-shadow: 0 0 0 3px rgba(36, 99, 235, .09);
  outline: 0;
}

#modal:not(.large-workspace-modal) .modal-actions,
#qr-modal:not(.large-workspace-modal) .modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--oms-line);
  background: #fbfcfe;
}

@media (max-width: 1100px) {
  .app:not(.label-fullscreen-mode) .oms-target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app:not(.label-fullscreen-mode) .oms-targets-workspace {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .settings-context {
    position: static;
    grid-column: 2;
  }
}

/* Cross-display stability layer.
   Keep the desktop information architecture at common Windows/macOS scaling
   levels, then progressively turn master-detail workspaces into drawers. */
.app:not(.label-fullscreen-mode),
.app:not(.label-fullscreen-mode) .main,
.app:not(.label-fullscreen-mode) .content,
.app:not(.label-fullscreen-mode) .module,
.app:not(.label-fullscreen-mode) :is(.table-panel, .table-scroll, .oms-list-panel) {
  min-width: 0;
}

.app:not(.label-fullscreen-mode) :is(.table-scroll, .label-template-table-scroll) {
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#modal .modal-card,
#qr-modal .modal-card {
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
}

@media (max-width: 1180px) {
  /* Preserve a compact vertical navigation instead of moving the complete
     navigation above the page at zoomed desktop widths. */
  .app:not(.label-fullscreen-mode),
  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    padding-inline: 9px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app:not(.label-fullscreen-mode) .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .app:not(.label-fullscreen-mode) :is(.brand-copy, .nav-copy, .nav-section-label) {
    display: none;
  }

  .app:not(.label-fullscreen-mode) .nav {
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .app:not(.label-fullscreen-mode) .nav button {
    justify-content: center;
    padding-inline: 7px;
  }

  .app:not(.label-fullscreen-mode) .sidebar-collapse-button {
    display: none;
  }

  .app:not(.label-fullscreen-mode) :is(.topbar, .content) {
    padding-inline: 16px;
  }

  /* The list keeps the full workspace; detail content opens above it. */
  .app:not(.label-fullscreen-mode) #module-products .product-workspace,
  .app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace,
  .app:not(.label-fullscreen-mode) :is(.oms-document-workspace, .oms-partner-workspace),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .oms-finance-workspace,
  #module-labels .label-template-manager-workspace,
  #module-labels .label-stage1-generation-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel,
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel,
  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel,
  #module-labels :is(.label-template-details, .label-generation-details) {
    position: fixed;
    z-index: 145;
    top: 62px;
    right: 0;
    bottom: 0;
    width: min(380px, calc(100vw - 72px));
    height: auto;
    max-height: none;
    border-left: 1px solid var(--oms-line);
    background: #fff;
    box-shadow: -14px 0 32px rgba(42, 62, 94, .16);
  }

  .app:not(.label-fullscreen-mode) :is(
    #module-products,
    #module-customers,
    #module-suppliers,
    #module-quotes,
    #module-purchaseOrders,
    #module-salesOrders,
    #module-deliveries,
    #module-statements,
    #module-invoices,
    #module-payments
  ).active {
    height: auto;
    min-height: calc(100dvh - 94px);
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode),
  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    width: 64px;
    padding-inline: 7px;
  }

  .app:not(.label-fullscreen-mode) :is(.topbar, .content) {
    padding-inline: 12px;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel,
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel,
  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel,
  #module-labels :is(.label-template-details, .label-generation-details) {
    left: 64px;
    width: auto;
    max-width: none;
    border-radius: 0;
  }

  #module-labels :is(.label-template-manager-records, .label-template-manager-workspace) {
    height: auto;
    min-height: calc(100dvh - 245px);
  }

  #modal,
  #qr-modal {
    padding: 8px;
  }

  #modal .modal-card,
  #qr-modal .modal-card {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
  }
}

@media (max-width: 620px) {
  .app:not(.label-fullscreen-mode),
  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    width: 56px;
    padding-inline: 5px;
  }

  .app:not(.label-fullscreen-mode) .brand img {
    width: 28px;
    height: 28px;
  }

  .app:not(.label-fullscreen-mode) .topbar {
    gap: 8px;
    padding-inline: 10px;
  }

  .app:not(.label-fullscreen-mode) .topbar > div:first-child {
    min-width: 0;
  }

  .app:not(.label-fullscreen-mode) .topbar :is(h1, .sub) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app:not(.label-fullscreen-mode) .auth-user {
    display: none;
  }

  .app:not(.label-fullscreen-mode) .content {
    padding-inline: 8px;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel,
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel,
  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel,
  #module-labels :is(.label-template-details, .label-generation-details) {
    left: 56px;
  }

  .app:not(.label-fullscreen-mode) :is(.toolbar-actions, .finance-list-controls, .statement-filter-controls) > *,
  #module-labels .label-template-manager-toolbar > * {
    min-width: 0;
  }
}

/* System settings refresh — 2026-09-05.
   Keep the existing OMS palette while normalizing typography, grouping and
   unavailable authentication states across macOS and Windows scaling. */
.app:not(.label-fullscreen-mode) .settings-layout {
  grid-template-columns: 200px minmax(0, 1fr) 300px;
  gap: 18px;
}

.app:not(.label-fullscreen-mode) .settings-side {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
}

.app:not(.label-fullscreen-mode) .settings-nav-group + .settings-nav-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) .settings-nav-label {
  padding: 0 10px 7px;
  color: #8a96a8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .04em;
}

.app:not(.label-fullscreen-mode) .settings-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  color: #526077;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.app:not(.label-fullscreen-mode) .settings-tab + .settings-tab {
  margin-top: 3px;
}

.app:not(.label-fullscreen-mode) .settings-tab-badge {
  margin-left: 8px;
  color: #b45309;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) .settings-content .panel {
  border-radius: 12px;
}

.app:not(.label-fullscreen-mode) .settings-content .panel-head {
  min-height: 58px;
  padding: 16px 20px;
}

.app:not(.label-fullscreen-mode) .settings-content .panel-head h2 {
  color: var(--oms-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.app:not(.label-fullscreen-mode) .settings-content .panel-body {
  padding: 20px;
  color: #334158;
  font-size: 13px;
  line-height: 1.6;
}

.app:not(.label-fullscreen-mode) .settings-content :is(label, .data-table th) {
  color: #526077;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) .settings-content :is(input, select, textarea) {
  min-height: 40px;
  padding: 9px 12px;
  color: var(--oms-ink);
  font-size: 13px;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) .settings-content :is(input, select, textarea):is([readonly], [disabled]) {
  background: #f8fafc;
  color: #64748b;
}

.app:not(.label-fullscreen-mode) .settings-content .muted,
.app:not(.label-fullscreen-mode) .settings-content .permission-note {
  font-size: 12px;
  line-height: 1.65;
}

.app:not(.label-fullscreen-mode) .settings-content .permission-note {
  padding: 14px 16px;
  border-radius: 9px;
}

.app:not(.label-fullscreen-mode) .settings-content .btn {
  min-height: 40px;
  font-size: 13px;
}

.app:not(.label-fullscreen-mode) .settings-panel-intro {
  max-width: 760px;
  margin: 0 0 16px;
}

.app:not(.label-fullscreen-mode) .settings-login-methods {
  display: grid;
  gap: 12px;
}

.app:not(.label-fullscreen-mode) .settings-login-method {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 16px 18px;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .settings-login-method.is-disabled {
  background: #f8fafc;
}

.app:not(.label-fullscreen-mode) .settings-login-method > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.app:not(.label-fullscreen-mode) .settings-login-method strong {
  color: var(--oms-ink);
  font-size: 14px;
}

.app:not(.label-fullscreen-mode) .settings-login-method span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.app:not(.label-fullscreen-mode) .settings-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) .settings-status-chip.is-enabled {
  background: #e8f8ef;
  color: #168a5b;
}

.app:not(.label-fullscreen-mode) .settings-status-chip.is-pending {
  background: #fff4df;
  color: #b45309;
}

.app:not(.label-fullscreen-mode) .settings-reserved-note {
  display: grid;
  gap: 5px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #fde3ad;
  border-radius: 10px;
  background: #fffaf0;
}

.app:not(.label-fullscreen-mode) .settings-reserved-note strong {
  color: #9a4b07;
  font-size: 13px;
}

.app:not(.label-fullscreen-mode) .settings-reserved-note span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.app:not(.label-fullscreen-mode) .settings-context {
  border-radius: 12px;
}

.app:not(.label-fullscreen-mode) .settings-context > * {
  padding: 18px 20px;
}

@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .settings-context {
    position: static;
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .settings-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .app:not(.label-fullscreen-mode) .settings-nav-group + .settings-nav-group {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .app:not(.label-fullscreen-mode) .settings-context {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .app:not(.label-fullscreen-mode) .settings-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .settings-login-method {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

/* Quote editor: keep the product picker affordance light while preserving its click target. */
#modal:not(.large-workspace-modal) .line-product-trigger .line-product-display {
  padding-right: 42px;
}

#modal:not(.large-workspace-modal) .line-product-trigger .line-product-add {
  right: 6px;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--oms-ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

#modal:not(.large-workspace-modal) .line-product-trigger .line-product-add:hover {
  border: 0;
  background: #f1f5f9;
  box-shadow: none;
}

#modal:not(.large-workspace-modal) .line-product-trigger .line-product-add:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 1px;
}

/* Editable datalist inputs use the same Heroicons chevron and spacing as
   the app's select controls instead of the browser-specific solid triangle. */
.editable-combobox-input {
  padding-right: 42px !important;
  background-color: #fff;
  background-image: url("./assets/icons/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

.editable-combobox-input::-webkit-calendar-picker-indicator {
  width: 34px;
  height: 100%;
  margin: 0 -8px 0 0;
  opacity: 0;
  cursor: pointer;
}

/* Shared date picker: page-level positioning avoids native browser popovers
   drifting or being clipped inside scrolling business-document dialogs. */
.oms-date-field {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.oms-date-field > input[data-oms-date-input="true"] {
  width: 100%;
  min-width: 0;
  padding-right: 44px !important;
}

.oms-date-trigger {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--oms-ink);
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.oms-date-trigger:hover {
  background: #f1f5f9;
}

.oms-date-trigger:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 1px;
}

.oms-date-trigger img {
  width: 18px;
  height: 18px;
  display: block;
}

.oms-date-popover {
  position: fixed;
  z-index: 10050;
  width: min(304px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  color: var(--oms-ink);
}

.oms-date-popover[hidden] {
  display: none !important;
}

.oms-date-head,
.oms-date-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.oms-date-head {
  min-height: 36px;
  margin-bottom: 6px;
}

.oms-date-head strong {
  font-size: 14px;
  font-weight: 700;
}

.oms-date-nav,
.oms-date-foot button,
.oms-date-day {
  border: 0;
  background: transparent;
  color: inherit;
}

.oms-date-nav {
  width: 44px;
  height: 34px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.2;
}

.oms-date-nav:hover,
.oms-date-day:hover {
  background: #f1f5f9;
}

.oms-date-week,
.oms-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.oms-date-week span {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  color: var(--oms-muted);
  font-size: 12px;
}

.oms-date-day {
  aspect-ratio: 1;
  min-height: 34px;
  border-radius: 7px;
  font-size: 13px;
}

.oms-date-day.is-outside {
  color: #a8b2c2;
}

.oms-date-day.is-today {
  color: var(--oms-blue);
  font-weight: 700;
}

.oms-date-day.is-selected {
  background: var(--oms-blue);
  color: #fff;
  font-weight: 700;
}

.oms-date-day:focus-visible,
.oms-date-nav:focus-visible,
.oms-date-foot button:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 1px;
}

.oms-date-foot {
  min-height: 34px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #edf1f6;
}

.oms-date-foot button {
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--oms-blue);
  font-weight: 600;
}

.oms-date-foot button:hover {
  background: var(--oms-blue-soft);
}

/* Product picker: keep a useful working area and normal touch targets instead
   of inheriting the legacy compact delivery-picker dimensions. */
#line-product-picker-layer {
  padding: 32px;
}

#line-product-picker-layer .delivery-order-picker-card {
  width: min(1120px, calc(100vw - 64px));
  height: min(640px, calc(100vh - 64px));
  max-height: calc(100vh - 64px);
  border-radius: 12px;
}

#line-product-picker-layer .delivery-order-picker-head,
#line-product-picker-layer .delivery-order-picker-foot {
  flex: 0 0 auto;
  min-height: 64px;
  padding: 12px 18px;
}

#line-product-picker-layer .delivery-order-picker-head h3 {
  font-size: 16px;
  line-height: 1.4;
}

#line-product-picker-layer .delivery-order-picker-head p,
#line-product-picker-layer .delivery-order-picker-foot .muted {
  font-size: 12px;
  line-height: 1.5;
}

#line-product-picker-layer .delivery-order-picker-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 16px 18px;
  overflow: hidden;
}

#line-product-picker-layer .line-product-picker-scroll {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  isolation: isolate;
  background: #fff;
  scrollbar-gutter: stable;
}

#line-product-picker-layer .line-product-picker-search {
  flex: 0 0 auto;
  gap: 10px;
  margin-bottom: 14px;
}

#line-product-picker-layer .line-product-picker-search input,
#line-product-picker-layer .line-product-picker-search .btn,
#line-product-picker-layer .delivery-order-picker-head .btn,
#line-product-picker-layer .delivery-order-picker-foot .btn {
  min-height: 40px;
  height: 40px;
  padding: 8px 16px;
  font-size: 13px;
}

#line-product-picker-layer .line-product-picker-search .btn,
#line-product-picker-layer .delivery-order-picker-foot .btn {
  min-width: 104px;
}

#line-product-picker-layer .delivery-order-picker-head .btn {
  min-width: 96px;
}

#line-product-picker-layer .line-product-picker-table {
  min-width: 1000px;
  font-size: 12px;
}

.spec-measure-field input::placeholder {
  color: #94a3b8;
  opacity: 1;
}

#line-product-picker-layer .line-product-picker-table th {
  height: 44px;
  padding: 8px;
  z-index: 3;
  background: #f8fafc;
  background-clip: padding-box;
  box-shadow: inset 0 -1px 0 var(--oms-line);
}

#line-product-picker-layer .line-product-picker-table td {
  height: 46px;
  padding: 8px;
  line-height: 1.4;
}

#line-product-picker-layer .line-product-picker-table .badge,
#line-product-picker-layer .line-product-picker-table .muted {
  font-size: 12px;
}

#line-product-picker-layer .line-product-picker-table input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

#line-product-picker-layer .delivery-order-picker-pager {
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 18px;
}

#line-product-picker-layer .delivery-order-picker-pager .btn {
  min-height: 36px;
  height: 36px;
  padding: 6px 12px;
  font-size: 12px;
}

@media (max-width: 760px) {
  #line-product-picker-layer {
    padding: 12px;
  }

  #line-product-picker-layer .delivery-order-picker-card {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-height: calc(100vh - 24px);
  }
}

/* The label designer keeps real label dimensions inside the canvas. Only the
   surrounding workspace changes at narrower effective viewports. */
@media (max-width: 1360px) {
  .app.label-fullscreen-mode .label-stage1-main {
    min-width: 0;
  }
}

@media (max-width: 1180px) {
  .app.label-fullscreen-mode .label-stage1-shell {
    height: auto;
    min-height: calc(100dvh - 20px);
    max-height: none;
    overflow: visible;
  }

  .app.label-fullscreen-mode .label-stage1-head {
    grid-template-columns: 1fr;
  }

  .app.label-fullscreen-mode .label-stage1-actions {
    min-width: 0;
    flex-wrap: wrap;
  }

  .app.label-fullscreen-mode .label-stage1-template-control {
    min-width: min(320px, 100%);
  }

  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: 180px minmax(0, 1fr);
    min-width: 0;
    align-items: start;
    overflow: visible;
  }

  .app.label-fullscreen-mode .label-stage1-left-stack {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: auto;
  }

  .app.label-fullscreen-mode :is(.label-stage1-content, .label-stage1-right-stack) {
    grid-column: 2;
    height: auto;
    min-height: 620px;
  }

  .app.label-fullscreen-mode .label-stage1-right-stack {
    grid-template-rows: var(--label-stage1-preview-height) minmax(240px, auto);
    overflow: visible;
  }
}

@media (max-width: 820px) {
  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .app.label-fullscreen-mode :is(.label-stage1-left-stack, .label-stage1-content, .label-stage1-right-stack) {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }

  .app.label-fullscreen-mode .label-stage1-tools,
  .app.label-fullscreen-mode .label-stage1-tablist {
    flex-flow: row wrap;
  }

  .app.label-fullscreen-mode .label-stage1-tab {
    width: auto;
    flex: 1 1 132px;
  }

  .app.label-fullscreen-mode .label-stage1-command-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app.label-fullscreen-mode .label-stage1-command-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* System settings breakpoint guard: keep the refreshed layout stable after
   legacy responsive rules at Windows 125%/150% effective viewport widths. */
@media (min-width: 1181px) {
  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: 200px minmax(0, 1fr) 300px;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .settings-context {
    position: static;
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .settings-side {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .app:not(.label-fullscreen-mode) .settings-context {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .app:not(.label-fullscreen-mode) .settings-side {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Windows/Chromium compatibility layer.
   Keep UI metrics stable with Segoe UI + Microsoft YaHei, classic scrollbars,
   browser zoom and Windows high-contrast mode. Print surfaces stay isolated. */
@media screen {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body,
  .app,
  #modal,
  #qr-modal,
  #line-product-picker-layer,
  .toast {
    font-family: var(--oms-font-ui);
  }

  :is(button, input, select, textarea) {
    font-family: inherit;
  }

  .app:not(.label-fullscreen-mode) :is(
    .data-table,
    .doc-table,
    .product-table,
    .sales-table,
    .dashboard-recent-table,
    .finance-table
  ) {
    font-variant-numeric: tabular-nums;
  }
}

@supports not (height: 100dvh) {
  .app:not(.label-fullscreen-mode) .sidebar {
    height: 100vh;
    max-height: 100vh;
  }

  .app:not(.label-fullscreen-mode) :is(
    #module-products,
    #module-customers,
    #module-suppliers,
    #module-quotes,
    #module-purchaseOrders,
    #module-salesOrders,
    #module-deliveries,
    #module-statements,
    #module-invoices,
    #module-payments
  ).active {
    min-height: calc(100vh - 94px);
  }

  #modal .modal-card,
  #qr-modal .modal-card {
    max-height: calc(100vh - 32px);
  }
}

@media (forced-colors: active) {
  .app:not(.label-fullscreen-mode) :is(.btn, input, select, textarea),
  #modal:not(.large-workspace-modal) :is(.btn, input, select, textarea),
  #qr-modal:not(.large-workspace-modal) :is(.btn, input, select, textarea),
  #line-product-picker-layer :is(.btn, input, select) {
    border: 1px solid ButtonText !important;
    box-shadow: none !important;
    forced-color-adjust: auto;
  }

  .app:not(.label-fullscreen-mode) :is(
    .badge,
    .product-type-pill,
    .product-status-pill,
    .sales-filter-chip
  ) {
    border: 1px solid currentColor;
    forced-color-adjust: auto;
  }

  .app:not(.label-fullscreen-mode) :is(
    button,
    a,
    input,
    select,
    textarea,
    [role="button"],
    [role="menuitem"]
  ):focus-visible,
  #modal :is(button, input, select, textarea, [role="button"], [role="menuitem"]):focus-visible,
  #qr-modal :is(button, input, select, textarea, [role="button"], [role="menuitem"]):focus-visible {
    outline: 2px solid Highlight !important;
    outline-offset: 2px;
  }

  .app:not(.label-fullscreen-mode) :is(.selected, [aria-selected="true"], .active) {
    outline-color: Highlight;
  }
}

/* Typography and semantic color normalization (screen UI only).
   Print documents and the label design canvas intentionally keep their
   physical-size typography and color rules. */
@media screen {
  .app:not(.label-fullscreen-mode) {
    font-family: var(--oms-font-ui);
    color: var(--oms-ink);
  }

  .app:not(.label-fullscreen-mode) :is(.btn, .dashboard-view-all),
  #modal:not(.large-workspace-modal) .btn,
  #qr-modal:not(.large-workspace-modal) .btn {
    font-weight: var(--oms-weight-bold) !important;
  }

  .app:not(.label-fullscreen-mode) :is(
    .module.active h2,
    .module.active h3,
    .dashboard-section-heading h2,
    .dashboard-panel-heading h3,
    .dashboard-action-copy strong,
    .dashboard-monthly-item > strong,
    .dashboard-todo-item strong,
    .finance-summary-item strong,
    .sales-title
  ) {
    font-weight: var(--oms-weight-bold) !important;
  }

  .app:not(.label-fullscreen-mode) small {
    font-size: var(--oms-text-meta) !important;
  }

  .app:not(.label-fullscreen-mode) :is(
    .dashboard-footer,
    .dashboard-monthly-meta small,
    .module.active .empty,
    .module.active td.empty,
    .module.active .oms-details-empty,
    .module.active .purchase-list-empty,
    .module.active .label-template-empty,
    .module.active .data-table .muted,
    .module.active .product-sub,
    .module.active .table-pagination,
    .module.active .sales-list-footer,
    .module.active .approval-center-footer
  ) {
    color: var(--oms-muted) !important;
    font-size: var(--oms-text-meta) !important;
  }

  .app:not(.label-fullscreen-mode) :is(
    .quote-detail-list dt,
    .finance-order-cell small,
    .finance-details-scroll .quote-detail-list dt,
    .finance-amount-grid span,
    .delivery-logistics-timeline small,
    .delivery-operation-records time
  ) {
    color: var(--oms-muted) !important;
  }

  .app:not(.label-fullscreen-mode) :is(
    .quote-detail-list dt,
    .quote-detail-list dd,
    .quote-item-table,
    .finance-item-table,
    .delivery-logistics-timeline b,
    .delivery-logistics-timeline small,
    .delivery-file-row,
    .delivery-file-row b,
    .delivery-empty-copy,
    .delivery-operation-records li,
    .statement-amount-summary small,
    .statement-timeline small
  ) {
    font-size: var(--oms-text-meta) !important;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge {
    color: var(--oms-text-secondary) !important;
    font-size: var(--oms-text-meta) !important;
    font-weight: var(--oms-weight-regular) !important;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.green,
  .app:not(.label-fullscreen-mode) :is(#module-products, #module-customers, #module-suppliers) .product-status-pill.enabled {
    background: var(--oms-green-soft) !important;
    color: var(--oms-green) !important;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.amber {
    background: var(--oms-warning-soft) !important;
    color: var(--oms-warning) !important;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .badge.red {
    background: var(--oms-danger-soft) !important;
    color: var(--oms-danger) !important;
  }

  .app:not(.label-fullscreen-mode) :is(#module-products, #module-customers, #module-suppliers) .product-status-pill,
  .app:not(.label-fullscreen-mode) #module-products .product-type-pill {
    font-size: var(--oms-text-meta) !important;
    font-weight: var(--oms-weight-medium) !important;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-type-pill.base {
    color: #1d4ed8 !important;
  }

  .app:not(.label-fullscreen-mode) :is(#module-products, #module-customers, #module-suppliers) .product-status-pill.disabled {
    color: var(--oms-text-secondary) !important;
  }

  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button {
    color: var(--oms-text-secondary) !important;
  }

  .app:not(.label-fullscreen-mode) .nav-section-label {
    color: var(--oms-muted) !important;
    font-size: var(--oms-text-meta) !important;
  }

  .app:not(.label-fullscreen-mode) .nav .nav-section-toggle {
    color: var(--oms-text-secondary) !important;
    font-weight: var(--oms-weight-bold) !important;
  }
}

@media (max-width: 1180px) {
  /* When a grid workspace becomes a single-column drawer layout, preserve a
     real height for its list. Otherwise flex: 1 children collapse to zero. */
  .app:not(.label-fullscreen-mode) :is(
    #module-products .product-list-panel,
    #module-statements .statement-list-panel,
    #module-quotes .quote-list-panel,
    #module-purchaseOrders .quote-list-panel,
    #module-salesOrders .quote-list-panel,
    #module-deliveries .quote-list-panel,
    .oms-document-workspace > .oms-list-panel,
    .oms-partner-workspace > .oms-list-panel,
    .oms-finance-workspace .finance-list-panel
  ) {
    min-height: min(620px, calc(100dvh - 190px));
  }

  .app:not(.label-fullscreen-mode) :is(
    #module-products .product-list-panel,
    #module-statements .statement-list-panel,
    #module-quotes .quote-list-panel,
    #module-purchaseOrders .quote-list-panel,
    #module-salesOrders .quote-list-panel,
    #module-deliveries .quote-list-panel
  ) > .table-panel {
    min-height: 420px;
  }
}

@media (max-width: 1280px) {
  .app:not(.label-fullscreen-mode) {
    grid-template-columns: 184px minmax(0, 1fr);
  }

  .dashboard-action-rail-create {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .dashboard-action-rail-tools {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .dashboard-overview-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) :is(
    #module-customers,
    #module-suppliers,
    #module-quotes,
    #module-purchaseOrders,
    #module-deliveries,
    #module-salesOrders,
    #module-invoices,
    #module-payments
  ) {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) > .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .toolbar-main,
  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .toolbar-actions {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .app:not(.label-fullscreen-mode) .module.active:not(#module-dashboard):not(#module-labels) .toolbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .app:not(.label-fullscreen-mode) .finance-module-summary {
    grid-template-columns: 1fr;
  }

  .app:not(.label-fullscreen-mode) .finance-summary-item {
    min-height: 92px;
    border-right: 0;
    border-bottom: 1px solid var(--oms-line);
  }

  .app:not(.label-fullscreen-mode) .finance-summary-item:last-child {
    border-bottom: 0;
  }

  .app:not(.label-fullscreen-mode) .settings-layout {
    grid-template-columns: 1fr;
  }

  .app:not(.label-fullscreen-mode) .settings-context {
    grid-column: auto;
  }

  .app:not(.label-fullscreen-mode) .settings-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app:not(.label-fullscreen-mode) .oms-targets-workspace,
  .app:not(.label-fullscreen-mode) .oms-target-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shortcuts {
    padding: 20px;
  }

  .dashboard-action-rail-create,
  .dashboard-action-rail-tools {
    grid-template-columns: 1fr;
  }

  .dashboard-shortcut-groups {
    grid-template-columns: 1fr;
  }
  .app:not(.label-fullscreen-mode) {
    grid-template-columns: 1fr;
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    position: static;
    max-height: none;
  }

  .sidebar-collapse-button {
    display: none;
  }

  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 1fr;
  }

  .app.sidebar-collapsed:not(.label-fullscreen-mode) .brand-copy,
  .app.sidebar-collapsed:not(.label-fullscreen-mode) .nav-copy,
  .app.sidebar-collapsed:not(.label-fullscreen-mode) .nav-section-label {
    display: initial;
  }

  .app.sidebar-collapsed:not(.label-fullscreen-mode) .nav button {
    justify-content: flex-start;
  }

  .app:not(.label-fullscreen-mode) .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app:not(.label-fullscreen-mode) .nav-section-label {
    grid-column: 1 / -1;
  }

  .app:not(.label-fullscreen-mode) .topbar,
  .app:not(.label-fullscreen-mode) .content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dashboard-action-rail,
  .dashboard-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-operations-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-todo-panel,
  .dashboard-recent-panel {
    height: auto;
  }
}

/* Label template library: the label navigation now opens a normal OMS list first. */
#module-labels .label-template-manager {
  min-width: 0;
}

#module-labels .label-template-manager-tabs {
  display: flex;
  gap: 24px;
  min-height: 44px;
  margin-top: 12px;
  margin-bottom: 12px;
  padding: 0 18px;
  border-bottom: 1px solid #dfe6ef;
  background: #fff;
}

#module-labels .label-template-manager-tabs button {
  position: relative;
  min-width: 88px;
  border: 0;
  background: transparent;
  color: #65758d;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#module-labels .label-template-manager-tabs button.active {
  color: #1765e8;
}

#module-labels .label-template-manager-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #1765e8;
  content: "";
}

#module-labels .label-template-manager-records {
  min-height: 420px;
  height: calc(100dvh - 260px);
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: var(--oms-radius);
  background: #fff;
  box-shadow: var(--oms-shadow);
}

#module-labels .label-template-manager-records .label-stage1-generation-records {
  border-top: 0;
}

#module-labels .label-template-manager-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(170px, 220px) minmax(150px, 190px);
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--oms-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

#module-labels .label-template-manager-toolbar :is(.btn, input, select) {
  height: 44px;
  min-height: 44px;
}

/* Keep the four template filters on one baseline. The search wrapper is a
   <label>, so explicitly neutralize the global label bottom margin here. */
#module-labels .label-template-manager-toolbar > :is(.btn, label, select) {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  margin: 0;
  align-self: center;
}

#module-labels .label-template-manager-toolbar-records {
  grid-template-columns: minmax(250px, 1fr) auto;
}

#module-labels .label-generation-toolbar-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#module-labels .label-generation-toolbar-copy strong {
  color: #1f2f49;
  font-size: 15px;
  line-height: 20px;
}

#module-labels .label-generation-toolbar-copy span {
  overflow: hidden;
  color: #7d8ba0;
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#module-labels .label-template-create {
  min-width: 112px;
}

#module-labels .label-template-manager-search {
  position: relative;
  display: flex;
  min-width: 0;
  height: 44px;
  margin: 0;
  align-items: center;
}

#module-labels .label-template-manager-search svg {
  position: absolute;
  z-index: 1;
  left: 13px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #718096;
  stroke-width: 2;
}

#module-labels .label-template-manager-search input {
  width: 100%;
  height: 100%;
  margin: 0;
  box-sizing: border-box;
  padding-left: 40px;
}

#module-labels .label-template-manager-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(350px, 29vw, 390px);
  min-height: 420px;
  height: calc(100dvh - 260px);
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

#module-labels .label-template-manager.details-closed .label-template-manager-workspace {
  grid-template-columns: minmax(0, 1fr);
}

#module-labels .label-template-list-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

#module-labels .label-template-table-scroll {
  min-width: 0;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-gutter: auto;
}

#module-labels .label-template-table-scroll.is-empty {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow-y: hidden;
}

#module-labels .label-template-table-scroll.is-empty .label-template-table {
  flex: 0 0 auto;
}

#module-labels .label-template-table {
  width: 100%;
  min-width: 560px;
  table-layout: fixed;
  border-collapse: collapse;
}

#module-labels .label-template-table :is(th, td) {
  height: 58px;
  padding: 7px 6px;
  border-bottom: 1px solid var(--oms-line);
  color: #34445e;
  text-align: center;
  vertical-align: middle;
}

#module-labels .label-template-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 44px;
  background: #f7f9fc;
  color: #61708a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#module-labels .label-template-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#module-labels .label-template-table th:nth-child(1) { width: 44px; }
#module-labels .label-template-table th:nth-child(2) { width: 36px; }
#module-labels .label-template-table th:nth-child(3) { width: 120px; }
#module-labels .label-template-table th:nth-child(4) { width: 95px; }
#module-labels .label-template-table th:nth-child(5) { width: 80px; }
#module-labels .label-template-table th:nth-child(6) { width: 50px; }
#module-labels .label-template-table th:nth-child(7) { width: 86px; }
#module-labels .label-template-table th:nth-child(8) { width: 55px; }
#module-labels .label-template-table th:nth-child(9) { width: 40px; }

#module-labels .label-template-table tbody tr {
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}

#module-labels .label-template-table tbody tr:hover td,
#module-labels .label-template-table tbody tr.selected td {
  background: #f3f7ff;
}

#module-labels .label-template-table tbody tr.selected {
  box-shadow: inset 3px 0 #2868e8;
}

#module-labels .label-template-name-button,
#module-labels .label-template-favorite-button {
  border: 0;
  background: transparent;
}

#module-labels .label-template-name-button {
  width: 100%;
  overflow: hidden;
  color: #1765e8;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#module-labels .label-template-favorite-button {
  min-width: 28px;
  min-height: 28px;
  color: #8ba0bd;
  font-size: 20px;
}

#module-labels .label-template-favorite-button.active {
  color: #f5b82e;
}

#module-labels .label-template-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

#module-labels .label-template-status.enabled { background: #eaf8ef; color: #16874b; }
#module-labels .label-template-status.draft { background: #f0f3f7; color: #61708a; }
#module-labels .label-template-status.disabled { background: #f3f4f6; color: #8a94a5; }

#module-labels .label-row-menu-trigger {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #50617a;
  cursor: pointer;
}

#module-labels .label-row-menu-trigger:hover,
#module-labels .label-row-menu-trigger[aria-expanded="true"] {
  background: #edf3ff;
  color: #1765e8;
}

#module-labels .label-row-menu-trigger:focus-visible {
  outline: 2px solid #1765e8;
  outline-offset: 2px;
}

#module-labels .label-row-menu-trigger svg { width: 18px; height: 18px; fill: currentColor; }

.label-row-action-popover { width: 120px; }

#module-labels .label-template-list-panel > .table-pagination {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 10px 16px;
  border-top: 1px solid var(--oms-line);
}

#module-labels .label-template-empty {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
}

#module-labels .label-template-empty strong { color: #34445e; }

#module-labels .label-template-details {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--oms-line);
  background: #fff;
}

#module-labels .label-template-details-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#module-labels .label-template-details-head {
  z-index: 4;
  display: flex;
  min-height: 66px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--oms-line);
  background: #fff;
}

#module-labels .label-template-details-head h2 {
  margin: 0;
  color: #17243a;
  font-size: 16px;
}

#module-labels .label-template-details-head span {
  display: block;
  margin-top: 5px;
  color: #6e7f98;
  font-size: 11px;
}

#module-labels .label-template-details section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--oms-line);
}

#module-labels .label-template-management-preview {
  position: relative;
  height: 224px;
  overflow: hidden;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #f7f9fc;
}

#module-labels .label-template-management-preview .stage1-grid-preview-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  box-shadow: 0 5px 18px rgba(25, 38, 60, .15);
}

#module-labels :is(.label-template-management-preview, .label-manager-thumbnail) .stage1-grid-preview-sheet {
  transform-origin: top left;
}

#module-labels .label-template-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 18px;
  margin: 16px 0 0;
}

#module-labels .label-template-meta-grid div { min-width: 0; }
#module-labels .label-template-meta-grid dt { color: #8290a5; font-size: 11px; }
#module-labels .label-template-meta-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; color: #34445e; font-size: 12px; font-weight: 700; }

#module-labels .label-template-summary-section,
#module-labels .label-template-recent-section {
  display: grid;
  gap: 12px;
}

#module-labels .label-template-summary-row {
  display: grid;
  gap: 5px;
}

#module-labels .label-template-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#module-labels .label-template-summary-head button {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #1765e8;
  font-size: 11px;
  cursor: pointer;
}

#module-labels .label-template-summary-head button span {
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

#module-labels .label-template-summary-details {
  display: grid;
  overflow: hidden;
  border: 1px solid #e6ebf3;
  border-radius: 7px;
  background: #fbfcfe;
}

#module-labels .label-template-summary-details > div {
  display: grid;
  grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  border-bottom: 1px solid #edf1f6;
  color: #52627a;
  font-size: 11px;
}

#module-labels .label-template-summary-details > div:last-child { border-bottom: 0; }
#module-labels .label-template-summary-details b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#module-labels .label-template-summary-details em { overflow-wrap: anywhere; color: #7d8ba0; font-style: normal; }

#module-labels .label-template-summary-row strong,
#module-labels .label-template-recent-section h3 {
  margin: 0;
  color: #26354d;
  font-size: 12px;
}

#module-labels .label-template-summary-row span,
#module-labels .label-template-empty-copy {
  overflow-wrap: anywhere;
  color: #75859c;
  font-size: 11px;
  line-height: 1.6;
}

#module-labels .label-template-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: #fff;
}

#module-labels .label-template-detail-actions .btn { min-width: 0; padding-inline: 8px; }

#module-labels .label-template-detail-tabs-section {
  padding-top: 0 !important;
}

#module-labels .label-template-detail-tabs {
  display: flex;
  min-height: 44px;
  gap: 22px;
  margin: 0 -18px 10px;
  padding: 0 18px;
  border-bottom: 1px solid #e5ebf3;
}

#module-labels .label-template-detail-tabs button {
  position: relative;
  border: 0;
  background: transparent;
  color: #7a889d;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#module-labels .label-template-detail-tabs button.active { color: #1765e8; }
#module-labels .label-template-detail-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: #1765e8;
  content: "";
}

#module-labels .label-template-recent-table { display: grid; }
#module-labels .label-template-recent-table > div {
  display: grid;
  grid-template-columns: 1.25fr 1fr .8fr .7fr;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid #edf1f6;
  color: #52627a;
  font-size: 10px;
  text-align: center;
}
#module-labels .label-template-recent-table > .head {
  min-height: 30px;
  color: #8996a9;
  font-weight: 700;
}
#module-labels .label-template-recent-table time { color: #65758d; }
#module-labels .label-template-recent-table b { color: #1765e8; }
#module-labels .label-template-recent-table > p { margin: 16px 0; text-align: center; }

#module-labels .label-template-field-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#module-labels .label-template-field-preview > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #e7ecf3;
  border-radius: 7px;
  background: #fbfcfe;
}
#module-labels .label-template-field-preview span { color: #8996a9; font-size: 10px; }
#module-labels .label-template-field-preview b { overflow: hidden; color: #34445e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#module-labels .label-template-field-preview > p { grid-column: 1 / -1; margin: 16px 0; text-align: center; }

#module-labels .label-template-recent-list { display: grid; }
#module-labels .label-template-recent-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 26px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid #edf1f6;
  color: #50617a;
  font-size: 11px;
}
#module-labels .label-template-recent-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#module-labels .label-template-recent-list time { color: #8996a9; }
#module-labels .label-template-recent-list b { color: #1765e8; text-align: right; }

/* Label template and generation lists share the sales-quote list/detail language. */
#module-labels .label-manager-thumbnail {
  position: relative;
  display: inline-flex;
  width: 72px;
  height: 44px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d9e2ef;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
}

#module-labels .label-manager-thumbnail:hover,
#module-labels .label-manager-thumbnail:focus-visible {
  border-color: #7aa8f8;
  box-shadow: 0 0 0 2px rgba(40, 104, 232, .12);
  outline: 0;
}

#module-labels .label-manager-thumbnail .stage1-grid-preview-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  pointer-events: none;
}

#module-labels .label-template-table tbody tr,
#module-labels .label-stage1-generation-table tbody tr {
  height: 64px;
}

#module-labels .label-stage1-generation-records {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  padding: 0;
  border: 0;
}

#module-labels .label-stage1-generation-head {
  flex: 0 0 auto;
  align-items: center;
  margin-bottom: 12px;
}

#module-labels .label-stage1-generation-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#module-labels .label-stage1-generation-search {
  position: relative;
  display: flex;
  width: min(320px, 30vw);
  min-width: 220px;
  height: 44px;
  margin: 0;
  box-sizing: border-box;
  align-self: center;
  align-items: center;
}

#module-labels .label-stage1-generation-search svg {
  position: absolute;
  left: 12px;
  z-index: 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #718096;
  stroke-width: 2;
}

#module-labels .label-stage1-generation-search input {
  width: 100%;
  height: 100%;
  min-height: 44px;
  margin: 0;
  box-sizing: border-box;
  padding-left: 38px;
}

#module-labels .label-stage1-generation-scope {
  height: 44px;
  margin: 0;
  align-self: center;
}

#module-labels .label-stage1-generation-scope .btn {
  height: 44px;
  min-height: 44px;
  padding-inline: 16px;
}

#module-labels .label-stage1-generation-workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) 350px;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: #fff;
}

#module-labels .label-stage1-generation-records.details-closed .label-stage1-generation-workspace {
  grid-template-columns: minmax(0, 1fr);
}

#module-labels .label-stage1-generation-list-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

#module-labels .label-stage1-generation-table-wrap {
  max-height: none;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-gutter: auto;
  border: 0;
  border-radius: 0;
}

#module-labels .label-stage1-generation-table {
  width: 100%;
  min-width: 864px;
  table-layout: fixed;
  font-size: 12px;
}

#module-labels .label-stage1-generation-table :is(th, td) {
  height: 64px;
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
}

#module-labels .label-stage1-generation-table th {
  height: 44px;
  background: #f7f9fc;
  color: #61708a;
  font-size: 12px;
  font-weight: 700;
}

#module-labels .label-stage1-generation-table th:nth-child(1) { width: 56px; }
#module-labels .label-stage1-generation-table th:nth-child(2) { width: 180px; }
#module-labels .label-stage1-generation-table th:nth-child(3) { width: 160px; }
#module-labels .label-stage1-generation-table th:nth-child(4) { width: 140px; }
#module-labels .label-stage1-generation-table th:nth-child(5) { width: 80px; text-align: center; }
#module-labels .label-stage1-generation-table th:nth-child(6) { width: 100px; }
#module-labels .label-stage1-generation-table th:nth-child(7) { width: 142px; }
#module-labels .label-stage1-generation-table th:nth-child(8) { width: 62px; }

#module-labels .label-stage1-generation-table :is(th, td):last-child {
  padding-right: 6px;
  padding-left: 6px;
}

#module-labels .label-stage1-generation-table td:last-child .label-row-menu-trigger {
  margin-inline: auto;
}

#module-labels .label-stage1-generation-table tbody tr {
  cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}

#module-labels .label-stage1-generation-table tbody tr:hover td,
#module-labels .label-stage1-generation-table tbody tr.selected td {
  background: #f3f7ff;
}

#module-labels .label-stage1-generation-table tbody tr.selected {
  box-shadow: inset 3px 0 #2868e8;
}

#module-labels .label-generation-name-button {
  width: 100%;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #1765e8;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

#module-labels .label-stage1-generation-list-panel > .table-pagination {
  flex: 0 0 auto;
  min-height: 58px;
  padding: 10px 16px;
  border-top: 1px solid var(--oms-line);
}

#module-labels .label-generation-details {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--oms-line);
  background: #fff;
}

#module-labels .label-generation-details-head {
  z-index: 4;
  display: flex;
  min-height: 70px;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--oms-line);
  background: #fff;
}

#module-labels .label-generation-details-head h2 {
  margin: 0;
  color: #17243a;
  font-size: 16px;
  line-height: 1.35;
}

#module-labels .label-generation-details-head span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #1765e8;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#module-labels .label-generation-details-close {
  width: 40px;
  min-width: 40px;
  height: 40px;
}

#module-labels .label-generation-details-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

#module-labels .label-generation-details-scroll > section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--oms-line);
}

#module-labels .label-generation-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: #fff;
}

#module-labels .label-generation-detail-actions .label-generation-admin-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#module-labels .label-generation-detail-actions .btn {
  min-width: 0;
  padding-inline: 8px;
}

#module-labels .label-generation-copy-table,
#module-labels .label-generation-field-table {
  display: grid;
}

#module-labels :is(.label-generation-copy-table, .label-generation-field-table) > div {
  display: grid;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px solid #edf1f6;
  color: #52627a;
  font-size: 10px;
  text-align: center;
}

#module-labels .label-generation-copy-table > div {
  grid-template-columns: .65fr .8fr 1.15fr 1fr;
}

#module-labels .label-generation-field-table > div {
  grid-template-columns: 1fr 1fr 1.25fr;
}

#module-labels :is(.label-generation-copy-table, .label-generation-field-table) > .head {
  min-height: 30px;
  color: #8996a9;
  font-weight: 700;
}

#module-labels :is(.label-generation-copy-table, .label-generation-field-table) > div > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

#module-labels :is(.label-generation-copy-table, .label-generation-field-table) > p {
  margin: 16px 0;
  text-align: center;
}

/* Label designer child page: preserve the editor engine and reorganize the highlighted areas. */
.app.label-fullscreen-mode .label-stage1-shell {
  gap: 8px;
  height: calc(100dvh - 28px);
  min-height: 0;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-head {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  padding: 10px 14px;
  border-radius: 9px;
}

.app.label-fullscreen-mode .label-designer-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app.label-fullscreen-mode .label-designer-title h1 {
  margin: 0;
  color: #17243a;
  font-size: 18px;
  white-space: nowrap;
}

.app.label-fullscreen-mode .label-designer-back {
  min-height: 36px;
  min-width: 72px;
  border-color: #2868e8;
  background: #2868e8;
  color: #fff;
}

.app.label-fullscreen-mode .label-designer-back:hover {
  border-color: #1f5fdc;
  background: #1f5fdc;
  color: #fff;
}

.app.label-fullscreen-mode .label-stage1-actions {
  min-width: 0;
  flex-wrap: nowrap;
}

.app.label-fullscreen-mode .label-stage1-template-control {
  min-width: 320px;
  flex: 1 1 auto;
}

.app.label-fullscreen-mode .label-stage1-template-trigger {
  width: min(100%, 520px);
  min-height: 38px;
  justify-content: space-between;
  padding-inline: 14px;
  border-color: #9ebefc;
}

.app.label-fullscreen-mode .label-stage1-template-chevron {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #65758d;
}

.app.label-fullscreen-mode .label-stage1-template-chevron svg {
  width: 16px;
  height: 16px;
}

.app.label-fullscreen-mode .label-stage1-command-actions .btn {
  min-width: 112px;
  min-height: 38px;
}

.app.label-fullscreen-mode .label-stage1-command-actions .label-stage1-print-primary {
  min-width: 132px;
  border-radius: 6px;
}

.app.label-fullscreen-mode .label-stage1-main {
  grid-template-columns: clamp(180px, 14vw, 220px) minmax(520px, 1fr) clamp(300px, 25vw, 420px);
  gap: 12px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
}

.app.label-fullscreen-mode .label-stage1-left-stack > .label-stage1-card:first-child {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-left-stack > .label-stage1-card:first-child .label-stage1-card-head {
  display: none;
}

.app.label-fullscreen-mode .label-stage1-tools {
  position: relative;
  flex: 0 0 auto;
  gap: 0;
  padding: 10px 10px 6px;
}

.app.label-fullscreen-mode .label-stage1-tablist {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.app.label-fullscreen-mode .label-stage1-step-help {
  margin: 14px 14px 0;
  padding: 14px;
  border-color: #dce7f5;
  background: #f8fbff;
  font-size: 12px;
  line-height: 1.6;
}

.app.label-fullscreen-mode .label-stage1-step-help strong {
  font-size: 13px;
}

.app.label-fullscreen-mode .label-stage1-source-note {
  margin: 8px 10px 10px;
  padding: 10px 12px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
}

.app.label-fullscreen-mode .label-stage1-source-note h3 {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.4;
}

.app.label-fullscreen-mode .label-stage1-source-list {
  gap: 4px;
  font-size: 11px;
  line-height: 1.4;
}

.app.label-fullscreen-mode .label-stage1-source-item {
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
}

.app.label-fullscreen-mode .label-stage1-content {
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-editor-surface {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-tab {
  position: relative;
  min-height: 62px;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 8px;
  border: 0;
  background: transparent;
  color: #52627a;
  text-align: left;
}

.app.label-fullscreen-mode .label-stage1-tab::after {
  position: absolute;
  z-index: 0;
  top: 37px;
  bottom: -25px;
  left: 23px;
  width: 1px;
  background: #d8e0ec;
  content: "";
}

.app.label-fullscreen-mode .label-stage1-tab:last-child::after { display: none; }

.app.label-fullscreen-mode .label-stage1-tab.active {
  color: #1765e8;
}

.app.label-fullscreen-mode .label-stage1-step-number {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #b8c5d8;
  border-radius: 50%;
  background: #fff;
  color: #60708a;
  font-size: 13px;
  font-weight: 700;
}

.app.label-fullscreen-mode .label-stage1-tab.active .label-stage1-step-number {
  border-color: #2868e8;
  background: #2868e8;
  color: #fff;
  box-shadow: 0 0 0 4px #edf3ff;
}

.app.label-fullscreen-mode .label-stage1-step-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding-top: 1px;
}

.app.label-fullscreen-mode .label-stage1-step-copy strong { font-size: 13px; }
.app.label-fullscreen-mode .label-stage1-step-copy small { color: #8996a9; font-size: 10px; font-weight: 400; line-height: 1.45; }

.app.label-fullscreen-mode .label-stage1-editor-surface > .label-stage1-card-head {
  min-height: 46px;
  padding-inline: 14px;
  background: #fff;
}

.app.label-fullscreen-mode .stage1-grid-editor-toolbar,
.app.label-fullscreen-mode .stage1-grid-style-toolbar {
  min-height: 48px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #dfe5ee;
  border-radius: 0;
  background: #fff;
}

.app.label-fullscreen-mode .stage1-grid-editor-toolbar {
  grid-template-columns: minmax(150px, .95fr) minmax(150px, .95fr) minmax(284px, 1.5fr);
  min-width: 656px;
  margin-top: 2mm;
  min-height: 58px;
  padding: 9px 12px;
  column-gap: 12px;
  border-top: 1px solid #dfe5ee;
  overflow: hidden;
}

.app.label-fullscreen-mode .stage1-grid-style-toolbar {
  grid-template-columns: minmax(116px, 1.25fr) repeat(5, minmax(72px, 1fr)) minmax(168px, 1.4fr);
  min-width: 680px;
}

.app.label-fullscreen-mode .stage1-grid-style-toolbar .stage1-grid-style-group {
  width: 100%;
  min-width: 0;
  justify-content: space-evenly;
  gap: 4px;
  margin-right: 0;
  padding-inline: 6px;
}

.app.label-fullscreen-mode .stage1-grid-style-toolbar .stage1-grid-style-group:last-child {
  padding-inline: 6px;
}

.app.label-fullscreen-mode .label-stage1-editor-surface > .label-stage1-card-body {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.app.label-fullscreen-mode .label-stage1-shell.form-page-scroll .label-stage1-content,
.app.label-fullscreen-mode .label-stage1-shell.form-page-scroll .label-stage1-editor-surface {
  min-height: 0;
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-shell.form-page-scroll .label-stage1-editor-surface > .label-stage1-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 8px;
}

.app.label-fullscreen-mode .stage1-size-editor {
  min-height: 36px;
  padding: 5px 14px;
  border-bottom: 1px solid #e5eaf1;
}

.app.label-fullscreen-mode .label-stage1-preview-fullscreen-toggle {
  display: inline-flex;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.app.label-fullscreen-mode .label-stage1-preview-fullscreen-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.app.label-fullscreen-mode .stage1-grid-editor-toolbar .stage1-grid-control {
  gap: 6px;
  padding: 4px 6px;
}

.app.label-fullscreen-mode .stage1-grid-editor-toolbar .btn.compact {
  min-height: 34px;
}

.app.label-fullscreen-mode .label-stage1-readonly-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #fed7aa;
  border-radius: 6px;
  background: #fff7ed;
  color: #9a3412;
}

.app.label-fullscreen-mode .label-stage1-readonly-banner > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.app.label-fullscreen-mode .label-stage1-readonly-banner strong { font-size: 12px; }

.app.label-fullscreen-mode .label-stage1-readonly-banner span {
  font-size: 11px;
  line-height: 1.45;
}

.app.label-fullscreen-mode .stage1-grid-selection-help {
  display: flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 12px;
  border-bottom: 1px solid #e5eaf2;
  background: #f8fafc;
  color: #60708a;
  font-size: 11px;
  line-height: 1.35;
}

.app.label-fullscreen-mode .stage1-grid-editor-toolbar .btn:disabled,
.app.label-fullscreen-mode .stage1-grid-style-toolbar :is(button, select, input):disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
}

.app.label-fullscreen-mode .stage1-excel-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  margin: 10px 12px 12px;
  padding: 14px;
  border: 1px solid #dce4ef;
  border-radius: 7px;
  background-color: #fbfcfe;
}

.app.label-fullscreen-mode .stage1-excel-canvas {
  min-width: 100%;
}

.app.label-fullscreen-mode .label-stage1-right-stack {
  --label-stage1-preview-height: clamp(220px, 36vh, 340px);
}

.app.label-fullscreen-mode .label-stage1-properties-panel > .label-stage1-card > .label-stage1-card-body,
.app.label-fullscreen-mode .label-stage1-right-stack .label-stage1-qr-side-editor > .label-stage1-card-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.app.label-fullscreen-mode .label-stage1-shell.qr-page-scroll {
  height: calc(100dvh - 28px);
  min-height: 0;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-shell.qr-page-scroll .label-stage1-main {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
}

.app.label-fullscreen-mode .label-stage1-shell.qr-page-scroll :is(.label-stage1-left-stack, .label-stage1-content, .label-stage1-right-stack) {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-shell.qr-page-scroll .label-stage1-content > .label-stage1-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-shell.qr-page-scroll .label-stage1-editor-surface {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.app.label-fullscreen-mode .label-stage1-shell.qr-page-scroll .label-stage1-editor-surface > .label-stage1-card-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 1500px) {
  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: 190px minmax(520px, 1fr) minmax(300px, 360px);
  }
}

@media (max-width: 1360px) {
  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: 180px minmax(520px, 1fr) 360px;
    min-width: 1084px;
  }
}

@media (max-width: 1180px) {
  #module-labels .label-template-manager-workspace { grid-template-columns: minmax(0, 1fr) 320px; }
  #module-labels .label-stage1-generation-workspace { grid-template-columns: minmax(0, 1fr) 320px; }
  #module-labels .label-template-manager-toolbar { grid-template-columns: auto minmax(220px, 1fr) 180px 160px; }
  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: 180px 520px 360px;
    min-width: 1084px;
  }
}

@container (max-width: 760px) {
  .app.label-fullscreen-mode .stage1-grid-editor-toolbar {
    grid-template-columns: minmax(150px, .95fr) minmax(150px, .95fr) minmax(284px, 1.5fr);
    height: auto;
    overflow: hidden;
  }
  .app.label-fullscreen-mode .stage1-grid-editor-toolbar .merge-tools {
    grid-column: auto;
  }
  .app.label-fullscreen-mode .stage1-grid-style-toolbar {
    display: grid;
    grid-template-columns: minmax(116px, 1.25fr) repeat(5, minmax(72px, 1fr)) minmax(168px, 1.4fr);
    height: auto;
    overflow-x: auto;
    overflow-y: visible;
  }
  .app.label-fullscreen-mode .stage1-grid-style-group {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  #module-labels .label-template-manager-toolbar { grid-template-columns: 1fr 1fr; }
  #module-labels .label-template-manager-search { grid-column: 1 / -1; grid-row: 1; }
  #module-labels .label-template-manager-toolbar-records { grid-template-columns: 1fr; }
  #module-labels .label-template-manager-toolbar-records .label-stage1-generation-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }
  #module-labels .label-template-manager-toolbar-records .label-stage1-generation-search {
    width: 100%;
    min-width: 0;
  }
  #module-labels .label-template-manager-workspace { display: block; overflow: visible; }
  #module-labels .label-template-details {
    position: fixed;
    z-index: 45;
    top: 62px;
    right: 0;
    bottom: 0;
    width: min(380px, 92vw);
    border-left: 1px solid var(--oms-line);
    box-shadow: -14px 0 32px rgba(42, 62, 94, .14);
  }
  #module-labels .label-stage1-generation-head { align-items: stretch; flex-direction: column; }
  #module-labels .label-stage1-generation-controls { justify-content: stretch; }
  #module-labels .label-stage1-generation-search { width: 100%; }
  #module-labels .label-stage1-generation-workspace { display: block; }
  #module-labels .label-generation-details {
    position: fixed;
    z-index: 45;
    top: 62px;
    right: 0;
    bottom: 0;
    width: min(350px, 92vw);
    border-left: 1px solid var(--oms-line);
    box-shadow: -14px 0 32px rgba(42, 62, 94, .14);
  }
}

/* Sales quote workspace: product-material-style search, list, and contextual detail drawer. */
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--oms-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(31, 52, 85, .035);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-search-wrap {
  position: relative;
  flex: 0 1 560px;
  width: min(560px, 100%);
  max-width: 560px;
  min-width: 0;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-toolbar .toolbar-actions {
  margin-left: auto;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-search-wrap svg {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #7b879d;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transform: translateY(-50%);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-search-wrap input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
  color: #24324a;
  font: inherit;
  font-weight: 500;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-create-button {
  min-width: 138px;
  height: 44px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace {
  height: calc(100dvh - 220px);
  min-height: 410px;
  grid-template-columns: minmax(0, 1fr) 350px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace.details-closed .quote-details-panel {
  display: none;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-list-panel {
  min-width: 0;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-row-actions {
  overflow: visible;
  text-align: center !important;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-row-menu-trigger {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5d6b81;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-row-menu-trigger:hover,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-row-menu-trigger[aria-expanded="true"] {
  background: #e8f1ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-row-menu-trigger:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 2px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-row-menu-trigger svg {
  width: 18px;
  height: 18px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-list-panel > .table-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-list-panel .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.app:not(.label-fullscreen-mode) #module-purchaseOrders .purchase-table-scroll.is-empty {
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) #module-purchaseOrders .purchase-table-scroll.is-empty .purchase-table {
  flex: 0 0 auto;
}

.app:not(.label-fullscreen-mode) #module-purchaseOrders .purchase-list-empty {
  min-height: 160px;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-purchaseOrders .purchase-list-empty strong {
  color: #34445e;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(1) { width: 56px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(2) { width: 132px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(3) { width: 88px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(4) { width: 145px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(5) { width: 155px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(6) { width: 112px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(7) { width: 96px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(8) { width: 118px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(9) { width: 90px; }
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table th:nth-child(10) { width: 62px; }

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table :is(th, td) {
  padding-left: 12px;
  padding-right: 12px;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table .num {
  text-align: center;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table tbody tr {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table tbody tr:hover,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table tbody tr.selected {
  background: #f2f7ff;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-table tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-number,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-view-link {
  color: var(--oms-blue);
  font-weight: 650;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-view-link {
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-head {
  flex: 0 0 auto;
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-identity strong,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-identity span {
  display: block;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-identity strong {
  color: var(--oms-ink);
  font-size: 12px;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-identity span {
  margin-top: 4px;
  color: var(--oms-blue);
  font-size: 10px;
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #65738a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-close:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-details-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-section,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-records {
  padding: 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-section h3 {
  margin: 0 0 14px;
  color: var(--oms-ink);
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-section h3 span {
  color: #7b889c;
  font-weight: 500;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-title-row h3 {
  margin-bottom: 0;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-list :is(dt, dd) {
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-list dt {
  color: #8793a6;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-detail-list dd {
  color: #34445e;
  max-width: 190px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-item-table-wrap {
  overflow-x: auto;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-item-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-item-table :is(th, td) {
  padding: 8px 5px;
  border-bottom: 1px solid #edf1f6;
  color: #45536a;
  text-align: right;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-item-table thead th {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-item-table tbody td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-item-table :is(th, td):first-child {
  text-align: center;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-statements, #module-approvals) .quote-item-table .serial-col {
  width: 48px;
  min-width: 48px;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-total-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-total-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6f7d92;
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-total-list b {
  color: #34445e;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-total-list .grand-total {
  padding-top: 8px;
  border-top: 1px solid var(--oms-line);
  color: var(--oms-ink);
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-total-list .grand-total b {
  color: var(--oms-blue);
  font-size: 18px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-amount-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-amount-grid .grand-total {
  grid-column: 1 / -1;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  min-height: 52px;
  position: relative;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -1px;
  left: 5px;
  width: 1px;
  background: #dbe3ef;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .timeline-dot {
  width: 11px;
  height: 11px;
  margin-top: 2px;
  border: 2px solid #c4cede;
  border-radius: 50%;
  background: #fff;
  z-index: 1;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li.complete .timeline-dot,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li.active .timeline-dot {
  border-color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li.complete .timeline-dot {
  background: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline b,
.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline small {
  display: block;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline b {
  color: #35445d;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li.active b {
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline small {
  margin-top: 3px;
  color: #8a96a8;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline small em {
  display: block;
  margin-top: 3px;
  color: #6f7d92;
  font-style: normal;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li.rejected .timeline-dot {
  border-color: #d04444;
  background: #d04444;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-timeline li.rejected b {
  color: #d04444;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-records summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  color: var(--oms-ink);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-records summary::-webkit-details-marker {
  display: none;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-approval-records summary svg {
  width: 13px;
  height: 13px;
  transition: transform .16s ease;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-record-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-record-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  color: #53617a;
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries, #module-approvals) .quote-record-list time {
  grid-column: 1 / -1;
  color: #8a96a8;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-approval-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-print-preview-button {
  min-width: 88px;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-details-empty {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 24px;
  color: #8793a6;
  text-align: center;
}

.app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-details-empty strong {
  color: #40506a;
}

@media (max-width: 1280px) {
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-toolbar {
    align-items: stretch;
  }

  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace {
    height: auto;
    min-height: 0;
  }

  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel {
    display: flex;
  }

  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-search-wrap {
    flex-basis: 480px;
    max-width: 480px;
  }
}

@media (max-width: 620px) {
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-toolbar {
    flex-direction: column;
  }

  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-search-wrap,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .toolbar-actions,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-create-button {
    width: 100%;
  }

  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-search-wrap {
    max-width: none;
  }
}

@media (max-width: 560px) {
  .app:not(.label-fullscreen-mode) .topbar-actions {
    gap: 6px;
  }

  .app:not(.label-fullscreen-mode) .topbar-actions .auth-user {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-notification-popover {
    position: fixed;
    top: 66px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - 78px);
  }

  .dashboard-action-rail,
  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-monthly-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-monthly-item {
    min-height: 112px;
    border-right: 0;
    border-bottom: 1px solid var(--oms-line);
  }

  .dashboard-monthly-item:last-child {
    border-bottom: 0;
  }
}

/* Delivery workspace: quote-style search, centered fulfilment list and scrollable detail drawer. */
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-toolbar .toolbar-actions {
  display: flex;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-search-wrap {
  flex-basis: 520px;
  max-width: 520px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-workspace {
  height: calc(100dvh - 220px);
  min-height: 410px;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table {
  min-width: 1030px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(1) { width: 56px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(2) { width: 138px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(3) { width: 94px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(4) { width: 158px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(5) { width: 132px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(6) { width: 72px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(7) { width: 100px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(8) { width: 94px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(9) { width: 94px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(10) { width: 90px; }
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table th:nth-child(11) { width: 58px; }

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table :is(th, td),
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table .num {
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table td {
  height: 54px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table td:nth-child(4),
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-table td:nth-child(5) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-heading-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-heading-statuses .badge {
  margin: 0;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-item-table {
  min-width: 460px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-item-table :is(th, td) {
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-item-table :is(th, td):first-child {
  text-align: left;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-actions {
  display: flex;
  justify-content: flex-end;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  min-height: 52px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -1px;
  left: 5px;
  width: 1px;
  background: #dbe3ef;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-dot {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 2px;
  border: 2px solid #c4cede;
  border-radius: 50%;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline li.complete .delivery-logistics-dot {
  border-color: var(--oms-blue);
  background: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline b,
.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline small {
  display: block;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline b {
  color: #35445d;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline li.active b {
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-logistics-timeline small {
  margin-top: 3px;
  color: #8a96a8;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-file-row {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  background: #f8faff;
  color: #43516a;
  font: inherit;
  font-size: 10px;
  text-align: left;
}

.app:not(.label-fullscreen-mode) #module-deliveries button.delivery-file-row {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) #module-deliveries button.delivery-file-row:hover {
  border-color: #abc8ff;
  background: #f1f6ff;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-file-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-file-row b {
  flex: 0 0 auto;
  color: #718097;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-empty-copy {
  margin: 13px 0 0;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-operation-records {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-operation-records li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  color: #53617a;
  font-size: 10px;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-operation-records time {
  color: #8996a8;
}

.app:not(.label-fullscreen-mode) #module-deliveries .delivery-operation-records b {
  grid-column: 1 / -1;
  color: #718097;
  font-weight: 500;
}

@media (max-width: 1280px) {
  .app:not(.label-fullscreen-mode) #module-deliveries .delivery-workspace {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) #module-deliveries .delivery-workspace {
    height: auto;
    min-height: 0;
  }

  .app:not(.label-fullscreen-mode) #module-deliveries .delivery-search-wrap {
    flex: 1 1 100%;
    max-width: none;
  }
}

@media (max-width: 620px) {
  .app:not(.label-fullscreen-mode) #module-deliveries .delivery-summary {
    grid-template-columns: 1fr;
  }

  .app:not(.label-fullscreen-mode) #module-deliveries .delivery-summary > div {
    min-height: 74px;
  }

  .app:not(.label-fullscreen-mode) #module-deliveries .delivery-summary > div:not(:last-child)::after {
    top: auto;
    left: 18px;
    right: 18px;
    bottom: 0;
    width: auto;
    height: 1px;
  }
}

@media print {
  .app:not(.label-fullscreen-mode) .sidebar,
  .app:not(.label-fullscreen-mode) .topbar {
    display: none !important;
  }
}

/* Document master-detail workspaces — visual composition only. */
.app:not(.label-fullscreen-mode) .oms-document-workspace {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .oms-document-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) .oms-document-workspace > .oms-list-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .oms-finance-workspace .oms-finance-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) .oms-finance-workspace .finance-module-summary {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--oms-line);
  border-radius: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .oms-finance-workspace .oms-finance-main > .oms-list-panel {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .oms-finance-workspace .oms-finance-main > .oms-list-panel .table-scroll,
.app:not(.label-fullscreen-mode) .oms-sales-workspace .sales-table-wrap {
  min-height: 0;
  flex: 1 1 auto;
}

.app:not(.label-fullscreen-mode) .oms-sales-workspace > .oms-list-panel {
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) .oms-sales-workspace .sales-list-footer,
.app:not(.label-fullscreen-mode) .oms-finance-workspace .pagination {
  margin-top: auto;
}

.oms-document-amounts dl {
  gap: 8px;
}

.oms-document-amounts dd {
  color: var(--oms-blue) !important;
  font-weight: 700;
}

/* Sales order: quote-style list, icon filters, and contextual detail drawer. */
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-toolbar .toolbar-actions {
  display: flex;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-toolbar .toolbar-actions .btn {
  min-width: 92px;
  height: 44px;
}

#modal .sales-order-submit-actions {
  gap: 12px;
}

#modal .sales-order-submit-actions .sales-order-submit-button {
  min-width: 116px;
  min-height: 40px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-search-wrap {
  flex-basis: 470px;
  max-width: 470px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-gutter: stable;
  border-top: 0;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table {
  width: 100%;
  min-width: 3080px;
  table-layout: fixed;
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table :is(th, td),
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table thead th,
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table thead th.resizable-th {
  height: 50px;
  padding: 10px 9px;
  color: #43516a;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table tbody td {
  height: 54px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table .sales-frozen-col {
  position: sticky;
  left: var(--sales-sticky-left, 0);
  z-index: 8;
  background: #fff;
  background-clip: padding-box;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table thead .sales-frozen-col {
  z-index: 12;
  background: #f7f9fc;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table .sales-frozen-end {
  box-shadow: 2px 0 5px rgb(31 45 70 / 10%);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table tr.selected .sales-frozen-col {
  background: #eef4ff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table .num {
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-th-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-th-filter > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--oms-text-secondary);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button:hover,
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button.expanded {
  background: #edf4ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button.active {
  background: #e8f1ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button svg {
  width: 13px;
  height: 13px;
  transition: transform .16s ease;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-filter-button.expanded svg {
  transform: rotate(180deg);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-active-filters {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-active-filters button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  background: #f3f7ff;
  color: #245fbf;
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-active-filters .clear-all {
  border-color: transparent;
  background: transparent;
  color: #66758c;
}

.sales-filter-popover input[type="search"] {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d5deeb;
  border-radius: 8px;
  color: #27364d;
  background: #fff;
  font: inherit;
}

@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table .sales-frozen-col {
    position: static;
    left: auto;
    z-index: auto;
    box-shadow: none;
  }

  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table .serial-col.sales-frozen-col {
    position: sticky;
    left: 0;
    z-index: 8;
    box-shadow: 1px 0 0 #e5eaf2;
  }

  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-table thead .serial-col.sales-frozen-col {
    z-index: 12;
  }
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-list-footer {
  min-height: 58px;
  padding: 12px 16px;
  color: var(--oms-muted);
  border-top: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-details-statuses,
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-details-statuses .badge {
  display: inline-flex;
  align-items: center;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-details-statuses {
  gap: 12px;
  margin-top: 6px;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-details-statuses .badge {
  margin: 0;
  font-size: var(--oms-text-meta);
  font-weight: var(--oms-weight-medium);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  color: #8b97a9;
  font-size: 10px;
  text-align: center;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 5px;
  left: calc(50% + 8px);
  right: calc(-50% + 8px);
  height: 2px;
  background: #dce4ef;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-progress-dot {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 2px solid #c7d0df;
  border-radius: 50%;
  background: #fff;
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li.complete .sales-progress-dot,
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li.active .sales-progress-dot {
  border-color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li.complete .sales-progress-dot {
  background: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li.complete,
.app:not(.label-fullscreen-mode) #module-salesOrders .sales-delivery-progress li.active {
  color: var(--oms-blue);
}

@media (max-width: 1120px) {
  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-search-wrap {
    flex: 1 1 100%;
    max-width: none;
  }

  .app:not(.label-fullscreen-mode) #module-salesOrders .sales-order-toolbar .toolbar-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.app:not(.label-fullscreen-mode) .oms-document-workspace > .oms-list-panel > .table-panel {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) .oms-document-row {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) .oms-document-row:hover {
  background: #f8fbff;
}

.app:not(.label-fullscreen-mode) .oms-document-row.selected {
  background: #edf4ff;
  box-shadow: inset 3px 0 0 var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .oms-document-details {
  min-width: 0;
  overflow: auto;
  border-left: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) .details-closed > .oms-document-details {
  display: none;
}

.oms-document-details-head,
.oms-document-details-section,
.oms-document-details-actions {
  padding: 18px 20px;
  border-bottom: 1px solid var(--oms-line);
}

.oms-document-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.oms-document-details-head strong,
.oms-document-details-head span {
  display: block;
}

.oms-document-details-head strong {
  color: var(--oms-ink);
  font-size: 16px;
}

.oms-document-details-head span {
  margin-top: 5px;
  color: var(--oms-muted);
  font-size: 12px;
}

.oms-document-details-head button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #68758a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.oms-document-details-head button:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.oms-document-details-section h3 {
  margin: 0 0 14px;
  color: var(--oms-ink);
  font-size: 14px;
}

.oms-document-details-section dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.oms-document-details-section dl > div {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
}

.oms-document-details-section dt,
.oms-document-details-section dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.oms-document-details-section dt {
  color: #8290a5;
}

.oms-document-details-section dd {
  color: #34445e;
  text-align: right;
  overflow-wrap: anywhere;
}

.oms-document-item-list {
  display: grid;
  gap: 0;
}

.oms-document-item {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--oms-line);
}

.oms-document-item:last-child {
  border-bottom: 0;
}

.oms-document-item span {
  color: #334158;
  font-size: 12px;
}

.oms-document-item b {
  color: #7a879a;
  font-size: 11px;
  font-weight: 600;
}

.oms-document-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.oms-document-total span {
  color: #66758b;
  font-size: 12px;
}

.oms-document-total strong {
  color: var(--oms-blue);
  font-size: 20px;
}

.oms-document-details-actions {
  display: flex;
  gap: 8px;
  border-bottom: 0;
}

.oms-document-details-actions .btn {
  flex: 1 1 0;
}

.oms-document-details-empty {
  padding: 48px 20px;
  color: var(--oms-muted);
  text-align: center;
}

/* Customer and supplier master-detail workspaces. */
.app:not(.label-fullscreen-mode) .oms-partner-workspace {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  overflow: hidden;
  border: 1px solid var(--oms-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--oms-shadow);
}

.app:not(.label-fullscreen-mode) .oms-partner-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) .oms-partner-workspace > .oms-list-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .oms-partner-workspace :is(#customers-table, #suppliers-table) {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers).active {
  height: calc(100dvh - 106px);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  padding-right: 0;
  overflow: hidden;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .oms-list-toolbar {
  flex: 0 0 auto;
}

.app:not(.label-fullscreen-mode) .partner-directory-toolbar {
  position: relative;
  z-index: 8;
  align-items: end;
  overflow: visible;
}

.app:not(.label-fullscreen-mode) :is(.customer-directory-toolbar, .supplier-directory-toolbar) {
  align-items: center;
}

.app:not(.label-fullscreen-mode) .partner-directory-toolbar .partner-search-wrap {
  position: relative;
  flex: 0 1 560px;
  width: min(560px, 100%);
  max-width: 560px;
  min-width: 240px;
}

.app:not(.label-fullscreen-mode) .partner-directory-toolbar .partner-search-wrap > svg {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #7b879d;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transform: translateY(-50%);
}

.app:not(.label-fullscreen-mode) .partner-directory-toolbar .partner-search-wrap > input {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 44px;
  min-height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
  color: #24324a;
  font: inherit;
  font-weight: 500;
}

.app:not(.label-fullscreen-mode) :is(.customer-directory-toolbar, .supplier-directory-toolbar) .partner-toolbar-actions {
  align-items: center;
}

.app:not(.label-fullscreen-mode) :is(.customer-directory-toolbar, .supplier-directory-toolbar) .partner-toolbar-actions > .btn {
  height: 44px;
  min-height: 44px;
}

.app:not(.label-fullscreen-mode) :is(.customer-directory-toolbar, .supplier-directory-toolbar) .partner-toolbar-actions > .partner-action-menu > summary.btn {
  height: 44px;
  min-height: 44px;
}

.app:not(.label-fullscreen-mode) .partner-filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
  align-items: end;
}

.app:not(.label-fullscreen-mode) .partner-filter-fields > label {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #52627a;
  font-size: 12px;
  font-weight: 650;
}

.app:not(.label-fullscreen-mode) .partner-filter-fields input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--oms-line-strong);
  border-radius: 8px;
  background: #fff;
}

.app:not(.label-fullscreen-mode) .supplier-directory-toolbar .partner-filter-fields > label {
  gap: 0;
}

.app:not(.label-fullscreen-mode) .customer-directory-toolbar .partner-filter-fields .oms-search-field > svg {
  top: auto;
  bottom: 13px;
  transform: none;
}

.app:not(.label-fullscreen-mode) .partner-filter-fields .oms-search-field > input {
  padding-left: 42px;
}

.app:not(.label-fullscreen-mode) .partner-toolbar-actions {
  align-items: end;
}

.partner-action-menu {
  position: relative;
}

.partner-action-menu > summary {
  min-width: 112px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  list-style: none;
}

.partner-action-menu > summary::-webkit-details-marker {
  display: none;
}

.partner-action-menu > summary svg {
  width: 14px;
  height: 14px;
}

.partner-action-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  width: 112px;
  padding: 6px;
  border: 1px solid var(--oms-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(42, 62, 94, .14);
}

.app:not(.label-fullscreen-mode) .partner-action-popover button,
.app:not(.label-fullscreen-mode) .partner-action-popover label {
  width: 100%;
  min-height: var(--oms-menu-item-height);
  display: flex;
  align-items: center;
  padding: 0 10px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #42516a;
  font: inherit;
  font-size: var(--oms-menu-item-font-size) !important;
  font-weight: var(--oms-menu-item-font-weight) !important;
  line-height: 1.3;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) .partner-action-popover button:hover,
.app:not(.label-fullscreen-mode) .partner-action-popover label:hover {
  background: var(--oms-blue-soft);
}

@media (max-width: 1080px) {
  .app:not(.label-fullscreen-mode) .partner-directory-toolbar {
    align-items: stretch;
  }

  .app:not(.label-fullscreen-mode) .partner-directory-toolbar .partner-search-wrap {
    flex: 1 1 420px;
    max-width: none;
  }

  .app:not(.label-fullscreen-mode) .partner-filter-fields {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

.app:not(.label-fullscreen-mode) .oms-partner-workspace :is(#customers-table, #suppliers-table) > .table-panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.app:not(.label-fullscreen-mode) .oms-partner-workspace :is(#customers-table, #suppliers-table) .table-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.app:not(.label-fullscreen-mode) .oms-partner-workspace :is(#customers-table, #suppliers-table) .table-pagination {
  flex: 0 0 auto;
  margin-top: auto;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .partner-table {
  width: 100%;
  table-layout: fixed;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .partner-table :is(th, td) {
  height: 52px;
  padding: 9px 10px;
  text-align: center !important;
  vertical-align: middle !important;
  line-height: 1.45;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .partner-table thead th {
  background: #f7f9fc;
  color: #68758a;
}

.app:not(.label-fullscreen-mode) :is(#module-customers .customer-partner-table, #module-suppliers .supplier-partner-table) thead th:first-child {
  border-top-left-radius: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-customers .customer-partner-table, #module-suppliers .supplier-partner-table) thead th:last-child {
  border-top-right-radius: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-customers .customer-partner-table, #module-suppliers .supplier-partner-table) thead .col-resizer::after {
  display: none;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .partner-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-name-link,
.partner-view-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--oms-blue);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.partner-name-link:hover,
.partner-view-button:hover {
  text-decoration: underline;
}

.partner-name-link:focus-visible,
.partner-view-button:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 3px;
  border-radius: 3px;
}

.partner-row-actions {
  overflow: visible !important;
}

.partner-row-menu-trigger {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5d6b81;
  cursor: pointer;
}

.partner-row-menu-trigger:hover,
.partner-row-menu-trigger[aria-expanded="true"] {
  background: #e8f1ff;
  color: var(--oms-blue);
}

.partner-row-menu-trigger:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 2px;
}

.partner-row-menu-trigger svg {
  width: 18px;
  height: 18px;
}

.app:not(.label-fullscreen-mode) .oms-partner-row {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) .oms-partner-row:hover {
  background: #f8fbff;
}

.app:not(.label-fullscreen-mode) .oms-partner-row.selected {
  background: #edf4ff;
  box-shadow: inset 3px 0 0 var(--oms-blue);
}

.app:not(.label-fullscreen-mode) .oms-partner-details {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) .details-closed > .oms-partner-details {
  display: none;
}

.oms-partner-details-head,
.oms-partner-details section,
.oms-partner-details-actions {
  padding: 18px 20px;
  border-bottom: 1px solid var(--oms-line);
}

.oms-partner-details-head {
  min-height: 70px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.partner-detail-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.partner-detail-title-line .product-status-pill {
  flex: 0 0 auto;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .product-status-pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: var(--oms-text-meta);
  font-weight: var(--oms-weight-medium);
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .product-status-pill.enabled {
  background: var(--oms-green-soft);
  color: var(--oms-green);
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .product-status-pill.disabled {
  background: #f2f4f7;
  color: #7a879b;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .oms-details-empty {
  height: 100%;
  display: grid;
  place-content: center;
  gap: 7px;
  padding: 24px;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
  text-align: center;
}

.app:not(.label-fullscreen-mode) :is(#module-customers, #module-suppliers) .oms-details-empty strong {
  color: #40506a;
}

.oms-partner-details-head strong,
.oms-partner-details-head span {
  display: block;
}

.oms-partner-details-head strong {
  color: var(--oms-ink);
  font-size: 16px;
}

.oms-partner-details-head span {
  margin-top: 5px;
  color: var(--oms-muted);
  font-size: 12px;
}

.oms-partner-details-head button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #68758a;
  font-size: 22px;
  cursor: pointer;
}

.oms-partner-details-head button:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.oms-partner-details h4 {
  margin: 0 0 14px;
  color: var(--oms-ink);
  font-size: 14px;
}

.oms-partner-details dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.oms-partner-details dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.oms-partner-details dt,
.oms-partner-details dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.oms-partner-details dt {
  color: #8290a5;
}

.oms-partner-details dd {
  color: #34445e;
  text-align: right;
  overflow-wrap: anywhere;
}

.oms-partner-details-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
  border-bottom: 0;
  border-top: 1px solid var(--oms-line);
  background: #fff;
}

.oms-partner-details-actions .btn {
  flex: 1 1 0;
}

.oms-partner-details-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}

.oms-partner-details-scroll > section:last-child {
  border-bottom: 0;
}

.partner-address-list,
.partner-recent-list {
  display: grid;
  gap: 8px;
}

.partner-address-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--oms-line);
  border-radius: 8px;
  color: #42516a;
  font-size: 12px;
  line-height: 1.55;
}

.partner-address-card.default {
  border-color: #9fc3ff;
  background: #f7faff;
}

.partner-address-card b {
  color: var(--oms-blue);
}

.partner-detail-group {
  border-bottom: 1px solid var(--oms-line);
}

.partner-detail-group > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  color: var(--oms-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.partner-detail-group > summary::-webkit-details-marker {
  display: none;
}

.partner-detail-group > summary::after {
  content: "⌄";
  margin-left: auto;
  color: #718097;
  transition: transform .16s ease;
}

.partner-detail-group[open] > summary::after {
  transform: rotate(180deg);
}

.partner-detail-group > :not(summary) {
  margin: 0 20px 16px;
}

.partner-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.partner-category-list > span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
  font-size: 12px;
}

.partner-recent-list button {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--oms-line);
  border-radius: 8px;
  background: #fff;
  color: #42516a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.partner-recent-list button:hover {
  border-color: #9fc3ff;
  background: #f7faff;
}

.partner-recent-list button b {
  color: var(--oms-blue);
}

.partner-detail-empty {
  padding: 12px;
  color: var(--oms-muted);
  font-size: 12px;
  text-align: center;
}

/* Keep table typography readable and pagination at the lower workspace edge. */
.app:not(.label-fullscreen-mode) :is(
  #module-products,
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders,
  #module-invoices,
  #module-payments
) .data-table thead th {
  height: 44px !important;
  font-size: 12px !important;
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) :is(
  #module-products,
  #module-customers,
  #module-suppliers,
  #module-quotes,
  #module-purchaseOrders,
  #module-deliveries,
  #module-salesOrders,
  #module-invoices,
  #module-payments
) .data-table tbody td {
  font-size: 12px;
}

@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode) :is(.oms-document-workspace, .oms-partner-workspace) {
    grid-template-columns: minmax(0, 1fr) 292px;
  }
}

@media (max-width: 1280px) and (min-width: 901px) {
  .app:not(.label-fullscreen-mode) .oms-partner-workspace {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) :is(.oms-document-workspace, .oms-partner-workspace) {
    display: block;
    overflow: visible;
  }

  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details) {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 45;
    width: min(330px, 90vw);
    border-left: 1px solid var(--oms-line);
    box-shadow: -14px 0 32px rgba(42, 62, 94, .14);
  }
}

/* Invoice and payment workspaces use the sales-order list/detail language. */
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .oms-finance-workspace {
  grid-template-columns: minmax(0, 1fr) 350px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .oms-finance-workspace.details-closed {
  grid-template-columns: minmax(0, 1fr);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .oms-finance-workspace.details-closed .finance-details-panel {
  display: none;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-list-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-list-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap {
  position: relative;
  width: min(360px, 34vw);
  min-width: 220px;
  display: block;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 17px;
  height: 17px;
  color: #7b879d;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap input,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-export-button {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap input {
  width: 100%;
  padding: 0 14px 0 40px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  color: #24324a;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap input:focus {
  border-color: #8db7ff;
  box-shadow: 0 0 0 3px rgba(42, 105, 234, .1);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-export-button {
  min-width: 104px;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-list-panel .table-scroll {
  overflow: auto;
  border-radius: 10px 10px 0 0;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table :is(th, td),
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead th,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead th.resizable-th {
  height: 50px !important;
  padding: 10px 9px !important;
  color: #43516a;
  font-size: 12px !important;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead th {
  border-right: 0 !important;
  background: #f6f8fb;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead th:first-child {
  border-top-left-radius: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead th:last-child {
  border-top-right-radius: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table .finance-action-col {
  position: sticky;
  right: 0;
  width: 64px;
  min-width: 64px;
  max-width: 64px;
  z-index: 5;
  background: #fff;
  background-clip: padding-box;
  box-shadow: -2px 0 5px rgb(31 45 70 / 10%);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead .finance-action-col {
  z-index: 8;
  background: #f6f8fb;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table thead .col-resizer::after {
  display: none;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody td {
  height: 54px;
  background: transparent;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table .num {
  text-align: center;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody tr {
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody tr:hover,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody tr.selected {
  background: #f2f7ff;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody tr:hover .finance-action-col,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody tr.selected .finance-action-col {
  background: #f2f7ff;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-table tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-history-table {
  min-width: 620px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-history-table .finance-history-actions {
  width: 126px;
  min-width: 126px;
  text-align: center;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-history-actions .btn + .btn {
  margin-left: 6px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-legacy-mark {
  display: block;
  margin-top: 3px;
  color: #8a94a6;
  font-size: 11px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-order-cell :is(b, small) {
  display: block;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-order-cell b {
  color: var(--oms-blue);
  font-weight: var(--oms-weight-medium);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-order-cell small {
  margin-top: 3px;
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .quote-row-actions {
  overflow: visible;
  text-align: center !important;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-row-menu-trigger {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5d6b81;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-row-menu-trigger:hover,
.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-row-menu-trigger[aria-expanded="true"] {
  background: #e8f1ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-row-menu-trigger:focus-visible {
  outline: 2px solid var(--oms-blue);
  outline-offset: 2px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-row-menu-trigger svg {
  width: 18px;
  height: 18px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-head {
  flex: 0 0 auto;
  min-height: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-head .quote-details-identity :is(strong, span) {
  display: block;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-head .quote-details-identity strong {
  color: var(--oms-ink);
  font-size: 15px;
  line-height: 1.4;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-head .quote-details-identity > span {
  margin-top: 4px;
  color: var(--oms-blue);
  font-size: 11px;
  font-weight: 700;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-heading-status {
  margin-top: 8px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-head .quote-details-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #65738a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-head .quote-details-close:hover {
  background: var(--oms-blue-soft);
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-section {
  padding: 16px;
  border-bottom: 1px solid var(--oms-line);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-section h3 {
  margin: 0 0 14px;
  color: var(--oms-ink);
  font-size: 12px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-section h3 span {
  color: #7b889c;
  font-weight: 500;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-list :is(dt, dd) {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-list dt {
  color: var(--oms-muted);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-scroll .quote-detail-list dd {
  max-width: 190px;
  color: #34445e;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-amount-grid > div {
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px;
  border: 1px solid #e6edf6;
  border-radius: 8px;
  background: #f7f9fc;
  text-align: center;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-amount-grid span {
  color: var(--oms-muted);
  font-size: var(--oms-text-meta);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-amount-grid b {
  color: var(--oms-blue);
  font-size: 13px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-amount-grid .grand-total {
  border-color: #bcd2fb;
  background: #eef4ff;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-products-details .quote-item-table-wrap {
  overflow-x: auto;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-item-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  table-layout: fixed;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-item-table :is(th, td) {
  height: 38px;
  padding: 7px 8px;
  border-bottom: 1px solid var(--oms-line);
  color: #4c5b72;
  font-size: 10px;
  text-align: center;
  vertical-align: middle;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-item-table th {
  background: #f6f8fb;
  color: #6f7d92;
  font-weight: 700;
  white-space: nowrap;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--oms-line);
  background: #fff;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-actions .btn {
  width: 100%;
  min-height: 42px;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-status-partial {
  background: #eaf2ff;
  color: var(--oms-blue);
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-status-pending {
  background: #f1f4f8;
  color: #738096;
}

.app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-status-done {
  background: #eaf8f1;
  color: #169b62;
}

@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .oms-finance-workspace {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap {
    width: min(300px, 30vw);
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-list-controls,
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-search-wrap {
    width: 100%;
    min-width: 0;
  }

  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel {
    position: fixed;
    top: 72px;
    right: 0;
    bottom: 0;
    z-index: 45;
    width: min(350px, 92vw);
    box-shadow: -14px 0 32px rgba(42, 62, 94, .14);
  }
}

/* Final responsive cascade overrides. These intentionally live after every
   module stylesheet so legacy breakpoint rules cannot restore fixed widths. */
@media (max-width: 1180px) {
  .app:not(.label-fullscreen-mode),
  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    max-height: 100dvh;
    padding-inline: 9px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app:not(.label-fullscreen-mode) :is(.brand-copy, .nav-copy, .nav-section-label) {
    display: none;
  }

  .app:not(.label-fullscreen-mode) .nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .app:not(.label-fullscreen-mode) .nav button {
    justify-content: center;
    padding-inline: 7px;
  }

  .app:not(.label-fullscreen-mode) .sidebar-collapse-button {
    display: none;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-workspace,
  .app:not(.label-fullscreen-mode) #module-statements .oms-statements-workspace,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .oms-quotes-workspace,
  .app:not(.label-fullscreen-mode) :is(.oms-document-workspace, .oms-partner-workspace),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .oms-finance-workspace,
  #module-labels :is(.label-template-manager-workspace, .label-stage1-generation-workspace) {
    grid-template-columns: minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel,
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel,
  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel,
  #module-labels :is(.label-template-details, .label-generation-details) {
    position: fixed;
    z-index: 145;
    top: 62px;
    right: 0;
    bottom: 0;
    width: min(380px, calc(100vw - 72px));
    height: auto;
    max-height: none;
    border-left: 1px solid var(--oms-line);
    background: #fff;
    box-shadow: -14px 0 32px rgba(42, 62, 94, .16);
  }

  .app.label-fullscreen-mode .label-stage1-shell {
    height: auto;
    min-height: calc(100dvh - 20px);
    max-height: none;
    overflow: visible;
  }

  .app.label-fullscreen-mode .label-stage1-head {
    grid-template-columns: 1fr;
  }

  .app.label-fullscreen-mode .label-stage1-actions {
    min-width: 0;
    flex-wrap: wrap;
  }

  .app.label-fullscreen-mode .label-stage1-template-control {
    min-width: min(320px, 100%);
  }

  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: 180px minmax(0, 1fr);
    min-width: 0;
    align-items: start;
    overflow: visible;
  }

  .app.label-fullscreen-mode .label-stage1-left-stack {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: auto;
  }

  .app.label-fullscreen-mode :is(.label-stage1-content, .label-stage1-right-stack) {
    grid-column: 2;
    height: auto;
    min-height: 620px;
  }

  .app.label-fullscreen-mode .label-stage1-right-stack {
    grid-template-rows: var(--label-stage1-preview-height) minmax(240px, auto);
    overflow: visible;
  }
}

@media (max-width: 900px) {
  .app:not(.label-fullscreen-mode),
  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    position: sticky;
    width: 64px;
    height: 100dvh;
    max-height: 100dvh;
    padding-inline: 7px;
  }

  .app:not(.label-fullscreen-mode) :is(.brand-copy, .nav-copy, .nav-section-label) {
    display: none;
  }

  .app:not(.label-fullscreen-mode) .nav {
    grid-template-columns: 1fr;
  }

  .app:not(.label-fullscreen-mode) .nav button {
    justify-content: center;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel,
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel,
  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel,
  #module-labels :is(.label-template-details, .label-generation-details) {
    left: 64px;
    width: auto;
    max-width: none;
    border-radius: 0;
  }
}

@media (max-width: 820px) {
  .app.label-fullscreen-mode .label-stage1-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .app.label-fullscreen-mode :is(.label-stage1-left-stack, .label-stage1-content, .label-stage1-right-stack) {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
  }

  .app.label-fullscreen-mode .label-stage1-tools,
  .app.label-fullscreen-mode .label-stage1-tablist {
    flex-flow: row wrap;
  }

  .app.label-fullscreen-mode .label-stage1-tab {
    width: auto;
    flex: 1 1 132px;
  }
}

@media (max-width: 620px) {
  .app:not(.label-fullscreen-mode),
  .app.sidebar-collapsed:not(.label-fullscreen-mode) {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .app:not(.label-fullscreen-mode) .sidebar {
    width: 56px;
    padding-inline: 5px;
  }

  .app:not(.label-fullscreen-mode) #module-products .product-details-panel,
  .app:not(.label-fullscreen-mode) #module-statements .statement-details-panel,
  .app:not(.label-fullscreen-mode) :is(#module-quotes, #module-purchaseOrders, #module-salesOrders, #module-deliveries) .quote-details-panel,
  .app:not(.label-fullscreen-mode) :is(.oms-document-details, .oms-partner-details),
  .app:not(.label-fullscreen-mode) :is(#module-invoices, #module-payments) .finance-details-panel,
  #module-labels :is(.label-template-details, .label-generation-details) {
    left: 56px;
  }

  .app.label-fullscreen-mode .label-stage1-command-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app.label-fullscreen-mode .label-stage1-command-actions .btn {
    width: 100%;
    min-width: 0;
  }
}
/* Settings: compact role matrix and grouped employee account editor. */
#price-permissions-panel .price-permission-intro { font-size:14px; line-height:1.65; margin-bottom:16px; }
#price-permissions-panel .price-permission-intro p { margin:0 0 8px; }
#price-permissions-panel summary { cursor:pointer; color:var(--oms-ink); }
#price-permissions-panel .price-permission-scroll { overflow-x:auto; }
#price-permissions-panel .price-permission-list { min-width:550px; border:1px solid var(--oms-line-strong); border-radius:8px; overflow:hidden; }
#price-permissions-panel .price-permission-row { display:grid; grid-template-columns:minmax(140px,1.2fr) minmax(110px,1fr) minmax(110px,1fr) minmax(160px,1.2fr); gap:16px; align-items:center; padding:12px 16px; margin:0; border:0; border-bottom:1px solid var(--oms-line-strong); text-align:center; font-size:14px; }
#price-permissions-panel .price-permission-row:last-child { border-bottom:0; }
#price-permissions-panel .price-permission-heading { background:#f7f9fc; font-weight:600; }
#price-permissions-panel .price-permission-row label { margin:0; }
#price-permissions-panel .price-permission-row [hidden] { display:none; }
#price-permissions-panel .price-permission-row select { min-height:34px; height:34px; padding:4px 10px; font-size:14px; }
#price-permissions-panel .price-permission-status { display:block; font-size:12px; line-height:1.4; margin-top:4px; }

/* Unified position permissions */
#role-permissions-panel { display:grid; gap:12px; }
#role-permissions-panel .role-permission-intro {
  padding:12px 14px;
  border:1px solid #dbe5f2;
  border-radius:10px;
  background:#f7faff;
  color:var(--oms-ink);
}
#role-permissions-panel .role-permission-intro strong { font-size:13px; }
#role-permissions-panel .role-permission-intro p { margin:4px 0 0; color:var(--oms-muted); font-size:11px; line-height:1.55; }
#role-permissions-panel .role-permission-picker { display:grid; grid-template-columns:auto minmax(240px,360px); align-items:center; gap:10px; }
#role-permissions-panel .role-permission-picker label { margin:0; font-size:11px; font-weight:700; }
#role-permissions-panel .role-permission-picker select { width:100%; min-height:34px; height:34px; font-size:11px; }
#role-permissions-panel .role-permission-form { display:block; margin:0; padding:0; border:0; }
#role-permissions-panel .role-permission-tools { display:grid; grid-template-columns:minmax(180px,1fr) auto minmax(200px,280px) auto; gap:8px; align-items:center; margin-bottom:10px; }
#role-permissions-panel .role-permission-tools input,
#role-permissions-panel .role-permission-tools select { min-height:32px; height:32px; font-size:11px; }
#role-permissions-panel .role-permission-filter { display:flex; align-items:center; gap:6px; margin:0; padding:0 6px; color:var(--oms-muted); font-size:11px; font-weight:400; white-space:nowrap; }
#role-permissions-panel .role-permission-filter input { width:14px; height:14px; min-height:0; margin:0; padding:0; accent-color:var(--oms-blue); }
#role-permissions-panel .role-permission-tools .btn { min-height:32px; height:32px; padding:0 12px; font-size:11px; }
#role-permissions-panel .role-permission-scroll { max-height:calc(100dvh - 350px); min-height:300px; overflow:auto; border:1px solid var(--oms-line-strong); border-radius:8px; }
#role-permissions-panel table { width:100%; min-width:1030px; border-collapse:separate; border-spacing:0; table-layout:fixed; }
#role-permissions-panel th,
#role-permissions-panel td { height:44px; padding:5px 6px; border-bottom:1px solid var(--oms-line-strong); border-right:1px solid #edf1f6; vertical-align:middle; text-align:center; }
#role-permissions-panel thead th { position:sticky; z-index:3; top:0; height:40px; padding:5px 6px; border-bottom:1px solid var(--oms-line-strong); border-right:1px solid #edf1f6; background:#f6f8fb; color:var(--oms-muted); font-size:11px; font-weight:700; text-align:center; white-space:nowrap; }
#role-permissions-panel thead th:first-child,
#role-permissions-panel tbody th { position:sticky; z-index:2; left:0; width:126px; }
#role-permissions-panel thead th:first-child { z-index:4; left:0; text-align:left; }
#role-permissions-panel tbody th { height:44px; padding:5px 10px; border-bottom:1px solid var(--oms-line-strong); border-right:1px solid var(--oms-line-strong); color:var(--oms-ink); background:#fbfcfe; font-size:11px; font-weight:700; text-align:left; white-space:nowrap; }
#role-permissions-panel thead th:not(:first-child) { width:90px; }
#role-permissions-panel tbody tr:last-child > * { border-bottom:0; }
#role-permissions-panel .role-permission-action {
  display:block;
  margin:0;
  font-size:10px;
  font-weight:400;
}
#role-permissions-panel .role-permission-action select { width:100%; min-height:28px; height:28px; padding:2px 20px 2px 6px; border-radius:6px; font-size:10px; font-weight:400; }
#role-permissions-panel .role-permission-action select[data-state="allow"] { border-color:#a7e1ce; background:#effaf6; color:#08775b; }
#role-permissions-panel .role-permission-action select[data-state="deny"] { border-color:#fecaca; background:#fff5f5; color:#b42318; }
#role-permissions-panel .role-permission-action select[data-state="default"] { background:#fff; color:#52627a; }
#role-permissions-panel .role-permission-action.is-protected { color:#8b5e21; }
#role-permissions-panel .role-permission-action.is-protected b { display:inline-flex; align-items:center; gap:3px; font-size:10px; font-weight:600; white-space:nowrap; }
#role-permissions-panel .role-permission-na { color:#a0aec0; font-size:11px; }
#role-permissions-panel .role-permission-footer { position:sticky; z-index:5; bottom:0; display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:10px; padding:10px 0 0; background:#fff; }
#role-permissions-panel .role-permission-footer [role="status"] { margin-right:auto; color:var(--oms-muted); font-size:12px; }
#role-permissions-panel .role-permission-footer .btn { min-height:32px; height:32px; padding:0 14px; font-size:11px; }
#role-permissions-panel .role-permission-footer .permission-change-count { color:var(--oms-blue); font-weight:700; }
@media (max-width:760px) {
  #role-permissions-panel .role-permission-picker { grid-template-columns:1fr; align-items:stretch; }
  #role-permissions-panel .role-permission-picker select { width:100%; }
  #role-permissions-panel .role-permission-tools { grid-template-columns:1fr 1fr; }
  #role-permissions-panel .role-permission-tools input { grid-column:1/-1; }
  #role-permissions-panel .role-permission-footer { align-items:stretch; flex-direction:column; }
}
#modal:has(.employee-account-form) .modal-card { display:flex; flex-direction:column; width:min(880px,calc(100vw - 32px)); max-height:90dvh; overflow:hidden; }
#modal:has(.employee-account-form) .modal-card > .panel-head { flex:0 0 auto; }
#modal:has(.employee-account-form) .modal-card > .panel-body { min-height:0; max-height:none; overflow:auto; }
#modal .employee-account-form { gap:16px 24px; }
#modal .employee-account-form .employee-section-title { font-size:15px; font-weight:600; margin:4px 0 0; padding:0 0 8px; border-bottom:1px solid var(--oms-line-strong); }
#modal:not(.large-workspace-modal) .employee-account-form :is(label,input,select,textarea) { font-size:14px; }
#modal .employee-account-form .employee-reset-option { display:flex; align-items:center; gap:10px; min-height:40px; margin:8px 0 0; cursor:pointer; }
#modal .employee-account-form input[type=checkbox] { width:16px; height:16px; min-width:16px; min-height:16px; padding:0; margin:0; flex:0 0 16px; accent-color:#2563eb; }
#modal .employee-account-form .muted { font-size:13px; margin:6px 0; }
#modal .employee-wechat-info summary { cursor:pointer; font-size:14px; }
#modal .employee-account-footer { position:sticky; bottom:0; background:#fff; border-top:1px solid var(--oms-line-strong); justify-content:flex-end; padding:16px 0; margin-top:16px; z-index:2; }
@media(max-width:640px) { #modal .employee-account-form { grid-template-columns:minmax(0,1fr); } }
