:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --ink: #172033;
  --text: #172033;
  --muted: #667085;
  --line: #d8dee8;
  --line-strong: #c8d0dc;
  --blue: #2563d9;
  --primary: #2563d9;
  --blue-dark: #1d4fb8;
  --blue-soft: #edf4ff;
  --green: #16835d;
  --green-soft: #eaf8f2;
  --amber: #b66b12;
  --amber-soft: #fff6e7;
  --red: #c43d3d;
  --red-soft: #fff1f1;
  --sidebar: #151c28;
  --sidebar-line: #2a3443;
}

/* Unified compact workbars for the four high-frequency admin pages. */
#orders .topbar,
#statistics .topbar,
#funds .topbar,
#entry .topbar {
  min-height: 46px;
  margin-bottom: 8px;
  padding: 0 2px 8px;
}

#orders .topbar h1,
#statistics .topbar h1,
#funds .topbar h1,
#entry .topbar h1 {
  font-size: 21px;
}

#orders .topbar p,
#statistics .topbar p,
#funds .topbar p,
#entry .topbar p {
  margin-top: 2px;
  font-size: 12px;
}

#orders .top-actions,
#funds .topbar > button {
  align-self: center;
}

#orders .top-actions button,
#funds .topbar > button {
  height: 32px;
  padding: 0 13px;
}

.orders-control-panel {
  flex: 0 0 auto;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

#orders .orders-utility-row {
  flex: 0 0 auto;
}

#orders .orders-control-panel .filters {
  display: grid;
  grid-template-columns: 204px 204px minmax(300px, 460px) 70px auto;
  align-items: center;
  justify-content: start;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  overflow: visible;
  border-bottom: 1px solid var(--line);
}

#orders .orders-control-panel .filters > input,
#orders .orders-control-panel .filters #fQ {
  width: 100%;
  min-width: 0;
  height: 32px;
}

#orders .orders-control-panel .date-filter-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  color: #586579;
  font-size: 12px;
}

#orders .orders-control-panel .date-filter-label input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding-right: 5px;
}

#orders .orders-control-panel #searchBtn {
  width: 70px;
  height: 32px;
  padding: 0;
}

#orders .orders-control-panel .toggle-label {
  justify-self: start;
  height: 32px;
  color: #586579;
  font-size: 12px;
}

#orders .orders-control-panel .toggle-label input {
  width: 16px;
  height: 16px;
}

#orders .orders-control-panel .order-edit-lockbar {
  min-height: 40px;
  margin: 0;
  padding: 5px 10px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fbfcfe;
}

#orders .order-edit-lockbar strong {
  display: inline-flex;
  align-items: center;
  min-width: 116px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid #efc3c3;
  border-radius: 5px;
  background: var(--red-soft);
  color: #ad3030;
  font-size: 12px;
}

#orders .order-edit-lockbar strong.unlocked {
  border-color: #b9dfd0;
  background: var(--green-soft);
  color: #0e6c4c;
}

#orders .order-edit-lockbar .password-chip {
  height: 28px;
  padding: 0 0 0 8px;
  overflow: hidden;
  border: 1px solid #cfd7e3;
  border-radius: 5px;
  background: #ffffff;
}

#orders .order-edit-lockbar .password-chip input {
  width: 138px;
  height: 26px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

#orders .order-edit-lockbar > span {
  min-width: 0;
  overflow: hidden;
  color: #667085;
  text-overflow: ellipsis;
}

#orders .orders-logistics-panel {
  min-height: 44px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 0;
}

#orders .orders-logistics-panel .panel-title {
  min-width: 104px;
  margin: 0;
  padding-left: 8px;
}

#orders .orders-logistics-panel .order-count-summary {
  min-height: 28px;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

#orders .orders-logistics-panel p {
  font-size: 12px;
}

#orders .orders-logistics-panel .actions {
  gap: 7px;
}

#orders .orders-logistics-panel input[type="file"],
#entry .entry-import-inline input[type="file"] {
  height: 32px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #cfd7e3;
  border-radius: 5px;
  background: #ffffff;
  color: #667085;
  font-size: 12px;
  line-height: 30px;
}

#orders .orders-logistics-panel input[type="file"] {
  width: 270px;
}

#orders .orders-logistics-panel input[type="file"]::file-selector-button,
#entry .entry-import-inline input[type="file"]::file-selector-button {
  height: 30px;
  margin-right: 9px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid #cfd7e3;
  background: #f5f7fa;
  color: #344054;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

#orders .orders-logistics-panel button,
#entry .entry-import-inline button {
  height: 32px;
}

#statistics .stats-search-panel {
  padding: 8px 10px;
}

.stats-toolbar-main,
.stats-toolbar-meta {
  display: grid;
  align-items: center;
  gap: 10px;
}

.stats-toolbar-main {
  grid-template-columns: minmax(340px, 620px);
  justify-content: start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.stats-toolbar-meta {
  grid-template-columns: minmax(520px, 1fr) auto;
  padding-top: 8px;
}

#statistics .stats-field-row,
#statistics .stats-search-row,
#statistics .stats-date-row,
#statistics .stats-total-row {
  min-width: 0;
  margin: 0;
}

#statistics .stats-field-row,
#statistics .stats-date-row {
  flex-wrap: nowrap;
}

#statistics .stats-field-row > span,
#statistics .stats-date-row > span:first-child {
  min-width: 58px;
  color: #586579;
  font-size: 12px;
}

#statistics .stats-chip {
  height: 30px;
  padding: 0 11px;
}

#statistics .stats-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 70px 88px;
  gap: 7px;
}

#statistics .stats-search-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
}

#statistics .stats-search-row button,
#statistics .stats-date-row button,
#statistics .stats-total-row button {
  height: 32px;
  padding: 0 11px;
}

#statistics .stats-date-row input {
  width: 142px;
  height: 32px;
}

#statistics .stats-tip {
  color: #7a8699;
  white-space: nowrap;
}

#statistics .stats-total-row {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 10px;
  font-size: 12px;
  white-space: nowrap;
}

#statistics .stats-total-row b {
  font-size: 17px;
}

#statistics .stats-total-row button {
  margin-left: 2px;
}

#statistics #statsScope {
  min-height: 18px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed #dbe1e9;
  font-size: 12px;
}

#funds .funds-finance-panel {
  overflow: hidden;
}

#funds .funds-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
}

#funds .funds-panel-head .panel-title {
  flex: 0 0 auto;
  min-width: 112px;
  margin: 0;
}

#funds .finance-summary-row {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0;
  overflow-x: auto;
}

#funds .finance-summary-row span {
  min-height: 34px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

#funds .finance-summary-row b {
  font-size: 16px;
}

#funds #paymentResult:empty {
  display: none;
}

#funds .funds-customer-toolbar {
  min-height: 40px;
  padding: 5px 10px;
  border-top: 0;
}

#funds .funds-customer-toolbar strong {
  min-width: 112px;
}

#funds .funds-customer-toolbar input {
  width: min(360px, 34vw);
  height: 30px;
}
#funds .funds-customer-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
#funds .funds-customer-search input { flex: 1 1 230px; }
#funds .funds-customer-search button { flex: 0 0 auto; white-space: nowrap; }

#entry .entry-input-panel {
  padding: 8px 10px;
  border-radius: 7px;
}

#entry .entry-input-panel .archive-select-row {
  grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(430px, .95fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}

#entry .entry-input-panel .archive-select-row label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #586579;
  font-size: 12px;
}

#entry .entry-input-panel .archive-select-row label input {
  width: 100%;
  height: 32px;
}

#entry .entry-import-inline {
  display: grid;
  grid-template-columns: auto minmax(210px, 1fr) auto;
  gap: 8px;
}

#entry .entry-import-inline span {
  color: #586579;
  font-size: 12px;
}

#entry .entry-import-inline input[type="file"] {
  width: 100%;
  min-width: 0;
}

#entry .entry-parse-row {
  gap: 10px;
}

#entry .entry-input-panel #rawInput {
  min-height: 48px;
  height: 48px;
  padding: 7px 10px;
  line-height: 1.35;
}

#entry .entry-inline-actions {
  gap: 7px;
}

#entry .entry-inline-actions button {
  height: 32px;
  padding: 0 13px;
}

#entry .entry-result-panel {
  margin-bottom: 8px;
}

@media (max-width: 1480px) {
  #orders .orders-control-panel .filters {
    grid-template-columns: 196px 196px minmax(280px, 420px) 66px auto;
  }

  .stats-toolbar-main {
    grid-template-columns: minmax(320px, 620px);
  }

  #statistics .stats-search-row {
    grid-template-columns: minmax(240px, 1fr) 70px 88px;
  }
}

@media (max-width: 1180px) {
  #orders .orders-control-panel .filters,
  #entry .entry-input-panel .archive-select-row {
    min-width: 1050px;
  }

  #orders .orders-control-panel {
    overflow-x: auto;
  }

  .stats-toolbar-meta {
    grid-template-columns: 1fr;
  }

  #statistics .stats-total-row {
    justify-content: flex-start;
  }

  #entry .entry-input-panel {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  #orders .topbar,
  #statistics .topbar,
  #funds .topbar,
  #entry .topbar {
    min-height: 0;
  }

  #orders .orders-control-panel .order-edit-lockbar {
    overflow-x: auto;
  }

  #statistics .stats-toolbar-main,
  #statistics .stats-toolbar-meta {
    display: block;
  }

  #statistics .stats-field-row,
  #statistics .stats-search-row,
  #statistics .stats-date-row,
  #statistics .stats-total-row {
    margin-bottom: 7px;
  }

  #statistics .stats-search-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) 64px 82px;
    min-width: 370px;
  }

  #funds .funds-panel-head {
    display: block;
  }

  #funds .funds-panel-head .panel-title {
    margin-bottom: 6px;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  display: flex;
  min-height: 100vh;
}

.login-screen {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.login-screen.hidden { display: none; }
.login-card {
  width: min(380px, calc(100vw - 28px));
  background: #fff;
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,.24);
}
.login-card h1 { font-size: 22px; }
.login-card input, .login-card button {
  width: 100%;
  margin-top: 10px;
}
.login-tip {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.login-link {
  display: block;
  margin-top: 12px;
  color: var(--blue);
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.login-link:hover { text-decoration: underline; }

.side {
  width: 184px;
  background: #111827;
  color: #fff;
  padding: 18px 12px;
  flex: 0 0 auto;
}

.brand { margin: 0 0 18px 4px; }
.brand strong { display: block; font-size: 18px; }
.brand span { display: block; color: #aeb6c6; font-size: 12px; margin-top: 4px; }

.nav {
  width: 100%;
  display: block;
  border: 0;
  color: #d8dee9;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 14px;
  cursor: pointer;
}
.nav.active, .nav:hover { background: #263244; color: #fff; }
.logout-nav {
  margin-top: 14px;
  color: #fecaca;
}
.logout-nav:hover { background: #3b1d24; color: #fff; }

.main {
  padding: 22px;
  width: calc(100vw - 184px);
}

.view { display: none; }
.view.active { display: block; }

/* Security boundary: portal routes may render only their dedicated view.
   This remains effective even if stale JS marks a management view active. */
body.customer-portal .main > .view:not(#customer),
body.supplier-portal .main > .view:not(#supplierPortal) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.customer-portal, .supplier-portal {
  display: block;
  background: #f5f6f8;
}
.customer-portal .side,
.customer-portal #loginScreen,
.supplier-portal .side,
.supplier-portal #loginScreen {
  display: none;
}
.customer-portal .main,
.supplier-portal .main {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 12px 0;
}
.customer-portal #customer {
  display: block;
}
.supplier-portal #supplierPortal {
  display: block;
}
.customer-portal #customer .topbar,
.supplier-portal #supplierPortal .topbar {
  padding: 4px 0 0;
  margin-bottom: 6px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.portal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
h1 { margin: 0; font-size: 24px; }
p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
#entry .topbar {
  margin-bottom: 5px;
}
#entry .topbar h1 {
  font-size: 19px;
}
#entry .topbar p {
  margin-top: 0;
  font-size: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}
.panel-title { font-weight: 700; margin-bottom: 12px; }
.result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.result-title-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.result-count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 750;
}
.compact-panel { margin-top: 12px; padding: 12px; }
.compact-panel p { margin-bottom: 8px; }
.orders-logistics-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 7px 10px;
}
.orders-logistics-panel .panel-title {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}
.orders-logistics-panel .order-count-summary {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  min-height: 30px;
  width: max-content;
  white-space: nowrap;
  line-height: 1;
}
.orders-logistics-panel .order-count-summary b {
  font-size: 16px;
}
.orders-logistics-panel p {
  flex: 1 1 auto;
  min-width: 80px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.orders-logistics-panel .actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin: 0;
}
.orders-logistics-panel input[type="file"] {
  width: 240px;
  height: 30px;
}
.orders-logistics-panel button {
  height: 30px;
}
.orders-logistics-panel .mini-result {
  flex: 0 1 220px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logistics-template-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 13px;
  border: 1px solid #8dd9c1;
  border-radius: 6px;
  background: #e9f8f2;
  color: #087f5b;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.logistics-template-link:hover {
  border-color: #24a47b;
  background: #d9f3e9;
  color: #066c4d;
}
.logistics-import-modal-panel {
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}
.logistics-import-modal-panel .modal-bar > div {
  display: grid;
  gap: 4px;
}
.logistics-import-modal-panel .modal-bar small {
  color: #8190a8;
  font-weight: 500;
}
.logistics-import-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px 18px;
  color: #94a0b4;
  border-bottom: 1px solid #e5eaf2;
}
.logistics-import-steps b {
  text-align: center;
  padding: 9px;
  border-radius: 9px;
  background: #f6f8fc;
}
.logistics-import-steps .active { color: #2f5be7; background: #edf3ff; }
.logistics-import-file,
.logistics-import-tip {
  margin: 14px 18px 0;
  padding: 12px 14px;
  border: 1px solid #dfe6f2;
  border-radius: 10px;
  background: #fafcff;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.logistics-import-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 14px 18px 0;
}
.logistics-import-stats > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid;
}
.logistics-import-stats b { font-size: 24px; }
.logistics-import-stats .ok { color: #16825f; background: #effaf5; border-color: #bfe8d6; }
.logistics-import-stats .multi { color: #315fd7; background: #f0f4ff; border-color: #cbd8ff; }
.logistics-import-stats .warn { color: #b56b0c; background: #fff8e9; border-color: #f0d39c; }
.logistics-import-stats .error { color: #d84444; background: #fff1f1; border-color: #f3c4c4; }
.logistics-import-tip { color: #315fd7; background: #f4f7ff; }
.logistics-preview-wrap {
  margin: 12px 18px 0;
  max-height: 340px;
  overflow: auto;
  border: 1px solid #e1e7f0;
  border-radius: 10px;
}
.logistics-preview-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.logistics-preview-table th,
.logistics-preview-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logistics-preview-table th { position: sticky; top: 0; background: #f7f9fc; z-index: 1; }
.logistics-check { display: inline-block; padding: 3px 8px; border-radius: 6px; font-size: 12px; }
.logistics-check.ok { color: #16825f; background: #e8f8f0; }
.logistics-check.warn { color: #b56b0c; background: #fff4dc; }
.logistics-check.error { color: #d84444; background: #ffeded; }
.logistics-import-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}
.special-delivery-modal-panel {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 14px;
}
.special-delivery-head > div { display: grid; gap: 3px; }
.special-delivery-head small { color: #8793a7; font-size: 12px; font-weight: 500; }
.modal-close-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  color: #6e7a90;
  background: transparent;
  font-size: 27px;
}
.special-delivery-order-info {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.25fr)
    minmax(70px, .55fr)
    minmax(105px, .8fr)
    62px
    minmax(86px, .65fr)
    minmax(118px, .82fr)
    minmax(210px, 1.7fr);
  margin: 16px 24px 0;
  overflow: hidden;
  border: 1px solid #dce4f1;
  border-radius: 9px;
  background: #f6f9ff;
}
.special-delivery-order-info > div {
  min-width: 0;
  padding: 9px 11px;
  border-right: 1px solid #e2e8f2;
}
.special-delivery-order-info > div:last-child { border-right: 0; }
.special-delivery-order-info small {
  display: block;
  margin-bottom: 4px;
  color: #8793a7;
  font-size: 11px;
}
.special-delivery-order-info strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #27344a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.special-delivery-order-info > div > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 4px;
}
.special-delivery-order-info button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  color: #61718c;
  border: 1px solid #d6dfed;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
}
.special-delivery-order-info button:hover {
  color: #315fd7;
  border-color: #aebff2;
  background: #edf2ff;
}
.special-delivery-types {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 10px 24px 20px;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  overflow: hidden;
}
.special-delivery-types button {
  border: 0;
  border-right: 1px solid #dce3ef;
  border-radius: 0;
  background: #fff;
}
.special-delivery-types button:last-child { border-right: 0; }
.special-delivery-types button.active { color: #fff; background: #3b5fe3; border-color: #3b5fe3; }
.special-delivery-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 28px;
  padding: 0 24px 18px;
}
.special-delivery-form-grid label,
.delivery-sign-grid label,
.special-delivery-remark {
  display: grid;
  gap: 6px;
  color: #536077;
  font-weight: 600;
}
.delivery-proof-section,
.delivery-sign-section {
  margin: 0 24px;
  padding: 16px;
  border: 1px solid #e0e6f0;
  border-radius: 10px;
  background: #fbfcff;
}
.delivery-tab-page:not(.hidden) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.delivery-tab-page:not(.hidden) > .special-delivery-form-grid {
  grid-column: 1 / -1;
  width: 100%;
}
.delivery-tab-page:not(.hidden) > .delivery-proof-section {
  margin-right: 0;
}
.delivery-tab-page:not(.hidden) > .delivery-sign-section {
  margin-left: 0;
}
.delivery-tab-page .delivery-sign-grid {
  grid-template-columns: minmax(145px, 190px) minmax(0, 1fr);
  gap: 12px;
}
.delivery-upload-row { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.delivery-upload-box {
  display: grid;
  place-items: center;
  min-width: 205px;
  min-height: 112px;
  padding: 12px;
  border: 1px dashed #bfcbe0;
  border-radius: 9px;
  color: #3b5fe3;
  cursor: pointer;
  background: #fff;
}
.delivery-upload-box span { font-size: 25px; line-height: 1; }
.delivery-upload-box small { color: #97a2b4; font-weight: 500; }
.delivery-upload-box input { display: none; }
.delivery-upload-name { color: #8995a8; }
.delivery-upload-previews {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 70px;
  margin-top: 10px;
  padding: 7px;
  overflow-x: auto;
  border-top: 1px solid #e5eaf2;
}
.delivery-preview-empty {
  color: #9aa5b6;
  font-size: 12px;
}
.delivery-thumb {
  position: relative;
  display: grid;
  flex: 0 0 68px;
  width: 68px;
  gap: 3px;
  justify-items: center;
  color: #647086;
}
.delivery-thumb > img,
.delivery-pdf-thumb {
  display: grid;
  place-items: center;
  width: 62px;
  height: 52px;
  object-fit: cover;
  border: 1px solid #d7dfec;
  border-radius: 6px;
  background: #fff;
}
.delivery-pdf-thumb {
  color: #d43d3d;
  font-size: 13px;
  font-weight: 800;
}
.delivery-thumb > small {
  width: 68px;
  overflow: hidden;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.delivery-thumb-remove {
  position: absolute;
  z-index: 3;
  top: -6px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e5484d;
  box-shadow: 0 2px 6px rgb(176 30 38 / 24%);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.delivery-thumb-remove:hover {
  background: #c92a30;
  transform: scale(1.08);
}
.delivery-thumb-zoom {
  position: fixed;
  z-index: 5000;
  top: 50%;
  left: 50%;
  display: none;
  width: min(620px, 72vw);
  height: min(620px, 72vh);
  padding: 12px;
  transform: translate(-50%, -50%);
  border: 1px solid #cbd5e5;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 70px rgba(24, 37, 64, .28);
  pointer-events: none;
}
.delivery-thumb > img:hover + .delivery-thumb-zoom {
  display: grid;
  place-items: center;
}
.delivery-thumb-zoom img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.delivery-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 24px;
  padding: 15px 8px 4px;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
}
.delivery-progress > div {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #9ba5b7;
}
.delivery-progress > div:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 62%;
  width: 76%;
  height: 2px;
  background: #dfe5ef;
}
.delivery-progress i {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #7e899d;
  background: #edf0f6;
  font-style: normal;
}
.delivery-progress .done,
.delivery-progress .active { color: #315fd7; }
.delivery-progress .done i,
.delivery-progress .active i { color: #fff; background: #315fd7; }
.delivery-progress .done::after { background: #315fd7 !important; }
.delivery-progress small { min-height: 18px; font-size: 11px; font-weight: 500; }
.delivery-sign-section { margin-top: 0; }
.delivery-sign-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  margin-top: 12px;
}
.delivery-upload-box.compact { min-width: 0; min-height: 126px; }
.delivery-sign-grid > div { display: grid; gap: 12px; }
.special-delivery-remark { margin: 14px 24px 0; }
.special-delivery-modal-panel textarea { min-height: 64px; resize: vertical; }
.special-delivery-view-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 6px 9px;
  color: #315fd7;
  border: 1px solid #c9d6ff;
  border-radius: 8px;
  background: #eef3ff;
  white-space: nowrap;
}
.special-delivery-view-tag:hover { background: #e2eaff; border-color: #9db3fb; }
.special-delivery-view-tag span { overflow: hidden; text-overflow: ellipsis; }
.customer-special-delivery-link {
  display: block;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #bfd0ff;
  border-radius: 8px;
  background: #eef3ff;
  color: #315bd8;
  font: inherit;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.customer-special-delivery-link:hover {
  border-color: #7e9bf3;
  background: #e2eaff;
}
.customer-logistics-display {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 27px;
  padding: 2px 7px 2px 4px;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  vertical-align: middle;
}
.customer-logistics-text-only {
  padding-right: 9px;
  padding-left: 9px;
}
.customer-logistics-number {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-logistics-copy {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #71809b;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
.customer-logistics-copy:hover {
  background: #edf3ff;
  color: #315bd8;
}
.customer-logistics-copy.copied {
  background: #e8f7ef;
  color: #147447;
}
.special-delivery-cell {
  grid-template-columns: minmax(0, 1fr) 29px;
  gap: 5px;
}
.special-delivery-row-btn {
  flex: 0 0 29px;
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 5px;
  color: #315fd7;
  border: 1px solid #c8d6ff;
  border-radius: 7px;
  background: #eef3ff;
}
.special-delivery-row-btn:hover:not(:disabled) {
  color: #fff;
  border-color: #315fd7;
  background: #315fd7;
  box-shadow: 0 3px 8px rgba(49, 95, 215, .2);
}
.special-delivery-row-btn:disabled { opacity: .4; cursor: not-allowed; }
.special-delivery-row-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.special-delivery-view-panel { width: min(720px, calc(100vw - 40px)); }
.special-delivery-view-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px 22px;
  background: #f7f9fd;
  border-bottom: 1px solid #e4e9f2;
}
.special-delivery-view-summary span {
  display: grid;
  gap: 6px;
  color: #8793a7;
  font-size: 12px;
}
.special-delivery-view-summary strong { color: #263247; font-size: 15px; }
.special-delivery-view-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 22px;
  padding: 20px 22px;
}
.special-delivery-view-details > div {
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #e1e7f1;
  border-radius: 8px;
  background: #fff;
}
.special-delivery-view-details small { display: block; margin-bottom: 5px; color: #8a96aa; }
.special-delivery-view-details strong { display: block; color: #2d384b; overflow-wrap: anywhere; }
.special-delivery-view-tip {
  margin: 0 22px;
  padding: 11px 13px;
  color: #687791;
  border-radius: 8px;
  background: #f4f6fa;
}
@media (max-width: 760px) {
  .special-delivery-order-info { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .special-delivery-order-info > div { border-bottom: 1px solid #e2e8f2; }
  .special-delivery-order-info .address { grid-column: 1 / -1; }
  .special-delivery-types { grid-template-columns: repeat(3, 1fr); }
  .special-delivery-form-grid { grid-template-columns: 1fr; }
  .delivery-sign-grid { grid-template-columns: 1fr; }
  .special-delivery-view-summary,
  .special-delivery-view-details { grid-template-columns: 1fr; }
}
.customer-portal h1,
.supplier-portal h1 {
  font-size: 21px;
}
.customer-portal p,
.supplier-portal p {
  margin-top: 1px;
  font-size: 12px;
}
.portal-compact-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 6px;
  padding: 7px 9px;
}
.portal-compact-panel .panel-title {
  flex: 0 0 auto;
  margin: 0 8px 0 0;
  font-size: 14px;
  white-space: nowrap;
}
.portal-compact-panel .actions {
  margin-top: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.portal-compact-panel input {
  height: 30px;
}
.portal-compact-panel button {
  height: 30px;
}
.portal-compact-panel .mini-result {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-login-strip {
  justify-content: flex-start;
  max-width: fit-content;
}
.portal-login-strip .actions {
  flex: 0 1 auto;
}
.portal-login-strip input:not([type="file"]) {
  width: 142px;
}
.portal-login-strip button {
  padding: 0 10px;
}
.date-chip,
.password-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.date-chip input {
  width: 128px;
  height: 32px;
}
.password-chip input {
  width: 142px;
  height: 32px;
}

.password-change-panel {
  width: min(520px, calc(100vw - 32px));
}

.password-change-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.password-change-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.password-change-body label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.password-change-body input {
  width: 100%;
}

.password-state {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e8f5ee;
  color: #17603a;
  font-size: 12px;
  white-space: nowrap;
}

.password-state.must-change {
  background: #fff3d6;
  color: #8a4d00;
}

.staff-login-diagnostics {
  display: grid;
  gap: 6px;
  min-width: 210px;
}

.staff-login-diagnostics small {
  color: var(--muted);
  line-height: 1.45;
}

.staff-login-state {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.staff-login-state.healthy { color: #087a55; background: #e8f7ef; }
.staff-login-state.warning { color: #9a5b00; background: #fff4d8; }
.staff-login-state.locked { color: #bd2d2d; background: #ffebeb; }
.staff-unlock-button { width: fit-content; }
.mini-result {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}
.mini-result.warn { color: var(--red); }

textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font: inherit;
  line-height: 1.55;
}

.entry-input-panel,
.entry-import-panel {
  padding: 7px 10px;
  margin-bottom: 6px;
}
.entry-input-panel .archive-select-row {
  grid-template-columns: minmax(190px, 1fr) minmax(190px, 1fr) minmax(360px, auto);
  align-items: end;
  gap: 8px;
  margin-bottom: 5px;
}
.entry-input-panel .archive-select-row input {
  height: 28px;
  margin-top: 0;
}
.entry-input-panel .archive-select-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.entry-input-panel .archive-select-row label input {
  flex: 1 1 auto;
  min-width: 0;
}
.entry-inline-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.entry-parse-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.entry-import-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  white-space: nowrap;
}
.entry-import-inline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.entry-import-inline input[type="file"] {
  width: 210px;
  height: 28px;
}
.entry-input-panel #rawInput {
  min-height: 42px;
  height: 44px;
  padding: 5px 9px;
  line-height: 1.25;
  resize: vertical;
}
.entry-input-panel .actions,
.entry-import-panel .actions {
  margin-top: 0;
}
.entry-input-panel button,
.entry-import-panel button {
  height: 30px;
  padding: 0 10px;
}
.entry-import-inline button {
  height: 30px;
  padding: 0 10px;
}
.entry-import-panel {
  display: grid;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.entry-import-panel .panel-title {
  margin: 0;
  white-space: nowrap;
}
.entry-import-panel p {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-import-panel .actions {
  margin: 0;
  flex-wrap: nowrap;
}
.entry-import-panel input[type="file"] {
  width: 240px;
  height: 30px;
}
.entry-import-panel .mini-result {
  grid-column: 1 / -1;
  margin-top: 0;
  min-height: 0;
  font-size: 12px;
}

input, select {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
}

textarea:focus, input:focus, select:focus {
  outline: 2px solid var(--blue-soft);
  border-color: var(--blue);
}

button {
  height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 0 13px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.primary { background: var(--blue); color: #fff; }
.ghost { background: #eceff4; color: #293142; }
.danger { background: var(--red-soft); color: var(--red); }
.compact-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}
.login-company {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  padding: 0 10px;
  border: 1px solid #b7cdfc;
  border-radius: 7px;
  background: var(--blue-soft);
  color: #1f4ed8;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.login-company.hidden {
  display: none;
}
.login-finance {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.login-finance strong {
  font-size: 14px;
  color: var(--text);
}
.login-finance.balance strong { color: #047857; }
.login-finance.due strong { color: var(--primary); }
.login-finance.hidden { display: none; }

.actions, .filters, .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.customer-create-actions {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}
.customer-create-actions > input {
  flex: 1 1 320px;
  min-width: 240px;
}
.customer-create-actions > select {
  flex: 0 0 118px;
}

.customer-tools-panel {
  padding: 12px 16px;
}

.customer-tools {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.customer-search-box,
.customer-import-box {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.customer-search-box input {
  min-width: 0;
  flex: 1;
}

.customer-import-picker {
  display: inline-flex;
  align-items: center;
  max-width: 230px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.customer-import-picker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-import-picker input {
  display: none;
}

.customer-import-picker.has-file {
  border-color: var(--primary);
}

.customer-import-result {
  margin-top: 8px;
}

.customer-import-result:empty {
  display: none;
}

@media (max-width: 900px) {
  .customer-tools {
    grid-template-columns: 1fr;
  }
}

/* 财务确认弹窗：客户公司名可单独复制，审核凭证仅在桌面端悬停放大。 */
.payment-modal-review-identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}
.payment-modal-review-identity > #paymentModalReviewCustomerName {
  max-width: min(430px, 48vw);
  overflow: hidden;
  color: #1f4fa8;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-modal-customer-copy {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 20px;
  align-items: center;
  padding: 1px 6px;
  border: 1px solid #cbd8ef;
  border-radius: 5px;
  background: #fff;
  color: #315fd8;
  font-size: 10px;
  font-weight: 750;
  line-height: 16px;
  cursor: pointer;
  user-select: none;
}
.payment-modal-customer-copy:hover,
.payment-modal-customer-copy:focus-visible {
  border-color: #86a5ee;
  background: #eef4ff;
  outline: none;
}
.payment-modal-customer-copy.is-copied {
  border-color: #9dd8b1;
  background: #eefaf2;
  color: #168148;
}
.payment-modal-customer-copy:disabled {
  cursor: default;
  opacity: .5;
}
#paymentModalReviewAccountHint {
  min-width: 0;
  overflow: hidden;
  color: #71809a;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-review-receipt-preview.is-hover-zoomable {
  cursor: zoom-in;
}
.payment-review-receipt-preview.is-hover-zoomable:focus-visible {
  border-color: #5d82e8;
  box-shadow: 0 0 0 3px rgba(55, 101, 223, .16);
  outline: none;
}
.payment-review-receipt-hover-zoom {
  position: fixed;
  z-index: 4200;
  display: flex;
  box-sizing: border-box;
  width: min(720px, calc(100vw - 32px));
  height: min(760px, calc(100vh - 32px));
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #b8c7de;
  border-radius: 13px;
  background: repeating-conic-gradient(#f3f6fb 0 25%, #e9eef7 0 50%) 50% / 18px 18px;
  box-shadow: 0 22px 62px rgba(15, 35, 65, .3);
  pointer-events: none;
}
.payment-review-receipt-hover-zoom img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
@media (hover: none), (pointer: coarse), (max-width: 760px) {
  .payment-review-receipt-hover-zoom {
    display: none !important;
  }
}
.business-license-picker,
.customer-license-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f3f5f8;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}
.business-license-picker:hover,
.customer-license-upload:hover {
  border-color: #b9c7e8;
  background: var(--blue-soft);
  color: var(--blue);
}
.business-license-picker input,
.customer-license-upload input {
  display: none;
}
.selected-file-name {
  flex: 0 1 190px;
  max-width: 190px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-portal .customer-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  margin-bottom: 6px;
}
.customer-search-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.customer-portal .customer-search input,
.customer-portal .customer-search button {
  height: 30px;
}
.customer-portal .customer-search input {
  width: 190px;
}
.customer-portal .customer-search .date-chip input {
  width: 124px;
}
.customer-portal .customer-search .date-chip {
  flex: 0 0 auto;
}
.top-actions { margin-top: 0; justify-content: flex-end; }
#orders .topbar {
  align-items: center;
  margin-bottom: 6px;
}
#orders .topbar h1 {
  font-size: 22px;
}
#orders .topbar p {
  margin-top: 2px;
  font-size: 12px;
}
#orders .top-actions button {
  height: 30px;
  padding: 0 10px;
}
.orders-select-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 68px;
}
.orders-select-all-btn[aria-pressed="true"] {
  border-color: #4f6de8;
  background: #eef3ff;
  color: #3158d5;
}
.orders-select-all-icon {
  width: 15px;
  font-size: 15px;
  line-height: 1;
}
.orders-select-all-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.order-edit-lockbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  margin: 0 0 7px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  white-space: nowrap;
  overflow-x: auto;
}
.order-edit-lockbar strong {
  color: var(--red);
  font-size: 13px;
}
.order-edit-lockbar strong.unlocked {
  color: #087f5b;
}
.order-edit-lockbar .password-chip {
  height: 28px;
  padding: 0 6px;
  font-size: 12px;
}
.order-edit-lockbar .password-chip input {
  width: 150px;
  height: 26px;
  padding: 0 5px;
  border: 0;
}
.order-edit-lockbar > span {
  color: var(--muted);
  font-size: 12px;
}
.orders-table input[readonly],
.orders-table textarea[readonly],
.orders-table input:disabled,
.orders-table textarea:disabled,
.orders-table select:disabled,
.orders-table button:disabled {
  color: var(--muted);
  background: #f5f6f8;
  cursor: not-allowed;
}
.orders-table input[data-field="logistics_no"] {
  color: var(--text);
  background: #fff;
  cursor: text;
}
#orders .filters {
  flex-wrap: nowrap;
  gap: 6px;
  margin-top: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
#orders .filters input,
#orders .filters button {
  height: 30px;
}
#orders .filters > input {
  width: 150px;
  flex: 0 0 auto;
}
#orders .filters #fQ {
  width: 220px;
}
.date-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.date-filter-label input {
  width: 128px;
}
.toggle-label {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
  white-space: nowrap;
}
.toggle-label input {
  width: 16px;
  height: 16px;
  padding: 0;
}
.hidden-col { display: none; }
.order-count-summary {
  min-height: 30px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.order-count-summary b {
  color: var(--blue);
  font-size: 17px;
  margin: 0 3px;
}
.order-category-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}
.order-category-summary span {
  border-radius: 999px;
  background: #eceff4;
  color: #445066;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}
.order-category-summary b {
  color: var(--blue);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.archive-select-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.archive-select-row label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.archive-select-row input {
  width: 100%;
  margin-top: 5px;
}
.field-option {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.field-option input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.stats-search-panel {
  margin-bottom: 12px;
}
.stats-field-row,
.stats-search-row,
.stats-date-row,
.stats-total-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.stats-field-row > span,
.stats-date-row > span {
  color: var(--muted);
  font-weight: 700;
}
.stats-chip {
  height: 34px;
  border-radius: 999px;
  background: #eceff4;
  color: #445066;
  padding: 0 16px;
}
.stats-chip.active {
  background: var(--blue);
  color: #fff;
}
.stats-search-row input {
  flex: 1 1 520px;
  min-width: 260px;
}
.stats-date-row input {
  width: 150px;
}
.stats-tip {
  font-size: 13px;
  font-weight: 400 !important;
}
.stats-total-row {
  font-size: 14px;
  margin-top: 14px;
}
.stats-total-row b {
  color: var(--blue);
  font-size: 22px;
  margin: 0 2px;
}
.stats-total-row button {
  margin-left: auto;
}
.stats-list {
  display: grid;
  gap: 0;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.compact-stats-list {
  max-height: 220px;
}
.stats-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, minmax(90px, auto));
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 13px;
}
.stats-row:last-child { border-bottom: 0; }
.stats-row span {
  white-space: nowrap;
}
.stats-row b {
  color: var(--ink);
}
.stats-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 750;
}
.stats-orders-panel {
  padding: 0;
  overflow: hidden;
}
.stats-orders-panel .panel-title {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.stats-orders-wrap {
  max-height: calc(100vh - 300px);
  min-height: 260px;
  overflow: auto;
  background: #fff;
}
.stats-orders-wrap.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.stats-orders-table {
  min-width: 0;
  table-layout: fixed;
}
.stats-orders-table th,
.stats-orders-table td {
  white-space: nowrap;
}
.stats-orders-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.stats-orders-table td.clip {
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-orders-table td.stats-hover-2,
.stats-orders-table td.stats-hover-3 {
  position: relative;
  overflow: visible;
  z-index: 1;
}
.stats-orders-table td.stats-hover-2:hover,
.stats-orders-table td.stats-hover-3:hover {
  z-index: 8;
}
.stats-orders-table .stats-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-orders-table td.stats-hover-2:hover .stats-cell-text,
.stats-orders-table td.stats-hover-3:hover .stats-cell-text {
  position: absolute;
  top: 3px;
  left: 4px;
  display: -webkit-box;
  width: max(100%, 240px);
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
  line-height: 18px;
  white-space: normal;
  word-break: break-all;
  overflow: hidden;
  -webkit-box-orient: vertical;
}
.stats-orders-table td.stats-hover-2:hover .stats-cell-text {
  max-height: 42px;
  -webkit-line-clamp: 2;
}
.stats-orders-table td.stats-hover-3:hover .stats-cell-text {
  width: max(100%, 360px);
  max-height: 60px;
  -webkit-line-clamp: 3;
}
.stats-orders-table .stats-qty {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-orders-table .stats-price {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats-orders-table .stats-amount {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.finance-panel {
  padding: 0;
}
.finance-summary-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px 0;
}
.finance-summary-row span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 5px 9px;
  color: var(--muted);
  font-weight: 700;
}
.finance-summary-row b {
  color: var(--primary);
  font-size: 18px;
}
.finance-payment-actions {
  padding: 8px 12px;
  margin: 0;
}
.finance-payment-actions input,
.finance-payment-actions select {
  min-width: 120px;
}
.finance-payment-actions #paymentCustomer {
  min-width: 220px;
}
.finance-payment-actions #paymentRemark {
  min-width: 220px;
}
.funds-customer-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 12px;
  border-top: 1px solid var(--line);
}
.funds-customer-toolbar strong {
  font-size: 14px;
}
.funds-customer-toolbar input {
  width: 230px;
  height: 28px;
}
.funds-customer-toolbar span {
  color: var(--muted);
  font-size: 12px;
}
.funds-smart-sort {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  padding: 6px 9px;
  border: 1px solid #cbdcff;
  border-radius: 7px;
  background: #f2f6ff;
  color: #315fd4 !important;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.funds-customer-quick-filters {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}
.funds-customer-quick-filters button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #4d596d;
  font-size: 12px;
  font-weight: 750;
}
.funds-customer-quick-filters button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.fund-customer-name { vertical-align: middle; }
.fund-customer-status {
  display: inline-flex;
  align-items: center;
  height: 21px;
  margin-left: 7px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}
.fund-customer-status.pending-recharge { border-color: #ddccfa; background: #f5efff; color: #7750c7; }
.fund-customer-status.pending-payment { border-color: #ffd9b7; background: #fff5eb; color: #dc6b0a; }
.fund-customer-status.today-due { border-color: #c9dcff; background: #eff5ff; color: #3167dc; }
.fund-customer-status.history-debt { border-color: #ffd0cf; background: #fff1f0; color: #d54440; }
.fund-customer-status.prepaid-change { border-color: #bfe8dc; background: #ebfaf5; color: #087c61; }
.fund-customer-status.processed { border-color: #ccebd8; background: #edf9f1; color: #27824b; }
.finance-customers-wrap {
  max-height: 230px;
  overflow: auto;
  border-top: 1px solid var(--line);
}
.finance-customers-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
}
.finance-customers-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.finance-customers-table th:first-child { width: 22%; }
.finance-customers-table th:nth-child(2) { width: 12%; }
.finance-customers-table th:nth-child(3) { width: 9%; }
.finance-customers-table th:nth-child(4),
.finance-customers-table th:nth-child(5),
.finance-customers-table th:nth-child(6),
.finance-customers-table th:nth-child(8) { width: 10%; }
.finance-customers-table th:nth-child(7) { width: 17%; }
.finance-customers-table td,
.finance-customers-table th {
  height: 30px;
  padding: 4px 10px;
}
.finance-customers-table td.clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-customers-table .money-value {
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.finance-customers-table .money-value.balance { color: #047857; }
.finance-customers-table .money-value.due { color: var(--primary); }
.finance-customers-table .money-value.received { color: #07884a; }
.finance-customers-table .money-value.debt { color: var(--red); }
.debt-trigger {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--red);
  padding: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}
.debt-trigger:hover,
.debt-trigger:focus-visible { text-decoration: underline; }
.debt-trigger:disabled { cursor: default; text-decoration: none; opacity: .75; }
.debt-trigger small {
  display: block;
  margin-top: 1px;
  color: #8b5b5b;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.debt-hover-card {
  position: fixed;
  z-index: 1200;
  width: 390px;
  max-width: calc(100vw - 24px);
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22);
  color: #273247;
}
.debt-hover-card.hidden { display: none; }
.debt-hover-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.debt-hover-head strong { font-size: 14px; }
.debt-hover-head span { color: var(--red); font-weight: 800; white-space: nowrap; }
.debt-hover-meta { margin-bottom: 8px; color: #718096; font-size: 11px; }
.debt-hover-orders { display: grid; gap: 5px; }
.debt-hover-order { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 6px 7px; border-radius: 7px; background: #f8fafc; font-size: 11px; }
.debt-hover-order span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debt-hover-order b { color: var(--red); }
.debt-hover-more { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.debt-hover-more button { border: 0; background: transparent; color: var(--primary); padding: 2px 0; font: inherit; font-weight: 800; cursor: pointer; }
.debt-hover-more button:hover,
.debt-hover-more button:focus-visible { text-decoration: underline; }
.debt-drawer { position: fixed; inset: 0; z-index: 1150; }
.debt-drawer.hidden { display: none; }
.debt-drawer-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .4); backdrop-filter: blur(2px); }
.debt-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(1120px, 92vw); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; background: #fff; box-shadow: -20px 0 55px rgba(15, 23, 42, .2); }
.debt-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.debt-drawer-head > div { display: flex; align-items: baseline; gap: 10px; }
.debt-drawer-head strong { font-size: 20px; }
.debt-drawer-head span { color: var(--muted); font-size: 12px; }
.debt-drawer-summary { display: grid; grid-template-columns: repeat(6, minmax(110px, 1fr)); border-bottom: 1px solid var(--line); }
.debt-summary-item { padding: 12px 16px; border-right: 1px solid var(--line); }
.debt-summary-item:last-child { border-right: 0; }
.debt-summary-item span { display: block; color: var(--muted); font-size: 11px; }
.debt-summary-item strong { display: block; margin-top: 5px; font-size: 18px; }
.debt-summary-item.danger strong { color: var(--red); }
.debt-summary-item.reconcilable strong { color: #315fd3; }
.debt-summary-item.reconcilable.unknown strong { color: var(--muted); font-size: 13px; }
.debt-drawer-toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.debt-drawer-toolbar input { flex: 1; min-width: 180px; }
.debt-drawer-toolbar label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.debt-drawer-body { min-height: 0; overflow: auto; }
.debt-detail-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.debt-detail-table th { position: sticky; top: 0; z-index: 1; background: #f3f6fb; }
.debt-detail-table th,
.debt-detail-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 12px; }
.debt-detail-table td.debt-order-product { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.debt-detail-table .debt-money { color: var(--red); font-weight: 800; }
.debt-detail-table tr.is-order-expanded > td { background: #eef4ff; }
.debt-detail-table tr.debt-order-expanded-row > td {
  padding: 0;
  white-space: normal;
  background: #f8faff;
}
.debt-order-expanded {
  display: grid;
  gap: 4px;
  padding: 6px 10px 7px;
  border-top: 1px dashed #cbd8f2;
  border-bottom: 1px solid #dbe4f5;
}
.debt-order-compact-line {
  display: grid;
  gap: 6px;
  min-width: 930px;
}
.debt-order-compact-line.is-primary {
  grid-template-columns: minmax(105px, .85fr) minmax(150px, 1.25fr) minmax(125px, .95fr) minmax(150px, 1.15fr) minmax(220px, 1.8fr);
}
.debt-order-compact-line.is-secondary {
  grid-template-columns: minmax(180px, 1.2fr) minmax(330px, 2.5fr) minmax(150px, 1fr) minmax(130px, .9fr);
}
.debt-order-compact-item {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 25px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .68);
}
.debt-order-compact-item span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.debt-order-compact-item span::after { content: "："; }
.debt-order-compact-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2b42;
  font-size: 11px;
  line-height: 1.25;
}
.debt-order-expanded .debt-order-reconciliation {
  border: 1px solid #dbe4f5;
  background: rgba(255, 255, 255, .9);
}
.debt-order-expanded .debt-order-reconciliation.is-eligible {
  border-color: #a7e7d0;
  background: #ecfdf5;
}
.debt-order-expanded .debt-order-reconciliation.is-eligible strong { color: #047857; }
.debt-order-expanded .debt-order-reconciliation.is-blocked {
  border-color: #fecaca;
  background: #fff1f2;
}
.debt-order-expanded .debt-order-reconciliation.is-blocked strong { color: #be123c; }
.debt-order-expanded .debt-order-reconciliation.is-unknown {
  border-color: #f7d8a1;
  background: #fff9ec;
}
.debt-order-expanded .debt-order-reconciliation.is-unknown strong { color: #9a5a08; }
.debt-age { display: inline-flex; padding: 2px 7px; border-radius: 999px; background: #e8f0ff; color: #315fd3; font-weight: 700; }
.debt-age.age-8 { background: #fff7d6; color: #a16207; }
.debt-age.age-16 { background: #ffedd5; color: #c2410c; }
.debt-age.age-31 { background: #fee2e2; color: #b91c1c; }
.debt-drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
#debtDrawerPager { display: flex; align-items: center; gap: 6px; }
#debtDrawerPager button { min-width: 34px; height: 30px; }
@media (max-width: 760px) {
  .debt-drawer-panel { width: 100vw; }
  .debt-drawer-summary { grid-template-columns: repeat(2, 1fr); }
  .debt-drawer-toolbar { flex-wrap: wrap; }
  .debt-drawer-toolbar input { flex-basis: 100%; }
}
.finance-customers-table .fund-action-cell {
  white-space: nowrap;
}
.finance-customers-table .fund-action-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.finance-customers-table .fund-action-cell button {
  height: 25px;
  padding: 0 9px;
  font-size: 12px;
}
.funds-ledger-title {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 750;
}
.funds-ledger-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.funds-ledger-filters input,
.funds-ledger-filters select {
  flex: 0 0 auto;
  width: 145px;
  height: 28px;
  padding: 0 7px;
  font-size: 12px;
}
.funds-ledger-filters #fundsLedgerKeyword { width: 220px; }
.funds-ledger-filters #fundsLedgerCount {
  color: var(--muted);
  font-size: 12px;
}
.finance-ledger-wrap {
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid var(--line);
}
#funds .topbar {
  margin-bottom: 8px;
}
.funds-finance-panel {
  margin-bottom: 0;
}
.funds-finance-panel .finance-ledger-wrap {
  max-height: 240px;
  min-height: 160px;
}
.finance-ledger-table {
  min-width: 1740px;
}
.finance-ledger-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.finance-ledger-table td.clip {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.finance-ledger-table td,
.finance-ledger-table th {
  height: 30px;
  padding: 4px 8px;
  white-space: nowrap;
}
.finance-ledger-table th:first-child { min-width: 132px; }
.finance-ledger-table th:nth-child(2) { min-width: 180px; }
.finance-ledger-table th:nth-child(3) { min-width: 110px; }
.finance-ledger-table th:nth-child(11) { min-width: 150px; }
.finance-ledger-table th:nth-child(12) { min-width: 150px; }
.finance-ledger-table th:last-child { min-width: 180px; }
.receipt-view-btn {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}
.finance-amount.in {
  color: #047857;
  font-weight: 800;
}
.finance-amount.out {
  color: #dc2626;
  font-weight: 800;
}
.money-cell,
.payment-status-cell {
  white-space: nowrap;
  font-weight: 750;
}
mark {
  background: #fff2a8;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

.customer-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.customer-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}
.customer-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.customer-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 20px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metrics div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
.metrics span { display: block; color: var(--muted); font-size: 13px; }
.metrics strong { display: block; font-size: 28px; margin-top: 6px; }

.list {
  display: grid;
  gap: 8px;
}
.entry-result-panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 168px);
  min-height: 0;
  margin-bottom: 0;
}
.entry-result-panel .list {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  max-height: calc(100vh - 205px);
  overflow: auto;
  padding-right: 0;
}
.entry-result-panel .list.empty {
  min-height: 150px;
  align-content: center;
}
.portal-orders-table.entry-result-table th,
.portal-orders-table.entry-result-table td {
  height: 24px;
  padding: 2px 5px;
  line-height: 1.1;
  vertical-align: middle;
}
.portal-orders-table.entry-result-table {
  height: auto;
  table-layout: fixed;
}
.portal-orders-table.entry-result-table tr {
  height: 24px;
}
.entry-result-table tr.warn td {
  background: #fffafa;
}
.entry-result-table td {
  max-width: 0;
  overflow: hidden;
  white-space: normal;
  cursor: text;
}
.entry-result-table .entry-edit-input {
  width: 100%;
  min-width: 0;
  height: 22px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 4px;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-result-table .entry-edit-input:hover,
.entry-result-table .entry-edit-input:focus {
  border-color: var(--line);
  background: #fff;
  outline: none;
}
.entry-result-table .entry-edit-input.saving {
  background: #eef4ff;
}
.entry-result-table .entry-edit-select {
  padding-right: 18px;
}
.entry-result-table .entry-row-check {
  width: 18px;
  height: 18px;
  min-width: 18px;
}
.entry-result-table .entry-delete-btn {
  height: 22px;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.entry-result-table .cell-text {
  display: block;
  min-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-result-table td.expand-on-hover:hover {
  background: #fff;
  overflow: visible;
  position: relative;
  z-index: 15;
}
.entry-result-table tr.warn td.expand-on-hover:hover {
  background: #fffafa;
}
.entry-result-table .entry-hover-wrap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}
.entry-floating-preview {
  display: none;
  position: fixed;
  z-index: 99999;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(31, 42, 68, 0.16);
  color: var(--text);
  font-size: 13px;
  text-align: left;
  pointer-events: none;
  overflow: hidden;
  word-break: break-all;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.2;
  max-height: 42px;
}
.entry-floating-preview.show {
  display: -webkit-box;
}
.entry-floating-preview.address {
  -webkit-line-clamp: 3;
  max-height: 58px;
}
.entry-result-panel .order-card {
  padding: 5px 8px;
  border-radius: 7px;
}
.entry-result-panel .compact-row {
  min-height: 34px;
  grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
}
.entry-result-panel .row-no {
  font-size: 13px;
}
.entry-result-panel .tag {
  padding: 1px 7px;
  font-size: 11px;
}
.entry-result-panel .row-cells {
  gap: 10px;
}
.entry-result-panel .row-cell {
  font-size: 12px;
  line-height: 1.2;
}
.order-card, .customer-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}
.order-card.warn { border-color: #f2b6ae; background: #fffafa; }
.compact-row {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.row-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.row-no {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
}
.row-cells {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: hidden;
  padding-bottom: 2px;
}
.row-cell {
  flex: 0 0 auto;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}
.row-cell.wide {
  max-width: 280px;
}
.row-cell b {
  color: var(--muted);
  font-weight: 650;
}
.order-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-weight: 700;
}
.tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
}
.tag.warn { background: var(--red-soft); color: var(--red); }
.meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  font-size: 13px;
}
.meta span { color: var(--muted); }
.meta .wide { grid-column: 1 / -1; }

.tablewrap {
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: calc(100vh - 145px);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1680px;
  font-size: 12px;
}
.customer-table {
  width: 100%;
  min-width: 1230px;
  table-layout: fixed;
}
.customer-table th,
.customer-table td {
  padding: 4px 6px;
  vertical-align: middle;
}
.customer-table th:nth-child(1) { width: 210px; }
.customer-table th:nth-child(2) { width: 110px; }
.customer-table th:nth-child(3) { width: 100px; }
.customer-table th:nth-child(4) { width: 105px; }
.customer-table th:nth-child(5),
.customer-table th:nth-child(6),
.customer-table th:nth-child(7),
.customer-table th:nth-child(8) { width: 100px; }
.customer-table th:nth-child(9) { width: 130px; }
.customer-table th:nth-child(10) { width: 90px; }
.customer-table th:nth-child(11) { width: 150px; }
.customer-table th:nth-child(12) { width: 190px; }
.customer-license-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  white-space: nowrap;
}
.customer-license-thumb {
  width: 54px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
  background: #f3f5f8;
  cursor: zoom-in;
}
.customer-license-preview-button {
  display: inline-flex;
  min-width: 0;
  max-width: 260px;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: zoom-in;
}
.customer-license-preview-button > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.customer-license-preview-button strong {
  color: var(--green);
  font-size: 12px;
}
.customer-license-preview-button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-license-upload {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
}
.customer-license-empty {
  color: var(--muted);
  font-size: 12px;
}
.orders-table {
  min-width: 0;
  width: var(--orders-table-width, 100%);
  table-layout: fixed;
}
.orders-table th,
.orders-table td {
  padding: 3px 5px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.orders-table .order-expand-cell {
  position: relative;
  overflow: visible;
  z-index: 2;
}
.orders-table .order-expand-cell:hover,
.orders-table .order-expand-cell:focus-within {
  z-index: 20;
}
.orders-table th {
  height: 26px;
}
.orders-table td input,
.orders-table td select,
.orders-table td textarea {
  height: 26px;
  min-height: 26px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 12px;
}
.orders-table input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.orders-table input[type="number"]::-webkit-inner-spin-button,
.orders-table input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.orders-table td textarea.order-expand-input {
  display: block;
  width: 100%;
  resize: none;
  overflow: hidden;
  line-height: 18px;
  padding-top: 3px;
  padding-bottom: 3px;
  white-space: pre-wrap;
  word-break: break-all;
  cursor: text;
}
.orders-table td textarea.order-expand-input.expanded {
  overflow: auto;
  position: absolute;
  left: 5px;
  top: 3px;
  width: max(100%, 220px);
  max-height: 62px;
  z-index: 30;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .16);
}
.orders-table td.addr textarea.order-expand-input.expanded {
  width: max(100%, 360px);
}
.supplier-orders-table {
  min-width: 0;
  width: var(--supplier-table-width, 100%);
  table-layout: fixed;
}
.supplier-orders-table th,
.supplier-orders-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-orders-table .clip {
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-orders-table input {
  min-width: 0;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 5px 7px;
  text-align: left;
  vertical-align: top;
}
th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}
td input, td select {
  width: 100%;
  height: 28px;
  font-size: 12px;
}
td input {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.locked-field {
  background: #f3f5f8;
  color: #293142;
  cursor: default;
}
.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.order-no-cell {
  max-width: 170px;
}
.order-no-cell span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}
.inline-inputs {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1fr);
  gap: 6px;
  align-items: center;
}
.logistics-cell {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}
.logistics-cell.special-delivery-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 29px;
}
.logistics-input-shell {
  display: flex;
  flex: 1 1 150px;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 28px;
  padding-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}
.logistics-cell-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}
.logistics-input-shell:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 89, 220, .12);
}
.logistics-company-chip {
  flex: 0 0 auto;
  min-width: 34px;
  max-width: 38px;
  padding: 2px 4px;
  border-radius: 5px;
  background: #edf3ff;
  color: #315bd8;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}
.logistics-input-shell > input[data-field="logistics_no"] {
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 2px 6px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.logistics-input-shell > input[data-field="logistics_no"]:focus {
  outline: 0;
  box-shadow: none;
}
.tiny-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}
.addr { max-width: none; white-space: normal; }

.empty {
  color: var(--muted);
  padding: 28px 0;
  text-align: center;
}

.hidden { display: none !important; }
.customer-result { margin-top: 14px; }
.customer-portal .customer-result,
.supplier-portal .supplier-orders-wrap {
  margin-top: 6px;
}
.customer-portal #customerResult:not(.empty) {
  max-height: calc(100vh - 214px);
  overflow: auto;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.portal-orders-table {
  width: var(--portal-table-width, 100%);
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.portal-orders-table th,
.portal-orders-table td,
.supplier-orders-table th,
.supplier-orders-table td {
  height: 26px;
  padding: 3px 6px;
  line-height: 1.15;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-orders-table th,
.supplier-orders-table th {
  font-weight: 800;
}
.portal-orders-table td,
.supplier-orders-table td {
  max-width: 0;
}
.supplier-orders-table input {
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
}
.supplier-orders-table button {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}
.supplier-portal .supplier-orders-wrap {
  overflow: auto;
  max-height: calc(100vh - 232px);
}
.customer-result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  margin: 2px 0 4px;
}
.customer-portal .customer-summary,
.supplier-portal .customer-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-top: 4px;
  margin-bottom: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.customer-portal .customer-summary {
  justify-content: flex-end;
  flex: 1 1 auto;
}
.supplier-portal .customer-summary {
  justify-content: flex-start;
}
.customer-portal .customer-summary div,
.supplier-portal .customer-summary div {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
}
.customer-portal .customer-summary span,
.supplier-portal .customer-summary span {
  display: inline;
  font-size: 12px;
  line-height: 1;
}
.customer-portal .customer-summary strong,
.supplier-portal .customer-summary strong {
  display: inline;
  margin: 0;
  font-size: 16px;
  line-height: 1;
}
.customer-result-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0;
}
.customer-result-actions button {
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}
.customer-result-actions .customer-order-view-switch {
  height: 30px;
}
.customer-order-select-all {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #d5ddeb;
  border-radius: 8px;
  background: #fff;
  color: #4b5870;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.customer-order-select-all input,
.customer-order-select-cell input,
.customer-order-card-select input {
  width: 16px;
  height: 16px;
  accent-color: #3f61df;
  cursor: pointer;
}
.customer-orders-table .customer-order-select-column { width: 42px; }
.customer-orders-table .customer-order-select-cell {
  width: 42px;
  min-width: 42px;
  padding-right: 6px;
  padding-left: 10px;
  text-align: center;
}
.customer-order-card { position: relative; }
.customer-order-card-select {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #d7deeb;
  border-radius: 8px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 3px 10px rgba(31, 50, 94, .08);
}
.customer-order-card.is-selected {
  border-color: #6e88ed;
  box-shadow: 0 0 0 2px rgba(63, 97, 223, .12);
}
.project-invite-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.h5-invite-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}
.h5-invite-tools input,
.h5-invite-tools select,
.h5-invite-tools button {
  height: 32px;
  min-width: 0;
  font-size: 12px;
}
.h5-invite-tools input { width: 190px; }
.project-invite-list {
  max-height: 450px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.h5-invite-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-height: 38px;
  padding-top: 8px;
  color: #71809a;
  font-size: 12px;
}
.h5-invite-pager button,
.h5-invite-pager select {
  height: 30px;
  padding: 0 9px;
  border: 1px solid #d8dfeb;
  border-radius: 7px;
  background: #fff;
}
.h5-invite-pager button:disabled { cursor: not-allowed; opacity: .45; }
@media (max-width: 760px) {
  .project-invite-list-head { align-items: stretch; flex-direction: column; }
  .h5-invite-tools { justify-content: flex-start; flex-wrap: wrap; }
  .h5-invite-tools input { width: 100%; }
}

.toast {
  position: fixed;
  z-index: 3000;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}
.toast.show { opacity: 1; }

/* Submission failures stay above the fixed actions, outside the scroll body. */
#addLogisticsPackagesModal #addLogisticsPackagesError {
  flex: 0 0 auto;
  margin: 0 12px 8px;
  padding: 8px 10px;
  max-height: 110px;
  overflow-y: auto;
  color: #aa2834;
  font-size: 12px;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, .55);
  z-index: 8;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
}
.modal.hidden { display: none; }
.modal-panel {
  width: min(1120px, 96vw);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 50px rgba(0,0,0,.24);
  overflow: hidden;
}
.modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-bar > div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.payment-modal-panel {
  width: min(920px, 96vw);
  margin-top: 4vh;
  position: relative;
  min-width: min(560px, calc(100vw - 20px));
  min-height: min(360px, calc(100dvh - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 20px);
  resize: both;
  overflow: auto;
}
.payment-modal-head,
.payment-receipt-viewer-panel > .modal-bar[data-payment-viewer-drag-handle] {
  cursor: move;
  touch-action: none;
  user-select: none;
}
.payment-modal-head button,
.payment-receipt-viewer-panel > .modal-bar[data-payment-viewer-drag-handle] button,
.payment-modal-head input,
.payment-receipt-viewer-panel > .modal-bar[data-payment-viewer-drag-handle] input,
.payment-modal-head select,
.payment-receipt-viewer-panel > .modal-bar[data-payment-viewer-drag-handle] select {
  cursor: pointer;
  user-select: auto;
}
.payment-modal-panel.is-window-dragging,
.payment-receipt-viewer-panel.is-window-dragging {
  user-select: none;
}
.payment-modal-panel.is-window-resizing,
.payment-receipt-viewer-panel.is-window-resizing {
  user-select: none;
}
.payment-window-resize-handle {
  position: absolute;
  z-index: 12;
  display: block;
  touch-action: none;
}
.payment-window-resize-handle.is-n,
.payment-window-resize-handle.is-s {
  left: 12px;
  right: 12px;
  height: 9px;
}
.payment-window-resize-handle.is-n { top: -4px; cursor: ns-resize; }
.payment-window-resize-handle.is-s { bottom: -4px; cursor: ns-resize; }
.payment-window-resize-handle.is-e,
.payment-window-resize-handle.is-w {
  top: 12px;
  bottom: 12px;
  width: 9px;
}
.payment-window-resize-handle.is-e { right: -4px; cursor: ew-resize; }
.payment-window-resize-handle.is-w { left: -4px; cursor: ew-resize; }
.payment-window-resize-handle.is-ne,
.payment-window-resize-handle.is-se,
.payment-window-resize-handle.is-sw,
.payment-window-resize-handle.is-nw {
  width: 16px;
  height: 16px;
}
.payment-window-resize-handle.is-ne { top: -5px; right: -5px; cursor: nesw-resize; }
.payment-window-resize-handle.is-se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.payment-window-resize-handle.is-sw { bottom: -5px; left: -5px; cursor: nesw-resize; }
.payment-window-resize-handle.is-nw { top: -5px; left: -5px; cursor: nwse-resize; }
.payment-modal-panel.is-window-positioned {
  margin-top: 0;
}
.payment-modal-panel.is-reviewing {
  width: min(720px, 92vw);
  max-height: calc(100vh - 64px);
  margin-top: 0;
  overflow-y: auto;
  border-radius: 14px;
}
.payment-modal-panel.is-resubmitting {
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin-top: 0;
  overflow-y: auto;
}
.payment-modal-panel.is-reviewing .modal-bar { padding: 8px 10px; }
.payment-modal-panel.is-reviewing .payment-modal-heading > strong {
  color: #1d4ed8;
  font-size: 20px;
}
.payment-modal-panel.is-reviewing .payment-modal-heading > span {
  color: #1f4fa8;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .01em;
}
.payment-modal-panel.is-reviewing .payment-review-header-status { padding: 5px 8px; font-size: 11px; }
.payment-modal-heading { display: flex; flex-direction: column; gap: 3px; }
.payment-modal-heading > strong { color: #1f4fa8; font-size: 22px; letter-spacing: .01em; }
.payment-modal-heading > span { color: var(--muted); font-size: 12px; font-weight: 600; }
.payment-modal-head-actions { display: flex; align-items: center; gap: 9px; }
.payment-review-header-status {
  padding: 7px 11px;
  border: 1px solid #ffd7a9;
  border-radius: 7px;
  background: #fff8ed;
  color: #c56b08;
  font-size: 12px;
  font-weight: 800;
}
.payment-modal-panel.is-reviewing .payment-customer-summary,
.payment-modal-panel.is-reviewing .payment-smart-hint,
.payment-modal-panel.is-reviewing .payment-form-grid { display: none; }
.customer-license-modal-panel {
  width: min(920px, 94vw);
  margin-top: 2vh;
  border-radius: 8px;
}
.customer-license-preview-area {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  max-height: 80vh;
  padding: 12px;
  overflow: auto;
  background: #eef1f5;
}
.customer-license-preview-area img {
  display: block;
  max-width: 100%;
  max-height: calc(80vh - 52px);
  object-fit: contain;
  background: #fff;
}
.business-license-review-trigger {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #f2b95f;
  border-radius: 7px;
  background: #fff8e8;
  color: #a65a00;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.business-license-review-trigger:hover { border-color: #dc8b19; background: #fff2cf; }
.business-license-review-trigger.is-compact { min-height: 26px; padding: 3px 7px; font-size: 11px; }
.business-license-review-permission-note { color: #a06a24; font-size: 11px; line-height: 1.35; }
.business-license-review-permission-note.is-own-submission { color: #626f82; }
.business-license-primary-state { color: #6f7c90; font-size: 11px; line-height: 1.35; }
.business-license-primary-state.is-processing::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #d98b13; }
.business-license-primary-action { min-height: 28px; align-items: center; justify-content: center; white-space: nowrap; }
.business-license-primary-action.is-compact { min-height: 26px; padding: 3px 8px; font-size: 11px; }
.supplier-license-review-actions { display: flex; min-width: 0; align-items: center; gap: 8px; flex-wrap: nowrap; }
.supplier-license-review-actions > * { flex: 0 0 auto; }
#licenseReviews .business-license-review-queue-topbar { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; }
.business-license-review-queue-metrics { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)); gap: 8px; }
.business-license-review-queue-metrics > span { display: grid; min-width: 105px; gap: 3px; padding: 9px 12px; border: 1px solid #dce5f2; border-radius: 9px; background: #fff; }
.business-license-review-queue-metrics small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.business-license-review-queue-metrics strong { color: #255fc7; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; }
.business-license-review-queue-panel { display: grid; margin: 0; padding: 0; overflow: hidden; }
.business-license-review-queue-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.business-license-review-queue-toolbar input { flex: 1 1 320px; min-width: 180px; }
.business-license-review-queue-toolbar select { flex: 0 0 145px; }
.business-license-review-queue-toolbar > span { margin-left: auto; color: var(--muted); font-size: 11px; }
.business-license-review-queue-tablewrap { max-height: calc(100dvh - 270px); min-height: 320px; margin: 0; border: 0; border-radius: 0; }
.business-license-review-queue-table { width: 100%; min-width: 920px; table-layout: fixed; border-collapse: collapse; }
.business-license-review-queue-table th,
.business-license-review-queue-table td { padding: 10px 12px; border-bottom: 1px solid #e5eaf1; text-align: left; vertical-align: middle; }
.business-license-review-queue-table th { position: sticky; z-index: 2; top: 0; color: #53627a; background: #f1f5fa; font-size: 12px; }
.business-license-review-queue-table th:nth-child(1) { width: 126px; }
.business-license-review-queue-table th:nth-child(2) { width: auto; }
.business-license-review-queue-table th:nth-child(3) { width: 150px; }
.business-license-review-queue-table th:nth-child(4) { width: 145px; }
.business-license-review-queue-table th:nth-child(5) { width: 125px; }
.business-license-review-queue-table th:nth-child(6) { width: 190px; }
.business-license-review-queue-table td:first-child { display: flex; align-items: center; gap: 7px; }
.business-license-review-queue-table td > small,
.business-license-review-queue-company + small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.business-license-review-queue-table tr.is-own-submission td { background: #fafbfd; }
.business-license-review-queue-preview { display: block; flex: 0 0 auto; width: 58px; height: 44px; padding: 2px; overflow: hidden; border: 1px solid #efb44f; border-radius: 7px; background: #fff9eb; cursor: zoom-in; }
.business-license-review-queue-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.business-license-review-entity-type { display: inline-flex; padding: 3px 6px; border-radius: 999px; color: #315fbd; background: #edf4ff; font-size: 10px; font-weight: 800; }
.business-license-review-entity-type.is-supplier { color: #137949; background: #e8f7ef; }
.business-license-review-company { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-license-review-queue-action { white-space: normal; }
.business-license-review-queue-action .business-license-review-trigger { min-width: 72px; }
.business-license-review-queue-image-error { color: #b63b34; font-size: 10px; }
.business-license-review-queue-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #f8fafc; color: #657086; font-size: 12px; }
.business-license-review-queue-pager > div { display: flex; gap: 8px; }
.business-license-review-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  width: min(980px, 96vw);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  margin-top: 0;
  overflow: hidden;
  border-radius: 14px;
}
.business-license-review-head { position: relative; z-index: 2; flex: 0 0 auto; }
.business-license-review-head > div { align-items: flex-start; flex-direction: column; gap: 2px; }
.business-license-review-head small { color: var(--muted); font-size: 11px; }
.business-license-review-body {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  gap: 13px;
  padding: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.business-license-review-summary { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.business-license-review-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dce5f1;
  border-radius: 9px;
  background: #f8fbff;
}
.business-license-review-summary span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.business-license-review-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-license-review-reason {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #f4d29a;
  border-radius: 8px;
  background: #fff9ed;
  color: #91560a;
  font-size: 12px;
  font-weight: 700;
}
.business-license-review-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.business-license-review-images article { overflow: hidden; border: 1px solid #dce5f1; border-radius: 10px; background: #f6f8fb; }
.business-license-review-images article.is-pending { border-color: #efc06e; box-shadow: inset 0 3px 0 #f2a72d; }
.business-license-review-images article > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #dce5f1; background: #fff; }
.business-license-review-images article > header span { max-width: 65%; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.business-license-review-image { display: grid; min-height: 230px; max-height: 42vh; place-items: center; overflow: auto; padding: 8px; color: var(--muted); font-size: 12px; }
.business-license-review-image img { display: block; max-width: 100%; max-height: 40vh; object-fit: contain; background: #fff; }
.business-license-review-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.business-license-review-fields label { display: grid; gap: 5px; color: #435169; font-size: 12px; font-weight: 700; }
.business-license-review-fields label.is-wide { grid-column: 1 / -1; }
.business-license-review-fields input,
.business-license-review-fields textarea { width: 100%; }
.business-license-review-fields textarea { height: 78px; min-height: 78px; max-height: 120px; resize: vertical; }
.business-license-review-fields [aria-invalid="true"] { border-color: #e85b55; box-shadow: 0 0 0 2px rgba(232, 91, 85, .12); }
.business-license-review-warning { display: flex; gap: 8px; padding: 9px 11px; border-radius: 8px; background: #f2f6fc; color: #5d6d84; font-size: 11px; }
.business-license-review-warning strong { flex: 0 0 auto; color: #30415b; }
.business-license-review-actions { position: relative; z-index: 2; display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border-top: 1px solid var(--line); background: #f8fafc; }
.business-license-review-actions > span { min-height: 18px; color: #c43b32; font-size: 12px; font-weight: 700; }
.business-license-review-actions > div { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.business-license-review-panel.is-busy { cursor: wait; }
.business-license-review-panel.is-busy input,
.business-license-review-panel.is-busy textarea { pointer-events: none; opacity: .72; }
@media (max-width: 720px) {
  #licenseReviews .business-license-review-queue-topbar { grid-template-columns: 1fr; }
  .business-license-review-queue-metrics { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .business-license-review-queue-metrics > span { min-width: 0; }
  .business-license-review-queue-toolbar { align-items: stretch; flex-wrap: wrap; }
  .business-license-review-queue-toolbar input { flex-basis: 100%; }
  .business-license-review-queue-toolbar > span { width: 100%; margin-left: 0; }
  .business-license-review-panel { max-height: calc(100vh - 18px); max-height: calc(100dvh - 18px); }
  .business-license-review-summary,
  .business-license-review-images,
  .business-license-review-fields { grid-template-columns: 1fr; }
  .business-license-review-fields label.is-wide { grid-column: auto; }
  .business-license-review-image { min-height: 180px; max-height: 32vh; }
  .business-license-review-image img { max-height: 30vh; }
  .business-license-review-actions { align-items: stretch; flex-direction: column; }
  .business-license-review-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}
.payment-customer-summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.payment-customer-summary span {
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.payment-customer-summary span:last-child { border-right: 0; }
.payment-customer-summary strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-smart-hint {
  margin: 12px 14px 0;
  padding: 9px 12px;
  border: 1px solid #c8d8ff;
  border-radius: 7px;
  color: #3159c8;
  background: #f3f7ff;
  font-size: 12px;
  font-weight: 700;
}
.payment-correction-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 14px 0;
  color: #233451;
}
.payment-modal-panel.is-resubmitting .payment-correction-head { display: flex; }
.payment-correction-head strong { font-size: 14px; }
.payment-correction-customer-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: 12px;
  margin: 10px 14px 0;
  padding: 10px;
  border: 1px solid #c8d8ff;
  border-radius: 10px;
  background: #f8faff;
}
.payment-correction-customer-panel.hidden { display: none; }
.payment-correction-customer-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}
.payment-correction-customer-route > span {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid #dce5f5;
  border-radius: 8px;
  background: #fff;
}
.payment-correction-customer-route > b {
  align-self: center;
  color: #6680bc;
  font-size: 18px;
}
.payment-correction-customer-route small,
.payment-correction-customer-route em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-correction-customer-route strong {
  overflow: hidden;
  color: #273650;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-correction-customer-route .is-target {
  border-color: #afc5ff;
  background: #f4f7ff;
}
.payment-correction-customer-panel.is-cross-customer .payment-correction-customer-route .is-target {
  border-color: #75c7b4;
  background: #effaf6;
}
.payment-correction-customer-picker {
  position: relative;
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}
.payment-correction-customer-picker > label {
  color: #40516d;
  font-size: 11px;
  font-weight: 800;
}
.payment-correction-customer-input-wrap { position: relative; min-width: 0; }
.payment-correction-customer-input-wrap > input { width: 100%; height: 36px; }
.payment-correction-customer-picker > small {
  color: #64738b;
  font-size: 10px;
  line-height: 1.35;
}
.payment-correction-customer-results {
  position: absolute;
  z-index: 35;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #bfcef0;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(28, 47, 88, .2);
}
.payment-correction-customer-results[hidden] { display: none; }
.payment-correction-customer-results button {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}
.payment-correction-customer-results button:hover,
.payment-correction-customer-results button.is-active { background: #eef4ff; }
.payment-correction-customer-results button.is-selected { background: #e8f8f3; }
.payment-correction-customer-results button.is-blocked {
  cursor: not-allowed;
  opacity: .62;
  background: #f5f6f8;
}
.payment-correction-customer-results button strong {
  overflow: hidden;
  color: #25334d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-correction-customer-results button span {
  overflow: hidden;
  color: #718097;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-correction-customer-empty { padding: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.payment-inline-error {
  margin: 10px 14px 0;
  padding: 9px 11px;
  border: 1px solid #efb8b5;
  border-radius: 8px;
  background: #fff5f4;
  color: #b82e2a;
  font-size: 12px;
  font-weight: 750;
}
.payment-inline-error.hidden { display: none; }
.payment-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}
.payment-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.payment-form-grid input,
.payment-form-grid select {
  width: 100%;
  height: 36px;
}
.payment-form-grid input[readonly] {
  color: var(--text);
  background: #f3f5f8;
}
.payment-receipt-field {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span 1;
  gap: 5px;
}
.payment-receipt-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.payment-receipt-input-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 5px 8px;
}
.payment-receipt-input-row #paymentReceiptClearBtn {
  flex: 0 0 auto;
  width: auto;
  padding-inline: 10px;
  white-space: nowrap;
}
.payment-receipt-hover-preview {
  position: absolute;
  right: calc(100% + 16px);
  left: auto;
  top: -112px;
  z-index: 30;
  display: none;
  width: min(340px, 68vw);
  padding: 8px;
  border: 1px solid #bfd0fa;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(22, 37, 72, .24);
  color: #25324a;
}
.payment-receipt-field:hover .payment-receipt-hover-preview:not(.hidden),
.payment-receipt-field:focus-within .payment-receipt-hover-preview:not(.hidden) { display: grid; gap: 6px; }
.payment-receipt-hover-preview img { display: block; width: 100%; max-height: 175px; object-fit: contain; border-radius: 6px; background: #f5f7fb; }
.payment-receipt-hover-preview em { color: #3159c8; font-size: 13px; font-style: normal; font-weight: 800; text-align: center; }
.payment-receipt-hover-preview em { overflow-wrap: anywhere; }
.payment-receipt-hover-preview small { color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.payment-ocr-manual-review {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 11px;
  border: 1px solid #e8b958;
  border-radius: 10px;
  background: #fffaf0;
}
.payment-ocr-manual-review.hidden { display: none; }
.payment-ocr-manual-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.payment-ocr-manual-review-head strong { color: #7a4d00; font-size: 13px; }
.payment-ocr-manual-review-head span { color: #9b5e00; font-size: 11px; text-align: right; }
.payment-ocr-manual-review p {
  margin: 0;
  color: #7d5206;
  font-size: 12px;
  line-height: 1.55;
}
.payment-ocr-payee-correction {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid #e2b45c;
  border-radius: 8px;
  color: #6f4700;
  background: #fff6dd;
  font-size: 12px;
  font-weight: 750;
}
.payment-ocr-payee-correction.hidden { display: none; }
.payment-ocr-payee-correction select {
  width: min(100%, 360px);
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #d8b46b;
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  font: inherit;
  font-weight: 600;
}
.payment-ocr-payee-correction small {
  color: #8b651d;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}
.payment-form-grid .payment-ocr-manual-review-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  color: #27364e;
  font-size: 12px;
  line-height: 1.5;
}
.payment-form-grid .payment-ocr-manual-review-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}
.payment-ocr-manual-review textarea {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  resize: vertical;
  border: 1px solid #d8c28f;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
}
.payment-ocr-manual-review textarea:focus {
  border-color: #d49a20;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(212, 154, 32, .15);
}
.payment-ocr-manual-review [aria-invalid="true"] { outline: 2px solid #d9363e; outline-offset: 2px; }
.payment-ocr-manual-review-error {
  color: #bd2e28 !important;
  font-size: 12px !important;
  font-weight: 750;
}
.payment-ocr-manual-review-error.hidden { display: none; }
.payment-remark-field { grid-column: 1 / -1; }
.payment-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px 14px;
}
.payment-review-footer-actions { display: flex; align-items: center; gap: 8px; }
.payment-modal-panel:not(.is-reviewing) .payment-review-footer-actions #paymentNotReceivedBtn,
.payment-modal-panel:not(.is-reviewing) .payment-review-footer-actions #paymentReturnBtn { display: none; }
.payment-modal-panel.is-reviewing .payment-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -8px 20px rgba(32, 48, 86, .05);
}
.payment-modal-actions span {
  color: var(--muted);
  font-size: 12px;
}
.payment-modal-actions button { flex: 0 0 auto; }
.payment-review-panel {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 8px;
  background: #f7f9fc;
}
.payment-review-panel.hidden { display: none; }
.payment-review-panel span { color: var(--muted); font-size: 12px; }
.payment-review-panel label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.payment-review-panel input { height: 36px; }
.payment-original-version-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #d9e2f1;
  border-radius: 9px;
  background: #eef3fa;
}
.payment-original-version-head strong { color: #283b58; font-size: 13px; }
.payment-modal-panel.is-resubmitting .payment-original-version-head { display: flex; }
.payment-modal-panel.is-resubmitting .payment-review-panel {
  margin: 0 14px 12px;
  border: 1px solid #d9e2f1;
  border-radius: 10px;
}
.payment-modal-panel.is-resubmitting .payment-review-audit,
.payment-modal-panel.is-resubmitting #paymentReconciliationPreview { display: none !important; }
.payment-review-customer-correction {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #86cfbd;
  border-radius: 9px;
  background: #effaf6;
}
.payment-review-customer-correction.hidden { display: none; }
.payment-review-customer-correction > strong { color: #147660; font-size: 12px; }
.payment-review-customer-correction > span { display: grid; min-width: 0; gap: 2px; }
.payment-review-customer-correction b,
.payment-review-customer-correction small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.payment-review-customer-correction b { color: #263650; font-size: 12px; }
.payment-review-customer-correction small { color: var(--muted); font-size: 10px; }
.payment-review-customer-correction i { color: #208d74; font-size: 16px; font-style: normal; }
.payment-review-ocr-manual {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
  padding: 8px 10px;
  border: 1px solid #e8c36f;
  border-radius: 9px;
  background: #fffaf0;
}
.payment-review-ocr-manual.hidden { display: none; }
.payment-review-ocr-manual strong { color: #7a4d00; font-size: 12px; }
.payment-review-ocr-manual span { color: #38465e; font-size: 12px; overflow-wrap: anywhere; }
.payment-review-ocr-manual small { grid-column: 1 / -1; color: #7c6740; font-size: 11px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .payment-ocr-manual-review-head { flex-direction: column; gap: 4px; }
  .payment-ocr-manual-review-head span { text-align: left; }
  .payment-review-ocr-manual { grid-template-columns: 1fr; }
  .payment-review-ocr-manual small { grid-column: 1; }
}
.payment-review-sheet {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px !important;
}
.payment-review-sheet > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid #dfe6f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(34, 57, 101, .035);
}
.payment-review-sheet > span i { color: var(--muted); font-size: 12px; font-style: normal; }
.payment-review-sheet > span strong {
  color: #1f2a44;
  font-size: 13px;
}
.payment-review-sheet .review-amount { border-color: #cbd9ff; background: #fbfcff; }
#paymentReviewAmount { color: #2458db; font-size: 18px; white-space: nowrap; }
.payment-review-main { display: grid; grid-template-columns: minmax(185px, .5fr) minmax(0, 1.1fr); gap: 7px; }
.payment-review-card { border: 1px solid #dfe6f2; border-radius: 11px; background: #fff; }
.payment-review-card h3 {
  margin: 0;
  padding: 8px 10px;
  color: #25324a;
  font-size: 14px;
}
.payment-review-card h3::before { content: ""; display: inline-block; width: 3px; height: 14px; margin-right: 8px; border-radius: 3px; background: #3765df; vertical-align: -2px; }
.payment-review-details dl { margin: 0; padding: 0 9px 6px; }
.payment-review-details dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px; padding: 6px 2px; border-top: 1px solid #edf1f7; }
.payment-review-details dt { color: var(--muted); font-size: 12px; }
.payment-review-details dd { margin: 0; color: #25324a; font-size: 13px; font-weight: 750; text-align: right; overflow-wrap: anywhere; }
#paymentReviewSubmittedAt {
  font-size: 11px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow-wrap: normal;
}
.payment-review-receipt-card { padding-bottom: 8px; }
.payment-review-receipt-preview {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: clamp(220px, 34vh, 420px);
  min-height: 220px;
  max-height: 52vh;
  margin: 0 7px 5px;
  overflow: auto;
  border: 1px dashed #cfd8e8;
  border-radius: 9px;
  background: #fff;
  color: var(--muted);
}
.payment-review-receipt-preview img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: contain;
  background: #fff;
}
.payment-review-receipt-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 11px; }
.payment-review-receipt-meta small { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.payment-review-audit { display: grid; grid-template-columns: minmax(190px, .6fr) minmax(0, 1.4fr); align-items: end; gap: 6px; padding: 0 9px 8px; }
.payment-review-audit h3 { grid-column: 1 / -1; margin: 0 -9px; }
.payment-review-check { flex-direction: row !important; align-items: center; color: #1f2a44 !important; font-size: 13px !important; }
.payment-review-check input { width: 18px; height: 18px; }
.payment-review-note-error {
  color: #d9363e !important;
  font-size: 12px !important;
  font-weight: 750;
}
.payment-review-audit input:focus {
  border-color: #4b70e2;
  box-shadow: 0 0 0 3px rgba(55, 101, 223, .12);
}
.payment-receipt-viewer-panel {
  width: min(1380px, 96vw);
  height: min(900px, 94vh);
  position: relative;
  min-width: min(520px, calc(100vw - 20px));
  min-height: min(360px, calc(100dvh - 20px));
  max-width: calc(100vw - 20px);
  max-height: calc(100dvh - 20px);
  margin-top: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  resize: both;
  overflow: hidden;
}
.payment-receipt-viewer-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 14px;
  background: #e9edf4;
  color: var(--muted);
}
.payment-receipt-viewer-body img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 8px 30px rgba(20, 35, 68, .16);
}
.payment-receipt-viewer-body.is-image {
  display: block;
  overflow: auto;
  text-align: center;
}
.payment-receipt-viewer-body.is-image img { margin: 0 auto; }
.payment-receipt-viewer-body.is-image-panning,
.payment-receipt-viewer-body.is-image-panning img { cursor: grabbing !important; }
.payment-receipt-viewer-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.role-access-panel {
  padding: 12px;
}
.role-access-panel > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}
.role-after-sale-permission-guide {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  padding: 9px 11px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f3f7ff;
  color: #315783;
  font-size: 12px;
  line-height: 1.55;
}
.role-after-sale-permission-guide strong {
  flex: 0 0 auto;
  color: #1f58c7;
}
.role-after-sale-permission-guide span { min-width: 0; }
.role-create-row,
.system-user-create-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.role-create-row input { width: min(360px, 100%); }
.system-user-create-row input { min-width: 140px; }
.system-user-create-row input,
.system-user-create-row select { flex: 1 1 160px; }
.system-user-create-row button { flex: 0 0 auto; }
.settings-divider {
  height: 1px;
  margin: 14px 0;
  background: var(--line);
}
.role-access-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.role-access-table {
  width: 100%;
  min-width: 920px;
  table-layout: fixed;
  border-collapse: collapse;
}
.role-access-table th,
.role-access-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.role-access-table tr:last-child td { border-bottom: 0; }
.role-access-table th:nth-child(1) { width: 130px; }
.role-access-table th:nth-child(2) { width: 92px; }
.role-access-table th:nth-child(3) { width: 72px; }
.role-access-table th:nth-child(5) { width: 72px; }
.role-access-table input:not([type="checkbox"]) {
  width: 100%;
  height: 34px;
}
.account-permission-user-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.account-permission-user-actions .account-permission-pending { color: #9c671f; border-color: #dfc492; background: #fff9ef; }
#accountPermissionDialog { width: min(700px, calc(100vw - 28px)); min-width: 0; max-width: min(700px, calc(100vw - 28px)); max-height: calc(100dvh - 36px); padding: 0; border: 1px solid #d2deef; border-radius: 12px; color: #243c5b; background: #fff; overflow: auto; }
#accountPermissionDialog header, #accountPermissionDialog footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: #f7faff; }
#accountPermissionDialog h2 { margin: 0; font-size: 17px; } #accountPermissionDialog header p { margin: 5px 0 0; font-size: 12px; color: #70849e; }
#accountPermissionDialog .account-permission-help, #accountPermissionDialog .account-permission-preview-note { margin: 12px 16px; font-size: 12px; line-height: 1.6; color: #6d8099; }
#accountPermissionDialog .account-permission-table-wrap { margin: 0 16px; overflow-x: auto; }
#accountPermissionDialog table { width: 100%; min-width: 510px; font-size: 12px; table-layout: fixed; border-collapse: collapse; }
#accountPermissionDialog th, #accountPermissionDialog td { padding: 9px 7px; min-width: 0; text-align: left; border-bottom: 1px solid #e5ebf4; white-space: normal; overflow-wrap: anywhere; }
#accountPermissionDialog th:first-child { width: 29%; } #accountPermissionDialog th:nth-child(2) { width: 23%; } #accountPermissionDialog th:nth-child(3) { width: 20%; } #accountPermissionDialog select { width: 100%; min-width: 0; padding: 6px; font-size: 12px; }
#accountPermissionDialog [data-account-effective][data-allowed="true"] { color: #0d876b; } #accountPermissionDialog [data-account-effective][data-allowed="false"] { color: #a26045; }
#accountPermissionDialog footer { justify-content: flex-end; border-top: 1px solid #e5ebf4; } #accountPermissionDialog button { padding: 7px 12px; font-size: 12px; }
@media (max-width: 560px) {
  #accountPermissionDialog .account-permission-table-wrap { margin: 0 12px; }
  #accountPermissionDialog table { min-width: 0; font-size: 11px; }
  #accountPermissionDialog th, #accountPermissionDialog td { padding: 9px 4px; }
  #accountPermissionDialog th:first-child { width: 28%; } #accountPermissionDialog th:nth-child(2) { width: 29%; } #accountPermissionDialog th:nth-child(3) { width: 18%; }
  #accountPermissionDialog select { font-size: 11px; padding: 6px 3px; }
}
.role-permission-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.role-permission-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  white-space: nowrap;
}
.role-permission-option.is-after-sale {
  padding: 3px 7px;
  border: 1px solid #c8dafe;
  border-radius: 6px;
  background: #f5f8ff;
}
.role-permission-option.is-after-sale span { color: #2459bb; font-weight: 700; }
.role-permission-option input {
  width: 16px;
  height: 16px;
}
.role-permission-option.is-fixed { color: #52627a; background: #f2f5f9; cursor: not-allowed; }
.role-permission-option.is-fixed input { cursor: not-allowed; }
.role-permission-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
}
.role-permission-legend > span,
.role-permission-option small {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}
.role-permission-legend .risk-view,
.role-permission-option.risk-view small { color: #37607f; background: #eaf3f9; }
.role-permission-legend .risk-action,
.role-permission-option.risk-action small { color: #3557a7; background: #eaf0ff; }
.role-permission-legend .risk-high,
.role-permission-option.risk-high small { color: #b42318; background: #ffebe9; }
.role-permission-legend > small { color: var(--muted); }
.role-permission-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 8px;
}
.role-permission-group {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e2e8f3;
  border-radius: 8px;
  background: #fbfcff;
}
.role-permission-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: #34445f;
  font-size: 11px;
}
.role-permission-group-title span { color: var(--muted); font-size: 10px; }
.role-permission-option {
  padding: 3px 5px;
  border: 1px solid transparent;
  border-radius: 6px;
}
.role-permission-option.risk-high { border-color: #f5c5c0; background: #fff7f6; }
.role-permission-option.is-required { color: #52627a; background: #f1f4f9; }
.role-permission-option.is-required::after {
  content: "依赖";
  color: #6b7890;
  font-size: 9px;
  font-weight: 700;
}
.role-code-note {
  display: block;
  max-width: 130px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-deprecated-permission-note,
.role-permission-conflict {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.45;
}
.role-deprecated-permission-note { color: #805c13; background: #fff7df; }
.role-permission-conflict { color: #b42318; border: 1px solid #f3b8b2; background: #fff0ef; font-weight: 800; }
.role-audit-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}
.role-audit-panel summary {
  padding: 10px 12px;
  color: #334461;
  font-weight: 800;
  cursor: pointer;
}
.role-audit-panel summary span { color: #315bd6; }
.role-audit-list { display: grid; gap: 6px; padding: 0 10px 10px; }
.role-audit-row {
  display: grid;
  grid-template-columns: 145px 120px minmax(160px, 1fr) minmax(200px, 2fr);
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid #e5eaf3;
  border-radius: 7px;
  background: #fff;
  color: #53617a;
  font-size: 11px;
}
.role-audit-row strong { color: #263650; }
.role-permission-change-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #cad5ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(24, 42, 80, .28);
}
.role-permission-change-dialog::backdrop { background: rgba(23, 34, 58, .48); }
.role-permission-change-head { padding: 15px 16px 11px; border-bottom: 1px solid var(--line); }
.role-permission-change-head > div { display: grid; gap: 3px; }
.role-permission-change-head strong { color: #24344e; font-size: 17px; }
.role-permission-change-head small { color: var(--muted); }
.role-permission-change-summary {
  max-height: min(340px, 45vh);
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  color: #3d4c66;
  background: #f7f9fd;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}
.role-permission-conflict-summary { color: #a7352e; background: #fff5f4; font-weight: 800; }
.role-permission-change-reason { display: grid; gap: 6px; padding: 12px 16px 0; color: #32425e; font-size: 12px; font-weight: 800; }
.role-permission-change-reason > span { color: #c43d35; font-size: 10px; }
.role-permission-change-reason textarea { width: 100%; resize: vertical; }
.role-permission-change-error { min-height: 18px; padding: 5px 16px 0; color: #c43d35; font-size: 11px; }
.role-permission-change-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 15px; }
.role-fixed-permission-note {
  display: block;
  margin-top: 4px;
  color: #6b7890;
  font-size: 10px;
  font-weight: 700;
}
@media (max-width: 1100px) {
  .role-permission-groups { grid-template-columns: minmax(300px, 1fr); }
  .role-audit-row { grid-template-columns: 1fr 1fr; }
}
.system-user-table {
  width: 100%;
  min-width: 900px;
  table-layout: fixed;
  border-collapse: collapse;
}
.system-user-table th,
.system-user-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.system-user-table tr:last-child td { border-bottom: 0; }
.system-user-table th:nth-child(4) { width: 150px; }
.system-user-table th:nth-child(5) { width: 90px; }
.system-user-table th:nth-child(6) { width: 72px; }
.system-user-table input,
.system-user-table select {
  width: 100%;
  height: 34px;
}
@media (max-width: 760px) {
  .payment-modal-panel,
  .payment-receipt-viewer-panel { resize: none; }
  .payment-window-resize-handle { display: none !important; }
  .payment-modal-panel { min-width: 0; min-height: 0; max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .payment-receipt-viewer-panel { min-width: 0; min-height: 0; max-width: 100vw; max-height: 100dvh; }
  .payment-modal-head,
  .payment-receipt-viewer-panel > .modal-bar[data-payment-viewer-drag-handle] { cursor: default; touch-action: auto; }
  .payment-receipt-hover-preview { right: auto; left: 0; top: calc(100% + 8px); width: 100%; }
  .payment-customer-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-form-grid { grid-template-columns: 1fr; }
  .payment-correction-customer-panel { grid-template-columns: 1fr; }
  .payment-correction-customer-route { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .payment-review-sheet { grid-template-columns: 1fr 1fr; }
  .payment-review-main { grid-template-columns: 1fr; }
  .payment-original-version-head { align-items: flex-start; flex-direction: column; }
  .payment-review-customer-correction { grid-template-columns: 1fr auto 1fr; }
  .payment-review-customer-correction > strong { grid-column: 1 / -1; }
  .payment-review-audit { grid-template-columns: 1fr; }
  .payment-review-audit h3 { grid-column: 1; }
  .payment-modal-panel.is-reviewing .payment-modal-actions { align-items: flex-start; flex-direction: column; }
  .payment-review-footer-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .payment-receipt-field,
  .payment-remark-field { grid-column: auto; }
  .role-create-row,
  .system-user-create-row { flex-wrap: wrap; }
}
.doc-scroll {
  max-height: 78vh;
  overflow: auto;
  background: #f1f3f7;
  padding: 18px;
}
.doc-paper {
  width: 1000px;
  min-height: 0;
  background: #fff;
  color: #000;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #cfd4dc;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}
.doc-company {
  text-align: center;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #b91c1c;
  margin-bottom: 3px;
}
.doc-subtitle {
  text-align: center;
  color: #b91c1c;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .5px;
}
.doc-red-rule {
  height: 5px;
  margin: 8px 0 10px;
  border-top: 2px solid #b91c1c;
  border-bottom: 1px solid #b91c1c;
}
.doc-head {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  border: 1px solid #333;
  border-bottom: 0;
}
.doc-head-official {
  grid-template-columns: 1fr 2fr 1.25fr;
  border-top: 0;
}
.doc-head div {
  padding: 9px 10px;
  border-right: 1px solid #333;
}
.doc-head div:last-child { border-right: 0; }
.doc-head .title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}
.doc-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 13px;
}
.doc-table th, .doc-table td {
  border: 1px solid #333;
  padding: 8px 9px;
  white-space: normal;
  color: #000;
}
.doc-table th {
  background: #f4f6fb;
  position: static;
  text-align: center;
}
.doc-table .left { text-align: left; }
.doc-total,
.doc-total-label,
.doc-total-amount,
.doc-total-uppercase {
  text-align: right;
  font-weight: 800;
}
.doc-total-label {
  text-align: center;
  font-size: 16px;
}
.doc-total-amount {
  text-align: center;
  font-size: 18px;
}
.doc-total-uppercase {
  text-align: center;
  font-size: 14px;
}
.doc-note {
  border: 1px solid #333;
  border-top: 0;
  min-height: 42px;
  padding: 10px;
}

/* Modern official sales document */
.sales-doc-paper {
  width: 1120px;
  padding: 34px 38px 30px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(31, 41, 55, .13);
  color: #1d232d;
}
.sales-doc-brand {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.sales-doc-logo {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  background: linear-gradient(145deg, #d62832, #a90f1b);
  color: #fff;
  font-size: 29px;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(185, 28, 28, .2);
}
.sales-doc-company {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: .3px;
}
.sales-doc-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: #9aa0aa;
  font-size: 12px;
  letter-spacing: 1px;
}
.sales-doc-subtitle b { color: #c51e29; font-size: 14px; letter-spacing: 2px; }
.sales-doc-print-meta {
  display: grid;
  gap: 8px;
  text-align: right;
  color: #8b929c;
  font-size: 12px;
}
.sales-doc-print-meta b { color: #20252d; font-size: 13px; }
.sales-doc-red-rule {
  height: 3px;
  margin: 20px 0 22px;
  background: linear-gradient(90deg, #b71621 0%, #d7565e 70%, rgba(215, 86, 94, 0) 100%);
}
.sales-doc-meta {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}
.sales-doc-meta > div {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px 18px;
  border: 1px solid #e5e1dd;
  border-radius: 11px;
  background: #fbfaf9;
}
.sales-doc-meta span { color: #9298a2; font-size: 12px; letter-spacing: .6px; }
.sales-doc-meta strong { overflow: hidden; text-overflow: ellipsis; font-size: 16px; white-space: nowrap; }
.sales-doc-table-wrap {
  overflow: hidden;
  border: 1px solid #e6e1dc;
  border-radius: 11px;
}
.sales-doc-table { table-layout: fixed; font-size: 12px; }
.sales-doc-table th,
.sales-doc-table td {
  border: 0;
  border-bottom: 1px solid #ece8e4;
  padding: 16px 10px;
  vertical-align: top;
}
.sales-doc-table th {
  background: #f5f2ef;
  color: #424852;
  font-weight: 750;
}
.sales-doc-table tbody tr:last-child td { border-bottom: 0; }
.sales-doc-table th:nth-child(1) { width: 48px; }
.sales-doc-table th:nth-child(2) { width: 120px; }
.sales-doc-table th:nth-child(3) { width: 105px; }
.sales-doc-table th:nth-child(4) { width: 130px; }
.sales-doc-table th:nth-child(5) { width: 48px; }
.sales-doc-table th:nth-child(6) { width: 68px; }
.sales-doc-table th:nth-child(7) { width: 78px; }
.sales-doc-table td { text-align: center; }
.sales-doc-table td.sales-doc-index { color: #929aa4; font-size: 14px; }
.sales-doc-table td.sales-doc-customer,
.sales-doc-table td.sales-doc-product,
.sales-doc-table td.sales-doc-model,
.sales-doc-table td.sales-doc-recipient { text-align: left; }
.sales-doc-customer,
.sales-doc-product,
.sales-doc-money { font-weight: 750; }
.sales-doc-recipient strong { color: #262b33; }
.sales-doc-recipient b { margin-left: 6px; color: #c5242f; letter-spacing: .6px; }
.sales-doc-recipient p { margin: 7px 0 0; color: #69717d; line-height: 1.55; }
.sales-doc-summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  margin-top: 18px;
  padding: 18px 24px;
  border: 1px solid #f2cbce;
  border-radius: 11px;
  background: #fff7f7;
  color: #8b929c;
  font-size: 13px;
}
.sales-doc-summary-count b { margin-left: 6px; color: #20252d; font-size: 18px; }
.sales-doc-summary-money strong { margin-left: 8px; color: #bd1d28; font-size: 29px; letter-spacing: 1px; }
.sales-doc-summary-uppercase { color: #3f454e; text-align: right; }
.sales-doc-summary-uppercase b { color: #bd1d28; }
.sales-doc-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed #e4dfda;
  font-size: 13px;
}
.sales-doc-footer > div:last-child { text-align: center; }
.sales-doc-footer span {
  display: inline-block;
  width: 150px;
  margin-left: 8px;
  border-bottom: 1px solid #cfd3d8;
}
.purchase-doc-paper .sales-doc-logo {
  background: linear-gradient(145deg, #4f6df0, #304bd0);
  box-shadow: 0 7px 16px rgba(63, 91, 222, .22);
}
.purchase-doc-paper .sales-doc-subtitle b,
.purchase-doc-paper .sales-doc-recipient b,
.purchase-doc-paper .sales-doc-summary-uppercase b { color: #365bd7; }
.purchase-doc-paper .sales-doc-red-rule {
  background: linear-gradient(90deg, #3f5fe5 0%, #7890f0 70%, rgba(120, 144, 240, 0) 100%);
}
.purchase-doc-paper .sales-doc-table th { background: #f1f4fc; }
.purchase-doc-paper .sales-doc-summary {
  border-color: #ccd7ff;
  background: #f6f8ff;
}
.purchase-doc-paper .sales-doc-summary-money strong { color: #3157d7; }
.purchase-doc-table th:nth-child(1) { width: 48px; }
.purchase-doc-table th:nth-child(2) { width: 180px; }
.purchase-doc-table th:nth-child(3) { width: 200px; }
.purchase-doc-table th:nth-child(4) { width: 85px; }
.purchase-doc-table th:nth-child(5) { width: 60px; }
.purchase-doc-table th:nth-child(6) { width: 90px; }
.purchase-doc-table th:nth-child(7) { width: auto; }
.purchase-doc-table .sales-doc-product p { margin: 5px 0 0; font-weight: 400; line-height: 1.4; }
.purchase-doc-footer { grid-template-columns: 1fr 1fr 1fr; }
.purchase-doc-footer > div:last-child { text-align: right; }

.logistics-doc-trigger {
  border-color: #97d4dc;
  color: #126f86;
}
.contract-doc-trigger {
  border-color: #d6bc86;
  color: #8a5a16;
}
.logistics-doc-paper .sales-doc-logo {
  background: linear-gradient(145deg, #1696ac, #126f9a);
  box-shadow: 0 7px 16px rgba(18, 111, 154, .22);
}
.logistics-doc-paper .sales-doc-subtitle b { color: #167792; }
.logistics-doc-paper .sales-doc-red-rule {
  background: linear-gradient(90deg, #167792 0%, #55acba 70%, rgba(85, 172, 186, 0) 100%);
}
.logistics-doc-paper .sales-doc-table-wrap { overflow-x: auto; }
.logistics-doc-table { min-width: 1040px; }
.logistics-doc-table th:nth-child(1) { width: 44px; }
.logistics-doc-table th:nth-child(2) { width: 115px; }
.logistics-doc-table th:nth-child(3) { width: 65px; }
.logistics-doc-table th:nth-child(4) { width: 105px; }
.logistics-doc-table th:nth-child(5) { width: 135px; }
.logistics-doc-table th:nth-child(6) { width: 48px; }
.logistics-doc-table th:nth-child(7) { width: 78px; }
.logistics-doc-table th:nth-child(8) { width: 92px; }
.logistics-doc-table th:nth-child(9) { width: 210px; }
.logistics-doc-table th:nth-child(10) { width: 152px; }
.logistics-doc-table th:last-child,
.logistics-doc-table td:last-child {
  border-left: 2px solid #b9e1e5;
  background: #f0fafb;
}
.logistics-doc-table .sales-doc-recipient p { margin-top: 0; }
.logistics-doc-number { text-align: left !important; overflow-wrap: anywhere; }

/* Official purchase contract */
.contract-doc-paper {
  width: min(100%, 1000px);
  max-width: 1000px;
  min-width: 0;
  padding: 36px 42px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(31, 41, 55, .13);
  color: #20242b;
  font-size: 13px;
  line-height: 1.65;
}
.contract-doc-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
}
.contract-doc-company { font-size: 24px; font-weight: 850; letter-spacing: 1px; }
.contract-doc-title { margin-top: 6px; color: #9a6b22; font-size: 18px; font-weight: 800; letter-spacing: 4px; }
.contract-doc-title span { margin-left: 8px; color: #a0a5ad; font-size: 11px; font-weight: 500; letter-spacing: 1px; }
.contract-doc-header dl { min-width: 250px; margin: 0; }
.contract-doc-header dl div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 3px 0; }
.contract-doc-header dt { color: #8a9099; }
.contract-doc-header dd { margin: 0; font-weight: 750; }
.contract-doc-rule {
  height: 3px;
  margin: 18px 0;
  background: linear-gradient(90deg, #9a6b22, #d6bc86 72%, rgba(214, 188, 134, 0));
}
.contract-doc-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #d7d2ca;
  border-radius: 8px;
  overflow: hidden;
}
.contract-doc-parties > div { display: grid; gap: 4px; padding: 12px 16px; }
.contract-doc-parties > div + div { border-left: 1px solid #d7d2ca; }
.contract-doc-parties span { color: #858b94; font-size: 11px; }
.contract-doc-parties strong { font-size: 15px; }
.contract-doc-intro { margin: 16px 0; text-indent: 2em; color: #4e545d; }
.contract-doc-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.contract-doc-section h3,
.contract-doc-terms h3 { margin: 0 0 7px; color: #78501b; font-size: 14px; }
.contract-doc-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.contract-doc-table th,
.contract-doc-table td {
  min-width: 0;
  padding: 8px 7px;
  border: 1px solid #a9a59f;
  text-align: center;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contract-doc-table th { background: #f4f0e9; }
.contract-doc-table .contract-col-index { width: 5%; }
.contract-doc-table .contract-col-product { width: 19%; }
.contract-doc-table .contract-col-model { width: 18%; }
.contract-doc-table .contract-col-quantity { width: 7%; }
.contract-doc-table .contract-col-price { width: 11%; }
.contract-doc-table .contract-col-amount { width: 11%; }
.contract-doc-table .contract-col-note { width: 29%; }
.contract-doc-table tfoot td { background: #fbfaf7; font-weight: 800; }
.contract-doc-uppercase { padding: 10px 12px; border: 1px solid #a9a59f; border-top: 0; text-align: right; }
.contract-doc-uppercase strong { color: #8a5a16; }
.contract-doc-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-top: 18px; }
.contract-doc-terms section { padding: 10px 0; border-bottom: 1px dashed #ddd6cc; break-inside: avoid; }
.contract-doc-terms p { margin: 3px 0; color: #444a53; }
.contract-doc-bank { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 8px 10px; border-radius: 6px; background: #f8f6f2; }
.contract-doc-signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 24px; padding-top: 18px; border-top: 2px solid #b69a6c; }
.contract-doc-signatures > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; min-height: 92px; }
.contract-doc-signatures strong { grid-column: 1 / -1; font-size: 14px; }
.contract-doc-signatures span { color: #555b64; }
.logistics-doc-number.has-value strong { color: #087b6f; }
.logistics-doc-number.is-empty strong { color: #c17916; }
.logistics-doc-summary {
  grid-template-columns: auto 1fr auto;
  border-color: #b9e1e5;
  background: #f0fafb;
}
.logistics-doc-summary .sales-doc-summary-money strong { color: #167792; }

@media print {
  body.printing-document > * { display: none !important; }
  body.printing-document #docModal {
    position: static;
    display: block !important;
    padding: 0;
    background: #fff;
  }
  body.printing-document #docModal .modal-bar { display: none !important; }
  body.printing-document #docModal .modal-panel { box-shadow: none; width: 100%; border-radius: 0; }
  body.printing-document #docModal .doc-scroll { max-height: none; overflow: visible; padding: 0; background: #fff; }
  body.printing-document #docModal .doc-paper { width: 100%; border: 0; margin: 0; box-shadow: none; }
  body.printing-customer-result > * { display: none !important; }
  body.printing-customer-result .main,
  body.printing-customer-result #customer,
  body.printing-customer-result #customerResult {
    display: block !important;
  }
  body.printing-customer-result .main {
    width: 100%;
    padding: 0;
  }
  body.printing-customer-result #customer > *:not(#customerResult) {
    display: none !important;
  }
  body.printing-customer-result .customer-orders-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (max-width: 900px) {
  body { display: block; }
  .side { width: 100%; display: flex; overflow-x: auto; gap: 6px; }
  .brand { min-width: 120px; margin-bottom: 0; }
  .nav { width: auto; white-space: nowrap; }
  .main { width: 100%; padding: 14px; }
  .metrics, .meta { grid-template-columns: 1fr 1fr; }
  .compact-row { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr); }
  .entry-result-panel { max-height: 55vh; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* 2026 business linework refresh */
html {
  color-scheme: light;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

::selection {
  background: #dce9ff;
  color: #102a56;
}

* {
  scrollbar-color: #aeb8c7 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: #aeb8c7;
  background-clip: padding-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

.side {
  position: sticky;
  top: 0;
  width: 176px;
  height: 100vh;
  overflow-y: auto;
  padding: 14px 10px 12px;
  border-right: 1px solid var(--sidebar-line);
  background: var(--sidebar);
  scrollbar-width: none;
}

.side::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  margin: 0 2px 14px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid #6d9cff;
  border-radius: 5px;
  background: #1f3150;
  color: #f7faff;
  font-size: 12px;
  font-weight: 850;
  margin-top: 0;
}

.brand-copy {
  min-width: 0;
  margin-top: 0;
}

.brand-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy > span {
  overflow: hidden;
  margin-top: 2px;
  color: #9ba8ba;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-label {
  margin: 11px 8px 4px;
  color: #758297;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

.nav {
  position: relative;
  min-height: 34px;
  margin: 0 0 2px;
  padding: 7px 10px 7px 13px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #c4ccda;
  font-size: 13px;
  font-weight: 600;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
}

.nav::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: transparent;
}

.nav:hover {
  border-color: #303c4f;
  background: #1c2534;
  color: #ffffff;
}

.nav.active {
  border-color: #344258;
  background: #202b3c;
  color: #ffffff;
}

.nav.active::before {
  background: #4c82ee;
}

.logout-nav {
  margin-top: 12px;
  border-top: 1px solid var(--sidebar-line);
  color: #f0a4a4;
}

.logout-nav:hover {
  border-color: #5a3137;
  background: #352229;
}

.main {
  width: calc(100vw - 176px);
  min-width: 0;
  padding: 16px 18px;
}

.topbar {
  min-height: 42px;
  margin-bottom: 10px;
  padding: 0 0 9px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

h1 {
  color: #151d2d;
  font-size: 22px;
  font-weight: 760;
  line-height: 1.2;
}

p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel,
.tablewrap,
.stats-search-panel,
.stats-orders-panel,
.order-edit-lockbar {
  border-color: var(--line);
  border-radius: 6px;
  box-shadow: none;
}

.panel {
  padding: 12px;
  margin-bottom: 10px;
}

.panel-title {
  margin-bottom: 9px;
  padding-left: 8px;
  border-left: 3px solid #9bbaf2;
  color: #222c3d;
  font-size: 14px;
  font-weight: 760;
}

.result-title {
  border-left-color: var(--blue);
}

.result-title,
.modal-bar {
  border-color: var(--line);
}

input,
select,
textarea {
  border-color: #cfd7e3;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}

input,
select {
  height: 32px;
}

textarea {
  padding: 9px 10px;
}

textarea:hover,
input:hover,
select:hover {
  border-color: #aeb9c8;
}

textarea:focus,
input:focus,
select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 217, .12);
}

button {
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}

button:focus-visible {
  outline: 3px solid rgba(37, 99, 217, .18);
  outline-offset: 1px;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.primary:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.ghost {
  border-color: var(--line-strong);
  background: #ffffff;
  color: #344054;
}

.ghost:hover {
  border-color: #aeb8c7;
  background: #f6f8fb;
  color: #172033;
}

.danger {
  border-color: #f0caca;
  background: var(--red-soft);
  color: var(--red);
}

.danger:hover {
  border-color: #e6aaaa;
  background: #ffe8e8;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.compact-btn {
  height: 28px;
  border-radius: 5px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 0;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.metrics div {
  min-height: 66px;
  padding: 10px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.metrics div:last-child {
  border-right: 0;
}

.metrics span {
  font-size: 12px;
}

.metrics strong {
  margin-top: 3px;
  color: #172033;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

#mToday { color: var(--blue); }
#mReview { color: var(--amber); }
#mSent { color: var(--green); }
#mIssue { color: var(--red); }

.customer-summary,
.finance-summary-row {
  gap: 0;
}

.customer-summary div,
.finance-summary-row span {
  border-radius: 0;
  border-right-width: 0;
  background: #ffffff;
}

.customer-summary div:first-child,
.finance-summary-row span:first-child {
  border-radius: 6px 0 0 6px;
}

.customer-summary div:last-child,
.finance-summary-row span:last-child {
  border-right-width: 1px;
  border-radius: 0 6px 6px 0;
}

.stats-search-panel {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.stats-field-row,
.stats-search-row,
.stats-date-row,
.stats-total-row {
  gap: 6px;
  margin-bottom: 7px;
}

.stats-chip {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: #475467;
}

.stats-chip:hover {
  border-color: #aeb8c7;
  background: #f6f8fb;
}

.stats-chip.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: #1f54bd;
}

.stats-total-row {
  margin-top: 9px;
}

.stats-total-row b {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.stats-list {
  border-radius: 6px;
}

.finance-summary-row {
  padding: 8px 10px 0;
}

.finance-summary-row span {
  min-height: 38px;
  padding: 5px 10px;
}

.finance-summary-row b {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.tablewrap,
.stats-orders-wrap,
.finance-customers-wrap,
.finance-ledger-wrap,
.supplier-orders-wrap,
.customer-portal #customerResult:not(.empty) {
  background: #ffffff;
}

table:not(.doc-table) {
  color: #202939;
  font-size: 12px;
}

table:not(.doc-table) th {
  height: 30px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line-strong);
  background: #f5f7fa;
  color: #344054;
  font-weight: 760;
}

table:not(.doc-table) td {
  border-bottom: 1px solid #e1e6ee;
}

table:not(.doc-table) td,
.order-count-summary,
.stats-total-row,
.finance-summary-row,
.customer-summary {
  font-variant-numeric: tabular-nums;
}

table:not(.doc-table) tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

table:not(.doc-table) tbody tr:hover td {
  background: #f1f6ff;
}

table:not(.doc-table) tbody tr:has(input.row-check:checked) td,
table:not(.doc-table) tbody tr:has(input.entry-row-check:checked) td {
  background: #eaf2ff;
}

.orders-table th,
.orders-table td,
.portal-orders-table th,
.portal-orders-table td,
.supplier-orders-table th,
.supplier-orders-table td,
.entry-result-table th,
.entry-result-table td {
  height: 28px;
  padding: 3px 5px;
}

.orders-table td input,
.orders-table td select,
.orders-table td textarea,
.entry-result-table .entry-edit-input {
  border-radius: 5px;
}

.orders-table input[readonly],
.orders-table textarea[readonly],
.orders-table input:disabled,
.orders-table textarea:disabled,
.orders-table select:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  cursor: not-allowed;
  opacity: 1;
}

.orders-table input[readonly]:hover,
.orders-table textarea[readonly]:hover {
  border-color: #cbd4e0;
  background: #ffffff;
}

.orders-table input:not([readonly]):not(:disabled),
.orders-table textarea:not([readonly]):not(:disabled),
.orders-table select:not(:disabled) {
  border-color: #b8c8df;
  background: #ffffff;
}

.orders-table input[data-field="logistics_no"] {
  border-color: #b8c8df;
  background: #ffffff;
}

.orders-table .amount-cell,
.money-cell,
.finance-amount,
.stats-qty,
.stats-price,
.stats-amount {
  font-variant-numeric: tabular-nums;
}

.entry-result-table .entry-edit-input:hover,
.entry-result-table .entry-edit-input:focus {
  border-color: #9fb5d5;
  box-shadow: 0 0 0 2px rgba(37, 99, 217, .1);
}

.entry-result-table tr.warn td {
  background: #fff8f7;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.status-confirm {
  border-color: #c6d7f5;
  background: #edf4ff;
  color: #2457b6;
}

.status-pending {
  border-color: #efd5a7;
  background: var(--amber-soft);
  color: #99560a;
}

.status-shipped {
  border-color: #bdd1f8;
  background: #e8f1ff;
  color: #1758c7;
}

.status-complete {
  border-color: #b9dfd0;
  background: var(--green-soft);
  color: #0e6c4c;
}

.status-processing {
  border-color: #cbd3de;
  background: #f1f4f8;
  color: #46576e;
}

.status-cancelled {
  border-color: #efc3c3;
  background: var(--red-soft);
  color: #ad3030;
}

.status-select {
  font-weight: 700;
}

.order-status-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.order-readiness-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid #efb7a9;
  border-radius: 4px;
  background: #fff1ed;
  color: #b33c24;
  font-size: 10.5px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  cursor: help;
}

.orders-table tr.order-not-ready td {
  background: #fffaf8;
}

.orders-table tr.order-not-ready:hover td {
  background: #fff4ef;
}

.payment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

.payment-paid {
  border-color: #b9dfd0;
  background: var(--green-soft);
  color: #0e6c4c;
}

.payment-partial {
  border-color: #efd5a7;
  background: var(--amber-soft);
  color: #99560a;
}

.payment-refund {
  border-color: #c6d7f5;
  background: var(--blue-soft);
  color: #2457b6;
}

.payment-unpaid {
  border-color: #efc3c3;
  background: var(--red-soft);
  color: #ad3030;
}

.order-card,
.customer-card {
  border-radius: 6px;
  border-left: 3px solid #cbd5e1;
}

.order-card:hover,
.customer-card:hover {
  border-color: #9fb9e7;
  background: #f8fbff;
}

.order-card.warn {
  border-color: #edb6b0;
  border-left-color: var(--red);
  background: #fff9f8;
}

.tag,
.result-count {
  border: 1px solid #c9d9f5;
  border-radius: 4px;
  background: var(--blue-soft);
  color: #2457b6;
}

.order-edit-lockbar {
  min-height: 34px;
  padding: 4px 7px;
  background: #ffffff;
}

.login-company,
.login-finance {
  border-radius: 5px;
}

.login-screen,
.modal {
  background: rgba(19, 29, 44, .56);
  backdrop-filter: blur(2px);
}

.login-card,
.modal-panel {
  overflow: hidden;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(18, 30, 48, .2);
}

.login-card {
  border-top: 3px solid var(--blue);
}

.modal-bar {
  min-height: 48px;
  padding: 9px 12px;
  background: #f8fafc;
}

.role-access-wrap,
.customer-license-modal-panel,
.customer-license-thumb {
  border-radius: 5px;
}

.role-permission-option {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.field-option,
.business-license-picker,
.customer-license-upload {
  border-radius: 5px;
  background: #f8fafc;
}

.customer-portal,
.supplier-portal {
  background: var(--bg);
}

.customer-portal .main,
.supplier-portal .main {
  width: min(1240px, calc(100vw - 24px));
  padding: 10px 0;
}

.portal-compact-panel {
  border-radius: 6px;
}

@media (max-width: 900px) {
  body {
    display: block;
  }

  .side {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    height: 54px;
    padding: 7px 9px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-line);
  }

  .brand {
    flex: 0 0 auto;
    min-width: 150px;
    min-height: 38px;
    margin: 0 6px 0 0;
    padding: 0 10px 0 0;
    border-right: 1px solid var(--sidebar-line);
    border-bottom: 0;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .nav-group-label {
    display: none;
  }

  .nav {
    flex: 0 0 auto;
    width: auto;
    min-height: 34px;
    margin: 0;
    padding: 7px 10px;
  }

  .nav::before {
    top: auto;
    right: 7px;
    bottom: 0;
    left: 7px;
    width: auto;
    height: 3px;
  }

  .logout-nav {
    margin-top: 0;
    border-top: 1px solid transparent;
  }

  .main {
    width: 100%;
    padding: 12px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .metrics div:nth-child(2) {
    border-right: 0;
  }

  .metrics div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .main {
    padding: 10px 8px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 20px;
  }

  .panel {
    padding: 9px;
  }

  .stats-field-row,
  .stats-date-row,
  .stats-total-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .customer-summary,
  .finance-summary-row {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .portal-login-strip {
    display: block;
    width: 100%;
    max-width: none;
  }

  .portal-login-strip .panel-title {
    width: 100%;
    margin: 0 0 7px;
  }

  .portal-login-strip .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin: 0;
  }

  .portal-login-strip .actions > input,
  .portal-login-strip .password-chip,
  .portal-login-strip .date-chip {
    width: 100%;
    min-width: 0;
  }

  .portal-login-strip .password-chip input,
  .portal-login-strip .date-chip input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .supplier-portal .portal-compact-panel:not(.portal-login-strip) {
    display: block;
  }

  .supplier-portal .portal-compact-panel:not(.portal-login-strip) .panel-title {
    margin: 0 0 7px;
  }

  .supplier-portal .portal-compact-panel:not(.portal-login-strip) .actions {
    width: 100%;
    margin: 0;
    flex-wrap: wrap;
  }

  .supplier-portal .portal-compact-panel:not(.portal-login-strip) input[type="file"] {
    width: 100%;
    min-width: 0;
  }
}

/* Reference-inspired operations console: light shell, teal search, blue actions. */
@media screen {
  :root {
    --bg: #eef2f7;
    --panel: #ffffff;
    --ink: #182033;
    --text: #182033;
    --muted: #778195;
    --line: #dfe5ee;
    --line-strong: #cfd8e5;
    --blue: #2f6fed;
    --primary: #2f6fed;
    --blue-dark: #245ed1;
    --blue-soft: #edf4ff;
    --teal: #14b8a6;
    --teal-dark: #0f9f91;
    --teal-soft: #e8f8f5;
    --green: #128265;
    --green-soft: #e9f8f2;
    --amber: #c5760b;
    --amber-soft: #fff6e5;
    --red: #c83d3d;
    --red-soft: #fff1f1;
    --sidebar: #ffffff;
    --sidebar-line: #e1e7ef;
  }

  body {
    background: var(--bg);
  }

  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .side {
    width: 184px;
    padding: 13px 11px 12px;
    border-right: 1px solid var(--sidebar-line);
    background: #ffffff;
    box-shadow: 4px 0 18px rgba(31, 47, 74, .05);
  }

  .brand {
    min-height: 46px;
    margin: 0 2px 12px;
    padding: 0 4px 12px;
    border-bottom-color: var(--sidebar-line);
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border: 0;
    border-radius: 8px;
    background: #14b8a6;
    color: #ffffff;
    font-size: 17px;
    box-shadow: 0 7px 16px rgba(20, 184, 166, .22);
  }

  .brand-copy strong {
    color: #1a2233;
    font-size: 14px;
  }

  .brand-copy > span {
    color: #8a94a6;
  }

  .nav-group-label {
    color: #9aa4b4;
    font-size: 10px;
  }

  .nav {
    min-height: 35px;
    border-radius: 7px;
    color: #5c687a;
    font-weight: 650;
  }

  .nav:hover {
    border-color: #d8eee9;
    background: #f1faf8;
    color: #167f75;
  }

  .nav.active {
    border-color: #cfece7;
    background: var(--teal-soft);
    color: #0e8e81;
  }

  .nav.active::before {
    background: var(--teal);
  }

  .logout-nav {
    border-top-color: var(--sidebar-line);
    color: #b05252;
  }

  .logout-nav:hover {
    border-color: #f2d6d6;
    background: #fff4f4;
    color: #b43838;
  }

  .main {
    width: calc(100vw - 184px);
    padding: 13px 15px;
  }

  .topbar,
  #orders .topbar,
  #statistics .topbar,
  #funds .topbar,
  #entry .topbar {
    min-height: 58px;
    margin-bottom: 10px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(31, 47, 74, .05);
  }

  .topbar h1,
  #orders .topbar h1,
  #statistics .topbar h1,
  #funds .topbar h1,
  #entry .topbar h1 {
    color: #1a2233;
    font-size: 20px;
    font-weight: 800;
  }

  .topbar p,
  #orders .topbar p,
  #statistics .topbar p,
  #funds .topbar p,
  #entry .topbar p {
    margin-top: 3px;
    color: #818b9e;
    font-size: 12px;
  }

  .panel,
  .tablewrap,
  .stats-search-panel,
  .stats-orders-panel,
  .orders-control-panel {
    border-color: var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(31, 47, 74, .045);
  }

  .panel-title {
    border-left-color: var(--teal);
    color: #232d40;
  }

  input,
  select,
  textarea {
    border-color: #d5dde8;
    border-radius: 7px;
    background: #ffffff;
  }

  input:hover,
  select:hover,
  textarea:hover {
    border-color: #b8c4d3;
  }

  input:focus,
  select:focus,
  textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .12);
  }

  button {
    border-radius: 7px;
  }

  .primary {
    border-color: var(--blue);
    background: var(--blue);
    box-shadow: 0 3px 7px rgba(47, 111, 237, .16);
  }

  .primary:hover {
    border-color: var(--blue-dark);
    background: var(--blue-dark);
  }

  .ghost {
    border-color: #d4dce7;
    background: #f7f9fc;
    color: #465166;
  }

  .ghost:hover {
    border-color: #c5d0de;
    background: #eef2f7;
  }

  #searchBtn,
  #statsSearchBtn {
    border-color: var(--teal);
    background: var(--teal);
    box-shadow: 0 3px 7px rgba(20, 184, 166, .18);
  }

  #searchBtn:hover,
  #statsSearchBtn:hover {
    border-color: var(--teal-dark);
    background: var(--teal-dark);
  }

  #exportBtn,
  #exportFundsLedgerBtn {
    border-color: var(--teal);
    background: var(--teal);
    color: #ffffff;
  }

  .metrics {
    gap: 9px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .metrics div {
    min-height: 64px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 3px 9px rgba(31, 47, 74, .04);
  }

  .metrics div:nth-child(1) {
    border-color: #c7ece6;
    background: var(--teal-soft);
  }

  .metrics div:nth-child(2) {
    border-color: #f0ddba;
    background: #fff9ec;
  }

  .metrics div:nth-child(3) {
    border-color: #d3e1fb;
    background: #f2f6ff;
  }

  .metrics div:nth-child(4) {
    border-color: #eadfe4;
    background: #faf7f9;
  }

  .metrics strong {
    font-size: 23px;
  }

  #statistics .stats-search-panel {
    padding: 10px 12px;
  }

  #statistics .stats-search-row {
    display: grid;
    grid-template-columns: minmax(280px, 720px) 72px 88px;
    justify-content: start;
    gap: 8px;
  }

  #statistics .stats-search-row input,
  #statistics .stats-search-row button,
  #statistics .stats-date-row input,
  #statistics .stats-date-row button {
    height: 34px;
  }

  .stats-total-row b,
  .finance-summary-row b {
    color: #2f6fed;
  }

  .stats-total-row > span,
  .finance-summary-row span,
  .customer-summary div {
    border-color: var(--line);
    background: #f8fafc;
  }

  .finance-summary-row span:nth-child(2),
  .customer-summary div:nth-child(2) {
    border-color: #c7ece6;
    background: var(--teal-soft);
  }

  .finance-summary-row span:nth-child(3),
  .customer-summary div:nth-child(3) {
    border-color: #d4e1fb;
    background: #f1f6ff;
  }

  .finance-summary-row span:nth-child(4),
  .customer-summary div:nth-child(4) {
    border-color: #f0ddba;
    background: #fff9ec;
  }

  table:not(.doc-table) th {
    border-bottom-color: #d6dfeb;
    background: #f4f7fb;
    color: #3c485b;
  }

  table:not(.doc-table) td {
    border-bottom-color: #e3e8ef;
  }

  table:not(.doc-table) tbody tr:nth-child(even) td {
    background: #fbfcfe;
  }

  table:not(.doc-table) tbody tr:hover td {
    background: #ecf9f7;
  }

  table:not(.doc-table) tbody tr:has(input.row-check:checked) td,
  table:not(.doc-table) tbody tr:has(input.entry-row-check:checked) td {
    background: #eaf4ff;
  }

  .tag,
  .result-count {
    border-color: #cfece7;
    background: var(--teal-soft);
    color: #0e8e81;
  }

  .login-card {
    width: min(390px, calc(100vw - 28px));
    padding: 24px;
    border-top: 4px solid var(--teal);
    border-radius: 8px;
  }

  .login-card .primary {
    border-color: var(--teal);
    background: var(--teal);
  }

  #orderEditModal,
  #orderVoidModal {
    z-index: 30;
    align-items: center;
    padding: 18px;
    background: rgba(25, 35, 51, .48);
    backdrop-filter: blur(3px);
  }

  .entry-submit-confirm-popover {
    position: fixed;
    z-index: 82;
    width: min(360px, calc(100vw - 20px));
    filter: drop-shadow(0 16px 30px rgba(17, 36, 68, .18));
  }

  .entry-submit-confirm-popover.hidden {
    display: none;
  }

  .entry-submit-confirm-popover::before {
    position: absolute;
    bottom: -6px;
    left: var(--entry-submit-confirm-arrow-left, 50%);
    z-index: 2;
    width: 12px;
    height: 12px;
    border-right: 1px solid #dce5f2;
    border-bottom: 1px solid #dce5f2;
    background: #fff;
    content: "";
    transform: translateX(-50%) rotate(45deg);
  }

  .entry-submit-confirm-popover[data-placement="bottom"]::before {
    top: -6px;
    bottom: auto;
    border: 0;
    border-top: 1px solid #dce5f2;
    border-left: 1px solid #dce5f2;
    background: #f8faff;
  }

  .entry-submit-confirm-panel {
    overflow: hidden;
    width: 100%;
    border: 1px solid #dce5f2;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 20px 58px rgba(17, 36, 68, .22);
  }

  .entry-submit-confirm-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    padding: 13px 14px 11px;
    border-bottom: 1px solid #e8edf5;
    background: linear-gradient(135deg, #f7faff 0%, #ffffff 75%);
  }

  .entry-submit-confirm-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: #e8f0ff;
    color: #245fd4;
    font-size: 15px;
    font-weight: 900;
  }

  .entry-submit-confirm-head > div {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .entry-submit-confirm-head strong {
    color: #1e2f49;
    font-size: 15px;
  }

  .entry-submit-confirm-head small {
    color: #8290a5;
    font-size: 11px;
  }

  #entrySubmitConfirmCount {
    color: #245fd4;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
  }

  .entry-submit-confirm-close {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #8390a2;
    font-size: 20px;
    font-weight: 500;
  }

  .entry-submit-confirm-close:hover {
    background: #edf2f8;
    color: #2e405b;
  }

  .entry-submit-confirm-body {
    padding: 12px 14px 14px;
  }

  .entry-submit-confirm-body p {
    display: grid;
    gap: 4px;
    margin: 0;
    color: #536176;
    font-size: 12px;
    line-height: 1.5;
  }

  .entry-submit-confirm-body p strong {
    color: #27364d;
    font-size: 13px;
  }

  .entry-submit-confirm-body p span {
    color: #7b8799;
  }

  .entry-submit-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
  }

  .entry-submit-confirm-actions button {
    min-width: 82px;
    height: 34px;
  }

  .order-confirm-popover {
    position: fixed;
    z-index: 80;
    width: min(440px, calc(100vw - 20px));
    filter: drop-shadow(0 18px 34px rgba(17, 36, 68, .18));
  }

  .order-confirm-popover.hidden {
    display: none;
  }

  .order-confirm-popover::before {
    position: absolute;
    top: -6px;
    left: var(--order-confirm-arrow-left, calc(100% - 42px));
    z-index: 2;
    width: 12px;
    height: 12px;
    border-top: 1px solid #dce5f2;
    border-left: 1px solid #dce5f2;
    background: #f8faff;
    content: "";
    transform: translateX(-50%) rotate(45deg);
  }

  .order-confirm-popover[data-placement="top"]::before {
    top: auto;
    bottom: -6px;
    border: 0;
    border-right: 1px solid #dce5f2;
    border-bottom: 1px solid #dce5f2;
    background: #ffffff;
  }

  .order-confirm-modal-panel {
    width: 100%;
    border: 1px solid #dce5f2;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(17, 36, 68, .24);
  }

  .order-confirm-modal-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 11px;
    padding: 16px 17px 13px;
    border-bottom: 1px solid #e8edf5;
    background: linear-gradient(135deg, #f7faff 0%, #ffffff 72%);
  }

  .order-confirm-modal-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    background: #e8f0ff;
    color: #245fd4;
    font-size: 20px;
    font-weight: 900;
  }

  .order-confirm-modal-head > div {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  .order-confirm-modal-head strong {
    color: #1e2f49;
    font-size: 17px;
  }

  .order-confirm-modal-head small {
    color: #8290a5;
    font-size: 11px;
  }

  .order-confirm-modal-close {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8390a2;
    font-size: 22px;
    font-weight: 500;
  }

  .order-confirm-modal-close:hover {
    background: #edf2f8;
    color: #2e405b;
  }

  .order-confirm-modal-body {
    padding: 15px 17px 17px;
  }

  .order-confirm-summary {
    display: grid;
    grid-template-columns: 1fr 1.15fr .8fr;
    overflow: hidden;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    background: #f8faff;
  }

  .order-confirm-summary > span {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: 10px 11px;
    border-right: 1px solid #e2e9f3;
  }

  .order-confirm-summary > span:last-of-type {
    border-right: 0;
    text-align: right;
  }

  .order-confirm-summary small {
    color: #8491a4;
    font-size: 10px;
  }

  .order-confirm-summary strong {
    overflow: hidden;
    color: #273a57;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #orderConfirmAmount {
    color: #1e5bd1;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
  }

  .order-confirm-summary > p {
    grid-column: 1 / -1;
    overflow: hidden;
    margin: 0;
    padding: 8px 11px;
    border-top: 1px solid #e2e9f3;
    color: #6d7c91;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-confirm-description {
    display: grid;
    gap: 4px;
    margin: 12px 1px 0;
    color: #536176;
    font-size: 12px;
    line-height: 1.5;
  }

  .order-confirm-description strong {
    color: #27364d;
    font-size: 13px;
  }

  .order-confirm-description span {
    color: #7b8799;
  }

  .order-confirm-error {
    min-height: 0;
    margin-top: 0;
    color: #c73737;
    font-size: 11px;
  }

  .order-confirm-error:not(:empty) {
    min-height: 30px;
    margin-top: 11px;
    padding: 7px 9px;
    border: 1px solid #f0c7c7;
    border-radius: 7px;
    background: #fff5f5;
  }

  .order-confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px;
  }

  .order-confirm-modal-actions button {
    min-width: 94px;
    height: 36px;
  }

  .order-confirm-modal-panel.is-busy .order-confirm-modal-close,
  .order-confirm-modal-panel.is-busy #cancelOrderConfirmModalBtn {
    pointer-events: none;
    opacity: .45;
  }

  @media (max-width: 520px) {
    .order-confirm-summary {
      grid-template-columns: 1fr 1fr;
    }

    .order-confirm-summary > span:nth-child(2) {
      border-right: 0;
    }

    .order-confirm-summary > span:last-of-type {
      grid-column: 1 / -1;
      border-top: 1px solid #e2e9f3;
      text-align: left;
    }
  }

  .order-edit-modal-panel {
    width: min(430px, calc(100vw - 28px));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 22px 60px rgba(23, 35, 55, .24);
  }

  .order-edit-modal-panel .modal-bar {
    min-height: 54px;
    padding: 10px 12px 10px 14px;
    background: #ffffff;
  }

  .order-edit-modal-panel .modal-bar > div {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
  }

  .modal-icon-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--amber-soft);
    color: #a6680b;
    font-size: 12px;
    font-weight: 800;
  }

  .modal-icon-void {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #fff0f0;
    color: #b42318;
    font-size: 12px;
    font-weight: 800;
  }

  .order-edit-modal-body {
    padding: 18px;
  }

  .order-edit-modal-body > p {
    margin: 0 0 14px;
    color: #6f7a8d;
    line-height: 1.6;
  }

  .order-edit-password-field {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    color: #475467;
    font-size: 13px;
    font-weight: 700;
  }

  .order-edit-password-field input {
    width: 100%;
    min-width: 0;
    height: 38px;
  }

  .order-edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
  }

  .order-edit-modal-actions button {
    min-width: 92px;
  }

  .order-void-summary {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid #f1d0d0;
    border-radius: 7px;
    background: #fff8f7;
  }

  .order-void-summary strong {
    color: #9b1c1c;
  }

  .order-void-summary span {
    color: #667085;
    font-size: 12px;
    line-height: 1.5;
  }

  .order-void-reason-field {
    display: block;
    margin-bottom: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
  }

  #orderVoidReason {
    width: 100%;
    min-height: 92px;
    resize: vertical;
  }

  #orderVoidReason[aria-invalid="true"] {
    border-color: #d92d20;
    box-shadow: 0 0 0 3px rgba(217, 45, 32, .12);
  }

  .order-void-error {
    min-height: 20px;
    padding-top: 5px;
    color: #b42318;
    font-size: 12px;
  }

  .order-voided-label {
    display: grid;
    gap: 2px;
    max-width: 108px;
    color: #b42318;
    line-height: 1.2;
  }

  .order-voided-label small {
    overflow: hidden;
    color: #7a4a4a;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Unified after-sale records are historical/read-only rows.  Keep the
     stamp visibly distinct from an active order while retaining the compact
     layout used by the former void label. */
  .order-after-sale-stamp {
    max-width: 128px;
    color: #697386;
    cursor: help;
  }

  .order-after-sale-stamp small {
    color: #7b8697;
  }

  .order-after-sale-modal-panel {
    position: absolute !important;
    top: 50%;
    left: 50%;
    width: min(680px, calc(100vw - 28px));
    min-width: min(460px, calc(100vw - 20px));
    min-height: 420px;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 32px);
    transform: translate(-50%, -50%);
    resize: both;
    overflow: auto;
  }

  /* Keep this workflow above the sticky navigation and other page surfaces.
     The old z-index (8) let the left rail paint over a restored dialog whose
     saved position started inside the rail. */
  #orderAfterSaleModal {
    z-index: 2147483000;
  }

  /* Always cover the full browser viewport. The admin shell is a flex
     container and the left rail is sticky; relying on generic .modal sizing
     can otherwise constrain the overlay to the main column. */
  #orderAfterSaleModal.order-after-sale-modal-root {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 18px !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2147483000 !important;
  }

  #orderAfterSaleModal.order-after-sale-modal-root.hidden {
    display: none !important;
  }

  #orderAfterSaleModal.order-after-sale-modal-root:not(.hidden) {
    display: flex !important;
  }

  .order-after-sale-modal-bar {
    cursor: move;
    user-select: none;
    touch-action: none;
  }

  .order-after-sale-modal-bar > div {
    align-items: center;
    justify-content: flex-start;
  }

  .order-after-sale-drag-hint {
    color: #7b8697;
    font-size: 11px;
    font-weight: 500;
  }

  .order-after-sale-modal-body {
    display: grid;
    gap: 12px;
    padding: 16px;
  }

  .order-after-sale-description {
    margin: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.6;
  }

  .order-after-sale-flow-note {
    display: grid;
    gap: 4px;
    padding: 9px 11px;
    border: 1px solid #dbe5f4;
    border-radius: 8px;
    background: #f5f8fd;
    color: #53627a;
    font-size: 11px;
    line-height: 1.45;
  }

  .order-after-sale-flow-note strong {
    color: #344054;
    font-size: 12px;
  }

  .order-after-sale-flow-note b {
    color: #2457b6;
  }

  .order-after-sale-role-hint {
    display: block;
    padding: 5px 7px;
    border-radius: 5px;
    background: #eaf2ff;
    color: #2457b6;
    font-size: 11px;
    font-weight: 700;
  }

  .order-after-sale-role-hint.is-warn {
    background: #fff4e5;
    color: #a15c00;
  }

  .order-after-sale-workflow {
    display: grid;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid #dbe5f4;
    border-radius: 8px;
    background: #ffffff;
  }

  .order-after-sale-workflow-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    color: #344054;
    font-size: 12px;
  }

  .order-after-sale-workflow-head span {
    color: #2457b6;
    font-size: 11px;
    font-weight: 700;
    text-align: right;
  }

  .order-after-sale-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .order-after-sale-role-card {
    display: grid;
    gap: 2px;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid #e3e9f3;
    border-radius: 7px;
    background: #f8faff;
  }

  .order-after-sale-role-card span {
    color: #7b8697;
    font-size: 10px;
  }

  .order-after-sale-role-card strong {
    overflow: hidden;
    color: #344054;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-after-sale-role-card small,
  .order-after-sale-current-case,
  .order-after-sale-workflow-error {
    margin: 0;
    color: #667085;
    font-size: 10px;
    line-height: 1.4;
  }

  .order-after-sale-current-case {
    color: #2457b6;
    font-weight: 700;
  }

  .order-after-sale-workflow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
  }

  .order-after-sale-workflow-actions .compact-btn {
    min-width: 88px;
  }

  .order-after-sale-history {
    border-top: 1px solid #edf1f7;
    padding-top: 7px;
  }

  .order-after-sale-history summary {
    color: #53627a;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
  }

  .order-after-sale-history ul {
    display: grid;
    gap: 4px;
    max-height: 118px;
    margin: 6px 0 0;
    padding: 0;
    overflow: auto;
    list-style: none;
  }

  .order-after-sale-history li {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 7px;
    align-items: baseline;
    color: #667085;
    font-size: 10px;
  }

  .order-after-sale-history li span {
    color: #344054;
    font-weight: 700;
  }

  .order-after-sale-history li b {
    color: #2457b6;
  }

  .order-after-sale-history li small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .order-after-sale-workflow-error {
    color: #b42318;
  }

  .order-after-sale-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #dfe6f1;
    border-radius: 8px;
    background: #f8faff;
  }

  .order-after-sale-fieldset legend {
    padding: 0 5px;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
  }

  .order-after-sale-fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #344054;
    font-size: 13px;
  }

  .order-after-sale-items {
    display: grid;
    gap: 7px;
  }

  .order-after-sale-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px 92px;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid #e3e9f3;
    border-radius: 7px;
    background: #fff;
    color: #344054;
    font-size: 12px;
  }

  .order-after-sale-item input[type="number"] {
    width: 100%;
    min-width: 0;
  }

  .order-after-sale-reason-field {
    color: #344054;
    font-size: 12px;
    font-weight: 700;
  }

  #orderAfterSaleReason {
    width: 100%;
    min-height: 72px;
    resize: vertical;
  }

  @media (max-width: 560px) {
    .order-after-sale-modal-panel {
      top: 50%;
      left: 10px;
      width: calc(100vw - 20px);
      min-width: 0;
      transform: translateY(-50%);
    }

    .order-after-sale-drag-hint { display: none; }
    .order-after-sale-role-grid { grid-template-columns: 1fr; }
    .order-after-sale-item { grid-template-columns: minmax(0, 1fr) 74px; }
    .order-after-sale-item > :last-child { grid-column: 1 / -1; }
  }
}

@media screen and (max-width: 900px) {
  .side {
    width: 100%;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(31, 47, 74, .06);
  }

  .brand-copy strong {
    color: #1a2233;
  }

  .main {
    width: 100%;
    padding: 10px;
  }

  .nav {
    color: #5c687a;
  }

  #orders .orders-control-panel .filters {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(260px, 2fr) 70px auto;
    overflow-x: auto;
  }
}

@media screen and (max-width: 640px) {
  .topbar,
  #orders .topbar,
  #statistics .topbar,
  #funds .topbar,
  #entry .topbar {
    min-height: 0;
    padding: 9px 10px;
  }

  #orders .orders-control-panel .filters {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  #orders .orders-control-panel .date-filter-label {
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
  }

  #orders .orders-control-panel .date-filter-label input {
    width: 100%;
    min-width: 0;
  }

  #orders .orders-control-panel .filters #fQ {
    grid-column: 1 / -1;
  }

  #orders .orders-control-panel .toggle-label {
    justify-self: end;
  }

  .order-lock-help {
    display: none;
  }

  #entry .entry-input-panel .archive-select-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  #entry .entry-input-panel .archive-select-row > label,
  #entry .entry-input-panel .archive-select-row > label input {
    width: 100%;
    min-width: 0;
  }

  #entry .entry-import-inline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  #entry .entry-import-inline input[type="file"] {
    width: 100%;
    min-width: 0;
  }

  #entry .result-title,
  #entry .result-title-left {
    flex-wrap: nowrap;
  }

  #entry .result-title {
    overflow-x: auto;
  }

  #entry .result-title button,
  #entry .result-title-left > span,
  #entry .result-count {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  #statistics .stats-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #statistics .stats-search-row #statsShowAllBtn {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .order-edit-password-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* Keep the customer result controls compact when summary data is present. */
@media screen {
  #customer .customer-result-bar {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    height: auto;
    margin: 6px 0;
  }

  #customer #customerResultActions {
    align-self: center;
    min-width: max-content;
  }

  #customer #customerSummary:not(.hidden) {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    justify-content: end;
    gap: 6px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0 0 2px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  #customer #customerSummary > div {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    width: auto !important;
    min-width: 96px;
    max-width: none;
    min-height: 32px;
    height: 32px !important;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #ffffff;
  }

  #customer #customerSummary > div:nth-child(2) {
    border-color: #c7ece6;
    background: var(--teal-soft);
  }

  #customer #customerSummary > div:nth-child(3) {
    border-color: #d4e1fb;
    background: #f1f6ff;
  }

  #customer #customerSummary > div:nth-child(4) {
    border-color: #f0ddba;
    background: #fff9ec;
  }

  #customer #customerSummary span,
  #customer #customerSummary strong {
    display: inline;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
  }

  #customer #customerSummary span {
    font-size: 12px;
  }

  #customer #customerSummary strong {
    font-size: 16px;
  }

  #customer #customerResult {
    margin-top: 4px;
  }
}

@media screen and (max-width: 720px) {
  #customer .customer-result-bar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #customer #customerSummary:not(.hidden) {
    justify-content: start;
  }
}
.backup-status {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.backup-status strong { color: #0f172a; }
.backup-status .backup-ok { color: #047857; }
.backup-status .backup-warning { color: #b45309; }
.backup-table td small { display: block; margin-top: 3px; color: #64748b; }
.backup-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.authorization-h5-button{border:1px solid #8b5cf6;background:#f5f3ff;color:#6d28d9;border-radius:10px;padding:10px 16px;font-weight:800;white-space:nowrap}
.authorization-workflow-tabs{display:flex;gap:8px;margin:0 0 14px;padding:5px;background:#eef2f9;border:1px solid #e0e6f0;border-radius:13px;width:max-content}.authorization-workflow-tabs button{height:42px;padding:0 20px;border:0;border-radius:9px;background:transparent;color:#64718a;font-weight:800}.authorization-workflow-tabs button.active{background:#fff;color:#3158d8;box-shadow:0 3px 10px rgba(38,61,120,.09)}.authorization-workflow-tabs b{display:inline-grid;place-items:center;min-width:23px;height:23px;margin-left:5px;padding:0 6px;border-radius:12px;background:#fff0ef;color:#e24a3e}.authorization-workflow-tabs button.active b{background:#eaf0ff;color:#3158d8}.authorization-alert.workflow-hidden{display:none!important}
.authorization-applications-panel{padding:18px}.authorization-applications-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,260px) 170px auto;gap:14px;align-items:end;margin-bottom:16px}.authorization-applications-toolbar>div{display:grid;gap:4px}.authorization-applications-toolbar>div strong{font-size:18px}.authorization-applications-toolbar>div span{color:#7d8aa1}.authorization-applications-toolbar label{display:grid;gap:6px;color:#6e7b91}.authorization-applications-toolbar input,.authorization-applications-toolbar select{height:42px;border:1px solid #d9e0eb;border-radius:9px;background:#fff;padding:0 10px}
.authorization-h5-panel{width:min(1040px,94vw);max-height:88vh;overflow:auto;padding:0 22px 22px}
.authorization-h5-panel .modal-bar{position:sticky;top:0;z-index:3;background:#fff;padding:20px 0 14px}
.authorization-h5-panel .modal-bar div{display:grid;gap:4px}.authorization-h5-panel .modal-bar small{color:#8090aa;font-weight:500}
.authorization-h5-create{display:grid;grid-template-columns:minmax(280px,1fr) 150px 250px;gap:14px;align-items:end;padding:18px;background:#f7f8ff;border:1px solid #dfe5fb;border-radius:16px}
.authorization-h5-create label{display:grid;gap:8px;color:#65738d}.authorization-h5-create input,.authorization-h5-create select{width:100%;height:48px;border:1px solid #d8dfed;border-radius:10px;background:#fff;padding:0 14px;font-size:15px}
.authorization-h5-create button{height:48px}
.authorization-h5-result{display:grid;grid-template-columns:132px minmax(0,1fr) auto;align-items:center;gap:18px;margin-top:14px;padding:14px;border:1px solid #bdd2ff;border-radius:14px;background:#f5f9ff}
.authorization-h5-result img{width:132px;height:132px;border-radius:10px}.authorization-h5-result div{display:grid;gap:8px}.authorization-h5-result input{width:100%;height:42px;border:1px solid #d6deed;border-radius:8px;padding:0 10px}
.authorization-h5-result-actions{display:flex!important;flex-direction:column;gap:10px!important;min-width:170px}.authorization-h5-result-actions button{height:44px;white-space:nowrap}
.authorization-h5-links-heading{display:flex;align-items:center;gap:12px;margin:22px 0 12px;padding-bottom:11px;border-bottom:1px solid #e3e7ef}.authorization-h5-links-heading span{color:#8390a5}
.authorization-h5-link-filters{display:grid;grid-template-columns:minmax(220px,1fr) 150px auto;gap:10px;margin-bottom:12px}.authorization-h5-link-filters input,.authorization-h5-link-filters select{height:40px;border:1px solid #d9e0eb;border-radius:9px;background:#fff;padding:0 11px}
.authorization-h5-tabs{display:flex;gap:8px;margin:22px 0 12px;border-bottom:1px solid #e4e8f0}.authorization-h5-tabs button{border:0;background:transparent;padding:12px 16px;color:#68758d;font-weight:800}.authorization-h5-tabs button.active{color:#3158d8;border-bottom:3px solid #3158d8}.authorization-h5-tabs b{display:inline-grid;place-items:center;min-width:22px;height:22px;border-radius:11px;background:#fff1f0;color:#e34b3f;margin-left:4px}
.authorization-application-list,.authorization-h5-links{display:grid;gap:12px;max-height:480px;overflow:auto}
.authorization-application-card,.authorization-h5-links article{border:1px solid #dfe4ee;border-radius:14px;background:#fff;padding:16px}
.authorization-application-head,.authorization-h5-links article{display:flex;align-items:center;gap:12px}.authorization-application-head>div,.authorization-h5-links article>div{display:grid;gap:4px;min-width:0;flex:1}.authorization-application-head span,.authorization-h5-links article span{color:#8190a8;font-size:13px}.authorization-application-head em,.authorization-h5-links em{font-style:normal;border-radius:999px;padding:6px 10px;background:#fff4d9;color:#b66e00;font-weight:800}.authorization-application-card.issued .authorization-application-head em,.authorization-h5-links em.active{background:#e8f8f0;color:#14835d}.authorization-application-card.rejected .authorization-application-head em,.authorization-application-card.failed .authorization-application-head em,.authorization-h5-links em.disabled,.authorization-h5-links em.expired{background:#fff0ef;color:#d6493d}.authorization-application-card.internally_approved .authorization-application-head em{background:#e9f0ff;color:#3158d8}.authorization-application-card.submitted_to_brand .authorization-application-head em,.authorization-application-card.brand_processing .authorization-application-head em{background:#f1ecff;color:#7546c8}.authorization-application-card.awaiting_document .authorization-application-head em,.authorization-application-card.ready_to_issue .authorization-application-head em{background:#fff1dd;color:#b86600}
.authorization-application-card{overflow:hidden}.authorization-application-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0;margin-top:15px;padding:14px;background:#f8f9fc;border-radius:10px}.authorization-application-grid span{display:flex;align-items:center;gap:7px;min-width:0;white-space:nowrap}.authorization-application-grid small{flex:0 0 auto;color:#8996aa}.authorization-application-grid small::after{content:"："}.authorization-application-grid .authorization-attachment-link{flex:0 0 auto}.authorization-application-card p{color:#60708a}.authorization-application-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:12px}.authorization-attachment-link{border:0;background:transparent;color:#3158d8;padding:0;text-align:left;text-decoration:underline;cursor:pointer;white-space:nowrap}
.authorization-brand-progress{display:flex;gap:22px;flex-wrap:wrap;margin-top:10px;padding:10px 13px;border-radius:9px;background:#f4f1ff;color:#61527f}.authorization-final-document{display:flex;align-items:center;gap:6px;margin-top:10px;padding:10px 13px;border:1px solid #cce6d9;border-radius:9px;background:#f0fbf6;color:#176b50}.authorization-review-note{margin-top:10px;color:#748198}
.authorization-application-grid .authorization-application-files-cell{align-items:flex-start}.authorization-application-files{display:grid;gap:7px;min-width:0}.authorization-application-file-row{display:grid!important;grid-template-columns:82px minmax(0,1fr);gap:7px!important;align-items:start!important;white-space:normal!important}.authorization-application-file-row>b{color:#5f6f88;font-size:13px;line-height:22px}.authorization-application-file-row>span{display:flex;gap:10px;flex-wrap:wrap;min-width:0}.authorization-application-file-row em{color:#a0a9b8;font-style:normal;line-height:22px}.authorization-application-file-row .authorization-attachment-link{max-width:360px;overflow:hidden;text-overflow:ellipsis;line-height:22px}
.authorization-application-file-row details{min-width:0}.authorization-application-file-row summary{color:#3158d8;cursor:pointer;line-height:22px}.authorization-application-file-row details>span{display:flex;gap:9px;flex-wrap:wrap;padding-top:5px}
.authorization-application-grid .authorization-application-files{display:grid;grid-auto-flow:row;gap:7px;min-width:0;width:100%}
.authorization-application-grid .authorization-application-file-row{align-items:center!important}
.authorization-file-actions,.authorization-application-grid .authorization-file-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;max-width:100%}
.authorization-application-file-row>span,.authorization-application-file-row details>.authorization-application-file-list{display:grid;gap:7px;min-width:0}
.authorization-file-actions .authorization-attachment-link,.authorization-file-label{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.authorization-application-grid .authorization-file-label{display:block}
.authorization-attachment-download{height:26px;min-height:26px;padding:2px 7px;border:1px solid #d7e0f1;border-radius:6px;background:#fff;color:#3158d8;font-size:12px;line-height:20px;white-space:nowrap}
.authorization-final-document{flex-wrap:wrap}.authorization-final-document>.authorization-file-actions{flex:0 1 560px;width:560px;max-width:100%}
.authorization-application-head strong,.authorization-application-head .authorization-application-submitter{overflow-wrap:anywhere;white-space:normal}
.authorization-reason-popover,.authorization-action-popover{position:fixed;z-index:1500;display:grid;width:min(360px,calc(100vw - 20px));gap:9px;padding:15px;border:1px solid #ced8e9;border-radius:13px;background:#fff;box-shadow:0 16px 42px rgba(24,39,73,.24)}.authorization-reason-popover.hidden{display:none}.authorization-reason-popover label,.authorization-action-popover label{display:grid;gap:5px;color:#657087;font-size:12px;font-weight:700}.authorization-reason-popover textarea,.authorization-action-popover input,.authorization-action-popover textarea{width:100%;border:1px solid #d5deeb;border-radius:8px;background:#fff;padding:9px;resize:vertical}.authorization-reason-popover>div,.authorization-action-popover>div{display:flex;justify-content:flex-end;gap:8px}.authorization-reason-error,.authorization-action-popover [data-action-error]{min-height:18px;color:#c43f36;font-size:12px}.authorization-action-popover{width:min(390px,calc(100vw - 20px))}
#authorizations .authorization-table .authorization-actions{flex-wrap:wrap;align-content:center}
@media(max-width:760px){.authorization-h5-create{grid-template-columns:1fr}.authorization-h5-result{grid-template-columns:90px 1fr}.authorization-h5-result img{width:90px;height:90px}.authorization-h5-result>button{grid-column:1/-1}.authorization-applications-toolbar{grid-template-columns:1fr}.authorization-workflow-tabs{width:100%}.authorization-workflow-tabs button{flex:1;padding:0 10px}}
.nav.nav-subitem{padding-left:30px;font-size:13px}
.railway-pass-view{--pass-teal:#0f8a80;--pass-blue:#315bd8;--pass-navy:#142746}
.railway-pass-topbar{display:grid!important;grid-template-columns:minmax(250px,.72fr) auto minmax(820px,1.6fr);align-items:center;gap:14px 18px;margin-bottom:14px}
.railway-pass-kicker{margin-bottom:5px;color:#71819a;font-size:12px;font-weight:700}
.railway-pass-topbar h1{margin:0;font-size:27px;letter-spacing:-.5px}
.railway-pass-topbar p{margin:6px 0 0;color:var(--muted)}
.railway-pass-topbar .top-actions{display:flex;gap:9px}
.railway-pass-stats{grid-column:3;display:grid;grid-template-columns:1.05fr .95fr 1fr 1.1fr .95fr;gap:8px;min-width:0}
.railway-pass-stats button{position:relative;display:flex;height:54px;min-width:0;align-items:baseline;gap:6px;overflow:hidden;border:1px solid #dfe6f1;background:rgba(255,255,255,.82);border-radius:11px;padding:9px 10px 9px 18px;text-align:left;box-shadow:0 3px 10px rgba(24,43,77,.035);cursor:pointer;transition:.18s ease;white-space:nowrap}
.railway-pass-stats button::before{content:"";position:absolute;top:50%;left:10px;width:7px;height:7px;border-radius:50%;background:#7990b7;transform:translateY(-50%)}
.railway-pass-stats button:hover{transform:translateY(-1px);border-color:#b9c7e1;background:#fff;box-shadow:0 7px 18px rgba(24,43,77,.08)}
.railway-pass-stats button.is-primary::before{background:#315bd8}.railway-pass-stats button.is-review::before{background:#d48b18}.railway-pass-stats button.is-staff::before{background:#7c3aed}.railway-pass-stats button.is-receipt::before{background:#0f8a80}.railway-pass-stats button.is-fee::before{background:#238554}.railway-pass-stats button.is-overdue::before{background:#d84c4c}
.railway-pass-stats button.is-active{border-color:#7da2f4;background:#eef4ff;box-shadow:0 0 0 2px rgba(49,91,216,.12)}
.railway-pass-stats span{min-width:0;overflow:hidden;color:#718098;font-size:12px;font-weight:700;text-overflow:ellipsis}
.railway-pass-stats strong{flex:none;margin:0;color:#17253b;font-size:19px;line-height:1;font-style:normal}
.railway-pass-stats strong b{font-size:22px}.railway-pass-stats strong small{color:#8290a5;font-size:10px;font-weight:600}
.railway-pass-stats em{min-width:0;overflow:hidden;color:#8996a9;font-size:10px;font-style:normal;text-overflow:ellipsis}
.railway-pass-view .railway-pass-flow{position:relative;flex:0 0 auto;overflow-x:auto;overflow-y:hidden;min-height:146px;padding:18px 20px 24px;margin-bottom:14px;border:1px solid #dce4ef;background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%);box-shadow:0 8px 24px rgba(21,42,73,.06)}
.railway-pass-flow::before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:linear-gradient(180deg,#173b70,#0e938c)}
.railway-pass-flow-title{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:17px}
.railway-pass-flow-title>div{display:flex;align-items:baseline;gap:12px}.railway-pass-flow-title strong{font-size:16px;color:#142b4d}.railway-pass-flow-title span{color:#8996a9;font-size:12px}.railway-pass-flow-title em{padding:5px 10px;border:1px solid #d9e4f2;border-radius:999px;background:#f5f8fc;color:#687a94;font-size:11px;font-style:normal}
.railway-pass-flow-steps{display:flex;align-items:flex-start;width:100%;min-width:1120px;min-height:76px}
.railway-pass-flow-steps button{position:relative;display:grid;justify-items:center;align-content:start;gap:5px;min-width:86px;min-height:76px;padding:0 4px;border:0;background:transparent;color:#243550;cursor:pointer}
.railway-pass-flow-steps button b{position:relative;z-index:1;display:grid;place-items:center;width:34px;height:34px;border:2px solid #d6e2f1;border-radius:11px;background:linear-gradient(145deg,#f9fbff,#eaf1fb);box-shadow:0 4px 10px rgba(30,55,91,.1);color:#315bd8;font-size:12px;transition:.18s ease}
.railway-pass-flow-steps button span{font-size:12px;font-weight:800;white-space:nowrap}.railway-pass-flow-steps button small{max-width:128px;color:#8996a9;font-size:10px;line-height:1.3;text-align:center;white-space:normal}
.railway-pass-flow-steps button:hover b{transform:translateY(-2px);border-color:#6f91cb;background:linear-gradient(145deg,#244e89,#153666);box-shadow:0 7px 15px rgba(23,59,112,.24);color:#fff}
.railway-pass-flow-steps button.is-active b{border-color:#315bd8;background:linear-gradient(145deg,#315bd8,#173b70);box-shadow:0 7px 16px rgba(49,91,216,.26);color:#fff}
.railway-pass-flow-steps button.is-active span{color:#214ebd}.railway-pass-flow-steps button.is-active small{color:#536b94;font-weight:700}
.railway-pass-flow-steps i{position:relative;flex:1;height:2px;min-width:12px;margin-top:16px;background:linear-gradient(90deg,#cbd8e9,#e5ebf3)}
.railway-pass-flow-steps i::after{content:"";position:absolute;right:-1px;top:-3px;width:7px;height:7px;border-top:2px solid #cbd8e9;border-right:2px solid #cbd8e9;transform:rotate(45deg)}
.railway-pass-flow-steps button:nth-of-type(1) b{border-color:#bdd1ee;background:#eef5ff;color:#245da8}
.railway-pass-flow-steps button:nth-of-type(2) b,.railway-pass-flow-steps button:nth-of-type(4) b{border-color:#bfe6df;background:#effaf7;color:#087c70}
.railway-pass-flow-steps button:nth-of-type(3) b,.railway-pass-flow-steps button:nth-of-type(6) b,.railway-pass-flow-steps button:nth-of-type(7) b{border-color:#d5c9ee;background:#f7f2ff;color:#7251ad}
.railway-pass-flow-steps button:nth-of-type(4) b,.railway-pass-flow-steps button:nth-of-type(8) b,.railway-pass-flow-steps button:nth-of-type(9) b,.railway-pass-flow-steps button:nth-of-type(10) b{border-color:#f0d2a6;background:#fff8e9;color:#a86806}
.railway-pass-flow-steps button:nth-of-type(5) b{border-color:#b9dbe6;background:#eef9fc;color:#16708d}
.railway-pass-flow-legend{display:flex;justify-content:flex-end;gap:12px;margin-top:13px;color:#78879c;font-size:10px}.railway-pass-flow-legend span::before{content:"";display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:2px;background:#9cb3d2}.railway-pass-flow-legend .is-customer::before{background:#47aa9e}.railway-pass-flow-legend .is-shop::before{background:#8a6ac1}.railway-pass-flow-legend .is-supply::before{background:#3d92aa}.railway-pass-flow-legend .is-money::before{background:#d49533}
.railway-pass-flow--portal{margin:0 0 14px}
.view.railway-pass-view.active{padding-bottom:0;overflow:hidden}
.railway-pass-ledger{display:grid;flex:1 1 auto;grid-template-rows:auto auto minmax(220px,1fr) auto;min-height:0;margin-bottom:0;padding:0;overflow:hidden}
.railway-pass-ledger-head{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;padding:7px 18px;border-bottom:1px solid #e8ecf3}
.railway-pass-ledger-head>div:first-child{display:flex;align-items:baseline;gap:10px;white-space:nowrap}.railway-pass-ledger-head h2{margin:0;font-size:16px}.railway-pass-ledger-head p{margin:0;color:#8a96a8;font-size:11px}.railway-pass-ledger-head p strong{color:#315bd8}.railway-pass-ledger-head .railway-pass-month-summary{padding-left:10px;border-left:1px solid #dce4ef}
.railway-pass-toolbar{display:flex;flex:1;justify-content:flex-end;gap:8px;align-items:center}
.railway-pass-toolbar input{width:min(390px,40vw);min-width:210px}
.railway-pass-toolbar select{min-width:118px}
.railway-pass-table-wrap{min-width:0;min-height:0;overflow:auto;scrollbar-gutter:stable both-edges;overscroll-behavior:contain}
.railway-pass-table{width:100%;border-collapse:collapse;min-width:1120px}
.railway-pass-table th,.railway-pass-table td{padding:13px 12px;border-bottom:1px solid #edf0f5;text-align:left;font-size:13px;vertical-align:middle}
.railway-pass-table th{position:sticky;z-index:3;top:0;color:#64738b;font-weight:700;background:#f7f9fc;box-shadow:0 1px 0 #e4e9f1;white-space:nowrap}
.railway-pass-pagination{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:14px;min-height:48px;padding:7px 14px;border-top:1px solid #e4e9f1;color:#6f7d92;background:#fff}.railway-pass-pagination-summary,.railway-pass-pagination-actions{display:flex;align-items:center;gap:8px;white-space:nowrap}.railway-pass-pagination label{display:flex;align-items:center;gap:5px}.railway-pass-pagination select{height:32px;min-width:76px;padding:4px 26px 4px 9px}.railway-pass-pagination button{min-width:64px;height:32px;padding:4px 10px}.railway-pass-pagination button:disabled{cursor:not-allowed;opacity:.42}.railway-pass-page-buttons{display:flex;gap:4px}.railway-pass-page-buttons button{min-width:32px}.railway-pass-page-buttons button.active{color:#fff;border-color:#315bd8;background:#315bd8}.railway-pass-page-jump input{width:56px;height:32px;padding:4px 7px;text-align:center}
.railway-pass-table tbody tr:hover{background:#fafcff}.railway-pass-table small{color:#8996aa}
.railway-pass-table th:last-child,.railway-pass-table td:last-child{position:sticky;z-index:2;right:0;background:inherit;box-shadow:-1px 0 #edf0f5}.railway-pass-table th:last-child{z-index:4;background:#f7f9fc}
.railway-pass-stage{display:inline-flex;border-radius:999px;padding:4px 9px;background:#e0f2fe;color:#075985;font-weight:600;white-space:nowrap}
.railway-pass-money{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}
.railway-pass-empty{text-align:center!important;color:var(--muted);padding:46px!important;background:linear-gradient(180deg,#fff,#fbfcfe)}
.railway-pass-shop-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:14px;margin-top:14px}.railway-pass-shop-grid .panel{padding:18px}
.railway-pass-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:16px}.railway-pass-card-head h2{margin:0 0 5px;font-size:17px}.railway-pass-card-head p{margin:0;color:var(--muted);font-size:12px}.railway-pass-card-head>span{border-radius:999px;padding:5px 9px;background:#edf3ff;color:#315bd8;font-size:11px;font-weight:700;white-space:nowrap}.railway-pass-card-head>span.is-warning{background:#fff5dc;color:#a96508}
.railway-pass-bind-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr) auto;gap:9px}.railway-pass-bind-row select{min-width:0}.railway-pass-application-empty{display:grid;place-items:center;min-height:42px;color:#8a96a8;font-size:13px;background:#f8fafc;border-radius:9px}.pass-application{display:flex;gap:8px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}.pass-application span{flex:1}
.railway-pass-modal-panel{width:min(1180px,94vw)}
.railway-pass-form{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px}
.railway-pass-form label{display:grid;gap:6px;color:var(--muted);font-size:13px}
.railway-pass-form input,.railway-pass-form select,.railway-pass-form textarea{width:100%}
.railway-pass-product-summary{grid-column:1/-1;padding:12px;border-radius:9px;background:#ecfeff;color:#155e75;border:1px solid #a5f3fc}
.railway-pass-note,.railway-pass-form-actions{grid-column:1/-1}
.railway-pass-form-actions{display:flex;justify-content:flex-end;gap:10px}.railway-pass-form-actions .danger{margin-right:auto}
.railway-pass-cancel-reason{grid-column:1/-1;padding:12px;border:1px solid #fecaca;border-radius:12px;background:#fff7f7;color:#991b1b}.railway-pass-cancel-reason textarea{margin-top:7px;background:#fff}
.railway-pass-step-history{grid-column:1/-1;padding:13px 14px;border:1px solid #dce5ec;border-radius:12px;background:#f8fafc}
.pass-history-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px}.pass-history-head strong{color:#26364e}.pass-history-head span{color:#8a97a9;font-size:11px}
.railway-pass-step-history ol,.customer-railway-step-history ol{margin:0;padding:0;list-style:none}.railway-pass-step-history li,.customer-railway-step-history li{position:relative;display:grid;grid-template-columns:25px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:39px;padding:5px 0}.railway-pass-step-history li:not(:last-child)::after,.customer-railway-step-history li:not(:last-child)::after{position:absolute;top:31px;bottom:-8px;left:12px;width:2px;background:#dce4ef;content:""}.railway-pass-step-history li>i,.customer-railway-step-history li>i{position:relative;z-index:1;display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:var(--history-color,#2563eb);color:#fff;font-size:10px;font-style:normal;font-weight:800}.railway-pass-step-history li>div,.customer-railway-step-history li>div{display:grid;min-width:0}.railway-pass-step-history li>div strong,.customer-railway-step-history li>div strong{color:#34445b;font-size:12px}.railway-pass-step-history li>div span,.customer-railway-step-history li>div span{overflow:hidden;color:#8794a7;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.railway-pass-step-history li>div small,.customer-railway-step-history li>div small{margin-top:2px;color:#66758a;font-size:11px}.railway-pass-step-history li>button,.customer-railway-step-history li>button{min-height:27px;padding:3px 9px;border:1px solid color-mix(in srgb,var(--step-color,#2563eb) 32%,#dce4ef);border-radius:7px;background:#fff;color:var(--step-color,#2563eb);font-size:11px;font-weight:700;text-decoration:none;cursor:pointer}
.shared-pass-progress{grid-column:1/-1;min-width:0;padding:14px 16px;border:1px solid #dce4ef;border-radius:13px;background:#fff;overflow-x:auto}
.shared-pass-progress-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:13px}.shared-pass-progress-head strong{color:#17253b;font-size:14px}.shared-pass-progress-head span{color:#7c8aa0;font-size:11px}
.shared-pass-progress-track{display:grid;grid-template-columns:repeat(var(--pass-node-count),minmax(76px,1fr));min-width:760px}
.shared-pass-progress-node{position:relative;display:grid;justify-items:center;gap:4px;color:#8190a5;text-align:center}
.shared-pass-progress-node::before{content:"";position:absolute;z-index:0;top:16px;right:50%;left:-50%;height:3px;background:#d9e1ec}.shared-pass-progress-node:first-child::before{display:none}
.shared-pass-progress-dot{position:relative;z-index:1;display:grid;width:34px;height:34px;place-items:center;border:3px solid #d8e0ea;border-radius:50%;background:#fff;color:#8b98aa;font-size:12px;font-weight:800}
.shared-pass-progress-node strong{color:#65748a;font-size:12px}.shared-pass-progress-node small{padding:2px 7px;border:1px solid #e0e6ef;border-radius:999px;color:#8996a8;font-size:10px;white-space:nowrap}
.shared-pass-progress-node.is-completed::before,.shared-pass-progress-node.is-current::before{background:var(--node-color)}
.shared-pass-progress-node.is-completed .shared-pass-progress-dot,.shared-pass-progress-node.is-current .shared-pass-progress-dot{border-color:var(--node-color);background:var(--node-color);color:#fff;box-shadow:0 0 0 5px color-mix(in srgb,var(--node-color) 12%,transparent)}
.shared-pass-progress-node.is-current strong{color:var(--node-color);font-weight:900}.shared-pass-progress-node.is-current small{border-color:var(--node-color);color:var(--node-color)}
.shared-pass-progress-node.is-cancelled .shared-pass-progress-dot{border-color:#dc2626;background:#fff1f2;color:#dc2626}
.shared-pass-responsibility{display:flex;align-items:center;gap:10px;margin:0 0 14px;padding:9px 12px;border:1px solid #dce5f1;border-radius:10px;background:#f8fafc;color:#526277;font-size:12px}.shared-pass-responsibility strong{flex:none;padding:3px 8px;border-radius:999px;background:#e9eef5;color:#415168}.shared-pass-responsibility.is-mine{border-color:#9dd9c7;background:#ecfdf7;color:#08755d}.shared-pass-responsibility.is-mine strong{background:#0f9f82;color:#fff}.shared-pass-progress-node.is-clickable{cursor:pointer;border-radius:10px;outline:none}.shared-pass-progress-node.is-clickable:hover,.shared-pass-progress-node.is-clickable:focus-visible{background:color-mix(in srgb,var(--node-color) 8%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--node-color) 18%,transparent)}
.shared-pass-node-action{position:absolute;z-index:5;bottom:62px;left:50%;display:block;transform:translateX(-50%)}.shared-pass-pending-button{position:relative;border:0;border-radius:999px;padding:7px 15px;background:var(--node-color,#0f9f82);box-shadow:0 7px 18px color-mix(in srgb,var(--node-color,#0f9f82) 34%,transparent);color:#fff;font-size:12px;font-weight:800;white-space:nowrap;cursor:pointer;animation:shared-pass-pending-float 1.6s ease-in-out infinite}.shared-pass-pending-button::after{position:absolute;bottom:-6px;left:50%;width:0;height:0;border-top:7px solid var(--node-color,#0f9f82);border-right:6px solid transparent;border-left:6px solid transparent;content:"";transform:translateX(-50%)}.shared-pass-node-tip{position:absolute;bottom:43px;left:50%;display:none;width:230px;padding:9px 11px;border:2px solid var(--node-color,#0f9f82);border-radius:10px;background:#fff;box-shadow:0 12px 28px rgba(15,35,65,.2);color:#34445b;font-size:11px;line-height:1.5;text-align:left;transform:translateX(-50%)}.shared-pass-node-action:hover .shared-pass-pending-button,.shared-pass-node-action:focus-within .shared-pass-pending-button{animation-play-state:paused}.shared-pass-node-action:hover .shared-pass-node-tip,.shared-pass-node-action:focus-within .shared-pass-node-tip{display:block}.shared-pass-preflight-action{display:flex;align-items:center;gap:12px;margin:0 0 15px;padding:10px 12px;border:1px solid color-mix(in srgb,var(--node-color,#0f9f82) 35%,#dce5f1);border-radius:11px;background:color-mix(in srgb,var(--node-color,#0f9f82) 8%,#fff);color:#526277;font-size:12px}.shared-pass-preflight-action .shared-pass-pending-button{animation-name:shared-pass-pending-float-inline}.shared-pass-preflight-action .shared-pass-pending-button::after{display:none}@keyframes shared-pass-pending-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes shared-pass-pending-float-inline{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}@media (prefers-reduced-motion:reduce){.shared-pass-pending-button{animation:none}}
.shared-pass-selection{margin:14px 0;padding:14px;border:1px solid #dbe5f1;border-radius:14px;background:linear-gradient(135deg,#f8fbff,#fff);box-shadow:0 8px 22px rgba(30,64,175,.07)}.shared-pass-selection-title{display:flex;align-items:center;gap:12px;margin:0 2px 10px}.shared-pass-selection-title strong{color:#17253b;font-size:15px}.shared-pass-selection-title span{min-width:0;overflow:hidden;color:#43536a;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.shared-pass-selection-title em{margin-left:auto;color:#8794a8;font-size:11px;font-style:normal;white-space:nowrap}.shared-pass-selection>.shared-pass-progress-head,.shared-pass-selection>.shared-pass-progress-track{margin-right:2px;margin-left:2px}.shared-pass-selection-empty{padding:15px;color:#8794a8;text-align:center}.railway-pass-table tbody tr[data-pass-select],.customer-railway-management-table tbody tr[data-customer-pass-select]{cursor:pointer}.railway-pass-table tbody tr.is-flow-selected td,.customer-railway-management-table tbody tr.is-flow-selected td{background:#eef6ff}.railway-pass-table tbody tr.is-flow-selected td:first-child,.customer-railway-management-table tbody tr.is-flow-selected td:first-child{box-shadow:inset 4px 0 #2563eb}
.railway-pass-overdue{color:#c2410c;font-weight:700}.link-button{border:0;background:none;color:#087f77;padding:0;text-decoration:underline;cursor:pointer}
.railway-pass-nav-badge{display:inline-grid;min-width:20px;height:20px;place-items:center;margin-left:auto;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:10px;font-weight:800}.railway-pass-nav-badge[hidden]{display:none}
.railway-pass-evidence-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px;align-items:stretch;min-width:0}.railway-pass-evidence-item .customer-railway-evidence-card{width:100%}.railway-pass-evidence-item.is-superseded{opacity:.68}.railway-pass-evidence-download{align-self:center;padding:5px 7px;font-size:10px}
.railway-pass-action-notice{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #f4cf91;border-radius:9px;background:#fff9ed;color:#8a4b08;font-size:12px;font-weight:650}.railway-pass-action-notice.is-uncertain{border-color:#e9a5a0;background:#fff4f2;color:#9f2d23}.railway-pass-action-notice[hidden]{display:none}
.railway-pass-fact-panel{grid-column:1/-1;display:grid;gap:12px;padding:15px;border:1px solid #d6e3f4;border-radius:12px;background:#f8fbff}.railway-pass-fact-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.railway-pass-fact-head strong{color:#1e3a5f;font-size:14px}.railway-pass-fact-head small{color:#65758d;font-size:11px}.railway-pass-document-status{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:#526277;font-size:11px}.railway-pass-document-status>span,.railway-pass-document-status>strong{padding:4px 8px;border-radius:999px;background:#eaf2ff}.railway-pass-document-status .is-complete{background:#e7f8f1;color:#087f5b}.railway-pass-document-status .is-pending,.railway-pass-document-status>strong{background:#fff1e7;color:#a44615}.railway-pass-document-status>small{flex-basis:100%;color:#a44615}.railway-pass-fact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.railway-pass-fact-card{display:grid;align-content:start;gap:9px;min-width:0;padding:12px;border:1px solid #e0e9f4;border-radius:10px;background:#fff}.railway-pass-fact-card h3{margin:0 0 2px;color:#253f61;font-size:13px}.railway-pass-fact-card label{display:grid;gap:4px;color:#607088;font-size:11px}.railway-pass-fact-card input,.railway-pass-fact-card textarea,.railway-pass-fact-card select{width:100%;min-width:0}.railway-pass-fact-card>button{justify-self:end}.railway-pass-node-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.railway-pass-node-fields>p{grid-column:1/-1;margin:0;color:#8b98aa;font-size:11px}.railway-pass-fact-history{max-height:180px;overflow:auto;border-top:1px solid #e8eef6;padding-top:8px;color:#617187;font-size:11px}.railway-pass-fact-history ol{display:grid;gap:7px;margin:6px 0 0;padding-left:18px}.railway-pass-fact-history li{line-height:1.5;overflow-wrap:anywhere}
.railway-pass-fact-card .railway-pass-zero-confirm{display:flex;align-items:center;gap:7px;color:#9a541a}.railway-pass-fact-card .railway-pass-zero-confirm[hidden]{display:none}.railway-pass-zero-confirm input{width:auto;min-width:auto}
.railway-pass-fact-card[hidden],.railway-pass-fact-card label[hidden],.railway-pass-fact-card button[hidden]{display:none}
#railwayPassStepFileRow[hidden]{display:none}
@media(max-width:1100px){.railway-pass-fact-grid{grid-template-columns:1fr 1fr}}@media(max-width:760px){.railway-pass-fact-head{flex-direction:column}.railway-pass-fact-grid{grid-template-columns:1fr}.railway-pass-node-fields{grid-template-columns:1fr}}
.railway-pass-qr{display:grid;justify-items:center;gap:14px;padding:24px}.railway-pass-qr img{width:260px;height:260px}.railway-pass-qr input{width:100%}
@media(max-width:1680px){
  .railway-pass-topbar{grid-template-columns:minmax(0,1fr) auto;align-items:end}
  .railway-pass-topbar .railway-pass-stats{grid-column:1/-1}
}
@media(max-width:760px){
  .railway-pass-stats{grid-template-columns:repeat(2,1fr)}
  .railway-pass-topbar{grid-template-columns:1fr;align-items:flex-start}.railway-pass-topbar .top-actions{flex-wrap:wrap}.railway-pass-topbar .railway-pass-stats{grid-column:1}
  .railway-pass-flow{overflow:auto}.railway-pass-flow-steps{min-width:720px}
  .railway-pass-ledger-head{align-items:stretch;flex-direction:column}.railway-pass-toolbar{align-items:stretch;flex-direction:column}.railway-pass-toolbar input{width:100%}
  .railway-pass-shop-grid{grid-template-columns:1fr}.railway-pass-bind-row{grid-template-columns:1fr}
  .railway-pass-form{grid-template-columns:1fr}
  .railway-pass-product-summary,.railway-pass-note,.railway-pass-form-actions{grid-column:1}
  .shared-pass-selection-title{align-items:flex-start;flex-wrap:wrap}.shared-pass-selection-title em{width:100%;margin-left:0}
}
@media(max-height:680px){.view.railway-pass-view.active{overflow-y:auto}.railway-pass-ledger{flex:0 0 auto;min-height:420px}.railway-pass-pagination{position:sticky;z-index:4;bottom:0}}
.customer-business-heading{display:grid;gap:5px}.customer-business-switch{display:flex;align-items:center;gap:8px}.customer-business-switch button{border:0;background:transparent;color:#718096;padding:6px 12px;border-radius:9px;font-size:16px;font-weight:700;cursor:pointer}.customer-business-switch button.active{background:#12243f;color:#fff;font-size:24px}.customer-business-switch button:not(.active):hover{background:#e7edf8;color:#1f4fd6}
.customer-railway-step-button{min-width:58px;padding:7px 12px;white-space:nowrap}
.customer-railway-step-dialog{width:min(920px,calc(100vw - 32px));max-height:88vh;border:0;border-radius:18px;padding:0;box-shadow:0 24px 70px rgba(15,31,54,.28)}
.customer-railway-step-dialog::backdrop{background:rgba(15,23,42,.55);backdrop-filter:blur(3px)}
.customer-railway-step-form>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;border-bottom:1px solid color-mix(in srgb,var(--step-color,#2563eb) 28%,#e4e9f1);background:color-mix(in srgb,var(--step-color,#2563eb) 8%,white)}
.customer-railway-step-form>header>div{display:grid;gap:4px}.customer-railway-step-form>header strong{color:#152641;font-size:19px}.customer-railway-step-form>header span{color:#7c8aa0;font-size:12px}
.customer-railway-step-form>header button{border:0;border-radius:10px;padding:9px 14px;background:#f1f4f8;color:#26364e;cursor:pointer}
.customer-railway-step-body{display:grid;gap:12px;padding:16px 20px;overflow:auto;max-height:calc(88vh - 76px)}
.customer-railway-step-hint{margin:0;padding:12px 14px;border-radius:10px;background:#eaf7f6;color:#12645f;font-size:13px}
.customer-railway-step-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.customer-railway-step-fields label,.customer-railway-step-file,.customer-railway-step-note{display:grid;gap:6px;color:#66758c;font-size:13px}
.customer-railway-step-fields input,.customer-railway-step-file input,.customer-railway-step-note textarea{width:100%}
.customer-railway-step-fields input:focus,.customer-railway-step-file input:focus,.customer-railway-step-note textarea:focus{border-color:var(--step-color,#2563eb);box-shadow:0 0 0 3px color-mix(in srgb,var(--step-color,#2563eb) 16%,transparent);outline:0}
.customer-railway-step-form #customerRailwayStepSubmit{background:var(--step-color,#2563eb);border-color:var(--step-color,#2563eb)}
.customer-railway-step-actions{display:flex;justify-content:flex-end;gap:10px}.customer-railway-step-actions button{min-height:42px}
.railway-pass-modal-panel{border-top:4px solid var(--step-color,#2563eb)}
#railwayShopCustomerBindingModal,#railwayPassModal,#railwayPassStepModal,#railwayPassQrModal{z-index:1000}
#railwayPassStepModal .modal-bar{background:color-mix(in srgb,var(--step-color,#2563eb) 8%,white);border-bottom-color:color-mix(in srgb,var(--step-color,#2563eb) 28%,#e4e9f1)}
#railwayPassStepModal input:focus,#railwayPassStepModal textarea:focus,#railwayPassStepModal select:focus{border-color:var(--step-color,#2563eb);box-shadow:0 0 0 3px color-mix(in srgb,var(--step-color,#2563eb) 16%,transparent);outline:0}
#railwayPassStepModal #railwayPassStepSubmit{background:var(--step-color,#2563eb);border-color:var(--step-color,#2563eb)}
.customer-railway-step-history{padding:13px 14px;border:1px solid #e0e6ef;border-radius:11px;background:#fafbfd}.customer-railway-step-history>span{color:#8a97a9;font-size:12px}
.customer-railway-step-workspace{display:grid;grid-template-columns:minmax(280px,.85fr) minmax(360px,1.15fr);gap:12px;align-items:stretch}.customer-railway-step-history,.customer-railway-step-evidence{min-height:180px}.customer-railway-step-history ol{display:grid;gap:8px;margin:10px 0 0;padding:0;list-style:none}.customer-railway-step-history li{display:grid;grid-template-columns:26px 1fr;gap:9px;align-items:start}.customer-railway-step-history li i{display:grid;width:24px;height:24px;place-items:center;border-radius:50%;background:var(--history-color,#2563eb);color:#fff;font-size:11px;font-style:normal;font-weight:800}.customer-railway-step-history li div{display:grid;gap:2px}.customer-railway-step-history li strong{font-size:12px}.customer-railway-step-history li span,.customer-railway-step-history li small{color:#8794a8;font-size:10px}.customer-railway-step-evidence{padding:13px 14px;border:1px solid #e0e6ef;border-radius:11px;background:#fafbfd}.customer-railway-step-evidence-head{display:flex;justify-content:space-between;gap:12px}.customer-railway-step-evidence-head span{color:#8794a8;font-size:11px}.customer-railway-step-evidence-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.customer-railway-evidence-card{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;gap:1px 8px;align-items:center;min-width:0;padding:8px;border:1px solid #dbe5f1;border-radius:9px;background:#fff;text-align:left;cursor:pointer}.customer-railway-evidence-card>span{grid-row:1/3;display:grid;width:34px;height:34px;place-items:center;border-radius:7px;background:color-mix(in srgb,var(--step-color,#2563eb) 10%,#fff);color:var(--step-color,#2563eb);font-size:9px;font-weight:900}.customer-railway-evidence-card strong,.customer-railway-evidence-card small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-railway-evidence-card strong{font-size:11px}.customer-railway-evidence-card small{color:#8794a8;font-size:9px}.customer-railway-evidence-card em{display:none}.customer-railway-evidence-card:hover{border-color:var(--step-color,#2563eb);box-shadow:0 5px 14px rgba(15,35,65,.1)}.customer-railway-evidence-empty{grid-column:1/-1;padding:15px;color:#9aa6b7;font-size:11px;text-align:center}.customer-railway-step-upload{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;gap:1px 8px;align-items:center;margin-top:8px;padding:8px;border:1px dashed color-mix(in srgb,var(--step-color,#2563eb) 55%,#dbe5f1);border-radius:9px;background:color-mix(in srgb,var(--step-color,#2563eb) 4%,#fff);cursor:pointer}.customer-railway-step-upload input{position:absolute;width:1px;height:1px;opacity:0}.customer-railway-step-upload b{grid-row:1/3;display:grid;width:34px;height:34px;place-items:center;border-radius:7px;background:var(--step-color,#2563eb);color:#fff;font-size:20px}.customer-railway-step-upload strong{min-width:0;overflow:hidden;color:#34445b;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.customer-railway-step-upload small{color:#8794a8;font-size:9px}.customer-railway-step-upload.has-file{border-style:solid;background:#ecfdf7}.shared-pass-compact-meta{display:flex;justify-content:space-between;gap:12px;margin:5px 2px 0;color:#8794a8;font-size:10px}.shared-pass-compact-meta b{color:#4e5e75}.shared-pass-progress-track.is-compact{max-width:650px;margin-right:auto;margin-left:auto}.customer-railway-step-dialog .shared-pass-progress-track.is-compact .shared-pass-node-action{top:-34px}.customer-railway-step-dialog .shared-pass-progress-head{padding:7px 10px}.customer-railway-step-dialog .shared-pass-progress-track.is-compact{padding-top:35px}
@media(max-width:720px){.customer-railway-step-fields,.customer-railway-step-workspace{grid-template-columns:1fr}.customer-railway-step-dialog{width:calc(100vw - 18px)}.customer-railway-step-evidence-grid{grid-template-columns:1fr}}
.customer-railway-step-dialog{inline-size:50vw!important;width:50vw!important;min-width:0!important;max-width:50vw!important;max-height:88vh!important}
.customer-railway-step-dialog .customer-railway-step-workspace{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.customer-railway-step-dialog .customer-railway-step-workspace{grid-template-columns:1fr}}
@media(max-width:480px){body.customer-portal #customerRailwayStepDialog.customer-railway-step-dialog{inline-size:calc(100vw - 18px)!important;width:calc(100vw - 18px)!important;min-width:0!important;max-width:calc(100vw - 18px)!important}}
.customer-railway-evidence-card>span img{width:100%;height:100%;border-radius:inherit;object-fit:cover}
#railwayPassStepModal>.railway-pass-step-panel{width:50vw!important;min-width:0!important;max-width:50vw!important}.railway-pass-step-panel .railway-pass-form{max-height:calc(88vh - 72px);overflow:auto}.railway-pass-step-panel .customer-railway-step-workspace{grid-column:1/-1;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}.railway-pass-step-panel .customer-railway-step-workspace.is-side-entry{grid-template-columns:minmax(280px,.8fr) minmax(320px,.9fr) minmax(420px,1.4fr)}.railway-pass-step-entry{grid-column:1/-1;display:flex;min-width:0;flex-direction:column;gap:12px}.is-side-entry .railway-pass-step-entry{grid-column:auto;min-height:180px;padding:13px 14px;border:1px solid #e0e6ef;border-radius:11px;background:#fafbfd}.railway-pass-step-note{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;gap:6px}.railway-pass-step-note textarea{flex:1 1 auto;min-height:110px;resize:vertical}.railway-pass-step-panel .customer-railway-step-history,.railway-pass-step-panel .customer-railway-step-evidence{max-height:min(42vh,420px);overflow:auto;scrollbar-gutter:stable}.railway-pass-step-panel .customer-railway-step-history{padding:13px 14px;border:1px solid #e0e6ef;border-radius:11px;background:#fafbfd}.railway-pass-step-panel .pass-history-head,.railway-pass-step-panel .customer-railway-step-evidence-head{position:sticky;z-index:2;top:-13px;padding:13px 0 8px;background:#fafbfd}.railway-pass-step-panel #railwayPassStepFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.railway-pass-step-panel #railwayPassStepFields>p{grid-column:1/-1;margin:0}.railway-pass-tracking-list{grid-column:1/-1;display:grid;gap:8px}.railway-pass-tracking-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px}.railway-pass-tracking-row>label{display:grid;gap:6px}.railway-pass-tracking-input{position:relative}.railway-pass-tracking-input input{width:100%;padding-right:130px}.railway-pass-tracking-input span{position:absolute;top:50%;right:10px;max-width:112px;overflow:hidden;color:var(--step-color,#2563eb);font-size:10px;font-weight:700;text-overflow:ellipsis;white-space:nowrap;transform:translateY(-50%)}.railway-pass-tracking-row>[data-pass-tracking-remove]{height:42px}.railway-pass-tracking-add{justify-self:start}
#railwayPassStepModal>.railway-pass-step-panel.is-wide-step{width:min(1180px,calc(100vw - 48px))!important;max-width:min(1180px,calc(100vw - 48px))!important}
.railway-pass-reversal-panel{grid-column:1/-1;display:grid;gap:10px;padding:13px 14px;border:1px solid #f0c8c5;border-radius:12px;background:#fff8f7}.railway-pass-reversal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.railway-pass-reversal-head>div{display:grid;gap:3px}.railway-pass-reversal-head strong{color:#8f261f;font-size:13px}.railway-pass-reversal-head small{color:#9b645f;font-size:10px}.railway-pass-reversal-history>p{margin:0;color:#a27a76;font-size:11px}.railway-pass-reversal-history ol{display:grid;gap:7px;margin:0;padding:0;list-style:none}.railway-pass-reversal-history li{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:start;padding:8px 10px;border:1px solid #f0d6d3;border-radius:9px;background:#fff}.railway-pass-reversal-history li>span{padding:3px 7px;border-radius:999px;background:#fee9e7;color:#b42318;font-size:10px;font-weight:800;white-space:nowrap}.railway-pass-reversal-history li>div{display:grid;min-width:0;gap:2px}.railway-pass-reversal-history li strong{overflow:hidden;color:#4e3030;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.railway-pass-reversal-history li small{color:#92716e;font-size:10px}.railway-pass-reversal-history li em{color:#684b49;font-size:10px;font-style:normal}.railway-pass-reversal-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:11px;border:1px dashed #e7aaa4;border-radius:10px;background:#fff}.railway-pass-reversal-form label{display:grid;gap:5px;color:#7b4b47;font-size:11px}.railway-pass-reversal-form .is-wide,.railway-pass-reversal-actions{grid-column:1/-1}.railway-pass-reversal-form input[readonly]{background:#f7f4f4;color:#795d5a}.railway-pass-reversal-actions{display:flex;justify-content:flex-end;gap:8px}.railway-pass-reversal-panel[hidden],.railway-pass-reversal-form[hidden]{display:none!important}
.railway-pass-reversal-form.is-request-pending::before{grid-column:1/-1;content:"冲销结果待确认：表单和幂等键已冻结，只能重试原请求";padding:8px 10px;border:1px solid #f1c27d;border-radius:8px;background:#fff8e8;color:#8a4b08;font-size:11px;font-weight:700}
.railway-pass-step-history li.is-history-focus{margin:0 -7px;padding-right:7px;padding-left:7px;border-radius:9px;background:color-mix(in srgb,var(--step-color,#2563eb) 10%,#fff);box-shadow:inset 3px 0 var(--step-color,#2563eb)}.customer-railway-evidence-card.is-history-focus{border-color:var(--step-color,#2563eb);background:color-mix(in srgb,var(--step-color,#2563eb) 7%,#fff);box-shadow:0 0 0 2px color-mix(in srgb,var(--step-color,#2563eb) 15%,transparent)}.shared-pass-progress-node.is-completed.is-clickable:hover strong,.shared-pass-progress-node.is-completed.is-clickable:focus-visible strong{color:var(--node-color)}
.railway-pass-step-panel .customer-railway-step-workspace.is-history-view{grid-template-columns:repeat(2,minmax(0,1fr))}.is-history-view .railway-pass-step-entry{display:none}.railway-pass-history-data{display:grid;gap:4px;margin:7px 0 2px}.railway-pass-history-data>div{display:grid;grid-template-columns:86px minmax(0,1fr);gap:8px;padding:5px 7px;border-radius:6px;background:#fff}.railway-pass-history-data dt{color:#8794a8;font-size:10px}.railway-pass-history-data dd{min-width:0;margin:0;overflow-wrap:anywhere;color:#34445b;font-size:11px}.customer-railway-step-evidence-grid.is-history-empty::after{grid-column:1/-1;padding:24px 12px;color:#9aa6b7;content:"该节点暂无凭证";text-align:center}
@media(max-width:1100px){.railway-pass-step-panel .customer-railway-step-workspace.is-side-entry{grid-template-columns:repeat(2,minmax(0,1fr))}.is-side-entry .railway-pass-step-entry{grid-column:1/-1}}
@media(max-width:760px){.railway-pass-step-panel .customer-railway-step-workspace,.railway-pass-step-panel .customer-railway-step-workspace.is-side-entry,.railway-pass-step-panel #railwayPassStepFields,.railway-pass-reversal-form{grid-template-columns:1fr}.is-side-entry .railway-pass-step-entry{grid-column:1}.railway-pass-reversal-head{align-items:flex-start;flex-direction:column}}
@media(max-width:480px){#railwayPassStepModal>.railway-pass-step-panel{width:calc(100vw - 18px)!important;min-width:0!important;max-width:calc(100vw - 18px)!important}}
.railway-pass-table tbody tr.is-completed td,.customer-railway-management-table tbody tr.is-completed td{position:relative;background:#f1f3f5!important;color:#7d8795}.railway-pass-table tbody tr.is-completed strong,.customer-railway-management-table tbody tr.is-completed strong,.railway-pass-table tbody tr.is-completed .railway-pass-money,.customer-railway-management-table tbody tr.is-completed .customer-railway-report-money{color:#687382}.shared-pass-completed-stamp{display:inline-flex;margin-left:7px;padding:2px 7px;transform:rotate(-6deg);border:2px solid #d92d20;border-radius:4px;color:#d92d20;background:rgba(255,255,255,.76);font-size:10px;font-weight:900;letter-spacing:1px;line-height:1.15;white-space:nowrap}.customer-railway-report-card.is-completed{position:relative;filter:grayscale(.82);background:#f1f3f5}.customer-railway-report-card.is-completed::after{position:absolute;z-index:3;top:22px;right:22px;padding:6px 12px;transform:rotate(-9deg);border:3px double #d92d20;border-radius:5px;color:#d92d20;background:rgba(255,255,255,.78);content:"已完成";font-size:15px;font-weight:900;letter-spacing:2px}
.tablewrap tbody.is-loading {
  opacity: .55;
  pointer-events: none;
}

.tablewrap tbody {
  transition: opacity .12s ease;
}

.product-selection-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: -5px 0 10px;
  padding: 6px 10px;
  border: 1px solid #d9e3f1;
  border-radius: 9px;
  background: #f8fbff;
}

.product-selection-bar > strong {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid #bfd2f5;
  border-radius: 999px;
  background: #edf4ff;
  color: #2457b6;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.product-selection-bar > strong.is-full {
  border-color: #f0bc83;
  background: #fff5e6;
  color: #a85b0b;
}

.product-selection-bar > span {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #718096;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep the quality checks beside the selection actions on wide screens;
   the group wraps as one unit on narrow screens instead of creating a
   separate, mostly empty row. */
.product-quality-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 0 1 auto;
  gap: 6px;
  min-width: 0;
  margin-left: 4px;
  padding-left: 8px;
  border-left: 1px solid #d9e3f1;
}

.product-quality-inline .product-quality-label {
  display: none;
}

.product-quality-inline .compact-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.product-quality-scope {
  max-width: min(32vw, 420px);
  overflow: hidden;
  color: #60738d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-quality-status {
  color: #60738d;
  font-size: 12px;
  white-space: nowrap;
}

.product-quality-inline[data-status="error"] .product-quality-status {
  color: #b45309;
}

.product-quality-inline .product-quality-status:empty {
  display: none;
}

.product-selection-modal-panel {
  width: min(760px, 94vw);
  max-height: calc(100vh - 48px);
  margin-top: 2vh;
}

.product-selection-modal-panel .modal-bar > div {
  justify-content: flex-start;
}

.product-selection-modal-panel .modal-bar span {
  color: #64748b;
  font-size: 12px;
}

.product-selection-modal-tools,
.product-selection-modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5eaf1;
}

.product-selection-modal-tools input {
  min-width: 0;
  flex: 1 1 auto;
}

.product-selection-modal-list {
  min-height: 180px;
  max-height: min(60vh, 560px);
  overflow: auto;
  background: #fff;
}

.product-selection-modal-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 12px;
  border-bottom: 1px solid #edf0f5;
}

.product-selection-modal-row > span {
  color: #8b98aa;
  font-size: 11px;
  text-align: center;
}

.product-selection-modal-row > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.product-selection-modal-row strong,
.product-selection-modal-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-selection-modal-row strong { color: #26364e; font-size: 13px; }
.product-selection-modal-row small { color: #7c8a9e; font-size: 11px; }
.product-selection-modal-empty { padding: 56px 18px; color: #8b98aa; text-align: center; }
.product-selection-modal-foot { justify-content: space-between; border-top: 1px solid #e5eaf1; border-bottom: 0; }
.product-selection-modal-foot span { color: #718096; font-size: 12px; }

@media (max-width: 900px) {
  .product-selection-bar { align-items: flex-start; flex-wrap: wrap; }
  .product-selection-bar > span { width: 100%; margin-left: 0; }
  .product-quality-inline { flex-basis: 100%; margin-left: 0; padding-left: 0; border-left: 0; flex-wrap: wrap; }
}

/* Keep the actionable-node badge above the node dot instead of covering it. */
.shared-pass-progress-track:has(.shared-pass-node-action) {
  padding-top: 42px;
}

.shared-pass-node-action {
  top: -38px;
  bottom: auto;
}

/* Keep evidence thumbnails inside their cards in the management step dialog. */
#railwayPassStepModal .customer-railway-step-evidence-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

#railwayPassStepModal .customer-railway-evidence-card {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#railwayPassStepModal .customer-railway-evidence-card > span {
  position: relative !important;
  display: block !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#railwayPassStepModal .customer-railway-evidence-card > span > img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  max-height: 34px !important;
  object-fit: cover !important;
  object-position: center !important;
}

#railwayPassStepModal .customer-railway-evidence-card > :is(strong, small) {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.product-quote-history-workspace.hidden{display:none!important}
.product-quote-history h2{margin:0;color:#26364d;font-size:20px}
.product-quote-history-head p{margin:4px 0 0;color:#7b8794}
#products.history-mode>:not(.topbar):not(.product-workspace-tabs):not(#productQuoteHistoryWorkspace){display:none!important}
@media(min-width:1201px){
  .product-quote-controls{grid-template-columns:minmax(250px,1.45fr) minmax(145px,.72fr) minmax(175px,.76fr) auto auto auto minmax(340px,auto);gap:12px;align-items:end;padding:16px 18px}
  .product-quote-row-count,.product-quote-actions{grid-column:auto}
  .product-quote-row-count{align-self:end;height:40px;white-space:nowrap}
  .product-quote-row-count span{margin-right:9px}
  .product-quote-row-count button{min-width:62px}
  .product-quote-actions{align-self:end;flex-wrap:nowrap;gap:8px}
  .product-quote-actions button{min-width:104px;white-space:nowrap}
}
.product-workspace-tabs{display:flex;gap:8px;margin:0 0 14px;padding:0 4px;border-bottom:1px solid #dce4ef}.product-workspace-tabs button{appearance:none;border:0;border-bottom:3px solid transparent;background:transparent;color:#64748b;font-weight:700;font-size:15px;padding:11px 22px;cursor:pointer}.product-workspace-tabs button.active{color:#1266e3;border-bottom-color:#1266e3}.product-quote-workspace{display:grid;gap:14px}.product-quote-heading{display:flex;align-items:center;justify-content:space-between}.product-quote-heading h2{margin:0;color:#172b4d;font-size:24px}.product-quote-heading p{margin:4px 0 0;color:#7b8794}.product-quote-number{font:700 13px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;color:#456;letter-spacing:.04em}.product-quote-controls{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(150px,.8fr) minmax(170px,.8fr) auto auto;gap:14px;align-items:end;padding:18px;background:#fff;border:1px solid #dbe4ef;border-radius:12px;box-shadow:0 5px 18px rgba(35,55,80,.06)}.product-quote-controls>label{display:grid;gap:6px;color:#42526e;font-size:13px;font-weight:700}.product-quote-controls select,.product-quote-controls input[type=date]{height:40px;border:1px solid #cbd6e4;border-radius:7px;background:#fff;padding:0 11px;color:#172b4d}.product-quote-controls .product-quote-check{display:flex;align-items:center;gap:7px;height:40px;white-space:nowrap}.product-quote-row-count{display:flex;align-items:center;gap:0;grid-column:1/3}.product-quote-row-count span{margin-right:12px;color:#42526e;font-weight:700}.product-quote-row-count button{height:38px;min-width:74px;border:1px solid #cbd6e4;background:#fff;color:#42526e}.product-quote-row-count button:first-of-type{border-radius:7px 0 0 7px}.product-quote-row-count button:last-child{border-radius:0 7px 7px 0}.product-quote-row-count button.active{background:#1266e3;border-color:#1266e3;color:#fff}.product-quote-actions{grid-column:3/6;display:flex;justify-content:flex-end;gap:10px}.product-quote-actions button{min-width:128px}.product-quote-paste-panel{display:flex;gap:14px;align-items:flex-end;padding:14px;background:#f8fafc;border:1px dashed #b8c8dc;border-radius:10px}.product-quote-paste-panel textarea{flex:1;resize:vertical;min-height:76px;border:1px solid #cbd6e4;border-radius:8px;padding:10px 12px;line-height:1.6;background:#fff}.product-quote-paste-panel>span{white-space:nowrap;color:#6b778c}.product-quote-paste-panel strong{color:#1266e3}.product-quote-table-wrap,.product-quote-history-wrap{overflow:auto;background:#fff;border:1px solid #dbe4ef;border-radius:10px}.product-quote-table,.product-quote-history table{width:100%;border-collapse:collapse;min-width:1050px}.product-quote-table th,.product-quote-table td,.product-quote-history th,.product-quote-history td{padding:11px 10px;border-bottom:1px solid #e8edf4;text-align:left;vertical-align:middle}.product-quote-table th,.product-quote-history th{background:#f6f8fb;color:#40516b;font-size:13px;white-space:nowrap}.product-quote-table td{color:#27364b}.product-quote-table td:nth-child(1){width:54px;text-align:center}.product-quote-table td:nth-child(5){width:58px}.product-quote-table td:nth-child(6){width:90px}.product-quote-table td:nth-child(7),.product-quote-table td:nth-child(8){width:115px;text-align:right;font-variant-numeric:tabular-nums}.product-quote-table td:nth-child(9){width:100px}.product-quote-quantity,.product-quote-price{width:76px;height:34px;border:1px solid #ccd7e5;border-radius:6px;padding:0 8px;text-align:right}.product-quote-status{display:inline-flex;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:700;white-space:nowrap}.product-quote-status.matched{background:#e8f8ef;color:#18864b}.product-quote-status.multiple{background:#fff4dd;color:#b96b00}.product-quote-status.missing,.product-quote-status.no-price{background:#fff0f0;color:#c53d3d}.product-quote-empty td{padding:34px;text-align:center!important;color:#8995a7}.product-quote-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px;background:#fff;border:1px solid #dbe4ef;border-radius:10px}.product-quote-summary>div{display:flex;gap:12px;align-items:center}.product-quote-summary span{display:flex;align-items:baseline;gap:5px;padding:9px 13px;background:#f2f6fb;border-radius:7px;color:#52627a}.product-quote-summary strong{font-size:19px;color:#1266e3}.product-quote-summary #productQuoteTotal{color:#ef4d3f}.product-quote-history{padding:16px;background:#fff;border:1px solid #dbe4ef;border-radius:10px}.product-quote-history-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.product-quote-history h3{margin:0;color:#26364d}.product-quote-history .empty{padding:28px;text-align:center;color:#8995a7}.product-quote-row-actions{display:flex;gap:7px;white-space:nowrap}.product-quote-row-actions button{padding:5px 8px}.product-quote-workspace.hidden{display:none!important}#products.quote-mode>:not(.topbar):not(.product-workspace-tabs):not(#productQuoteWorkspace){display:none!important}@media(max-width:1100px){.product-quote-controls{grid-template-columns:1fr 1fr}.product-quote-actions,.product-quote-row-count{grid-column:1/3}.product-quote-summary{align-items:flex-start;flex-direction:column}}
.license-overview-cell{width:90px}.customer-license-preview-button.is-compact,.supplier-license-preview{display:block;width:58px;height:44px;padding:2px;border:1px solid #d8e0ec;border-radius:7px;background:#fff;cursor:pointer}.customer-license-preview-button.is-compact img,.supplier-license-preview img{width:100%;height:100%;object-fit:contain}.customer-license-preview-button.is-compact:hover,.supplier-license-preview:hover{position:relative;z-index:40}.customer-license-preview-button.is-compact:hover img,.supplier-license-preview:hover img{position:fixed;width:320px;height:230px;object-fit:contain;padding:8px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;box-shadow:0 18px 55px #0f172a40;transform:translate(68px,-75px)}.supplier-license-cell{display:flex;align-items:center;gap:8px}.supplier-license-upload{padding:5px 8px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#315fbd;font-size:12px;cursor:pointer}

/* 营业执照列保持紧凑，主要宽度留给公司名称和操作区。 */
.customer-overview-wrap .customer-table{min-width:1500px;table-layout:fixed}
.customer-overview-wrap .customer-table th:nth-child(1),.customer-overview-wrap .customer-table td:nth-child(1){width:96px;min-width:96px;max-width:96px;padding-left:14px;padding-right:8px}
.customer-overview-wrap .customer-table th:nth-child(2),.customer-overview-wrap .customer-table td:nth-child(2){width:205px}
.customer-overview-wrap .customer-table th:nth-child(3),.customer-overview-wrap .customer-table td:nth-child(3){width:300px}
.customer-overview-wrap .customer-table th:nth-child(4),.customer-overview-wrap .customer-table td:nth-child(4){width:125px}
.customer-overview-wrap .customer-table th:nth-child(5),.customer-overview-wrap .customer-table td:nth-child(5){width:145px}
.customer-overview-wrap .customer-table th:nth-child(6),.customer-overview-wrap .customer-table td:nth-child(6){width:115px}
.customer-overview-wrap .customer-table th:nth-child(7),.customer-overview-wrap .customer-table td:nth-child(7){width:180px}
.customer-overview-wrap .customer-table th:nth-child(8),.customer-overview-wrap .customer-table td:nth-child(8){width:100px}
.customer-overview-wrap .customer-table th:nth-child(9),.customer-overview-wrap .customer-table td:nth-child(9){width:100px}
.customer-overview-wrap .customer-table th:nth-child(10),.customer-overview-wrap .customer-table td:nth-child(10){width:135px}
.customer-overview-wrap .customer-table th:nth-child(n+11),.customer-overview-wrap .customer-table td:nth-child(n+11){width:105px}

.supplier-table{min-width:1250px;table-layout:fixed}
.supplier-table th:nth-child(1),.supplier-table td:nth-child(1){width:190px;min-width:190px;max-width:190px;padding-left:14px;padding-right:8px}
.supplier-table th:nth-child(2),.supplier-table td:nth-child(2){width:360px}
.supplier-table th:nth-child(3),.supplier-table td:nth-child(3){width:210px}
.supplier-table th:nth-child(4),.supplier-table td:nth-child(4){width:230px}
.supplier-table th:nth-child(5),.supplier-table td:nth-child(5){width:auto;min-width:360px}
.supplier-license-cell{gap:7px;white-space:normal}.supplier-license-cell .customer-license-empty{min-width:0}
.product-entry-view{padding-bottom:88px}.product-entry-topbar{align-items:flex-start}.product-entry-steps{display:flex;gap:8px;flex-wrap:wrap}.product-entry-steps span{padding:8px 12px;border-radius:999px;background:#eef2f7;color:#64748b;font-size:12px;font-weight:700}.product-entry-steps .active{background:#e8f0ff;color:#155ee7}.product-entry-upload{display:flex;align-items:center;gap:18px;margin:0 22px 14px;padding:18px 20px;border:1px dashed #9db7e8;border-radius:14px;background:#f8fbff}.product-entry-upload>div{display:flex;flex-direction:column;gap:4px}.product-entry-upload span{color:#64748b;font-size:13px}.product-entry-status{margin:0 22px 14px;padding:12px 15px;border:1px solid #b7dfc4;border-radius:10px;background:#f0fbf4;color:#176534}.product-entry-status.warn{border-color:#f2c2a7;background:#fff7ed;color:#9a3412}.product-entry-workspace{margin:0 22px}.product-entry-controls{display:flex;align-items:end;gap:10px;flex-wrap:wrap;padding:12px 14px;border:1px solid #dce4ef;border-radius:12px 12px 0 0;background:#fff}.product-entry-controls label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#64748b}.product-entry-controls input,.product-entry-controls select{height:36px;min-width:120px;border:1px solid #d6deea;border-radius:8px;padding:0 9px;background:#fff}.product-entry-controls input{width:112px;min-width:0}.product-entry-controls>span{margin-left:auto;color:#526071;font-size:13px}.product-entry-grid-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:12px;margin-top:12px}.product-entry-sheet-card,.product-entry-defaults{border:1px solid #dce4ef;border-radius:12px;background:#fff;overflow:hidden}.product-entry-sheet-head{display:flex;justify-content:space-between;gap:12px;padding:13px 15px;border-bottom:1px solid #e5eaf1}.product-entry-sheet-head span{font-size:12px;color:#7b8798}.product-entry-table-wrap{max-height:600px;overflow:auto}.product-entry-table{border-collapse:separate;border-spacing:0;min-width:max-content;width:100%;font-size:12px}.product-entry-table th,.product-entry-table td{min-width:125px;max-width:240px;padding:8px 9px;border-right:1px solid #e3e8ef;border-bottom:1px solid #e3e8ef;white-space:pre-wrap;word-break:break-word;vertical-align:top;background:#fff}.product-entry-table .row-number{position:sticky;left:0;z-index:4;min-width:50px;max-width:50px;text-align:center;background:#f5f7fa;color:#64748b}.product-entry-column-letters th{position:sticky;top:0;z-index:5;min-width:125px;background:#eef2f7;text-align:center}.product-entry-column-letters .row-number{z-index:7}.product-entry-mapping-row th{position:sticky;top:33px;z-index:5;background:#f8fbff}.product-entry-mapping-row .row-number{z-index:7}.product-entry-mapping-row select{width:100%;height:34px;border:1px solid #b8c8e8;border-radius:7px;background:#fff;color:#155ee7;font-weight:700}.product-entry-table tr.is-header-row td{background:#dff1fb;font-weight:700}.product-entry-table tr.is-data-row td{background:#fff}.product-entry-defaults{padding:16px;display:flex;flex-direction:column;gap:11px}.product-entry-defaults h3{margin:0 0 4px}.product-entry-defaults label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#526071}.product-entry-defaults input,.product-entry-defaults select{height:38px;border:1px solid #d6deea;border-radius:8px;padding:0 10px;background:#fff}.product-entry-defaults .primary{margin-top:5px}.product-entry-bottom-bar{position:sticky;bottom:12px;z-index:9;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:12px;padding:12px 15px;border:1px solid #cfdaea;border-radius:12px;background:rgba(255,255,255,.96);box-shadow:0 10px 26px rgba(25,48,84,.12);backdrop-filter:blur(10px)}.product-entry-bottom-bar>div{display:flex;gap:8px}.product-entry-preview{position:fixed;inset:64px 24px 24px calc(var(--sidebar-width,220px) + 24px);z-index:60;display:flex;flex-direction:column;border:1px solid #cfd9e8;border-radius:14px;background:#fff;box-shadow:0 22px 60px rgba(15,35,65,.25)}.product-entry-preview-head{display:flex;justify-content:space-between;align-items:center;padding:15px 18px;border-bottom:1px solid #e2e8f0}.product-entry-preview-head h2{margin:0 0 4px}.product-entry-preview-head p{margin:0;color:#64748b}.product-entry-preview-wrap{overflow:auto;flex:1}.product-entry-preview table{border-collapse:collapse;min-width:1600px;width:100%;font-size:12px}.product-entry-preview th,.product-entry-preview td{padding:9px;border:1px solid #e2e8f0;white-space:nowrap}.product-entry-preview th{position:sticky;top:0;background:#eef4ff;color:#244a84}@media(max-width:1100px){.product-entry-grid-layout{grid-template-columns:1fr}.product-entry-defaults{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.product-entry-defaults h3,.product-entry-defaults .primary{grid-column:1/-1}.product-entry-preview{left:20px}.product-entry-bottom-bar{align-items:flex-start;flex-direction:column}.product-entry-bottom-bar>div{width:100%;flex-wrap:wrap}}

.product-entry-supplier-field{position:relative}.product-entry-supplier-picker{position:relative;display:block}.product-entry-supplier-picker>input{width:100%}.product-entry-supplier-matches{position:absolute;left:0;right:0;top:calc(100% + 5px);z-index:30;max-height:260px;overflow:auto;padding:5px;border:1px solid #b7c6dc;border-radius:9px;background:#fff;box-shadow:0 14px 30px rgba(24,48,82,.2)}.product-entry-supplier-matches button{display:flex;width:100%;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 9px;border:0;border-radius:6px;background:#fff;color:#24364e;text-align:left;cursor:pointer}.product-entry-supplier-matches button:hover,.product-entry-supplier-matches button:focus{background:#edf4ff}.product-entry-supplier-matches strong{font-size:13px}.product-entry-supplier-matches small{color:#718096}.product-entry-supplier-field>small{line-height:1.4;color:#718096}.product-entry-supplier-field>small.matched{color:#16803d}.product-entry-supplier-field>small.warn{color:#b45309}

.product-entry-table{table-layout:fixed;min-width:100%}.product-entry-table th,.product-entry-table td{box-sizing:border-box;min-width:0;max-width:none;padding:7px 8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:middle}.product-entry-table tbody tr,.product-entry-table tbody th,.product-entry-table tbody td{height:36px}.product-entry-table .row-number{width:50px;min-width:50px;max-width:50px}.product-entry-column-letters th{height:36px;min-width:0}.product-entry-mapping-row th{top:36px;height:48px}.product-entry-source-cell{position:relative;overflow:visible!important}.product-entry-source-cell>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.product-entry-source-cell[title]:not([title=""]):hover{z-index:25}.product-entry-source-cell[title]:not([title=""]):hover::after{position:absolute;left:6px;top:calc(100% - 2px);z-index:40;display:block;min-width:180px;max-width:430px;max-height:220px;overflow:auto;padding:9px 11px;border:1px solid #aebdd2;border-radius:8px;background:#fff;color:#26364d;box-shadow:0 12px 28px rgba(23,42,70,.22);content:attr(title);font-weight:400;line-height:1.55;text-align:left;white-space:pre-wrap;word-break:break-word;pointer-events:none}.product-entry-table [data-product-entry-source-column].is-mapped-column{background:#edf6ff;box-shadow:inset 2px 0 #6aa3f2}.product-entry-table tr.is-header-row [data-product-entry-source-column].is-mapped-column{background:#cfe8f8}.product-entry-table .product-entry-column-letters [data-product-entry-source-column].is-mapped-column,.product-entry-table .product-entry-mapping-row [data-product-entry-source-column].is-mapped-column{background:#dcecff}.product-entry-table .product-entry-mapping-row [data-product-entry-source-column].is-mapped-column select{border-color:#4b88e6;background:#f5f9ff;color:#0d56c8}

.product-entry-table tbody tr.is-header-row,.product-entry-table tbody tr.is-header-row th,.product-entry-table tbody tr.is-header-row td{height:auto}.product-entry-table tr.is-header-row th,.product-entry-table tr.is-header-row td{position:sticky;top:84px;z-index:4;padding-top:9px;padding-bottom:9px;overflow:hidden!important;vertical-align:middle;background:#dff1fb}.product-entry-table tr.is-header-row .row-number{z-index:7;background:#dff1fb}.product-entry-table tr.is-header-row .product-entry-source-cell>span{overflow:visible;white-space:pre-wrap;text-overflow:clip;line-height:1.45;word-break:break-word}.product-entry-table tr.is-header-row .product-entry-source-cell:hover::after{display:none}

.product-entry-mapping-row select{-webkit-appearance:auto;appearance:auto;padding:0 4px;background-image:none}.product-entry-table .product-entry-mapping-row [data-product-entry-source-column].is-mapped-column select{background:#f5f9ff;color:#0d56c8}

.product-entry-preview table{table-layout:fixed;min-width:1205px;width:100%}.product-entry-preview th,.product-entry-preview td{box-sizing:border-box;height:36px;padding:7px 8px;overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.product-entry-preview td{position:relative;overflow:visible}.product-entry-preview td>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.product-entry-preview td[title]:not([title=""]):hover{z-index:20}.product-entry-preview td[title]:not([title=""]):hover::after{position:absolute;left:5px;top:calc(100% - 2px);z-index:35;display:block;min-width:170px;max-width:480px;max-height:220px;padding:9px 11px;overflow:hidden;border:1px solid #aebdd2;border-radius:8px;background:#fff;color:#26364d;box-shadow:0 12px 28px rgba(23,42,70,.22);content:attr(title);font-weight:400;line-height:1.5;text-align:left;white-space:pre-wrap;word-break:break-all;pointer-events:none}

.product-entry-mapping-row select.has-mapping{border-color:#2d9b68!important;background:#ecf9f1!important;color:#087443!important;font-weight:800}.product-entry-mapping-row option.is-current-option{background:#dff5e8;color:#087443;font-weight:700}.product-entry-mapping-row option.is-used-option,.product-entry-mapping-row option.is-used-option:disabled{opacity:1;background:#edf9f2;color:#198754;-webkit-text-fill-color:#198754;font-weight:700}

/* 产品录入字段映射：使用受控浮层，选项显示在当前列的侧边。 */
.product-entry-mapping-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  height: 34px;
  padding: 0 8px 0 10px;
  overflow: hidden;
  border: 1px solid #b8c8e8;
  border-radius: 7px;
  background: #fff;
  color: #155ee7;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.product-entry-mapping-trigger:hover { border-color: #78a2ec; background: #f7faff; }
.product-entry-mapping-trigger:focus-visible,
.product-entry-mapping-trigger.is-open {
  border-color: #3978e6;
  outline: 2px solid rgba(57, 120, 230, .2);
  outline-offset: 1px;
}
.product-entry-mapping-trigger-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-entry-mapping-trigger-arrow {
  flex: 0 0 auto;
  color: currentColor;
  font-size: 14px;
  transition: transform .15s ease;
}
.product-entry-mapping-trigger.is-open .product-entry-mapping-trigger-arrow { transform: rotate(180deg); }
.product-entry-mapping-trigger.has-mapping,
.product-entry-table .product-entry-mapping-row [data-product-entry-source-column].is-mapped-column .product-entry-mapping-trigger {
  border-color: #2d9b68;
  background: #ecf9f1;
  color: #087443;
  font-weight: 800;
}
.product-entry-mapping-menu {
  position: fixed;
  z-index: 1000;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid #afbdd1;
  border-radius: 11px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 16px 36px rgba(23, 42, 70, .24);
  backdrop-filter: blur(10px);
}
.product-entry-mapping-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #24364e;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.product-entry-mapping-option:hover,
.product-entry-mapping-option:focus-visible {
  outline: 0;
  background: #edf4ff;
  color: #164fa9;
}
.product-entry-mapping-option-check {
  color: #3b82f6;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}
.product-entry-mapping-option-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.product-entry-mapping-option small { color: #65809f; font-size: 11px; white-space: nowrap; }
.product-entry-mapping-option.is-current {
  background: #4f94ef;
  color: #fff;
  font-weight: 800;
}
.product-entry-mapping-option.is-current .product-entry-mapping-option-check,
.product-entry-mapping-option.is-current small { color: #fff; }
.product-entry-mapping-option.is-used,
.product-entry-mapping-option.is-used:disabled {
  opacity: 1;
  background: #edf9f2;
  color: #198754;
  cursor: not-allowed;
}
.product-entry-mapping-option.is-used .product-entry-mapping-option-check { color: #198754; }

/* 商品导入对账：明确可筛选指标、当前筛选和供应商 / 品牌范围。 */
.product-import-stats .product-import-stat.active {
  border-color: #315ee7;
  background: #eaf0ff;
  box-shadow: inset 0 0 0 1px #315ee7, 0 5px 14px rgba(49, 94, 231, .16);
}
.product-import-stats .product-import-stat.active span { color: #244fc9; font-weight: 800; }
.product-import-stats .product-import-stat.is-static {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: default;
  opacity: .82;
}
.product-import-stats .product-import-stat.is-static strong,
.product-import-stats .product-import-stat.is-static span,
.product-import-stats .product-import-stat.is-static small {
  display: inline-flex;
  flex: 0 0 auto;
  margin-top: 0;
}
.product-import-stats .product-import-stat.is-static:hover {
  border-color: #e4e9f2;
  box-shadow: none;
}
.product-import-scope-filter {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #a9c1f5;
  border-radius: 9px;
  background: #eef4ff;
  color: #31558f;
  font-size: 12px;
}
.product-import-scope-filter.hidden { display: none !important; }
.product-import-scope-filter span { display: flex; min-width: 0; align-items: center; gap: 7px; flex-wrap: wrap; }
.product-import-scope-filter strong { color: #174fae; font-size: 13px; }
.product-import-scope-filter small { color: #7183a0; }
.product-import-scope-filter button { flex: 0 0 auto; min-height: 30px; padding: 4px 10px; }
.product-import-scope-table tr.is-filtered td { background: #eef4ff; }
.product-import-scope-table tr.is-filtered td:first-child { box-shadow: inset 3px 0 #315ee7; }
.product-import-scope-table tr.is-filtered button { background: #dce8ff; color: #174fae; font-weight: 800; }
.product-import-truncation-warning {
  padding: 10px 11px;
  border: 1px solid #f1b8ad;
  border-radius: 8px;
  background: #fff2ef;
  color: #b13b2f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}
.product-import-truncation-warning.hidden { display: none !important; }
#productImportPreview .product-import-normalization { margin-top: 5px; white-space: normal; overflow-wrap: anywhere; }
#productImportPreview .product-import-normalization summary { cursor: pointer; color: #915b10; font-weight: 600; }
#productImportPreview .product-import-normalization-item { margin-top: 7px; padding: 7px; border: 1px solid #e5eaf3; border-radius: 6px; background: #f8faff; }
#productImportPreview .product-import-normalization-item strong,
#productImportPreview .product-import-normalization-item span,
#productImportPreview .product-import-normalization-item small { display: block; white-space: normal; }
#productImportPreview .product-import-normalization-item code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; color: #263d60; }

/* CRM-SRM-001-R2：客户/供应商归档门禁与执照认证状态。 */
.archive-create-rule {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #cddcf7;
  border-radius: 8px;
  background: #f3f7ff;
  color: #52627a;
  font-size: 12px;
  line-height: 1.55;
}
.archive-create-rule strong { flex: 0 0 auto; color: #2459b8; }
.archive-create-rule span { min-width: 0; }
.customer-create-actions select:required:invalid {
  border-color: #e5a23d;
  color: #a55d00;
  background: #fffaf0;
}
.supplier-create-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.supplier-create-row > input:first-child { flex: 1 1 280px; }
.supplier-create-row > input[readonly] { flex: 0 1 210px; }
.customer-search-box > select,
.supplier-search-row > select {
  flex: 0 0 145px;
  min-width: 132px;
}
.archive-auth-summary {
  display: flex;
  align-items: stretch;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.archive-auth-summary:empty { display: none; }
.archive-auth-summary button {
  display: inline-flex;
  min-width: 132px;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  color: #55647a;
  background: #fff;
  cursor: pointer;
}
.archive-auth-summary button:hover,
.archive-auth-summary button.is-active { border-color: #7ea3ef; background: #edf4ff; color: #2459b8; }
.archive-auth-summary button.is-warning strong { color: #b86b00; }
.archive-auth-summary button.is-danger strong { color: #c13d35; }
.archive-auth-summary button span { font-size: 11px; white-space: nowrap; }
.archive-auth-summary button strong { color: #2459b8; font-size: 16px; font-variant-numeric: tabular-nums; }
.password-state.password-advisory { color: #2459b8; background: #edf4ff; }
.archive-license-overview,
.supplier-license-preview-stack {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.archive-license-status {
  display: inline-grid;
  min-width: 82px;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 7px;
  color: #59687b;
  background: #eef1f5;
  line-height: 1.25;
}
.archive-license-status b { font-size: 11px; white-space: nowrap; }
.archive-license-status small { max-width: 220px; color: inherit; font-size: 10px; white-space: normal; }
.archive-license-status.is-compact { display: inline-flex; min-width: 0; padding: 3px 6px; border-radius: 999px; }
.archive-license-status.is-verified { color: #137949; background: #e8f7ef; }
.archive-license-status.is-review_required,
.archive-license-status.is-pending_ocr { color: #a15d00; background: #fff3da; }
.archive-license-status.is-missing,
.archive-license-status.is-rejected { color: #b63b34; background: #fdeceb; }
.archive-license-verification { display: grid; min-width: 0; gap: 4px; }
.archive-license-ocr-summary {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: #7a8798;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
}
.customer-license-cell { height: auto; min-height: 44px; align-items: flex-start; flex-wrap: wrap; }
.customer-price-level {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #2459b8;
  background: #edf4ff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.customer-price-level.is-missing { color: #b56000; background: #fff1d6; }
.customer-import-preview {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #b9cae7;
  border-radius: 10px;
  background: #fff;
}
.customer-import-preview.hidden { display: none !important; }
.customer-import-preview > header,
.customer-import-preview > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f5f8fd;
}
.customer-import-preview > header { border-bottom: 1px solid #e0e7f1; }
.customer-import-preview > footer { border-top: 1px solid #e0e7f1; color: #68758a; }
.customer-import-preview > header > div { display: flex; align-items: baseline; gap: 10px; }
.customer-import-preview > header span { color: #718096; font-size: 11px; }
.customer-import-preview-pagination,
.customer-import-preview-gate { display: flex; align-items: center; gap: 8px; }
.customer-import-preview-pagination span { min-width: 138px; color: #5e6d82; text-align: center; font-size: 11px; }
.customer-import-preview-pagination button:disabled { opacity: .42; cursor: not-allowed; }
.customer-import-preview-gate { margin-left: auto; }
.customer-import-batch-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 12px;
}
.customer-import-batch-actions label { display: inline-flex; align-items: center; gap: 7px; color: #59687b; font-size: 11px; }
.customer-import-batch-actions select { min-width: 135px; }
.customer-import-batch-actions > span { margin-left: auto; color: #b35a00; font-size: 11px; }
.customer-import-preview-wrap { max-height: 330px; overflow: auto; border-block: 1px solid #e7ecf3; }
.customer-import-preview table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: 11px; }
.customer-import-preview th,
.customer-import-preview td { padding: 7px 9px; border-bottom: 1px solid #e8edf4; text-align: left; }
.customer-import-preview th { position: sticky; z-index: 2; top: 0; color: #53627a; background: #edf3fb; }
.customer-import-preview td:nth-child(1),
.customer-import-preview td:nth-child(2) { width: 58px; }
.customer-import-preview td:nth-child(3) { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-import-preview td:nth-child(4) { width: 190px; }
.customer-import-preview td select { width: 100%; min-width: 165px; }
.customer-import-preview td select.is-invalid { border-color: #df7e5f; background: #fff5f2; }
.customer-import-preview tr.is-blocked td { background: #fffaf7; }
.customer-import-state { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-weight: 800; }
.customer-import-state.is-ready { color: #137949; background: #e8f7ef; }
.customer-import-state.is-blocked { color: #b13d33; background: #fdeceb; }
.supplier-license-cell { display: grid; min-width: 0; align-items: flex-start; gap: 7px; white-space: normal; }
.supplier-license-preview-stack { display: flex; min-width: 0; align-items: center; gap: 8px; }
.supplier-license-preview-stack .customer-license-empty { min-height: 44px; align-content: center; }
.supplier-license-preview.is-pending { border-color: #efb44f; background: #fff9eb; box-shadow: 0 0 0 2px rgba(239, 180, 79, .15); }
.supplier-license-state { display: grid; min-width: 0; justify-items: start; gap: 3px; }
.supplier-license-state-note { color: #7a8798; font-size: 10px; line-height: 1.3; white-space: normal; }
#suppliers .supplier-license-reason { display: block; color: #697b95; font-size: 12px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
#suppliers .supplier-account-state { display: grid; justify-items: start; gap: 7px; white-space: normal; }
#suppliers .supplier-account-state > small { color: #697b95; font-size: 12px; line-height: 1.5; }
#suppliers .supplier-account-status { display: inline-flex; padding: 4px 8px; border-radius: 7px; font-size: 12px; font-weight: 700; }
#suppliers .supplier-account-status.is-enabled { color: #158060; background: #e7f6ef; }
#suppliers .supplier-account-status.is-stopped { color: #b94b3e; background: #fff0ec; }
#suppliers .row-actions { flex-wrap: wrap; }
#suppliers .supplier-restore-action { display: inline-flex; flex: 0 0 100%; max-width: 100%; align-items: center; flex-wrap: wrap; gap: 6px; vertical-align: top; }
#suppliers .supplier-restore-action > small { max-width: 220px; color: #8c642d; font-size: 12px; line-height: 1.5; white-space: normal; }
#suppliers .supplier-action-message { display: block; flex-basis: 100%; color: #26765c; font-size: 12px; line-height: 1.5; white-space: normal; }
#suppliers .supplier-action-message.is-error { color: #b94b3e; }
#suppliers .supplier-create-result { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; white-space: normal; }
#suppliers .supplier-create-result > span { min-width: 0; overflow-wrap: anywhere; }
#suppliers .supplier-row-located > td { background: #eef4ff; box-shadow: inset 0 2px #c6d8ff, inset 0 -2px #c6d8ff; }
.customer-overview-wrap .customer-table { min-width: 1530px; }
.customer-overview-wrap .customer-table th:nth-child(1),
.customer-overview-wrap .customer-table td:nth-child(1) { width: 120px; min-width: 120px; max-width: 120px; }
@media (max-width: 1050px) {
  .customer-search-box { flex-wrap: wrap; }
  .customer-search-box > input { flex-basis: 100%; }
  .customer-search-box > select { flex: 1 1 150px; }
  .archive-create-rule { flex-direction: column; gap: 3px; }
  .customer-import-preview > footer { align-items: stretch; flex-direction: column; }
  .customer-import-preview-gate { justify-content: space-between; margin-left: 0; }
}

/* LICENSE-THUMB-PERF-001: fixed-size skeletons prevent broken-image text overflow. */
.business-license-thumbnail {
  position: relative;
}
.business-license-thumbnail img {
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  color: transparent;
  background: #eef2f7;
  font-size: 0;
}
.business-license-thumbnail.is-thumbnail-loading img {
  opacity: .48;
  background: linear-gradient(105deg, #edf1f6 22%, #f8fafc 38%, #edf1f6 54%);
  background-size: 220% 100%;
  animation: business-license-thumbnail-loading 1.15s linear infinite;
}
.business-license-thumbnail.is-thumbnail-loaded img {
  opacity: 1;
  animation: none;
}
.business-license-thumbnail.is-thumbnail-error img {
  visibility: hidden;
  animation: none;
}
.business-license-thumbnail::before {
  display: grid;
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0;
  width: 54px;
  height: 36px;
  box-sizing: border-box;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #c9d2df;
  border-radius: 5px;
  color: #7a8798;
  background: #f7f9fc;
  font-size: 9px;
  line-height: 1.15;
  text-align: center;
  transform: translateY(-50%);
  white-space: normal;
  opacity: 0;
  pointer-events: none;
}
.business-license-thumbnail.is-compact::before,
.supplier-license-preview.business-license-thumbnail::before {
  left: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
}
.business-license-thumbnail.is-thumbnail-error::before {
  content: "图片\A不可用";
  white-space: pre-line;
  opacity: 1;
}
.business-license-thumbnail:not(.is-thumbnail-loaded):hover img {
  position: static;
  width: 54px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
  object-fit: cover;
  transform: none;
}
.business-license-thumbnail.is-compact:not(.is-thumbnail-loaded):hover img,
.supplier-license-preview.business-license-thumbnail:not(.is-thumbnail-loaded):hover img {
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
}
@keyframes business-license-thumbnail-loading {
  from { background-position: 110% 0; }
  to { background-position: -110% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .business-license-thumbnail.is-thumbnail-loading img { animation: none; }
}

/* 产品录入统一工作台：单个新增、标准表格、供应商原表三种入口。 */
.product-entry-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 22px 16px;
}
.product-entry-mode-tabs > button {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 13px 16px;
  border: 1px solid #d8e1ee;
  border-radius: 13px;
  background: #fff;
  color: #23344d;
  text-align: left;
  cursor: pointer;
}
.product-entry-mode-tabs > button strong { font-size: 16px; }
.product-entry-mode-tabs > button span { color: #718096; font-size: 12px; }
.product-entry-mode-tabs > button:hover { border-color: #9cb7e5; background: #f7faff; }
.product-entry-mode-tabs > button.active {
  border-color: #4779df;
  background: #edf3ff;
  color: #174fbf;
  box-shadow: 0 5px 15px rgba(42, 88, 177, .1);
}
.product-entry-mode-tabs > button.active span { color: #49658e; }
.product-entry-mode-panel { margin: 0 22px; }
.product-entry-mode-panel > .product-entry-steps { margin: 0 0 12px; }
.product-entry-mode-empty,
.product-entry-standard-card,
.product-entry-single-editor {
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(38, 62, 99, .06);
}
.product-entry-mode-empty,
.product-entry-standard-card {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 22px;
}
.product-entry-mode-empty h2,
.product-entry-standard-card h2,
.product-entry-single-head h2 { margin: 0 0 7px; font-size: 19px; }
.product-entry-mode-empty p,
.product-entry-standard-card p,
.product-entry-single-head p { margin: 0; color: #6c798c; font-size: 13px; line-height: 1.55; }
.product-entry-standard-actions { display: flex; flex: 0 0 auto; gap: 10px; }
.product-entry-standard-actions button { min-height: 42px; }
.product-entry-standard-actions .product-import-button.has-file { border-color: #3971db; background: #eaf1ff; color: #174fbf; }
.product-entry-standard-card + .product-import-result { margin: 12px 0 0; }
.product-entry-single-editor { overflow: visible; }
.product-entry-single-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5eaf2;
  border-radius: 14px 14px 0 0;
  background: #f9fbff;
}
.product-entry-single-head > span { max-width: 320px; color: #78869a; font-size: 12px; line-height: 1.5; text-align: right; }
.product-entry-single-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 14px 18px;
}
.product-entry-single-grid label { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.product-entry-single-grid label > span { color: #526174; font-size: 12px; font-weight: 700; }
.product-entry-single-grid label.entry-span-2 { grid-column: span 2; }
.product-entry-single-grid label.entry-span-3 { grid-column: span 3; }
.product-entry-single-grid label.entry-span-4 { grid-column: span 4; }
.product-entry-single-grid label.is-wide { grid-column: span 2; }
.product-entry-single-grid label.is-full { grid-column: 1 / -1; }
.product-entry-single-grid :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #d2dbea;
  border-radius: 9px;
  background: #fff;
  color: #1f2f46;
  font: inherit;
}
.product-entry-single-grid :is(input, select) { height: 40px; padding: 0 10px; }
.product-entry-single-grid textarea { height: 40px; min-height: 40px; padding: 9px 10px; resize: vertical; }
.product-entry-single-grid :is(input, select, textarea):focus {
  border-color: #4e7fe1;
  outline: 2px solid rgba(78, 127, 225, .16);
}
.product-draft-supplier-field { position: relative; z-index: 12; }
.product-draft-supplier-picker { position: relative; min-width: 0; }
.product-draft-supplier-search.has-selection { border-color: #4cab79; background: #f7fffa; }
.product-draft-supplier-search[aria-invalid="true"] { border-color: #d65a55; background: #fff8f7; }
.product-draft-supplier-results {
  position: absolute;
  z-index: 90;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 238px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #cbd7ee;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 40, 72, .2);
}
.product-draft-supplier-results button {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.product-draft-supplier-results button:hover,
.product-draft-supplier-results button.is-active { background: #edf3ff; }
.product-draft-supplier-results strong { overflow: hidden; color: #263954; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-draft-supplier-results span { color: #7b879b; font-size: 10px; }
.product-draft-supplier-empty { padding: 16px 8px; color: #8a94a6; font-size: 12px; text-align: center; }
.product-category-combobox { position: relative; min-width: 150px; }
.product-category-combobox.is-draft { min-width: 0; }
.product-category-path-input { padding-right: 30px !important; }
.product-category-path-input.has-selection { border-color: #4cab79; background: #f7fffa; }
.product-category-path-input[aria-invalid="true"] { border-color: #d65a55 !important; background: #fff8f7 !important; }
.product-category-combobox-icon {
  position: absolute;
  top: 50%;
  right: 9px;
  color: #7b879b;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}
.product-category-picker-results {
  position: fixed;
  z-index: 4200;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #cbd7ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(24, 40, 72, .24);
  box-sizing: border-box;
}
.product-category-picker-results button {
  position: relative;
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #263954;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.product-category-picker-results button:hover,
.product-category-picker-results button.is-active { background: #edf3ff; }
.product-category-picker-results button.is-selected { background: #f2fbf6; }
.product-category-picker-results button.is-selected::after {
  position: absolute;
  right: 12px;
  color: #18805e;
  content: "已选";
  font-size: 10px;
}
.product-category-picker-results button strong {
  overflow: hidden;
  padding-right: 28px;
  color: #263954;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-category-picker-results button span { color: #7b879b; font-size: 10px; }
.product-category-picker-results .product-category-picker-clear {
  margin-top: 5px;
  border-top: 1px solid #e7ecf4;
  border-radius: 0 0 7px 7px;
  color: #69778b;
}
.product-category-picker-empty,
.product-category-picker-more { padding: 12px 10px; color: #7b879b; font-size: 11px; line-height: 1.5; }
.product-category-picker-more { padding-block: 8px; border-top: 1px solid #edf0f5; }
.product-entry-price-preview {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, minmax(110px, 1fr));
  align-items: stretch;
  gap: 10px;
  margin: 0 20px 18px;
}
.product-entry-price-preview > span,
.product-entry-price-preview > div {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid #e0e6f0;
  border-radius: 10px;
  background: #f8faff;
}
.product-entry-price-preview > span { color: #5e6c80; font-size: 13px; font-weight: 700; }
.product-entry-price-preview small { color: #6e7c90; }
.product-entry-price-preview strong { margin-top: 3px; font-size: 18px; }
.product-entry-single-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid #e5eaf2;
  border-radius: 0 0 14px 14px;
  background: #fbfcff;
}
.product-entry-single-actions > div { display: flex; gap: 9px; }
.product-entry-single-actions .product-visible-toggle { display: inline-flex; align-items: center; gap: 6px; }
#productEntry #newProductBtn,
#productEntry #productImportBtn { min-height: 42px; padding-inline: 20px; }

@media (max-width: 1100px) {
  .product-entry-mode-tabs { grid-template-columns: 1fr; }
  .product-entry-mode-tabs > button { min-height: 62px; }
  .product-entry-single-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-entry-single-grid label.entry-span-2,
  .product-entry-single-grid label.entry-span-3 { grid-column: span 1; }
  .product-entry-single-grid label.entry-span-4 { grid-column: 1 / -1; }
  .product-entry-price-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-entry-price-preview > span { grid-column: 1 / -1; min-height: 40px; }
}
@media (max-width: 700px) {
  .product-entry-mode-tabs,
  .product-entry-mode-panel { margin-inline: 12px; }
  .product-entry-mode-empty,
  .product-entry-standard-card,
  .product-entry-single-head,
  .product-entry-single-actions { align-items: flex-start; flex-direction: column; }
  .product-entry-standard-actions,
  .product-entry-single-actions > div { width: 100%; flex-wrap: wrap; }
  .product-entry-standard-actions button,
  .product-entry-single-actions button { flex: 1 1 180px; }
  .product-entry-single-grid { grid-template-columns: 1fr; padding: 16px; }
  .product-entry-single-grid label.entry-span-2,
  .product-entry-single-grid label.entry-span-3,
  .product-entry-single-grid label.entry-span-4,
  .product-entry-single-grid label.is-wide,
  .product-entry-single-grid label.is-full { grid-column: auto; }
  .product-entry-single-head > span { max-width: none; text-align: left; }
  .product-entry-price-preview { grid-template-columns: 1fr 1fr; margin-inline: 16px; }
}

#productCatalogInviteModal .project-invite-dialog { width: min(920px, 94vw); }
#productCatalogInviteModal .product-catalog-invite-create {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
}
#productCatalogInviteModal .product-catalog-create-span-2 { grid-column: span 2; }
#productCatalogInviteModal .product-catalog-create-span-4 { grid-column: span 4; }
#productCatalogInviteModal .product-catalog-create-span-6 { grid-column: span 6; }
#productCatalogInviteModal .product-catalog-invite-create > button { grid-column: 1 / -1; }
#productCatalogInviteModal .product-catalog-filter-field { min-width: 0; }
#productCatalogInviteModal .product-catalog-filter-picker { position: relative; z-index: 26; min-width: 0; }
#productCatalogInviteModal .product-catalog-filter-picker > input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #cfd8e8;
  border-radius: 7px;
  background: #fff;
  color: #263954;
  font: inherit;
}
#productCatalogInviteModal .product-catalog-filter-picker > input.has-selection { border-color: #4cab79; background: #f7fffa; }
#productCatalogInviteModal .product-catalog-filter-picker > input[aria-invalid="true"] { border-color: #d65a55; background: #fff8f7; }
#productCatalogInviteModal .product-catalog-filter-results {
  position: absolute;
  z-index: 85;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid #cbd7ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(24, 40, 72, .2);
}
#productCatalogInviteModal .product-catalog-filter-results button {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
#productCatalogInviteModal .product-catalog-filter-results button:hover,
#productCatalogInviteModal .product-catalog-filter-results button.is-active { background: #edf3ff; }
#productCatalogInviteModal .product-catalog-filter-results strong,
#productCatalogInviteModal .product-catalog-filter-results span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#productCatalogInviteModal .product-catalog-filter-results strong { color: #263954; font-size: 12px; }
#productCatalogInviteModal .product-catalog-filter-results span { margin-top: 2px; color: #7b879b; font-size: 10px; }
#productCatalogInviteModal .product-catalog-filter-empty { padding: 18px 10px; color: #8a94a6; text-align: center; }
#productCatalogInviteModal .product-catalog-price-warning {
  grid-column: span 10;
  align-self: stretch;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #f1c47b;
  border-radius: 8px;
  background: #fff8e8;
  color: #9a5e00;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  #productCatalogInviteModal .product-catalog-invite-create { grid-template-columns: 1fr; }
  #productCatalogInviteModal .product-catalog-create-span-2,
  #productCatalogInviteModal .product-catalog-create-span-4,
  #productCatalogInviteModal .product-catalog-create-span-6 { grid-column: 1; }
  #productCatalogInviteModal .product-catalog-filter-results { position: static; margin-top: 5px; max-height: 220px; }
}

/* 收款登记/凭证查看窗口：桌面端可拖动、八方向调整大小。 */
.payment-modal-panel.is-window-positioned,
.payment-receipt-viewer-panel.is-window-positioned {
  box-sizing: border-box;
  max-width: calc(100vw - 20px);
  max-height: calc(100vh - 20px);
  overflow: auto;
  resize: none;
}
.payment-modal-panel.is-window-positioned {
  min-width: min(560px, calc(100vw - 20px));
  min-height: min(360px, calc(100vh - 20px));
}
.payment-receipt-viewer-panel.is-window-positioned {
  min-width: min(520px, calc(100vw - 20px));
  min-height: min(360px, calc(100vh - 20px));
}
.payment-modal-head,
.payment-receipt-viewer-panel > .modal-bar {
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.payment-modal-panel.is-window-dragging .payment-modal-head,
.payment-receipt-viewer-panel.is-window-dragging > .modal-bar {
  cursor: grabbing;
}
.payment-modal-panel.is-window-dragging,
.payment-modal-panel.is-window-resizing,
.payment-receipt-viewer-panel.is-window-dragging,
.payment-receipt-viewer-panel.is-window-resizing {
  user-select: none;
  box-shadow: 0 26px 74px rgba(17, 35, 69, .36);
}
.payment-window-resize-handle {
  position: absolute;
  z-index: 40;
  display: none;
  touch-action: none;
}
@media (min-width: 721px) {
  .payment-modal-panel.is-window-positioned .payment-window-resize-handle,
  .payment-receipt-viewer-panel.is-window-positioned .payment-window-resize-handle {
    display: block;
  }
}
.payment-window-resize-handle.is-n,
.payment-window-resize-handle.is-s {
  right: 18px;
  left: 18px;
  height: 9px;
  cursor: ns-resize;
}
.payment-window-resize-handle.is-n { top: 0; }
.payment-window-resize-handle.is-s { bottom: 0; }
.payment-window-resize-handle.is-e,
.payment-window-resize-handle.is-w {
  top: 18px;
  bottom: 18px;
  width: 9px;
  cursor: ew-resize;
}
.payment-window-resize-handle.is-e { right: 0; }
.payment-window-resize-handle.is-w { left: 0; }
.payment-window-resize-handle.is-ne,
.payment-window-resize-handle.is-se,
.payment-window-resize-handle.is-sw,
.payment-window-resize-handle.is-nw {
  width: 18px;
  height: 18px;
}
.payment-window-resize-handle.is-ne { top: 0; right: 0; cursor: nesw-resize; }
.payment-window-resize-handle.is-se { right: 0; bottom: 0; cursor: nwse-resize; }
.payment-window-resize-handle.is-sw { bottom: 0; left: 0; cursor: nesw-resize; }
.payment-window-resize-handle.is-nw { top: 0; left: 0; cursor: nwse-resize; }
.payment-window-resize-handle.is-ne::after,
.payment-window-resize-handle.is-se::after,
.payment-window-resize-handle.is-sw::after,
.payment-window-resize-handle.is-nw::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: #8fa4cf;
  border-style: solid;
  content: "";
  opacity: .75;
}
.payment-window-resize-handle.is-ne::after { top: 3px; right: 3px; border-width: 1px 1px 0 0; }
.payment-window-resize-handle.is-se::after { right: 3px; bottom: 3px; border-width: 0 1px 1px 0; }
.payment-window-resize-handle.is-sw::after { bottom: 3px; left: 3px; border-width: 0 0 1px 1px; }
.payment-window-resize-handle.is-nw::after { top: 3px; left: 3px; border-width: 1px 0 0 1px; }
.payment-window-resize-handle:hover::after { border-color: #315fd8; opacity: 1; }

/* 审核卡片中的凭证不再固定裁剪；超长/高清原图可在卡片内滚动查看。 */
.payment-review-receipt-preview {
  box-sizing: border-box;
  min-height: 220px;
  height: clamp(220px, 34vh, 420px);
  max-height: 52vh;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  padding: 10px;
  background: repeating-conic-gradient(#f3f6fb 0 25%, #e9eef7 0 50%) 50% / 16px 16px;
}
.payment-review-receipt-preview img {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  min-height: 0;
  max-width: 100%;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
  background: #fff;
}

/* 原图查看器的图片模式使用真实像素尺寸，支持滚动和按住图片平移。 */
.payment-receipt-viewer-tools {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px !important;
  justify-content: center !important;
}
#paymentReceiptZoomValue {
  min-width: 64px;
  color: #52627d;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.payment-receipt-viewer-body.is-image {
  display: block;
  overflow: auto;
  overscroll-behavior: contain;
}
.payment-receipt-viewer-body.is-image > img {
  display: block;
  box-sizing: content-box;
  max-width: none;
  max-height: none;
  background: #fff;
}
.payment-receipt-viewer-body.is-image-panning > img {
  cursor: grabbing !important;
}

/* 四个日期筛选项在窄屏自动换行，避免标签与日期输入互相遮挡。 */
.funds-ledger-date-field {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.funds-ledger-date-field input {
  width: 132px;
}
@media (max-width: 760px) {
  .funds-ledger-filters {
    flex-wrap: wrap;
    white-space: normal;
  }
  .funds-ledger-date-field {
    flex: 1 1 190px;
  }
  .funds-ledger-date-field input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }
  .payment-modal-panel.is-window-positioned,
  .payment-receipt-viewer-panel.is-window-positioned {
    min-width: 0;
    min-height: 0;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}

.customer-password-reset-dialog { width: min(460px, calc(100vw - 24px)); border: 1px solid #d4e4f4; border-radius: 16px; padding: 20px; color: #243b58; background: #fff; max-height: calc(100dvh - 24px); overflow: auto; }
.customer-password-reset-dialog::backdrop { background: #14263c80; }
.customer-password-reset-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.customer-password-reset-dialog h2 { margin: 0; font-size: 21px; }
.customer-password-reset-dialog p { color: #687f98; font-size: 13px; line-height: 1.65; }
.customer-password-reset-dialog label { display: block; margin-top: 12px; font-size: 13px; }
.customer-password-reset-dialog input { width: 100%; min-width: 0; box-sizing: border-box; padding: 11px; margin-top: 6px; font-size: 16px; border: 1px solid #ccd9eb; border-radius: 8px; }
.customer-password-reset-dialog form > button { width: 100%; margin-top: 16px; }
.customer-password-reset-dialog [role=alert] { color: #af3040; min-height: 20px; margin-top: 10px; font-size: 13px; }

/* Supplier maintenance directory only: fixed list heights keep search steady. */
#supplierMaintenanceDialog .supplier-maintenance-picker { grid-template-rows: auto 18px auto auto auto; gap: 8px; }
#supplierMaintenanceDialog .supplier-maintenance-search-anchor { position: relative; }
#supplierMaintenanceDialog .supplier-maintenance-picker-dropdown { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; padding: 8px; border: 1px solid #a9c1e7; border-radius: 10px; background: #fff; box-shadow: 0 10px 24px #17335f26; }
#supplierMaintenanceDialog .supplier-maintenance-picker-dropdown[hidden] { display: none; }
#supplierMaintenanceDialog .supplier-maintenance-picker-list { height: clamp(140px, 35vh, 300px); }
#supplierMaintenanceDialog .supplier-maintenance-generated-list { display: grid; align-content: start; gap: 8px; height: clamp(150px, calc(88vh - 340px), 360px); overflow: auto; scrollbar-gutter: stable; }
#supplierMaintenanceDialog .supplier-maintenance-generated-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; }
#supplierMaintenanceDialog .supplier-maintenance-generated-heading label { display: flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
#supplierMaintenanceDialog .supplier-maintenance-generated-heading select { padding: 6px; border: 1px solid #cad7e8; border-radius: 6px; background: white; }
#supplierMaintenanceDialog .supplier-maintenance-directory-pager { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 36px; font-size: 12px; color: #64748b; }
#supplierMaintenanceDialog .supplier-maintenance-directory-pager > div { display: flex; gap: 6px; }
#supplierMaintenanceDialog .supplier-maintenance-directory-pager button { padding: 6px 9px; min-height: 30px; }
#supplierMaintenanceDialog .supplier-maintenance-directory-state { font-style: normal; color: #245ab1; }
#supplierMaintenanceDialog .supplier-maintenance-block-reason { color: #a65322; overflow-wrap: anywhere; }
#supplierMaintenanceDialog .supplier-maintenance-directory-return { margin-bottom: 12px; }
#supplierMaintenanceDialog .supplier-maintenance-picker-item { min-width: 0; height: auto; min-height: 64px; padding: 10px 14px; line-height: 1.5; }
#supplierMaintenanceDialog .supplier-maintenance-picker-item strong { overflow-wrap: anywhere; }

.payment-ocr-correction-editor{padding:12px;border:1px solid #bfdbfe;border-radius:10px;background:#f8fbff;margin-top:10px}.payment-ocr-correction-editor.hidden{display:none}.payment-ocr-correction-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.payment-ocr-correction-editor label{display:flex;flex-direction:column;gap:4px;font-size:12px;min-width:0}.payment-ocr-correction-editor input,.payment-ocr-correction-editor select{min-width:0;width:100%;box-sizing:border-box}.payment-ocr-correction-editor p{color:#b42318;font-size:12px}.payment-ocr-correction-editor small,[data-ocr-correction-audit]{font-size:12px}.payment-ocr-head{flex-wrap:wrap}@media(max-width:480px){.payment-ocr-correction-grid{grid-template-columns:minmax(0,1fr)}}


.follow-confirm-popover{position:fixed;z-index:3600;width:min(336px,calc(100vw - 20px));box-sizing:border-box;color:#26344b}.follow-confirm-popover.hidden{display:none!important}
.follow-confirm-popover[popover],dialog.follow-confirm-popover{inset:auto;margin:0;padding:0;border:0;height:auto;min-width:0;min-height:0;max-width:none;max-height:none;overflow:visible;transform:none;background:transparent;color:#26344b}
dialog.follow-confirm-popover::backdrop{background:transparent}
.follow-confirm-card{position:relative;z-index:1;width:100%;max-height:calc(100vh - 20px);overflow:auto;padding:14px;border:1px solid #d7dfeb;border-radius:12px;background:#fff;box-shadow:0 16px 42px rgba(27,42,72,.22);box-sizing:border-box}
.follow-confirm-popover::before{content:"";position:absolute;z-index:0;left:var(--follow-confirm-arrow-left,calc(100% - 30px));width:10px;height:10px;border:solid #d7dfeb;border-width:1px 0 0 1px;background:#fff;transform:translateX(-50%) rotate(45deg)}
.follow-confirm-popover[data-placement="below"]::before{top:-6px}.follow-confirm-popover[data-placement="above"]::before{bottom:-6px;transform:translateX(-50%) rotate(225deg)}
.follow-confirm-popover.is-centered::before{display:none}.follow-confirm-heading{display:flex;align-items:center;gap:10px}.follow-confirm-heading>div{display:grid;min-width:0;gap:1px}
.follow-confirm-heading small{color:#2d64c8;font-size:10px;font-weight:700}.follow-confirm-heading strong{overflow:hidden;color:#1f2d43;font-size:15px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.follow-confirm-icon{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;color:#2d64c8;background:#edf4ff;font-size:15px;font-weight:800}
.follow-confirm-popover.is-warning .follow-confirm-icon{color:#a96612;background:#fff5dc}.follow-confirm-popover.is-warning .follow-confirm-heading small{color:#9b620f}
.follow-confirm-popover.is-danger .follow-confirm-icon{color:#c83d3d;background:#fff0ef}.follow-confirm-popover.is-danger .follow-confirm-heading small{color:#c24141}
.follow-confirm-card>p{margin:10px 0;color:#44546b;font-size:12px;line-height:1.55;white-space:pre-line}.follow-confirm-detail{padding:7px 9px;border-radius:7px;background:#f7f9fc;color:#78879b;font-size:11px;line-height:1.45}
.follow-confirm-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:11px}.follow-confirm-actions button{min-width:74px;height:32px;padding:0 12px;border-radius:7px;font-size:12px}
.follow-confirm-submit{border-color:#245fc3;background:#245fc3;color:#fff}.follow-confirm-submit:hover{border-color:#194ca2;background:#194ca2}.follow-confirm-popover.is-warning .follow-confirm-submit{border-color:#c98520;background:#c98520}.follow-confirm-popover.is-warning .follow-confirm-submit:hover{border-color:#aa6b10;background:#aa6b10}.follow-confirm-popover.is-danger .follow-confirm-submit{border-color:#d94c4c;background:#d94c4c}.follow-confirm-popover.is-danger .follow-confirm-submit:hover{border-color:#bd3636;background:#bd3636}
@media(max-width:480px){.follow-confirm-popover{width:min(306px,calc(100vw - 16px))}.follow-confirm-card{padding:12px}.follow-confirm-actions button{flex:1}}


/*
 * Order Workbench visual shell.
 * This file intentionally contains presentation only. Existing element IDs,
 * JavaScript event handlers, APIs and data flows remain in the original app.
 */

:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --ink: #1f2733;
  --text: #1f2733;
  --muted: #697586;
  --line: #e4e9f1;
  --line-strong: #d5dce8;
  --blue: #3b5bdb;
  --primary: #3b5bdb;
  --blue-dark: #2f49b8;
  --blue-soft: #eef2ff;
  --teal: #0d9488;
  --teal-dark: #087d73;
  --teal-soft: #e6f6f4;
  --green: #16804b;
  --green-soft: #e9f7ee;
  --amber: #c47608;
  --amber-soft: #fdf3e5;
  --red: #d1433f;
  --red-soft: #fcecec;
  --sidebar: #ffffff;
  --sidebar-line: #e7ebf1;
  --wb-surface-2: #fafbfd;
  --wb-shadow: 0 1px 2px rgba(16, 24, 40, .035), 0 6px 18px rgba(16, 24, 40, .04);
  --wb-shadow-raised: 0 18px 48px rgba(23, 35, 55, .18);
}

/* 客户知识库 r335：知识维护、显式问询统计与高频问题在一个工作台内闭环。 */
#customerFaqs.customer-faq-view { min-width: 0; }
#customerFaqs .customer-faq-topbar { margin-bottom: 10px; }
#customerFaqs .customer-faq-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 10px;
  min-height: 0;
  margin-bottom: 10px;
}
#customerFaqs .customer-faq-summary > span {
  display: grid;
  gap: 3px;
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8faff);
  box-shadow: 0 5px 16px rgba(35, 61, 105, .06);
}
#customerFaqs .customer-faq-summary small { color: #78879d; font-size: 12px; }
#customerFaqs .customer-faq-summary strong { color: #174fae; font-size: 22px; line-height: 1; }
#customerFaqs .customer-faq-summary .is-warning { border-color: #f2d5a1; background: #fffaf0; }
#customerFaqs .customer-faq-summary .is-warning strong { color: #b66a08; }
#customerFaqs .customer-faq-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid #d8e1ef;
  border-radius: 11px;
  background: #edf2f9;
}
#customerFaqs .customer-faq-tabs button,
#customerFaqs .customer-faq-status-filters button {
  min-height: 34px;
  padding: 6px 15px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5a6b84;
  font-weight: 700;
  cursor: pointer;
}
#customerFaqs .customer-faq-tabs button.active,
#customerFaqs .customer-faq-status-filters button.active {
  background: #fff;
  color: #174fae;
  box-shadow: 0 3px 10px rgba(39, 70, 120, .13);
}
#customerFaqs .customer-faq-panel {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 9px 26px rgba(36, 63, 105, .07);
}
#customerFaqs .customer-faq-toolbar {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  padding: 14px;
  border-bottom: 0;
  background: #fff;
}
#customerFaqs .customer-faq-query-field { display: grid; gap: 6px; min-width: 0; }
#customerFaqs .customer-faq-query-field > span { color: #465872; font-size: 12px; font-weight: 800; }
#customerFaqs .customer-faq-query-field input { width: 100%; min-width: 0; height: 40px; }
#customerFaqs .customer-faq-search-state {
  min-height: 34px;
  padding: 7px 14px 9px;
  border-bottom: 1px solid #e2e8f1;
  color: #718096;
  background: #fbfcff;
  font-size: 12px;
}
#customerFaqs .customer-faq-insight-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f1;
  background: #fbfcff;
}
#customerFaqs .customer-faq-status-filters { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #edf2f9; }
#customerFaqs .customer-faq-insight-toolbar > span { color: #74839a; font-size: 12px; }
#customerFaqs .customer-faq-table-wrap {
  width: 100%;
  min-height: 400px;
  max-height: clamp(430px, 58vh, 690px);
  overflow: auto;
  scrollbar-gutter: stable;
  background: #fff;
}
#customerFaqs .customer-faq-table { width: 100%; min-width: 1120px; table-layout: fixed; border-collapse: collapse; }
#customerFaqs .customer-faq-table th,
#customerFaqs .customer-faq-table td { padding: 12px 13px; border-bottom: 1px solid #e6ebf2; text-align: left; vertical-align: top; }
#customerFaqs .customer-faq-table th { position: sticky; top: 0; z-index: 2; color: #4a5b73; background: #f4f7fb; box-shadow: inset 0 -1px #d8e1ed; font-size: 12px; }
#customerFaqs .customer-faq-table tbody tr:nth-child(even) { background: #fbfcfe; }
#customerFaqs .customer-faq-table tbody tr:hover { background: #f2f6fd; }
#customerFaqs .customer-faq-table tbody tr.is-disabled { opacity: .66; }
#customerFaqs .customer-faq-table th:nth-child(1) { width: 20%; }
#customerFaqs .customer-faq-table th:nth-child(2) { width: 34%; }
#customerFaqs .customer-faq-table th:nth-child(3) { width: 17%; }
#customerFaqs .customer-faq-table th:nth-child(4) { width: 9%; }
#customerFaqs .customer-faq-table th:nth-child(5) { width: 8%; }
#customerFaqs .customer-faq-table th:nth-child(6) { width: 12%; }
#customerFaqs .customer-faq-insight-table { min-width: 1160px; }
#customerFaqs .customer-faq-insight-table th:nth-child(1) { width: 6%; }
#customerFaqs .customer-faq-insight-table th:nth-child(2) { width: 31%; }
#customerFaqs .customer-faq-insight-table th:nth-child(3),
#customerFaqs .customer-faq-insight-table th:nth-child(4),
#customerFaqs .customer-faq-insight-table th:nth-child(5) { width: 8%; }
#customerFaqs .customer-faq-insight-table th:nth-child(6) { width: 13%; }
#customerFaqs .customer-faq-insight-table th:nth-child(7) { width: 10%; }
#customerFaqs .customer-faq-insight-table th:nth-child(8) { width: 16%; }
#customerFaqs .customer-faq-table td > strong { display: block; color: #26364d; line-height: 1.55; }
#customerFaqs .customer-faq-table td > small { display: block; margin-top: 4px; color: #8996a8; line-height: 1.45; }
#customerFaqs .customer-faq-answer { color: #526176; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
#customerFaqs .customer-faq-category,
#customerFaqs .customer-faq-state {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border: 1px solid #d4def0;
  border-radius: 999px;
  color: #315fae;
  background: #eef4ff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
#customerFaqs .customer-faq-state.on,
#customerFaqs .customer-faq-state.linked { border-color: #bfe6d5; color: #167455; background: #ebfaf3; }
#customerFaqs .customer-faq-state.pending { border-color: #f1d39c; color: #a86008; background: #fff8e8; }
#customerFaqs .customer-faq-state.off,
#customerFaqs .customer-faq-state.ignored { border-color: #d9dee6; color: #738096; background: #f3f5f8; }
#customerFaqs .customer-faq-aliases { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
#customerFaqs .customer-faq-aliases span,
#customerFaqs .customer-faq-aliases em { padding: 2px 6px; border-radius: 6px; color: #69788e; background: #f0f3f7; font-size: 11px; font-style: normal; }
#customerFaqs .customer-faq-count { color: #174fae !important; font-size: 18px; font-variant-numeric: tabular-nums; }
#customerFaqs .customer-faq-rank { display: inline-grid !important; width: 28px; height: 28px; place-items: center; border-radius: 9px; color: #fff !important; background: #315ee7; }
#customerFaqs .customer-faq-match-score { color: #258160 !important; }
#customerFaqs .customer-faq-actions { display: flex; flex-wrap: wrap; gap: 6px; white-space: normal; }
#customerFaqs .customer-faq-actions button { min-height: 30px; padding: 4px 9px; }
#customerFaqs .customer-faq-pager { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 8px 14px; border-top: 1px solid #dce4ef; color: #718096; background: #fff; }
#customerFaqs .customer-faq-pager > div { display: flex; gap: 6px; }
#customerFaqModal .customer-faq-modal-panel { width: min(720px, calc(100vw - 32px)); }
#customerFaqModal .customer-faq-form { gap: 15px; }
#customerFaqModal #customerFaqAnswer { min-height: 150px; }
#customerFaqModal #customerFaqAliases { min-height: 86px; }
#customerFaqModal .customer-faq-enabled { grid-template-columns: auto 1fr; align-items: center; column-gap: 9px; padding: 11px 12px; border: 1px solid #dbe4ef; border-radius: 10px; background: #f8faff; }
#customerFaqModal .customer-faq-enabled input { width: 18px; height: 18px; margin: 0; }
#customerFaqModal .customer-faq-enabled small { grid-column: 2; }
@media (max-width: 980px) {
  #customerFaqs .customer-faq-summary { grid-template-columns: repeat(3, minmax(118px, 1fr)); }
  #customerFaqs .customer-faq-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  #customerFaqs .customer-faq-toolbar #customerFaqClearBtn { grid-column: 2; }
}
@media (max-width: 640px) {
  #customerFaqs .customer-faq-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #customerFaqs .customer-faq-toolbar { grid-template-columns: 1fr; }
  #customerFaqs .customer-faq-toolbar #customerFaqClearBtn { grid-column: auto; }
  #customerFaqs .customer-faq-insight-toolbar { align-items: flex-start; flex-direction: column; }
  #customerFaqs .customer-faq-status-filters { width: 100%; overflow-x: auto; }
  #customerFaqs .customer-faq-status-filters button { flex: 0 0 auto; }
  #customerFaqs .customer-faq-pager { align-items: flex-start; flex-direction: column; gap: 8px; }
}

.supplier-link-toolbar{display:flex;align-items:end;justify-content:space-between;gap:14px;padding:14px;border:1px solid #dfe7f2;border-radius:12px;background:#f8fbff}.supplier-link-toolbar label{display:grid;gap:6px;color:#657187}.supplier-link-toolbar select{min-width:150px;padding:9px;border:1px solid #cfdaea;border-radius:9px;background:#fff}.supplier-link-section-title{display:flex;justify-content:space-between;margin:18px 2px 10px;color:#607089}.supplier-link-history{display:grid;gap:9px}.supplier-link-row{display:grid;grid-template-columns:72px minmax(220px,1fr) 120px auto;align-items:center;gap:14px;padding:13px 14px;border:1px solid #e0e7f1;border-radius:11px;background:#fff}.supplier-link-row>div{display:grid;gap:4px}.supplier-link-row small{color:#8190a5}.supplier-link-status{justify-self:start;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700}.supplier-link-status.active{color:#16804c;background:#e8f7ef}.supplier-link-status.disabled{color:#a35b00;background:#fff2dd}.supplier-link-status.expired,.supplier-link-status.archived{color:#68778e;background:#eef2f6}.supplier-link-usage{text-align:right}.supplier-link-actions{display:flex!important;grid-auto-flow:column;gap:7px!important}.supplier-link-actions button{padding:7px 10px}.supplier-link-log{margin-top:18px;border-top:1px solid #e4eaf2}.supplier-link-log h3{font-size:15px}.supplier-link-log p{display:grid;grid-template-columns:100px 1fr;gap:4px 12px;margin:0;padding:10px 2px;border-bottom:1px solid #edf1f5}.supplier-link-log p span,.supplier-link-log p small{color:#718096}.supplier-link-log p small{grid-column:2}
@media(max-width:760px){.supplier-link-toolbar{align-items:stretch;flex-direction:column}.supplier-link-row{grid-template-columns:70px 1fr}.supplier-link-usage{text-align:left}.supplier-link-actions{grid-column:1/-1;display:flex!important;flex-wrap:wrap}.supplier-link-log p{grid-template-columns:1fr}.supplier-link-log p small{grid-column:auto}}
.supplier-review-entry{display:inline-flex;align-items:center;gap:7px;padding:9px 12px;border:1px solid #f0c7a5;border-radius:9px;color:#9a4d13;background:#fff8f1;font-weight:700}.supplier-review-entry b,#supplierMaintenancePendingCountSupplier{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;color:#fff;background:#9aa6b6;font-size:11px}.supplier-review-entry.has-pending{border-color:#f29b5d;color:#b5480b;background:#fff2e8}.supplier-review-entry.has-pending b{background:#e85d16}
.product-export-review-stack{display:grid;align-self:stretch;grid-template-rows:1fr 1fr;gap:8px;min-width:150px}.product-export-review-stack>button{width:100%;min-height:42px;justify-content:center}.product-export-review-stack .supplier-review-entry{font-size:12px;padding:7px 9px}

/* Unified customer business portal */
.customer-portal .main {
  width: min(1480px, calc(100vw - 48px));
  padding-top: 0;
}

.customer-unified-header {
  display: grid;
  grid-template-columns: auto auto minmax(360px, 1fr) auto;
  align-items: center;
  gap: 30px;
  min-height: 76px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.customer-unified-header.single-business {
  grid-template-columns: auto minmax(360px, 1fr) auto;
}

.customer-unified-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-unified-brand > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #087f77;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
}

.customer-unified-brand strong,
.customer-unified-brand small {
  display: block;
}

.customer-unified-brand strong {
  color: #10233e;
  font-size: 20px;
}

.customer-unified-brand small {
  margin-top: 2px;
  color: #4aa69f;
  font-size: 10px;
  letter-spacing: .14em;
}

.customer-unified-header .customer-business-switch {
  display: flex;
  justify-self: start;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d4ddea;
  border-radius: 10px;
  background: #f7f9fc;
}

.customer-unified-header .customer-business-switch.hidden {
  display: none;
}

.customer-unified-header .customer-business-switch button {
  min-width: 142px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-right: 1px solid #d4ddea;
  border-radius: 0;
  background: transparent;
  color: #66758b;
  font-size: 15px;
  font-weight: 700;
  transition: color .2s ease, background .25s ease, box-shadow .2s ease;
}

.customer-unified-header .customer-business-switch button:last-child {
  border-right: 0;
}

.customer-unified-header .customer-business-switch button.active {
  background: linear-gradient(135deg, #14284a, #294b87);
  color: #ffffff;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.13);
}

.customer-unified-header .customer-business-switch button:not(.active):hover {
  background: linear-gradient(135deg, #e8efff, #d9f3f0);
  color: #0a716b;
  box-shadow: inset 0 0 0 1px rgba(13,148,136,.28);
}

.customer-unified-header .customer-business-switch button.active:hover {
  background: linear-gradient(135deg, #1a3560, #32756f);
}

.customer-header-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr));
  justify-self: stretch;
  max-width: 500px;
  margin-left: auto;
}

.customer-header-metrics .login-finance {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  min-width: 0;
  min-height: 0;
  column-gap: 4px;
  padding: 1px 22px;
  border: 0;
  border-left: 1px solid #dce4ee;
  border-radius: 0;
  background: transparent;
}

.customer-header-metrics .login-finance.hidden {
  display: none;
}

.customer-header-metrics small {
  grid-column: 1 / -1;
  margin-bottom: 3px;
  color: #718096;
  font-size: 10px;
}

.customer-header-metrics strong {
  color: #14284a !important;
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.customer-header-metrics em {
  color: #718096;
  font-size: 9px;
  font-style: normal;
}

.customer-unified-account {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}

.customer-unified-account > div {
  display: grid;
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid #e2e8f0;
}

.customer-unified-account .login-company {
  max-width: 310px;
  overflow: hidden;
  color: #17253b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-account-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.customer-unified-account .customer-certified-badge {
  position: static;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 20px;
  margin: 0;
  padding: 2px 7px;
  border: 1px solid #e8c66b;
  border-radius: 999px;
  background: #fff8df;
  color: #a66c00;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.customer-unified-account .customer-certified-badge.hidden {
  display: none;
}

.customer-unified-account span {
  margin-top: 3px;
  color: #718096;
  font-size: 11px;
}

.customer-unified-account b {
  font-family: "SF Mono", Menlo, Consolas, monospace;
}

.customer-unified-account .ghost {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
}

.customer-portal .customer-identity-hero {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  padding: 6px 22px;
  border-radius: 15px;
}

.customer-portal .customer-portal-title {
  padding-right: 54%;
}

.customer-portal .customer-portal-title strong {
  font-size: 18px;
}

.customer-portal .customer-portal-title > div > span {
  margin-top: 2px;
  font-size: 11px;
}

.customer-portal .portal-identity-stats {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 24px;
  width: 48%;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  transform: translateY(-50%);
}

.customer-portal .portal-identity-stats > span {
  min-width: 170px;
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,.18);
}

.customer-portal .portal-identity-stats strong {
  font-size: 20px;
}

.customer-portal .customer-identity-hero .customer-certified-badge {
  top: 6px;
  right: 10px;
  padding-top: 3px;
  padding-bottom: 3px;
}

@media (max-width: 900px) {
  .customer-portal .main {
    width: calc(100vw - 28px);
  }
  .customer-unified-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 0;
  }
  .customer-unified-header .customer-business-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }
  .customer-unified-header .customer-business-switch button {
    flex: 1;
  }
  .customer-header-metrics {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .customer-header-metrics .login-finance:first-child {
    padding-left: 0;
    border-left: 0;
  }
  .customer-unified-account > div {
    display: none;
  }
  .customer-portal .customer-identity-hero {
    min-height: 210px;
  }
  .customer-portal .customer-portal-title {
    padding-right: 0;
  }
  .customer-portal .portal-identity-stats {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    justify-content: flex-start;
    margin-top: 28px;
    transform: none;
  }
  .customer-portal .portal-identity-stats > span {
    min-width: 0;
    padding: 0 16px;
  }
  .customer-portal .portal-identity-stats > span:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* Independent railway marketplace selection library. */
.railway-products-view { width: 100%; min-width: 0; min-height: 560px; max-width: 100%; overflow: hidden; }
#railwayProducts.railway-products-view { min-width: 0; min-height: 560px; }
.railway-topbar { align-items: center; }
.railway-topbar > div { min-width: 0; }
.railway-topbar .top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; flex-wrap: wrap; }
.railway-button { border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font-weight: 700; cursor: pointer; }
.railway-button-teal { color: #087d73; background: #e6f6f4; border-color: #a7ded8; }
.railway-summary { display: flex; align-items: center; gap: 7px; margin: 0 4px 0 0; }
.railway-summary button { display: grid; grid-template-columns: auto auto; align-items: center; gap: 7px; min-width: 105px; min-height: 42px; padding: 7px 11px; border: 1px solid #bfd0f2; border-radius: 10px; background: #edf3ff; color: #536783; cursor: pointer; box-shadow: none; }
.railway-summary button:nth-child(2) { min-width: 145px; border-color: #f0c4c2; background: #fff0ef; }
.railway-summary button:nth-child(3) { min-width: 82px; border-color: #efd2a1; background: #fff6e5; }
.railway-summary strong { font-size: 18px; line-height: 1; color: #294b9b; }
.railway-summary span { font-size: 12px; font-weight: 700; white-space: nowrap; }
.railway-summary button:nth-child(2) strong { color: #d1433f; }
.railway-summary button:nth-child(3) strong { color: #c47608; }
.railway-summary button:hover { filter: brightness(.97); transform: translateY(-1px); }
.railway-toolbar { display: grid; grid-template-columns: auto auto minmax(200px, 1fr) auto auto auto auto auto; align-items: center; gap: 10px; width: 100%; min-width: 0; max-width: 100%; padding: 14px; margin-bottom: 12px; }
.railway-selection-compact { color: #657187; font-size: 12px; white-space: nowrap; }
.railway-selection-compact strong { color: #243a70; font-size: 15px; font-variant-numeric: tabular-nums; }
#railwaySelectAllBtn { min-width: 62px; }
.railway-toolbar input, .railway-toolbar select, .railway-import-body textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; padding: 11px 12px; color: var(--ink); }
.railway-toolbar .railway-price-range { display: flex; align-items: center; gap: 6px; margin: 0; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.railway-toolbar .railway-price-range input { width: 86px; min-width: 0; padding: 11px 8px; }
.railway-toolbar .railway-price-range i { font-style: normal; }
@media (min-width: 761px) and (max-width: 1280px) {
  #railwayProducts .railway-toolbar { display: flex; flex-wrap: wrap; }
  #railwayProducts #railwayKeyword { flex: 1 1 320px; width: auto; min-width: 200px; }
}
.railway-batch-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 12px; }
.railway-batch-bar small { margin-left: auto; color: var(--muted); }
.railway-view-switch { display: inline-flex; flex: 0 0 auto; overflow: hidden; border: 1px solid #c9d5eb; border-radius: 9px; background: #fff; }
.railway-view-switch button { min-width: 96px; padding: 8px 12px; border: 0; border-right: 1px solid #dbe2ee; border-radius: 0; background: #fff; color: #5b6880; font-weight: 700; cursor: pointer; }
.railway-view-switch button:last-child { border-right: 0; }
.railway-view-switch button.active { background: #3d5fe0; color: #fff; }
.railway-column-picker { position: relative; z-index: 22; }
.railway-column-picker .product-column-menu { right: 0; width: 310px; }
.railway-column-picker.hidden { display: none; }
.railway-table-wrap { width: 100%; min-width: 0; max-width: 100%; height: var(--railway-content-height, calc(100vh - 385px)); min-height: 260px; flex: 0 0 auto; overflow: auto; margin-bottom: 0; overscroll-behavior: contain; }
.railway-products-view > .railway-table-wrap,
.railway-products-view > .railway-card-grid { margin-bottom: 0 !important; }
.railway-table { width: max(100%, var(--railway-table-live-width, 1450px)); min-width: 0; border-collapse: collapse; table-layout: fixed; }
.railway-table th { position: sticky; top: 0; z-index: 2; background: #f6f8fc; color: #5b6880; text-align: left; white-space: nowrap; }
.railway-table th, .railway-table td { padding: 9px clamp(5px, .55vw, 10px); border-bottom: 1px solid var(--line); vertical-align: middle; }
.railway-table th, .railway-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.railway-table .railway-product-link-cell,
.railway-table .railway-product-note-cell,
.railway-table .railway-listing-cell,
.railway-table .railway-actions {
  overflow: visible;
  text-align: center;
}
.railway-table .railway-updated-cell {
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
}
.railway-table th { user-select: none; }
.railway-column-resizer {
  position: absolute;
  top: 5px;
  right: -4px;
  bottom: 5px;
  z-index: 5;
  width: 9px;
  border-radius: 5px;
  cursor: col-resize;
  touch-action: none;
}
.railway-column-resizer::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 4px;
  bottom: 3px;
  width: 1px;
  background: #cfd5df;
  transition: width .15s ease, background .15s ease;
}
.railway-table th:hover .railway-column-resizer::after,
.railway-column-resizer:hover::after {
  width: 2px;
  background: #5d6878;
}
body.railway-column-resizing,
body.railway-column-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}
.railway-pagination { position: relative; z-index: 5; display: flex; min-height: 50px; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; padding: 9px 12px; color: #68758a; background: #fff; font-size: 12px; }
.railway-pagination > div { display: flex; align-items: center; gap: 8px; }
.railway-pagination select { height: 32px; border: 1px solid #d4ddea; border-radius: 7px; background: #fff; padding: 0 28px 0 9px; color: #334155; }
.railway-page-buttons { justify-content: flex-end; }
.railway-page-buttons button { min-width: 34px; height: 32px; padding: 0 9px; border: 1px solid #d4ddea; border-radius: 7px; background: #fff; color: #526178; cursor: pointer; }
.railway-page-buttons button.active { border-color: #3d5fe0; background: #3d5fe0; color: #fff; }
.railway-page-buttons button:disabled { opacity: .45; cursor: not-allowed; }
.railway-pagination-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.railway-page-jump { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.railway-page-jump input { width: 58px; height: 32px; padding: 0 7px; border: 1px solid #d4ddea; border-radius: 7px; color: #334155; text-align: center; }
#railwayPageJumpBtn { min-width: 48px; height: 32px; padding: 0 10px; }
@media (max-width: 900px) {
  #railwayProducts.railway-products-view {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }
  #railwayProducts .railway-table-wrap {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  #railwayProducts .railway-table {
    width: max(100%, var(--railway-table-live-width, 980px));
  }
  #railwayProducts .railway-topbar {
    min-width: 0;
    align-items: stretch;
    flex-wrap: wrap;
  }
  #railwayProducts .railway-topbar > div:first-child,
  #railwayProducts .railway-topbar .top-actions {
    width: 100%;
  }
  #railwayProducts .railway-topbar .top-actions {
    justify-content: flex-start;
  }
  #railwayProducts .railway-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 0;
  }
  #railwayProducts .railway-summary button {
    width: 100%;
    min-width: 0;
  }
  #railwayProducts .railway-topbar .top-actions > :not(.railway-summary) {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
  }
  #railwayProducts .railway-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }
  #railwayProducts #railwayKeyword,
  #railwayProducts .railway-price-range {
    grid-column: 1 / -1;
  }
  #railwayProducts .railway-price-range input { flex: 1 1 0; width: 0; }
  #railwayProducts .railway-view-switch,
  #railwayProducts .railway-column-picker,
  #railwayProducts .railway-column-picker > button {
    width: 100%;
  }
  #railwayProducts .railway-view-switch button {
    min-width: 0;
    flex: 1 1 50%;
  }
  #railwayProducts .railway-pagination {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  #railwayProducts .railway-pagination-controls {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }
}
/* Compact deterministic widths keep the 16-column product row inside its own scroller. */
.railway-table { min-width: 0; }
.railway-table th:nth-child(1),.railway-table td:nth-child(1){width:36px}
.railway-table th:nth-child(2),.railway-table td:nth-child(2){width:48px}
.railway-table th:nth-child(3),.railway-table td:nth-child(3){width:112px}
.railway-table th:nth-child(4),.railway-table td:nth-child(4){width:72px}
.railway-table th:nth-child(5),.railway-table td:nth-child(5){width:230px}
.railway-table th:nth-child(6),.railway-table td:nth-child(6){width:110px}
.railway-table th:nth-child(7),.railway-table td:nth-child(7){width:76px}
.railway-table th:nth-child(8),.railway-table td:nth-child(8){width:76px}
.railway-table th:nth-child(9),.railway-table td:nth-child(9){width:82px}
.railway-table th:nth-child(10),.railway-table td:nth-child(10){width:180px}
.railway-table th:nth-child(11),.railway-table td:nth-child(11){width:125px}
.railway-table th:nth-child(12),.railway-table td:nth-child(12){width:58px}
.railway-table th:nth-child(13),.railway-table td:nth-child(13){width:58px}
.railway-table th:nth-child(14),.railway-table td:nth-child(14){width:72px}
.railway-table th:nth-child(15),.railway-table td:nth-child(15){width:125px}
.railway-table th:nth-child(16),.railway-table td:nth-child(16){width:90px}
.railway-inline-edit-row td { min-width: 0 !important; padding: 8px 5px; overflow: hidden !important; }
.railway-inline-edit-row input,.railway-inline-edit-row select { display: block; max-width: 100%; min-width: 0 !important; box-sizing: border-box; padding: 7px 5px; }
.railway-inline-edit-row .railway-actions { overflow: visible !important; }
.railway-inline-edit-row .railway-actions button { display: block; width: 100%; margin: 2px 0; padding: 5px 3px; font-size: 11px; }
.railway-inline-hint { display: block; overflow: hidden; font-size: 10px; text-overflow: ellipsis; }
.railway-table th:first-child, .railway-table td:first-child { width: 38px; min-width: 38px; padding-left: 10px; padding-right: 6px; text-align: center; }
.railway-table th:nth-child(2), .railway-table td:nth-child(2) { width: 52px; }
.railway-table th:nth-child(3), .railway-table td:nth-child(3) { width: clamp(100px, 8vw, 138px); }
.railway-table th:nth-child(4), .railway-table td:nth-child(4) { width: clamp(66px, 5vw, 96px); }
.railway-table th:nth-child(5), .railway-table td:nth-child(5) { width: clamp(220px, 22vw, 420px); }
.railway-table th:nth-child(6), .railway-table td:nth-child(6) { width: clamp(95px, 9vw, 160px); }
.railway-table th:nth-child(7), .railway-table td:nth-child(7) { width: clamp(68px, 6vw, 105px); }
.railway-table th:nth-child(8), .railway-table td:nth-child(8) { width: clamp(82px, 7vw, 115px); }
.railway-table th:nth-child(9), .railway-table td:nth-child(9) { width: clamp(150px, 15vw, 285px); }
.railway-table th:nth-child(10), .railway-table td:nth-child(10),
.railway-table th:nth-child(11), .railway-table td:nth-child(11) { width: 58px; text-align: center; overflow: visible; }
.railway-table th:nth-child(12), .railway-table td:nth-child(12) { width: 82px; text-align: center; }
.railway-table th:nth-child(13), .railway-table td:nth-child(13) { width: clamp(116px, 9vw, 155px); }
.railway-table th:nth-child(14), .railway-table td:nth-child(14) { width: 72px; text-align: center; overflow: visible; }
.railway-table #railwaySelectAll, .railway-table .railway-row-check {
  display: inline-block;
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  accent-color: #3b5bdb;
  cursor: pointer;
}
.railway-data-row { cursor: pointer; transition: background-color .15s ease; }
.railway-data-row:hover td { background: #f4f7ff; }
.railway-title-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.railway-table td.railway-company-cell {
  min-width: 0;
  overflow: hidden !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.railway-inline-edit-row td.railway-company-editor-cell {
  min-width: 0 !important;
  overflow: hidden !important;
}
.railway-inline-edit-row .railway-company-directory-select,
.railway-inline-edit-row .railway-listing-status-select {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 36px;
  padding-right: 34px !important;
  padding-left: 14px !important;
  line-height: normal;
  text-indent: 0;
}

.railway-product-import-guide {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe5f3;
  border-radius: 14px;
  background: #f7faff;
}
.railway-product-import-file {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #9eb8ee;
  border-radius: 10px;
  background: #fff;
  color: #2456b8;
  font-weight: 700;
  cursor: pointer;
}
.railway-product-import-file input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
#railwayImportFilename { flex: 1; min-width: 0; color: #71819c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.railway-product-import-summary { display: flex; gap: 9px; flex-wrap: wrap; margin: 12px 0; }
.railway-product-import-summary button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef3fb;
  color: #42526b;
  box-shadow: none;
  font-weight: 700;
  cursor: pointer;
}
.railway-product-import-summary button strong { font-variant-numeric: tabular-nums; }
.railway-product-import-summary button.active { border-color: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent); }
.railway-product-import-summary button:disabled { cursor: default; opacity: .42; }
.railway-product-import-summary .is-all { background: #eef3fb; color: #425f93; }
.railway-product-import-summary .is-created { background: #e9f8f1; color: #087a4b; }
.railway-product-import-summary .is-price-up { background: #fff0ef; color: #c63b32; }
.railway-product-import-summary .is-price-down { background: #e8f8f5; color: #087b6b; }
.railway-product-import-summary .is-info-changed { background: #edf3ff; color: #2456b8; }
.railway-product-import-summary .is-unchanged { background: #f1f3f6; color: #6f7b8d; }
.railway-product-import-summary .is-error { background: #fff0ef; color: #c63b32; }
.railway-product-import-table-wrap { max-height: min(48vh, 520px); overflow: auto; border: 1px solid #dbe5f3; border-radius: 12px; }
.railway-product-import-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1080px; }
.railway-product-import-table th { position: sticky; top: 0; z-index: 2; padding: 10px 12px; background: #f2f6fc; color: #52627a; text-align: left; }
.railway-product-import-table td { padding: 10px 12px; border-top: 1px solid #e8eef7; vertical-align: top; }
.railway-product-import-table tr.is-error td { background: #fff8f7; }
.railway-product-import-table tr.is-unchanged td { background: #f8fafc; color: #788496; }
.railway-product-import-table tr.is-price-up td { background: #fffafa; }
.railway-product-import-table tr.is-price-down td { background: #f8fcfb; }
.railway-product-import-table .railway-import-preview-row { cursor: pointer; }
.railway-product-import-table .railway-import-preview-row:hover td,
.railway-product-import-table .railway-import-preview-row.is-expanded td { box-shadow: inset 0 0 0 999px rgba(47, 95, 194, .035); }
.railway-import-comparison-row td { padding: 0 12px 12px !important; background: #f7faff !important; }
.railway-import-comparison {
  padding: 12px;
  border: 1px solid #cfdcf3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(42, 70, 117, .08);
}
.railway-import-comparison-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: #223b63; }
.railway-import-comparison-head span { color: #8290a6; font-size: 12px; }
.railway-import-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(390px, 1fr)); gap: 8px; }
.railway-import-comparison-item { display: grid; grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; padding: 7px 9px; border: 1px solid #e1e8f3; border-radius: 8px; background: #fbfcff; }
.railway-import-comparison-item.is-changed { border-color: #bfd0f6; background: #f3f7ff; }
.railway-import-comparison-label { color: #52627a; font-weight: 700; }
.railway-import-comparison-item > span:not(.railway-import-comparison-label) { display: grid; gap: 1px; min-width: 0; }
.railway-import-comparison-item small { color: #8a97aa; font-size: 10px; }
.railway-import-comparison-item strong { overflow: hidden; color: #263954; text-overflow: ellipsis; white-space: nowrap; }
.railway-import-comparison-item em { padding: 3px 7px; border-radius: 999px; background: #edf1f6; color: #66758b; font-size: 11px; font-style: normal; white-space: nowrap; }
.railway-import-comparison-item em.is-new { background: #e9f8f1; color: #087a4b; }
.railway-import-comparison-item em.is-changed { background: #edf3ff; color: #2456b8; }
.railway-import-action, .railway-import-valid { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: #e9f8f1; color: #087a4b; white-space: nowrap; }
.railway-import-action.is-price_up { background: #fff0ef; color: #c63b32; }
.railway-import-action.is-price_down { background: #e8f8f5; color: #087b6b; }
.railway-import-action.is-info_changed { background: #edf3ff; color: #2456b8; }
.railway-import-action.is-unchanged { background: #eef1f5; color: #687487; }
.railway-import-action.is-error { background: #fff0ef; color: #c63b32; }
.railway-import-change-cell { min-width: 110px; }
.railway-import-change-cell strong, .railway-import-price-change strong { white-space: nowrap; }
.railway-import-old-value { color: #8995a8; text-decoration: line-through; white-space: nowrap; }
.railway-import-system-empty { color: #8995a8; white-space: nowrap; }
.railway-import-arrow { margin: 0 6px; color: #9aa5b6; }
.railway-import-price-change { min-width: 142px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.railway-import-delta { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; font-weight: 800; font-variant-numeric: tabular-nums; }
.railway-import-delta.is-created { background: #e9f8f1; color: #087a4b; }
.railway-import-delta.is-price-up { background: #fff0ef; color: #c63b32; }
.railway-import-delta.is-price-down { background: #e8f8f5; color: #087b6b; }
.railway-import-delta.is-info-changed { max-width: 170px; overflow: hidden; background: #edf3ff; color: #2456b8; text-overflow: ellipsis; }
.railway-import-delta small { font-size: 11px; }
.railway-import-delta-stack { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.railway-import-skipped { display: inline-flex; padding: 3px 9px; border-radius: 999px; background: #eef1f5; color: #687487; white-space: nowrap; }
.railway-import-error { color: #c63b32; line-height: 1.45; }
.railway-import-action-stack { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.railway-product-import-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  color: #71809a;
  font-size: 13px;
}
.railway-product-import-pagination > div { display: flex; align-items: center; gap: 9px; }
.railway-product-import-pagination button { min-width: 70px; min-height: 32px; padding: 5px 11px; }
.railway-product-import-pagination strong,
#railwayImportPageStatus { color: #31445f; font-variant-numeric: tabular-nums; font-weight: 800; }
.railway-inline-edit-row td.railway-listing-editor-cell {
  min-width: 0 !important;
  overflow: hidden !important;
}
.railway-inline-edit-row .railway-listing-status-select {
  padding-right: 26px !important;
  padding-left: 12px !important;
}
.railway-price { overflow: visible !important; color: #e14b42; font-size: 14px; font-weight: 800; text-overflow: clip !important; white-space: nowrap; }
.railway-table td.railway-dropship-price { overflow: visible !important; color: #176b55; font-weight: 800; text-overflow: clip !important; white-space: nowrap; }
.railway-dropship-price-content { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; white-space: nowrap; }
.railway-dropship-price .supply-status-badge { margin-left: 6px; vertical-align: middle; }
.railway-dropship-price-content .supply-status-badge { flex: 0 0 auto; margin-left: 0; }
.railway-profit { color: #16804b; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.railway-profit.negative { color: #d1433f; }
.railway-tag { display: inline-block; min-width: 58px; padding: 5px 9px; border-radius: 999px; background: #eef1f6; text-align: center; white-space: nowrap; font-size: 13px; }
.railway-tag.success { color: #16804b; background: #e9f7ee; }
.railway-tag.warning { color: #a86100; background: #fdf3e5; }
.railway-tag.danger { color: #d1433f; background: #fcecec; }
.railway-actions { white-space: nowrap; }
.railway-actions button { padding: 6px 9px; margin-right: 5px; }
.railway-empty { height: 240px; text-align: center; color: var(--muted); }
.railway-modal-panel { width: min(780px, calc(100vw - 40px)); }
#railwayImportModal { z-index: 1200; }
#railwayImportModal .railway-modal-panel {
  display: flex;
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 24px);
  flex-direction: column;
}
#railwayImportModal .railway-modal-panel.is-positioned { position: fixed; margin: 0; }
#railwayImportModal .railway-modal-panel.is-dragging { box-shadow: 0 24px 70px rgba(16, 37, 70, .34); }
#railwayImportModal [data-railway-import-drag-handle] { flex: 0 0 auto; cursor: grab; touch-action: none; user-select: none; }
#railwayImportModal .railway-modal-panel.is-dragging [data-railway-import-drag-handle] { cursor: grabbing; }
#railwayImportModal .railway-import-body {
  grid-template-rows: auto auto auto minmax(160px, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
}
#railwayImportModal .railway-product-import-table-wrap { min-height: 160px; max-height: none; }
@media (max-width: 768px) {
  #railwayImportModal { padding: 10px; }
  #railwayImportModal .railway-modal-panel,
  #railwayImportModal .railway-modal-panel.is-positioned {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  #railwayImportModal [data-railway-import-drag-handle] { cursor: default; touch-action: auto; }
  #railwayImportModal .railway-import-body {
    gap: 10px;
    padding: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .railway-product-import-summary { gap: 6px; margin: 6px 0; }
  .railway-product-import-summary button { min-height: 32px; padding: 5px 10px; }
  .railway-product-import-pagination { align-items: flex-start; flex-direction: column; gap: 7px; }
  .railway-product-import-pagination > div { align-self: flex-end; }
  .railway-import-comparison-grid { grid-template-columns: 1fr; }
  .railway-import-comparison-item { grid-template-columns: 72px minmax(90px, 1fr) minmax(90px, 1fr) auto; }
}
.railway-inline-edit-row td { background: #f2f6ff; border-top: 2px solid #7292f5; border-bottom: 0; }
.railway-inline-edit-row input, .railway-inline-edit-row select { width: 100%; min-width: 0; border: 1px solid #aebff1; border-radius: 7px; background: #fff; padding: 8px 7px; color: var(--ink); }
.railway-inline-edit-row td:nth-child(5) input { min-width: 0; }
.railway-inline-edit-row td { border-bottom: 2px solid #7292f5; }
.railway-inline-edit-row td:nth-child(10) input, .railway-inline-edit-row td:nth-child(11) input { min-width: 0; }
.railway-edit-marker { display: inline-block; color: #3157cf; font-size: 12px; font-weight: 800; writing-mode: vertical-rl; }
.railway-inline-hint { color: #76839a; font-size: 12px; white-space: nowrap; }
.railway-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; border: 1px solid #dbe2ee; background: #fff; }
.railway-image-upload img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid #dbe2ee; background: #fff; }
.railway-thumb:not([src]), .railway-image-upload img:not([src]) { visibility: hidden; }
.railway-image-error { visibility: visible !important; color: #c6423d; font-size: 10px; }
.railway-no-image { color: #a0aabd; font-size: 12px; white-space: nowrap; }
.railway-direct-image-upload { position: relative; display: grid; place-items: center; width: 36px; min-height: 34px; border-radius: 7px; cursor: pointer; }
.railway-direct-image-upload:hover { background: #eef3ff; }
.railway-direct-image-upload input { position: absolute; inset: 0; width: 100% !important; height: 100% !important; min-width: 0 !important; margin: 0; opacity: 0; cursor: pointer; }
.railway-image-hover-preview { position: fixed; left: 0; top: 0; z-index: 3000; display: none; width: 224px; height: 224px; padding: 7px; border: 1px solid #ccd6e8; border-radius: 13px; background: #fff; box-shadow: 0 16px 42px rgba(30, 48, 84, .24); pointer-events: none; }
.railway-image-hover-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; background: #f7f8fb; }
.railway-image-hover-preview.show { display: block; }
.railway-image-upload { position: relative; display: grid; place-items: center; width: 50px; height: 50px; border: 1px dashed #89a3ef; border-radius: 8px; color: #3157cf; background: #fff; cursor: pointer; overflow: hidden; }
.railway-image-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-width: 0 !important; }
.railway-link-editor { position: relative; display: inline-flex; }
.railway-link-icon { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #b8c8f4; border-radius: 8px; background: #f3f6ff; color: #3157cf; cursor: pointer; font-size: 14px; }
.railway-link-popover { position: fixed; top: var(--railway-link-top, 12px); right: auto; bottom: auto; left: var(--railway-link-left, 12px); z-index: 80; display: none; width: 330px; padding: 12px; border: 1px solid #cfd8e8; border-radius: 11px; background: #fff; box-shadow: 0 14px 36px rgba(30, 48, 84, .2); }
.railway-link-editor:hover .railway-link-popover, .railway-link-editor:focus-within .railway-link-popover { display: grid; gap: 9px; }
.railway-link-popover::after { content: ""; position: absolute; top: auto; right: 9px; bottom: 100%; left: auto; border: 7px solid transparent; border-bottom-color: #fff; }
.railway-link-editor.is-open-up .railway-link-popover::after { top: 100%; bottom: auto; border-top-color: #fff; border-bottom-color: transparent; }
.railway-link-popover input { width: 100%; border: 1px solid #b9c6de; border-radius: 7px; padding: 8px; }
.railway-link-popover > div { display: flex; align-items: center; gap: 8px; }
.railway-link-popover button, .railway-link-popover a { padding: 6px 10px; font-size: 12px; text-decoration: none; }
.railway-note-editor { position: relative; display: inline-flex; }
.railway-note-icon { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #d4dbe8; border-radius: 8px; background: #f7f8fb; filter: grayscale(1); opacity: .65; cursor: pointer; font-size: 14px; }
.railway-note-icon.has-note { border-color: #e8bd72; background: #fff7e8; filter: none; opacity: 1; }
.railway-note-popover { position: fixed; top: var(--railway-note-top, 12px); right: auto; bottom: auto; left: var(--railway-note-left, 12px); z-index: 80; display: none; width: 320px; padding: 12px; border: 1px solid #cfd8e8; border-radius: 11px; background: #fff; box-shadow: 0 14px 36px rgba(30, 48, 84, .2); }
.railway-note-editor:hover .railway-note-popover, .railway-note-editor:focus-within .railway-note-popover { display: grid; gap: 9px; }
.railway-note-popover::after { content: ""; position: absolute; top: auto; right: 9px; bottom: 100%; left: auto; border: 7px solid transparent; border-bottom-color: #fff; }
.railway-note-editor.is-open-up .railway-note-popover::after { top: 100%; bottom: auto; border-top-color: #fff; border-bottom-color: transparent; }
.railway-note-popover textarea { width: 100%; min-height: 90px; resize: vertical; border: 1px solid #b9c6de; border-radius: 7px; padding: 8px; font: inherit; color: var(--ink); }
.railway-note-popover > div { display: flex; gap: 8px; }
.railway-note-popover button { padding: 6px 10px; font-size: 12px; }
.railway-card-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 12px; width: 100%; min-width: 0; max-width: 100%; height: var(--railway-content-height, calc(100vh - 385px)); min-height: 260px; flex: 0 0 auto; overflow: auto; margin-bottom: 0; padding: 2px 2px 10px; }
.railway-card-grid.hidden { display: none; }
.railway-product-card { position: relative; display: flex; min-width: 0; min-height: 300px; flex-direction: column; overflow: visible; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; box-shadow: 0 7px 18px rgba(26, 36, 55, .08); transition: transform .18s ease, box-shadow .18s ease; }
.railway-product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(26, 36, 55, .14); }
.railway-card-topline { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 7px 13px 0; }
.railway-card-topline time { color: #7b879b; font-size: 10px; font-variant-numeric: tabular-nums; }
.railway-card-image { position: relative; display: flex; height: 142px; align-items: center; justify-content: center; overflow: hidden; margin: -5px 12px 0; padding: 5px; border-radius: 6px; background: #fff; }
.railway-card-image img { display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; object-position: center center; padding: 0; transform: none; }
.railway-card-image .railway-no-image { font-size: 14px; }
.railway-card-brand { max-width: 65%; overflow: hidden; color: #e20d19; font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; font-size: 16px; font-weight: 800; letter-spacing: .15px; line-height: 1.2; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(179, 9, 20, .1); white-space: nowrap; }
.railway-card-content { display: flex; min-height: 140px; flex: 1; flex-direction: column; padding: 5px 13px 9px; }
.railway-card-company { display: grid; gap: 1px; margin-bottom: 5px; overflow: hidden; }
.railway-card-company strong { overflow: hidden; color: #182237; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.railway-card-company a { overflow: hidden; color: #182237; font-size: 12px; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.railway-card-company a:hover { color: #174ea6; text-decoration: underline; text-underline-offset: 3px; }
.railway-card-company small { color: #9aa4b5; font-size: 9px; }
.railway-card-primary-code { display: grid; min-width: 0; gap: 0; margin-bottom: 4px; overflow: hidden; }
.railway-card-code-line { display: flex; min-width: 0; align-items: center; gap: 4px; }
.railway-card-primary-code strong { min-width: 0; overflow: hidden; color: #182237; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.railway-card-primary-code small { flex: 0 0 auto; color: #9aa4b5; font-size: 9px; white-space: nowrap; }
.railway-card-primary-code em { margin-top: 1px; color: #a0a9b8; font-size: 8px; font-style: normal; letter-spacing: .15px; }
.railway-card-code-copy { display: inline-grid !important; width: 17px !important; min-width: 17px !important; height: 17px !important; min-height: 17px !important; flex: 0 0 17px; place-items: center; padding: 0 !important; border: 1px solid #d8dee9 !important; border-radius: 4px !important; color: #6f7d91 !important; background: #f8fafc !important; box-shadow: none !important; cursor: pointer; }
.railway-card-code-copy svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.railway-card-code-copy:hover { border-color: #aebbd0 !important; color: #234e9b !important; background: #eef4ff !important; }
.railway-card-commerce-row { display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin-bottom: 4px; }
.railway-card-price { display: flex; align-items: baseline; margin: 0; color: #ff4b45; font-size: 19px; font-weight: 900; letter-spacing: -.3px; }
.railway-card-price small { margin-right: 2px; font-size: 10px; font-weight: 700; }
.railway-card-train { display: inline-flex; width: 16px; height: 16px; align-self: center; margin-right: 3px; color: #f13c3c; filter: drop-shadow(0 1px 1px rgba(180, 20, 20, .12)); }
.railway-card-train svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.55; }
.railway-card-train .train-body { fill: #fff2f1; }
.railway-card-train .train-window { fill: #f13c3c; stroke-width: 1.35; }
.railway-card-train .train-roof,
.railway-card-train .train-detail { stroke-width: 1.7; }
.railway-card-badges { display: flex; gap: 7px; }
.railway-commerce-badge { padding: 5px 8px; border: 1px solid #ff9a96; border-radius: 6px; color: #fa514c; background: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.railway-commerce-badge.off { border-color: #cfd5df; color: #7b8492; background: #f5f6f8; }
.railway-card-title { display: -webkit-box; min-height: 34px; margin: 0 0 5px; overflow: hidden; color: #182237; font-size: 14px; font-weight: 850; line-height: 1.28; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.railway-card-title span { display: inline-block; margin-left: 5px; padding: 2px 5px; border-radius: 4px; color: #fff; background: #ff513c; font-size: 9px; font-weight: 700; vertical-align: 2px; }
.railway-card-meta { display: grid; gap: 2px; margin-top: auto; color: #778398; font-size: 10px; }
.railway-card-meta div { display: flex; min-width: 0; align-items: center; gap: 5px; }
.railway-card-meta b { min-width: 0; overflow: hidden; color: #657087; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.railway-card-meta .railway-card-dropship { color: #176b55; font-weight: 800; }
.railway-card-profit-label { margin-left: auto; }
.railway-card-meta .railway-card-profit { color: #d56a12; font-weight: 800; }
.railway-card-meta .railway-card-profit.negative { color: #d64545; }
.railway-card-company-footer { display: flex; min-width: 0; align-items: center; gap: 3px; margin-top: 4px; padding-top: 5px; border-top: 1px solid #e8ebf0; }
.railway-card-company-footer > span { flex: 0 0 auto; color: #9aa4b5; font-size: 9px; white-space: nowrap; }
.railway-card-company-footer strong,
.railway-card-company-footer a { color: #7b8595; font-size: 9px; font-weight: 600; }
.railway-card-company-footer strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.railway-card-company-footer .railway-card-company-link { display: inline-grid; width: 18px; min-width: 18px; height: 18px; flex: 0 0 18px; place-items: center; margin-left: 2px; border: 1px solid #8fd8ce; border-radius: 5px; color: #087f73; background: #e5faf6; box-shadow: 0 2px 6px rgba(8, 127, 115, .14); }
.railway-card-company-link svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.railway-card-company-footer .railway-card-company-link:hover { border-color: #0c9487; color: #fff; background: linear-gradient(135deg, #10a99a, #08766e); box-shadow: 0 4px 10px rgba(8, 127, 115, .28); transform: translateY(-1px); }
.railway-card-company-footer button.railway-card-company-link { padding: 0; cursor: pointer; }
.railway-card-company-footer .railway-card-company-link.missing { border-color: #f1bd6c; color: #b66b00; background: #fff5df; box-shadow: 0 2px 6px rgba(182, 107, 0, .12); }
.railway-card-company-footer .railway-card-company-link.missing:hover { border-color: #d98509; color: #fff; background: linear-gradient(135deg, #f4aa32, #d57900); box-shadow: 0 4px 10px rgba(182, 107, 0, .25); }
.railway-card-actions { display: grid; grid-template-columns: 1fr; gap: 6px; margin-top: 7px; }
.railway-card-actions .railway-link-editor, .railway-card-actions .railway-note-editor { display: flex; }
.railway-card-actions .railway-link-icon, .railway-card-actions .railway-note-icon { width: 100%; height: 32px; border-color: #e1e5ec; background: #fafbfc; filter: none; opacity: 1; color: #647084; font-size: 11px; }
.railway-card-actions .railway-link-icon::after { content: " 商品链接"; }
.railway-card-actions .railway-note-icon::after { content: " 备注"; }
@media (max-width: 1600px) { .railway-card-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1350px) { .railway-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1050px) { .railway-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .railway-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .railway-card-grid { grid-template-columns: 1fr; } }

/* Admin catalogue: grow with the result container (including browser zoom),
   keep cards readable, and stop at 12 columns / 96 cards per eight-row page.
   auto-fill keeps the same page capacity on a partially filled final page. */
#railwayProducts #railwayCardGrid {
  grid-template-columns: repeat(auto-fill, minmax(max(min(100%, 240px), calc((100% - 132px) / 12)), 1fr));
}

/* Keep the title readable when the actions no longer fit beside it. */
@media (min-width: 761px) {
  #railwayProducts .railway-topbar { flex-wrap: wrap; gap: 12px; }
  #railwayProducts .railway-topbar > div:first-child { flex: 1 1 240px; min-width: min(240px, 100%); }
  #railwayProducts .railway-topbar .top-actions { flex: 1 1 800px; flex-wrap: wrap; }
}

/* 客户查单端 · 国铁选品（与管理端共用商品卡视觉） */
.customer-railway-products-view { min-width: 0; padding-top: 10px; }
.customer-railway-filter {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-color: #dfe5ed;
  background: #fff;
}
.customer-railway-filter-main {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(250px, .58fr) minmax(250px, .58fr) 140px auto auto auto;
  gap: 8px;
  align-items: center;
}
.customer-railway-filter-main > input,
.customer-railway-filter-main > select,
.customer-railway-range {
  height: 42px;
  min-width: 0;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  background: #fbfcfe;
}
.customer-railway-filter-main > input,
.customer-railway-filter-main > select { padding: 0 12px; }
.customer-railway-range { display: flex; align-items: center; overflow: hidden; }
.customer-railway-range > span { flex: 0 0 auto; padding-left: 11px; color: #536178; font-size: 12px; font-weight: 750; }
.customer-railway-range > input { width: 72px; min-width: 0; height: 100%; padding: 0 5px; border: 0; outline: 0; background: transparent; font-size: 12px; }
.customer-railway-range > i { color: #a0a9b8; font-size: 11px; font-style: normal; }
.customer-railway-order { display: grid; grid-template-columns: 1fr 1fr; height: 42px; overflow: hidden; border: 1px solid #d8e0eb; border-radius: 9px; background: #f7f9fc; }
.customer-railway-order button { min-width: 62px; padding: 0 9px; border: 0; border-radius: 0; color: #647087; background: transparent; box-shadow: none; font-size: 12px; }
.customer-railway-order button.active { color: #fff; background: linear-gradient(135deg, #173966, #087f73); }
.customer-railway-own-shop-filter {
  min-width: 112px;
  height: 42px;
  padding: 0 13px;
  border: 1px solid #54b8ae;
  border-radius: 9px;
  color: #087f73;
  background: #f0fbf9;
  box-shadow: none;
  white-space: nowrap;
  font-weight: 750;
}
.customer-railway-own-shop-filter:hover,
.customer-railway-own-shop-filter.active {
  border-color: #087f73;
  color: #fff;
  background: linear-gradient(135deg, #0b8f82, #087168);
}
.customer-railway-filter-summary { display: flex; align-items: center; justify-content: space-between; padding-top: 7px; border-top: 1px solid #edf0f4; color: #637087; font-size: 12px; }
.customer-railway-filter-summary span { color: #17243a; font-weight: 750; }
.customer-railway-filter-summary em { color: #8a95a7; font-style: normal; }
.customer-railway-card-grid { align-items: stretch; padding: 0 0 12px; }
.customer-railway-card { cursor: default; }
.customer-railway-card .railway-card-company-footer strong { flex: 1; }
.customer-railway-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding: 10px 13px;
  color: #647087;
  font-size: 12px;
}
.customer-railway-pager > div { display: flex; align-items: center; gap: 6px; }
.customer-railway-pager label { display: flex; align-items: center; gap: 5px; }
.customer-railway-pager input { width: 50px; height: 34px; padding: 0 6px; text-align: center; }
.customer-railway-page-numbers { display: flex; gap: 4px; }
.customer-railway-page-numbers button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d8e0eb;
  border-radius: 7px;
  color: #506078;
  background: #fff;
  box-shadow: none;
}
.customer-railway-page-numbers button.active { border-color: #173d72; color: #fff; background: #173d72; }
@media (max-width: 1500px) {
  .customer-railway-filter-main { grid-template-columns: minmax(260px, 1fr) minmax(230px, .7fr) minmax(230px, .7fr) 130px auto; }
  .customer-railway-filter-main > .primary,
  .customer-railway-filter-main > .ghost { min-width: 70px; }
}
@media (max-width: 1100px) {
  .customer-railway-filter-main { grid-template-columns: 1fr 1fr; }
  .customer-railway-filter-main > input:first-child { grid-column: 1 / -1; }
}

/* Supplier maintenance review: bounded, server-paged workspace for large catalogs. */
#products.supplier-review-mode > :not(.topbar):not(.product-workspace-tabs):not(#supplierReviewWorkspace) { display: none !important; }
.supplier-review-workspace { display: grid; gap: 14px; }
.supplier-confirmation-document { display: grid; gap: 12px; }
.supplier-confirmation-document textarea { width: 100%; min-height: 460px; padding: 18px; border: 1px solid #cad5e3; border-radius: 10px; background: #fffdf8; color: #172b4d; line-height: 1.7; resize: vertical; }
.supplier-confirmation-document > div { display: flex; justify-content: flex-end; gap: 10px; }
.supplier-review-data-changes { min-width: 240px; }
.supplier-review-data-changes span { display: block; margin: 3px 0; color: #526278; font-size: 12px; }
.supplier-review-data-changes b { display: inline-block; min-width: 66px; color: #173664; }
.supplier-review-workspace.hidden, .supplier-review-workspace .hidden { display: none !important; }
.supplier-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; background: #fff; border: 1px solid #dbe4ef; border-radius: 12px; }
.supplier-review-heading h2 { margin: 0; color: #172b4d; font-size: 22px; }
.supplier-review-heading p { margin: 5px 0 0; color: #718198; }
.supplier-review-heading > div:last-child { display: flex; align-items: center; gap: 10px; }
.supplier-review-stats { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
#supplierReviewDetailStats { grid-template-columns: repeat(8, minmax(90px, 1fr)); }
.supplier-review-stats > div { padding: 13px 16px; background: #f7f9fc; border: 1px solid #dbe4ef; border-radius: 10px; }
.supplier-review-stats span { display: block; color: #75849a; font-size: 13px; }
.supplier-review-stats strong { display: block; margin-top: 4px; color: #173664; font-size: 23px; }
.supplier-review-filters { display: grid; grid-template-columns: 180px minmax(260px, 1fr) auto; gap: 10px; margin-bottom: 12px; }
.supplier-review-filters select, .supplier-review-filters input { height: 42px; padding: 0 12px; background: #fff; border: 1px solid #cdd8e6; border-radius: 8px; }
.supplier-review-table-wrap { overflow: auto; max-height: calc(100vh - 410px); background: #fff; border: 1px solid #dbe4ef; border-radius: 12px; }
.supplier-review-table-wrap table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.supplier-review-table-wrap th, .supplier-review-table-wrap td { padding: 11px 12px; border-bottom: 1px solid #e8edf4; text-align: left; vertical-align: middle; }
.supplier-review-table-wrap th { position: sticky; top: 0; z-index: 1; background: #f1f5fa; color: #43536b; white-space: nowrap; }
.supplier-review-table-wrap td small { display: block; margin-top: 4px; color: #8290a3; }
.supplier-review-pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px; color: #6f7e92; }
.supplier-review-pager > div { display: flex; gap: 8px; }
.supplier-risk-pill, .supplier-review-status { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #eef2f7; color: #607088; font-size: 12px; font-weight: 700; white-space: nowrap; }
.supplier-risk-pill.active, .risk-up { color: #d95c22; }
.supplier-risk-pill.active { background: #fff0e8; }
.risk-down { color: #148b59; }
.supplier-review-status.status-待审核 { background: #fff2dd; color: #b76900; }
.supplier-review-status.status-已通过 { background: #e8f7ef; color: #14834d; }
.supplier-review-status.status-已驳回 { background: #feebeb; color: #c23e3e; }
.supplier-review-empty { padding: 42px !important; text-align: center !important; color: #8794a6; }
.product-workspace-tabs b { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: #fff0df; color: #b86500; font-size: 12px; }
@media (max-width: 1100px) { .supplier-review-stats, #supplierReviewDetailStats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .customer-railway-filter-main { grid-template-columns: 1fr; }
  .customer-railway-filter-main > input:first-child { grid-column: auto; }
  .customer-railway-filter-summary, .customer-railway-pager { align-items: flex-start; flex-direction: column; gap: 8px; }
  .customer-railway-pager > div { flex-wrap: wrap; }
}
.railway-table th:nth-child(7), .railway-table td:nth-child(7) { width: 88px; }
.railway-table th:nth-child(8), .railway-table td:nth-child(8) { width: clamp(68px, 6vw, 105px); }
.railway-table th:nth-child(9), .railway-table td:nth-child(9) { width: clamp(82px, 7vw, 115px); }
.railway-table th:nth-child(10), .railway-table td:nth-child(10) { width: clamp(150px, 15vw, 285px); text-align: left; overflow: hidden; }
.railway-table th:nth-child(11), .railway-table td:nth-child(11),
.railway-table th:nth-child(12), .railway-table td:nth-child(12) { width: 58px; text-align: center; overflow: visible; }
.railway-table th:nth-child(13), .railway-table td:nth-child(13) { width: 82px; text-align: center; }
.railway-table th:nth-child(14), .railway-table td:nth-child(14) { width: clamp(116px, 9vw, 155px); text-align: left; overflow: hidden; }
.railway-table th:nth-child(15), .railway-table td:nth-child(15) { width: 72px; text-align: center; overflow: visible; }
.railway-import-body { display: grid; gap: 14px; padding: 20px; }
.railway-import-body p { margin: 0; color: var(--muted); }
.railway-import-body textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }

.railway-shop-directory-panel {
  width: min(1080px, calc(100vw - 40px));
  max-height: calc(100vh - 36px);
  margin-top: 0;
  border: 1px solid #c9d4e5;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(16, 37, 70, .28);
}
.railway-shop-directory-heading { display: grid !important; gap: 2px !important; justify-content: start !important; }
.railway-shop-directory-heading strong { color: #10294e; font-size: 20px; }
.railway-shop-directory-heading small { color: #7a879b; }
.railway-shop-directory-body {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 110px);
  padding: 18px;
  overflow: auto;
  background: #f5f7fa;
}
.railway-shop-directory-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto auto;
  gap: 10px;
}
.railway-shop-directory-toolbar input,
.railway-shop-directory-editor input,
.railway-shop-directory-editor select,
.railway-shop-directory-editor textarea,
.railway-shop-directory-import textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e3;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: #17243a;
}
.railway-shop-directory-editor,
.railway-shop-directory-import {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 15px;
  border: 1px solid #cad6e7;
  border-radius: 13px;
  background: #fff;
}
.railway-shop-directory-editor.hidden,
.railway-shop-directory-import.hidden { display: none; }
.railway-shop-directory-editor label { display: grid; gap: 6px; color: #52647f; font-weight: 700; }
.railway-shop-directory-editor em { color: #d43f3a; font-style: normal; }
.railway-shop-directory-editor .hidden { display: none; }
.railway-shop-field-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
}
.railway-shop-field-title small { color: #7b899c; font-size: 12px; font-weight: 500; }
.railway-shop-field-title strong { color: #173d72; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.railway-shop-directory-invoice { grid-column: 1 / -1; }
.railway-shop-directory-editor .actions,
.railway-shop-directory-import .actions { grid-column: 1 / -1; display: flex; gap: 9px; }
.railway-shop-directory-import { grid-template-columns: 1fr; }
.railway-shop-directory-import p { margin: 0; color: #6f7d92; }
.railway-shop-import-guide { display: flex; align-items: baseline; gap: 14px; color: #6f7d92; }
.railway-shop-import-guide strong { color: #132c50; font-size: 16px; white-space: nowrap; }
.railway-shop-import-summary { display: flex; align-items: center; gap: 18px; color: #65758d; }
.railway-shop-import-summary .is-valid strong { color: #15805f; }
.railway-shop-import-summary .is-error strong { color: #d33f3f; }
.railway-shop-import-summary button { margin-left: auto; }
.railway-shop-import-summary button.active { border-color: #e49b9b; background: #fff2f2; color: #bd3030; }
.railway-shop-import-paste { padding: 12px 15px; border: 1px dashed #9eacc0; border-radius: 10px; background: #f8fafc; color: #66758b; text-align: center; cursor: text; }
.railway-shop-import-paste:focus { outline: 2px solid rgba(54, 89, 230, .22); border-color: #3659e6; background: #fff; }
.railway-shop-import-grid-wrap { max-height: 390px; overflow: auto; border: 1px solid #d9e1ec; border-radius: 12px; background: #fff; }
.railway-shop-import-grid { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.railway-shop-import-grid th { position: sticky; top: 0; z-index: 2; padding: 10px 12px; border-bottom: 1px solid #d9e1ec; background: #f4f6f9; color: #53627a; text-align: left; }
.railway-shop-import-grid th small { display: inline-block; margin-right: 6px; color: #3659e6; }
.railway-shop-import-grid th.row-number, .railway-shop-import-grid td.row-number { width: 64px; text-align: center; }
.railway-shop-import-grid th:nth-child(4) { width: 250px; }
.railway-shop-import-grid th:last-child { width: 82px; }
.railway-shop-import-grid td { padding: 6px 8px; border-bottom: 1px solid #edf0f4; color: #33435b; }
.railway-shop-import-grid td.row-number { position: sticky; left: 0; background: #f8fafc; color: #78869a; font-variant-numeric: tabular-nums; }
.railway-shop-import-grid input { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #17243a; }
.railway-shop-import-grid input:focus { outline: none; border-color: #92a8ef; background: #fff; }
.railway-shop-import-grid tr.has-error td { background: #fff8f8; }
.railway-shop-import-grid tr.has-error td.row-number { background: #ffeded; color: #c43131; font-weight: 800; }
.railway-shop-import-grid tr.has-error input { border-color: #efb5b5; background: #fff; }
.railway-shop-import-grid .validation { font-size: 13px; }
.railway-shop-import-grid .error-mark, .railway-shop-import-grid .valid-mark { display: inline-flex; margin-right: 7px; padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.railway-shop-import-grid .error-mark { background: #ffe3e3; color: #c43131; }
.railway-shop-import-grid .valid-mark { background: #e3f5ec; color: #167253; }
.railway-shop-import-empty { height: 150px; color: #8794a8; text-align: center; }
.railway-shop-directory-table-wrap {
  overflow: auto;
  border: 1px solid #d6deea;
  border-radius: 13px;
  background: #fff;
}
.railway-shop-directory-table { width: 100%; min-width: 1260px; border-collapse: collapse; table-layout: fixed; }
.railway-shop-directory-table th,
.railway-shop-directory-table td { padding: 11px 12px; border-bottom: 1px solid #e5eaf1; text-align: left; vertical-align: middle; }
.railway-shop-directory-table th { color: #52647f; background: #f1f4f8; font-size: 13px; }
.railway-shop-directory-table th:nth-child(1) { width: 15%; }
.railway-shop-directory-table th:nth-child(2) { width: 20%; }
.railway-shop-directory-table th:nth-child(3) { width: 16%; }
.railway-shop-directory-table th:nth-child(4) { width: 9%; }
.railway-shop-directory-table th:nth-child(5) { width: 15%; }
.railway-shop-directory-table th:nth-child(6) { width: 10%; }
.railway-shop-directory-table th:nth-child(7) { width: 15%; }
.railway-shop-directory-table td small { display: block; margin-top: 4px; color: #8290a3; }
.railway-shop-role { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #315b86; background: #e8f0fa; font-weight: 800; }
.railway-shop-role.is-main { color: #075f55; background: #dff5ef; }
.railway-shop-rating { display: inline-flex; min-width: 48px; justify-content: center; padding: 5px 9px; border-radius: 999px; font-weight: 800; color: #35506f; background: #eef2f7; }
.railway-shop-rating.rating-aaa { color: #8a5700; background: #fff1c9; }
.railway-shop-rating.rating-aa { color: #176044; background: #dff5e9; }
.railway-shop-rating.rating-a { color: #174b8a; background: #e3edff; }
.railway-shop-rating.rating-b { color: #6b4b16; background: #f7eddc; }
.railway-shop-rating.rating-c { color: #9f3333; background: #fbe5e5; }
.railway-shop-directory-invoice-cell { color: #637187; white-space: pre-line; overflow-wrap: anywhere; }
.railway-shop-directory-actions { white-space: nowrap; }
.railway-shop-directory-actions button { padding: 6px 9px; }
.railway-shop-directory-empty { height: 150px; color: #8a96a8; text-align: center !important; }
.railway-shop-directory-footer { color: #728096; text-align: right; }
.railway-shop-customer-binding-panel { width: min(720px, calc(100vw - 36px)); border-radius: 16px; }
.railway-shop-customer-binding-body { display: grid; gap: 14px; padding: 18px; }
.railway-shop-customer-binding-body > input[type="search"] {
  width: 100%; border: 1px solid #cbd5e3; border-radius: 10px; padding: 11px 13px;
}
.railway-shop-customer-binding-list {
  display: grid; gap: 8px; max-height: min(460px, 55vh); padding: 4px; overflow: auto;
}
.railway-shop-customer-binding-list label {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border: 1px solid #dbe2ec; border-radius: 10px; background: #fff; cursor: pointer;
}
.railway-shop-customer-binding-list label:has(input:checked) { border-color: #72cbbf; background: #effaf8; }
.railway-shop-customer-binding-list input { width: 18px; height: 18px; }
.railway-shop-customer-binding-list span { display: grid; gap: 3px; }
.railway-shop-customer-binding-list small { color: #7a879b; }
.railway-shop-customer-binding-body .actions { display: flex; align-items: center; gap: 12px; color: #718098; }
@media (max-width: 820px) {
  .railway-shop-directory-toolbar { grid-template-columns: 1fr 1fr; }
  .railway-shop-directory-toolbar input { grid-column: 1 / -1; }
  .railway-shop-directory-editor { grid-template-columns: 1fr; }
  .railway-shop-directory-invoice { grid-column: auto; }
  .railway-shop-directory-table { min-width: 820px; }
}

/* Customer portal: independent teal technology login screen. */
#customer.portal-locked > .customer-tech-login { display: flex !important; }
#customer.portal-locked > .topbar { display: none !important; }
#customer:not(.portal-locked) > .customer-tech-login { display: none !important; }
.customer-portal #customer > .customer-tech-login { margin: 0 !important; }
#customer .customer-login-card .customer-login-button {
  border-color: transparent;
  color: #032521;
  background: linear-gradient(100deg, #2adac2, #24e5d8);
  box-shadow: 0 9px 28px rgba(30, 218, 188, .3), inset 0 1px rgba(255,255,255,.35);
}

/* Keep the standalone supplier login visible under the legacy portal lock rule. */
#supplierPortal.portal-locked > .supplier-tech-login { display: flex !important; }
#supplierPortal.portal-locked > .topbar { display: none !important; }
#supplierPortal:not(.portal-locked) > .supplier-tech-login { display: none !important; }
.supplier-portal #supplierPortal > .supplier-tech-login { margin: 0 !important; }
#supplierPortal .supplier-login-card .supplier-login-button {
  border-color: transparent;
  color: #2b1900;
  background: linear-gradient(100deg, #ffbb35, #ff946b);
  box-shadow: 0 9px 28px rgba(239,157,27,.34), inset 0 1px rgba(255,255,255,.35);
}

/* Customer funds smart sorting and pagination. No extra data columns. */
#funds .funds-customer-toolbar { flex-wrap: wrap; }
#funds .funds-smart-sort {
  padding: 5px 9px;
  border: 1px solid #cbdcff;
  border-radius: 6px;
  color: #2f63cf;
  background: #f4f7ff;
  font-weight: 650;
  white-space: nowrap;
}
#funds .funds-customer-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
#funds .funds-customer-page-size select { width: 82px; height: 30px; padding: 0 8px; }
#funds .finance-customers-wrap { height: clamp(360px, 52vh, 620px); max-height: none; }
.funds-customer-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.funds-customer-pager > div { display: flex; align-items: center; gap: 6px; }
.funds-customer-pager button { min-width: 34px; height: 30px; padding: 0 10px; }
@media (max-width: 760px) {
  #funds .funds-customer-page-size { margin-left: 0; }
  .funds-customer-pager { align-items: flex-start; flex-direction: column; }
  .funds-customer-pager > div { flex-wrap: wrap; }
}

/* Supplier portal: independent amber-gold technology login screen. */
#supplierPortal.portal-locked > .supplier-tech-login { display: flex !important; }
#supplierPortal.portal-locked > .topbar { display: none !important; }
#supplierPortal:not(.portal-locked) > .supplier-tech-login { display: none !important; }
.supplier-portal #supplierPortal > .supplier-tech-login { margin: 0 !important; }
.supplier-tech-login { position:fixed; inset:0; z-index:1000; align-items:center; justify-content:center; min-height:100vh; overflow:hidden; color:#fff2d0; background:radial-gradient(circle at 12% 24%,rgba(172,82,0,.48),transparent 32%),radial-gradient(circle at 89% 14%,rgba(93,36,184,.48),transparent 34%),radial-gradient(circle at 82% 94%,rgba(152,14,61,.34),transparent 39%),linear-gradient(116deg,#120b02 0%,#0b0805 47%,#19091c 100%); }
.supplier-tech-login::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.2; background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(255,181,35,.14) 3px 4px); }
.supplier-login-grid { position:absolute; left:-8%; right:-8%; bottom:-31%; height:72%; opacity:.43; transform:perspective(360px) rotateX(61deg); transform-origin:center bottom; background-image:linear-gradient(rgba(237,164,20,.36) 1px,transparent 1px),linear-gradient(90deg,rgba(237,164,20,.31) 1px,transparent 1px); background-size:72px 46px; mask-image:linear-gradient(to bottom,transparent 0,#000 24%,#000 88%,transparent 100%); }
.supplier-login-network { position:absolute; width:34vw; height:34vw; min-width:360px; min-height:360px; opacity:.55; background:radial-gradient(circle at 9% 20%,#ffb71f 0 2px,transparent 3px),radial-gradient(circle at 26% 47%,#ffb71f 0 2px,transparent 3px),radial-gradient(circle at 53% 16%,#ffb71f 0 2px,transparent 3px),radial-gradient(circle at 76% 35%,#ffb71f 0 2px,transparent 3px),radial-gradient(circle at 88% 71%,#ffb71f 0 2px,transparent 3px),linear-gradient(31deg,transparent 41%,rgba(244,171,28,.34) 42% 42.5%,transparent 43%),linear-gradient(143deg,transparent 48%,rgba(244,171,28,.28) 49% 49.5%,transparent 50%); filter:drop-shadow(0 0 7px rgba(255,177,25,.43)); pointer-events:none; }
.supplier-network-left { left:-3%; top:-6%; transform:rotate(-8deg); } .supplier-network-right { right:-4%; top:23%; transform:rotate(164deg); }
.supplier-login-brandbar { position:absolute; top:clamp(24px,4.2vh,58px); left:clamp(24px,3.8vw,72px); right:clamp(24px,4vw,78px); display:flex; align-items:flex-start; justify-content:space-between; z-index:2; }
.supplier-login-brand { display:flex; align-items:center; gap:14px; }
.supplier-login-brandmark { display:grid; place-items:center; width:62px; height:62px; border:1px solid rgba(255,195,70,.58); border-radius:17px; color:#291700; background:linear-gradient(145deg,#ffc342,#f4a713); box-shadow:0 0 25px rgba(244,166,19,.42),inset 0 1px rgba(255,255,255,.45); font-size:30px; font-weight:900; }
.supplier-login-brand strong { display:block; font-size:24px; letter-spacing:.03em; text-shadow:0 0 13px rgba(255,197,82,.34); }
.supplier-login-brand small { display:block; margin-top:3px; color:#e4b554; font:13px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.34em; }
.supplier-login-online { display:flex; align-items:center; gap:10px; margin-top:12px; color:#e1b557; font-size:14px; letter-spacing:.06em; }
.supplier-login-online i { width:9px; height:9px; border-radius:50%; background:#ffb51d; box-shadow:0 0 12px #ffb51d; } .supplier-login-online span { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.2em; } .supplier-login-online em { font-style:normal; }
.supplier-login-card { position:relative; width:min(510px,calc(100vw - 32px)); margin-top:2vh; padding:54px 50px 46px; border:1px solid rgba(240,168,26,.38); border-radius:2px; color:#fff1cb; background:linear-gradient(145deg,rgba(30,17,3,.96),rgba(19,11,4,.93)); box-shadow:0 28px 80px rgba(12,5,0,.66),inset 0 0 34px rgba(235,158,15,.06); z-index:3; }
.supplier-tech-corner { position:absolute; width:28px; height:28px; border-color:#efad1c; filter:drop-shadow(0 0 5px rgba(239,173,28,.8)); }
.supplier-corner-tl { left:-3px; top:-3px; border-left:3px solid; border-top:3px solid; border-radius:9px 0 0; } .supplier-corner-tr { right:-3px; top:-3px; border-right:3px solid; border-top:3px solid; border-radius:0 9px 0 0; } .supplier-corner-bl { left:-3px; bottom:-3px; border-left:3px solid; border-bottom:3px solid; border-radius:0 0 0 9px; } .supplier-corner-br { right:-3px; bottom:-3px; border-right:3px solid; border-bottom:3px solid; border-radius:0 0 9px; }
.supplier-login-console { margin-bottom:20px; color:#efad1c; font:13px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.38em; }
.supplier-login-card h1 { margin:0; color:#fff1cb; font-size:38px; line-height:1.2; letter-spacing:.04em; }
.supplier-login-card > p { margin:11px 0 35px; color:#c5a669; font-size:16px; letter-spacing:.05em; }
.supplier-login-field { display:block; margin-top:20px; color:#c5a669; font-size:14px; letter-spacing:.08em; }
.supplier-login-input { position:relative; display:block; margin-top:9px; }
.supplier-login-input input { width:100%; height:56px; margin:0; padding:0 18px 0 52px; border:2px solid rgba(220,148,14,.72); border-radius:13px; outline:none; color:#4b2d00; -webkit-text-fill-color:#4b2d00; caret-color:#4b2d00; background:#fff8e7; box-shadow:inset 0 0 18px rgba(169,100,8,.06),0 0 18px rgba(220,148,14,.12); font-size:18px; font-weight:700; }
.supplier-login-input input:focus { border-color:#f1ae1c; box-shadow:0 0 0 3px rgba(241,174,28,.12),0 0 22px rgba(241,174,28,.15); } .supplier-login-input input::placeholder { color:#796440; }
.supplier-login-input input:-webkit-autofill,
.supplier-login-input input:-webkit-autofill:hover,
.supplier-login-input input:-webkit-autofill:focus {
  color:#4b2d00 !important;
  -webkit-text-fill-color:#4b2d00 !important;
  caret-color:#4b2d00 !important;
  background:#fff8e7 !important;
  border-color:rgba(220,148,14,.78) !important;
  box-shadow:0 0 0 1000px #fff8e7 inset,0 0 0 3px rgba(241,174,28,.1) !important;
  font-weight:700 !important;
  transition:background-color 9999s ease-out 0s;
}
.supplier-account-icon,.supplier-password-icon { position:absolute; left:20px; top:50%; z-index:1; transform:translateY(-50%); }
.supplier-account-icon { width:15px; height:15px; border-radius:50% 50% 42% 42%; background:#168bd1; box-shadow:0 8px 0 3px #168bd1; transform:translateY(-67%) scale(.72); }
.supplier-password-icon { width:14px; height:13px; border:2px solid #c9a934; border-radius:3px; } .supplier-password-icon::before { content:""; position:absolute; left:2px; top:-10px; width:6px; height:8px; border:2px solid #c9a934; border-bottom:0; border-radius:6px 6px 0 0; }
.supplier-login-assist { display:flex; justify-content:space-between; align-items:center; margin:18px 0 25px; color:#e6a914; font-size:13px; }
.supplier-login-assist label { display:inline-flex; align-items:center; gap:7px; color:#c7aa71; cursor:pointer; } .supplier-login-assist input { width:16px; height:16px; margin:0; accent-color:#f1ad1c; }
#supplierPortal .supplier-login-card .supplier-login-button { width:100%; height:60px; margin:0; border:0; border-radius:13px; color:#2b1900; background:linear-gradient(100deg,#ffbb35,#ff946b); box-shadow:0 9px 28px rgba(239,157,27,.34),inset 0 1px rgba(255,255,255,.35); font-size:18px; font-weight:800; letter-spacing:.26em; }
.supplier-login-button:hover { transform:translateY(-1px); filter:brightness(1.07); } .supplier-login-button:active { transform:translateY(1px); }
.supplier-login-footer { position:absolute; bottom:24px; left:0; right:0; color:#91722f; text-align:center; font:12px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.08em; z-index:2; } .supplier-login-footer b { margin:0 9px; }
@media (max-width:720px) { .supplier-login-brandbar { top:18px; left:18px; right:18px; } .supplier-login-brandmark { width:48px; height:48px; border-radius:13px; font-size:24px; } .supplier-login-brand strong { font-size:17px; } .supplier-login-brand small { font-size:9px; letter-spacing:.2em; } .supplier-login-online { display:none; } .supplier-login-card { margin-top:45px; padding:38px 26px 32px; } .supplier-login-card h1 { font-size:31px; } .supplier-login-card > p { margin-bottom:25px; font-size:14px; } .supplier-login-assist { align-items:flex-start; gap:12px; font-size:12px; } .supplier-login-footer { bottom:12px; font-size:10px; } }

.customer-tech-login {
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  color: #ddfff9;
  background:
    radial-gradient(circle at 12% 28%, rgba(0, 135, 102, .38), transparent 31%),
    radial-gradient(circle at 90% 18%, rgba(0, 116, 148, .34), transparent 34%),
    radial-gradient(circle at 83% 94%, rgba(0, 108, 119, .3), transparent 39%),
    linear-gradient(116deg, #020f10 0%, #020d10 47%, #03151a 100%);
}
.customer-tech-login::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.2; background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(49,224,196,.14) 3px 4px); }
.customer-login-grid { position:absolute; left:-8%; right:-8%; bottom:-31%; height:72%; opacity:.43; transform:perspective(360px) rotateX(61deg); transform-origin:center bottom; background-image:linear-gradient(rgba(25,210,180,.35) 1px,transparent 1px),linear-gradient(90deg,rgba(25,210,180,.31) 1px,transparent 1px); background-size:72px 46px; mask-image:linear-gradient(to bottom,transparent 0,#000 24%,#000 88%,transparent 100%); }
.customer-login-network { position:absolute; width:34vw; height:34vw; min-width:360px; min-height:360px; opacity:.55; background:radial-gradient(circle at 9% 20%,#25e7ca 0 2px,transparent 3px),radial-gradient(circle at 26% 47%,#25e7ca 0 2px,transparent 3px),radial-gradient(circle at 53% 16%,#25e7ca 0 2px,transparent 3px),radial-gradient(circle at 76% 35%,#25e7ca 0 2px,transparent 3px),radial-gradient(circle at 88% 71%,#25e7ca 0 2px,transparent 3px),linear-gradient(31deg,transparent 41%,rgba(25,210,180,.33) 42% 42.5%,transparent 43%),linear-gradient(143deg,transparent 48%,rgba(25,210,180,.28) 49% 49.5%,transparent 50%); filter:drop-shadow(0 0 7px rgba(34,228,196,.45)); pointer-events:none; }
.customer-network-left { left:-3%; top:-6%; transform:rotate(-8deg); } .customer-network-right { right:-4%; top:23%; transform:rotate(164deg); }
.customer-login-brandbar { position:absolute; top:clamp(24px,4.2vh,58px); left:clamp(24px,3.8vw,72px); right:clamp(24px,4vw,78px); display:flex; align-items:flex-start; justify-content:space-between; z-index:2; }
.customer-login-brand { display:flex; align-items:center; gap:14px; }
.customer-login-brandmark { display:grid; place-items:center; width:62px; height:62px; border:1px solid rgba(89,242,218,.55); border-radius:17px; color:#042522; background:linear-gradient(145deg,#3de2cc,#11bca9); box-shadow:0 0 25px rgba(24,218,188,.4),inset 0 1px rgba(255,255,255,.45); font-size:30px; font-weight:900; }
.customer-login-brand strong { display:block; font-size:24px; letter-spacing:.03em; text-shadow:0 0 13px rgba(62,235,207,.35); }
.customer-login-brand small { display:block; margin-top:3px; color:#77d8c9; font:13px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.34em; }
.customer-login-online { display:flex; align-items:center; gap:10px; margin-top:12px; color:#6ed7ca; font-size:14px; letter-spacing:.06em; }
.customer-login-online i { width:9px; height:9px; border-radius:50%; background:#29e1c7; box-shadow:0 0 12px #29e1c7; } .customer-login-online span { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.2em; } .customer-login-online em { font-style:normal; }
.customer-login-card { position:relative; width:min(510px,calc(100vw - 32px)); margin-top:2vh; padding:54px 50px 46px; border:1px solid rgba(35,214,184,.34); border-radius:2px; color:#e2fff9; background:linear-gradient(145deg,rgba(2,25,25,.95),rgba(2,17,20,.92)); box-shadow:0 28px 80px rgba(0,10,10,.65),inset 0 0 34px rgba(25,210,180,.05); z-index:3; }
.customer-tech-corner { position:absolute; width:28px; height:28px; border-color:#31e0c3; filter:drop-shadow(0 0 5px rgba(49,224,195,.8)); }
.customer-corner-tl { left:-3px; top:-3px; border-left:3px solid; border-top:3px solid; border-radius:9px 0 0; } .customer-corner-tr { right:-3px; top:-3px; border-right:3px solid; border-top:3px solid; border-radius:0 9px 0 0; } .customer-corner-bl { left:-3px; bottom:-3px; border-left:3px solid; border-bottom:3px solid; border-radius:0 0 0 9px; } .customer-corner-br { right:-3px; bottom:-3px; border-right:3px solid; border-bottom:3px solid; border-radius:0 0 9px; }
.customer-login-console { margin-bottom:20px; color:#2be1c6; font:13px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.38em; }
.customer-login-card h1 { margin:0; color:#e8fff9; font-size:38px; line-height:1.2; letter-spacing:.04em; }
.customer-login-card > p { margin:11px 0 35px; color:#75c9bd; font-size:16px; letter-spacing:.05em; }
.customer-login-field { display:block; margin-top:20px; color:#75c9bd; font-size:14px; letter-spacing:.08em; }
.customer-login-input { position:relative; display:block; margin-top:9px; }
.customer-login-input input { width:100%; height:56px; margin:0; padding:0 18px 0 52px; border:2px solid rgba(30,202,173,.72); border-radius:13px; outline:none; color:#073f39; -webkit-text-fill-color:#073f39; caret-color:#073f39; background:#effffb; box-shadow:inset 0 0 18px rgba(22,133,116,.06),0 0 18px rgba(30,202,173,.12); font-size:18px; font-weight:700; }
.customer-login-input input:focus { border-color:#2be1c6; box-shadow:0 0 0 3px rgba(43,225,198,.12),0 0 22px rgba(43,225,198,.15); } .customer-login-input input::placeholder { color:#47746e; }
.customer-login-input input:-webkit-autofill,
.customer-login-input input:-webkit-autofill:hover,
.customer-login-input input:-webkit-autofill:focus {
  color:#073f39 !important;
  -webkit-text-fill-color:#073f39 !important;
  caret-color:#073f39 !important;
  background:#effffb !important;
  border-color:rgba(30,202,173,.78) !important;
  box-shadow:0 0 0 1000px #effffb inset,0 0 0 3px rgba(43,225,198,.1) !important;
  font-weight:700 !important;
  transition:background-color 9999s ease-out 0s;
}
.customer-account-icon,.customer-password-icon { position:absolute; left:20px; top:50%; z-index:1; transform:translateY(-50%); }
.customer-account-icon { width:15px; height:15px; border-radius:50% 50% 42% 42%; background:#168bd1; box-shadow:0 8px 0 3px #168bd1; transform:translateY(-67%) scale(.72); }
.customer-password-icon { width:14px; height:13px; border:2px solid #c9a934; border-radius:3px; } .customer-password-icon::before { content:""; position:absolute; left:2px; top:-10px; width:6px; height:8px; border:2px solid #c9a934; border-bottom:0; border-radius:6px 6px 0 0; }
.customer-login-assist { display:flex; justify-content:space-between; align-items:center; margin:18px 0 25px; color:#40d8c1; font-size:13px; }
.customer-login-assist label { display:inline-flex; align-items:center; gap:7px; color:#82bdb5; cursor:pointer; } .customer-login-assist input { width:16px; height:16px; margin:0; accent-color:#20cfb7; }
.customer-login-button { width:100%; height:60px; margin:0; border:0; border-radius:13px; color:#032521; background:linear-gradient(100deg,#2adac2,#24e5d8); box-shadow:0 9px 28px rgba(30,218,188,.3),inset 0 1px rgba(255,255,255,.35); font-size:18px; font-weight:800; letter-spacing:.26em; }
.customer-login-button:hover { transform:translateY(-1px); filter:brightness(1.07); } .customer-login-button:active { transform:translateY(1px); }
.customer-login-footer { position:absolute; bottom:24px; left:0; right:0; color:#3b887e; text-align:center; font:12px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.08em; z-index:2; } .customer-login-footer b { margin:0 9px; }
@media (max-width:720px) { .customer-login-brandbar { top:18px; left:18px; right:18px; } .customer-login-brandmark { width:48px; height:48px; border-radius:13px; font-size:24px; } .customer-login-brand strong { font-size:17px; } .customer-login-brand small { font-size:9px; letter-spacing:.2em; } .customer-login-online { display:none; } .customer-login-card { margin-top:45px; padding:38px 26px 32px; } .customer-login-card h1 { font-size:31px; } .customer-login-card > p { margin-bottom:25px; font-size:14px; } .customer-login-assist { align-items:flex-start; gap:12px; font-size:12px; } .customer-login-footer { bottom:12px; font-size:10px; } }

/* Independent management login: approved futuristic single-entry design. */
#loginScreen.admin-login-screen {
  --login-violet: #8c78ff; position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; min-height: 100vh; overflow: hidden; color: #edf1ff;
  background: radial-gradient(circle at 13% 24%, rgba(52,64,190,.55), transparent 31%), radial-gradient(circle at 89% 13%, rgba(104,37,181,.55), transparent 33%), radial-gradient(circle at 80% 93%, rgba(55,56,178,.4), transparent 38%), linear-gradient(115deg,#05071d 0%,#08091f 45%,#10072b 100%);
  backdrop-filter: none; z-index: 1000;
}
#loginScreen.admin-login-screen.hidden { display: none; }
.admin-login-screen::before { content:""; position:absolute; inset:0; pointer-events:none; opacity:.18; background:repeating-linear-gradient(0deg,transparent 0 3px,rgba(142,151,255,.18) 3px 4px); }
.login-tech-grid { position:absolute; left:-8%; right:-8%; bottom:-31%; height:72%; opacity:.42; transform:perspective(360px) rotateX(61deg); transform-origin:center bottom; background-image:linear-gradient(rgba(102,119,255,.38) 1px,transparent 1px),linear-gradient(90deg,rgba(102,119,255,.34) 1px,transparent 1px); background-size:72px 46px; mask-image:linear-gradient(to bottom,transparent 0,#000 24%,#000 88%,transparent 100%); }
.login-network { position:absolute; width:34vw; height:34vw; min-width:360px; min-height:360px; opacity:.55; background:radial-gradient(circle at 9% 20%,#91a2ff 0 2px,transparent 3px),radial-gradient(circle at 26% 47%,#91a2ff 0 2px,transparent 3px),radial-gradient(circle at 53% 16%,#91a2ff 0 2px,transparent 3px),radial-gradient(circle at 76% 35%,#91a2ff 0 2px,transparent 3px),radial-gradient(circle at 88% 71%,#91a2ff 0 2px,transparent 3px),linear-gradient(31deg,transparent 41%,rgba(112,128,255,.38) 42% 42.5%,transparent 43%),linear-gradient(143deg,transparent 48%,rgba(112,128,255,.3) 49% 49.5%,transparent 50%); filter:drop-shadow(0 0 7px rgba(100,115,255,.5)); pointer-events:none; }
.login-network-left { left:-3%; top:-6%; transform:rotate(-8deg); } .login-network-right { right:-4%; top:23%; transform:rotate(164deg); }
.login-brandbar { position:absolute; top:clamp(24px,4.2vh,58px); left:clamp(24px,3.8vw,72px); right:clamp(24px,4vw,78px); display:flex; align-items:flex-start; justify-content:space-between; z-index:2; }
.login-brand-lockup { display:flex; align-items:center; gap:14px; }
.login-brand-mark { display:grid; place-items:center; width:62px; height:62px; border:1px solid rgba(167,175,255,.55); border-radius:17px; color:#101741; background:linear-gradient(145deg,#9da7ff,#6875e9); box-shadow:0 0 25px rgba(104,119,245,.5),inset 0 1px rgba(255,255,255,.5); font-size:30px; font-weight:900; }
.login-brand-copy strong { display:block; font-size:24px; letter-spacing:.03em; text-shadow:0 0 13px rgba(160,171,255,.45); }
.login-brand-copy small { display:block; margin-top:3px; color:#aab1df; font:13px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.34em; }
.login-online { display:flex; align-items:center; gap:10px; margin-top:12px; color:#b9b8dd; font-size:14px; letter-spacing:.06em; }
.login-online i { width:9px; height:9px; border-radius:50%; background:#8984ff; box-shadow:0 0 12px #9c91ff; } .login-online span { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.2em; } .login-online em { font-style:normal; }
#loginScreen .tech-login-card { position:relative; width:min(510px,calc(100vw - 32px)); margin-top:2vh; padding:54px 50px 46px; overflow:visible; border:1px solid rgba(130,144,255,.34); border-top:1px solid rgba(130,144,255,.52); border-radius:2px; color:#edf1ff; background:linear-gradient(145deg,rgba(10,12,39,.94),rgba(8,8,30,.91)); box-shadow:0 28px 80px rgba(0,0,15,.55),inset 0 0 34px rgba(82,76,180,.06); z-index:3; }
.tech-corner { position:absolute; width:28px; height:28px; border-color:#8391ff; filter:drop-shadow(0 0 5px rgba(124,139,255,.8)); }
.corner-tl { left:-3px; top:-3px; border-left:3px solid; border-top:3px solid; border-radius:9px 0 0; } .corner-tr { right:-3px; top:-3px; border-right:3px solid; border-top:3px solid; border-radius:0 9px 0 0; } .corner-bl { left:-3px; bottom:-3px; border-left:3px solid; border-bottom:3px solid; border-radius:0 0 0 9px; } .corner-br { right:-3px; bottom:-3px; border-right:3px solid; border-bottom:3px solid; border-radius:0 0 9px; }
.login-console-label { margin-bottom:20px; color:#8e96ef; font:13px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.38em; }
#loginScreen .tech-login-card h1 { margin:0; color:#f0f2ff; font-size:38px; line-height:1.2; letter-spacing:.04em; }
.login-scope { margin:11px 0 35px; color:#aaaed0; font-size:16px; letter-spacing:.05em; }
.tech-login-field { display:block; margin-top:20px; color:#9ea5cf; font-size:14px; letter-spacing:.08em; }
.tech-input-wrap { position:relative; display:block; margin-top:9px; }
#loginScreen .tech-input-wrap input { width:100%; height:56px; margin:0; padding:0 18px 0 52px; border:1px solid rgba(137,148,245,.62); border-radius:13px; outline:none; color:#f5f6ff; -webkit-text-fill-color:#f5f6ff; caret-color:#f5f6ff; background:#1b1f52; box-shadow:inset 0 0 20px rgba(77,83,176,.14),0 0 18px rgba(105,100,220,.1); font-size:18px; }
#loginScreen .tech-input-wrap input:focus { border-color:#8a87ff; box-shadow:0 0 0 3px rgba(119,111,255,.14),0 0 22px rgba(109,90,255,.16); } #loginScreen .tech-input-wrap input::placeholder { color:#62688c; }
#loginScreen .tech-input-wrap input:-webkit-autofill,
#loginScreen .tech-input-wrap input:-webkit-autofill:hover,
#loginScreen .tech-input-wrap input:-webkit-autofill:focus {
  color:#f5f6ff !important;
  -webkit-text-fill-color:#f5f6ff !important;
  caret-color:#f5f6ff !important;
  background:#1b1f52 !important;
  border-color:rgba(137,148,245,.72) !important;
  box-shadow:0 0 0 1000px #1b1f52 inset,0 0 0 3px rgba(119,111,255,.1) !important;
  transition:background-color 9999s ease-out 0s;
}
.account-icon,.password-icon { position:absolute; left:20px; top:50%; z-index:1; transform:translateY(-50%); }
.account-icon { width:15px; height:15px; border-radius:50% 50% 42% 42%; background:#2582d4; box-shadow:0 8px 0 3px #2582d4; transform:translateY(-67%) scale(.72); }
.password-icon { width:14px; height:13px; border:2px solid #c9a934; border-radius:3px; } .password-icon::before { content:""; position:absolute; left:2px; top:-10px; width:6px; height:8px; border:2px solid #c9a934; border-bottom:0; border-radius:6px 6px 0 0; }
#loginPass, #customerPassword, #supplierPassword { padding-right:58px; }
.password-visibility-toggle {
  position:absolute; right:10px; top:50%; z-index:3; width:38px; height:38px; margin:0; padding:0;
  transform:translateY(-50%); border:0; border-radius:10px; color:#9ca7d8; background:transparent;
  box-shadow:none; cursor:pointer;
}
#loginScreen .tech-input-wrap > .password-visibility-toggle {
  position:absolute;
  right:10px;
  left:auto;
  top:50%;
  width:38px;
  min-width:38px;
  height:38px;
  margin:0;
  padding:0;
  transform:translateY(-50%);
}
.password-visibility-toggle:hover { background:rgba(125,137,255,.12); }
.password-visibility-toggle:focus-visible { outline:2px solid currentColor; outline-offset:1px; }
.password-visibility-toggle i {
  position:absolute; left:9px; top:12px; width:18px; height:12px; border:2px solid currentColor;
  border-radius:55% 45% 55% 45%; transform:rotate(45deg);
}
.password-visibility-toggle i::before {
  content:""; position:absolute; left:50%; top:50%; width:5px; height:5px; border-radius:50%;
  background:currentColor; transform:translate(-50%,-50%);
}
.password-visibility-toggle.is-visible i::after {
  content:""; position:absolute; left:7px; top:-6px; width:2px; height:22px; border-radius:2px;
  background:currentColor;
}
.customer-login-input .password-visibility-toggle { color:#45dbc4; }
.supplier-login-input .password-visibility-toggle { color:#e9ad2f; }
.login-assist-row { display:flex; justify-content:space-between; align-items:center; margin:18px 0 25px; color:#8f95c8; font-size:13px; }
.login-remember { display:inline-flex; align-items:center; gap:7px; cursor:pointer; } .login-remember input { width:16px; height:16px; margin:0; accent-color:#557eff; }
#loginScreen .login-remember-hint { margin:-14px 0 18px; color:#a8aed8; font-size:12px; line-height:1.6; }
#loginScreen .tech-login-button { width:100%; height:60px; margin:0; border:0; border-radius:13px; color:#11152f; background:linear-gradient(100deg,#7c83ff,#a168f5); box-shadow:0 9px 28px rgba(104,87,245,.38),inset 0 1px rgba(255,255,255,.35); font-size:18px; font-weight:800; letter-spacing:.26em; }
#loginScreen .tech-login-button:hover { transform:translateY(-1px); filter:brightness(1.08); } #loginScreen .tech-login-button:active { transform:translateY(1px); }
.login-footer { position:absolute; bottom:24px; left:0; right:0; color:#7077a6; text-align:center; font:12px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.08em; z-index:2; } .login-footer b { margin:0 9px; }
@media (max-width:720px) { .login-brandbar { top:18px; left:18px; right:18px; } .login-brand-mark { width:48px; height:48px; border-radius:13px; font-size:24px; } .login-brand-copy strong { font-size:17px; } .login-brand-copy small { font-size:9px; letter-spacing:.2em; } .login-online { display:none; } #loginScreen .tech-login-card { margin-top:45px; padding:38px 26px 32px; } #loginScreen .tech-login-card h1 { font-size:31px; } .login-scope { margin-bottom:25px; font-size:14px; } .login-assist-row { align-items:flex-start; gap:12px; font-size:12px; } .login-footer { bottom:12px; font-size:10px; } }

/* Authorization management */
.authorization-topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  margin-bottom: 12px;
}

.authorization-heading {
  min-width: 0;
}

.authorization-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.authorization-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 10px 16px;
  border: 1px solid #f1d29a;
  border-left: 4px solid #d88a13;
  border-radius: 8px;
  color: #80510a;
  background: #fff8eb;
}

.authorization-alert span {
  flex: 1;
}

.text-button {
  padding: 0;
  border: 0;
  color: #3155c6;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.authorization-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(92px, 118px));
  gap: 8px;
  margin: 0;
}

.authorization-metric {
  position: relative;
  display: grid;
  gap: 4px;
  min-height: 60px;
  padding: 9px 12px 9px 15px;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-radius: 8px;
  color: #172033;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.authorization-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #3155c6;
  content: "";
}

.authorization-metric strong {
  font-size: 22px;
  line-height: 1;
}

.authorization-metric span {
  color: #778197;
  font-size: 11px;
  white-space: nowrap;
}

.authorization-metric.valid::before { background: #1d9b5f; }
.authorization-metric.soon::before { background: #d88a13; }
.authorization-metric.expired::before { background: #d5483f; }
.authorization-metric.suspended::before { background: #d88a13; }
.authorization-metric.revoked::before { background: #d5483f; }
.authorization-metric.archived::before { background: #7b8495; }
.authorization-metric.active {
  border-color: #7693f0;
  box-shadow: 0 0 0 2px rgb(49 85 198 / 10%);
}

.authorization-filter-panel {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 190px auto auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.authorization-filter-panel label,
.authorization-form-grid label {
  display: grid;
  gap: 6px;
}

.authorization-filter-panel label > span,
.authorization-form-grid label > span {
  color: #657087;
  font-size: 13px;
  font-weight: 700;
}

.authorization-filter-panel input,
.authorization-filter-panel select,
.authorization-form-grid input,
.authorization-form-grid select {
  width: 100%;
  height: 42px;
  min-width: 0;
}

.authorization-list-panel {
  padding: 0;
  overflow: hidden;
}

.authorization-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e7f0;
}

.authorization-toolbar-actions,
.authorization-view-tools,
.authorization-view-switch,
.authorization-pager,
.authorization-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.authorization-view-tools > span {
  color: #717c91;
  font-size: 13px;
}

.authorization-view-switch {
  padding: 3px;
  border: 1px solid #dfe5ef;
  border-radius: 7px;
  background: #f4f6fa;
}

.authorization-view-switch button {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  color: #657087;
  background: transparent;
  cursor: pointer;
}

.authorization-view-switch button.active {
  color: #fff;
  background: #3155c6;
}

.authorization-table-wrap {
  max-height: calc(100vh - 390px);
  min-height: 310px;
  overflow: auto;
}

.authorization-table {
  width: 100%;
  min-width: 1410px;
  border-collapse: collapse;
  table-layout: fixed;
}

.authorization-table th,
.authorization-table td {
  height: 52px;
  padding: 7px 10px;
  border-bottom: 1px solid #e4e8f0;
  text-align: left;
  vertical-align: middle;
}

.authorization-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  height: 42px;
  color: #4e5b73;
  background: #f5f7fb;
  font-size: 13px;
  white-space: nowrap;
}

.authorization-table th:nth-child(1) { width: 72px; }
.authorization-table th:nth-child(2) { width: 120px; }
.authorization-table th:nth-child(3) { width: 90px; }
.authorization-table th:nth-child(4) { width: 160px; }
.authorization-table th:nth-child(5) { width: 210px; }
.authorization-table th:nth-child(6) { width: 95px; }
.authorization-table th:nth-child(7) { width: 115px; }
.authorization-table th:nth-child(8) { width: 130px; }
.authorization-table th:nth-child(9) { width: 210px; }
.authorization-table th:nth-child(10) { width: 145px; }
.authorization-table th:nth-child(11) { width: 280px; }

.authorization-row.soon { background: #fffaf0; }
.authorization-row.expired { background: #fff4f3; }
.authorization-row.suspended { background: #fffaf0; }
.authorization-row.revoked { background: #fff4f3; }
.authorization-row.archived { background: #f5f6f8; }
.authorization-row:hover { background: #edf3ff; }

.authorization-table .clip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.authorization-table td small {
  display: block;
  margin-top: 3px;
  color: #8a94a7;
  font-size: 11px;
  white-space: nowrap;
}
.authorization-inline-row td { height: auto; padding: 7px 5px; background: #f7f9ff; vertical-align: top; }
.authorization-inline-row.is-new td { background: #f1f6ff; }
.authorization-inline-row input,
.authorization-inline-row select { width: 100%; min-width: 82px; height: 34px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; font-size: 11px; }
.authorization-inline-row input:focus,
.authorization-inline-row select:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(62, 94, 224, .12); outline: none; }
.authorization-inline-row input.invalid { border-color: var(--red); background: #fff5f4; }
.authorization-inline-file { display: grid; place-items: center; min-height: 34px; padding: 4px; border: 1px dashed #aeb9cb; border-radius: 6px; background: #fff; color: var(--blue); font-size: 10px; cursor: pointer; overflow: hidden; }
.authorization-inline-file span { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.authorization-inline-file input { display: none; }
.authorization-inline-remove { width: 100%; margin-top: 4px; border: 0; background: transparent; color: var(--red); font-size: 10px; cursor: pointer; }
.authorization-inline-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 126px; }
.authorization-inline-actions button { flex: 1 1 52px; }
.authorization-inline-actions span { flex-basis: 100%; color: var(--red); font-size: 10px; }
.authorization-inline-hint { display: inline-flex; min-height: 34px; align-items: center; color: var(--muted); font-size: 10px; }
.authorization-customer-picker { position: relative; min-width: 150px; }
.authorization-customer-picker > input[type="hidden"] { display: none; }
.authorization-customer-results { position: absolute; z-index: 80; top: calc(100% + 4px); left: 0; width: max(100%, 280px); max-height: 270px; overflow-y: auto; border: 1px solid #cfd7e6; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(31, 42, 68, .18); }
.authorization-customer-results button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-bottom: 1px solid #edf0f5; background: #fff; text-align: left; cursor: pointer; }
.authorization-customer-results button:last-child { border-bottom: 0; }
.authorization-customer-results button:hover,
.authorization-customer-results button.active { background: var(--blue-soft); }
.authorization-customer-results strong { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.authorization-customer-results span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.authorization-customer-search-tip { padding: 12px; color: var(--muted); font-size: 11px; text-align: center; }
.authorization-customer-relation { position: relative; display: inline-flex; max-width: 100%; align-items: center; gap: 5px; }
.authorization-customer-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.authorization-customer-relation > i { display: inline-grid; flex: 0 0 auto; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 9px; font-style: normal; cursor: help; }
.authorization-main-customer-tip { position: absolute; z-index: 90; bottom: calc(100% + 8px); left: 0; display: none; width: 260px; padding: 10px 12px; border: 1px solid #cfd7e6; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(31, 42, 68, .2); white-space: normal; }
.authorization-main-customer-tip strong,
.authorization-main-customer-tip span { display: block; }
.authorization-main-customer-tip strong { margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.authorization-main-customer-tip span { color: var(--text); font-size: 12px; font-weight: 700; }
.authorization-customer-relation:hover .authorization-main-customer-tip { display: block; }
.customer-main-relation { display: flex; min-width: 180px; align-items: center; gap: 5px; }
.customer-main-relation input { min-width: 145px; }
.customer-main-relation button { height: 30px; padding: 0 7px; border: 1px solid #ffd4d1; border-radius: 6px; background: #fff5f4; color: var(--red); font-size: 10px; cursor: pointer; }
.customer-main-relation.is-main { display: grid; gap: 2px; padding: 5px 8px; border-radius: 7px; background: var(--blue-soft); }
.customer-main-relation.is-main strong { color: var(--blue); font-size: 11px; }
.customer-main-relation.is-main span { color: var(--muted); font-size: 10px; }

/* Customer table: 15-column responsive layout with stable edge columns. */
#customers > .tablewrap { position: relative; width: 100%; overflow: auto; }
#customers .customer-table { width: 100%; min-width:1725px; table-layout: fixed; }
#customers .customer-table th,
#customers .customer-table td { box-sizing: border-box; min-width: 0; }
#customers .customer-table th:nth-child(1) { width: 210px; }
#customers .customer-table th:nth-child(2) { width: 235px; }
#customers .customer-table th:nth-child(3) { width: 105px; }
#customers .customer-table th:nth-child(4) { width: 145px; }
#customers .customer-table th:nth-child(5) { width: 88px; }
#customers .customer-table th:nth-child(6) { width: 88px; }
#customers .customer-table th:nth-child(7) { width: 92px; }
#customers .customer-table th:nth-child(8),
#customers .customer-table th:nth-child(9),
#customers .customer-table th:nth-child(10) { width: 84px; }
#customers .customer-table th:nth-child(11) { width: 108px; }
#customers .customer-table th:nth-child(12) { width: 96px; }
#customers .customer-table th:nth-child(13) { width: 165px; }
#customers .customer-table th:nth-child(14) { width: 150px; }
#customers .customer-table td input,
#customers .customer-table td select { width: 100%; min-width: 0; max-width: 100%; }
#customers .customer-table td:first-child,
#customers .customer-table th:first-child { position: sticky; left: 0; z-index: 4; background: #fff; }
#customers .customer-table th:first-child { z-index: 6; background: #f5f7fb; }
#customers .customer-table td:last-child,
#customers .customer-table th:last-child { position: sticky; right: 0; z-index: 4; background: #fff; box-shadow: -8px 0 14px rgba(31, 42, 68, .06); }
#customers .customer-table th:last-child { z-index: 6; background: #f5f7fb; }
#customers .customer-table .row-actions { justify-content: flex-start; }
#customers .customer-table .row-actions button { padding-right: 10px; padding-left: 10px; }
#customers .customer-main-relation { width: 100%; min-width: 0; }
#customers .customer-main-relation input { flex: 1 1 auto; width: 0; min-width: 0; }
#customers .customer-main-relation button { flex: 0 0 auto; }

@media (min-width: 1900px) {
  #customers .customer-table th:nth-child(1) { width: 15%; }
  #customers .customer-table th:nth-child(2) { width: 18%; }
  #customers .customer-table th:nth-child(13) { width: 12%; }
}

@media (max-width: 1200px) {
  #customers .customer-table { min-width:1685px; }
  #customers .customer-table th:nth-child(1) { width: 190px; }
  #customers .customer-table th:nth-child(2) { width: 215px; }
  #customers .customer-table th:nth-child(13) { width: 145px; }
}

/* Customer management workbench: compact overview + relationship tree + details. */
#customers .customer-management-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 560px;
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
#customers.view {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#customers.view.active {
  overflow: hidden;
}
#customers > .topbar,
#customers > .customer-create-panel,
#customers > .customer-tools-panel,
#customers > .product-table-footer {
  flex: 0 0 auto;
}
#customers > .product-table-footer {
  margin-bottom: 0;
}
#customers .customer-overview-wrap {
  width: 100%;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
#customers .customer-overview-wrap .customer-table {
  width: 100%;
  min-width: 1510px;
  table-layout: fixed;
}
#customers .customer-overview-wrap .customer-table th:nth-child(1) { width: 145px; }
#customers .customer-overview-wrap .customer-table th:nth-child(2) { width: 300px; }
#customers .customer-overview-wrap .customer-table th:nth-child(3) { width: 105px; }
#customers .customer-overview-wrap .customer-table th:nth-child(4) { width: 145px; }
#customers .customer-overview-wrap .customer-table th:nth-child(5) { width: 125px; }
#customers .customer-overview-wrap .customer-table th:nth-child(6) { width: 90px; }
#customers .customer-overview-wrap .customer-table th:nth-child(7) { width: 105px; }
#customers .customer-overview-wrap .customer-table th:nth-child(8),
#customers .customer-overview-wrap .customer-table th:nth-child(9) { width: 90px; }
#customers .customer-overview-wrap .customer-table th:nth-child(10) { width: 115px; }
#customers .customer-overview-wrap .customer-table th:nth-child(11),
#customers .customer-overview-wrap .customer-table th:nth-child(12),
#customers .customer-overview-wrap .customer-table th:nth-child(13) { width: 105px; }
#customers .customer-overview-wrap .customer-table th:nth-child(14) { width: 100px; }
#customers .customer-overview-wrap .customer-table th,
#customers .customer-overview-wrap .customer-table td {
  position: static;
  left: auto;
  right: auto;
  box-shadow: none;
  padding: 12px 13px;
  background: #fff;
}
#customers .customer-overview-wrap .customer-table th {
  background: #f5f7fb;
}
#customers .customer-overview-wrap .customer-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
}
#customers #customerDetailsDrawer > footer.customer-detail-actionbar { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: start; gap: 6px; padding: 10px 12px; }
#customers .customer-detail-secondary-actions { display: flex; width: 100%; max-width: 100%; min-width: 0; min-height: 32px; align-items: flex-start; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
#customers .customer-detail-actionbar button { flex: 0 0 auto; min-height: 32px; height: 32px; padding: 0 7px; font-size: 12px; line-height: 1; white-space: nowrap; border-radius: 7px; }
#customers .customer-detail-actionbar [data-customer-detail-save] { align-self: start; margin: 0; }
#customers #customerDetailSaveStatus { margin-top: 4px; color: #62738e; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
#customers #customerDetailSaveStatus.is-error { color: #b42318; }
#customers .customer-detail-remark-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#customers .customer-detail-remark-heading label { color: inherit; font-size: inherit; }
#customers .customer-detail-remark-heading button { height: 22px; min-height: 22px; padding: 0 5px; border: 0; background: transparent; color: #5f7393; font-size: 11px; }
#customers #customerDetailRemark { box-sizing: border-box; height: 54px; min-height: 54px; max-height: 54px; padding: 7px 10px; line-height: 19px; resize: none; overflow-y: auto; }
#customers .customer-detail-remark.is-expanded #customerDetailRemark { height: 160px; min-height: 160px; max-height: 160px; }
#customers .customer-detail-policy-hint { grid-column: 1 / -1; color: #62738e; font-size: 12px; line-height: 1.6; margin: 0; }
#customerDetailLeaveDialog { width: min(480px, calc(100vw - 32px)); border: 1px solid #d8e1ef; border-radius: 12px; padding: 22px; color: #23324b; }
#customerDetailLeaveDialog::backdrop { background: rgba(25, 39, 62, .32); }
#customerDetailLeaveDialog h3 { margin: 0 0 12px; }
#customerDetailLeaveDialog p { line-height: 1.7; overflow-wrap: anywhere; }
#customerDetailLeaveDialog .customer-detail-leave-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#customers .customer-overview-wrap tbody tr {
  cursor: pointer;
}
#customers .customer-overview-wrap tbody tr:hover td,
#customers .customer-overview-wrap tbody tr.is-selected td {
  background: #f0f6ff;
}
#customers .customer-overview-wrap td > span,
#customers .customer-overview-wrap td > strong {
  display: block;
}
#customers .customer-overview-wrap td > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
#customers .customer-overview-wrap .customer-identity {
  overflow: hidden;
}
#customers .customer-overview-wrap .customer-identity strong,
#customers .customer-overview-wrap .customer-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#customers .customer-overview-wrap .money-cell {
  color: #087b5d;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#customers .customer-overview-wrap .money-cell.debt { color: var(--red); }
.customer-company-tree {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 35px;
  padding-left: 24px;
}
.customer-company-tree > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
}
.customer-company-tree > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
}
.customer-company-tree::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}
.customer-company-tree.is-main::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 19px;
  bottom: -31px;
  width: 2px;
  background: #cdd8eb;
}
.customer-company-tree.is-child {
  margin-left: 18px;
  padding-left: 28px;
}
.customer-company-tree.is-child::before {
  left: 4px;
  top: -13px;
  width: 16px;
  height: 31px;
  border: 0;
  border-bottom: 2px solid #cdd8eb;
  border-left: 2px solid #cdd8eb;
  border-radius: 0 0 0 8px;
  background: transparent;
  box-shadow: none;
}
.customer-company-tree.is-child::after {
  content: "";
  position: absolute;
  left: -10px;
  top: -26px;
  bottom: -31px;
  width: 2px;
  background: #cdd8eb;
}
.customer-company-tree.is-child.is-last-child::after {
  bottom: 18px;
}
.customer-company-tree.is-standalone::before {
  background: #98a2b3;
  box-shadow: none;
}
.customer-role-badge,
.customer-shop-badge,
.customer-account-status {
  display: inline-flex !important;
  width: fit-content;
  margin: 0 !important;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue) !important;
  font-size: 10px !important;
}
.customer-role-badge.is-muted,
.customer-shop-badge,
.customer-account-status {
  background: #f0f2f5;
  color: var(--muted) !important;
}
.customer-shop-badge.is-active,
.customer-account-status.is-active {
  background: var(--green-soft);
  color: var(--green) !important;
}
.customer-details-drawer {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #fbfcfe;
}
.customer-details-drawer > header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.customer-details-drawer > .customer-detail-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
}
.customer-detail-title {
  display: grid;
  min-width: 0;
  gap: 5px;
}
.customer-detail-license-action {
  display: flex;
  flex: 0 0 auto;
  min-width: 0;
  align-items: center;
  gap: 8px;
  justify-self: end;
  max-width: 100%;
}
.customer-detail-license-action .archive-license-status {
  display: inline-grid;
  min-width: 0;
  max-width: 220px;
  flex: 1 1 auto;
  overflow: hidden;
  white-space: normal;
}
.customer-detail-license-action .archive-license-status small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-detail-license-action .customer-license-upload {
  flex: 0 0 auto;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
}
.customer-detail-license-action .customer-license-upload > span {
  overflow: visible;
  color: inherit;
  font-size: 12px;
  font-weight: 750;
  text-overflow: clip;
}
.customer-details-drawer > header strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
}
.customer-details-drawer > header span,
.customer-details-empty span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.customer-details-empty {
  display: grid;
  place-content: center;
  gap: 8px;
  height: 100%;
  min-height: 360px;
  padding: 24px;
  text-align: center;
}
.customer-detail-tabs {
  display: flex;
  padding: 9px 10px 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.customer-detail-tabs button {
  padding: 8px 10px;
  border: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.customer-detail-tabs button.is-active {
  background: var(--blue-soft);
  color: var(--blue);
}
.customer-detail-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow: auto;
}
.customer-detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.customer-detail-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}
.customer-detail-field.is-wide { grid-column: 1 / -1; }
.customer-detail-field input,
.customer-detail-field select,
.customer-detail-field textarea {
  width: 100%;
  min-width: 0;
}
.customer-detail-field .customer-main-relation {
  width: 100%;
  min-width: 0;
}
.customer-detail-field .customer-main-relation input {
  width: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.customer-detail-shop-rule {
  margin-bottom: 12px;
}
.customer-railway-settlement-rule {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce5f4;
  border-radius: 10px;
  background: #f8fbff;
}
.customer-railway-settlement-rule-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.customer-railway-settlement-rule-head > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.customer-railway-settlement-rule-head strong {
  color: var(--text);
  font-size: 12px;
}
.customer-railway-settlement-rule-head span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.customer-railway-settlement-current {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.customer-railway-settlement-current.is-configured {
  border-color: #b7decf;
  color: #147653;
  background: #ecfaf3;
}
.customer-railway-settlement-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: end;
  gap: 10px;
}
.customer-railway-settlement-mode {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}
.customer-railway-settlement-mode select {
  width: 100%;
  min-width: 0;
}
.customer-railway-settlement-rate {
  display: grid;
  position: relative;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}
.customer-railway-settlement-rate input {
  box-sizing: border-box;
  width: 100%;
  padding-right: 30px;
}
.customer-railway-settlement-rate em {
  position: absolute;
  right: 8px;
  bottom: 9px;
  color: #8a96aa;
  font-size: 9px;
  font-style: normal;
  pointer-events: none;
}
.customer-detail-shop-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}
.customer-detail-shop-actions span {
  color: var(--muted);
  font-size: 10px;
}
.customer-detail-shop-actions button { white-space: nowrap; }
.customer-detail-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.customer-detail-summary > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.customer-detail-summary span { color: var(--muted); }
.customer-detail-summary strong { font-weight: 700; }
.customer-password-state {
  display: flex;
  min-height: 36px;
  align-items: center;
}
.customer-details-drawer > footer {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}
@media (max-width: 1280px) {
  #customers .customer-management-workspace {
    grid-template-columns: minmax(0, 1fr) 560px;
  }

  .customer-details-drawer > .customer-detail-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-detail-license-action { justify-self: start; }

  .customer-railway-settlement-controls { grid-template-columns: 1fr; }
  .customer-railway-settlement-rate { max-width: 180px; }
}
@media (max-width: 980px) {
  #customers .customer-management-workspace { grid-template-columns: 1fr; }
  .customer-details-drawer { border-top: 1px solid var(--line); border-left: 0; }
}

/* Authorization table: fluid 11-column layout with sticky edge actions. */
#authorizations .authorization-table-wrap { position: relative; width: 100%; overflow: auto; }
#authorizations .authorization-table { width: max-content; min-width: 100%; table-layout: auto; }
#authorizations .authorization-table th,
#authorizations .authorization-table td { box-sizing: border-box; min-width: 0; }
#authorizations .authorization-table th:nth-child(1) { width: clamp(52px, 4vw, 72px); }
#authorizations .authorization-table th:nth-child(2) { width: clamp(92px, 7vw, 140px); }
#authorizations .authorization-table th:nth-child(3) { width: clamp(72px, 6vw, 110px); }
#authorizations .authorization-table th:nth-child(4) { width: clamp(120px, 10vw, 190px); }
#authorizations .authorization-table th:nth-child(5) { width: clamp(190px, 18vw, 330px); }
#authorizations .authorization-table th:nth-child(6) { width: clamp(82px, 6vw, 105px); }
#authorizations .authorization-table th:nth-child(7) { width: clamp(104px, 7vw, 125px); }
#authorizations .authorization-table th:nth-child(8) { width: clamp(112px, 8vw, 145px); }
#authorizations .authorization-table th:nth-child(9) { width: clamp(110px, 9vw, 175px); }
#authorizations .authorization-table th:nth-child(10) { width: clamp(112px, 8vw, 145px); }
#authorizations .authorization-table th:nth-child(11) { width: 280px; }
#authorizations .authorization-table th,
#authorizations .authorization-table td {
  padding-left: clamp(7px, .75vw, 13px);
  padding-right: clamp(7px, .75vw, 13px);
}
#authorizations .authorization-table td:nth-child(4),
#authorizations .authorization-table td:nth-child(5),
#authorizations .authorization-table td:nth-child(9) {
  white-space: normal;
  overflow-wrap: anywhere;
}
#authorizations .authorization-table td input,
#authorizations .authorization-table td select { width: 100%; min-width: 0; max-width: 100%; }
#authorizations .authorization-table td:first-child,
#authorizations .authorization-table th:first-child { position: sticky; left: 0; z-index: 4; background: #fff; }
#authorizations .authorization-table th:first-child { z-index: 6; background: #f5f7fb; }
#authorizations .authorization-table td:last-child,
#authorizations .authorization-table th:last-child { position: sticky; right: 0; z-index: 4; background: #fff; box-shadow: -8px 0 14px rgba(31, 42, 68, .06); }
#authorizations .authorization-table th:last-child { z-index: 6; background: #f5f7fb; }
#authorizations .authorization-table .authorization-actions { justify-content: flex-start; }
#authorizations .authorization-table .authorization-actions button { padding-right: 8px; padding-left: 8px; }

@media (max-width: 1350px) {
  #authorizations .authorization-table { min-width: 1120px; }
}

.authorization-level,
.authorization-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.authorization-level {
  color: #3155c6;
  background: #eaf0ff;
}

.authorization-status.valid {
  color: #137b49;
  background: #e6f7ef;
}

.authorization-status.soon {
  color: #a76706;
  background: #fff0d6;
}

.authorization-status.expired {
  color: #c2332d;
  background: #ffe8e6;
}

.authorization-status.suspended {
  color: #a76706;
  background: #fff0d6;
}

.authorization-status.revoked {
  color: #c2332d;
  background: #ffe8e6;
}

.authorization-status.archived {
  color: #657087;
  background: #eceff4;
}

.authorization-status.application-pending,
.authorization-status.application-document,
.authorization-status.application-ready {
  color: #a76706;
  background: #fff0d6;
}

.authorization-status.application-approved {
  color: #3155c6;
  background: #eaf0ff;
}

.authorization-status.application-brand {
  color: #7048bf;
  background: #f3edff;
}

.authorization-status.application-rejected {
  color: #c2332d;
  background: #ffe8e6;
}

.authorization-document-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d6dfef;
  border-radius: 5px;
  color: #3155c6;
  background: #fff;
  cursor: pointer;
}

.authorization-document-count { position: absolute; right: -2px; top: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: #fff; background: #315bdc; font-size: 10px; line-height: 17px; box-shadow: 0 1px 3px #7384ad; }
.authorization-inline-documents { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.authorization-inline-documents button { padding: 2px 4px; border: 1px solid #f1c7c4; border-radius: 4px; color: #b73530; background: #fff1f0; font-size: 9px; cursor: pointer; }
.authorization-hover-preview { position: fixed; z-index: 1200; width: 370px; padding: 8px; border: 1px solid #cad6eb; border-radius: 10px; background: #fff; box-shadow: 0 14px 40px rgba(29, 45, 79, .28); }
.authorization-hover-preview img { display: block; width: 100%; height: 400px; object-fit: contain; border-radius: 6px; background: #f3f6fb; }
.authorization-hover-footer { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 7px; min-height: 34px; padding-top: 7px; color: #526078; font-size: 12px; }
.authorization-hover-footer strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.authorization-hover-footer button { width: 28px; height: 26px; padding: 0; border: 1px solid #ccd7ec; border-radius: 5px; background: #f5f7fc; color: #3155c6; font-size: 20px; cursor: pointer; }
.authorization-hover-loading { display: grid; place-items: center; height: 220px; color: #7e899e; }

.authorization-document-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.authorization-document-placeholder {
  font-size: 11px;
  font-weight: 800;
}

.authorization-no-document {
  color: #a2aabd;
}

.authorization-document-locked {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #dce3ef;
  border-radius: 6px;
  color: #778197;
  background: #f5f7fb;
  font-size: 11px;
  white-space: nowrap;
}

.icon-text-button {
  height: 30px;
  padding: 0 9px;
  border: 1px solid #ccdafc;
  border-radius: 5px;
  color: #3155c6;
  background: #edf2ff;
  cursor: pointer;
}

.icon-text-button.danger {
  border-color: #ffd5d2;
  color: #cf3e36;
  background: #fff0ef;
}

.icon-text-button.warning {
  border-color: #f1d29a;
  color: #a76706;
  background: #fff8eb;
}

.authorization-customer-view {
  max-height: calc(100vh - 390px);
  min-height: 310px;
  padding: 12px;
  overflow: auto;
  background: #f6f8fc;
}

.authorization-customer-group {
  margin-bottom: 10px;
  border: 1px solid #e0e6f0;
  border-radius: 7px;
  background: #fff;
}

.authorization-customer-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5eaf2;
}

.authorization-customer-head strong { flex: 1; }
.authorization-customer-head span { color: #778197; font-size: 12px; }
.authorization-customer-head .valid { color: #137b49; }
.authorization-customer-head .soon { color: #a76706; }
.authorization-customer-head .expired { color: #c2332d; }
.authorization-customer-head .suspended { color: #a76706; }
.authorization-customer-head .revoked { color: #c2332d; }
.authorization-customer-head .archived { color: #7048bf; }

.authorization-customer-rows {
  display: grid;
}

.authorization-customer-rows > button {
  display: grid;
  grid-template-columns: 100px minmax(220px, 1fr) 130px 100px 110px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid #eef1f6;
  color: #293247;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.authorization-customer-rows > button:last-child { border-bottom: 0; }
.authorization-customer-rows > button:hover { background: #f2f6ff; }
.authorization-customer-rows > button:disabled { color: #526078; cursor: default; opacity: .82; }
.authorization-customer-rows > button:disabled:hover { background: #fff; }
.authorization-customer-rows em { color: #758096; font-style: normal; }
.authorization-customer-rows time { color: #566176; }

.authorization-pager {
  justify-content: flex-end;
  min-height: 50px;
  padding: 8px 14px;
  border-top: 1px solid #e2e7f0;
}

.authorization-pager span {
  margin-right: 8px;
  color: #778197;
  font-size: 13px;
}

.authorization-modal-panel {
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.authorization-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 18px;
}

.authorization-document-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 18px;
  padding: 12px;
  border: 1px solid #dfe5ef;
  border-radius: 7px;
  background: #f7f9fc;
}

.authorization-document-field > div {
  display: grid;
  gap: 3px;
  margin-right: auto;
}

.authorization-document-field > div span,
.authorization-document-field > span {
  color: #7a859a;
  font-size: 12px;
}

.authorization-file-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid #cad5e8;
  border-radius: 5px;
  color: #3155c6;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.authorization-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.danger-soft {
  height: 34px;
  border: 1px solid #ffd5d2;
  border-radius: 5px;
  color: #cf3e36;
  background: #fff0ef;
  cursor: pointer;
}

.authorization-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.authorization-preview-panel {
  width: min(920px, calc(100vw - 40px));
  height: min(780px, calc(100vh - 40px));
}

.authorization-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.authorization-preview-content {
  display: grid;
  place-items: center;
  height: calc(100% - 58px);
  overflow: auto;
  background: #eef1f6;
}

.authorization-preview-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.authorization-preview-content iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

@media (max-width: 1100px) {
  .authorization-topbar { grid-template-columns: 1fr; }
  .authorization-top-actions { width: 100%; justify-content: space-between; }
  .authorization-metrics { grid-template-columns: repeat(4, minmax(118px, 1fr)); flex: 1; }
  .authorization-filter-panel { grid-template-columns: minmax(260px, 1fr) 170px auto auto; }
}

@media (max-width: 720px) {
  .authorization-alert,
  .authorization-toolbar,
  .authorization-document-field { align-items: stretch; flex-direction: column; }
  .authorization-top-actions { align-items: stretch; flex-direction: column; }
  .authorization-metrics {
    width: 100%;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
  }
  .authorization-top-actions > #refreshAuthorizationsBtn { align-self: flex-end; }
  .authorization-filter-panel,
  .authorization-form-grid { grid-template-columns: 1fr; }
  .authorization-toolbar { align-items: flex-start; }
  .authorization-view-tools { width: 100%; justify-content: space-between; }
  .authorization-document-field > div { margin-right: 0; }
}

html,
body {
  width: 100%;
  height: 100%;
}

html {
  color-scheme: light;
  background: var(--bg);
}

body {
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #dfe6ff;
  color: #203b91;
}

* {
  scrollbar-color: #c1c9d6 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  background: #c1c9d6;
  background-clip: padding-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

/* App shell and navigation */
.side {
  position: relative;
  top: auto;
  z-index: 20;
  display: flex;
  flex: 0 0 222px;
  flex-direction: column;
  width: 222px;
  height: 100vh;
  padding: 0 12px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--sidebar-line);
  background: #ffffff;
  box-shadow: none;
}

.side::-webkit-scrollbar {
  display: block;
  width: 6px;
}

.brand {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  margin: 0;
  padding: 16px 8px;
  border-right: 0;
  border-bottom: 1px solid var(--sidebar-line);
}

.sidebar-toggle {
  display:inline-flex;
  flex:0 0 28px;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  margin-left:auto;
  padding:0;
  border:1px solid #d9e0ec;
  border-radius:7px;
  background:#f7f9fc;
  color:#56657a;
  box-shadow:none;
  font-size:22px;
  line-height:1;
}
.sidebar-toggle:hover { border-color:#b9c7df; background:#edf3ff; color:#315fd5; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b5bdb, #5b73e8);
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(59, 91, 219, .2);
  font-size: 16px;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
  margin: 0;
}

.brand-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 720;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy > span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #98a2b3;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-group-label {
  flex: 0 0 auto;
  margin: 15px 10px 6px;
  color: #98a2b3;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 1px;
}

.nav {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  min-height: 36px;
  margin: 0 0 2px;
  padding: 8px 12px 8px 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #5b6675;
  font-size: 13.5px;
  font-weight: 560;
  text-align: left;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.nav::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  color: #8a96a7;
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  transform: translateY(-50%);
}

.nav[data-view="dashboard"]::after { content: "▤"; }
.nav[data-view="entry"]::after { content: "+"; }
.nav[data-view="customerOrderReview"]::after { content: "审"; font-size:12px; }
.nav[data-view="orders"]::after { content: "▦"; }
.nav[data-view="projectReports"]::after { content: "项"; font-size:12px; }
.nav[data-view="statistics"]::after { content: "¥"; }
.nav[data-view="funds"]::after { content: "◇"; }
.nav[data-view="authorizations"]::after { content: "授"; font-size:12px; }
.nav[data-view="customers"]::after { content: "◉"; }
.nav[data-view="suppliers"]::after { content: "▣"; }
.nav[data-view="products"]::after { content: "商"; font-size: 12px; }
.nav[data-view="customer"]::after { content: "⌑"; }
.nav[data-view="supplierPortal"]::after { content: "▢"; }
.nav[data-view="settings"]::after { content: "⚙"; }
.logout-nav::after { content: "↪"; }

@media (min-width:981px) {
  .side,
  .main { transition:width .2s ease, flex-basis .2s ease; }
  body.sidebar-collapsed .side { flex-basis:74px; width:74px; padding-right:8px; padding-left:8px; }
  body.sidebar-collapsed .main { width:calc(100vw - 74px); }
  body.sidebar-collapsed .brand { justify-content:center; min-height:72px; padding-right:0; padding-left:0; }
  body.sidebar-collapsed .brand-copy,
  body.sidebar-collapsed .nav-group-label { display:none; }
  body.sidebar-collapsed .brand-mark { width:34px; height:34px; flex-basis:34px; }
  body.sidebar-collapsed .sidebar-toggle { position:absolute; right:-7px; bottom:-13px; z-index:3; width:24px; height:24px; border-radius:50%; background:#fff; font-size:19px; }
  body.sidebar-collapsed .nav { min-height:42px; padding:8px; overflow:hidden; color:transparent; text-align:center; }
  body.sidebar-collapsed .nav::after { left:50%; color:#7d899b; transform:translate(-50%,-50%); }
  body.sidebar-collapsed .nav:hover::after,
  body.sidebar-collapsed .nav.active::after { color:currentColor; }
  body.sidebar-collapsed .nav.active { color:#315fd5; }
  body.sidebar-collapsed .logout-nav { margin-top:8px; color:transparent; }
  body.sidebar-collapsed .logout-nav::after { color:#c43d3d; }
}

.nav:hover::after,
.nav.active::after {
  color: currentColor;
}

/* Product management */
#products .product-topbar {
  align-items: center;
}

#products .product-topbar .top-actions {
  align-self: center;
  flex-wrap: nowrap;
}

.product-action-stack {
  display: grid;
  flex: 0 0 112px;
  width: 112px;
  height: 58px;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.product-action-stack-wide {
  flex-basis: 154px;
  width: 154px;
}

.product-action-stack > button {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 2px 10px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.15;
  white-space: nowrap;
}

#productSelectAllBtn {
  border-color: #c9d4e6;
  background: #f6f8fc;
  color: #40516d;
}

#productTemplateBtn {
  border-color: #c9d4e6;
  background: #f6f8fc;
  color: #40516d;
}

#productBatchTitleBtn {
  border-color: #c9d4e6 !important;
  background: #f6f8fc !important;
  color: #40516d !important;
}

#productCatalogInviteBtn {
  border-color: #c9d4e6;
  background: #f6f8fc;
  color: #40516d;
}

#productSelectAllBtn:hover,
#productTemplateBtn:hover,
#productBatchTitleBtn:hover:not(:disabled),
#productCatalogInviteBtn:hover {
  filter: saturate(1.12) brightness(.97);
  border-color: #9fb2d1;
  background: #edf2fa;
  color: #294d91;
  box-shadow: 0 2px 7px rgba(35, 55, 94, .1);
}

#products #productSearchBtn,
#products #productExportBtn {
  border-color: #3f61df;
  background: #3f61df;
  color: #fff;
}

#products #productSearchBtn:hover,
#products #productExportBtn:hover {
  border-color: #304fc8;
  background: #304fc8;
}

#products #productPriceSortBtn,
#products #productClearBtn,
#products #productColumnMenuBtn {
  border-color: #d6deeb;
  background: #fff;
  color: #3d485b;
}

#products #productPriceSortBtn:hover,
#products #productClearBtn:hover,
#products #productColumnMenuBtn:hover {
  border-color: #aab8cf;
  background: #f6f8fc;
}

.product-summary-strip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.product-summary-strip > div,
.product-summary-strip > button {
  display: flex;
  flex: 0 0 112px;
  width: 112px;
  min-width: 112px;
  height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border: 1px solid;
  border-radius: 8px;
  box-shadow: 0 2px 7px rgba(35, 49, 75, .05);
}

.product-summary-strip > button {
  cursor: pointer;
}

.product-summary-strip > :nth-child(1) { border-color: #bdd2ff; color: #285dc8; background: #eef4ff; }
.product-summary-strip > :nth-child(2) { border-color: #d5c6fb; color: #7048bf; background: #f5f0ff; }
.product-summary-strip > :nth-child(3) { border-color: #a9dfd5; color: #137c6a; background: #ecfaf7; }
.product-summary-strip > :nth-child(4) { border-color: #f2d29a; color: #b96a00; background: #fff7e8; }
.product-summary-strip > :nth-child(5) { border-color: #f2bfa9; color: #c65320; background: #fff3ed; }
.product-summary-strip > button:hover,
.product-summary-strip > button.active { filter: saturate(1.14) brightness(.98); box-shadow: 0 0 0 2px rgba(49, 95, 209, .12); }
.product-summary-strip strong {
  color: currentColor;
  font-size: 19px;
  line-height: 1.1;
}
.product-summary-strip span {
  margin-top: 3px;
  color: currentColor;
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  opacity: .78;
}

.product-toolbar-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--wb-shadow);
}

.product-search-group,
.product-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.product-search-group {
  flex: 1 1 620px;
}

.product-search-group input {
  flex: 1 1 auto;
  min-width: 260px;
}

.product-search-group .product-price-filter-input {
  flex: 0 0 104px;
  width: 104px;
  min-width: 104px;
}

.product-price-filter-separator {
  flex: 0 0 auto;
  color: #748095;
  font-weight: 800;
}

.product-price-sort-button {
  flex: 0 0 auto;
  min-width: 110px;
  border: 1px solid #cbd5e6;
  color: #536078;
  background: #fff;
  font-weight: 750;
}

.product-price-sort-button.is-active {
  border-color: #91adf4;
  color: #315bd1;
  background: #edf3ff;
}

.product-action-group {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-lock-button {
  min-height: 36px;
  border: 1px solid #f0d49e;
  border-radius: 7px;
  background: #fff7e8;
  color: #b66a00;
  font-weight: 680;
  cursor: pointer;
}

.product-lock-button.unlocked {
  border-color: #a9ddd7;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.product-import-button {
  min-height: 36px;
  white-space: nowrap;
}

.product-import-button.has-file {
  border-color: #9bcfc8;
  background: var(--teal-soft);
  color: var(--teal-dark);
}
.product-import-result { margin: 5px 32px 0; }

.product-import-preview {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 24px;
  place-items: center;
  background: rgba(25, 36, 60, .48);
  backdrop-filter: blur(2px);
}
.product-import-preview-dialog {
  display: flex;
  flex-direction: column;
  width: min(1380px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  min-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #dce4f2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 31, 55, .28);
}
.product-import-preview-head,
.product-import-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}
.product-import-preview-head { border-bottom: 1px solid #e6ebf3; }
.product-import-preview-head h2 { margin: 0 0 4px; font-size: 18px; }
.product-import-preview-head p { margin: 0; color: #4968b8; font-size: 13px; }
.product-import-stats { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 10px; padding: 14px 18px; }
.product-import-stat { padding: 10px 12px; border: 1px solid #e4e9f2; border-radius: 9px; background: #f8faff; }
.product-import-stat strong { display: block; font-size: 22px; color: #304fbf; }
.product-import-stat span { color: #67738b; font-size: 12px; }
.product-import-table-wrap { flex: 1 1 auto; min-height: 220px; max-height: calc(100vh - 390px); overflow: auto; margin: 0 18px; border: 1px solid #e1e6ef; border-radius: 9px; scrollbar-gutter: stable; }
.product-import-preview-table thead { position: sticky; z-index: 2; top: 0; }
.product-import-preview-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
.product-import-preview-table td { height: 44px; padding: 8px 11px; border-bottom: 1px solid #e8ecf3; text-align: left; white-space: nowrap; }
.product-import-preview-table th { height: 42px; padding: 8px 11px; border-bottom: 1px solid #e8ecf3; text-align: left; white-space: nowrap; }
.product-import-preview-table th { background: #f6f8fc; color: #4f5d73; }
.product-import-cost-up { color: #e34b2f; font-weight: 700; }
.product-import-cost-down { color: #14965f; font-weight: 700; }
.product-import-action-tag { display: inline-flex; padding: 3px 9px; border-radius: 999px; border: 1px solid #d8deea; background: #f3f5f8; color: #596579; font-weight: 700; }
.product-import-action-tag.is-new { border-color: #b9c9ff; background: #edf2ff; color: #315ee7; }
.product-import-action-tag.is-update { border-color: #ffd0bf; background: #fff1eb; color: #dc4a2d; }
.product-import-errors { margin: 12px 18px 0; padding: 10px 12px; border-radius: 8px; background: #fff6e6; color: #a86100; font-size: 13px; }
.product-import-pager { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px 0; color: #687489; font-size: 13px; }
.product-import-page-summary { display: flex; align-items: center; gap: 14px; }
.product-import-page-summary label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.product-import-page-summary select { min-height: 34px; padding: 4px 28px 4px 9px; border: 1px solid #dce3ef; border-radius: 7px; background: #fff; color: #455168; }
.product-import-page-actions, .product-import-page-numbers { display: flex; align-items: center; gap: 6px; }
.product-import-page-actions button { min-height: 34px; }
.product-import-page-number { min-width: 34px; min-height: 34px; padding: 0 8px; border: 1px solid #dce3ef; border-radius: 7px; background: #fff; color: #536079; cursor: pointer; }
.product-import-page-number.active { border-color: #4968e8; background: #4968e8; color: #fff; font-weight: 700; }
.product-import-page-gap { padding: 0 2px; color: #8993a5; }
.product-import-preview-actions { margin-top: 14px; border-top: 1px solid #e6ebf3; background: #fbfcff; }
.product-import-preview-actions span { color: #5d687c; font-size: 13px; }
.product-import-preview-buttons { display: flex; gap: 10px; }
@media (max-width: 900px) {
  .product-import-preview { padding: 10px; }
  .product-import-preview-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); min-height: calc(100vh - 20px); }
  .product-import-stats { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .product-import-preview-head, .product-import-preview-actions { align-items: flex-start; flex-direction: column; }
}

/* Product import reconciliation center */
.product-import-preview-dialog { width: min(1760px, calc(100vw - 32px)); height: calc(100vh - 32px); max-height: none; min-height: 0; }
.product-import-preview-head { flex: 0 0 auto; padding: 13px 18px 10px; }
.product-import-preview-head h2 { font-size: 21px; color: #1b2940; }
.product-import-file-meta { display: flex; gap: 18px; margin-top: 7px; color: #6c7890; font-size: 12px; }
.product-import-stats { flex: 0 0 auto; grid-template-columns: repeat(9, minmax(90px, 1fr)); gap: 8px; padding: 10px 18px; }
.product-import-stat { min-width: 0; padding: 9px 11px; text-align: left; cursor: pointer; }
.product-import-stat:hover { border-color: #afbef0; box-shadow: 0 4px 12px rgba(42, 66, 130, .08); }
.product-import-stat strong { font-size: 20px; }
.product-import-stat small { display: inline-flex; margin-top: 2px; padding: 1px 6px; border-radius: 999px; background: #eef1f6; color: #7a8497; font-size: 10px; }
.product-import-stat.is-good strong { color: #16885d; }
.product-import-stat.is-warn strong { color: #d87800; }
.product-import-stat.is-danger strong { color: #d63b32; }
.product-import-stat.is-muted strong { color: #667085; }
.product-import-stat.is-primary strong { color: #315ee7; }
.product-import-content-grid { display: grid; flex: 1 1 auto; min-height: 0; grid-template-columns: minmax(0, 1fr) 245px; gap: 10px; padding: 0 18px; }
.product-import-main-column { display: flex; min-height: 0; flex-direction: column; }
.product-import-scope-panel { flex: 0 0 auto; overflow: hidden; border: 1px solid #e1e6ef; border-radius: 9px; }
.product-import-section-title { padding: 8px 10px; border-bottom: 1px solid #e8ecf3; color: #2d3a51; font-size: 13px; font-weight: 800; }
.product-import-section-title small { margin-left: 8px; color: #8792a5; font-weight: 500; }
.product-import-scope-wrap { max-height: 126px; overflow: auto; }
.product-import-scope-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.product-import-scope-table th, .product-import-scope-table td { height: 31px; padding: 5px 8px; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; }
.product-import-scope-table th { position: sticky; top: 0; z-index: 1; background: #f6f8fc; color: #59667b; }
.product-import-scope-table button { min-width: 34px; padding: 2px 6px; border: 0; border-radius: 6px; background: #f2f5fb; color: #315ee7; cursor: pointer; }
.product-import-filter-tabs { display: flex; flex: 0 0 auto; gap: 0; margin-top: 8px; overflow-x: auto; border: 1px solid #e1e6ef; border-radius: 9px 9px 0 0; background: #fff; }
.product-import-filter-tabs button { min-height: 38px; padding: 6px 13px; border: 0; border-right: 1px solid #e7ebf2; background: #fff; color: #5d687b; cursor: pointer; white-space: nowrap; }
.product-import-filter-tabs button.active { background: #edf2ff; color: #315ee7; font-weight: 800; box-shadow: inset 0 -2px #315ee7; }
.product-import-filter-tabs b { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #f1f3f7; font-size: 10px; }
.product-import-filter-tabs button.active b { background: #fff; }
.product-import-main-column .product-import-table-wrap { min-height: 170px; max-height: none; margin: 0; border-top: 0; border-radius: 0 0 9px 9px; }
.product-import-preview-table { min-width: 1140px; font-size: 12px; }
.product-import-preview-table td, .product-import-preview-table th { height: 36px; padding: 6px 9px; }
.product-import-preview-table td:nth-child(2) strong, .product-import-preview-table td:nth-child(2) small { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.product-import-preview-table td:nth-child(2) small { margin-top: 2px; color: #8792a5; }
.product-import-reason { max-width: 280px; overflow: hidden; text-overflow: ellipsis; color: #667085; }
.product-import-action-tag.is-error { border-color: #ffd0c8; background: #fff1ef; color: #c93d30; }
.product-import-main-column .product-import-pager { flex: 0 0 auto; min-height: 42px; padding: 5px 0 0; }
.product-import-rule-column { display: grid; align-content: start; gap: 9px; min-height: 0; overflow: auto; }
.product-import-rule-column section { padding: 11px; border: 1px solid #f3ddb5; border-radius: 9px; background: #fff8e9; }
.product-import-rule-column section strong { color: #c66d00; font-size: 13px; }
.product-import-rule-column section p { margin: 6px 0 0; color: #6d7584; font-size: 12px; line-height: 1.55; }
.product-import-rule-column section.danger { border-color: #f1c4bf; background: #fff3f1; }
.product-import-rule-column section.danger strong { color: #cc3d32; }
.product-import-rule-column .product-import-errors { max-height: 160px; margin: 0; overflow: auto; font-size: 11px; line-height: 1.55; }
.product-import-preview-actions { flex: 0 0 auto; min-height: 60px; margin-top: 8px; padding: 9px 18px; }
.product-import-preview-buttons { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1280px) {
  .product-import-stats { grid-template-columns: repeat(5, minmax(90px, 1fr)); }
  .product-import-content-grid { grid-template-columns: 1fr; }
  .product-import-rule-column { display: none; }
}

.product-table-controls {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: flex-end;
  margin: 6px 0 -6px;
}

.product-column-picker {
  position: relative;
  z-index: 12;
}

.product-column-menu-button {
  min-height: 36px;
  padding: 0 10px;
  border-color: var(--line-strong);
  background: #fff;
  font-size: 12px;
}

.product-column-menu-button.active {
  border-color: #94aaf9;
  background: var(--blue-soft);
  color: var(--blue);
}

.product-column-menu {
  position: absolute;
  z-index: 10030;
  top: calc(100% + 5px);
  right: 0;
  width: 292px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(27, 39, 71, .18);
}

.product-column-menu-head,
.product-column-menu-actions {
  display: flex;
  min-height: 36px;
  padding: 6px 10px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.product-column-menu-head strong { font-size: 12px; }
.product-column-menu-head span { color: var(--muted); font-size: 10px; }

.product-column-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 286px;
  padding: 6px;
  overflow-y: auto;
}

.product-column-option {
  display: flex;
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  align-items: center;
  gap: 7px;
  border-radius: 5px;
  color: #4d586a;
  cursor: pointer;
  font-size: 11.5px;
}

.product-column-option:hover { background: #f3f6fb; color: var(--text); }
.product-column-option input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }
.product-column-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.product-column-menu-actions {
  justify-content: flex-end;
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.product-column-menu-actions button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 10.5px;
}

.product-table-wrap {
  position: relative;
  min-height: 260px;
  max-height: calc(100vh - 300px);
  margin-top: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: var(--wb-shadow);
}

.product-table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 12.5px;
}

.product-table th,
.product-table td {
  height: 44px;
  padding: 5px 7px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f5f7fb;
  color: #4b5565;
  font-weight: 700;
}

.product-table .product-select-column {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding-right: 5px !important;
  padding-left: 5px !important;
  text-align: center;
}

.product-select-checkbox {
  display: inline-block;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  accent-color: var(--blue);
  cursor: pointer;
}

.product-select-checkbox:disabled {
  cursor: default;
  opacity: .45;
}

.product-select-all-button {
  min-width: 68px;
  white-space: nowrap;
}

.product-select-all-button.active {
  border-color: #9fb6ff;
  background: #edf2ff;
  color: #2757d7;
}

.product-column-hidden { display: none !important; }

.product-draft-row > td {
  background: #f7faff !important;
  border-top: 1px solid #bcd0ff;
  border-bottom: 1px solid #bcd0ff;
}

.product-draft-row .product-cell-input,
.product-draft-row .product-cell-select {
  border-color: #c9d5f8;
  background: #fff;
}

.product-save-first {
  display: inline-block;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.25;
  white-space: normal;
}

.product-draft-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.product-draft-actions button {
  min-width: 52px;
  height: 28px;
  padding: 0 8px;
}

.product-table tr:hover > td { background: #fbfcff; }
.product-table .price-chain { background: #f3f0ff; color: #6846d8; font-weight: 680; }
.product-table .price-core { background: #eaf8f6; color: #0d887d; font-weight: 680; }
.product-table .price-agent { background: #edf3ff; color: #2d5fc9; font-weight: 680; }
.product-table .price-retail { background: #fff6e8; color: #bd710b; font-weight: 680; }
.product-table .numeric-cell { font-variant-numeric: tabular-nums; }

.product-copy-field {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 3px;
}

.product-copy-field > .product-cell-input {
  min-width: 0;
  flex: 1 1 auto;
}

.product-inline-copy {
  flex: 0 0 auto;
  display: inline-flex;
  width: 18px;
  height: 18px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #8a96aa;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, color .12s ease;
}

.product-inline-copy svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-inline-copy:hover { border-color: #c7d6f7; background: #edf3ff; color: #315fd2; }
.product-inline-copy.copied { border-color: #b9e4d5; background: #eaf9f3; color: #087b5d; }
.product-supplier-cell .product-inline-copy { margin-left: 1px; }
.product-updated-column { color: #315fd2 !important; background: #edf3ff !important; }
.product-updated-cell { color: #315fd2; font-variant-numeric: tabular-nums; }

.product-fast-tooltip {
  position: fixed;
  z-index: 11020;
  max-width: min(460px, calc(100vw - 20px));
  padding: 7px 10px;
  border: 1px solid #d8e0ed;
  border-radius: 7px;
  background: #172033;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .22);
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.product-fast-tooltip.hidden { display: none; }

.product-cost-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.product-cost-cell.has-trend { grid-template-columns: minmax(0, 1fr) 16px; }

.product-cost-cell > .product-cell-input,
.product-cost-cell > .product-offers-cost {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 5px;
}

.product-cost-cell > .product-cell-input { text-align: right; }

.product-cost-trend {
  display: inline-flex;
  width: 16px;
  height: 16px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: help;
}

.product-cost-trend.is-up { color: #e5484d; }
.product-cost-trend.is-down { color: #12a150; }
.product-cost-trend.is-mixed { color: #e8790c; }

.product-cost-tooltip {
  position: fixed;
  z-index: 11000;
  display: block;
  width: 340px;
  max-width: calc(100vw - 20px);
  padding: 13px 14px 10px;
  border: 1px solid #dbe2ee;
  border-radius: 10px;
  background: #fff;
  color: #263247;
  box-shadow: 0 14px 38px rgba(15, 23, 42, .18);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
}

.product-cost-tooltip.hidden { display: none; }
.product-cost-tooltip-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid #e7ebf2; }
.product-cost-tooltip-head strong { font-size: 14px; }
.product-cost-tooltip-head > span { padding: 2px 7px; border-radius: 999px; font-weight: 700; }
.product-cost-tooltip-head > span.is-up { color: #cf3f39; background: #fff0ef; }
.product-cost-tooltip-head > span.is-down { color: #087b5d; background: #eaf9f3; }
.product-cost-tooltip-head > span.is-mixed { color: #a56808; background: #fff7e7; }
.product-cost-tooltip-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.product-cost-tooltip-summary span { color: #657186; white-space: nowrap; }
.product-cost-tooltip-summary b { color: #263247; font-size: 13px; }
.product-cost-tooltip-summary b.up { color: #cf3f39; }
.product-cost-tooltip-summary b.down { color: #087b5d; }
.product-cost-history-list { position: relative; display: grid; gap: 0; padding: 2px 0 4px; }
.product-cost-history-row { position: relative; display: grid; grid-template-columns: 14px 1fr auto 72px; align-items: center; gap: 7px; min-height: 32px; }
.product-cost-history-row:not(:last-child)::before { content: ""; position: absolute; top: 21px; bottom: -11px; left: 6px; width: 1px; background: #dfe5ef; }
.product-cost-history-row i { z-index: 1; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: #8792a4; box-shadow: 0 0 0 1px #cbd3df; }
.product-cost-history-row.is-up i { background: #e5484d; }
.product-cost-history-row.is-down i { background: #12a150; }
.product-cost-history-row time { color: #657186; white-space: nowrap; }
.product-cost-history-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.product-cost-history-row em { color: #8792a4; font-style: normal; text-align: right; white-space: nowrap; }
.product-cost-history-row.is-up em { color: #cf3f39; }
.product-cost-history-row.is-down em { color: #087b5d; }
.product-cost-history-empty { padding: 16px; color: #8792a4; text-align: center; }
.product-cost-tooltip > small { display: block; padding-top: 8px; border-top: 1px solid #e7ebf2; color: #8792a4; }

.product-cell-input,
.product-cell-select,
.product-offer-panel input,
.product-offer-panel select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-overflow: ellipsis;
}

.product-cell-input:not([readonly]):hover,
.product-cell-input:not([readonly]):focus,
.product-cell-select:not(:disabled):hover,
.product-cell-select:not(:disabled):focus,
.product-offer-panel input:not([readonly]):focus,
.product-offer-panel select:not(:disabled):focus {
  border-color: #a9baf8;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 91, 219, .08);
}

/* 商品属性只在解锁可编辑时显示下拉三角 */
select.product-cell-select[data-product-field="product_attribute"]:disabled {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 7px;
  background-image: none;
}

.product-supplier-toggle {
  flex: 0 0 auto;
  max-width: 92px;
  padding: 3px 8px;
  border: 0;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.product-supplier-toggle:hover {
  background: #d8f7f1;
  color: #087f73;
}

.product-supplier-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.product-primary-supplier {
  display: block;
  min-width: 0;
  max-width: 150px;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-offers-popover {
  position: fixed;
  z-index: 10015;
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid #d9e0ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(27, 39, 71, .22);
}

.product-offers-popover-head {
  display: flex;
  min-height: 32px;
  padding: 3px 7px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.product-offers-popover-head > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.product-offers-popover-head strong {
  overflow: hidden;
  color: #313b52;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-offers-popover-head span {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 9px;
  font-weight: 700;
}

.product-offers-add {
  flex: 0 0 auto;
  height: 23px;
  padding: 0 6px;
  border: 1px solid #bfd0fb;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

.product-offers-popover-table {
  max-height: min(44vh, 300px);
  overflow: auto;
}

.product-offers-popover-header,
.product-offers-popover-row {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.6fr)
    minmax(58px, .5fr)
    minmax(34px, .34fr)
    minmax(48px, .44fr)
    minmax(70px, .62fr);
  min-width: 420px;
  align-items: center;
}

.product-offers-popover-header {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 22px;
  border-bottom: 1px solid var(--line);
  background: #f5f7fb;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.product-offers-popover-header > span,
.product-offers-popover-row > * {
  min-width: 0;
  margin: 0 2px;
}

.product-offers-popover-row {
  min-height: 28px;
  font-size: 10.5px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.product-offers-popover-row:last-child { border-bottom: 0; }
.product-offers-popover-row:hover { background: #fbfcff; }
.product-offers-popover-row.is-primary { background: #effbf8; }

.product-offers-popover-row input,
.product-offers-popover-row select {
  width: calc(100% - 4px);
  height: 21px;
  padding: 1px 3px;
  border: 1px solid #d7dfec;
  border-radius: 5px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-overflow: ellipsis;
}

.product-offers-popover-row input:not([readonly]):focus,
.product-offers-popover-row select:not(:disabled):focus {
  border-color: #11b8a5;
  box-shadow: 0 0 0 3px rgba(17, 184, 165, .1);
}

.product-offers-popover-row input[readonly],
.product-offers-popover-row select:disabled {
  border-color: transparent;
  background: transparent;
  opacity: 1;
}

.product-offers-supplier {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 2px;
}

.product-offers-supplier select { flex: 1 1 auto; width: auto; margin: 0; font-weight: 680; }
.product-offers-readonly-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-offers-supplier .product-offers-readonly-value { flex: 1 1 auto; font-weight: 680; }
.product-offers-star { flex: 0 0 auto; color: #f4a11a; font-size: 14px; }
.product-offers-cost { color: #0d887d !important; font-weight: 750 !important; font-variant-numeric: tabular-nums; }
.product-offers-tax { color: var(--text); text-align: center; }
.product-offers-status-text { color: #16915f; font-weight: 700; }

.product-offers-popover.is-readonly .product-offers-popover-header,
.product-offers-popover.is-readonly .product-offers-popover-row {
  grid-template-columns: minmax(135px, 1.65fr) 52px 30px 42px 62px;
  min-width: 380px;
}
.product-offers-popover.is-readonly .product-offers-popover-row {
  min-height: 26px;
  font-size: 10px;
}
.product-offers-popover.is-readonly .product-offers-popover-header { min-height: 21px; }
.product-offers-popover.is-readonly .product-offers-status-cell { display: block; }

.product-offers-status-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19px;
  align-items: center;
  gap: 2px;
}

.product-offers-status-cell select { width: 100%; margin: 0; color: #16915f; font-weight: 700; }
.product-offers-delete {
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #c5cad4;
  font-size: 14px;
  cursor: pointer;
}
.product-offers-popover-row:hover .product-offers-delete { border-color: #ffd6d3; background: #fff0ef; color: var(--red); }

.product-offers-popover-foot {
  display: flex;
  min-height: 23px;
  padding: 2px 7px;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.product-offers-save-status[data-state="dirty"] { color: #c87808; font-weight: 700; }
.product-offers-empty { min-width: 380px; padding: 18px; color: var(--muted); text-align: center; }

.product-visible-toggle { display: inline-flex; align-items: center; gap: 5px; }
.product-jd-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #aeb6c5;
  font-family: "Arial Unicode MS", "Helvetica Neue", sans-serif;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.product-jd-link-button:hover { background: #eef3ff; color: var(--blue); }
.product-jd-link-button.has-link { color: var(--blue); }
.product-link-popover {
  position: fixed;
  z-index: 10020;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(27, 39, 71, .22);
}
.product-link-popover-head,
.product-link-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.product-link-popover-head { margin-bottom: 10px; color: var(--text); font-size: 15px; }
.product-link-close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.product-link-close:hover { background: #f1f4f9; color: var(--text); }
.product-link-textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.5;
}
.product-link-textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, .1);
}
.product-link-textarea[readonly] { background: #f7f8fb; color: var(--muted); }
.product-link-popover-foot { margin-top: 10px; }
.product-link-save-status { color: var(--muted); font-size: 11.5px; }
.product-link-save-status[data-state="saved"] { color: #138a5b; }
.product-link-save-status[data-state="error"] { color: var(--red); }
.product-link-open-action {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #c9d5f8;
  border-radius: 6px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.product-note-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  color: #8b95a7;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.product-note-button:hover,
.product-note-button.has-note {
  border-color: #11b8a5;
  background: #ecfbf8;
  color: #089989;
}
.product-note-popover {
  position: fixed;
  z-index: 10020;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(27, 39, 71, .22);
}
.product-note-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 15px;
}
.product-note-close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}
.product-note-close:hover { background: #f1f4f9; color: var(--text); }
.product-note-textarea {
  display: block;
  width: 100%;
  min-height: 132px;
  max-height: 230px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.55;
}
.product-note-textarea:focus {
  border-color: #11b8a5;
  box-shadow: 0 0 0 3px rgba(17, 184, 165, .1);
}
.product-note-textarea[readonly] { background: #f7f8fb; color: var(--muted); }
.product-note-save-status {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11.5px;
}
.product-note-save-status[data-state="saved"] { color: #138a5b; }
.product-note-save-status[data-state="error"] { color: var(--red); }
.product-status-badge { display: inline-flex; padding: 3px 9px; border-radius: 12px; font-size: 11.5px; font-weight: 680; }
.product-status-readonly {
  min-width: 48px;
  justify-content: center;
  border: 1px solid transparent;
  cursor: default;
}
.product-status-readonly.status-unavailable {
  border-color: #ffc9c5;
  color: #d43b35;
  background: #fff0ef;
}
.product-status-control.status-in-stock,
.product-status-badge.status-in-stock { border-color: #bfe9d7 !important; background: #eaf9f2 !important; color: #138a5b !important; }
.product-status-control.status-clearance,
.product-status-badge.status-clearance { border-color: #d8c7ff !important; background: #f5f0ff !important; color: #7447c8 !important; }
.product-status-control.status-out-of-stock,
.product-status-badge.status-out-of-stock { border-color: #f7d7a2 !important; background: #fff6e7 !important; color: #c57508 !important; }
.product-status-control.status-discontinued,
.product-status-badge.status-discontinued { border-color: #ffc9c5 !important; background: #fff0ef !important; color: #d43b35 !important; }
.product-status-control option.status-in-stock { color: #138a5b; }
.product-status-control option.status-clearance { color: #7447c8; }
.product-status-control option.status-out-of-stock { color: #c57508; }
.product-status-control option.status-discontinued { color: #d43b35; }
.product-empty-value { color: #98a2b3; }
.product-link-cell,
.product-document-cell { display: flex; align-items: center; gap: 5px; min-width: 0; }
.product-image-cell { display: flex; align-items: center; gap: 4px; min-width: 0; }
.product-image-preview {
  width: 34px;
  height: 34px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}
.product-image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-image-preview.load-error::after { content: "图片"; color: var(--muted); font-size: 10px; }
.product-share-card-button {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #315bd5;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}
.product-share-card-button:hover { background: transparent; color: #2147b5; }
.product-share-card-button:disabled { background: transparent; color: #b4bac5; cursor: not-allowed; }
.supplier-maintenance-dialog { width: min(820px, calc(100vw - 32px)); max-height: 88vh; padding: 0; border: 1px solid #d8e3f1; border-radius: 18px; background:#fff; box-shadow: 0 24px 80px rgba(20,35,62,.24); }
.supplier-maintenance-dialog::backdrop { background: rgba(16,29,50,.52); }
.supplier-maintenance-permissions { margin: 0 0 14px; padding: 14px; border: 1px solid #dce5f3; border-radius: 12px; background: #fff; }
.supplier-maintenance-permissions legend { padding: 0 6px; color: #243d61; font-weight: 700; }
.supplier-maintenance-permission-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.supplier-maintenance-permission-options > label { display: flex; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid #e3eaf4; border-radius: 9px; cursor: pointer; }
.supplier-maintenance-permission-options > label:has(input:checked) { border-color: #bacbfa; background: #f4f7ff; }
.supplier-maintenance-permission-options input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; margin: 2px 0 0; accent-color: #3b60df; }
.supplier-maintenance-permission-options span { display: grid; gap: 4px; }
.supplier-maintenance-permission-options strong { font-size: 14px; color: #243d61; }
.supplier-maintenance-permission-options small { font-size: 12px; color: #6c7c93; line-height: 1.5; }
#supplierMaintenancePermissionSummary, .supplier-maintenance-link-summary { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #f0f5ff; color: #345783; font-size: 13px; line-height: 1.6; }
#supplierMaintenancePermissionSummary.is-empty { background: #fff5e5; color: #936116; }
.supplier-maintenance-link-summary { margin: 0 0 15px; }
.supplier-link-permissions { line-height: 1.6; overflow-wrap: anywhere; }
.supplier-review-image-change { display: grid; justify-items: start; gap: 5px; }
.supplier-review-image-button, #supplierReviewItemBody .supplier-review-image-button { display: inline-flex; align-items: center; gap: 8px; height: auto; min-height: 76px; padding: 5px; border: 1px solid #dce5f2; border-radius: 8px; background: #fff; color: #365ab1; cursor: pointer; }
.supplier-review-image-button img { width: 64px; height: 64px; object-fit: contain; background: #f7f9fc; border-radius: 5px; }
.supplier-review-image-button span { white-space: nowrap; font-size: 12px; }
.supplier-review-image-change > small, .supplier-review-item-result { display: block; margin-top: 4px; color: #75849a; font-size: 12px; line-height: 1.5; }
@media(max-width:560px) { .supplier-maintenance-permission-options { grid-template-columns: 1fr; } }
.supplier-maintenance-dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 22px; border-bottom:1px solid #e2e8f0; background:linear-gradient(135deg,#f8fbff,#f3f7fc); }.supplier-maintenance-dialog-head h2 { margin:0 0 5px; font-size:20px; color:#17335f; }.supplier-maintenance-dialog-head p { margin:0; color:#718096; }
#supplierMaintenanceDialogBody { max-height: calc(88vh - 88px); overflow:auto; padding:18px 20px; }
.supplier-maintenance-link-card { display:grid; grid-template-columns:190px 1fr; align-items:center; gap:22px; }.supplier-maintenance-link-card>img { width:190px; height:190px; }.supplier-maintenance-link-card label { display:grid; gap:6px; color:#657187; }.supplier-maintenance-link-card input { width:100%; }.supplier-maintenance-link-card p { color:#68778e; line-height:1.7; }.supplier-maintenance-link-card div div { display:flex; gap:10px; }
.supplier-maintenance-picker { display:grid; grid-template-rows:auto 18px auto; gap:8px; }.supplier-maintenance-picker-status { min-width:0; height:18px; line-height:18px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:#718096; font-size:12px; }.supplier-maintenance-search { display:grid; gap:7px; color:#52637d; font-weight:700; }.supplier-maintenance-search input { width:100%; height:44px; border:1px solid #cad7e8; border-radius:10px; padding:0 14px; background:#f9fbfe; font-size:14px; }.supplier-maintenance-picker-list { display:grid; align-content:start; gap:8px; height:clamp(120px, calc(88vh - 250px), 430px); overflow:auto; scrollbar-gutter:stable; padding-right:3px; }.supplier-maintenance-picker-item { width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 15px; border:1px solid #dfe7f2; border-radius:11px; background:#fff; color:#233653; text-align:left; cursor:pointer; }.supplier-maintenance-picker-item:hover { border-color:#8eafe7; background:#f4f8ff; }.supplier-maintenance-picker-item span { display:grid; gap:4px; }.supplier-maintenance-picker-item strong { font-size:14px; }.supplier-maintenance-picker-item small { color:#8190a5; font-weight:400; }.supplier-maintenance-picker-item b { color:#2862c8; white-space:nowrap; }.supplier-maintenance-empty { padding:42px 16px; text-align:center; color:#8794a7; background:#f8fafc; border-radius:10px; }
.supplier-maintenance-review-list { display:grid; gap:10px; }.supplier-maintenance-review-list article { display:flex; align-items:center; gap:16px; padding:13px 14px; border:1px solid #dfe6f0; border-radius:10px; }.supplier-maintenance-review-list article>div { display:grid; min-width:240px; }.supplier-maintenance-review-list span,.supplier-maintenance-review-list p { color:#718096; font-size:11px; }.supplier-maintenance-review-list p { flex:1; margin:0; }
.supplier-maintenance-detail { overflow:auto; }.supplier-maintenance-detail table { width:100%; min-width:760px; border-collapse:collapse; }.supplier-maintenance-detail th,.supplier-maintenance-detail td { padding:10px; border-bottom:1px solid #e6ebf2; text-align:left; }.supplier-maintenance-detail td small { display:block; color:#7b8799; }.supplier-maintenance-review-actions { display:flex; justify-content:flex-end; gap:10px; padding-top:16px; }
@media(max-width:700px){.supplier-maintenance-link-card{grid-template-columns:1fr}.supplier-maintenance-link-card>img{margin:auto}.supplier-maintenance-review-list article{align-items:flex-start;flex-direction:column}.supplier-maintenance-review-list article>div{min-width:0}}
.product-image-upload,
.product-image-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 6px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.product-share-card-panel { width: min(1060px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: hidden; }
.product-share-card-panel .modal-bar > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.product-share-card-panel .modal-bar span { overflow: hidden; color: #7b8799; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-share-card-body { display: grid; min-height: 0; grid-template-columns: minmax(320px, 1fr) 300px; gap: 22px; padding: 20px 22px; overflow: auto; background: #f4f6fa; }
.product-share-card-preview { display: flex; min-height: 0; align-items: center; justify-content: center; padding: 16px; border: 1px solid #e3e8f1; border-radius: 14px; background: #e9edf4; }
.product-share-card-preview canvas { display: block; width: auto; max-width: 100%; height: min(62vh, 620px); max-height: 100%; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(28, 42, 68, .12); }
.product-share-card-controls { align-self: start; padding: 20px; border: 1px solid #e0e6ef; border-radius: 14px; background: #fff; }
.product-share-card-controls h3 { margin: 0 0 18px; color: #24324a; font-size: 17px; }
.product-share-card-controls > label:not(.product-share-switch) { display: grid; gap: 7px; color: #667085; font-size: 13px; font-weight: 650; }
.product-share-card-controls select { height: 42px; border: 1px solid #d8dee9; border-radius: 9px; background: #fff; color: #263248; padding: 0 11px; }
.product-share-switch { display: flex; align-items: center; gap: 9px; margin-top: 17px; color: #354158; font-size: 14px; cursor: pointer; }
.product-share-switch input { width: 17px; height: 17px; accent-color: #3e60df; }
.product-share-security-note { margin-top: 22px; padding: 12px; border-radius: 9px; background: #eef8f3; color: #26805a; font-size: 12px; line-height: 1.6; }
.product-share-card-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid #e5e9f0; background: #fff; }
@media (max-width: 760px) {
  .product-share-card-body { grid-template-columns: 1fr; }
  .product-share-card-preview canvas { height: auto; max-height: 58vh; }
}
.product-image-upload input { display: none; }
.product-image-upload.disabled { color: var(--muted); opacity: .55; cursor: default; }
.product-image-remove { border-style: solid; border-color: #ffd4d1; background: var(--red-soft); color: var(--red); }
.product-image-remove {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
}
.product-image-hover-preview {
  position: fixed;
  z-index: 10000;
  display: none;
  aspect-ratio: 1;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .24);
  pointer-events: none;
}
.product-image-hover-preview.show { display: block; }
.product-image-hover-preview img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.product-image-hover-preview span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 7px;
  border-radius: 5px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: 10px;
}
.product-image-hover-preview.loading img { opacity: 0; }
.product-image-hover-preview.loading::before {
  content: "图片加载中";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.product-link-cell .product-link-input { min-width: 0; flex: 1 1 auto; }
.product-link-open,
.product-document-state,
.product-document-upload,
.product-document-remove {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.product-link-open:not(:disabled),
.product-document-state.has-file,
.product-document-upload:not(.disabled) { color: var(--blue); cursor: pointer; }
.product-document-state { min-width: 0; max-width: 86px; overflow: hidden; text-overflow: ellipsis; }
.product-document-upload input { display: none; }
.product-document-upload.disabled { opacity: .55; cursor: default; }
.product-document-remove { border-color: #ffd4d1; background: var(--red-soft); color: var(--red); cursor: pointer; }
.product-attachment-trigger { min-width: 32px; max-width: 118px; cursor: pointer; font-variant-numeric: tabular-nums; }
.product-attachment-popover { position: fixed; z-index: 120; overflow: hidden; border: 1px solid #cfd7e6; border-radius: 10px; background: #fff; box-shadow: 0 16px 42px rgba(31, 42, 68, .22); color: var(--text); }
.product-attachment-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.product-attachment-head > div { display: flex; align-items: baseline; gap: 9px; }
.product-attachment-head span { color: var(--muted); font-size: 11px; }
.product-attachment-add { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid #9db1f4; border-radius: 7px; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700; cursor: pointer; }
.product-attachment-add input { display: none; }
.product-attachment-add.disabled { opacity: .5; cursor: not-allowed; }
.product-attachment-list { max-height: 330px; overflow-y: auto; padding: 6px; }
.product-attachment-row { display: grid; grid-template-columns: 58px 46px minmax(140px, 1.3fr) 126px minmax(120px, 1fr) 46px; align-items: center; gap: 6px; padding: 6px; border-bottom: 1px solid #edf0f5; }
.product-attachment-row:last-child { border-bottom: 0; }
.product-attachment-row.is-current { border-radius: 7px; background: #f0f8f5; }
.product-attachment-row input:not([type="radio"]) { min-width: 0; height: 30px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
.product-attachment-current { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.product-attachment-open,
.product-attachment-delete { height: 28px; padding: 0 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--blue); font-size: 11px; cursor: pointer; }
.product-attachment-delete { border-color: #ffd4d1; color: var(--red); }
.product-attachment-empty { padding: 28px 12px; color: var(--muted); text-align: center; }
.product-attachment-foot { display: flex; justify-content: space-between; gap: 14px; padding: 8px 13px; border-top: 1px solid var(--line); background: #fafbfc; color: var(--muted); font-size: 10px; }
@media (max-width: 760px) {
  .product-attachment-row { grid-template-columns: 54px 42px minmax(120px, 1fr); }
  .product-attachment-date, .product-attachment-note { grid-column: span 1; }
  .product-attachment-delete { grid-column: 3; justify-self: end; }
}
/* Certificate uploads remain visible until the operator confirms the result. */
.product-attachment-popover { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); box-sizing: border-box; }
.product-attachment-popover.hidden { display: none; }
.product-attachment-head { flex: 0 0 auto; flex-wrap: wrap; }
.product-attachment-head .product-attachment-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.product-attachment-popover button[data-attachment-close],
.product-attachment-popover button[data-attachment-unlock],
.product-attachment-popover button[data-attachment-refresh],
.product-attachment-popover button[data-attachment-retry],
.product-attachment-popover button[data-attachment-remove-selection] { min-height: 30px; padding: 3px 9px; border: 1px solid #b7c8e5; border-radius: 6px; background: #fff; color: #254d83; font-size: 12px; cursor: pointer; }
.product-attachment-popover button:disabled { opacity: .55; cursor: not-allowed; }
.product-attachment-context { flex: 0 0 auto; margin: 0; padding: 6px 13px; color: #53627b; font-size: 12px; overflow-wrap: anywhere; }
.product-attachment-feedback { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 13px; color: #365b87; background: #f4f8fe; font-size: 12px; overflow-wrap: anywhere; }
.product-attachment-jobs { flex: 0 1 auto; max-height: 24dvh; overflow: auto; padding: 7px 13px; border-bottom: 1px solid var(--line); }
.product-attachment-job { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(140px, 1.6fr); gap: 8px; padding: 5px 0; font-size: 12px; overflow-wrap: anywhere; }
.product-attachment-job strong { min-width: 0; font-weight: 500; }
.product-attachment-job button[data-attachment-remove-selection] { margin-left: 7px; min-height: 26px; color: #8f3431; border-color: #e8bebb; }
.product-attachment-uncertain-hint { display: block; margin-top: 3px; font-size: 11px; }
.product-attachment-job.is-saved { color: #167445; }
.product-attachment-job.is-error, .product-attachment-job.is-invalid { color: #ab302d; }
.product-attachment-job.is-unknown { color: #965611; }
.product-attachment-list { min-height: 0; flex: 1 1 auto; }
.product-attachment-foot { flex: 0 0 auto; flex-wrap: wrap; gap: 4px 14px; }
@media (max-width: 760px) {
  .product-attachment-job { grid-template-columns: 1fr; gap: 2px; }
  .product-attachment-context, .product-attachment-feedback, .product-attachment-jobs { padding-left: 9px; padding-right: 9px; }
}
/* Compact 3C / quality originals: normal rows stay short; metadata opens on demand. */
.product-attachment-popover { font-size: 12px; }
.product-attachment-head { flex-wrap: nowrap; gap: 8px; padding: 8px 10px; }
.product-attachment-head > div { min-width: 0; gap: 6px; }
.product-attachment-head strong { white-space: nowrap; font-size: 13px; }
.product-attachment-head span { white-space: nowrap; }
.product-attachment-head .product-attachment-controls { flex-wrap: nowrap; flex: 0 0 auto; gap: 5px; }
.product-attachment-popover .product-attachment-add { min-height: 28px; padding: 0 8px; white-space: nowrap; }
.product-attachment-popover button[data-attachment-close],
.product-attachment-popover button[data-attachment-refresh] { min-width: 28px; min-height: 28px; padding: 2px 7px; }
.product-attachment-popover button[data-attachment-close] { font-size: 18px; line-height: 20px; }
.product-attachment-context { padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-attachment-feedback { padding: 6px 10px; }
.product-attachment-feedback.is-error { color: #a33131; background: #fff4f3; }
.product-attachment-feedback[hidden], .product-attachment-details[hidden] { display: none; }
.product-attachment-list { max-height: min(330px, 54dvh); padding: 5px 8px; }
.product-attachment-entry + .product-attachment-entry { border-top: 1px solid #edf0f5; }
.product-attachment-row { grid-template-columns: 28px minmax(0, 1fr); min-height: 38px; gap: 5px; padding: 5px 4px; border: 0; }
.product-attachment-actions { grid-column: 2; display: flex; justify-content: flex-end; gap: 5px; min-width: 0; }
.product-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #24476c; font-size: 12px; }
.product-attachment-row.is-current .product-attachment-current { color: #15816c; font-weight: 600; }
.product-attachment-row .product-attachment-open,
.product-attachment-row .product-attachment-more,
.product-attachment-row .product-attachment-delete { flex: 0 0 40px; min-width: 0; width: 40px; min-height: 28px; height: 28px; padding: 0 3px; font-size: 11px; white-space: nowrap; }
.product-attachment-more { border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #52657f; cursor: pointer; }
.product-attachment-more[aria-expanded="true"] { color: var(--blue); background: var(--blue-soft); }
.product-attachment-details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: end; padding: 8px 5px; background: #f7f9fc; border-radius: 6px; }
.product-attachment-details > label:not(.product-attachment-current) { display: grid; gap: 4px; min-width: 0; color: #64748b; font-size: 11px; }
.product-attachment-details input:not([type="radio"]) { width: 100%; box-sizing: border-box; min-width: 0; height: 30px; padding: 0 6px; font-size: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.product-attachment-details .product-attachment-current { min-height: 30px; margin: 0; }
.product-attachment-details .product-attachment-delete { min-width: 0; padding: 0 6px; }
.product-attachment-foot { padding: 6px 10px; gap: 3px 10px; font-size: 10px; }
.product-attachment-empty { padding: 14px 10px; }
.product-attachment-popover .product-attachment-job { grid-template-columns: 1fr; gap: 2px; }
@media (max-width: 480px) {
  .product-attachment-row { gap: 5px; }
  .product-attachment-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .product-attachment-details .product-attachment-delete { justify-self: end; grid-column: 2; }
  .product-attachment-foot { gap: 2px 6px; }
}
.product-offer-detail > td { height: auto; padding: 0 !important; background: #f8fafc !important; }
.product-offer-panel { padding: 12px 18px 14px; }
.product-offer-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.product-offer-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.product-offer-table-wrap table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.product-offer-table-wrap th,
.product-offer-table-wrap td { position: static; height: 38px; background: #fff; }
.product-offer-table-wrap th { background: #eef2f7; }
.product-table-footer { display: grid; grid-template-columns: minmax(110px, 1fr) auto minmax(210px, 1fr); align-items: center; gap: 14px; min-height: 52px; padding: 6px 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; background: #fff; color: var(--muted); }
.product-pagination { display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.product-pagination label { display: flex; align-items: center; gap: 6px; }
.product-pagination select { min-height: 32px; padding: 0 26px 0 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); }
.product-pagination button { min-height: 32px; }
.product-pagination button:disabled { opacity: .45; cursor: not-allowed; }
.product-page-numbers { display: flex; align-items: center; gap: 4px; }
.product-page-button { min-width: 32px; min-height: 32px; padding: 0 7px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); cursor: pointer; }
.product-page-button:hover { border-color: #94aaf9; color: var(--blue); }
.product-page-button.active { border-color: var(--blue); background: var(--blue); color: #fff; }
.product-page-ellipsis { padding: 0 2px; }
.product-price-note { justify-self: end; }
@media (max-width: 900px) {
  .product-table-footer { grid-template-columns: 1fr auto; }
  .product-pagination { justify-content: flex-end; }
  .product-price-note { display: none; }
}

.product-edit-modal-panel { width: min(520px, calc(100vw - 28px)); }
.product-edit-modal-body { padding: 18px; }
.product-edit-modal-body p { margin: 0 0 14px; color: var(--muted); }
.product-edit-modal-body label { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; font-weight: 650; }
.product-edit-modal-body .actions { justify-content: flex-end; margin-top: 16px; }

.portal-product-result:not(.empty) {
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.portal-product-table-wrap {
  position: relative;
  max-height: calc(100vh - 360px);
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
}
.portal-product-table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.portal-product-table-wrap::-webkit-scrollbar-track { background: #eef1f6; }
.portal-product-table-wrap::-webkit-scrollbar-thumb { border: 2px solid #eef1f6; border-radius: 999px; background: #b4bdcb; }
.portal-product-table-wrap::-webkit-scrollbar-thumb:hover { background: #8f9aaa; }
.portal-product-table { width: max-content; min-width: 100%; border-collapse: collapse; table-layout: auto; }
#customer .portal-product-table {
  width: 100%;
  min-width: max(100%, var(--portal-product-min-width, 960px));
  table-layout: fixed;
}
#customer .portal-product-table th,
#customer .portal-product-table td {
  box-sizing: border-box;
  min-width: 0;
  max-width: none;
}
.portal-product-table th,
.portal-product-table td { height: 46px; padding: 8px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.portal-product-table.columns-medium th,
.portal-product-table.columns-medium td { padding-right: 11px; padding-left: 11px; }
.portal-product-table.columns-many th,
.portal-product-table.columns-many td { height: 44px; padding: 6px 9px; }
.portal-product-table th { position: sticky; top: 0; z-index: 2; background: #f5f7fb; color: var(--muted); }
.portal-product-image-cell { width: 62px; min-width: 62px; }
.portal-product-thumbnail { display: block; width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; }
.portal-product-image-hover { display: inline-flex; align-items: center; justify-content: center; }
.portal-product-image-preview {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 3000;
  width: min(440px, 72vw);
  height: min(440px, 72vw);
  padding: 8px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(20, 31, 50, .3);
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.portal-product-image-hover:hover .portal-product-image-preview { display: block; }
.portal-product-text { overflow: hidden; text-overflow: ellipsis; }
.portal-product-field-brand { min-width: 76px; max-width: 150px; }
.portal-product-field-product_name { min-width: 210px; max-width: 380px; }
#customer .portal-product-field-product_name {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
}
#customer .portal-product-name-cell > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#customer .portal-product-field-model {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}
#customer .portal-product-field-barcode {
  width: 154px;
  min-width: 154px;
  max-width: 154px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#customer .portal-product-barcode-cell > span {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portal-product-fast-tooltip {
  position: fixed;
  z-index: 12000;
  width: max-content;
  max-width: min(520px, calc(100vw - 20px));
  padding: 7px 10px;
  border: 1px solid #ccd6e6;
  border-radius: 7px;
  color: #25324a;
  background: #fff;
  box-shadow: 0 10px 28px rgba(28, 41, 70, .2);
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.portal-product-fast-tooltip.hidden { display: none; }
.portal-product-field-category { min-width: 90px; max-width: 160px; }
.portal-product-field-model { min-width: 128px; max-width: 230px; }
.portal-product-field-barcode { min-width: 126px; max-width: 165px; }
.portal-product-field-customer_price,
.portal-product-field-jd_price { min-width: 86px; }
.portal-product-field-tax_mode,
.portal-product-field-free_shipping,
.portal-product-field-status,
.portal-product-field-jd_link { min-width: 68px; }
.portal-product-note { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.portal-product-price { color: var(--blue); font-weight: 750; font-variant-numeric: tabular-nums; }
.portal-product-link-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #b9c9f4;
  border-radius: 7px;
  color: #315fe0;
  background: #eef3ff;
  transition: background-color .12s ease, transform .12s ease;
}
.portal-product-link-icon:hover {
  background: #dfe8ff;
  transform: translateY(-1px);
}
.portal-product-link-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.portal-product-empty { padding: 52px; color: var(--muted); text-align: center; }

@media (max-width: 1560px) {
  #products .product-topbar { align-items: flex-start; flex-wrap: wrap; }
  #products .product-topbar .top-actions { width: 100%; overflow-x: auto; }
  .product-toolbar-panel { align-items: stretch; flex-direction: column; }
  .product-search-group { flex: 0 0 auto; }
  .product-action-group { overflow: visible; }
}

@media (max-width: 760px) {
  #products .product-topbar .top-actions { align-items: stretch; flex-wrap: wrap; overflow: visible; }
  .product-summary-strip { display: grid; flex: 1 1 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; width: 100%; }
  .product-summary-strip > div,
  .product-summary-strip > button { width: auto; min-width: 0; }
  .product-summary-strip > :last-child { grid-column: 1 / -1; }
  .product-search-group { flex-wrap: wrap; }
  .product-search-group input { flex-basis: 100%; min-width: 0; }
  .product-search-group .product-price-filter-input { flex: 1 1 120px; width: auto; min-width: 0; }
}

#authorizations .authorization-list-panel {
  padding: 0;
}

.nav::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  height: auto;
  border-radius: 0 3px 3px 0;
  background: transparent;
}

.nav:hover {
  border-color: transparent;
  background: #eef2f8;
  color: var(--text);
}

.nav.active {
  border-color: transparent;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 680;
}

.nav.active::before {
  background: var(--blue);
}

.logout-nav {
  margin-top: 8px;
  border-top: 1px solid var(--sidebar-line);
  color: var(--red);
}

.logout-nav:hover {
  border-color: transparent;
  background: var(--red-soft);
  color: var(--red);
}

.main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: calc(100vw - 222px);
  min-width: 0;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

.view {
  display: none;
  min-width: 0;
}

.view.active {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding-bottom: 26px;
  overflow-x: hidden;
  overflow-y: auto;
}

.view > :not(.topbar) {
  width: auto;
  max-width: none;
  margin-right: 30px;
  margin-left: 30px;
}

/* Page title bars */
.topbar,
#orders .topbar,
#statistics .topbar,
#funds .topbar,
#entry .topbar {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 18px 30px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.topbar > div:first-child {
  min-width: 0;
}

h1,
.topbar h1,
#orders .topbar h1,
#statistics .topbar h1,
#funds .topbar h1,
#entry .topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 720;
  line-height: 1.25;
}

p,
.topbar p,
#orders .topbar p,
#statistics .topbar p,
#funds .topbar p,
#entry .topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.top-actions,
.topbar .top-actions,
.topbar > button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
}

#orders .top-actions .doc-action-btn {
  border-width: 1px;
  border-style: solid;
  box-shadow: 0 2px 5px rgba(31, 42, 68, .06);
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

#orders .top-actions .doc-action-sales {
  border-color: #9bd9bd;
  background: #eaf8f1;
  color: #147a50;
}

#orders .top-actions .doc-action-purchase {
  border-color: #adc2f5;
  background: #eef3ff;
  color: #315fcb;
}

#orders .top-actions .doc-action-logistics {
  border-color: #9bd5df;
  background: #ecf8fb;
  color: #14758a;
}

#orders .top-actions .doc-action-contract {
  border-color: #e3c27f;
  background: #fff6e6;
  color: #996315;
}

#orders .top-actions .order-h5-trigger {
  border-color: #c9b4ef;
  background: #f4efff;
  color: #7048b8;
}

#orders .top-actions .doc-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 11px rgba(31, 42, 68, .11);
}

#orders .top-actions .doc-action-sales:hover {
  border-color: #68c292;
  background: #d9f3e6;
  color: #0d6741;
}

#orders .top-actions .doc-action-purchase:hover {
  border-color: #7899e8;
  background: #dfe8ff;
  color: #244eaf;
}

#orders .top-actions .doc-action-logistics:hover {
  border-color: #64bdca;
  background: #daf2f6;
  color: #0d6475;
}

#orders .top-actions .doc-action-contract:hover {
  border-color: #cfa451;
  background: #ffedcc;
  color: #7d4e0c;
}

#orders .top-actions .order-h5-trigger:hover {
  border-color: #a887df;
  background: #e9ddff;
  color: #59349c;
}

/* Shared controls */
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wb-surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input,
select {
  height: 34px;
  padding: 0 11px;
}

textarea {
  padding: 9px 11px;
  line-height: 1.55;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c7d0dd;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 91, 219, .1);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  box-shadow: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 620;
  line-height: 1;
  white-space: nowrap;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

button:focus-visible {
  outline: 3px solid rgba(59, 91, 219, .16);
  outline-offset: 1px;
}

.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.primary:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
  box-shadow: 0 4px 10px rgba(59, 91, 219, .16);
}

.ghost {
  border-color: var(--line);
  background: #ffffff;
  color: #3f4a5a;
}

.ghost:hover {
  border-color: #c9d2df;
  background: var(--wb-surface-2);
  color: var(--text);
}

.danger {
  border-color: #f3cecc;
  background: var(--red-soft);
  color: var(--red);
}

.danger:hover {
  border-color: #e8b4b1;
  background: #f9e2e0;
}

.compact-btn {
  height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 12.5px;
}

button:disabled {
  opacity: .48;
  cursor: not-allowed;
}

/* Cards and section headers */
.panel,
.tablewrap,
.stats-search-panel,
.stats-orders-panel,
.orders-control-panel,
.finance-customers-wrap,
.finance-ledger-wrap,
.stats-orders-wrap,
.supplier-orders-wrap,
.customer-result:not(.empty) {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--wb-shadow);
}

.panel {
  margin-bottom: 14px;
  padding: 14px 16px;
}

.panel + .panel {
  margin-top: 2px;
}

.panel-title {
  display: flex;
  align-items: center;
  min-height: 20px;
  margin: 0 0 11px;
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 680;
}

.panel-title::before {
  content: "";
  width: 4px;
  height: 15px;
  flex: 0 0 4px;
  margin-right: 9px;
  border-radius: 3px;
  background: var(--blue);
}

.result-title {
  display: flex;
  justify-content: space-between;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.result-title::before {
  display: none;
}

.result-title-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.result-count,
.tag {
  border: 1px solid #dbe2fb;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
}

/* Dashboard */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(128px, 1fr));
  gap: 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.metrics div {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--wb-shadow);
}

.metrics div:nth-child(1) {
  border-color: #caece7;
  background: #f1fbf9;
}

.metrics div:nth-child(2) {
  border-color: #f1deb9;
  background: #fffaf0;
}

.metrics div:nth-child(3) {
  border-color: #d6e1fa;
  background: #f3f6ff;
}

.metrics div:nth-child(4) {
  border-color: #eddadd;
  background: #fff7f7;
}

.metrics span {
  color: var(--muted);
  font-size: 12px;
}

.metrics strong {
  margin-top: 7px;
  color: var(--text);
  font-size: 25px;
  font-weight: 730;
  font-variant-numeric: tabular-nums;
}

#mToday { color: var(--teal); }
#mReview { color: var(--amber); }
#mSent { color: var(--blue); }
#mIssue { color: var(--red); }

/* Dense operational tables */
.tablewrap,
.stats-orders-wrap,
.finance-customers-wrap,
.finance-ledger-wrap,
.supplier-orders-wrap {
  overflow: auto;
}

table:not(.doc-table) {
  border-collapse: collapse;
  color: var(--text);
  font-size: 12.5px;
}

table:not(.doc-table) th {
  height: 34px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  background: #f6f8fc;
  color: #566173;
  font-size: 12px;
  font-weight: 660;
  white-space: nowrap;
}

table:not(.doc-table) td {
  padding: 6px 9px;
  border-bottom: 1px solid #eef1f6;
  background: #ffffff;
  vertical-align: middle;
}

table:not(.doc-table) tbody tr:nth-child(even) td {
  background: #fcfdff;
}

table:not(.doc-table) tbody tr:hover td {
  background: #f7f9fe;
}

table:not(.doc-table) tbody tr:has(input.row-check:checked) td,
table:not(.doc-table) tbody tr:has(input.entry-row-check:checked) td {
  background: var(--blue-soft);
}

.orders-table th,
.orders-table td,
.entry-result-table th,
.entry-result-table td,
.supplier-orders-table th,
.supplier-orders-table td,
.portal-orders-table th,
.portal-orders-table td {
  height: 32px;
  padding: 4px 6px;
}

.orders-table td input,
.orders-table td select,
.orders-table td textarea,
.entry-result-table .entry-edit-input {
  border-radius: 7px;
}

.orders-table input[readonly],
.orders-table textarea[readonly],
.orders-table input:disabled,
.orders-table textarea:disabled,
.orders-table select:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--text);
  opacity: 1;
}

/* Order entry */
#entry .entry-input-panel {
  padding: 12px 14px;
}

#entry .entry-live-layout { display:grid; grid-template-columns:minmax(580px,1.05fr) minmax(520px,.95fr); gap:14px; align-items:stretch; }
#entry .entry-live-source { min-width:0; }
#entry .entry-live-preview { min-width:0; padding-left:14px; border-left:1px solid #e1e7f1; }
#entry .entry-live-preview-head { display:flex; align-items:center; justify-content:space-between; min-height:24px; margin-bottom:5px; }
#entry .entry-live-preview-head strong { color:#27344b; font-size:11px; }
#entry .entry-live-preview-head span { color:#168555; font-size:9px; font-weight:800; }
#entry .entry-live-preview-fields { display:grid; grid-template-columns:1fr 1fr; grid-template-rows:repeat(4,30px); grid-auto-flow:column; gap:5px 10px; }
#entry .entry-live-preview-fields.empty { display:grid; place-items:center; min-height:135px; color:#8b97a9; font-size:11px; }
#entry .entry-live-preview-fields label { display:grid; grid-template-columns:62px minmax(0,1fr); align-items:center; gap:6px; color:#65728a; font-size:9px; font-weight:700; }
#entry .entry-live-preview-fields label span { white-space:nowrap; }
#entry .entry-live-preview-fields input { width:100%; min-width:0; height:29px; padding:0 8px; border:1px solid #d6deeb; border-radius:7px; background:#fbfcff; color:#26344c; font-size:10px; font-weight:600; }
#entry .entry-live-preview-fields input:focus { border-color:#4a6ee0; box-shadow:0 0 0 2px rgba(74,110,224,.12); outline:0; }
#entry .entry-live-preview-nav { display:flex; align-items:center; justify-content:flex-end; gap:6px; margin-top:6px; color:#738097; font-size:9px; }
#entry .entry-live-preview-nav button { height:25px; padding:0 7px; font-size:9px; }
@media (max-width:1380px) { #entry .entry-live-layout { grid-template-columns:1fr; } #entry .entry-live-preview { padding-top:10px; padding-left:0; border-top:1px solid #e1e7f1; border-left:0; } }

#entry .entry-input-panel .archive-select-row {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(280px, 360px) minmax(430px, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}

#entry .entry-input-panel .archive-select-row > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: #5b6675;
  font-size: 12.5px;
  font-weight: 590;
  white-space: nowrap;
}

#entry .entry-input-panel .archive-select-row input {
  width: 100%;
  min-width: 0;
}

#entry .entry-import-inline {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  justify-self: stretch;
  min-width: 0;
}

#entry .entry-template-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 13px;
  border: 1px solid #cdd7ea;
  border-radius: 8px;
  background: #fff;
  color: #315fd6;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

#entry .entry-template-download:hover {
  border-color: #89a7f7;
  background: #f4f7ff;
}

#entry .entry-import-inline > span {
  color: #5b6675;
  font-weight: 590;
  white-space: nowrap;
}

#entry .entry-import-inline input[type="file"],
#orders .orders-logistics-panel input[type="file"] {
  width: 100%;
  min-width: 0;
  height: 34px;
  overflow: hidden;
  padding: 0;
  border-radius: 8px;
  background: var(--wb-surface-2);
  color: #697586;
  line-height: 32px;
}

#entry .entry-import-inline input[type="file"]::file-selector-button,
#orders .orders-logistics-panel input[type="file"]::file-selector-button {
  height: 32px;
  margin-right: 9px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #eef1f7;
  color: #465166;
  font: inherit;
  font-weight: 620;
}

#entry .entry-parse-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
}

#entry #rawInput {
  width: 100%;
  min-height: 62px;
  max-height: 116px;
  resize: vertical;
}

#entry .entry-inline-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

#entry .entry-result-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 260px;
  max-height: none;
  overflow: hidden;
}

#entry #parseResult {
  flex: 1 1 auto;
  min-height: 180px;
  overflow: auto;
}

/* Order management */
.orders-overview {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 176px;
  margin-bottom: 16px !important;
  padding: 24px 36px;
  overflow: hidden;
  border: 1px solid rgba(61, 83, 167, .28);
  border-radius: 8px;
  background: linear-gradient(112deg, #222c4b 0%, #30437e 57%, #4965d9 100%);
  box-shadow: 0 14px 32px rgba(45, 63, 128, .18);
  color: #ffffff;
}

.orders-overview::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 31%;
  background: linear-gradient(135deg, transparent 0 34%, rgba(255, 255, 255, .055) 34% 60%, rgba(255, 255, 255, .025) 60%);
  pointer-events: none;
}

.orders-overview-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.orders-overview-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .15);
  color: #ffffff;
  font-size: 20px;
}

.orders-overview-heading strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.orders-overview-heading > div > span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .68);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.orders-overview-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 42px;
  margin-top: 22px;
}

.orders-overview-stats > span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 4px;
}

.orders-overview-stats small {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
}

.orders-overview-stats b {
  color: #ffffff;
  font-size: 26px;
  font-weight: 730;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.orders-overview-stats em {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-style: normal;
}

#orders .orders-control-panel {
  overflow: hidden;
  margin-bottom: 12px;
}

#orders .orders-control-panel .filters {
  display: grid;
  grid-template-columns: 190px 190px minmax(280px, 600px) 74px auto auto;
  align-items: center;
  justify-content: start;
  gap: 9px;
  margin: 0;
  padding: 10px 14px;
  overflow: visible;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

#orders .orders-control-panel .filters > input,
#orders .orders-control-panel .filters #fQ,
#orders .orders-control-panel .date-filter-label input,
#orders .orders-control-panel #searchBtn {
  height: 34px;
}

#orders .orders-control-panel .date-filter-label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #5b6675;
  font-size: 12.5px;
  font-weight: 590;
  white-space: nowrap;
}

#orders .orders-control-panel .filters #fQ {
  width: 100%;
  min-width: 0;
}

#orders .orders-control-panel #searchBtn,
#statistics #statsSearchBtn {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

#orders .orders-control-panel #searchBtn:hover,
#statistics #statsSearchBtn:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

#orders .orders-control-panel .toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  color: #697586;
  font-size: 12.5px;
  white-space: nowrap;
}

#orders .orders-control-panel .toggle-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

#orders .orders-control-panel .order-edit-lockbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin: 0;
  padding: 7px 14px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--wb-surface-2);
  box-shadow: none;
}

.order-lock-trigger {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 11px;
  border: 1px solid #f0d39e;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #9a6009;
  box-shadow: none;
}

.order-lock-trigger:hover {
  border-color: #e6bd72;
  background: #ffefcf;
}

.order-lock-trigger.unlocked {
  border-color: #bce1d9;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.order-lock-trigger.unlocked:hover {
  border-color: #91d6ca;
  background: #dff5f1;
}

.order-lock-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
}

.order-lock-help {
  min-width: 0;
  overflow: hidden;
  color: #7b8697;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .orders-logistics-panel {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) minmax(340px, 440px);
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin: 0;
  padding: 8px 14px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}

#orders .orders-logistics-panel .panel-title {
  min-width: 0;
  margin: 0;
  padding: 0;
  border-left: 0;
  white-space: nowrap;
}

#orders .orders-logistics-panel .panel-title::before {
  background: var(--teal);
}

#orders .orders-logistics-panel .order-count-summary {
  min-width: max-content;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

#orders .orders-logistics-panel p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .orders-logistics-panel .actions {
  display: grid;
  grid-template-columns: 112px minmax(120px, 1fr) 112px;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

#orders .orders-logistics-panel .actions input[type="file"] {
  width: 100%;
  min-width: 0;
}

#orders .orders-logistics-panel .actions .logistics-template-link,
#orders .orders-logistics-panel .actions #importLogisticsBtn {
  width: 100%;
  min-width: 0;
  padding-right: 8px;
  padding-left: 8px;
  white-space: nowrap;
}

#orders > .tablewrap {
  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  min-height: 220px;
  max-height: none;
  overscroll-behavior: contain;
}

#orders .orders-table thead {
  position: sticky;
  top: 0;
  z-index: 50;
}

#orders .orders-table thead th {
  position: relative;
  z-index: 1;
  background: #f3f5f8;
  box-shadow: inset 0 -1px 0 #d8dde6, 0 3px 8px rgba(24, 35, 53, .08);
  opacity: 1;
}

#orders .orders-table tbody {
  position: relative;
  z-index: 1;
}

#orders .orders-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 14px;
  margin-top: 10px;
  border: 1px solid #d9dde4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(20, 29, 45, .05);
  color: #596273;
  font-size: 13px;
}
#orders .orders-pager-summary {
  white-space: nowrap;
  font-weight: 600;
  color: #4b5565;
}
#orders .orders-pager-controls,
#orders .orders-page-size,
#orders .orders-page-jump,
#orders .orders-page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}
#orders .orders-pager button,
#orders .orders-pager select,
#orders .orders-pager input {
  height: 34px;
  min-height: 34px;
  border-color: #d7dce5;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  font-size: 13px;
}
#orders .orders-pager button {
  min-width: 56px;
  padding: 0 12px;
}
#orders .orders-page-numbers button {
  min-width: 34px;
  padding: 0 9px;
}
#orders .orders-page-numbers button.active {
  border-color: #173f7a;
  background: #173f7a;
  color: #fff;
}
#orders .orders-pager select {
  min-width: 76px;
  padding: 0 26px 0 10px;
}
#orders .orders-page-jump input {
  width: 56px;
  padding: 0 7px;
  text-align: center;
}
#orders .orders-page-ellipsis {
  min-width: 18px;
  text-align: center;
  color: #8992a2;
}
@media (max-width: 980px) {
  #orders .orders-pager {
    align-items: flex-start;
    flex-direction: column;
  }
  #orders .orders-pager-controls {
    width: 100%;
    flex-wrap: wrap;
  }
}

/* 2026-09-10: staged-order prices are real order-only edit controls. */
#entry .entry-result-table .entry-head-purchase_price,
#entry .entry-result-table .entry-cell-purchase_price { min-width: 166px; }
#entry .entry-result-table .entry-head-sale_price,
#entry .entry-result-table .entry-cell-sale_price { min-width: 150px; }
#entry .entry-result-table .entry-cell-purchase_price,
#entry .entry-result-table .entry-cell-sale_price,
#entry .entry-result-table .entry-cell-purchase_price .entry-cost-status-wrap,
#entry .entry-result-table .entry-cell-sale_price .entry-cost-status-wrap {
  overflow: visible;
}
#entry .entry-result-table .entry-cell-purchase_price .entry-cost-status-wrap,
#entry .entry-result-table .entry-cell-sale_price .entry-cost-status-wrap {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  width: 100%;
  white-space: nowrap;
}
#entry .entry-result-table .entry-cell-purchase_price .entry-edit-input,
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input {
  box-sizing: border-box;
  flex: 1 1 76px;
  width: auto;
  min-width: 72px;
  height: 30px;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid #b9c9e6;
  border-radius: 7px;
  background: #fff;
  color: #24344e;
  text-align: right;
  box-shadow: inset 0 1px 2px rgba(40, 67, 112, .04);
}
#entry .entry-result-table .entry-cell-purchase_price .entry-edit-input:hover,
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input:hover {
  border-color: #86a6ee;
}
#entry .entry-result-table .entry-cell-purchase_price .entry-edit-input:focus,
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input:focus {
  border-color: #416fe1;
  outline: 2px solid rgba(65, 111, 225, .14);
  outline-offset: 0;
}
#entry .entry-result-table [data-entry-manual-price] {
  flex: 0 0 auto;
  height: 19px;
  margin: 0;
  padding: 0 6px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

/* Customer name and independent account flags stay readable together. */
#funds .funds-customer-workspace .finance-customers-table {
  min-width: 1280px;
}
#funds .funds-customer-workspace .finance-customers-table th:nth-child(1) { width: 26%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(2) { width: 9%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(3) { width: 7%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(4),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(5),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(6) { width: 8%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(7),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(8) { width: 12%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(9) { width: 10%; }
#funds .funds-customer-workspace .finance-customers-table td:first-child {
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
}
#funds .fund-customer-identity {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
}
#funds .fund-customer-identity .fund-customer-name {
  flex: 1 1 128px;
  max-width: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#funds .fund-customer-status-list {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}
#funds .fund-customer-status-list .fund-customer-status {
  flex: 0 0 auto;
  height: 19px;
  margin: 0;
  padding: 0 5px;
  font-size: 10px;
}
#funds .funds-customer-quick-filters[aria-busy="true"] button {
  cursor: progress;
  opacity: .68;
}
#funds #fundsCustomerLoadStatus:not([hidden]) {
  margin: 0 10px 8px;
  padding: 7px 10px;
}

/* Finance and funds */
#statistics .stats-search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 14px;
}

#statistics .stats-toolbar-main {
  flex: 1 1 760px;
  min-width: 0;
  margin-left: auto;
  padding: 0;
  border: 0;
}

#statistics .stats-search-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 76px repeat(3, 66px) 66px;
  gap: 8px;
}

#statistics .stats-quick-date {
  height: 36px;
  padding: 0 10px;
  border: 1px solid;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}

#statistics .stats-quick-date:hover { filter: saturate(1.12) brightness(.98); transform: translateY(-1px); }
#statistics .stats-quick-today { border-color: #91d7ca; color: #157f6f; background: #eaf8f5; }
#statistics .stats-quick-yesterday { border-color: #a8c9f2; color: #2f70bd; background: #edf5ff; }
#statistics .stats-quick-before { border-color: #efc58e; color: #bc6a13; background: #fff5e8; }
#statistics .stats-quick-date.is-active { box-shadow: 0 0 0 2px rgba(27, 145, 126, .14), 0 4px 10px rgba(36, 52, 84, .08); filter: saturate(1.2); }

#statistics .stats-toolbar-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0;
}

#statistics .stats-date-row,
#statistics .stats-total-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

#statistics .stats-date-row input {
  width: 145px;
}

#statistics .stats-total-row {
  justify-content: flex-end;
  white-space: nowrap;
}

#statistics .stats-total-row b {
  color: var(--blue);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

#statistics .stats-orders-panel {
  padding: 0;
  overflow: hidden;
}

#statistics .stats-orders-panel > .panel-title {
  margin: 0;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

#statistics .stats-orders-panel > .panel-title::before {
  display: block;
}

#statistics .stats-orders-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#funds .funds-finance-panel {
  padding: 0;
  overflow: hidden;
}

#funds .funds-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

#funds .funds-panel-head .panel-title {
  flex: 0 0 auto;
  margin: 0;
}

.finance-summary-row,
.customer-summary {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  padding: 0;
  overflow-x: auto;
}

.finance-summary-row span,
.customer-summary > div {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--wb-surface-2);
  white-space: nowrap;
}

.finance-summary-row span:nth-child(2),
.customer-summary > div:nth-child(2) {
  border-color: #caece7;
  background: #f1fbf9;
}

.finance-summary-row span:nth-child(3),
.customer-summary > div:nth-child(3) {
  border-color: #d6e1fa;
  background: #f3f6ff;
}

.finance-summary-row span:nth-child(4),
.customer-summary > div:nth-child(4) {
  border-color: #f1deb9;
  background: #fffaf0;
}

.finance-summary-row b,
.customer-summary strong {
  color: var(--blue);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

#funds .funds-customer-toolbar {
  min-height: 48px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

#funds .funds-customer-toolbar input {
  width: min(380px, 38vw);
}
#funds .funds-customer-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: min(520px, 48vw);
}
#funds .funds-customer-search input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
#funds .funds-customer-search button { flex: 0 0 auto; white-space: nowrap; }

#funds .funds-smart-sort {
  padding: 6px 10px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f2f6ff;
  color: #3568d4;
  white-space: nowrap;
}

#funds .funds-customer-workspace {
  display: grid;
  grid-template-columns: minmax(0, 72fr) minmax(310px, 28fr);
  height: clamp(520px, 64vh, 760px);
  min-height: 0;
  border-top: 1px solid var(--line);
}

#funds .funds-customer-master {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
}

#funds .funds-customer-workspace .finance-customers-wrap {
  height: auto;
  max-height: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  border-top: 0;
}

#funds .funds-customer-workspace .finance-customers-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#funds .funds-customer-workspace .finance-customers-table th,
#funds .funds-customer-workspace .finance-customers-table td {
  min-width: 0;
  padding-left: clamp(4px, .55vw, 10px);
  padding-right: clamp(4px, .55vw, 10px);
}

#funds .funds-customer-workspace .finance-customers-table th:nth-child(1) { width: 19%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(2) { width: 12%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(3) { width: 8%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(4),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(5),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(6) { width: 10%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(7) { width: 14%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(8) { width: 17%; }

#funds .funds-customer-workspace .finance-customers-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#funds .funds-customer-workspace .fund-customer-name {
  max-width: calc(100% - 72px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#funds .funds-customer-workspace .fund-action-cell button {
  max-width: 100%;
  padding-left: clamp(7px, .7vw, 13px);
  padding-right: clamp(7px, .7vw, 13px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#funds .funds-customer-workspace .debt-trigger {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#funds .funds-customer-workspace .debt-trigger small {
  display: inline;
  margin-left: 2px;
}

#funds .funds-customer-workspace .finance-customers-table th:nth-child(4) { color:#087b5d; background:#eaf9f3; }
#funds .funds-customer-workspace .finance-customers-table td:nth-child(4) { color:#087b5d; background:rgba(234,249,243,.58); }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(5) { color:#315fd2; background:#edf3ff; }
#funds .funds-customer-workspace .finance-customers-table td:nth-child(5) { color:#315fd2; background:rgba(237,243,255,.68); }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(6) { color:#087c89; background:#eaf8fa; }
#funds .funds-customer-workspace .finance-customers-table td:nth-child(6) { color:#087c89; background:rgba(234,248,250,.68); }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(8) { color:#cf3f39; background:#fff0ef; }
#funds .funds-customer-workspace .finance-customers-table td:nth-child(8) { overflow:visible; color:#cf3f39; background:rgba(255,240,239,.58); text-overflow:clip; white-space:normal; }
#funds .funds-customer-workspace .finance-customers-table td:nth-child(8) .debt-trigger { max-width:none; overflow:visible; text-overflow:clip; white-space:normal; }

#funds .fund-settlement-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

#funds .fund-settlement-tag.is-daily {
  border-color: #bfd2ff;
  background: #edf3ff;
  color: #315fd2;
}

#funds .fund-settlement-tag.is-prepaid {
  border-color: #b9e4d5;
  background: #eaf9f3;
  color: #087b5d;
}

#funds .finance-customers-table tr[data-funds-select-customer] {
  cursor: pointer;
}

#funds .finance-customers-table tr[data-funds-select-customer]:hover td {
  background: #f7f9ff;
}

#funds .finance-customers-table tr.is-selected td {
  background: #eef3ff;
}

#funds .finance-customers-table tr.is-selected td:first-child {
  box-shadow: inset 3px 0 #3c63e6;
}

#funds .funds-customer-detail {
  min-width: 0;
  padding: 20px;
  background: linear-gradient(180deg, #f8faff 0, #fff 170px);
  overflow: auto;
}

#funds .funds-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

#funds .funds-detail-head small,
#funds .funds-detail-head p,
#funds .funds-detail-metrics small {
  color: var(--muted);
}

#funds .funds-detail-head h3 { margin: 5px 0; font-size: 17px; }
#funds .funds-detail-head p { margin: 0; font-size: 12px; }
#funds .funds-detail-pending { align-self: flex-start; padding: 5px 9px; border-radius: 999px; background: #fff2dc; color: #b86700; font-size: 12px; }
#funds .funds-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(5px, .55vw, 10px); margin: 16px 0; }
#funds .funds-detail-metrics > div { min-width: 0; padding: clamp(8px, .7vw, 12px); border: 1px solid var(--line); border-radius: 10px; background: #fff; }
#funds .funds-detail-metrics small { display: block; margin-bottom: 7px; }
#funds .funds-detail-metrics strong { display: block; overflow: hidden; font-size: clamp(14px, 1vw, 18px); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
#funds .funds-detail-metrics .balance { color: #087c61; }
#funds .funds-detail-metrics .due { color: #3c63e6; }
#funds .funds-detail-metrics .received { color: #16854f; }
#funds .funds-detail-metrics .debt { color: #dc4b45; }
#funds .funds-detail-actions { display: flex; gap: 9px; margin-bottom: 18px; }
#funds .funds-detail-ledger { border-top: 1px solid var(--line); padding-top: 15px; }
#funds .funds-detail-ledger h4 { margin: 0 0 8px; }
#funds .funds-detail-ledger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
#funds .funds-detail-ledger-row span { min-width: 0; }
#funds .funds-detail-ledger-row b, #funds .funds-detail-ledger-row small { display: block; }
#funds .funds-detail-ledger-row small { margin-top: 3px; color: var(--muted); }
#funds .funds-detail-ledger-row strong.in { color: #16854f; }
#funds .funds-detail-ledger-row strong.out { color: #dc4b45; }
#funds .funds-detail-empty { padding: 30px 10px; color: var(--muted); text-align: center; }

@media (max-width: 1180px) {
  #funds .funds-customer-workspace { grid-template-columns: 1fr; height: auto; }
  #funds .funds-customer-master { border-right: 0; }
  #funds .funds-customer-workspace .finance-customers-wrap { height: clamp(420px, 58vh, 680px); }
  #funds .funds-customer-detail { border-top: 1px solid var(--line); }
}

@media (max-width: 680px) {
  #funds .funds-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

#funds .funds-ledger-title {
  margin: 0;
  padding: 12px 14px 8px;
  border-top: 1px solid var(--line);
}

#funds .funds-ledger-filters {
  padding: 0 14px 10px;
}

/* Archive and settings pages */
#customers .panel .actions,
#suppliers .panel .actions,
#settings .role-create-row,
#settings .system-user-create-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

/* Customer management: keep create, filters and status counts compact above the table. */
#customers > .topbar {
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  padding: 12px 30px 10px;
}

#customers > .topbar h1 { font-size: 20px; }

#customers > .topbar p {
  margin-top: 2px;
  line-height: 1.35;
}

#customers > .topbar > button { align-self: center; }

#customers .customer-create-panel {
  flex: 0 0 auto;
  margin-bottom: 8px;
  padding: 10px 12px;
}

#customers .customer-create-primary {
  display: grid;
  grid-template-columns: auto minmax(0, 1.35fr) 104px minmax(0, .75fr) minmax(0, .85fr) minmax(0, .72fr) minmax(0, .62fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding-bottom: 0;
  overflow: visible;
}

#customers .customer-create-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1.35fr) 104px minmax(0, .75fr) minmax(0, .85fr) minmax(0, .72fr) minmax(0, .62fr) auto;
  min-width: 0;
  margin: 0;
}

/* The shared `#customers .panel .actions` rule is more specific than the
   component class, so keep this local override equally specific. */
#customers .customer-create-panel .customer-create-primary {
  display: grid;
  gap: 8px;
  flex-wrap: initial;
}

#customers .customer-create-actions > * {
  min-width: 0;
  max-width: 100%;
}

#customers .customer-create-primary .panel-title {
  min-height: 0;
  margin: 0;
  white-space: nowrap;
}

#customers .customer-create-primary > input,
#customers .customer-create-primary > select,
#customers .customer-create-primary .business-license-picker,
#customers .customer-create-primary .selected-file-name {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#customers .customer-create-primary .selected-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customers .customer-create-feedback {
  min-width: 0;
  margin-top: 8px;
}

#customers .customer-create-feedback .archive-create-rule {
  align-items: center;
  min-height: 34px;
  margin: 0;
  padding: 5px 9px;
  line-height: 1.35;
}

#customers .customer-manage-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 auto;
  gap: 6px;
  min-width: 0;
  margin-top: 0;
  margin-bottom: 8px;
  padding: 8px 10px;
}

#customers .customer-tools-panel {
  flex: 0 0 auto;
  padding: 8px 10px;
}

#customers .customer-manage-toolbar .customer-tools {
  display: grid;
  grid-template-columns: minmax(600px, 1.25fr) minmax(245px, .48fr) minmax(480px, .92fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#customers .customer-manage-toolbar .customer-search-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 128px 132px auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#customers .customer-search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px 132px auto auto;
  min-width: 0;
}

#customers .customer-manage-toolbar .customer-search-box > input,
#customers .customer-manage-toolbar .customer-search-box > select {
  width: 100%;
  min-width: 0;
}

#customers .customer-manage-toolbar .customer-search-box > button {
  min-width: 58px;
  padding-right: 10px;
  padding-left: 10px;
}

#customers .customer-manage-toolbar .customer-import-box {
  display: grid;
  grid-template-columns: minmax(145px, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#customers .customer-import-box { min-width: 0; }

#customers .customer-manage-toolbar .customer-import-picker {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#customers .customer-import-picker {
  min-width: 0;
  max-width: 100%;
}

#customers .customer-manage-toolbar .archive-auth-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  align-items: stretch;
  gap: 5px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#customers .customer-manage-toolbar #customerManageSummary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  margin: 0;
}

#customers .customer-manage-toolbar .archive-auth-summary:empty { display: none; }

#customers .customer-manage-toolbar .archive-auth-summary button {
  min-width: 0;
  min-height: 36px;
  gap: 5px;
  padding: 5px 7px;
}

#customers .customer-manage-toolbar #customerManageSummary button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  align-content: center;
  justify-items: center;
  gap: 1px;
  overflow: hidden;
}

#customers .customer-manage-toolbar #customerManageSummary button span,
#customers .customer-manage-toolbar #customerManageSummary button strong {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customers .customer-manage-toolbar .archive-auth-summary button span { font-size: 10px; }
#customers .customer-manage-toolbar .archive-auth-summary button strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

#customers > .customer-management-workspace {
  flex: 1 1 0;
  min-height: 0;
}

@media (max-width: 1700px) {
  #customers .customer-manage-toolbar .customer-tools {
    grid-template-columns: minmax(0, 1fr) minmax(245px, auto);
  }

  #customers .customer-manage-toolbar .archive-auth-summary { grid-column: 1 / -1; }
}

@media (max-width: 1600px) {
  #customers .customer-create-primary {
    grid-template-columns: auto minmax(180px, 1fr) 108px minmax(145px, 1fr) minmax(160px, 1fr) auto;
  }

  #customers .customer-create-primary .panel-title { grid-column: 1; grid-row: 1; }
  #customers .customer-create-primary #newCustomerName { grid-column: 2; grid-row: 1; }
  #customers .customer-create-primary #newCustomerSettlementType { grid-column: 3; grid-row: 1; }
  #customers .customer-create-primary #newCustomerPriceLevel { grid-column: 4; grid-row: 1; }
  #customers .customer-create-primary #newCustomerModuleAccess { grid-column: 5; grid-row: 1; }
  #customers .customer-create-primary #addCustomerBtn { grid-column: 6; grid-row: 1; }
  #customers .customer-create-primary .business-license-picker { grid-column: 1 / 3; grid-row: 2; }
  #customers .customer-create-primary .selected-file-name { grid-column: 3 / 7; grid-row: 2; }

  #customers .customer-manage-toolbar .customer-tools {
    grid-template-columns: minmax(0, 1fr) minmax(245px, auto);
  }

  #customers .customer-manage-toolbar .archive-auth-summary { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
  #customers .customer-create-primary {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  }

  #customers .customer-create-primary .panel-title { grid-column: 1; grid-row: 1; }
  #customers .customer-create-primary #newCustomerName { grid-column: 2 / 4; grid-row: 1; }
  #customers .customer-create-primary #newCustomerSettlementType { grid-column: 1; grid-row: 2; }
  #customers .customer-create-primary #newCustomerPriceLevel { grid-column: 2; grid-row: 2; }
  #customers .customer-create-primary #newCustomerModuleAccess { grid-column: 3; grid-row: 2; }
  #customers .customer-create-primary .business-license-picker { grid-column: 1; grid-row: 3; }
  #customers .customer-create-primary .selected-file-name { grid-column: 2; grid-row: 3; }
  #customers .customer-create-primary #addCustomerBtn { grid-column: 3; grid-row: 3; }

  #customers .customer-manage-toolbar { grid-template-columns: minmax(0, 1fr); }
  #customers .customer-manage-toolbar .customer-tools { grid-template-columns: minmax(0, 1fr); }
  #customers .customer-manage-toolbar .archive-auth-summary { grid-column: auto; }
}

/* Wrapped toolbars must not shrink customer details below their fixed header
   and footer. Let the workbench scroll naturally on compact screens. */
@media (max-width: 1100px), (max-height: 700px) {
  #customers.view.active { overflow-y: auto; }
  #customers > .customer-management-workspace {
    flex: 1 0 440px;
    min-height: 440px;
  }
}

@media (max-width: 980px) {
  #customers > .customer-management-workspace {
    flex-basis: 660px;
    min-height: 660px;
    grid-template-rows: 220px minmax(440px, 1fr);
  }
}

@media (max-width: 760px) {
  #customers > .topbar {
    flex-wrap: wrap;
    padding: 10px;
  }

  #customers .customer-manage-toolbar .customer-search-box {
    grid-template-columns: minmax(0, 1fr) minmax(120px, .65fr);
  }

  #customers .customer-create-primary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #customers .customer-create-primary .panel-title,
  #customers .customer-create-primary #newCustomerName { grid-column: 1 / -1; grid-row: auto; }
  #customers .customer-create-primary #newCustomerSettlementType,
  #customers .customer-create-primary #newCustomerModuleAccess,
  #customers .customer-create-primary .selected-file-name { grid-column: 1; grid-row: auto; }
  #customers .customer-create-primary #newCustomerPriceLevel,
  #customers .customer-create-primary .business-license-picker,
  #customers .customer-create-primary #addCustomerBtn { grid-column: 2; grid-row: auto; }

  #customers .customer-manage-toolbar .customer-search-box > input { grid-column: 1 / -1; }
  #customers .customer-manage-toolbar .archive-auth-summary,
  #customers .customer-manage-toolbar #customerManageSummary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-details-drawer > .customer-detail-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-detail-license-action { justify-self: start; }
}

@media (max-width: 520px) {
  #customers .customer-create-primary { grid-template-columns: minmax(0, 1fr); }
  #customers .customer-create-primary > * { grid-column: 1 !important; grid-row: auto !important; }
  #customers .customer-manage-toolbar .customer-search-box,
  #customers .customer-manage-toolbar .customer-import-box { grid-template-columns: minmax(0, 1fr); }
  #customers .customer-manage-toolbar .customer-search-box > * { grid-column: 1; }

  .customer-detail-license-action {
    width: 100%;
  }

  .customer-railway-settlement-rule-head { display: grid; }
  .customer-railway-settlement-controls { grid-template-columns: 1fr; }
  .customer-railway-settlement-rate { max-width: none; }
}

#suppliers .supplier-create-panel {
  flex: 0 0 auto;
  margin-bottom: 8px;
  padding: 10px 12px;
}

#suppliers .supplier-create-primary {
  display: grid;
  grid-template-columns: auto minmax(180px, 1.45fr) auto minmax(70px, .55fr) minmax(145px, .8fr) minmax(160px, .9fr) auto;
  align-items: center;
  gap: 8px;
}

#suppliers .supplier-create-primary .panel-title {
  margin: 0;
  white-space: nowrap;
}

#suppliers .supplier-create-primary > input {
  width: 100%;
  min-width: 0;
}

#suppliers .supplier-create-primary > input[readonly] {
  background: var(--wb-surface-2);
  color: var(--text);
  cursor: default;
}

#suppliers .supplier-create-primary .selected-file-name {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#suppliers .supplier-create-secondary {
  display: grid;
  grid-template-columns: minmax(210px, 320px) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

#suppliers .supplier-create-feedback {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#suppliers .supplier-create-feedback .archive-create-rule {
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 6px 9px;
  line-height: 1.35;
}

.supplier-import-picker {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--wb-surface-2);
  color: var(--muted);
  cursor: pointer;
}

.supplier-import-picker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-import-picker.has-file {
  border-color: #9bcfc8;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.supplier-import-picker input { display: none; }

#suppliers .supplier-create-result {
  min-height: 0;
  margin: 0;
}

#suppliers .supplier-create-result:empty { display: none; }

#suppliers .supplier-manage-toolbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(500px, 560px);
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 8px;
}

#suppliers .supplier-search-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 145px auto;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

#suppliers .supplier-search-row > input,
#suppliers .supplier-search-row > select {
  width: 100%;
  min-width: 0;
}

#suppliers .supplier-search-row > span { white-space: nowrap; }

#suppliers .supplier-manage-toolbar .archive-auth-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
}

#suppliers .supplier-manage-toolbar .archive-auth-summary:empty { display: none; }

#suppliers .supplier-manage-toolbar .archive-auth-summary button {
  min-width: 0;
  min-height: 36px;
  padding: 5px 9px;
}

#suppliers .supplier-manage-toolbar .archive-auth-summary button strong { font-size: 15px; }

#suppliers .supplier-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
}

#suppliers .supplier-table th:nth-child(1) { width: 38%; }
#suppliers .supplier-table th:nth-child(2) { width: 20%; }
#suppliers .supplier-table th:nth-child(3) { width: 20%; }
#suppliers .supplier-table th:nth-child(4) { width: 22%; }

/* 客户/供应商营业执照列新布局：执照紧凑，公司名称优先。 */
#customers .customer-overview-wrap .customer-table{min-width:1805px;table-layout:fixed}
#customers .customer-overview-wrap .customer-table th:nth-child(1),#customers .customer-overview-wrap .customer-table td:nth-child(1){width:90px;min-width:90px;max-width:90px}
#customers .customer-overview-wrap .customer-table th:nth-child(2),#customers .customer-overview-wrap .customer-table td:nth-child(2){width:210px}
#customers .customer-overview-wrap .customer-table th:nth-child(3),#customers .customer-overview-wrap .customer-table td:nth-child(3){width:310px}
#customers .customer-overview-wrap .customer-table th:nth-child(4),#customers .customer-overview-wrap .customer-table td:nth-child(4){width:145px}
#customers .customer-overview-wrap .customer-table th:nth-child(5),#customers .customer-overview-wrap .customer-table td:nth-child(5){width:120px}
#customers .customer-overview-wrap .customer-table th:nth-child(6),#customers .customer-overview-wrap .customer-table td:nth-child(6){width:140px}
#customers .customer-overview-wrap .customer-table th:nth-child(7),#customers .customer-overview-wrap .customer-table td:nth-child(7){width:110px}
#customers .customer-overview-wrap .customer-table th:nth-child(8),#customers .customer-overview-wrap .customer-table td:nth-child(8){width:175px}
#customers .customer-overview-wrap .customer-table th:nth-child(9),#customers .customer-overview-wrap .customer-table td:nth-child(9){width:95px}
#customers .customer-overview-wrap .customer-table th:nth-child(10),#customers .customer-overview-wrap .customer-table td:nth-child(10){width:95px}
#customers .customer-overview-wrap .customer-table th:nth-child(11),#customers .customer-overview-wrap .customer-table td:nth-child(11){width:135px}
#customers .customer-overview-wrap .customer-table th:nth-child(12),#customers .customer-overview-wrap .customer-table td:nth-child(12),#customers .customer-overview-wrap .customer-table th:nth-child(13),#customers .customer-overview-wrap .customer-table td:nth-child(13),#customers .customer-overview-wrap .customer-table th:nth-child(14),#customers .customer-overview-wrap .customer-table td:nth-child(14){width:105px}
#customers .customer-overview-wrap .customer-table th:nth-child(15),#customers .customer-overview-wrap .customer-table td:nth-child(15){width:105px}

#suppliers .supplier-table{width:100%;min-width:1250px;table-layout:fixed}
#suppliers .supplier-table th:nth-child(1),#suppliers .supplier-table td:nth-child(1){width:190px;min-width:190px;max-width:190px}
#suppliers .supplier-table th:nth-child(2),#suppliers .supplier-table td:nth-child(2){width:auto;min-width:270px}
#suppliers .supplier-table th:nth-child(3),#suppliers .supplier-table td:nth-child(3){width:190px}
#suppliers .supplier-table th:nth-child(4),#suppliers .supplier-table td:nth-child(4){width:210px}
#suppliers .supplier-table th:nth-child(5),#suppliers .supplier-table td:nth-child(5){width:390px;min-width:390px}

#customers .tablewrap,
#suppliers .tablewrap,
#settings .tablewrap {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: none;
}

#suppliers.view {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#suppliers > .topbar,
#suppliers > .panel,
#suppliers > .supplier-manage-toolbar,
#suppliers > .supplier-manage-pagination {
  flex: 0 0 auto;
}

#suppliers #supplierManageSummary { flex: 0 0 auto; }

#suppliers > .tablewrap {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
  max-height: none;
  margin-bottom: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

#suppliers .supplier-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f6f8fc;
  box-shadow: 0 1px 0 var(--line);
}

#suppliers .supplier-manage-pagination {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(450px, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 58px;
  margin: 8px 0 0;
  padding: 9px 14px;
}

#suppliers .supplier-manage-page-size,
#suppliers .supplier-manage-page-actions,
#suppliers .supplier-manage-page-buttons,
#suppliers .supplier-manage-jump {
  display: flex;
  align-items: center;
  gap: 8px;
}

#suppliers .supplier-manage-page-actions { justify-content: flex-end; }
#suppliers .supplier-manage-page-info { text-align: center; white-space: nowrap; color: var(--muted); }
#suppliers .supplier-manage-pagination button { height: 32px; min-width: 38px; padding: 0 10px; }
#suppliers .supplier-manage-pagination select { width: 90px; height: 32px; }
#suppliers .supplier-manage-jump { white-space: nowrap; }
#suppliers .supplier-manage-jump input { width: 54px; height: 32px; text-align: center; }

#customers .customer-page-buttons,
#customers .customer-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

#customers .customer-page-buttons button { min-width: 32px; }
#customers .customer-page-jump input { width: 48px; height: 30px; text-align: center; }

@media (max-width: 1180px) {
  #suppliers .supplier-manage-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  #suppliers .supplier-create-primary {
    grid-template-columns: auto minmax(180px, 1fr) minmax(160px, 1fr) auto;
  }

  #suppliers .supplier-create-primary #newSupplierName { grid-column: 2; }
  #suppliers .supplier-create-primary .business-license-picker { grid-column: 3; }
  #suppliers .supplier-create-primary .selected-file-name { grid-column: 4; }
  #suppliers .supplier-create-primary #newSupplierAccountPreview { grid-column: 1 / 3; }
  #suppliers .supplier-create-primary #newSupplierPasswordPreview { grid-column: 3; }
  #suppliers .supplier-create-primary #addSupplierBtn { grid-column: 4; }

  #suppliers .supplier-create-secondary {
    grid-template-columns: minmax(190px, 1fr) auto minmax(260px, 1.5fr);
  }

  #suppliers .supplier-manage-pagination {
    grid-template-columns: auto 1fr;
  }

  #suppliers .supplier-manage-page-info { text-align: right; }
  #suppliers .supplier-manage-page-actions { grid-column: 1 / -1; justify-content: center; }
}

@media (max-width: 760px) {
  #suppliers .supplier-create-primary {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #suppliers .supplier-create-primary .panel-title,
  #suppliers .supplier-create-primary #newSupplierName,
  #suppliers .supplier-create-primary #addSupplierBtn { grid-column: 1 / -1; }
  #suppliers .supplier-create-primary .business-license-picker,
  #suppliers .supplier-create-primary #newSupplierAccountPreview { grid-column: 1; }
  #suppliers .supplier-create-primary .selected-file-name,
  #suppliers .supplier-create-primary #newSupplierPasswordPreview { grid-column: 2; }

  #suppliers .supplier-create-secondary { grid-template-columns: minmax(0, 1fr) auto; }
  #suppliers .supplier-create-feedback { grid-column: 1 / -1; }
  #suppliers .supplier-search-row { grid-template-columns: minmax(0, 1fr) 132px; }
  #suppliers .supplier-search-row > span { grid-column: 1 / -1; }
  #suppliers .supplier-manage-toolbar .archive-auth-summary { grid-template-columns: repeat(2, minmax(112px, 1fr)); }
  #suppliers .supplier-manage-page-buttons,
  #suppliers .supplier-manage-jump { display: none; }
  #suppliers .supplier-manage-page-actions { justify-content: space-between; }
}

/* 订单录入输入区：B 版深海军蓝结构边。 */
#entry .entry-input-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #17365f;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 0 0 5px #fff,
    inset 0 0 0 6px #dce5f0,
    0 4px 9px rgba(20, 49, 87, .12),
    0 14px 30px rgba(20, 49, 87, .08);
}

#entry .entry-input-panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 5px;
  border: 1px solid rgba(59, 86, 124, .13);
  border-radius: 9px;
  pointer-events: none;
}

#entry .entry-input-panel > * {
  position: relative;
  z-index: 1;
}

/* 开票管理：标题、统计、筛选和刷新合并为单行工具栏。 */
#fundsInvoicePanel .invoice-page-head--combined {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  overflow: hidden;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-page-title {
  flex: 0 1 270px;
  min-width: 210px;
  padding-right: 14px;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-stats--inline {
  flex: 0 1 420px;
  min-width: 300px;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-stats--inline > div {
  padding-right: 10px;
  padding-left: 10px;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar {
  display: flex;
  flex: 1 1 540px;
  align-items: center;
  gap: 8px;
  min-width: 360px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar input {
  min-width: 160px;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar select {
  flex: 0 1 150px;
  min-width: 120px;
}

#fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar input,
#fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar select,
#fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar button,
#fundsInvoicePanel .invoice-page-head--combined > #refreshFundsInvoicesBtn {
  height: 38px;
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 1380px) {
  #fundsInvoicePanel .invoice-page-head--combined {
    flex-wrap: wrap;
    overflow: visible;
  }

  #fundsInvoicePanel .invoice-page-head--combined .invoice-filter-bar {
    order: 3;
    flex-basis: calc(100% - 110px);
  }

  #fundsInvoicePanel .invoice-page-head--combined > #refreshFundsInvoicesBtn {
    order: 4;
  }
}

/* 客户订单审核：四项统计并入抬头右侧。 */
#customerOrderReview > .topbar {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(600px, 1.45fr) auto;
  align-items: center;
  gap: 14px;
}

#customerOrderReview > .topbar .review-heading {
  min-width: 0;
}

#customerOrderReview > .topbar .review-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
}

#customerOrderReview > .topbar .review-metric {
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 9px;
}

#customerOrderReview > .topbar .review-metric span {
  font-size: 12px;
}

#customerOrderReview > .topbar .review-metric strong {
  font-size: 22px;
}

#customerOrderReview > .topbar > #refreshCustomerOrderReviewBtn {
  justify-self: end;
  white-space: nowrap;
}

@media (max-width: 1250px) {
  #customerOrderReview > .topbar {
    grid-template-columns: 1fr auto;
  }

  #customerOrderReview > .topbar .review-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  #customerOrderReview > .topbar .review-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 订单录入底色面板按现有左右外边距收口，避免 100% 宽度叠加 margin。 */
#entry .entry-input-panel {
  width: auto;
  max-width: none;
  min-width: 0;
  margin-right: 16px;
  margin-left: 16px;
}

@media (max-width: 680px) {
  #entry .entry-input-panel {
    margin-right: 10px;
    margin-left: 10px;
  }
}

/* 订单录入最终防溢出：三组控件按行靠左，不参与剩余宽度挤压 */
#entry .entry-input-panel .archive-select-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 10px;
  overflow: hidden;
}

#entry .entry-input-panel .archive-select-row > label {
  flex: 0 1 250px;
  width: 250px;
  max-width: 250px;
  min-width: 185px;
}

#entry .entry-input-panel .entry-import-inline {
  display: grid !important;
  flex: 1 1 560px;
  grid-template-columns: minmax(160px, 280px) auto auto !important;
  justify-content: start !important;
  width: auto;
  max-width: 100%;
}

#entry .entry-input-panel .entry-parse-row {
  display: flex !important;
  align-items: flex-start;
  justify-content: flex-start !important;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

#entry .entry-input-panel .entry-parse-row #rawInput {
  flex: 0 1 720px;
  width: min(720px, calc(100% - 190px));
  max-width: 720px;
  min-width: 320px;
}

#entry .entry-input-panel .entry-inline-actions {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  #entry .entry-input-panel .archive-select-row > label {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }

  #entry .entry-input-panel .entry-import-inline {
    grid-template-columns: 1fr !important;
  }

  #entry .entry-input-panel .entry-parse-row {
    flex-direction: column;
  }

  #entry .entry-input-panel .entry-parse-row #rawInput {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  #entry .entry-input-panel .archive-select-row {
    flex-wrap: wrap !important;
  }

  #entry .entry-input-panel .entry-import-inline {
    flex-basis: 100%;
  }
}

/* 授权管理：业务切换与搜索筛选合并为同一工具栏 */
.authorization-records-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
  min-width: 0;
}

.authorization-records-controls .authorization-workflow-tabs {
  align-items: center;
  width: auto;
  min-width: max-content;
  margin: 0;
  padding: 5px;
  border-color: #e0e4eb;
  background: #f1f3f6;
}

.authorization-records-controls .authorization-workflow-tabs button {
  height: 42px;
  padding: 0 14px;
}

.authorization-records-controls .authorization-filter-panel {
  grid-template-columns: minmax(260px, 1fr) 170px auto auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 5px 10px;
}

.authorization-records-controls .authorization-filter-panel label {
  min-width: 0;
  gap: 0;
}

.authorization-records-controls .authorization-filter-panel input,
.authorization-records-controls .authorization-filter-panel select,
.authorization-records-controls .authorization-filter-panel button {
  height: 42px;
  min-height: 42px;
}

@media (max-width: 1180px) {
  .authorization-records-controls {
    grid-template-columns: 1fr;
  }

  .authorization-records-controls .authorization-workflow-tabs {
    justify-self: start;
  }
}

@media (max-width: 720px) {
  .authorization-records-controls .authorization-workflow-tabs {
    width: 100%;
    min-width: 0;
  }

  .authorization-records-controls .authorization-filter-panel {
    grid-template-columns: 1fr;
  }
}

/* Approved customer-order review redesign */
.review-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 16px 16px; }
.review-metric { display:flex; align-items:baseline; gap:7px; min-height:84px; padding:18px 20px; border:1px solid #e3e8f0; border-radius:10px; background:#fff; }
.review-metric span { margin-right:auto; color:#596579; font-weight:650; }
.review-metric strong { color:#172033; font-size:28px; line-height:1; }
.review-metric em { color:#8a95a7; font-size:11px; font-style:normal; }
.review-metric.pending { border-color:#f1d7ad; }.review-metric.approved { border-color:#cfe9da; }.review-metric.rejected { border-color:#f2d1d1; }
.review-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 16px; padding:12px 14px; border:1px solid #e3e8f0; border-bottom:0; border-radius:10px 10px 0 0; background:#fff; }
.review-tabs { display:flex; gap:4px; }.review-tabs button { padding:8px 12px; border:0; border-radius:7px; background:transparent; color:#657086; }.review-tabs button.active { background:#edf1ff; color:#3b5bdb; font-weight:700; }
.review-search { display:flex; align-items:center; gap:7px; color:#758095; font-size:11px; }.review-search input { width:min(280px,32vw); }
#customerOrderReviewList { margin-top:0; padding:0 16px 16px; }.review-table { min-width:1050px; }.review-table thead th { position:sticky; top:0; z-index:2; }
.review-table td { vertical-align:middle; }.review-product,.review-recipient { max-width:260px; }.review-product strong,.review-product small,.review-recipient strong,.review-recipient small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.review-product small,.review-recipient small { margin-top:4px; color:#8792a5; }.review-money { font-variant-numeric:tabular-nums; font-weight:650; }
.review-table th:last-child,.review-table td:last-child { position:sticky; right:0; z-index:1; background:#fff; box-shadow:-8px 0 12px -12px #60708c; }.review-table thead th:last-child { z-index:3; background:#f3f6fb; }
@media (max-width:760px) { .review-metrics{grid-template-columns:1fr 1fr}.review-toolbar{align-items:stretch;flex-direction:column}.review-search input{width:100%} }

.field-option,
.role-permission-option,
.business-license-picker,
.customer-license-upload {
  border-radius: 8px;
  background: var(--wb-surface-2);
}

/* Customer and supplier portals */
.customer-portal,
.supplier-portal {
  display: block;
  overflow: hidden;
  background: var(--bg);
}

.customer-portal .side,
.customer-portal #loginScreen,
.supplier-portal .side,
.supplier-portal #loginScreen {
  display: none;
}

.customer-portal .main,
.supplier-portal .main {
  width: 100%;
  max-width: none;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.customer-portal .main {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.customer-portal #customer,
.supplier-portal #supplierPortal {
  display: flex;
}

.customer-portal #customer {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  height: auto;
  flex-direction: column;
  overflow: visible;
}

.customer-portal #customer > :not(.topbar),
.supplier-portal #supplierPortal > :not(.topbar) {
  margin-right: max(24px, calc((100vw - 1460px) / 2));
  margin-left: max(24px, calc((100vw - 1460px) / 2));
}

.customer-portal #customer .topbar,
.supplier-portal #supplierPortal .topbar {
  margin: 0;
  padding: 18px max(24px, calc((100vw - 1460px) / 2)) 12px;
}

.portal-login-strip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  margin-top: 18px;
  margin-bottom: 4px;
  padding: 10px 14px;
}

.portal-login-strip .panel-title {
  flex: 0 0 auto;
  margin: 0;
}

.portal-login-strip .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  flex-wrap: wrap;
}

.portal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-company,
.login-finance {
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #dbe2fb;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.customer-search {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--wb-shadow);
}

.customer-search-main {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.customer-order-view-switch {
  display: inline-flex;
  height: 40px;
  overflow: hidden;
  border: 1px solid #cbd5e6;
  border-radius: 8px;
  background: #fff;
}

.customer-order-view-switch button {
  min-width: 76px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid #dce3ef;
  background: #fff;
  color: #5b6780;
  font-weight: 750;
  cursor: pointer;
}

.customer-order-view-switch button:last-child { border-right: 0; }
.customer-order-view-switch button:hover { background: #f2f5fb; color: #315fd4; }
.customer-order-view-switch button.active { background: #3f61df; color: #fff; }

#customer #customerResult.card-view {
  padding: 14px;
  background: #f4f6fa;
}

.customer-order-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.customer-order-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #e2e6ed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(29, 45, 78, .055);
  color: #1d2940;
}

.customer-order-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.customer-order-card > header div { min-width: 0; }
.customer-order-card > header small { display: block; color: #8b96a8; font-size: 11px; }
.customer-order-card > header strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-order-card-status {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.customer-order-card-status.is-pending { background: #fff0dc; color: #c27016; }
.customer-order-card-status.is-shipped { background: #e4f6ee; color: #12805a; }
.customer-order-card-product { margin: 15px 0 10px; }
.customer-order-card-product h3 {
  height: 44px;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.48;
}
.customer-order-card-product p { margin: 5px 0 0; color: #7d899c; font-size: 12px; }
.customer-order-card-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px dashed #e3e7ee;
  font-size: 12px;
}
.customer-order-card-line span { color: #8994a6; }
.customer-order-card-line strong { overflow-wrap: anywhere; text-align: right; }
.customer-order-card-recipient { padding-top: 9px; border-top: 1px dashed #e3e7ee; font-size: 12px; }
.customer-order-card-recipient > span { margin-left: 8px; color: #69768a; }
.customer-order-card-recipient p { min-height: 35px; margin: 5px 0 0; color: #7e899b; line-height: 1.5; }
.customer-order-card-logistics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 10px;
  padding: 11px;
  border-radius: 11px;
  background: #f7f4ee;
}
.customer-order-card-logistics div { min-width: 0; }
.customer-order-card-logistics small { display: block; color: #8c8377; font-size: 10px; }
.customer-order-card-logistics strong { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 12px; }
.customer-order-card-logistics button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #d8cdbb;
  border-radius: 7px;
  background: #fff;
  color: #6a5941;
  cursor: pointer;
}
.customer-order-card-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 13px 12px 0;
  color: #999286;
  font-size: 10px;
  text-align: center;
}
.customer-order-card-progress::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 16px;
  left: 16px;
  height: 2px;
  background: #ded8ce;
}
.customer-order-card-progress span { position: relative; z-index: 1; }
.customer-order-card-progress i {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0 auto 4px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #d2cabc;
  box-shadow: 0 0 0 1px #d2cabc;
}
.customer-order-card-progress .on { color: #11805a; font-weight: 750; }
.customer-order-card-progress .on i { background: #11805a; box-shadow: 0 0 0 1px #11805a; }

@media (max-width: 1100px) {
  .customer-order-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  #customer #customerResult.card-view { padding: 9px; }
  .customer-order-card-grid { grid-template-columns: 1fr; gap: 9px; }
}

.date-chip,
.password-chip {
  border-radius: 8px;
}

#customer .customer-result-bar {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: auto;
  min-height: 42px;
  margin-top: 8px;
  margin-bottom: 8px;
}

#customer .customer-orders-table {
  width: 100%;
  min-width: 0;
}

#customer .customer-orders-table th,
#customer .customer-orders-table td {
  min-width: 0;
}

#customer #customerSummary:not(.hidden) {
  display: grid !important;
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 7px;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

#customer #customerSummary > div {
  width: auto !important;
  min-width: 104px;
  max-width: none;
  height: 34px !important;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
}

#customer #customerSummary span,
#customer #customerSummary strong {
  display: inline;
  margin: 0;
  line-height: 1;
}

#customer #customerResult,
#supplierPortal .supplier-orders-wrap {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: none;
  overflow: auto;
}

#supplierPortal .portal-compact-panel:not(.portal-login-strip) {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
}

#supplierPortal .portal-compact-panel:not(.portal-login-strip) .panel-title {
  flex: 0 0 auto;
  margin: 0;
}

/* Login and modal surfaces */
.login-screen,
.modal {
  background: rgba(24, 33, 49, .5);
  backdrop-filter: blur(3px);
}

.login-card,
.modal-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--wb-shadow-raised);
}

.login-card {
  width: min(390px, calc(100vw - 28px));
  padding: 25px;
  border-top: 4px solid var(--blue);
}

.login-card h1 {
  font-size: 22px;
}

.modal-bar {
  min-height: 52px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--wb-surface-2);
}

/* 营业执照复核弹窗保留固定头尾，不被通用 modal-panel 的隐藏溢出规则裁掉。 */
#businessLicenseReviewModal .business-license-review-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

#businessLicenseReviewModal .business-license-review-head,
#businessLicenseReviewModal .business-license-review-actions { flex: 0 0 auto; }

#businessLicenseReviewModal .business-license-review-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

#businessLicenseReviewModal #businessLicenseReviewReason {
  height: 78px;
  min-height: 78px;
  max-height: 120px;
}

.order-edit-modal-panel {
  width: min(440px, calc(100vw - 28px));
}

.order-edit-modal-body {
  padding: 18px;
}

.modal-icon-lock {
  border-radius: 8px;
}

/* Shared overview bands */
.workbench-hero,
.portal-identity-hero {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 176px;
  margin-bottom: 16px !important;
  padding: 24px 36px;
  overflow: hidden;
  border: 1px solid rgba(61, 83, 167, .28);
  border-radius: 8px;
  background: linear-gradient(112deg, #222c4b 0%, #30437e 57%, #4965d9 100%);
  box-shadow: 0 14px 32px rgba(45, 63, 128, .18);
  color: #ffffff;
}

.workbench-hero::after,
.portal-identity-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 31%;
  background: linear-gradient(135deg, transparent 0 34%, rgba(255, 255, 255, .055) 34% 60%, rgba(255, 255, 255, .025) 60%);
  pointer-events: none;
}

.workbench-hero-heading,
.portal-identity-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.workbench-hero-icon,
.portal-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .15);
  color: #ffffff;
  font-size: 20px;
  font-weight: 720;
}

.workbench-hero-heading strong,
.portal-identity-heading > div > strong {
  display: block;
  max-width: min(720px, 70vw);
  overflow: hidden;
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-hero-heading > div > span,
.portal-identity-heading > div > span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .68);
  font-size: 12.5px;
}

.portal-identity-heading > div > span b {
  color: rgba(255, 255, 255, .82);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-weight: 520;
}

.workbench-hero-stats,
.portal-identity-stats {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 42px;
  margin-top: 22px;
}

.workbench-hero-stats > span,
.workbench-hero-stats.metrics > div,
.portal-identity-stats > span,
.workbench-hero .finance-summary-row > span {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  column-gap: 4px;
  white-space: nowrap;
}

.workbench-hero-stats small,
.workbench-hero-stats.metrics span,
.portal-identity-stats small {
  grid-column: 1 / -1;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  font-weight: 500;
}

.workbench-hero-stats b,
.workbench-hero-stats.metrics strong,
.portal-identity-stats strong,
.workbench-hero .finance-summary-row b {
  margin: 0;
  color: #ffffff !important;
  font-size: 26px;
  font-weight: 730;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.workbench-hero-stats em,
.portal-identity-stats em {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-style: normal;
}

.workbench-hero-stats.metrics {
  display: flex;
  grid-template-columns: none;
  gap: 42px;
  overflow: visible;
  border: 0;
  background: transparent;
}

#dashboard .panel {
  flex: 1 1 auto;
  min-height: 220px;
  overflow: auto;
}

#statistics .stats-toolbar-meta {
  grid-template-columns: minmax(480px, 1fr) auto;
}

#statistics #refreshStatsBtn {
  justify-self: end;
}

#statistics .stats-orders-panel,
#funds .funds-finance-panel {
  flex: 1 1 auto;
}

#funds .funds-panel-head {
  min-height: 48px;
}

#entry .entry-hero {
  min-height: 158px;
}

/* Portal workspaces */
.portal-page-topbar {
  align-items: center;
  padding-bottom: 10px;
}

.customer-portal #customer .portal-page-topbar {
  padding-top: 8px;
  padding-bottom: 6px;
}

.customer-portal #customer .portal-page-topbar p {
  margin-top: 2px;
}

.portal-header-login {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.portal-header-login #customerAccount,
.portal-header-login #supplierAccount {
  width: 170px;
}

.portal-header-login .password-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding-left: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
}

.portal-header-login .password-chip input {
  width: 150px;
  height: 32px;
  padding-left: 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.portal-header-login .portal-remember { display: inline-flex; align-items: center; gap: 4px; color: #667188; font-size: 11px; white-space: nowrap; cursor: pointer; }
.portal-header-login .portal-remember input { width: 14px; height: 14px; margin: 0; accent-color: var(--blue); }

.portal-identity-hero {
  min-height: 190px;
  margin-top: 0 !important;
}

.supplier-identity-hero {
  border-color: rgba(16, 122, 111, .32);
  background: linear-gradient(112deg, #163d39 0%, #0d7067 57%, #159b8d 100%);
  box-shadow: 0 14px 32px rgba(8, 112, 101, .18);
}

.portal-identity-heading > div {
  min-width: 0;
}

.portal-identity-heading .login-company {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.portal-identity-badge {
  margin-left: auto;
  padding: 6px 13px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .9);
  font-size: 12px;
  white-space: nowrap;
}

.customer-identity-hero .customer-certified-badge {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 20px;
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  margin: 0;
  /* Horizontal padding remains 26px in total, preserving the badge size. */
  padding: 6px 3px 6px 23px;
  border-color: rgba(255, 218, 112, .82);
  background: linear-gradient(180deg, rgba(255, 225, 139, .17), rgba(117, 75, 11, .16));
  color: #ffd76d;
  font-weight: 800;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 245, 198, .32), inset 0 -1px 0 rgba(107, 67, 7, .22), 0 0 10px rgba(255, 203, 72, .1);
  text-shadow: 0 1px 0 rgba(94, 57, 0, .7), 0 0 7px rgba(255, 218, 106, .25);
}

.customer-identity-hero .customer-certified-badge::before {
  content: "♛";
  position: absolute;
  left: 7px;
  color: #ffe69a;
  font-size: 12px;
  line-height: 1;
  text-shadow: 0 1px 0 #76500c, 0 0 5px rgba(255, 225, 120, .42);
}

.customer-identity-hero .customer-certified-badge::after {
  content: "◆";
  position: absolute;
  top: 4px;
  left: 15px;
  color: #fff1b5;
  font-size: 4px;
  line-height: 1;
}

.portal-identity-stats .login-finance {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.portal-tabs {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  margin-top: 0 !important;
  margin-bottom: 14px !important;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9edf5;
}

.portal-tab {
  min-width: 112px;
  border-color: transparent;
  background: transparent;
  color: #5e697a;
}

.portal-tab:hover {
  background: rgba(255, 255, 255, .72);
  color: var(--text);
}

.portal-tab.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(31, 39, 51, .07);
}

/* 客户端主导航：轻科技微动效。只增强交互反馈，不改变导航尺寸与排版。 */
.customer-portal #customer .portal-tab {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  outline: none;
  background: transparent;
  color: #52627a;
  box-shadow: none;
  transform: translateZ(0);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.customer-portal #customer .portal-tab::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(53, 99, 233, .08), rgba(25, 184, 176, .07));
  content: "";
  opacity: 0;
  transform: scale(.94);
  transition: opacity 180ms ease, transform 180ms ease;
}

.customer-portal #customer .portal-tab::after {
  position: absolute;
  right: 36%;
  bottom: 1px;
  left: 36%;
  height: 2px;
  border-radius: 999px;
  background: #3563e9;
  box-shadow: none;
  content: "";
  opacity: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: opacity 180ms ease, transform 200ms cubic-bezier(.2, .8, .2, 1);
}

.customer-portal #customer .portal-tab:hover {
  border-color: rgba(53, 99, 233, .12);
  background: #f2f7ff;
  color: #244fae;
  box-shadow: 0 5px 14px rgba(43, 78, 142, .08);
  transform: translateY(-2px);
}

.customer-portal #customer .portal-tab:hover::before {
  opacity: 1;
  transform: scale(1);
}

.customer-portal #customer .portal-tab:hover::after {
  opacity: .75;
  transform: scaleX(.72);
}

.customer-portal #customer .portal-tab:active {
  box-shadow: 0 2px 7px rgba(43, 78, 142, .08);
  transform: translateY(0) scale(.98);
  transition-duration: 90ms;
}

.customer-portal #customer .portal-tab:focus-visible {
  border-color: rgba(53, 99, 233, .55);
  box-shadow: 0 0 0 3px rgba(53, 99, 233, .14);
}

.customer-portal #customer .portal-tab.active {
  border-color: rgba(53, 99, 233, .16);
  background: linear-gradient(180deg, #ffffff, #f7faff);
  color: #315fd6;
  box-shadow:
    0 5px 16px rgba(43, 78, 142, .10),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: none;
}

.customer-portal #customer .portal-tab.active::before {
  opacity: .65;
  transform: scale(1);
}

.customer-portal #customer .portal-tab.active::after {
  opacity: 1;
  transform: scaleX(1);
}
.customer-portal #customer .portal-tab::after { display: none; content: none; }

.customer-portal #customer .portal-tab-view:not(.hidden) {
  animation: customer-tab-content-in 180ms ease-out both;
}

@keyframes customer-tab-content-in {
  from { opacity: .82; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .customer-portal #customer .portal-tab,
  .customer-portal #customer .portal-tab::before,
  .customer-portal #customer .portal-tab::after {
    transition: none;
  }

  .customer-portal #customer .portal-tab:hover,
  .customer-portal #customer .portal-tab:active {
    transform: none;
  }

  .customer-portal #customer .portal-tab-view:not(.hidden) {
    animation: none;
  }
}

#customer .portal-tabs {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  width: min(100%, 1200px);
}

.customer-portal-tabs-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 54px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  overflow: visible;
  scrollbar-width: thin;
}

.customer-portal-tabs-row .portal-tabs {
  flex: 0 0 auto;
  margin-bottom: 0 !important;
  white-space: nowrap;
}

.customer-product-inline-search {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 110px 18px 110px auto auto auto auto;
  align-items: center;
  gap: 9px;
  flex: 1 0 100%;
  width: 100%;
  min-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--wb-shadow);
}

.customer-product-inline-search input {
  width: 100%;
  min-width: 0;
}

.customer-product-price-separator {
  color: #6f7b8f;
  text-align: center;
  font-weight: 800;
}

.customer-product-price-sort {
  min-width: 112px;
  border: 1px solid #cbd5e6;
  color: #536078;
  background: #fff;
  font-weight: 750;
}

.customer-product-price-sort.is-active {
  border-color: #91adf4;
  color: #315bd1;
  background: #edf3ff;
}

.customer-product-view-switch {
  display: inline-flex;
  height: 40px;
  overflow: hidden;
  border: 1px solid #cbd5e6;
  border-radius: 8px;
  background: #fff;
}

.customer-product-view-switch button {
  min-width: 76px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid #dce3ef;
  background: #fff;
  color: #5b6780;
  font-weight: 750;
  cursor: pointer;
}

.customer-product-view-switch button:last-child { border-right: 0; }
.customer-product-view-switch button:hover { background: #f2f5fb; color: #315fd4; }
.customer-product-view-switch button.active { background: #3f61df; color: #fff; }

#customer #customerProductResult.card-view {
  max-height: calc(100vh - 350px);
  padding: 16px;
  overflow: auto;
  border-color: #e1e6ef;
  background: #f4f6fa;
}

.customer-product-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  text-align: left;
}

.customer-product-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e0e5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(29, 45, 78, .06);
  transition: transform .16s ease, box-shadow .16s ease;
}

.customer-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(29, 45, 78, .1);
}

.customer-product-card-media {
  position: relative;
  display: grid;
  height: 155px;
  min-height: 0;
  padding: 30px 16px 12px;
  place-items: center;
  overflow: hidden;
  background: #fbfcfe;
}

.customer-product-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.customer-product-card-tags {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: grid;
  justify-items: end;
  gap: 5px;
}

.customer-product-card-tags span {
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.customer-product-card-tags .is-new { background: #e8efff; color: #315fd4; }
.customer-product-card-tags .is-out { background: #fff1c9; color: #af7300; }
.customer-product-card-placeholder { color: #a1aaba; font-size: 13px; }
.customer-product-card-body {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 12px 13px;
  background: #fff;
}
.customer-product-card-body h3 {
  display: block;
  width: 100%;
  height: 42px;
  margin: 0 0 9px;
  overflow: hidden;
  color: #17233a;
  font-size: 14px;
  line-height: 1.5;
}
.customer-product-card-price-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}
.customer-product-card-price {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 31px;
  overflow: hidden;
  color: #ef463c;
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-product-card-price small { margin-right: 4px; font-size: 14px; }
.customer-product-card-labels {
  display: flex;
  min-width: max-content;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 5px;
  margin-left: auto;
  white-space: nowrap;
}
.customer-product-card-labels span {
  padding: 2px 5px;
  border: 1px solid #ffaaa4;
  border-radius: 6px;
  color: #e6453d;
  font-size: 10px;
}
.customer-product-card-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #edf0f5;
  color: #8a96aa;
  font-size: 10px;
}

.customer-product-card-model {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-product-card-jd-link {
  box-sizing: border-box;
  display: inline-grid;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  place-items: center;
  padding: 0;
  border: 1px solid #f0b35b;
  border-radius: 6px;
  color: #d97706;
  background: #fff8eb;
  text-decoration: none;
  white-space: nowrap;
}

.customer-product-card-jd-link svg {
  display: block !important;
  visibility: visible !important;
  width: 12px;
  height: 12px;
  opacity: 1 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-product-card-jd-link:hover { border-color: #dc8b1d; background: #ffefd1; }
.customer-product-card-jd-link:focus-visible { outline: 2px solid #d97706; outline-offset: 2px; }

@media (max-width: 1100px) {
  .customer-product-card-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
}

@media (max-width: 900px) {
  .customer-product-card-grid { grid-template-columns: repeat(2, minmax(170px, 1fr)); }
  .customer-product-card-media { height: 175px; }
}

@media (max-width: 600px) {
  #customer #customerProductResult.card-view { padding: 9px; }
  .customer-product-card-grid { gap: 9px; }
  .customer-product-card-media { height: 150px; padding: 27px 10px 8px; }
  .customer-product-card-body { padding: 11px; }
  .customer-product-card-body h3 { min-height: 42px; font-size: 14px; }
  .customer-product-card-price-row { gap: 4px; }
  .customer-product-card-price { font-size: 17px; }
  .customer-product-card-price small { margin-right: 2px; font-size: 11px; }
  .customer-product-card-labels { gap: 3px; }
  .customer-product-card-labels span { padding: 2px 3px; font-size: 8px; }
}

.portal-tab-view {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.portal-tab-view.hidden {
  display: none !important;
}

.customer-qualification-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.customer-qualification-toolbar > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.customer-qualification-toolbar strong { font-size: 16px; }
.customer-qualification-toolbar span { color: #7c879a; font-size: 12px; }
.customer-qualification-scope { display: flex; padding: 3px; border: 1px solid #dbe3f0; border-radius: 7px; background: #f4f6fa; }
.customer-qualification-scope button { height: 30px; padding: 0 13px; border: 0; border-radius: 5px; color: #667187; background: transparent; cursor: pointer; }
.customer-qualification-scope button.active { color: #fff; background: var(--blue); box-shadow: 0 2px 6px rgba(49, 85, 198, .25); }
.customer-qualification-stats { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 10px; margin: 10px 0; }
.customer-qualification-stats div { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.customer-qualification-stats span { color: #737f93; font-size: 12px; }
.customer-qualification-stats strong { font-size: 20px; }
.customer-qualification-toolbar > .customer-qualification-stats {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 7px;
  margin: 0 0 0 auto;
}
.customer-qualification-toolbar > .customer-qualification-stats.hidden { display: none; }
.customer-qualification-toolbar > .customer-qualification-stats div {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 7px;
  background: #f8faff;
}
.customer-qualification-toolbar > .customer-qualification-stats span { font-size: 11px; }
.customer-qualification-toolbar > .customer-qualification-stats strong { font-size: 16px; }
.customer-qualification-toolbar > .customer-qualification-scope { flex: 0 0 auto; }
@media (max-width: 1280px) {
  .customer-qualification-toolbar { flex-wrap: wrap; }
  .customer-qualification-toolbar > .customer-qualification-stats {
    order: 3;
    width: 100%;
    flex-basis: 100%;
    margin-left: 0;
  }
}
.customer-qualification-result { display: grid; min-height: 180px; gap: 12px; overflow: auto; }
.customer-qualification-result.empty { place-items: center; align-content: center; color: #7d8799; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.customer-qualification-result.empty span { display: block; margin-top: 6px; font-size: 12px; }
.customer-qualification-company { border: 1px solid var(--line); border-radius: 9px; overflow: visible; background: #fff; }
.customer-qualification-company > header { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); background: #f7f9fd; }
.customer-qualification-company > header span { color: #7a8598; font-size: 11px; }
.customer-qualification-table-wrap { overflow: visible; }
.customer-qualification-company table { width: 100%; border-collapse: collapse; }
.customer-qualification-company th, .customer-qualification-company td { padding: 9px 12px; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; font-size: 12px; }
.customer-qualification-company th { color: #667188; background: #fbfcfe; font-weight: 700; }
.customer-qualification-company td small { display: block; margin-top: 3px; color: #929bad; }
.customer-qualification-document { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #d4ddec; border-radius: 6px; color: #3155c6; background: #fff; cursor: pointer; }
.customer-qualification-document > img:first-child { width: 100%; height: 100%; border-radius: 5px; object-fit: cover; }
.customer-qualification-document > b { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; color: #fff; background: var(--blue); font-size: 10px; line-height: 17px; }
.customer-qualification-preview { display: none; position: absolute; z-index: 80; left: 52px; top: -80px; width: 360px; height: 420px; padding: 7px; border: 1px solid #cad5e8; border-radius: 9px; background: #fff; object-fit: contain; box-shadow: 0 14px 38px rgba(30, 44, 72, .25); }
.customer-qualification-document:hover .customer-qualification-preview { display: block; }
.customer-qualification-none { color: #a0a9b9; }
.authorization-application-row { background: #fffdf7; }

.project-report-topbar { align-items: center; }
.project-report-top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.project-report-stats { display: grid; grid-template-columns: repeat(5, 108px); gap: 8px; }
.customer-project-stats { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 10px; margin-bottom: 12px; }
.project-report-stats button, .customer-project-stats button { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; text-align: left; }
.project-report-stats button { width: 108px; height: 54px; padding: 7px 10px; box-shadow: 0 2px 7px rgba(35, 49, 75, .05); }
.customer-project-stats button { padding: 13px 16px; }
.project-report-stats button:hover, .customer-project-stats button:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(36, 52, 84, .09); }
.project-report-stats .stat-total { border-color: #b9d1ff; color: #285dc8; background: #eef4ff; }
.project-report-stats .stat-pending { border-color: #f2d29a; color: #b96a00; background: #fff7e8; }
.project-report-stats .stat-protected { border-color: #d4c3f7; color: #7048bf; background: #f5f0ff; }
.project-report-stats .stat-expired { border-color: #efc1ca; color: #b7475d; background: #fff1f4; }
.project-report-stats .stat-done { border-color: #a9dfc1; color: #16804d; background: #edf9f2; }
.customer-project-stats .stat-pending { border-color: #f0c678; background: #fff8e9; }
.customer-project-stats .stat-protected { border-color: #9bb4f5; background: #f0f4ff; }
.customer-project-stats .stat-expired { border-color: #cbd1db; background: #f3f5f8; }
.customer-project-stats .stat-done { border-color: #94d4b2; background: #edf9f2; }
.project-report-stats span { color: currentColor; font-size: 10px; opacity: .78; }
.project-report-stats strong { color: currentColor; font-size: 19px; }
.customer-project-stats span { color: #748096; font-size: 12px; }
.customer-project-stats strong { font-size: 21px; }
.project-report-toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) 160px 140px; gap: 10px; margin-bottom: 12px; }
.project-invite-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 20px; background: rgba(21, 31, 54, .52); backdrop-filter: blur(3px); }
.project-invite-modal.hidden { display: none; }
.project-invite-dialog { width: min(680px, 92vw); max-height: 90vh; overflow-x: hidden; overflow-y: auto; padding: 18px; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(12, 25, 54, .28); }
.project-invite-head, .project-invite-list-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.project-invite-head > div { display: grid; gap: 4px; }.project-invite-head strong { color: #23385f; font-size: 20px; }.project-invite-head span { color: #7b879b; font-size: 12px; }
.project-invite-create { display: grid; grid-template-columns: minmax(260px, 1fr) 140px auto; align-items: end; gap: 12px; margin: 18px 0; padding: 15px; border: 1px solid #dce5f4; border-radius: 10px; background: #f7f9fd; }
.project-invite-create label { display: grid; gap: 6px; color: #66738a; font-size: 12px; }.project-invite-create select { height: 40px; }
.product-catalog-invite-create { grid-template-columns: minmax(190px, .85fr) minmax(280px, 1.35fr) 120px; }
.product-catalog-invite-create > button { grid-column: 1 / -1; width: 100%; }
.order-h5-invite-create { grid-template-columns: minmax(280px, 1fr) 120px; }
.order-h5-invite-create > button { grid-column: 1 / -1; width: 100%; }
.product-catalog-customer-field { min-width: 0; }
.product-catalog-customer-picker { position: relative; z-index: 25; min-width: 0; }
.product-catalog-customer-picker > input[type="search"] { width: 100%; height: 40px; }
.product-catalog-customer-results { position: absolute; z-index: 80; top: calc(100% + 5px); right: 0; left: 0; max-height: 236px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid #cbd7ee; border-radius: 8px; background: #fff; box-shadow: 0 14px 35px rgba(24, 40, 72, .18); }
.product-catalog-customer-results button { display: block !important; width: 100%; min-height: 0; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; line-height: 1.25; text-align: left !important; cursor: pointer; }
.product-catalog-customer-results button:hover { background: #edf3ff; }
.product-catalog-customer-results strong { display: block !important; width: 100%; overflow: hidden; color: #263954; font-size: 12px; text-align: left !important; text-overflow: ellipsis; white-space: nowrap; }
.product-catalog-customer-results span { display: block !important; width: 100%; margin-top: 1px; color: #7b879b; font-size: 10px; text-align: left !important; }
.product-catalog-customer-empty { padding: 18px 10px; color: #8a94a6; text-align: center; }
.project-invite-result { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin-bottom: 18px; padding: 14px; border: 1px solid #bcd0ff; border-radius: 12px; background: #f3f7ff; }
.project-invite-result.hidden { display: none; }.project-invite-qr { display: grid; justify-items: center; gap: 8px; }.project-invite-qr img { width: 140px; height: 140px; padding: 6px; border: 1px solid #d7deec; border-radius: 8px; background: #fff; image-rendering: pixelated; }
.project-invite-link { display: grid; align-content: center; gap: 9px; }.project-invite-link strong { color: #234caa; font-size: 17px; }.project-invite-link small { color: #66738a; }.project-invite-link textarea { width: 100%; min-height: 68px; resize: none; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }.project-invite-link > div { display: flex; gap: 8px; }
.project-invite-list-head { padding: 5px 0 10px; border-bottom: 1px solid #e4e9f2; }.project-invite-list { display: grid; gap: 7px; padding-top: 9px; }.project-invite-list.empty { min-height: 80px; place-items: center; color: #8a94a6; }
.project-invite-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 12px; padding: 10px 12px; border: 1px solid #e0e6f0; border-radius: 8px; background: #fff; }.project-invite-row > div:first-child { display: grid; gap: 2px; }.project-invite-row strong { color: #2b3c5a; }.project-invite-row span, .project-invite-row small { color: #768197; font-size: 11px; }.project-invite-row > small { grid-column: 1; }.project-invite-row > div:last-child { grid-column: 2; grid-row: 1 / span 3; display: flex; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.customer-h5-invite-btn { height: 36px; padding: 0 14px; border: 1px solid #58bcb5; border-radius: 7px; color: #087c74; background: #eafaf7; font-weight: 700; cursor: pointer; }.customer-h5-invite-btn:hover { background: #d9f5f1; }
.customer-invite-dialog { width: min(800px, calc(100vw - 40px)); max-height: min(760px, calc(100dvh - 48px)); overflow-x: hidden; overflow-y: auto; padding: 20px; border: 1px solid #e1e7f1; border-radius: 14px; background: #fff; box-shadow: 0 22px 65px rgba(20, 32, 58, .3); }.customer-invite-dialog .customer-project-dialog-head h3 { color: #253956; }.customer-invite-dialog .customer-project-dialog-head p { color: #6f7c91; }.customer-invite-create { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; align-items: end; gap: 12px; margin-bottom: 16px; padding: 14px; border: 1px solid #dce5f4; border-radius: 10px; background: #f7f9fd; }.customer-invite-create label { display: grid; gap: 6px; color: #657188; font-size: 11px; }.customer-invite-create select { height: 38px; }.customer-invite-dialog .project-invite-list { overflow: visible; }.customer-invite-dialog .customer-invite-row { grid-template-columns: minmax(220px, 1fr) auto; gap: 8px 16px; }.customer-invite-dialog .customer-invite-row > small { grid-column: auto; }.customer-invite-dialog .customer-invite-row > div:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.project-report-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
.project-report-list.empty { grid-template-columns: 1fr; place-items: center; min-height: 160px; color: #8791a3; }
.project-report-card { display: flex; flex-direction: column; height: 100%; padding: 9px 12px; border: 1px solid #dce3ef; border-left: 4px solid #8b96aa; border-radius: 7px; background: #fff; }
.project-report-card.status-pending { border-left-color: #d78a16; }.project-report-card.status-protected { border-left-color: #3564df; }.project-report-card.status-done { border-left-color: #1c9b58; }.project-report-card.status-rejected { border-left-color: #d34545; }
.project-report-card.status-change_pending { border-left-color: #7b4fd4; background: #fbf8ff; }.project-report-card.status-expired { border-left-color: #8a94a5; background: #f7f8fa; }.project-report-card.status-released { border-left-color: #81738f; background: #faf8fc; }
.project-report-card header, .project-report-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.project-report-card header > div { display: grid; gap: 1px; }.project-report-card header strong { font-size: 13px; }.project-card-name { color: #2859cf; }.project-card-customer { color: #7049b8; font-size: 10px; font-weight: 700; }.project-card-source { color: #758095; font-style: normal; font-weight: 400; }.project-report-card header span, .project-report-card footer { color: #758095; font-size: 10px; }
.project-status { padding: 3px 8px; border-radius: 13px; color: #596579; background: #edf1f7; font-size: 10px; font-style: normal; }.project-status.pending { color: #9b630d; background: #fff0d5; }.project-status.protected { color: #2855c6; background: #e9efff; }.project-status.done { color: #137a47; background: #e4f7ed; }
.project-status.change_pending { color: #6a3bc2; background: #eee5ff; }
.project-report-fields { display: grid; grid-template-columns: 1fr 1.35fr; gap: 8px 14px; margin: 7px 0; padding: 7px 0; border-top: 1px dashed #e2e7f0; border-bottom: 1px dashed #e2e7f0; }.project-report-fields span { display: grid; gap: 2px; min-width: 0; }.project-report-fields small { color: #8a94a6; font-size: 10px; }.project-report-fields b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }.project-report-fields .field-company b { color: #243550; }.project-report-fields .field-products b { color: #315fd1; }.project-report-fields .field-budget b { color: #16834d; }.project-report-fields .field-quantity b { color: #c66a0a; }.project-protect-date { color: #2f63d8; font-weight: 700; }
.project-report-card footer { justify-content: flex-start; flex-wrap: wrap; margin-top: auto; }.project-report-actions { display: flex; gap: 4px; margin-left: auto; }.project-report-actions button { height: 25px; padding: 0 8px; border: 1px solid #cbd8f6; border-radius: 5px; color: #3155c6; background: #edf2ff; font-size: 10px; cursor: pointer; }.project-report-actions button.danger { color: #bd3934; border-color: #f0cac7; background: #fff0ef; }.project-report-card p { margin: 6px 0 0; color: #687489; font-size: 10px; }
.customer-project-layout { display: block; min-height: 0; }.customer-project-form, .customer-project-records { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }.customer-project-form h3, .customer-project-records h3 { margin: 0; }.customer-project-form label { display: grid; gap: 5px; color: #5f6a7d; font-size: 11px; font-weight: 650; }.customer-project-form textarea { min-height: 76px; resize: vertical; }.customer-project-items { display: grid; gap: 6px; }.customer-project-item { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 6px; }.customer-project-item .project-product-lookup { grid-column: 1 / -1; }.customer-project-item button { border: 1px solid #efceca; border-radius: 5px; color: #bd3934; background: #fff2f1; cursor: pointer; }.customer-project-record-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }.customer-project-record-head > div:first-child { display: grid; gap: 3px; }.customer-project-record-head span { color: #7b8698; font-size: 11px; }.customer-project-record-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }.customer-project-modal { position: fixed; z-index: 1250; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(24, 34, 54, .5); backdrop-filter: blur(2px); }.customer-project-dialog { width: min(760px, calc(100vw - 40px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 20px; border-radius: 12px; box-shadow: 0 22px 60px rgba(20, 32, 58, .28); }.customer-project-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #e5eaf2; }.customer-project-dialog-head > div { display: grid; gap: 4px; }.customer-project-dialog-head p { margin: 0; color: #7b8698; font-size: 11px; }.customer-project-dialog-close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; color: #657087; background: transparent; font-size: 22px; cursor: pointer; }.customer-project-dialog-close:hover { background: #f1f4f9; }.customer-project-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }.customer-project-products-field, .customer-project-note-field { grid-column: 1 / -1; }.customer-project-products-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: #5f6a7d; font-size: 11px; font-weight: 650; }.customer-project-products-label button { height: 30px; }.customer-project-dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #e5eaf2; }.customer-project-dialog-actions > span { margin-right: auto; color: #66758c; font-size: 11px; }.customer-project-dialog-actions button { min-width: 104px; }
.admin-project-form { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(25, 35, 55, .48); backdrop-filter: blur(2px); }.admin-project-dialog { width: min(470px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; padding: 18px; border: 1px solid #d8e0ee; border-radius: 12px; background: #fff; box-shadow: 0 20px 55px rgba(20, 32, 58, .24); }.admin-project-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #e8edf5; }.admin-project-form-head > div { display: grid; gap: 3px; }.admin-project-form-head strong { color: #202a3a; font-size: 16px; }.admin-project-form-head span { color: #7b8698; font-size: 11px; font-weight: 400; }.admin-project-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }.admin-project-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.admin-project-products { display: grid; gap: 6px; }.admin-project-products > span { color: #5f6a7d; font-size: 11px; font-weight: 650; }.admin-project-items { display: grid; gap: 6px; }.admin-project-item { display: grid; grid-template-columns: 1fr 1fr 30px; gap: 6px; }.admin-project-item .project-product-lookup { grid-column: 1 / -1; }.project-product-lookup { border-color: #b9c9ee; background: #f8faff; }.admin-project-item button { border: 1px solid #efceca; border-radius: 5px; color: #bd3934; background: #fff2f1; cursor: pointer; }.admin-project-products > button { justify-self: stretch; }.admin-project-form label { display: grid; gap: 5px; color: #5f6a7d; font-size: 11px; font-weight: 650; }.admin-project-form input, .admin-project-form select, .admin-project-form textarea { width: 100%; }.admin-project-form textarea { min-height: 78px; margin-top: 5px; resize: vertical; }.admin-project-form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }.admin-project-form-actions button { width: 100%; }.admin-project-form-actions span { grid-column: 1 / -1; }
.project-revision-compare { margin-top: 12px; padding: 10px; border: 1px solid #dbcdf4; border-radius: 7px; background: #fff; }.project-revision-compare > strong { color: #6840b1; }.project-revision-compare > div { display: grid; grid-template-columns: 110px 1fr 1fr; gap: 8px; padding: 6px 8px; border-top: 1px solid #edf0f5; font-size: 11px; }.project-revision-compare .revision-head { margin-top: 7px; color: #778297; background: #f5f6fa; }.project-revision-compare .changed { background: #fff5cb; }.project-report-actions .revision-approve { color: #176e43; border-color: #a8d9bf; background: #eaf8f0; }.project-report-actions .revision-reset { color: #7147bd; border-color: #d3c2ef; background: #f2ecff; }
@media (max-width: 1500px) { .project-report-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .project-report-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .project-report-list { grid-template-columns: 1fr; } }
.customer-submit-layout { display: grid; grid-template-columns: minmax(300px, 390px) 1fr; gap: 12px; }.customer-submit-form, .customer-submit-records { padding: 14px; border: 1px solid #dce3ef; border-radius: 9px; background: #fff; }.customer-submit-form > p { color: #7b8698; font-size: 11px; }.customer-submit-form label { display: grid; gap: 5px; margin: 9px 0; color: #5f6a7d; font-size: 11px; font-weight: 650; }.customer-submit-form textarea { resize: vertical; }.customer-submit-import { display: grid; gap: 7px; margin-top: 12px; padding: 12px; border: 1px dashed #b9c9ee; border-radius: 7px; background: #f8faff; }.customer-order-review-list { display: block; margin-top: 10px; }.customer-order-review-list.empty { display: grid; grid-template-columns: 1fr; place-items: center; min-height: 140px; color: #8791a3; }.customer-order-review-card { padding: 12px; border: 1px solid #dce3ef; border-left: 4px solid #e0a11a; border-radius: 8px; background: #fff; }.customer-order-review-card.status-approved { border-left-color: #1c9b58; }.customer-order-review-card.status-rejected { border-left-color: #d34545; }.customer-order-review-card header, .customer-order-review-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.customer-order-review-card header em { color: #95620b; font-size: 11px; font-style: normal; }.customer-order-review-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 9px 0; padding: 8px 0; border-top: 1px dashed #e2e7f0; border-bottom: 1px dashed #e2e7f0; }.customer-order-review-fields span { display: grid; gap: 2px; color: #8993a5; font-size: 10px; }.customer-order-review-fields b { overflow: hidden; color: #26344c; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.customer-order-review-card p { color: #bd3934; font-size: 11px; }
.customer-submit-preview { margin-bottom: 10px; }.customer-submit-table-wrap { overflow-x: auto; border: 1px solid #dce3ef; border-radius: 7px; }.customer-submit-table-wrap table { width: 100%; min-width: 920px; border-collapse: collapse; }.customer-submit-table-wrap th { padding: 8px 6px; color: #647086; background: #f3f6fb; font-size: 10px; text-align: left; white-space: nowrap; }.customer-submit-table-wrap td { padding: 5px; border-top: 1px solid #e8edf5; }.customer-submit-table-wrap input { width: 100%; min-width: 82px; }.customer-submit-table-wrap td:nth-child(8) input { min-width: 210px; }.review-supplier { display: grid; grid-template-columns: auto minmax(140px,1fr); align-items: center; gap: 8px; margin: 8px 0; color: #687489; font-size: 11px; }

/* Customer order entry: compact full-width input row above full-width split records. */
#customerSubmitView .customer-submit-layout {
  grid-template-columns: minmax(0, 1fr);
}
#customerSubmitView .customer-submit-form,
#customerSubmitView .customer-submit-records {
  min-width: 0;
}
#customerSubmitView .customer-submit-form {
  padding: 10px 12px;
}
#customerSubmitView .customer-submit-form > h3 {
  margin: 0;
}
#customerSubmitView .customer-submit-form > p {
  margin: 2px 0 5px;
}
#customerSubmitView .customer-submit-form-body {
  display: grid;
  grid-template-columns: minmax(420px, 2.6fr) minmax(300px, 1.05fr) minmax(520px, 1.65fr);
  grid-auto-rows: 58px;
  align-items: stretch;
  gap: 10px;
}
#customerSubmitView .customer-submit-form-body > label {
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  margin: 0;
}
#customerSubmitView .customer-submit-form textarea {
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  resize: none;
}
#customerSubmitView .customer-submit-split-panel {
  display: flex;
  min-width: 0;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px 10px;
  border: 1px solid #dce4f2;
  border-radius: 9px;
  background: linear-gradient(180deg, #fbfcff, #f5f8ff);
}
#customerSubmitView .customer-submit-split-panel > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
#customerSubmitView .customer-submit-split-panel strong {
  color: #26344c;
  font-size: 13px;
}
#customerSubmitView .customer-submit-split-panel span {
  overflow: hidden;
  color: #7b879b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#customerSubmitView .customer-submit-split-panel button {
  width: auto;
  min-width: 138px;
  flex: 0 0 auto;
  height: 34px;
}
#customerSubmitView .customer-submit-split-panel button b {
  margin-left: 10px;
  font-size: 15px;
}
#customerSubmitView .customer-submit-split-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}
#customerSubmitView .customer-submit-split-actions #clearCustomerSubmitRawBtn {
  width: 62px;
  min-width: 62px;
}
#customerSubmitView .customer-submit-import-row {
  display: grid;
  grid-template-columns: 145px minmax(165px, 1fr) 178px;
  align-items: center;
  gap: 9px;
  margin-top: 0;
  padding: 4px 9px;
  border: 1px solid #dce4f2;
  border-radius: 9px;
  background: #fbfcff;
}
#customerSubmitView .customer-submit-import-title {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 29px;
}
#customerSubmitView .customer-submit-import-title::before {
  content: "X";
  position: absolute;
  top: 1px;
  left: 0;
  display: grid;
  width: 22px;
  height: 25px;
  place-items: center;
  border-radius: 4px;
  color: #fff;
  background: #1d9b5b;
  font-size: 11px;
  font-weight: 800;
}
#customerSubmitView .customer-submit-import-title strong {
  color: #26344c;
  font-size: 12px;
}
#customerSubmitView .customer-submit-import-title span {
  color: #7b879b;
  font-size: 10px;
}
#customerSubmitView .customer-submit-import-row input,
#customerSubmitView .customer-submit-import-row button {
  width: 100%;
  min-width: 0;
  height: 34px;
}
#customerSubmitView .customer-submit-side {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding-left: 16px;
  border-left: 1px solid #dfe5ef;
}
#customerSubmitView .customer-submit-import {
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#customerSubmitView .customer-submit-import input,
#customerSubmitView .customer-submit-import button {
  width: 100%;
}
#customerSubmitView .customer-submit-side > .primary {
  align-self: flex-end;
  min-width: 108px;
}
#customerSubmitView .customer-submit-records {
  min-height: 310px;
}
#customerSubmitView .customer-submit-record-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: -14px -14px 12px;
  padding: 7px 10px 0;
  border-bottom: 1px solid #dfe6f1;
  background: #f4f7fc;
}
#customerSubmitView .customer-submit-record-tabs button {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 7px 7px 0 0;
  color: #66738a;
  background: transparent;
  font-weight: 700;
}
#customerSubmitView .customer-submit-record-tabs button.active {
  color: #315ed6;
  border-bottom-color: #3f63df;
  background: #fff;
}
#customerSubmitView .customer-submit-record-tabs button span {
  color: #8190aa;
  font-size: 11px;
}
#customerSubmitView .customer-submit-record-tabs button.active span {
  color: #315ed6;
}
#customerSubmitView .customer-submit-record-view {
  min-width: 0;
}
#customerSubmitView .customer-submit-record-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #8a96aa;
  border: 1px dashed #dbe3ef;
  border-radius: 8px;
  background: #fbfcff;
}
#customerSubmitView .customer-submit-record-empty.hidden {
  display: none;
}
#customerSubmitView .customer-project-record-head h3 span {
  color: #3f61df;
}
#customerSubmitView .customer-submit-record-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}
#customerSubmitView .customer-submit-record-actions button {
  height: 32px;
}
#customerSubmitView .customer-order-review-list.empty {
  min-height: 220px;
}
@media (max-width: 1380px) {
  #customerSubmitView .customer-submit-form-body {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  }
  #customerSubmitView .customer-submit-import-row {
    grid-column: 1 / -1;
    grid-template-columns: 220px minmax(260px, 1fr) 210px;
  }
}
@media (max-width: 820px) {
  #customerSubmitView .customer-submit-form-body {
    grid-template-columns: 1fr;
  }
  #customerSubmitView .customer-submit-import-row {
    grid-template-columns: 1fr;
  }
}

/* Customer draft table: fluid columns compact before horizontal scrolling. */
#customerSubmitView .customer-submit-table-wrap table {
  width: 100%;
  min-width: 720px;
  table-layout: fixed;
}
#customerSubmitView .customer-submit-table-wrap {
  max-height: clamp(260px, calc(100vh - 360px), 620px);
  overflow: auto;
  scrollbar-gutter: stable;
}
#customerSubmitView .customer-submit-table-wrap thead th {
  position: sticky;
  z-index: 2;
  top: 0;
}
#customerSubmitView .customer-submit-table-wrap th,
#customerSubmitView .customer-submit-table-wrap td {
  padding-right: clamp(3px, .45vw, 7px);
  padding-left: clamp(3px, .45vw, 7px);
}
#customerSubmitView .customer-submit-table-wrap input {
  width: 100%;
  min-width: 0;
}
#customerSubmitView .customer-submit-table-wrap th:nth-child(1) { width: 10%; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(2) { width: 15%; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(3) { width: 13%; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(4) { width: 7%; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(5) { width: 11%; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(6) { width: 13%; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(7) { width: auto; }
#customerSubmitView .customer-submit-table-wrap th:nth-child(8) { width: 72px; }
#customerSubmitView .customer-draft-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 9px;
  color: #748096;
  font-size: 11px;
}
#customerSubmitView .customer-draft-pager label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#customerSubmitView .customer-draft-pager select {
  width: 78px;
  height: 30px;
  padding: 0 7px;
}
#customerSubmitView .customer-draft-pager button {
  height: 30px;
}
.submission-table-wrap { max-height: 620px; overflow: auto; border: 1px solid #dce3ef; border-radius: 7px; background: #fff; }.submission-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }.submission-table th { position: sticky; z-index: 2; top: 0; padding: 8px 7px; color: #627086; background: #edf2f9; font-size: 10px; text-align: left; white-space: nowrap; }.submission-table td { overflow: hidden; padding: 6px 7px; border-top: 1px solid #e8edf5; color: #27344b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.submission-table tbody tr:hover td { background: #f8faff; }.submission-table input { width: 100%; min-width: 120px; height: 28px; }.submission-table th:nth-child(10), .submission-table td:nth-child(10) { width: 220px; }.submission-status { display: inline-flex; padding: 3px 7px; border-radius: 12px; color: #94600a; background: #fff0d5; }.submission-status.approved { color: #137a47; background: #e4f7ed; }.submission-status.rejected { color: #b43838; background: #fde9e8; }.submission-actions { display: flex; gap: 4px; }.submission-actions button { height: 27px; padding: 0 7px; font-size: 10px; }.submission-pager { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding-top: 9px; color: #748096; font-size: 11px; }.submission-pager button { height: 28px; }
#customerSubmitView .submission-table th:last-child,
#customerSubmitView .submission-table td:last-child,
#customerOrderReviewList .submission-table th:last-child,
#customerOrderReviewList .submission-table td:last-child {
  width: 150px;
}
.submission-table .submission-time {
  color: #66738a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.supplier-recommendation-popover { position: fixed; z-index: 2600; width: 380px; max-width: calc(100vw - 24px); max-height: 280px; overflow-y: auto; padding: 8px; border: 1px solid #cbd7eb; border-radius: 9px; background: #fff; box-shadow: 0 16px 45px rgba(27,42,72,.24); }.supplier-recommendation-popover header { display: flex; justify-content: space-between; padding: 6px 7px 9px; color: #27344b; }.supplier-recommendation-popover header span { color: #7b8698; font-size: 11px; }.supplier-recommendation-popover > button { display: grid; gap: 3px; width: 100%; margin: 3px 0; padding: 9px 10px; border: 1px solid #e1e7f1; border-radius: 7px; background: #fafcff; text-align: left; cursor: pointer; }.supplier-recommendation-popover > button:hover { border-color: #9eb6f2; background: #edf3ff; }.supplier-recommendation-popover > button b { color: #2859cf; font-size: 12px; }.supplier-recommendation-popover > button span { color: #687489; font-size: 10px; }.supplier-recommendation-loading,.supplier-recommendation-empty { padding: 24px 12px; color: #7b8698; text-align: center; }
.supplier-match-badge { display: inline-flex; align-items: center; height: 22px; margin-top: 3px; padding: 0 7px; border: 0; border-radius: 11px; font-size: 9px; white-space: nowrap; cursor: pointer; }.supplier-match-badge.unique { color: #147447; background: #e3f6eb; }.supplier-match-badge.multiple { color: #9a6208; background: #fff0d5; }.supplier-match-badge.none,.supplier-match-badge.specified { color: #b43838; background: #fde9e8; }.supplier-match-badge.manual { color: #2859cf; background: #e9efff; }
.supplier-match-badge.passive { cursor: default; pointer-events: none; }
.supplier-match-badge.supplier-match-editable { cursor: pointer; }
.supplier-recommendation-popover {
  width: 340px;
  max-height: min(380px, calc(100vh - 24px));
  padding: 8px;
  overflow-x: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 13px;
  box-shadow: 0 14px 36px rgba(30, 49, 82, .16), 0 2px 8px rgba(30, 49, 82, .06);
}
.supplier-recommendation-section + .supplier-recommendation-section { margin-top: 9px; padding-top: 9px; border-top: 1px solid #edf1f7; }
.supplier-recommendation-section header {
  position: sticky;
  top: -10px;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 4px 4px 6px;
  background: rgba(255,255,255,.98);
}
.supplier-recommendation-section header strong { overflow: hidden; color: #243956; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.supplier-recommendation-section header > span { overflow: hidden; color: #8190a5; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.supplier-recommendation-section header em { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; background: #eef3fb; color: #55708f; font-size: 9px; font-style: normal; font-weight: 700; }
.supplier-recommendation-section header small { color: #8b98aa; font-size: 9px; font-weight: 500; white-space: nowrap; }
.supplier-recommendation-section.snapshot header strong { color: #32674f; }
.supplier-recommendation-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin: 4px 0;
  min-height: 36px;
  padding: 6px 7px;
  border: 1px solid #e4eaf3;
  border-radius: 9px;
  background: #fff;
  color: #2b3c55;
  text-align: left;
}
button.supplier-recommendation-row { cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
button.supplier-recommendation-row:hover { border-color: #9cb5ed; background: #f7f9fe; box-shadow: 0 3px 10px rgba(51, 83, 148, .08); }
.supplier-recommendation-row.selected { border-color: #b8dfcb; background: #f5fbf7; }
.supplier-recommendation-select-mark { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #d7e0ed; border-radius: 50%; background: #f7f9fc; color: transparent; font-size: 11px; font-weight: 900; }
.supplier-recommendation-row.selected .supplier-recommendation-select-mark { border-color: #79c29f; background: #e2f5ea; color: #157648; }
.supplier-recommendation-company { min-width: 0; overflow: hidden; color: #293b55; font-size: 10px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.supplier-recommendation-selected-tag { grid-column: 4; display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 9px; background: #e4f6ec; color: #157648; font-size: 8px; font-weight: 800; }
.supplier-recommendation-meta { grid-column: 3; grid-row: 1; display: flex; align-items: center; gap: 6px; min-width: 0; color: #8190a5; font-size: 8px; white-space: nowrap; }
.supplier-recommendation-meta > span { display: inline-flex; align-items: center; gap: 3px; }
.supplier-recommendation-meta b { color: #52667f; font-size: 9px; }
.supplier-recommendation-meta .supplier-recommendation-stock { padding: 2px 5px; border-radius: 8px; background: #e7f6ed; color: #178151; font-size: 8px; font-weight: 800; }
.supplier-recommendation-legacy { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 7px 9px; border: 1px solid #f2d7a4; border-radius: 8px; background: #fffbf2; color: #98610b; font-size: 9px; }
.supplier-recommendation-legacy b { flex: 0 0 auto; padding: 2px 6px; border-radius: 7px; background: #fff0d5; }
.supplier-recommendation-legacy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-recommendation-empty.compact { padding: 10px 8px; }
.customer-price-level,.sale-price-source { display: inline-flex; align-items: center; width: max-content; height: 21px; margin-top: 3px; padding: 0 7px; border-radius: 11px; font-size: 9px; white-space: nowrap; }.customer-price-level.retail { color: #596579; background: #edf1f7; }.customer-price-level.core { color: #2859cf; background: #e9efff; }.customer-price-level.agent { color: #a35e08; background: #fff0d5; }.customer-price-level.chain { color: #7147bd; background: #f2ecff; }.sale-price-source.auto { color: #147447; background: #e3f6eb; }.sale-price-source.manual { color: #2859cf; background: #e9efff; }
.supply-status-badge { display:inline-flex; align-items:center; width:max-content; height:20px; padding:0 7px; border-radius:10px; font-size:9px; font-weight:800; line-height:1; white-space:nowrap; }
.supply-status-badge.status-clearance { color:#6d3bb7; background:#f0e8ff; }
.supply-status-badge.status-shortage { color:#a35e08; background:#fff0d5; }
.supply-status-badge.status-stopped { color:#b43838; background:#fde9e8; }
.entry-cost-status-wrap { display:inline-flex; align-items:center; justify-content:flex-start; gap:4px; width:100%; min-width:0; }
.entry-cost-status-wrap .entry-edit-input { flex:0 0 78px; width:78px; min-width:78px; }
.entry-cost-status-wrap .supply-status-badge { flex:0 0 auto; }
.entry-result-table .entry-cell-complete { overflow:visible; text-overflow:clip; white-space:nowrap; }
.entry-result-table .entry-cell-complete:not(.entry-cell-purchase_price) .entry-edit-input { min-width:100%; overflow:visible; text-overflow:clip; }
.entry-result-table .entry-cell-purchase_price { overflow:hidden; }
.entry-result-table .entry-cell-purchase_price .entry-cost-status-wrap { width:100%; overflow:hidden; }
.entry-result-table .entry-cell-purchase_price .entry-edit-input { flex:0 0 78px; width:78px; min-width:78px; }

/* Order entry result: three paired fields share one visual column without
   changing their independent edit/save fields. */
#entry .entry-result-table thead th {
  height: 36px;
  padding: 6px;
  vertical-align: middle;
}
#entry .entry-result-table {
  width: max(100%, 1500px);
  min-width: 1500px;
}
#entry .entry-result-table tbody tr,
#entry .entry-result-table tbody td {
  height: 46px;
}
#entry .entry-result-table tbody td {
  padding: 4px 6px;
}
#entry .entry-result-table .entry-cell-order_identity,
#entry .entry-result-table .entry-cell-product,
#entry .entry-result-table .entry-cell-recipient {
  overflow: hidden;
  vertical-align: middle;
}
#entry .entry-result-table .entry-cell-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(18px, 1fr));
  align-content: center;
  width: 100%;
  min-width: 0;
  height: 38px;
  gap: 2px;
}
#entry .entry-result-table .entry-cell-stack-line {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  height: 18px;
  overflow: hidden;
}
#entry .entry-result-table .entry-cell-stack-line .entry-hover-wrap {
  width: 100%;
  min-width: 0;
  height: 18px;
  overflow: hidden;
}
#entry .entry-result-table .entry-cell-stack-line .entry-edit-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 18px;
  padding: 0 4px;
  overflow: hidden;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#entry .entry-result-table .entry-cell-stack-primary .entry-edit-input {
  color: #27344b;
  font-size: 12px;
  font-weight: 700;
}
#entry .entry-result-table .entry-cell-stack-secondary .entry-edit-input {
  color: #748198;
  font-size: 11px;
  font-weight: 500;
}
#entry .entry-result-table .entry-cell-stack-order_identity .entry-edit-input,
#entry .entry-result-table .entry-cell-stack-recipient .entry-edit-input {
  font-variant-numeric: tabular-nums;
}
#entry .entry-result-table .entry-cell-sale_price,
#entry .entry-result-table .entry-cell-amount {
  min-width: 108px;
  overflow: hidden;
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
  box-shadow: inset 1px 0 #e3e8f0;
}
#entry .entry-result-table .entry-head-sale_price,
#entry .entry-result-table .entry-head-amount {
  padding-right: 6px;
  padding-left: 6px;
  text-align: center;
  box-shadow: inset 1px 0 #dce3ed;
}
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input,
#entry .entry-result-table .entry-cell-amount .entry-edit-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 94px;
  margin: 0 auto;
  padding-right: 6px;
  padding-left: 6px;
  border-color: transparent;
  appearance: textfield;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input::-webkit-inner-spin-button,
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input::-webkit-outer-spin-button,
#entry .entry-result-table .entry-cell-amount .entry-edit-input::-webkit-inner-spin-button,
#entry .entry-result-table .entry-cell-amount .entry-edit-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}
#entry .entry-result-table .entry-cell-amount .entry-edit-input {
  color: #263750;
  font-weight: 800;
}

/* Keep the order-only sale price visibly editable after the legacy amount-cell rules above. */
#entry .entry-result-table .entry-cell-sale_price {
  min-width: 150px;
  overflow: visible;
}
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input {
  display: block;
  box-sizing: border-box;
  flex: 1 1 76px;
  width: auto;
  min-width: 72px;
  height: 30px;
  margin: 0;
  padding: 3px 7px;
  border: 1px solid #b9c9e6;
  border-radius: 7px;
  background: #fff;
  color: #24344e;
  text-align: right;
  box-shadow: inset 0 1px 2px rgba(40, 67, 112, .04);
}
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input:hover {
  border-color: #86a6ee;
}
#entry .entry-result-table .entry-cell-sale_price .entry-edit-input:focus {
  border-color: #416fe1;
  outline: 2px solid rgba(65, 111, 225, .14);
  outline-offset: 0;
}

/* Order management: company and metadata badges stay on one adaptive line. */
#orders .order-inline-meta { display:flex; align-items:center; width:100%; min-width:0; gap:clamp(4px,.55vw,9px); overflow:hidden; white-space:nowrap; }
#orders .order-inline-meta > .order-expand-input { flex:1 1 auto; width:auto; min-width:0; margin:0; overflow:hidden; white-space:nowrap; word-break:normal; }
#orders .order-inline-meta > .customer-price-level,
#orders .order-inline-meta > .supplier-match-badge { display:block; flex:0 0 76px; width:76px; max-width:76px; margin:0; overflow:hidden; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
#orders .order-inline-meta > .customer-price-level { height:20px; padding:0 6px; }
#orders .order-inline-meta > .supplier-match-badge { height:21px; padding:0 7px; line-height:21px; }
#orders .order-inline-meta > .order-company-copy-btn { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0; border:1px solid #d5deec; border-radius:6px; background:#fff; color:#65728a; font-size:12px; line-height:1; cursor:pointer; transition:border-color .15s ease,background-color .15s ease,color .15s ease; }
#orders .order-inline-meta > .order-company-copy-btn:hover { border-color:#8caaf3; background:#f3f7ff; color:#315fd6; }
#orders .order-inline-meta > .order-company-copy-btn.copied { border-color:#9edbb9; background:#e8f7ef; color:#147447; }
#orders .order-row-copy-cell { padding-left:4px; padding-right:4px; text-align:center; }
#orders .order-row-copy-btn { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; padding:0; border:1px solid #d5deec; border-radius:6px; background:#fff; color:#65728a; font-size:12px; line-height:1; cursor:pointer; transition:border-color .15s ease,background-color .15s ease,color .15s ease; }
#orders .order-row-copy-btn:hover { border-color:#8caaf3; background:#f3f7ff; color:#315fd6; }
#orders .order-row-copy-btn.copied { border-color:#9edbb9; background:#e8f7ef; color:#147447; }
#orders .order-quick-dates { display:inline-flex; align-items:center; gap:5px; flex:0 0 auto; }
#orders .order-quick-dates button { min-width:48px; height:34px; padding:0 10px; border-radius:7px; font-size:12px; font-weight:600; white-space:nowrap; cursor:pointer; transition:filter .15s ease,transform .15s ease,box-shadow .15s ease; }
#orders .order-quick-dates button[data-order-date-offset="0"] { border:1px solid #8eabf5; background:#eaf0ff; color:#2859cf; }
#orders .order-quick-dates button[data-order-date-offset="1"] { border:1px solid #efbe76; background:#fff2df; color:#a35e08; }
#orders .order-quick-dates button[data-order-date-offset="2"] { border:1px solid #bea6ed; background:#f2ecff; color:#7147bd; }
#orders .order-quick-dates button:hover { filter:brightness(.97); transform:translateY(-1px); }
#orders .order-quick-dates button[data-order-date-offset="0"].active { border-color:#3564df; background:#3564df; color:#fff; box-shadow:0 3px 9px rgba(53,100,223,.24); }
#orders .order-quick-dates button[data-order-date-offset="1"].active { border-color:#d88416; background:#d88416; color:#fff; box-shadow:0 3px 9px rgba(216,132,22,.24); }
#orders .order-quick-dates button[data-order-date-offset="2"].active { border-color:#7b52c7; background:#7b52c7; color:#fff; box-shadow:0 3px 9px rgba(123,82,199,.24); }
#orders .orders-table td:has(.order-inline-meta) { min-width:0; }
#orders .orders-table .order-inline-meta > .order-expand-input.expanded { width:max(100%,220px); }
.order-overflow-tooltip { position:fixed; z-index:10050; left:0; top:0; display:none; max-width:min(420px,calc(100vw - 24px)); padding:8px 11px; border:1px solid #cad5e5; border-radius:7px; background:#fff; box-shadow:0 8px 24px rgba(26,39,63,.2); color:#26354d; font-size:12px; font-weight:500; line-height:1.55; overflow-wrap:anywhere; white-space:normal; pointer-events:none; }
.order-overflow-tooltip.visible { display:block; }
@media (max-width: 1100px) { .customer-submit-layout, .customer-order-review-list { grid-template-columns: 1fr; } }
.entry-result-pager { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 10px 12px; border-top: 1px solid #e2e7f0; color: #687489; font-size: 11px; }
.entry-result-pager label { display: flex; align-items: center; gap: 5px; }
.entry-result-pager select { width: 78px; height: 30px; padding: 0 7px; }
.entry-duplicate-badge { display: inline-flex; padding: 3px 7px; border-radius: 11px; font-size: 9px; white-space: nowrap; }
.entry-duplicate-badge.clear { color: #147447; background: #e3f6eb; }
.entry-duplicate-badge.batch { color: #b43838; background: #fde9e8; }
.entry-duplicate-badge.history { color: #9a6208; background: #fff0d5; }
.entry-result-table tr.duplicate-batch td { background: #fff5f4; }
.entry-result-table tr.duplicate-history td { background: #fffaf0; }

/* Order entry: keep customer/supplier status pills visible on one adaptive line. */
.entry-result-table .entry-cell-customer .entry-hover-wrap,
.entry-result-table .entry-cell-supplier .entry-hover-wrap {
  display: flex;
  align-items: center;
  gap: clamp(4px, .4vw, 7px);
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}
.entry-result-table .entry-cell-customer .entry-edit-input,
.entry-result-table .entry-cell-supplier .entry-edit-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.entry-result-table .entry-cell-customer .customer-price-level,
.entry-result-table .entry-cell-supplier .supplier-match-badge {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  height: 20px;
  margin: 0;
  padding: 0 6px;
}
@media (max-width: 1500px) { .project-report-topbar { align-items: flex-start; flex-wrap: wrap; }.project-report-top-actions { width: 100%; overflow-x: auto; } }
@media (max-width: 1000px) { .customer-project-layout { grid-template-columns: 1fr; }.project-report-fields { grid-template-columns: 1fr 1fr; }.customer-project-stats { grid-template-columns: repeat(2, 1fr); } }

/* PRJ-001: compact customer project cards shared by the embedded portal */
.customer-portal #customerProjectsView .customer-project-card-summary { display: grid; gap: 7px; margin: 9px 0; padding: 9px 0; border-top: 1px dashed #e2e7f0; border-bottom: 1px dashed #e2e7f0; }
.customer-portal #customerProjectsView .customer-project-card-summary > span:not(.customer-project-card-metrics) { display: grid; min-width: 0; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; }
.customer-portal #customerProjectsView .customer-project-card-summary small { color: #8a94a6; font-size: 10px; }.customer-portal #customerProjectsView .customer-project-card-summary b { min-width: 0; overflow: hidden; color: #2b3850; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-portal #customerProjectsView .customer-project-card-metrics,.customer-portal #customerProjectsView .customer-project-card-tools { display: flex; min-width: 0; align-items: center; gap: 8px; }.customer-portal #customerProjectsView .customer-project-card-metrics b { color: #16834d; font-size: 12px; }.customer-portal #customerProjectsView .customer-project-card-metrics i { padding: 3px 7px; border-radius: 999px; color: #58667d; background: #f0f3f8; font-size: 9px; font-style: normal; white-space: nowrap; }.customer-portal #customerProjectsView .customer-project-card-tools { margin-left: auto; }
.customer-portal #customerProjectsView .customer-project-card-detail { position: relative; }.customer-portal #customerProjectsView .customer-project-card-detail > summary { display: inline-flex; height: 25px; align-items: center; padding: 0 8px; border: 1px solid #d5deec; border-radius: 5px; color: #526078; background: #fff; font-size: 10px; font-weight: 700; list-style: none; cursor: pointer; }.customer-portal #customerProjectsView .customer-project-card-detail > summary::-webkit-details-marker { display: none; }.customer-portal #customerProjectsView .customer-project-card-detail[open] > summary { color: #3155c6; border-color: #c1d0f4; background: #edf2ff; }
.customer-portal #customerProjectsView .customer-project-card-detail > div { position: absolute; z-index: 20; right: 0; bottom: calc(100% + 8px); display: grid; width: min(340px, calc(100vw - 40px)); grid-template-columns: 1fr 1fr; gap: 9px 12px; padding: 12px; border: 1px solid #d6dfed; border-radius: 9px; background: #fff; box-shadow: 0 16px 36px rgba(24, 41, 72, .18); }.customer-portal #customerProjectsView .customer-project-card-detail > div span { display: grid; min-width: 0; gap: 3px; }.customer-portal #customerProjectsView .customer-project-card-detail > div .wide { grid-column: 1 / -1; }.customer-portal #customerProjectsView .customer-project-card-detail > div small { color: #8a94a6; font-size: 9px; }.customer-portal #customerProjectsView .customer-project-card-detail > div b { overflow-wrap: anywhere; color: #344158; font-size: 10px; }
.customer-portal #customerProjectsView .customer-project-results-card { overflow: visible; }.customer-portal #customerProjectsView #customerProjectPager { margin-top: 10px; }.customer-portal #customerProjectsView #customerProjectPager .customer-portal-pager { width: 100%; }
@media (max-width: 720px) { .customer-portal #customerProjectsView .customer-project-card-detail > div { position: fixed; right: 12px; bottom: 72px; left: 12px; width: auto; } }
@media (max-width: 760px) { .project-report-top-actions { flex-wrap: wrap; overflow: visible; }.project-report-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }.project-report-stats button { width: 100%; }.project-report-stats button:last-child { grid-column: 1 / -1; } }

/* PRJ-001: project reporting desktop workspace */
#projectReports .project-report-topbar { align-items: center; }
#projectReports .project-report-top-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
#projectReports .project-report-panel { min-width: 0; overflow: hidden; padding: 14px; }
#projectReports .project-report-overview {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 9px;
  margin-bottom: 12px;
}
#projectReports .project-report-overview button {
  width: auto;
  height: 58px;
  padding: 8px 12px;
  border-radius: 10px;
}
#projectReports .project-report-overview .stat-change_pending { color: #7147bd; border-color: #d9cbf4; background: #f6f1ff; }
#projectReports .project-report-overview .stat-expiring_7 { color: #b66a0a; border-color: #f3d19a; background: #fff8e9; }
#projectReports .project-report-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; }
#projectReports .project-report-search-row { display: grid; grid-template-columns: minmax(280px, 1fr) 150px 130px auto auto; gap: 8px; min-width: 0; }
#projectReports .project-report-result-row { display: flex; align-items: center; gap: 12px; color: #6c7890; font-size: 12px; white-space: nowrap; }
#projectReports .project-report-result-row label { display: flex; align-items: center; gap: 6px; }
#projectReports .project-report-result-row select { width: 92px; }
.project-report-table-wrap { min-width: 0; overflow: auto; border: 1px solid #dfe6f1; border-radius: 10px; background: #fff; }
.project-report-table { width: 100%; min-width: 1360px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.project-report-table th { position: sticky; top: 0; z-index: 2; height: 42px; padding: 8px 10px; border-bottom: 1px solid #dce4f0; background: #f4f7fb; color: #516078; font-size: 11px; text-align: center; white-space: nowrap; }
.project-report-table th:nth-child(1) { width: 150px; }.project-report-table th:nth-child(2) { width: 210px; }.project-report-table th:nth-child(3) { width: 190px; }.project-report-table th:nth-child(4) { width: 210px; }.project-report-table th:nth-child(5) { width: 115px; }.project-report-table th:nth-child(6) { width: 160px; }.project-report-table th:nth-child(7) { width: 150px; }.project-report-table th:nth-child(8) { width: 135px; }.project-report-table th:nth-child(9) { width: 85px; }
.project-report-table td { height: 61px; padding: 8px 10px; border-bottom: 1px solid #edf1f6; color: #25334b; font-size: 11px; vertical-align: middle; text-align: center; }
.project-report-table tbody tr { cursor: pointer; transition: background .15s ease; }
.project-report-table tbody tr:hover, .project-report-table tbody tr:focus-within { background: #f5f8ff; }
.project-report-table tbody tr:last-child td { border-bottom: 0; }
.project-report-table .empty { height: 180px; color: #8792a6; cursor: default; }
.project-report-cell-stack { display: grid; gap: 3px; min-width: 0; text-align: left; }
.project-report-cell-stack strong, .project-report-cell-stack span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-report-cell-stack strong { color: #21324d; font-size: 12px; }
.project-report-cell-stack span { color: #768399; font-size: 10px; }
.project-report-cell-stack.project-report-center { text-align: center; }
.project-report-id { color: #315fd3 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }
.project-report-source-badge { display: inline-flex; width: fit-content; max-width: 100%; padding: 2px 7px; border-radius: 999px; color: #3359ba !important; background: #edf2ff; }
.project-report-table .project-status { display: inline-flex; align-items: center; justify-content: center; width: fit-content; margin: 0 auto; padding: 4px 9px; border-radius: 999px; font-weight: 750; }
.project-status.pending { color: #a66308; background: #fff2cf; }.project-status.protected { color: #146c43; background: #e7f7ee; }.project-status.change_pending { color: #7045b8; background: #f1eaff; }.project-status.rejected { color: #b83333; background: #feecec; }.project-status.expired { color: #647084; background: #eef1f5; }.project-status.released { color: #745d84; background: #f3eef7; }.project-status.done { color: #156447; background: #e1f5ea; }
.project-report-table-action { height: 29px; padding: 0 10px; border: 1px solid #cbd8f4; border-radius: 7px; color: #315fd3; background: #f5f8ff; cursor: pointer; }
.project-report-pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-height: 44px; padding-top: 10px; }
.project-report-pager > span { margin-right: auto; color: #6d7990; font-size: 12px; }
.project-report-pager button { min-width: 34px; height: 30px; padding: 0 10px; border: 1px solid #d7dfec; border-radius: 7px; color: #40506a; background: #fff; cursor: pointer; }
.project-report-pager button.active { color: #fff; border-color: #285ecb; background: #285ecb; }.project-report-pager button:disabled { opacity: .45; cursor: default; }
.project-report-drawer { position: fixed; inset: 0; z-index: 1180; }
.project-report-drawer.hidden { display: none; }
.project-report-drawer-mask { position: absolute; inset: 0; border: 0; background: rgba(15, 23, 42, .38); backdrop-filter: blur(2px); }
.project-report-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(680px, 82vw); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: #fff; box-shadow: -20px 0 56px rgba(15, 23, 42, .22); }
.project-report-drawer-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid #e2e8f2; }
.project-report-drawer-panel > header small { color: #315fd3; font-weight: 700; }.project-report-drawer-panel > header h2 { margin: 3px 0 0; color: #172943; font-size: 21px; }
.project-report-drawer-body { min-height: 0; padding: 18px 20px; overflow: auto; }
.project-report-detail-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid #dce5f3; border-radius: 12px; background: #f7f9fd; }
.project-report-detail-hero h3 { margin: 0 0 5px; color: #1c2f4b; }.project-report-detail-hero p { margin: 0; color: #68778e; }
.project-report-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.project-report-detail-grid > div { min-width: 0; padding: 11px 12px; border: 1px solid #e2e8f2; border-radius: 9px; background: #fff; }
.project-report-detail-grid > div.wide { grid-column: 1 / -1; }.project-report-detail-grid small { display: block; margin-bottom: 4px; color: #7b879b; }.project-report-detail-grid strong { display: block; overflow-wrap: anywhere; color: #243550; }
.project-report-detail-section { margin-top: 16px; }.project-report-detail-section > h4 { margin: 0 0 8px; color: #253751; }
.project-report-product-list { display: grid; gap: 7px; }.project-report-product-list span { display: flex; justify-content: space-between; gap: 12px; padding: 9px 11px; border-radius: 8px; background: #f5f8fc; }
.project-report-detail-note { padding: 11px 12px; border-left: 3px solid #5f82df; border-radius: 7px; background: #f4f7ff; color: #52627a; white-space: pre-wrap; }
.project-report-drawer-panel > footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid #e1e7f0; background: #fafbfd; }
.project-report-drawer-panel > footer label { display: grid; flex: 1; gap: 4px; color: #738096; font-size: 10px; }.project-report-drawer-panel > footer input { width: 100%; }
.project-report-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.project-report-detail-actions button { height: 34px; padding: 0 11px; border: 1px solid #c9d7f4; border-radius: 7px; color: #3159c5; background: #eef3ff; cursor: pointer; }.project-report-detail-actions button.danger { color: #b73434; border-color: #f0c5c5; background: #fff0f0; }.project-report-detail-actions button.success { color: #16714a; border-color: #b9dfca; background: #eaf8f0; }
@media (max-width: 1180px) {
  #projectReports .project-report-overview { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  #projectReports .project-report-toolbar { grid-template-columns: 1fr; }
  #projectReports .project-report-result-row { justify-content: flex-end; }
}
@media (max-width: 760px) {
  #projectReports .project-report-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #projectReports .project-report-search-row { grid-template-columns: 1fr 1fr; }
  #projectReports .project-report-search-row input { grid-column: 1 / -1; }
  #projectReports .project-report-result-row { justify-content: space-between; }
  .project-report-drawer-panel { width: 100vw; }
  .project-report-detail-grid { grid-template-columns: 1fr; }
  .project-report-detail-grid > div.wide { grid-column: auto; }
  .project-report-drawer-panel > footer { align-items: stretch; flex-direction: column; }
}
@media (max-width: 760px) { .project-invite-dialog { width: min(94vw, 520px); padding: 14px; }.project-invite-create, .project-invite-result, .project-invite-row { grid-template-columns: 1fr; }.project-invite-row > small, .project-invite-row > div:last-child { grid-column: 1; grid-row: auto; }.project-invite-row > div:last-child { justify-content: flex-start; }.project-invite-qr img { width: 132px; height: 132px; } }
@media (max-width: 760px) { .product-catalog-invite-create > button { grid-column: 1; }.product-catalog-customer-results { position: static; margin-top: 5px; max-height: 220px; } }
@media (max-width: 760px) { .customer-invite-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 14px; }.customer-invite-create, .customer-invite-dialog .customer-invite-row { grid-template-columns: 1fr; }.customer-invite-dialog .customer-invite-row > div:last-child { grid-column: 1; grid-row: auto; }.customer-invite-dialog .project-invite-result { grid-template-columns: 1fr; }.customer-project-record-actions { flex-wrap: wrap; justify-content: flex-end; } }

@media (max-width: 900px) {
  .customer-qualification-stats { grid-template-columns: repeat(2, 1fr); }
  .customer-qualification-toolbar { align-items: stretch; flex-direction: column; }
  .customer-qualification-table-wrap { overflow-x: auto; }
  .customer-qualification-preview { position: fixed; left: 5vw; top: 15vh; width: 90vw; height: 70vh; }
}

.portal-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #5e697a;
  font-size: 11.5px;
  font-weight: 620;
}

.portal-field input {
  width: 100%;
  min-width: 0;
}

#customer .customer-search {
  padding: 14px 16px;
}

#customer .customer-search-main {
  display: grid;
  grid-template-columns: 170px 170px minmax(280px, 1fr) repeat(5, auto);
  align-items: end;
  flex-wrap: nowrap;
}

#customer .customer-quick-date {
  min-width: 58px;
  border-width: 1px;
  border-style: solid;
  font-weight: 750;
}

#customer .customer-quick-date.is-today {
  border-color: #85d9bd;
  color: #087c5d;
  background: #e8f8f2;
}

#customer .customer-quick-date.is-yesterday {
  border-color: #9eb5f8;
  color: #3155c6;
  background: #edf2ff;
}

#customer .customer-quick-date.is-before-yesterday {
  border-color: #f0c678;
  color: #a86000;
  background: #fff6e5;
}

#customer .customer-quick-date:hover {
  filter: brightness(.97);
  transform: translateY(-1px);
}

#supplierPortal .supplier-search {
  margin-bottom: 14px;
  padding: 14px 16px;
}

#supplierPortal .supplier-search-main {
  display: grid;
  grid-template-columns: 170px 170px minmax(320px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

#customer .portal-field input,
#supplierPortal .portal-field input {
  width: 100%;
  min-width: 0;
}

#customer .portal-phone-search {
  align-self: end;
  width: 100%;
  min-width: 0;
}

#customer #customerResult,
#supplierPortal .supplier-orders-wrap {
  border-radius: 8px;
  background: #ffffff;
}

#supplierPortal .supplier-upload-panel {
  display: grid;
  grid-template-columns: auto minmax(260px, 560px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

#supplierPortal .supplier-upload-panel .panel-title {
  margin: 0;
}

#supplierPortal .supplier-upload-panel .actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.project-name-library-modal { position: fixed; z-index: 1210; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(25, 35, 55, .48); backdrop-filter: blur(2px); }
.project-name-library-dialog { width: min(840px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; overflow: hidden; padding: 20px; border: 1px solid #d8e0ee; border-radius: 14px; background: #fff; box-shadow: 0 20px 55px rgba(20, 32, 58, .24); }
.project-name-library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #e8edf5; }
.project-name-library-head > div { display: grid; gap: 4px; }.project-name-library-head strong { font-size: 20px; color: #202a3a; }.project-name-library-head span { color: #7b8698; font-size: 12px; }
.project-name-library-tools { display: grid; grid-template-columns: minmax(220px, 1fr) 180px 82px; gap: 10px; margin-top: 16px; }
.project-name-library-tools input { min-width: 0; }
.project-name-import { display: flex; align-items: center; min-width: 0; padding: 0 12px; border: 1px solid #d8e0ee; border-radius: 7px; background: #f8faff; cursor: pointer; }
.project-name-import span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }.project-name-import input { display: none; }
.project-name-library-tip { margin: 10px 0; color: #76839a; font-size: 12px; }
.project-name-import-status { min-height: 20px; margin: -4px 0 8px; color: #64748b; font-size: 12px; }
.project-name-import-status.success { color: #14804a; }
.project-name-import-status.error { color: #d13c3c; }
.project-name-library-list { min-height: 240px; max-height: 52vh; overflow: auto; border: 1px solid #e2e8f2; border-radius: 10px; }
.project-name-library-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) 86px 86px; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-bottom: 1px solid #edf1f7; }
.project-name-library-row:last-child { border-bottom: 0; }.project-name-library-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.project-name-library-row span { color: #69768b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.project-name-library-row small { color: #909bad; text-align: right; }
.project-name-library-row button { white-space: nowrap; }.project-name-library-list.empty { display: grid; place-items: center; color: #8a96aa; }
@media (max-width: 720px) { .project-name-library-tools { grid-template-columns: 1fr 1fr; }.project-name-library-tools > input { grid-column: 1 / -1; }.project-name-library-row { grid-template-columns: 1fr auto; }.project-name-library-row span { grid-column: 1 / -1; grid-row: 2; }.project-name-library-row small { display: none; } }

#supplierPortal .supplier-upload-panel input[type="file"] {
  width: 100%;
  min-width: 0;
}

.portal-product-search {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.portal-product-result {
  display: flex;
  flex: 1 1 auto;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--wb-shadow);
  color: var(--muted);
  text-align: center;
}

.portal-product-result strong {
  color: var(--text);
  font-size: 16px;
}

.portal-product-result span {
  max-width: 560px;
  font-size: 12.5px;
}

/* Responsive shell */
@media (max-width: 980px) {
  body { display: flex; overflow: hidden; }

  .side {
    position: relative;
    z-index: 50;
    display: flex;
    flex: 0 0 74px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 74px;
    height: 100vh;
    padding: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid var(--sidebar-line);
    border-bottom: 0;
    background: #ffffff;
  }

  .brand {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 54px;
    padding: 8px;
    justify-content: center;
    border-right: 0;
    border-bottom: 0;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .brand-copy { display: none; }
  .sidebar-toggle { display:none; }

  .nav-group-label {
    display: none;
  }

  .nav {
    flex: 0 0 auto;
    width: 100%;
    min-height: 42px;
    margin: 0;
    padding: 8px;
    overflow: hidden;
    color: transparent;
  }

  .nav::after {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .nav::before {
    top: auto;
    right: 8px;
    bottom: 0;
    left: 8px;
    width: auto;
    height: 3px;
  }

  .logout-nav {
    margin-top: 0;
    border-top: 1px solid transparent;
  }

  .main {
    width: calc(100% - 74px);
    height: 100vh;
  }

  .view > :not(.topbar) {
    margin-right: 16px;
    margin-left: 16px;
  }

  .topbar,
  #orders .topbar,
  #statistics .topbar,
  #funds .topbar,
  #entry .topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  #entry .entry-input-panel .archive-select-row {
    grid-template-columns: 1fr 1fr;
  }

  #entry .entry-import-inline {
    grid-column: 1 / -1;
  }

  #orders .orders-control-panel .filters {
    grid-template-columns: 180px 180px minmax(260px, 1fr) 74px auto auto;
    overflow-x: auto;
  }

  #orders .orders-logistics-panel {
    grid-template-columns: auto auto minmax(190px, 1fr) minmax(240px, 330px);
  }

  #statistics .stats-toolbar-meta {
    grid-template-columns: 1fr;
  }

  #statistics .stats-total-row {
    justify-content: flex-start;
  }
}

/* 品牌字强制居中，避免旧侧栏规则造成字号和基线偏移。 */
.side .brand .brand-mark {
  box-sizing: border-box;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  overflow: hidden;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-indent: 0 !important;
}

@media (min-width: 981px) {
  body.sidebar-collapsed .side .brand .brand-mark {
    font-size: 19px !important;
  }
}

@media (max-width: 680px) {
  .view > :not(.topbar) {
    margin-right: 10px;
    margin-left: 10px;
  }

  .topbar,
  #orders .topbar,
  #statistics .topbar,
  #funds .topbar,
  #entry .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 10px 10px;
  }

  h1,
  .topbar h1 {
    font-size: 19px;
  }

  .panel {
    padding: 10px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 8px;
  }

  .metrics div {
    min-height: 72px;
    padding: 10px 12px;
  }

  .orders-overview {
    min-height: 0;
    padding: 18px;
  }

  .orders-overview-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .orders-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    margin-top: 18px;
  }

  .orders-overview-stats b {
    font-size: 22px;
  }

  #entry .entry-input-panel .archive-select-row {
    grid-template-columns: 1fr;
  }

  #entry .entry-import-inline {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  #entry .entry-parse-row {
    grid-template-columns: 1fr;
  }

  #entry .entry-inline-actions {
    justify-content: flex-end;
  }

  #orders .orders-control-panel .filters {
    grid-template-columns: 1fr 1fr;
    width: 100%;
    overflow: visible;
  }

  #orders .orders-control-panel .filters #fQ {
    grid-column: 1 / -1;
  }

  #orders .orders-control-panel .toggle-label {
    justify-self: end;
  }

  #orders .order-quick-dates {
    justify-self: start;
  }

  .order-lock-help {
    display: none;
  }

  #orders .orders-logistics-panel {
    grid-template-columns: 1fr auto;
  }

  #orders .orders-logistics-panel p {
    display: none;
  }

  #orders .orders-logistics-panel .actions {
    grid-column: 1 / -1;
  }

  #statistics .stats-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #statistics .stats-date-row,
  #statistics .stats-total-row {
    flex-wrap: nowrap;
    padding-bottom: 3px;
    overflow-x: auto;
  }

  #funds .funds-panel-head {
    display: block;
  }

  #funds .funds-panel-head .panel-title {
    margin-bottom: 8px;
  }

  .portal-login-strip {
    display: block;
  }

  .portal-login-strip .panel-title {
    margin-bottom: 8px;
  }

  .portal-login-strip .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-search-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #customer .customer-result-bar {
    grid-template-columns: 1fr;
  }

  #customer #customerSummary:not(.hidden) {
    justify-content: start;
  }

  .order-edit-password-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .workbench-hero,
  .portal-identity-hero {
    min-height: 0;
    padding: 18px;
  }

  .workbench-hero-icon,
  .portal-avatar {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .workbench-hero-heading strong,
  .portal-identity-heading > div > strong {
    max-width: 185px;
    font-size: 17px;
  }

  .portal-identity-badge {
    padding: 5px 9px;
    font-size: 10.5px;
  }

  .workbench-hero-stats,
  .workbench-hero-stats.metrics,
  .portal-identity-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
    margin-top: 18px;
  }

  .workbench-hero-stats b,
  .workbench-hero-stats.metrics strong,
  .portal-identity-stats strong {
    font-size: 22px;
  }

  #customer .customer-search-main,
  #supplierPortal .supplier-search-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  #customer .customer-search-main .portal-search-field,
  #supplierPortal .supplier-search-main .portal-search-field {
    grid-column: 1 / -1;
  }

  #customer .customer-search-main > button,
  #supplierPortal .supplier-search-main > button {
    width: 100%;
  }

  .portal-header-login {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-left: 0;
  }

  .portal-header-login #customerAccount,
  .portal-header-login #supplierAccount,
  .portal-header-login .password-chip,
  .portal-header-login .password-chip input {
    width: 100%;
    min-width: 0;
  }

  #customer .portal-tabs {
    display: flex;
    width: max-content;
    min-width: 100%;
  }

  .customer-portal-tabs-row {
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .customer-product-inline-search {
    grid-template-columns: minmax(0, 1fr) 92px 14px 92px;
    flex-basis: 100%;
  }

  .customer-product-inline-search > button {
    width: 100%;
  }

  #supplierPortal .supplier-upload-panel,
  .portal-product-search {
    grid-template-columns: 1fr;
  }

  #supplierPortal .supplier-upload-panel .actions {
    grid-template-columns: 1fr auto;
  }
}

/* Order management: keep edit lock and logistics import on one compact row. */
#orders .orders-control-panel .orders-utility-row {
  display: grid;
  grid-template-columns: minmax(290px, 0.8fr) minmax(0, 2.2fr);
  align-items: stretch;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

#orders .orders-control-panel .orders-utility-row .order-edit-lockbar {
  min-width: 0;
  min-height: 48px;
  padding: 6px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 0;
}

#orders .orders-control-panel .orders-utility-row .orders-logistics-panel {
  grid-template-columns: auto auto minmax(0, 1fr) minmax(470px, 540px);
  min-width: 0;
  min-height: 48px;
  padding: 6px 12px;
  gap: 9px;
  border-bottom: 0;
}

#orders .orders-control-panel .orders-utility-row .orders-logistics-panel .actions {
  grid-template-columns: 124px minmax(210px, 1fr) 136px;
  width: 100%;
}

#orders .orders-control-panel .orders-utility-row .orders-logistics-panel input[type="file"] {
  width: 100%;
}

#orders .orders-utility-row .orders-logistics-panel .mini-result:empty {
  display: none;
}

#orders .orders-utility-row .orders-logistics-panel .mini-result:not(:empty) {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  #orders .orders-control-panel .orders-utility-row {
    grid-template-columns: 1fr;
  }

  #orders .orders-control-panel .orders-utility-row .order-edit-lockbar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  #orders .orders-control-panel .orders-utility-row .orders-logistics-panel {
    grid-template-columns: auto auto minmax(0, 1fr) minmax(440px, 520px);
  }
}

/* Compact overview bands: dashboard, entry, finance, funds and both portals. */
@media (min-width: 901px) {
  .workbench-hero,
  .portal-identity-hero,
  #orders .orders-overview {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 112px;
    height: 112px;
    padding: 18px 32px;
    column-gap: clamp(42px, 7vw, 120px);
  }

  #entry .entry-hero {
    min-height: 112px;
    height: 112px;
  }

  .workbench-hero-heading,
  .portal-identity-heading,
  #orders .orders-overview-heading {
    flex: 0 1 auto;
    min-width: 330px;
  }

  .workbench-hero-icon,
  .portal-avatar,
  #orders .orders-overview-icon {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .workbench-hero-stats,
  .workbench-hero-stats.metrics,
  .portal-identity-stats,
  #orders .orders-overview-stats {
    flex: 0 1 auto;
    align-items: center;
    gap: clamp(28px, 4vw, 58px);
    margin-top: 0;
  }

  .portal-identity-badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    right: 18px;
  }
}

@media (max-width: 900px) {
  .workbench-hero,
  .portal-identity-hero,
  #orders .orders-overview {
    height: auto;
    min-height: 0;
  }
}

/* Before authentication, portals expose only their login header. */
#customer.portal-locked > :not(.topbar),
#supplierPortal.portal-locked > :not(.topbar) {
  display: none !important;
}

.customer-portal-pager {
  display: flex;
  flex: 0 0 auto;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-top: 1px solid #e2e7f0;
  color: #687489;
  background: #fff;
  font-size: 11px;
}
#customer #customerProductsView:not(.hidden) {
  display: flex;
  height: calc(100dvh - 230px);
  min-height: 360px;
  max-height: calc(100dvh - 230px);
  flex: 0 0 auto;
  overflow: hidden;
}
#customer #customerProductResult:not(.empty) {
  display: flex;
  height: 100%;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
#customer #customerProductResult:not(.empty) > .portal-product-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overscroll-behavior: auto;
}
#customer #customerProductResult:not(.empty) > .customer-portal-pager {
  position: relative;
  bottom: auto;
  z-index: 4;
}
.customer-portal-pager label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.customer-portal-pager select { width: 78px; height: 30px; padding: 0 7px; }
.customer-portal-pager input { width: 58px; height: 30px; padding: 0 7px; text-align: center; }
.supplier-portal-pager-host:empty { display: none; }
.supplier-portal-pager-host .supplier-portal-pager { min-height: 46px; margin-bottom: 6px; border: 1px solid #e2e7f0; border-radius: 8px; box-shadow: 0 4px 12px rgba(36, 52, 84, .05); }
.customer-qualification-result > .customer-portal-pager { position: sticky; bottom: 0; }
.submission-pager label { display: inline-flex; align-items: center; gap: 5px; }
.submission-pager select { width: 78px; height: 30px; padding: 0 7px; }
@media (max-width: 760px) { .customer-portal-pager { justify-content: flex-start; flex-wrap: wrap; } }
@media (max-height: 720px) {
  #customer #customerProductsView:not(.hidden) {
    height: calc(100dvh - 210px);
    min-height: 300px;
    max-height: calc(100dvh - 210px);
  }
  #customer #customerProductResult:not(.empty) {
    height: 100%;
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 900px) {
  .portal-identity-heading {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 0 14px;
    width: 100%;
  }
  .portal-identity-heading .portal-avatar {
    grid-row: 1 / span 2;
  }
  .portal-identity-heading > div {
    grid-column: 2;
    min-width: 0;
  }
  .portal-identity-heading > div > strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .portal-identity-heading .portal-identity-badge {
    position: static;
    grid-column: 2;
    justify-self: start;
    width: max-content;
    margin: 7px 0 0;
  }
}

/* Keep the standalone customer login visible under the legacy portal lock rule. */
#customer.portal-locked > .customer-tech-login { display: flex !important; }
#customer.portal-locked > .topbar { display: none !important; }
#customer:not(.portal-locked) > .customer-tech-login { display: none !important; }
.customer-portal #customer > .customer-tech-login { margin: 0 !important; }
#customer .customer-login-card .customer-login-button {
  border-color: transparent;
  color: #032521;
  background: linear-gradient(100deg, #2adac2, #24e5d8);
  box-shadow: 0 9px 28px rgba(30, 218, 188, .3), inset 0 1px rgba(255,255,255,.35);
}

/* Keep the standalone supplier login visible under the legacy portal lock rule. */
#supplierPortal.portal-locked > .supplier-tech-login { display: flex !important; }
#supplierPortal.portal-locked > .topbar { display: none !important; }
#supplierPortal:not(.portal-locked) > .supplier-tech-login { display: none !important; }
.supplier-portal #supplierPortal > .supplier-tech-login { margin: 0 !important; }
#supplierPortal .supplier-login-card .supplier-login-button {
  border-color: transparent;
  color: #2b1900;
  background: linear-gradient(100deg, #ffbb35, #ff946b);
  box-shadow: 0 9px 28px rgba(239,157,27,.34), inset 0 1px rgba(255,255,255,.35);
}

/* Final customer-funds list controls: smart order, 35/60 rows and paging. */
#funds .funds-customer-toolbar { flex-wrap: wrap; }
#funds .funds-smart-sort { padding:5px 9px; border:1px solid #cbdcff; border-radius:6px; color:#2f63cf; background:#f4f7ff; font-weight:650; white-space:nowrap; }
#funds .funds-customer-page-size { display:inline-flex; align-items:center; gap:6px; margin-left:auto; color:var(--muted); font-size:12px; white-space:nowrap; }
#funds .funds-customer-page-size select { width:82px; height:30px; padding:0 8px; }
#funds .finance-customers-wrap { height:clamp(360px,52vh,620px); max-height:none; }
#funds .funds-customer-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:8px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
#funds .funds-customer-pager > div { display:flex; align-items:center; gap:6px; }
#funds .funds-customer-pager button { min-width:34px; height:30px; padding:0 10px; }
@media (max-width:760px) { #funds .funds-customer-page-size { margin-left:0; } #funds .funds-customer-pager { align-items:flex-start; flex-direction:column; } #funds .funds-customer-pager > div { flex-wrap:wrap; } }

/* Funds ledger: responsive columns, internal vertical scroll and paging. */
#funds .funds-ledger-filters { align-items:center; flex-wrap:wrap; }
#funds .funds-ledger-page-size { display:inline-flex; align-items:center; gap:6px; margin-left:auto; color:var(--muted); font-size:12px; white-space:nowrap; }
#funds .funds-ledger-page-size select { width:82px; height:30px; padding:0 8px; }
#funds .finance-ledger-wrap { width:100%; height:clamp(360px,52vh,620px); min-height:360px; max-height:none; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
#funds .finance-ledger-table { width:100%; min-width:0; table-layout:fixed; }
#funds .finance-ledger-table th,
#funds .finance-ledger-table td { min-width:0; padding-left:clamp(3px,.42vw,8px); padding-right:clamp(3px,.42vw,8px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#funds .finance-ledger-table th:nth-child(1) { width:9%; }
#funds .finance-ledger-table th:nth-child(2) { width:14%; }
#funds .finance-ledger-table th:nth-child(3) { width:7%; }
#funds .finance-ledger-table th:nth-child(4) { width:6%; }
#funds .finance-ledger-table th:nth-child(5) { width:5%; }
#funds .finance-ledger-table th:nth-child(6) { width:6%; }
#funds .finance-ledger-table th:nth-child(7) { width:4%; }
#funds .finance-ledger-table th:nth-child(8) { width:6%; }
#funds .finance-ledger-table th:nth-child(9) { width:6%; }
#funds .finance-ledger-table th:nth-child(10) { width:4%; }
#funds .finance-ledger-table th:nth-child(11) { width:9%; }
#funds .finance-ledger-table th:nth-child(12) { width:5.5%; }
#funds .finance-ledger-table th:nth-child(13) { width:4%; }
#funds .finance-ledger-table th:nth-child(14) { width:4%; }
#funds .finance-ledger-table th:nth-child(15) { width:10.5%; }
#funds .finance-ledger-table td:nth-child(15) { overflow:visible; text-overflow:clip; white-space:normal; overflow-wrap:anywhere; line-height:1.35; }
#funds .finance-ledger-table th:nth-child(6) { color:#087b5d; background:#eaf9f3; }
#funds .finance-ledger-table td:nth-child(6) { color:#087b5d; background:rgba(234,249,243,.58); font-weight:750; }
#funds .finance-ledger-table th:nth-child(7) { color:#cf3f39; background:#fff0ef; }
#funds .finance-ledger-table td:nth-child(7) { color:#cf3f39; background:rgba(255,240,239,.58); font-weight:750; }
#funds .finance-ledger-table th:nth-child(8) { color:#a56808; background:#fff7e7; }
#funds .finance-ledger-table td:nth-child(8) { color:#a56808; background:rgba(255,247,231,.65); font-weight:750; }
#funds .finance-ledger-table th:nth-child(9) { color:#315fd2; background:#edf3ff; }
#funds .finance-ledger-table td:nth-child(9) { color:#315fd2; background:rgba(237,243,255,.68); font-weight:750; }
#funds .finance-ledger-table thead th { position:sticky; top:0; z-index:3; }
#funds .funds-ledger-customer { display:flex; align-items:center; min-width:0; gap:4px; }
#funds .funds-ledger-customer > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#funds .funds-ledger-copy { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; padding:0; border:1px solid transparent; border-radius:5px; background:transparent; color:#8a96aa; cursor:pointer; transition:background-color .15s ease,color .15s ease,border-color .15s ease; }
#funds .funds-ledger-copy svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
#funds .funds-ledger-copy:hover { border-color:#c7d6f7; background:#edf3ff; color:#315fd2; }
#funds .funds-ledger-copy.copied { border-color:#b9e4d5; background:#eaf9f3; color:#087b5d; }
#funds .funds-ledger-type { display:inline-flex; align-items:center; justify-content:center; max-width:100%; padding:3px 7px; border:1px solid transparent; border-radius:999px; font-size:11px; font-weight:700; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#funds .funds-ledger-type.is-prepaid { border-color:#b9e4d5; background:#eaf9f3; color:#087b5d; }
#funds .funds-ledger-type.is-deduction { border-color:#ffc8c5; background:#fff0ef; color:#cf3f39; }
#funds .funds-ledger-type.is-daily-payment { border-color:#bfd2ff; background:#edf3ff; color:#315fd2; }
#funds .funds-ledger-type.is-refund { border-color:#d9c8f5; background:#f5efff; color:#7650bd; }
#funds .funds-ledger-type.is-refund-out { border-color:#f2b8b5; background:#fff0ef; color:#b42318; }
#funds .funds-ledger-direction { display:block; margin-top:2px; color:var(--muted); font-size:10px; line-height:1.25; }
#funds .funds-ledger-direction.is-out { color:#b42318; font-weight:800; }
#funds .funds-detail-ledger-row header strong small { display:block; margin-top:2px; font-size:10px; font-weight:600; }
#funds .funds-ledger-type.is-adjustment { border-color:#f1d49d; background:#fff7e7; color:#a56808; }
#funds .funds-ledger-type.is-other { border-color:#d7dee9; background:#f4f6f9; color:#667287; }
#funds .funds-ledger-status { display:inline-flex; align-items:center; justify-content:center; max-width:100%; padding:3px 7px; border:1px solid transparent; border-radius:999px; font-size:11px; font-weight:700; line-height:1.2; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#funds .funds-ledger-status.is-confirmed { border-color:#b9e4d5; background:#eaf9f3; color:#087b5d; }
#funds .funds-ledger-status.is-pending { border-color:#f1d49d; background:#fff7e7; color:#a56808; }
#funds .funds-ledger-status.is-rejected { border-color:#ffc8c5; background:#fff0ef; color:#cf3f39; }
#funds .funds-ledger-status.is-neutral { border-color:#d7dee9; background:#f4f6f9; color:#667287; }
#fundsLedgerType option[value="预存款"] { color:#087b5d; }
#fundsLedgerType option[value="订单扣款"] { color:#cf3f39; }
#fundsLedgerType option[value="日结收款"] { color:#315fd2; }
#fundsLedgerType option[value="退款"] { color:#7650bd; }
#fundsLedgerType option[value="手工调整"] { color:#a56808; }
#funds .funds-ledger-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:8px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
#funds .funds-ledger-pager > div { display:flex; align-items:center; gap:6px; }
#funds .funds-ledger-pager button { min-width:34px; height:30px; padding:0 10px; }
@media (max-width:760px) { #funds .funds-ledger-page-size { margin-left:0; } #funds .funds-ledger-pager { align-items:flex-start; flex-direction:column; } #funds .funds-ledger-pager > div { flex-wrap:wrap; } }

/* Finance order details: 40/80 rows, internal two-axis scroll and paging. */
#statistics .stats-view-panel { flex:1 1 auto; padding:0; overflow:hidden; }
#statistics .stats-view-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:52px; padding:0 16px; border-bottom:1px solid var(--line); }
#statistics .stats-view-tabs { display:flex; align-self:stretch; gap:4px; }
#statistics .stats-view-tab { position:relative; min-width:104px; padding:0 18px; border:0; color:#526077; background:transparent; font-size:14px; font-weight:700; cursor:pointer; }
#statistics .stats-view-tab::after { content:""; position:absolute; right:12px; bottom:0; left:12px; height:3px; border-radius:3px 3px 0 0; background:transparent; }
#statistics .stats-view-tab:hover { color:#118575; background:#f4fbf9; }
#statistics .stats-view-tab.is-active { color:#118575; background:#edf9f6; }
#statistics .stats-view-tab.is-active::after { background:#149b88; }
#statistics .stats-view-tab:focus-visible { outline:2px solid #78cbbd; outline-offset:-3px; }
#statistics .stats-tab-panel { min-width:0; }
#statistics .stats-trend-panel { min-height:360px; padding:16px; }
#statistics .stats-trend-panel .stats-list { margin:0; }
#statistics .stats-charts-panel { min-height:520px; padding:14px; background:#f7f9fc; }
#statistics .stats-chart-grid { display:grid; gap:12px; }
#statistics .stats-chart-grid-top { grid-template-columns:minmax(0,2fr) minmax(280px,1fr); }
#statistics .stats-chart-grid-rank { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:12px; }
#statistics .stats-chart-card { min-width:0; overflow:hidden; border:1px solid #dfe6f0; border-radius:9px; background:#fff; box-shadow:0 3px 10px rgba(36,52,84,.04); }
#statistics .stats-chart-card > header { display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:44px; padding:0 13px; border-bottom:1px solid #edf1f6; }
#statistics .stats-chart-card > header strong { color:#26344b; font-size:13px; }
#statistics .stats-chart-card > header span { color:#8a94a6; font-size:10px; }
#statistics .stats-chart-body { min-height:230px; padding:12px; }
#statistics .stats-chart-body.empty { display:grid; place-items:center; color:#8a94a6; }
#statistics .stats-trend-svg { display:block; width:100%; height:230px; overflow:visible; }
#statistics .stats-chart-axis { stroke:#dce4ee; stroke-width:1; }
#statistics .stats-trend-line { fill:none; stroke:#159b86; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
#statistics .stats-trend-point { fill:#fff; stroke:#159b86; stroke-width:3; }
#statistics .stats-chart-label { fill:#8792a4; font-size:11px; }
#statistics .stats-donut-wrap { display:grid; grid-template-columns:150px minmax(0,1fr); align-items:center; gap:14px; height:100%; }
#statistics .stats-donut { display:grid; place-items:center; width:142px; height:142px; margin:auto; border-radius:50%; }
#statistics .stats-donut > span { display:grid; place-items:center; width:82px; height:82px; border-radius:50%; background:#fff; box-shadow:0 0 0 1px #edf1f6; }
#statistics .stats-donut > span b { color:#26344b; font-size:22px; }
#statistics .stats-donut > span small { color:#8a94a6; font-size:10px; }
#statistics .stats-donut-legend { display:grid; gap:8px; }
#statistics .stats-donut-legend span { display:grid; grid-template-columns:8px minmax(0,1fr) auto; align-items:center; gap:7px; color:#657187; font-size:10px; }
#statistics .stats-donut-legend i { width:8px; height:8px; border-radius:50%; }
#statistics .stats-donut-legend em { overflow:hidden; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
#statistics .stats-donut-legend b { color:#26344b; }
#statistics .stats-rank-chart { display:grid; gap:8px; }
#statistics .stats-rank-row { display:grid; grid-template-columns:20px minmax(72px,110px) minmax(70px,1fr) 78px; align-items:center; gap:7px; min-width:0; font-size:9px; }
#statistics .stats-rank-index { color:#9aa4b3; text-align:center; }
#statistics .stats-rank-name { overflow:hidden; color:#536077; text-overflow:ellipsis; white-space:nowrap; }
#statistics .stats-rank-track { height:8px; overflow:hidden; border-radius:6px; background:#edf2f6; }
#statistics .stats-rank-track i { display:block; height:100%; border-radius:6px; background:linear-gradient(90deg,#25b29c,#4385db); }
#statistics .stats-rank-row b { color:#26344b; font-size:9px; text-align:right; white-space:nowrap; }
#statistics .stats-page-size { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:12px; white-space:nowrap; }
#statistics .stats-page-size select { width:82px; height:30px; padding:0 8px; }
#statistics,
#statistics .stats-view-panel,
#statistics .stats-view-head { min-width:0; max-width:100%; box-sizing:border-box; }
#statistics .stats-orders-wrap { display:block; width:100%; max-width:100%; height:auto; min-height:0; max-height:clamp(400px,56vh,680px); overflow-x:auto; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; box-sizing:border-box; }
#statistics .stats-orders-wrap.empty { min-height:260px; }
#statistics .stats-orders-wrap::-webkit-scrollbar { width:12px; height:12px; }
#statistics .stats-orders-wrap::-webkit-scrollbar-track { background:#eef2f8; }
#statistics .stats-orders-wrap::-webkit-scrollbar-thumb { border:2px solid #eef2f8; border-radius:8px; background:#9aa8bd; }
#statistics .stats-orders-wrap::-webkit-scrollbar-thumb:hover { background:#74849c; }
#statistics .stats-orders-table thead th { position:sticky; top:0; z-index:3; }
#statistics .stats-orders-table th:first-child,
#statistics .stats-orders-table td:first-child { position:sticky; left:0; z-index:2; background:#fff; }
#statistics .stats-orders-table thead th:first-child { z-index:4; background:#f6f8fc; }
#statistics .stats-orders-table th,
#statistics .stats-orders-table td { padding-right:clamp(7px,.65vw,13px); padding-left:clamp(7px,.65vw,13px); }
#statistics .stats-orders-table td.stats-full-text-cell { overflow:hidden; text-overflow:ellipsis; }
#statistics .stats-orders-table td.stats-full-text-cell .stats-cell-text { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stats-company-cell { display:flex; align-items:center; min-width:0; gap:4px; }
.stats-company-cell .stats-cell-text { min-width:0; flex:1 1 auto; }
.stats-company-copy { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; padding:0; border:1px solid transparent; border-radius:5px; background:transparent; color:#8a96aa; cursor:pointer; transition:border-color .12s ease,background-color .12s ease,color .12s ease; }
.stats-company-copy svg { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.4; stroke-linecap:round; stroke-linejoin:round; }
.stats-company-copy:hover { border-color:#c7d6f7; background:#edf3ff; color:#315fd2; }
.stats-company-copy.copied { border-color:#b9e4d5; background:#eaf9f3; color:#087b5d; }
.stats-cell-tooltip { position:fixed; z-index:12000; max-height:min(240px,45vh); overflow:auto; padding:10px 12px; border:1px solid #cfd9e8; border-radius:8px; color:#26344b; background:#fff; box-shadow:0 14px 38px rgba(25,39,69,.24); font-size:12px; line-height:1.65; white-space:normal; overflow-wrap:anywhere; pointer-events:none; }
#statistics .stats-orders-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:8px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
#statistics .stats-orders-pager > div { display:flex; align-items:center; gap:6px; }
#statistics .stats-orders-pager button { min-width:34px; height:30px; padding:0 10px; }
@media (max-width:1100px) { #statistics .stats-chart-grid-top,#statistics .stats-chart-grid-rank { grid-template-columns:1fr; } }
@media (max-width:760px) { #statistics .stats-view-head { align-items:stretch; flex-direction:column; padding:8px 10px; } #statistics .stats-view-tabs { min-height:44px; overflow-x:auto; } #statistics .stats-view-tab { flex:0 0 auto; } #statistics .stats-page-size { align-self:flex-end; } #statistics .stats-orders-pager { align-items:flex-start; flex-direction:column; } #statistics .stats-orders-pager > div { flex-wrap:wrap; } #statistics .stats-donut-wrap { grid-template-columns:1fr; } }

/* Customer FAQ: compact list with a large creation/edit modal. */
.customer-faq-view { min-width:0; }
.customer-faq-topbar { margin-bottom:8px; }
.customer-faq-summary { display:flex; align-items:center; gap:14px; min-height:42px; color:var(--muted); }
.customer-faq-summary strong { color:#2563eb; font-size:18px; }
.customer-faq-summary i { width:1px; height:18px; background:var(--line); }
.customer-faq-panel { overflow:hidden; }
.customer-faq-toolbar { display:grid; grid-template-columns:minmax(260px,1fr) auto; gap:10px; padding:14px 16px; border-bottom:1px solid var(--line); }
.customer-faq-table-wrap { min-height:420px; max-height:58vh; overflow:auto; }
.customer-faq-table { width:100%; min-width:860px; table-layout:fixed; border-collapse:collapse; }
.customer-faq-table th,.customer-faq-table td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.customer-faq-table th { position:sticky; top:0; z-index:2; background:#f6f8fc; color:#334155; }
.customer-faq-table th:nth-child(1) { width:25%; }.customer-faq-table th:nth-child(2) { width:48%; }.customer-faq-table th:nth-child(3) { width:13%; }.customer-faq-table th:nth-child(4) { width:14%; }
.customer-faq-answer { color:#475569; line-height:1.6; white-space:pre-wrap; }
.customer-faq-category { display:inline-flex; padding:4px 9px; border-radius:999px; color:#315fbd; background:#eef4ff; white-space:nowrap; }
.customer-faq-actions { display:flex; gap:7px; white-space:nowrap; }
.customer-faq-pager { display:flex; align-items:center; justify-content:space-between; min-height:52px; padding:8px 16px; color:var(--muted); border-top:1px solid var(--line); }
.customer-faq-pager > div { display:flex; gap:6px; }
.customer-faq-modal-panel { width:min(760px,calc(100vw - 32px)); max-height:calc(100vh - 40px); overflow:auto; }
.customer-faq-form { display:grid; gap:18px; padding:22px 24px 12px; }
.customer-faq-form label { display:grid; gap:8px; color:#263449; font-weight:700; }
.customer-faq-form textarea { min-height:190px; resize:vertical; line-height:1.6; }
.customer-faq-form small { color:var(--muted); font-weight:400; }
.customer-faq-modal-actions { display:flex; justify-content:flex-end; gap:10px; padding:16px 24px 22px; border-top:1px solid var(--line); }
@media (max-width:760px) { .customer-faq-toolbar { grid-template-columns:1fr; } .customer-faq-pager { align-items:flex-start; flex-direction:column; gap:8px; } }

/* 商品价格列保持整列着色，不受斑马纹和行悬停背景覆盖 */
#products .product-table tbody tr > td.price-chain,
#products .product-table tbody tr:nth-child(even) > td.price-chain,
#products .product-table tbody tr:hover > td.price-chain {
  color: #6846d8;
  background: #fff;
}
#products .product-table tbody tr > td.price-core,
#products .product-table tbody tr:nth-child(even) > td.price-core,
#products .product-table tbody tr:hover > td.price-core {
  color: #0d887d;
  background: #eaf8f6;
}
#products .product-table tbody tr > td.price-agent,
#products .product-table tbody tr:nth-child(even) > td.price-agent,
#products .product-table tbody tr:hover > td.price-agent {
  color: #2d5fc9;
  background: #edf3ff;
}
#products .product-table tbody tr > td.price-retail,
#products .product-table tbody tr:nth-child(even) > td.price-retail,
#products .product-table tbody tr:hover > td.price-retail {
  color: #bd710b;
  background: #fff6e8;
}

.product-locked-text {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  min-height: 28px;
  align-items: center;
  overflow: hidden;
  color: #4f5b6e;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-missing-value {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  color: #9aa6b8;
  font-size: 12px;
  white-space: nowrap;
}
.product-empty-cell {
  padding: 28px 24px !important;
  white-space: normal !important;
}
.product-empty-diagnostic {
  display: grid;
  max-width: 880px;
  gap: 12px;
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #d8e3f1;
  border-radius: 14px;
  background: #f8fbff;
  color: #3f5068;
  text-align: left;
}
.product-empty-diagnostic > strong { color: #183153; font-size: 17px; }
.product-empty-diagnostic > p { margin: 0; color: #677891; }
.product-empty-diagnostic code { padding: 2px 7px; border-radius: 6px; background: #edf3fb; color: #244e86; }
.product-empty-diagnostic ul { display: grid; gap: 5px; margin: 0; padding-left: 20px; color: #66758a; }
.product-empty-filter-list,
.product-empty-candidates { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.product-empty-filter-list > span,
.product-empty-candidates > span { margin-right: 3px; color: #7f8ca0; font-size: 12px; font-weight: 700; }
.product-empty-filter-list b { padding: 5px 9px; border-radius: 999px; background: #fff0dd; color: #a45a00; font-size: 12px; }
.product-empty-candidates button {
  display: grid;
  max-width: 260px;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid #c9d8ec;
  border-radius: 9px;
  background: #fff;
  color: #244e86;
  text-align: left;
  cursor: pointer;
}
.product-empty-candidates button:hover { border-color: #4f83d1; box-shadow: 0 3px 10px rgba(45,92,155,.12); }
.product-empty-candidates small { color: #8795a8; font-size: 10px; }
.product-empty-candidates strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.product-empty-diagnostic.is-search_failed { border-color: #f1c9c5; background: #fff8f7; }
/* Special delivery compact mode: keep the complete workflow visible in one screen. */
.special-delivery-modal-panel .special-delivery-head {
  min-height: 40px;
  padding: 5px 12px;
}
.special-delivery-modal-panel .modal-close-icon {
  width: 28px;
  height: 28px;
  font-size: 22px;
}
.special-delivery-modal-panel .special-delivery-order-info {
  margin-top: 7px;
}
.special-delivery-modal-panel .special-delivery-order-info > div {
  padding: 4px 7px;
}
.special-delivery-modal-panel .special-delivery-order-info small {
  margin-bottom: 1px;
  font-size: 9px;
}
.special-delivery-modal-panel .special-delivery-order-info strong {
  font-size: 11px;
}
.special-delivery-modal-panel .special-delivery-order-info button {
  width: 18px;
  height: 18px;
}
.special-delivery-modal-panel .special-delivery-order-info > div > span {
  grid-template-columns: minmax(0, 1fr) 18px;
}
.special-delivery-modal-panel .special-delivery-types {
  margin-top: 6px;
  margin-bottom: 8px;
}
.special-delivery-modal-panel .special-delivery-types button {
  min-height: 30px;
  height: 30px;
  padding: 0 7px;
  font-size: 12px;
}
.special-delivery-modal-panel .special-delivery-form-grid {
  gap: 6px 16px;
  padding-bottom: 8px;
}
.special-delivery-modal-panel .special-delivery-form-grid label,
.special-delivery-modal-panel .delivery-sign-grid label,
.special-delivery-modal-panel .special-delivery-remark {
  gap: 2px;
  font-size: 11px;
}
.special-delivery-modal-panel .special-delivery-form-grid input,
.special-delivery-modal-panel .special-delivery-form-grid select,
.special-delivery-modal-panel .delivery-sign-grid input {
  min-height: 30px;
  height: 30px;
  padding: 0 8px;
  font-size: 11px;
}
.special-delivery-modal-panel .delivery-tab-page:not(.hidden) {
  gap: 7px;
}
.special-delivery-modal-panel .delivery-proof-section,
.special-delivery-modal-panel .delivery-sign-section {
  padding: 8px;
}
.special-delivery-modal-panel .delivery-upload-row {
  gap: 8px;
  margin-top: 4px;
}
.special-delivery-modal-panel .delivery-upload-box,
.special-delivery-modal-panel .delivery-upload-box.compact {
  min-width: 130px;
  min-height: 62px;
  padding: 5px;
  font-size: 11px;
}
.special-delivery-modal-panel .delivery-upload-box span {
  font-size: 17px;
}
.special-delivery-modal-panel .delivery-upload-box small,
.special-delivery-modal-panel .delivery-upload-name {
  font-size: 9px;
}
.special-delivery-modal-panel .delivery-sign-grid {
  gap: 7px;
  margin-top: 4px;
}
.special-delivery-modal-panel .delivery-sign-grid > div {
  gap: 5px;
}
.special-delivery-modal-panel .delivery-upload-previews {
  min-height: 38px;
  margin-top: 4px;
  padding: 3px;
}
.special-delivery-modal-panel .delivery-thumb {
  flex-basis: 48px;
  width: 48px;
}
.special-delivery-modal-panel .delivery-thumb > img,
.special-delivery-modal-panel .delivery-pdf-thumb {
  width: 44px;
  height: 34px;
}
.special-delivery-modal-panel .delivery-thumb > small {
  width: 48px;
  font-size: 8px;
}
.special-delivery-modal-panel .special-delivery-remark {
  margin-top: 7px;
}
.special-delivery-modal-panel .special-delivery-remark textarea {
  min-height: 38px;
  height: 38px;
  padding: 6px 8px;
  font-size: 11px;
}
.special-delivery-modal-panel .logistics-import-actions {
  padding: 7px 18px 9px;
}
.special-delivery-modal-panel .logistics-import-actions button {
  height: 30px;
  padding: 0 12px;
  font-size: 11px;
}

/* Special delivery order summary: one-line, high-contrast information strip. */
.special-delivery-modal-panel .special-delivery-order-info {
  border-color: #c8d8f1;
  background: linear-gradient(90deg, #edf4ff 0%, #fff8e7 52%, #eef7ff 100%);
  box-shadow: 0 2px 8px rgb(44 83 145 / 8%);
}
.special-delivery-modal-panel .special-delivery-order-info > div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border-right-color: #cfdbec;
}
.special-delivery-modal-panel .special-delivery-order-info small {
  display: inline;
  flex: 0 0 auto;
  margin: 0;
  color: #61728d;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.special-delivery-modal-panel .special-delivery-order-info small::after {
  content: "：";
}
.special-delivery-modal-panel .special-delivery-order-info strong {
  display: inline;
  color: #17243a;
  font-size: 12px;
  font-weight: 800;
}
.special-delivery-modal-panel .special-delivery-order-info > div > span {
  flex: 1 1 auto;
  min-width: 0;
}
.special-delivery-modal-panel .special-delivery-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.special-delivery-modal-panel .special-delivery-head-customer {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding-left: 10px;
  border-left: 1px solid #d8e0ed;
}
.special-delivery-modal-panel .special-delivery-head-customer small {
  flex: 0 0 auto;
  color: #687892;
  font-size: 10px;
  font-weight: 700;
}
.special-delivery-modal-panel .special-delivery-head-customer strong {
  max-width: 260px;
  overflow: hidden;
  color: #1f2d44;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.special-delivery-modal-panel .special-delivery-head-customer button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  color: #526a91;
  border: 1px solid #ced9ea;
  border-radius: 5px;
  background: #fff;
  font-size: 10px;
}
.special-delivery-modal-panel .special-delivery-order-info {
  grid-template-columns:
    minmax(90px, .7fr)
    minmax(145px, 1.1fr)
    70px
    minmax(110px, .8fr)
    minmax(155px, 1.1fr)
    minmax(430px, 3.2fr);
}
.special-delivery-modal-panel .special-delivery-order-info .address strong {
  overflow: visible;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}
.special-delivery-modal-panel .special-delivery-order-info .address > span {
  align-items: center;
}

/* Read-only special-delivery details use a focused half-width dialog. */
#specialDeliveryViewModal .special-delivery-view-panel {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}
#specialDeliveryViewModal .special-delivery-view-summary,
#specialDeliveryViewModal .special-delivery-view-details {
  grid-template-columns: 1fr;
}
#specialDeliveryViewModal .special-delivery-view-summary {
  gap: 8px;
  padding: 12px 14px;
}
#specialDeliveryViewModal .special-delivery-view-details {
  gap: 8px;
  padding: 12px 14px;
}
#specialDeliveryViewModal .special-delivery-view-tip {
  margin: 0 14px;
}

/* Balanced read-only delivery card: compact, scannable, and attachment-aware. */
#specialDeliveryViewModal .special-delivery-view-panel {
  width: min(600px, calc(100vw - 24px));
}
#specialDeliveryViewModal .special-delivery-view-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #f4f7ff, #f8fbff);
}
#specialDeliveryViewModal .special-delivery-view-summary span {
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid #dce5f3;
  border-radius: 8px;
  background: #fff;
}
#specialDeliveryViewModal .special-delivery-view-summary strong {
  width: fit-content;
  padding: 3px 8px;
  color: #2858c9;
  border-radius: 999px;
  background: #eaf0ff;
  font-size: 13px;
}
#specialDeliveryViewModal #specialDeliveryViewStatus[data-status="已发货"],
#specialDeliveryViewModal #specialDeliveryViewStatus[data-status="已签收"],
#specialDeliveryViewModal #specialDeliveryViewStatus[data-status="已完成"] {
  color: #078451;
  background: #e5f7ef;
}
#specialDeliveryViewModal .special-delivery-view-details {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
}
#specialDeliveryViewModal .special-delivery-view-details > div {
  padding: 9px 11px;
  background: #fbfcff;
}
#specialDeliveryViewModal .special-delivery-view-details small {
  margin-bottom: 3px;
  font-size: 11px;
}
#specialDeliveryViewModal .special-delivery-view-details strong {
  font-size: 13px;
  line-height: 1.45;
}
#specialDeliveryViewModal .special-delivery-view-wide {
  grid-column: 1 / -1;
}
#specialDeliveryViewModal .special-delivery-view-attachments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#specialDeliveryViewModal .special-delivery-view-attachments section {
  min-width: 0;
}
#specialDeliveryViewModal .special-delivery-view-attachments section > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 42px;
  padding-top: 4px;
}
#specialDeliveryViewModal .special-delivery-view-file-empty,
#specialDeliveryViewModal .special-delivery-view-file-missing {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 7px 9px;
  color: #8491a6;
  border: 1px dashed #d7dfeb;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 10px;
  line-height: 1.4;
}
#specialDeliveryViewModal .special-delivery-view-file-missing {
  color: #a46313;
  border-color: #efd39c;
  background: #fff8e9;
}
#specialDeliveryViewModal .special-delivery-view-tip {
  margin: 0 14px;
  padding: 8px 10px;
  font-size: 11px;
  line-height: 1.4;
}
#specialDeliveryViewModal .logistics-import-actions {
  justify-content: center;
  padding: 10px 14px 12px;
}
@media (max-width: 560px) {
  #specialDeliveryViewModal .special-delivery-view-summary,
  #specialDeliveryViewModal .special-delivery-view-details,
  #specialDeliveryViewModal .special-delivery-view-attachments {
    grid-template-columns: 1fr;
  }
}

/* Compact special-delivery editor with a full-width address row. */
#specialDeliveryModal .special-delivery-modal-panel {
  width: min(820px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}
#specialDeliveryModal .special-delivery-order-info {
  grid-template-columns:
    minmax(85px, .7fr)
    minmax(130px, 1fr)
    60px
    minmax(90px, .8fr)
    minmax(150px, 1.1fr);
}
#specialDeliveryModal .special-delivery-order-info .address {
  grid-column: 1 / -1;
  border-top: 1px solid #cfdbec;
  border-right: 0;
}
#specialDeliveryModal .special-delivery-order-info .address strong {
  white-space: normal;
}
@media (max-width: 720px) {
  #specialDeliveryModal .special-delivery-order-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #specialDeliveryModal .special-delivery-order-info .qty {
    grid-column: auto;
  }
  #specialDeliveryModal .special-delivery-order-info .address {
    grid-column: 1 / -1;
  }
}
.product-search-settings-panel textarea {
  width: 100%;
  min-height: 150px;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.7;
}

.product-search-settings-help {
  margin-top: 8px;
  color: var(--muted, #6b7280);
  font-size: 12px;
}

.product-title-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  align-items: center;
  gap: 4px;
}

.product-title-field .product-cell-input {
  min-width: 0;
}

.product-title-magic {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 1px solid #cbd5ff;
  border-radius: 7px;
  background: #f4f6ff;
  color: #4561dc;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.product-title-magic:hover:not(:disabled) {
  border-color: #8094ed;
  background: #e9edff;
  transform: translateY(-1px);
}

.product-title-magic:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.product-batch-title-button {
  border-color: #bdc9ff !important;
  color: #405bd2 !important;
  background: #f5f7ff !important;
}

.product-batch-title-button:disabled {
  opacity: .68;
}

.product-title-preview {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(18, 27, 49, .42);
  backdrop-filter: blur(2px);
}

.product-title-preview.hidden {
  display: none;
}

.product-title-preview-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid #dfe5f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 43, 78, .24);
}

.product-title-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid #e6ebf3;
}

.product-title-preview-head h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.product-title-preview-head p,
.product-title-preview-note {
  margin: 0;
  color: #657087;
  font-size: 13px;
}

.product-title-preview-table-wrap {
  max-height: min(55vh, 520px);
  overflow: auto;
}

.product-title-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.product-title-preview-table th,
.product-title-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e9edf4;
  text-align: left;
}

.product-title-preview-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #f7f9fc;
  color: #566278;
}

.product-title-preview-table th:nth-child(1) { width: 90px; }
.product-title-preview-table th:nth-child(2) { width: 220px; }
.product-title-preview-table th:nth-child(4) { width: 76px; }
.product-title-preview-table th:nth-child(5) { width: 64px; text-align: center; }
.product-title-preview-table td:nth-child(2) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-title-preview-table td:nth-child(5) { text-align: center; }

.product-title-preview-table input[type="text"],
.product-title-preview-table input:not([type]) {
  width: 100%;
  box-sizing: border-box;
}

.product-title-preview-table td > input[data-product-title-index] {
  width: 100%;
  min-width: 260px;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #ccd5e5;
  border-radius: 7px;
}

.product-title-preview-table tr.invalid {
  background: #fff7f6;
}

.product-title-count {
  color: #5f6c82;
  font-variant-numeric: tabular-nums;
}

.product-title-count.over {
  color: #d43f3a;
  font-weight: 750;
}

.product-title-preview-note {
  padding: 12px 20px 0;
}

.product-title-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 20px;
}

.payment-ocr-panel {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid #c9d8f2;
  border-radius: 10px;
  background: #f7faff;
}
.payment-ocr-head { display: flex; justify-content: space-between; gap: 12px; }
.payment-identifier-row { display: flex; gap: 8px; min-width: 0; }
.payment-identifier-row select { width: 110px; flex: 0 0 110px; }
.payment-identifier-row input { min-width: 0; flex: 1; font-size: 12px; font-variant-numeric: tabular-nums; }
#paymentModal { z-index: 100; }
#paymentReceiptViewerModal { z-index: 110; }
#paymentModal .payment-modal-head { position: sticky; top: 0; z-index: 4; background: #fff; }
#paymentModal .payment-modal-actions { position: sticky; bottom: 0; z-index: 3; background: #fff; padding: 10px 14px; border-top: 1px solid #e1e7f1; }
.payment-ocr-diagnostics { color: #6c7890; font-size: 12px; line-height: 1.7; }
.payment-ocr-diagnostics summary { cursor: pointer; width: fit-content; }
.payment-ocr-head span, .payment-ocr-panel > small { color: #6c7890; }
.payment-ocr-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.payment-ocr-fields span { padding: 9px; border-radius: 8px; background: white; }
.payment-ocr-fields i { display: block; color: #778196; font-size: 12px; font-style: normal; }
.payment-ocr-fields b { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.payment-ocr-risks div { margin: 5px 0; padding: 8px 10px; border-radius: 7px; }
.payment-ocr-risks .success { color: #147a48; background: #eaf8f1; }
.payment-ocr-risks .warning { color: #9a6400; background: #fff6dc; }
.payment-ocr-risks .danger { color: #b42318; background: #ffebe9; font-weight: 700; }
@media (max-width: 900px) { .payment-ocr-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Use the available browser width while keeping a small safe edge. */
.customer-portal .main {
  width: calc(100vw - 32px);
  max-width: none;
  margin: 0 16px;
  padding-top: 0;
}
@media (max-width: 900px) {
  .customer-portal .main { width: calc(100vw - 20px); margin: 0 10px; }
}

/* Compact order-query controls: tabs, search and selection rows. */
#customer .customer-portal-tabs-row {
  min-height: 44px;
  margin-bottom: 6px;
}
#customer .portal-tabs {
  padding: 3px;
}
#customer .portal-tab {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

/* 客户查单端 · 过单管理：与国铁选品同级，留在当前页面内切换。 */
#customer .customer-railway-management-view {
  min-width: 0;
}
#customer .customer-railway-management {
  padding: 18px;
  overflow: hidden;
}
#customer .customer-railway-management-head,
#customer .customer-railway-management-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}
#customer .customer-railway-management-head {
  justify-content: space-between;
  margin-bottom: 14px;
}
#customer .customer-railway-management-head > div:first-child {
  display: grid;
  gap: 3px;
}
#customer .customer-railway-management-head strong {
  color: #12213a;
  font-size: 22px;
}
#customer .customer-railway-management-head span {
  color: #7b8799;
}
#customer .customer-railway-management-stats {
  display: flex;
  gap: 8px;
}
#customer .customer-railway-management-stats span {
  min-width: 104px;
  padding: 10px 14px;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  white-space: nowrap;
}
#customer .customer-railway-management-stats b {
  margin-left: 8px;
  color: #163b73;
  font-size: 18px;
}
#customer .customer-railway-management-toolbar {
  margin-bottom: 14px;
}
#customer .customer-railway-management-toolbar input {
  flex: 1;
  min-width: 220px;
}
#customer .customer-railway-management-toolbar select {
  width: 180px;
}
#customer .customer-railway-management-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
#customer .customer-railway-management-table {
  width: 100%;
  min-width: 1260px;
  border-collapse: collapse;
}
#customer .customer-railway-management-table th,
#customer .customer-railway-management-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #e8edf4;
  text-align: left;
  white-space: nowrap;
}
#customer .customer-railway-management-table th {
  background: #f5f7fb;
  color: #5f6c80;
  font-weight: 700;
}
#customer .customer-railway-management-table td:nth-child(3) {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#customer .customer-railway-report-money {
  color: #0d765e;
  font-weight: 800;
}
#customer .customer-railway-report-stage,
#customer .customer-railway-report-status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #edf3ff;
  color: #285ab4;
}
#customer .customer-railway-report-status.status-done {
  background: #e8f8ef;
  color: #168054;
}
#customer .customer-railway-report-status.status-cancelled {
  background: #fff0ef;
  color: #c7463f;
}
#customer .customer-railway-management-empty {
  height: 180px;
  color: #8793a6;
  text-align: center !important;
}
#customerOrdersView .customer-search {
  margin-top: 0;
  margin-bottom: 2px;
  padding: 8px 12px;
}
#customerOrdersView .portal-field {
  margin: 0;
}
#customerOrdersView .customer-result-bar {
  min-height: 36px;
  margin-top: 3px;
  margin-bottom: 4px;
}

/* 2026-07-27 · B 版统一抬头：深海军蓝结构边
 * 管理端各业务页与客户双业务顶部共用同一套边框、内高光和阴影语言。
 */
:root {
  --header-navy-950: #07172e;
  --header-navy-900: #0d2345;
  --header-navy-800: #163763;
  --header-teal-600: #0b8c86;
  --header-border: #b8c7dc;
  --header-inner: rgba(35, 67, 113, .09);
  --header-shadow-tight: rgba(7, 23, 46, .13);
  --header-shadow-soft: rgba(38, 73, 126, .12);
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar {
  position: relative;
  isolation: isolate;
  align-items: center;
  width: auto;
  min-height: 88px;
  margin: 14px 30px 16px;
  padding: 17px 20px 17px 27px;
  overflow: visible;
  border: 1px solid var(--header-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(35,67,113,.04),
    0 3px 7px var(--header-shadow-tight),
    0 15px 34px var(--header-shadow-soft);
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 8px;
  border-radius: 14px 0 0 14px;
  background:
    linear-gradient(180deg,
      var(--header-navy-950) 0%,
      var(--header-navy-800) 68%,
      var(--header-teal-600) 100%);
  box-shadow:
    2px 0 0 rgba(255,255,255,.72),
    5px 0 13px rgba(15,52,91,.13);
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px;
  border: 1px solid var(--header-inner);
  border-radius: 10px;
  pointer-events: none;
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar h1 {
  color: var(--header-navy-900);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: -.02em;
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar p {
  color: #66758b;
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar .primary {
  border-color: #173b77;
  background: linear-gradient(135deg, #1d4c9e 0%, #102a5c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 5px 13px rgba(16,42,92,.22);
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar .primary:hover {
  background: linear-gradient(135deg, #2861bd 0%, #153871 70%, #0b7775 130%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 8px 18px rgba(16,42,92,.28);
  transform: translateY(-1px);
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar .ghost {
  border-color: #c6d1e1;
  background: linear-gradient(180deg, #fff, #f5f8fc);
  color: #31455f;
  box-shadow: inset 0 1px 0 #fff, 0 2px 5px rgba(20,43,77,.06);
}

body:not(.customer-portal):not(.supplier-portal)
  .view:not(#customer):not(#supplierPortal) > .topbar .ghost:hover {
  border-color: #718cb5;
  background: linear-gradient(135deg, #eef4ff, #e7f5f4);
  color: var(--header-navy-800);
}

/* 客户端订单查询 / 国铁过单共用顶部：保留原功能网格，只统一 B 版材质。 */
.customer-portal .customer-unified-header {
  position: relative;
  isolation: isolate;
  flex: 0 0 auto;
  min-height: 76px;
  margin: 12px 0 16px;
  padding: 10px 16px 10px 24px;
  border: 1px solid var(--header-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,251,255,.98));
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(35,67,113,.04),
    0 3px 7px var(--header-shadow-tight),
    0 15px 34px var(--header-shadow-soft);
}

.customer-portal .customer-unified-header::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: 8px;
  border-radius: 14px 0 0 14px;
  background:
    linear-gradient(180deg,
      var(--header-navy-950),
      var(--header-navy-800) 68%,
      var(--header-teal-600));
  box-shadow: 2px 0 0 rgba(255,255,255,.72), 5px 0 13px rgba(15,52,91,.13);
}

.customer-portal .customer-unified-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 5px;
  border: 1px solid var(--header-inner);
  border-radius: 10px;
  pointer-events: none;
}

.customer-portal .customer-unified-brand > span {
  background: linear-gradient(145deg, var(--header-navy-800), var(--header-teal-600));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 5px 12px rgba(10,63,91,.2);
}

.customer-portal .customer-business-switch {
  border-color: #aebed4;
  box-shadow: inset 0 1px 0 #fff, 0 3px 9px rgba(15,43,82,.1);
}

.customer-portal .customer-unified-header .customer-business-switch button.active {
  background: linear-gradient(135deg, var(--header-navy-900), #214985 72%, #176e73 140%);
}

.customer-portal .customer-unified-header .customer-business-switch button.active:hover {
  background: linear-gradient(135deg, #173662, #28629d 68%, #0b8c86 125%);
}

.customer-portal .customer-unified-account #customerLogoutBtn {
  border-color: #b9c7da;
  background: linear-gradient(180deg, #fff, #f4f7fb);
  color: #2b405d;
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(15,43,82,.08);
}

@media (max-width: 900px) {
  body:not(.customer-portal):not(.supplier-portal)
    .view:not(#customer):not(#supplierPortal) > .topbar {
    min-height: 0;
    margin: 10px 14px 12px;
    padding: 15px 15px 15px 22px;
  }

  .customer-portal .customer-unified-header {
    margin-top: 8px;
    padding: 10px 12px 10px 20px;
  }
}

/* 每日看板：经营数据并入 B 版页头，沿用原统计节点与刷新逻辑。 */
#dashboard > .topbar {
  display: grid;
  grid-template-columns: minmax(270px, 1.35fr) minmax(500px, 1.8fr) auto;
  align-items: center;
  column-gap: 24px;
}

#dashboard .dashboard-header-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  align-items: stretch;
  min-width: 0;
}

#dashboard .dashboard-header-metrics > div {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: baseline;
  min-width: 0;
  padding: 1px 20px;
  border-left: 1px solid #d5dfed;
}

#dashboard .dashboard-header-metrics span {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: #6c7c92;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

#dashboard .dashboard-header-metrics strong {
  color: var(--header-navy-900);
  font-size: 24px;
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#dashboard .dashboard-header-metrics em {
  margin-left: 4px;
  color: #718096;
  font-size: 11px;
  font-style: normal;
}

#dashboard > .topbar > #refreshDashboard {
  align-self: center;
}

@media (max-width: 1180px) {
  #dashboard > .topbar {
    grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.6fr) auto;
    column-gap: 14px;
  }

  #dashboard .dashboard-header-metrics > div {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  #dashboard > .topbar {
    grid-template-columns: 1fr auto;
  }

  #dashboard .dashboard-header-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 10px;
  }

  #dashboard .dashboard-header-metrics > div:first-child {
    border-left: 0;
  }
}

/* 订单录入、订单管理、财务管理、资金管理：概览数据统一并入 B 版抬头。 */
#entry > .topbar,
#statistics > .topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1.3fr) minmax(560px, 1.8fr);
  align-items: center;
  column-gap: 28px;
}

#funds > .topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1.25fr) minmax(560px, 1.8fr) auto;
  align-items: center;
  column-gap: 24px;
}

#orders > .topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(470px, 1.35fr) minmax(480px, 1.5fr);
  align-items: center;
  column-gap: 18px;
}

.integrated-header-context {
  display: none;
}

.integrated-header-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  align-items: stretch;
  min-width: 0;
}

.integrated-header-metrics > span {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: baseline;
  min-width: 0;
  padding: 1px 18px;
  border-left: 1px solid #d5dfed;
}

.integrated-header-metrics small {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: #6c7c92;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.integrated-header-metrics b {
  color: var(--header-navy-900);
  font-size: 24px;
  font-weight: 780;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.integrated-header-metrics em {
  margin-left: 4px;
  color: #718096;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

#orders > .topbar .top-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(104px, 1fr));
  align-self: center;
  gap: 7px;
  min-width: 0;
}

#orders > .topbar .top-actions > button {
  justify-content: center;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  white-space: nowrap;
}

#orders > .topbar .orders-select-all-btn {
  grid-column: auto;
}

#funds > .topbar > #refreshFundsBtn {
  align-self: center;
}

@media (max-width: 1500px) {
  #orders > .topbar {
    grid-template-columns: minmax(300px, .95fr) minmax(410px, 1.15fr) minmax(430px, 1.35fr);
    column-gap: 12px;
  }

  #orders .integrated-header-metrics > span {
    padding-right: 11px;
    padding-left: 11px;
  }

  #orders > .topbar .top-actions {
    grid-template-columns: repeat(3, minmax(108px, 1fr));
  }
}

@media (max-width: 1180px) {
  #entry > .topbar,
  #statistics > .topbar,
  #funds > .topbar {
    grid-template-columns: minmax(260px, 1fr) minmax(430px, 1.6fr) auto;
    column-gap: 14px;
  }

  #entry > .topbar,
  #statistics > .topbar {
    grid-template-columns: minmax(260px, 1fr) minmax(430px, 1.6fr);
  }

  #orders > .topbar {
    grid-template-columns: minmax(260px, .9fr) minmax(390px, 1.2fr);
  }

  #orders > .topbar .top-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(7, minmax(100px, 1fr));
  }

  .integrated-header-metrics > span {
    padding-right: 11px;
    padding-left: 11px;
  }
}

@media (max-width: 900px) {
  #entry > .topbar,
  #statistics > .topbar,
  #funds > .topbar,
  #orders > .topbar {
    grid-template-columns: 1fr auto;
  }

  #entry .integrated-header-metrics,
  #statistics .integrated-header-metrics,
  #funds .integrated-header-metrics,
  #orders .integrated-header-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 10px;
  }

  #orders > .topbar .top-actions {
    grid-column: 1 / -1;
    grid-row: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .integrated-header-metrics > span:first-child {
    border-left: 0;
  }
}

/* 全系统宽度修复：提前进入紧凑布局，避免中等桌面宽度出现页面级横向溢出。 */
@media (max-width: 1500px) {
  #orders > .topbar {
    grid-template-columns: minmax(300px, .9fr) minmax(500px, 1.5fr);
  }

  #orders > .topbar .top-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 1280px) {
  #dashboard > .topbar,
  #funds > .topbar {
    grid-template-columns: 1fr auto;
  }

  #entry > .topbar,
  #statistics > .topbar {
    grid-template-columns: 1fr;
  }

  #dashboard .dashboard-header-metrics,
  #entry .integrated-header-metrics,
  #statistics .integrated-header-metrics,
  #funds .integrated-header-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 8px;
  }

  #dashboard .dashboard-header-metrics > div:first-child,
  #entry .integrated-header-metrics > span:first-child,
  #statistics .integrated-header-metrics > span:first-child,
  #funds .integrated-header-metrics > span:first-child {
    border-left: 0;
  }

  #orders > .topbar {
    grid-template-columns: 1fr;
  }

  #orders .orders-integrated-metrics {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    margin-top: 6px;
  }

  #orders .orders-integrated-metrics > span:first-child {
    border-left: 0;
  }

  #orders > .topbar .top-actions {
    grid-column: 1;
    grid-row: 3;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 6px;
  }
}

/* 客户端中间宽度：指标提前换到第二行，长主体名称不再撑宽顶部。 */
@media (max-width: 1450px) and (min-width: 901px) {
  .customer-portal .customer-unified-header {
    grid-template-columns: auto minmax(280px, 1fr) auto;
    gap: 12px 22px;
  }

  .customer-portal .customer-unified-header .customer-business-switch {
    justify-self: start;
  }

  .customer-portal .customer-header-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .customer-portal .customer-header-metrics .login-finance:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .customer-portal .customer-unified-account {
    max-width: 360px;
  }
}

.customer-unified-account,
.customer-unified-account > div,
.customer-account-name {
  min-width: 0;
}

.customer-unified-account .login-company {
  display: block;
  max-width: min(310px, 24vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 宽表格继续在自身容器内滚动，禁止被静默裁掉。 */
#funds .finance-ledger-wrap {
  overflow-x: auto;
}

/* 实际内容区会被侧栏占用：订单管理和项目报备不再依赖浏览器总宽度硬塞一行。 */
@media (max-width: 1800px) {
  #orders > .topbar {
    grid-template-columns: minmax(300px, .9fr) minmax(480px, 1.35fr);
  }

  #orders > .topbar .top-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
  }

  #orders > .topbar .top-actions > button {
    width: 100%;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .project-report-topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-report-top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(4, auto);
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .project-report-stats {
    min-width: 0;
  }
}

@media (max-width: 1320px) {
  #orders > .topbar {
    grid-template-columns: 1fr;
  }

  #orders .orders-integrated-metrics {
    grid-column: 1;
    grid-row: 2;
  }

  #orders > .topbar .top-actions {
    grid-column: 1;
    grid-row: 3;
  }

  .project-report-top-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-report-stats {
    grid-column: 1 / -1;
    width: 100%;
  }

  .project-report-top-actions > button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  #orders > .topbar .top-actions,
  .project-report-top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-report-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 宽桌面保持单行：标题、统计和操作按信息密度重新分配位置。 */
@media (min-width: 1501px) {
  #orders > .topbar {
    grid-template-columns: minmax(260px, 22fr) minmax(420px, 36fr) minmax(0, 42fr);
    column-gap: 18px;
  }

  #orders .orders-integrated-metrics {
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
  }

  #orders > .topbar .top-actions {
    display: grid;
    grid-column: 3;
    grid-row: 1;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin-top: 0;
  }

  #orders > .topbar .top-actions > button {
    min-height: 36px;
    padding: 7px 8px;
    font-size: 12px;
    letter-spacing: 0;
  }

  .project-report-topbar {
    display: grid;
    grid-template-columns: minmax(230px, .7fr) minmax(900px, 2.3fr);
    align-items: center;
    column-gap: 22px;
  }

  .project-report-top-actions {
    display: grid;
    grid-template-columns: minmax(430px, 1fr) repeat(4, auto);
    align-items: center;
    gap: 7px;
    width: 100%;
  }

  .project-report-stats {
    grid-template-columns: repeat(5, minmax(78px, 1fr));
    gap: 6px;
    width: 100%;
  }

  .project-report-stats button {
    width: 100%;
    min-width: 0;
    height: 46px;
    padding: 6px 8px;
  }

  .project-report-top-actions > button {
    min-height: 38px;
    padding-right: 12px;
    padding-left: 12px;
    white-space: nowrap;
  }
}

/* 客户问答：白灰高对比展示区 */
#customerFaqs .customer-faq-summary {
  min-height: 38px;
  color: #666;
}

#customerFaqs .customer-faq-summary strong {
  color: #171717;
}

#customerFaqs .customer-faq-summary i {
  background: #d8d8d5;
}

#customerFaqs .customer-faq-panel {
  border: 1px solid #d8d8d4;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 24, 22, .06);
}

#customerFaqs .customer-faq-toolbar {
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #dededb;
  background: #fff;
}

#customerFaqs .customer-faq-toolbar input {
  height: 38px;
  border-color: #d7d7d3;
  background: #fafaf8;
  color: #242424;
  box-shadow: none;
}

#customerFaqs .customer-faq-toolbar input:focus {
  border-color: #7f7f7a;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 32, 30, .08);
}

#customerFaqs .customer-faq-toolbar .primary,
#customerFaqs .customer-faq-pager .primary {
  border-color: #222;
  background: #222;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .12);
}

#customerFaqs .customer-faq-table-wrap {
  min-height: 420px;
  max-height: 58vh;
  overflow: auto;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #999995 #e8e8e5;
}

#customerFaqs .customer-faq-table-wrap::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

#customerFaqs .customer-faq-table-wrap::-webkit-scrollbar-track {
  background: #e8e8e5;
}

#customerFaqs .customer-faq-table-wrap::-webkit-scrollbar-thumb {
  border: 1px solid #e8e8e5;
  border-radius: 999px;
  background: #999995;
}

#customerFaqs .customer-faq-table {
  min-width: 980px;
}

#customerFaqs .customer-faq-table th,
#customerFaqs .customer-faq-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e3e3e0;
  color: #282826;
}

#customerFaqs .customer-faq-table th {
  background: #f0f0ed;
  color: #252523;
  box-shadow: inset 0 -1px 0 #d2d2ce;
}

#customerFaqs .customer-faq-table tbody tr:nth-child(even) {
  background: #f7f7f5;
}

#customerFaqs .customer-faq-table tbody tr:hover {
  background: #ececea;
}

#customerFaqs .customer-faq-answer {
  color: #555552;
}

#customerFaqs .customer-faq-category {
  border: 1px solid #d9ded5;
  background: #f0f3ed;
  color: #53604f;
}

#customerFaqs .customer-faq-actions .ghost {
  min-height: 32px;
  border-color: #d2d2ce;
  background: #fff;
  color: #343432;
  box-shadow: none;
}

#customerFaqs .customer-faq-actions .ghost:hover {
  border-color: #777773;
  background: #f0f0ed;
  color: #171717;
}

#customerFaqs .customer-faq-pager {
  min-height: 48px;
  padding: 7px 14px;
  border-top: 1px solid #d8d8d4;
  background: #fff;
  color: #666;
}

#customerFaqs .customer-faq-pager .ghost {
  border-color: #d2d2ce;
  background: #fff;
  color: #3d3d3a;
  box-shadow: none;
}

#customerFaqs .customer-faq-pager button:disabled {
  color: #aaa;
  background: #f7f7f5;
  opacity: 1;
}

/* 订单录入：批量导入区始终收在面板内部 */
#entry .entry-input-panel,
#entry .entry-input-panel .archive-select-row,
#entry .entry-import-inline {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#entry .entry-input-panel .archive-select-row {
  grid-template-columns:
    minmax(210px, 280px)
    minmax(210px, 280px);
  justify-content: start;
}

#entry .entry-import-inline {
  grid-column: 1 / -1;
  grid-template-columns: clamp(210px, 24vw, 330px) auto auto;
  justify-content: start;
  overflow: hidden;
}

#entry .entry-import-inline input[type="file"] {
  max-width: 100%;
}

#entry .entry-import-inline .entry-template-download,
#entry .entry-import-inline #importBtn {
  flex: 0 0 auto;
  min-width: 0;
  white-space: nowrap;
}

#entry .entry-parse-row {
  grid-template-columns: minmax(420px, 760px) auto;
  justify-content: start;
  width: 100%;
}

#entry .entry-parse-row #rawInput {
  width: 100%;
}

#entry .entry-inline-actions {
  justify-content: flex-start;
}

@media (max-width: 1400px) {
  #entry .entry-input-panel .archive-select-row {
    grid-template-columns: repeat(2, minmax(210px, 280px));
    justify-content: start;
  }

  #entry .entry-import-inline {
    grid-column: 1 / -1;
    grid-template-columns: clamp(210px, 34vw, 330px) auto auto;
    justify-content: start;
  }

  #entry .entry-parse-row {
    grid-template-columns: minmax(360px, 68vw) auto;
  }
}

@media (max-width: 760px) {
  #entry .entry-input-panel .archive-select-row,
  #entry .entry-import-inline {
    grid-template-columns: 1fr;
  }

  #entry .entry-parse-row {
    grid-template-columns: 1fr;
  }

  #entry .entry-import-inline .entry-template-download,
  #entry .entry-import-inline #importBtn {
    width: 100%;
  }
}

#orders .orders-integrated-metrics > span {
  padding-right: 12px;
  padding-left: 12px;
}

#orders .orders-integrated-metrics small {
  font-size: 10px;
}

#orders .orders-integrated-metrics b {
  font-size: 17px;
}

#orders .orders-integrated-metrics em {
  font-size: 9px;
}

#orders .orders-lockbar-select-all {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 72px;
  min-width: 72px;
  height: 31px;
  min-height: 31px;
  padding: 0 9px;
  border-color: #c8d3e3;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  white-space: nowrap;
}

@media (min-width: 761px) {
  #orders > .topbar .top-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 订单筛选与物流工具台：B 版深海军蓝结构边。 */
#orders .orders-control-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--header-border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,251,255,.98));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 -1px 0 rgba(35,67,113,.04),
    0 3px 7px var(--header-shadow-tight),
    0 13px 30px rgba(38,73,126,.10);
}

#orders .orders-control-panel::before {
  display: none;
}

#orders .orders-control-panel::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 5px;
  border: 1px solid var(--header-inner);
  border-radius: 10px;
  pointer-events: none;
}

#orders .orders-control-panel > * {
  position: relative;
  z-index: 2;
}

/* 订单工具台统一控件系统：同高度、同圆角、同边框与克制配色。 */
#orders .orders-control-panel {
  --order-control-height: 38px;
  --order-control-radius: 9px;
  --order-control-line: #cbd6e6;
  --order-control-text: #31455f;
}

#orders .orders-control-panel .filters > input,
#orders .orders-control-panel .filters #fQ,
#orders .orders-control-panel .date-filter-label input,
#orders .orders-control-panel #searchBtn,
#orders .orders-control-panel .toggle-label,
#orders .orders-lockbar-select-all,
#orders .order-lock-trigger,
#orders .orders-logistics-panel .actions > * {
  height: var(--order-control-height);
  min-height: var(--order-control-height);
  border-radius: var(--order-control-radius);
  font-size: 13px;
}

#orders .orders-control-panel input[type="date"],
#orders .orders-control-panel input[type="text"],
#orders .orders-control-panel input[type="search"],
#orders .orders-control-panel #fQ {
  border: 1px solid var(--order-control-line);
  background: #fbfcfe;
  color: #23364f;
  box-shadow: inset 0 1px 0 #fff;
}

#orders .orders-control-panel #searchBtn,
#orders .orders-logistics-panel #importLogisticsBtn {
  border: 1px solid #173b77;
  background: linear-gradient(135deg, #1d4c9e 0%, #102a5c 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 4px 10px rgba(16,42,92,.18);
}

#orders .orders-control-panel #searchBtn:hover,
#orders .orders-logistics-panel #importLogisticsBtn:hover {
  border-color: #1d4c9e;
  background: linear-gradient(135deg, #2861bd 0%, #153871 100%);
}

#orders .order-quick-dates {
  display: inline-flex;
  gap: 0;
  height: var(--order-control-height);
  overflow: hidden;
  border: 1px solid var(--order-control-line);
  border-radius: var(--order-control-radius);
  background: #f7f9fc;
}

#orders .order-quick-dates button,
#orders .order-quick-dates button[data-order-date-offset="0"],
#orders .order-quick-dates button[data-order-date-offset="1"],
#orders .order-quick-dates button[data-order-date-offset="2"] {
  min-width: 54px;
  height: 100%;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--order-control-line);
  border-radius: 0;
  background: linear-gradient(180deg, #fff, #f3f6fa);
  color: #31455f;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

#orders .order-quick-dates button:last-child {
  border-right: 0;
}

#orders .order-quick-dates button.active,
#orders .order-quick-dates button[data-order-date-offset="0"].active,
#orders .order-quick-dates button[data-order-date-offset="1"].active,
#orders .order-quick-dates button[data-order-date-offset="2"].active {
  background: linear-gradient(135deg, #e9f0ff, #dfe9fb);
  color: #173b77;
  box-shadow: inset 0 0 0 1px rgba(29,76,158,.18);
}

#orders .orders-lockbar-select-all {
  width: 76px;
  min-width: 76px;
  border: 1px solid var(--order-control-line);
  background: linear-gradient(180deg, #fff, #f5f8fc);
  color: var(--order-control-text);
}

#orders .order-lock-trigger {
  border: 1px solid #e7c98f;
  background: #fff7e8;
  color: #9a6009;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

#orders .order-lock-trigger.unlocked {
  border-color: #8fd0b1;
  background: linear-gradient(180deg, #effbf5, #e4f7ed);
  color: #087443;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

#orders .order-lock-trigger.unlocked:hover {
  border-color: #61b98e;
  background: #d9f3e6;
  color: #056137;
}

#orders .orders-logistics-panel .actions .logistics-template-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--order-control-line);
  background: linear-gradient(180deg, #fff, #f5f8fc);
  color: #31455f;
  box-shadow: inset 0 1px 0 #fff;
}

#orders .orders-logistics-panel .actions input[type="file"] {
  height: var(--order-control-height);
  min-height: var(--order-control-height);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--order-control-line);
  border-radius: var(--order-control-radius);
  background: #fbfcfe;
  color: #6f7c90;
  font-size: 12px;
}

#orders .orders-logistics-panel .actions input[type="file"]::file-selector-button {
  height: 100%;
  margin: 0 10px 0 0;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--order-control-line);
  background: linear-gradient(180deg, #fff, #f1f4f8);
  color: #31455f;
  font: inherit;
  font-weight: 650;
}

#orders .orders-control-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #1d4c9e;
}

@media (min-width: 1501px) {
  #orders > .topbar .top-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-right: 0;
    overflow: hidden;
    gap: 5px;
  }

  #orders > .topbar .top-actions > button {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    min-height: 32px;
    padding: 5px 6px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* 最终宽度约束：B 版订单录入大框不得越过主内容边界。 */
#entry > .entry-input-panel {
  box-sizing: border-box !important;
  width: calc(100% - 32px) !important;
  max-width: calc(100% - 32px) !important;
  min-width: 0 !important;
  margin-right: 16px !important;
  margin-left: 16px !important;
}

@media (max-width: 680px) {
  #entry > .entry-input-panel {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    margin-right: 10px !important;
    margin-left: 10px !important;
  }
}

/* 侧栏最终版：统一线性图标与科技渐变悬停。 */
.side {
  border-right-color: #d8dde5;
  box-shadow: 5px 0 20px rgba(22, 34, 53, .045);
}

.brand {
  min-height: 78px;
  padding: 17px 10px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border: 1px solid rgba(78, 228, 229, .58);
  border-radius: 10px;
  background:
    radial-gradient(circle at 22% 18%, rgba(46, 232, 222, .68), transparent 34%),
    linear-gradient(135deg, #086c96 0%, #1747a2 48%, #172b79 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .42),
    inset 0 0 14px rgba(19, 220, 219, .18),
    0 0 0 1px rgba(42, 205, 211, .12),
    0 7px 17px rgba(24, 65, 142, .22);
  font-size: 22px;
  font-weight: 820;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 760;
}

.nav-group-label {
  margin: 17px 12px 7px;
  color: #909caf;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.nav {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 11px;
  margin-bottom: 2px;
  padding: 6px 12px;
  border-radius: 9px;
  color: #465267;
  font-size: 13.5px;
  font-weight: 590;
  line-height: 1;
  transition:
    color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.nav::after {
  display: none !important;
  content: none !important;
}

.nav > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon {
  box-sizing: border-box;
  display: block;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 5px;
  overflow: visible;
  border: 1px solid transparent;
  border-radius: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

.nav:hover {
  border-color: transparent;
  background: linear-gradient(90deg, rgba(21, 188, 174, .105), rgba(54, 108, 224, .075) 64%, rgba(255, 255, 255, 0));
  color: #153873;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76);
  transform: translateX(1px);
}

.nav:hover .nav-icon {
  border-color: rgba(94, 223, 230, .72);
  color: #fff;
  background:
    radial-gradient(circle at 20% 18%, rgba(57, 240, 222, .9), transparent 36%),
    linear-gradient(135deg, #11b7a3 0%, #3b6eea 55%, #263b90 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 0 9px rgba(255, 255, 255, .12),
    0 0 0 1px rgba(32, 205, 209, .14),
    0 5px 13px rgba(40, 90, 201, .26),
    0 0 14px rgba(29, 201, 211, .19);
  transform: translateY(-1px);
}

.nav.active {
  background: transparent;
  color: #173f9b;
  font-weight: 720;
  box-shadow: none;
}

.nav.active:hover {
  background: linear-gradient(90deg, rgba(21, 188, 174, .105), rgba(54, 108, 224, .075) 64%, rgba(255, 255, 255, 0));
}

.nav.active::before {
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #1740a5, #315fd8);
  box-shadow: 0 0 8px rgba(40, 86, 207, .24);
}

.nav.active .nav-icon {
  color: #1743a7;
}

.nav-external {
  flex: 0 0 auto;
  margin-left: auto;
  color: #64748b;
  font-size: 14px;
  font-style: normal;
}

.nav:hover .nav-external {
  color: #10bfc3;
}

.nav.nav-subitem {
  padding-left: 12px;
  font-size: 13.5px;
}

.logout-nav {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #e0e4ea;
  border-radius: 0;
  color: #d8322b;
}

.logout-nav:hover {
  background: linear-gradient(90deg, rgba(218, 52, 46, .09), rgba(255, 255, 255, 0));
  color: #c92c27;
}

.logout-nav:hover .nav-icon {
  border-color: rgba(242, 139, 132, .65);
  background: linear-gradient(135deg, #f05a50, #c92c27);
  box-shadow: 0 5px 12px rgba(201, 44, 39, .2);
}

@media (min-width: 981px) {
  .side {
    flex-basis: 250px;
    width: 250px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .main {
    width: calc(100vw - 250px);
  }

  body.sidebar-collapsed .side {
    flex-basis: 74px;
    width: 74px;
  }

  body.sidebar-collapsed .main {
    width: calc(100vw - 74px);
  }

  body.sidebar-collapsed .nav {
    justify-content: center;
    padding: 6px;
    color: #657187;
  }

  body.sidebar-collapsed .nav > span,
  body.sidebar-collapsed .nav-external {
    display: none;
  }

  body.sidebar-collapsed .nav-icon {
    flex-basis: 30px;
    margin: 0;
  }

  body.sidebar-collapsed .nav.active {
    color: #1743a7;
  }
}

@media (max-width: 980px) {
  .nav {
    justify-content: center;
    padding: 6px;
    color: #657187;
  }

  .nav > span,
  .nav-external {
    display: none;
  }
}
.customer-railway-report-button {
  margin-left: 3px;
  min-width: 52px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid #0e7f78;
  border-radius: 6px;
  background: linear-gradient(135deg, #159b91, #087069);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(8, 112, 105, .16);
}
.customer-railway-report-button:hover {
  background: linear-gradient(135deg, #19aaa0, #075f5a);
  transform: translateY(-1px);
}
.customer-railway-report-dialog {
  width: min(700px, calc(100vw - 28px));
  max-height: calc(100vh - 20px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: #17233a;
  box-shadow: 0 24px 70px rgba(15, 31, 55, .28);
}
.customer-railway-report-dialog::backdrop { background: rgba(12, 22, 38, .58); }
.customer-railway-report-form > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #e4e9f1;
}
.customer-railway-report-form > header strong { font-size: 18px; }
.customer-railway-report-form > header button {
  padding: 7px 13px;
  border: 0;
  border-radius: 10px;
  background: #f1f3f6;
  color: #17233a;
  font-size: 15px;
}
.customer-railway-report-body {
  max-height: calc(100vh - 76px);
  overflow: auto;
  padding: 10px 18px 16px;
}
.customer-railway-report-body fieldset { margin: 0 0 8px; padding: 0; border: 0; }
.customer-railway-report-body legend,
.customer-railway-report-body label > span { display: block; margin-bottom: 6px; color: #62708a; font-size: 14px; }
.customer-railway-report-body em { color: #d92d20; font-style: normal; }
.customer-report-modes,
.customer-report-party,
.customer-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.customer-report-modes button {
  display: flex;
  min-height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  line-height: 1.2;
  border: 1px solid #d5deea;
  border-radius: 12px;
  background: #fff;
  color: #17233a;
}
.customer-report-modes button.active { border-color: #0b6970; background: #e5f3f4; color: #075a61; }
.customer-report-modes button strong { font-size: 15px; line-height: 1.2; }
.customer-report-modes button span { color: #6d7a91; font-size: 12px; line-height: 1.2; }
.customer-report-party { margin-bottom: 6px; }
.customer-report-calculation-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
}
.customer-report-calculation-grid:has(#queryReportRefundMethodRow:not([hidden])) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.customer-report-calculation-grid > label[hidden] { display: none; }
.customer-railway-report-body input,
.customer-railway-report-body select,
.customer-railway-report-body textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5deea;
  border-radius: 10px;
  background: #fbfcfe;
  color: #17233a;
  font: inherit;
}
.customer-railway-report-body input,
.customer-railway-report-body select { height: 34px; padding: 0 11px; font-size: 14px; }
.customer-railway-report-body input[readonly] { background: #f5f7fa; color: #59677d; }
.customer-railway-report-body textarea { min-height: 54px; padding: 8px 11px; resize: vertical; }
.customer-report-summary {
  margin: 8px 0;
  padding: 7px 12px;
  border-radius: 12px;
  background: #e3f2f4;
  color: #075a68;
}
.customer-report-summary div { display: flex; justify-content: space-between; gap: 20px; padding: 3px 0; }
.customer-report-error { margin: 10px 0; color: #c62828; font-weight: 600; }
.customer-report-submit {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  border: 0;
  border-radius: 11px;
  background: #0d6271;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
@media (max-width: 720px) {
  .customer-report-party,
  .customer-report-grid { grid-template-columns: 1fr; }
  .customer-report-calculation-grid { grid-template-columns: 1fr; }
  .customer-railway-report-body { padding: 16px; }
}

/* Final project-header layout override. */
.customer-portal #customerProjectsView .customer-project-record-head {
  flex-wrap: nowrap;
  gap: 10px;
}
.customer-portal #customerProjectsView .customer-project-record-head > div:first-child {
  flex: 0 0 auto;
}
.customer-portal #customerProjectsView .customer-project-record-head > .customer-project-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  flex: 1 1 auto;
  gap: 7px;
  min-width: 0;
  margin: 0 0 0 auto;
}
.customer-portal #customerProjectsView .customer-project-record-head > .customer-project-stats button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
}
.customer-portal #customerProjectsView .customer-project-record-head > .customer-project-stats span {
  font-size: 10px;
}
.customer-portal #customerProjectsView .customer-project-record-head > .customer-project-stats strong {
  font-size: 17px;
}
.customer-portal #customerProjectsView .customer-project-record-head > .customer-project-record-actions {
  flex: 0 0 auto;
  margin-left: 0;
}
@media (max-width: 1280px) {
  .customer-portal #customerProjectsView .customer-project-record-head {
    flex-wrap: wrap;
  }
  .customer-portal #customerProjectsView .customer-project-record-head > .customer-project-stats {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
  }
}

/* Customer invoices: place all four counters immediately before refresh. */
.customer-portal #customerInvoiceView .customer-invoice-page-head {
  display: flex;
  flex-wrap: nowrap;
  min-height: 64px;
  gap: 10px;
}
.customer-portal #customerInvoiceView .customer-invoice-page-head > .invoice-page-title {
  flex: 0 1 420px;
  min-width: 260px;
}
.customer-portal #customerInvoiceView .customer-invoice-page-head > .invoice-stats--inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 0 0 auto;
}
.customer-portal #customerInvoiceView .customer-invoice-page-head > .invoice-stats--inline > div {
  min-height: 34px;
  padding: 4px 14px;
}
.customer-portal #customerInvoiceView .customer-invoice-page-head > .invoice-stats--inline strong {
  font-size: 18px;
}
.customer-portal #customerInvoiceView .customer-invoice-page-head > #refreshCustomerInvoicesBtn {
  flex: 0 0 auto;
}
@media (max-width: 1100px) {
  .customer-portal #customerInvoiceView .customer-invoice-page-head {
    flex-wrap: wrap;
  }
  .customer-portal #customerInvoiceView .customer-invoice-page-head > .invoice-page-title {
    flex: 1 1 calc(100% - 90px);
    border-right: 0;
  }
  .customer-portal #customerInvoiceView .customer-invoice-page-head > .invoice-stats--inline {
    order: 3;
    flex-basis: 100%;
    width: 100%;
    margin-left: 0;
    border-top: 1px solid #e1e7f0;
  }
}

/* Railway order center: keep the four counters beside the current-tasks title. */
.customer-portal #customer .customer-railway-management-head {
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 18px;
}
.customer-portal #customer .customer-railway-management-head > div:first-child {
  flex: 0 0 auto;
  min-width: 300px;
}
.customer-portal #customer .customer-railway-management-head > .customer-railway-management-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 136px));
  flex: 0 1 auto;
  gap: 8px;
  margin-right: auto;
}
.customer-portal #customer .customer-railway-management-head > .customer-railway-management-stats span {
  min-width: 0;
  padding: 8px 12px;
}
.customer-portal #customer .customer-railway-management-head > .customer-railway-management-stats b {
  font-size: 17px;
}
@media (max-width: 1100px) {
  .customer-portal #customer .customer-railway-management-head {
    flex-wrap: wrap;
  }
  .customer-portal #customer .customer-railway-management-head > div:first-child {
    flex: 1 1 100%;
    min-width: 0;
  }
  .customer-portal #customer .customer-railway-management-head > .customer-railway-management-stats {
    flex: 1 1 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Order entry compact live-preview layout: import toolbar above, paste and preview below. */
#entry .entry-input-panel > .archive-select-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 280px) minmax(220px, 280px) minmax(480px, 1fr) !important;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  overflow: visible;
}
#entry > .entry-input-panel {
  min-height: 260px;
  overflow: visible;
}
#entry .entry-input-panel > .archive-select-row > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  max-width: none;
}
#entry .entry-input-panel > .archive-select-row .entry-import-inline {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto auto !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  grid-column: auto;
}
#entry .entry-live-layout {
  grid-template-columns: minmax(500px, .44fr) minmax(620px, .56fr);
  gap: 16px;
}
#entry .entry-live-source-head {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 5px;
}
#entry .entry-live-source-head strong {
  color: #27344b;
  font-size: 11px;
}
#entry .entry-input-panel .entry-parse-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: stretch;
  gap: 10px;
  overflow: visible;
}
#entry .entry-input-panel .entry-parse-row #rawInput {
  width: 100%;
  min-width: 0;
  max-width: none;
  min-height: 135px;
  max-height: 180px;
}
#entry .entry-input-panel .entry-inline-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
}
@media (max-width: 1380px) {
  #entry .entry-input-panel > .archive-select-row {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  }
  #entry .entry-input-panel > .archive-select-row .entry-import-inline {
    grid-column: 1 / -1;
  }
  #entry .entry-live-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  #entry .entry-input-panel > .archive-select-row,
  #entry .entry-input-panel > .archive-select-row .entry-import-inline,
  #entry .entry-input-panel .entry-parse-row {
    grid-template-columns: 1fr !important;
  }
  #entry .entry-input-panel .entry-inline-actions {
    flex-direction: row;
  }
}

/* Order entry workspace: raw source and authoritative preview stay linked. */
#entry > .entry-input-panel {
  flex: 0 0 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 14px 16px 12px;
  overflow: hidden !important;
}
#entry .entry-input-panel > .archive-select-row {
  display: grid !important;
  grid-template-columns: minmax(210px, 270px) minmax(210px, 270px) minmax(420px, 1fr) !important;
  gap: 10px;
  margin-bottom: 12px;
  overflow: visible;
}
#entry .entry-input-panel > .archive-select-row > label {
  width: auto;
  max-width: none;
  min-width: 0;
}
#entry .entry-input-panel > .archive-select-row .entry-import-inline {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto auto !important;
  grid-column: auto;
}
#entry .entry-live-layout {
  --entry-workspace-height: 248px;
  display: grid !important;
  grid-template-columns: minmax(0, 35fr) minmax(0, 65fr) !important;
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}
#entry .entry-live-source,
#entry .entry-live-preview {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  height: var(--entry-workspace-height);
  min-width: 0;
  min-height: 0;
  padding: 12px !important;
  overflow: hidden;
  border: 1px solid #dce4f1 !important;
  border-radius: 11px;
  background: #fbfcff;
}
#entry .entry-live-source { grid-template-rows: auto minmax(0, 1fr) auto; }
#entry .entry-live-preview { grid-template-rows: auto minmax(0, 1fr) auto; }
#entry .entry-live-preview { border-left: 1px solid #dce4f1 !important; }
#entry .entry-live-source.source-return-ready {
  cursor: text;
}
#entry .entry-live-source.source-return-ready:hover {
  border-color: #aebfe0 !important;
  box-shadow: inset 0 0 0 1px rgba(54, 99, 190, .08);
}
#entry .entry-live-source.raw-editing {
  border-color: #8eabe3 !important;
  box-shadow: inset 0 0 0 2px rgba(71, 113, 213, .09);
}
#entry .entry-live-source-head,
#entry .entry-live-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  margin-bottom: 8px;
}
#entry .entry-live-source-head > div,
#entry .entry-live-preview-head > div { min-width: 0; }
#entry .entry-live-source-head-main {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-start;
  gap: 8px;
  overflow: hidden;
}
#entry .entry-live-source-heading { flex: 0 0 auto; }
#entry .entry-live-source-head strong,
#entry .entry-live-preview-head strong { display: block; color: #243550; font-size: 12px; }
#entry .entry-live-source-head small,
#entry .entry-live-preview-head small { display: block; margin-top: 3px; color: #8490a3; font-size: 9px; line-height: 1.45; }
#entry .entry-live-source-head > span,
#entry .entry-live-preview-head > span {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #315fbd;
  font-size: 9px;
  font-weight: 800;
}
#entry .entry-live-source-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}
#entry .entry-live-source-tools > span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4ff;
  color: #315fbd;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
#entry .entry-live-source-tools button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 9px;
}
#entry .entry-source-label-toolbar {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 8px;
  min-width: 0;
  margin: 0;
  padding: 0 0 2px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}
#entry .entry-source-label-toolbar::-webkit-scrollbar { display: none; }
#entry .entry-source-label-group {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
#entry .entry-source-label-group.recipient {
  padding-left: 9px;
  border-left: 1px solid #d8e1ef;
}
#entry .entry-source-label-group > span {
  margin-right: 1px;
  color: #74839a;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
#entry .entry-source-label-group button {
  min-height: 22px;
  padding: 0 5px;
  border: 1px solid #cad8ee;
  border-radius: 6px;
  background: #fff;
  color: #315a9e;
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(39, 67, 116, .05);
}
#entry .entry-source-label-group button:hover {
  border-color: #7ea0df;
  background: #edf4ff;
  color: #204f9e;
}
#entry .entry-source-label-group button:focus-visible {
  outline: 2px solid rgba(61, 108, 204, .3);
  outline-offset: 1px;
}
#entry .entry-input-panel .entry-parse-row {
  display: block !important;
  width: 100%;
  max-width: none;
  min-height: 0;
  overflow: hidden;
}
#entry .entry-input-panel .entry-parse-row #rawInput {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 12px 14px;
  resize: none;
  overflow: auto;
  border-color: #ced9e9;
  border-radius: 9px;
  background: #fff;
  font-size: 11px;
  line-height: 1.75;
}
#entry .entry-input-panel .entry-parse-row #rawInput:focus {
  border-color: #4771d5;
  box-shadow: 0 0 0 3px rgba(71, 113, 213, .12);
}
#entry .entry-source-segments {
  height: 100%;
  min-height: 0;
  padding: 0 3px 12px 0;
  overflow: auto;
  scroll-padding-block: 8px 14px;
  scrollbar-gutter: stable;
}
#entry .entry-source-segments:focus-visible,
#entry .entry-live-preview-fields:focus-visible {
  outline: 2px solid rgba(46, 100, 206, .28);
  outline-offset: 2px;
}
#entry .entry-source-segment,
#entry .entry-preview-order {
  --entry-order-color: #2e64ce;
  --entry-order-tint: #eef4ff;
  box-sizing: border-box;
}
#entry [data-entry-color="1"] { --entry-order-color: #7c4fc6; --entry-order-tint: #f4efff; }
#entry [data-entry-color="2"] { --entry-order-color: #078f92; --entry-order-tint: #eaf9f8; }
#entry [data-entry-color="3"] { --entry-order-color: #cf791d; --entry-order-tint: #fff5e8; }
#entry [data-entry-color="4"] { --entry-order-color: #4667b5; --entry-order-tint: #eef2ff; }
#entry [data-entry-color="5"] { --entry-order-color: #bf4f75; --entry-order-tint: #fff0f5; }
#entry .entry-source-segment {
  margin-bottom: 9px;
  padding: 10px 12px;
  border: 1px solid #dfe6f1;
  border-left: 3px solid var(--entry-order-color);
  border-radius: 9px;
  background: linear-gradient(90deg, var(--entry-order-tint), #fff 18%);
  box-shadow: 0 2px 7px rgba(35, 60, 101, .04);
  cursor: text;
  transition: border-color .16s ease, box-shadow .16s ease;
}
#entry .entry-source-segment:last-child { margin-bottom: 0; }
#entry .entry-source-segment:hover {
  border-color: color-mix(in srgb, var(--entry-order-color) 52%, #dfe6f1);
  box-shadow: 0 4px 12px rgba(35, 60, 101, .08);
}
#entry .entry-source-segment.active {
  border-color: var(--entry-order-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--entry-order-color) 14%, transparent);
}
#entry .entry-source-segment.located {
  animation: entry-source-locate-pulse .65s ease;
}
@keyframes entry-source-locate-pulse {
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--entry-order-color) 22%, transparent); }
}
#entry .entry-source-segment > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
#entry .entry-source-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 25px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #263b5c;
  cursor: inherit;
}
#entry .entry-source-select strong { font-size: 10px; }
#entry .entry-order-number {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--entry-order-color) 28%, white);
  border-radius: 999px;
  background: var(--entry-order-tint);
  color: var(--entry-order-color);
  font-size: 10px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}
#entry .entry-source-correspondence {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--entry-order-color) 22%, white);
  border-radius: 6px;
  background: var(--entry-order-tint);
  color: var(--entry-order-color);
  font-size: 9px;
  font-weight: 750;
}
#entry .entry-source-segment-text {
  color: #33435d;
  font-size: 10px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
#entry .entry-source-sync-footer {
  height: 25px;
  margin-top: 7px;
}
#entry .entry-live-preview-fields {
  display: block !important;
  height: auto;
  min-height: 0;
  overflow: auto;
  padding: 0 3px 12px 0;
  scroll-padding-block: 8px 14px;
  scrollbar-gutter: stable;
}
#entry .entry-live-preview-fields.empty {
  display: grid !important;
  height: auto;
  min-height: 0;
  place-items: center;
  border: 1px dashed #d6deeb;
  border-radius: 9px;
  background: #fff;
}
#entry .entry-preview-order {
  margin-bottom: 9px;
  padding: 8px 9px;
  border: 1px solid #dfe6f1;
  border-left: 3px solid var(--entry-order-color);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(35, 60, 101, .04);
  transition: border-color .16s ease, box-shadow .16s ease;
}
#entry .entry-preview-order:last-child { margin-bottom: 0; }
#entry .entry-preview-order.active {
  border-color: var(--entry-order-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--entry-order-color) 14%, transparent);
}
#entry .entry-preview-row {
  display: grid;
  align-items: center;
  gap: 5px 6px;
  min-width: 0;
}
#entry .entry-preview-row + .entry-preview-row { margin-top: 5px; }
#entry .entry-preview-primary-row {
  grid-template-columns:
    minmax(118px, 1.25fr)
    minmax(96px, 1.25fr)
    minmax(126px, 1.65fr)
    minmax(82px, .82fr)
    minmax(92px, auto);
}
#entry .entry-preview-product-row {
  grid-template-columns: minmax(90px, 1.6fr) minmax(160px, 3.8fr) minmax(116px, 2.2fr) minmax(66px, .75fr);
}
#entry .entry-preview-recipient-row {
  grid-template-columns: minmax(96px, 1.45fr) minmax(126px, 1.9fr) minmax(220px, 5.2fr);
}
#entry .entry-preview-recipient-person {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 5px;
  min-width: 0;
}
#entry .entry-preview-recipient-person .entry-preview-field {
  min-width: 0;
}
#entry .entry-preview-recipient-person .field-remark input {
  border-color: #e2d6b0;
  background: #fffdf6;
}
#entry .entry-preview-locate {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #23477f;
}
#entry .entry-preview-locate .entry-order-number { flex: 0 0 auto; }
#entry .entry-preview-locate b { flex: 0 0 auto; font-size: 10px; }
#entry .entry-preview-locate > span:last-child {
  min-width: 0;
  overflow: hidden;
  color: #6d7f9b;
  font-size: 9px;
  text-decoration: underline;
  text-overflow: ellipsis;
  text-underline-offset: 2px;
  white-space: nowrap;
}
#entry .entry-preview-readiness,
#entry .entry-preview-supply-status,
#entry .entry-preview-confidence {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
#entry .entry-preview-readiness.ready,
#entry .entry-preview-supply-status.available { background: #e9f8f1; color: #13825a; }
#entry .entry-preview-readiness.issue,
#entry .entry-preview-supply-status.clearance { background: #fff5df; color: #aa6911; }
#entry .entry-preview-supply-status.shortage { background: #fff0e4; color: #c35d18; }
#entry .entry-preview-supply-status.stopped { background: #fff0f0; color: #c34242; }
#entry .entry-preview-confidence.high { background: #e8f7ef; color: #147956; }
#entry .entry-preview-confidence.medium { background: #fff5dc; color: #a8660d; }
#entry .entry-preview-confidence.low { background: #fff0f0; color: #bf3f3f; }
#entry .entry-preview-status-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
#entry .entry-preview-status-stack > span {
  min-width: 0;
  padding-inline: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}
#entry .entry-live-preview-fields .entry-preview-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: #718099;
  font-size: 9px;
  font-weight: 700;
}
#entry .entry-live-preview.source-adjusting .entry-preview-order {
  background: #fbfcff;
}
#entry .entry-live-preview.source-adjusting .entry-preview-field input:disabled {
  color: #4e5e76;
  opacity: .82;
}
#entry .entry-preview-field span { white-space: nowrap; }
#entry .entry-preview-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 26px;
  padding: 0 7px;
  overflow: hidden;
  border: 1px solid #d7e0ed;
  border-radius: 7px;
  background: #fbfcff;
  color: #263750;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
}
#entry .entry-preview-field.readonly input {
  border-color: #cfe6dc;
  background: #eff9f4;
  color: #157052;
  cursor: default;
  font-weight: 800;
}
#entry .entry-preview-field.invalid input {
  border-color: #e7a35b;
  background: #fffaf4;
  box-shadow: 0 0 0 2px rgba(219, 126, 41, .08);
}
#entry .entry-preview-field input:focus { border-color: #4875da; box-shadow: 0 0 0 2px rgba(72, 117, 218, .12); outline: 0; }
#entry .entry-live-preview-nav {
  min-height: 25px;
  margin-top: 7px;
}
#entry .entry-preview-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
  background: #f8faff;
}
#entry .entry-preview-gate { display: flex; align-items: center; gap: 10px; min-width: 0; }
#entry .entry-preview-gate strong { flex: 0 0 auto; font-size: 11px; }
#entry .entry-preview-gate span { min-width: 0; overflow: hidden; color: #78859a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
#entry .entry-preview-gate.idle strong { color: #6f7a8b; }
#entry .entry-preview-gate.loading strong { color: #315db6; }
#entry .entry-preview-gate.ready strong { color: #13825a; }
#entry .entry-preview-gate.blocked strong { color: #b85e22; }
#entry .entry-preview-actionbar .entry-inline-actions { display: flex; flex: 0 0 auto; flex-direction: row; gap: 7px; }
#entry .entry-preview-actionbar button { min-height: 32px; }
#entry .entry-result-heading { display: flex; flex-direction: column; min-width: 190px; }
#entry .entry-result-heading strong { color: #263750; font-size: 12px; }
#entry .entry-result-heading small { margin-top: 2px; color: #8792a3; font-size: 9px; font-weight: 500; }

@media (max-width: 1180px) {
  #entry .entry-input-panel > .archive-select-row {
    grid-template-columns: repeat(2, minmax(210px, 1fr)) !important;
  }
  #entry .entry-input-panel > .archive-select-row .entry-import-inline { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  #entry .entry-live-layout { grid-template-columns: minmax(0, 1fr) !important; }
  #entry .entry-live-source,
  #entry .entry-live-preview { padding: 10px !important; }
}
@media (max-width: 680px) {
  #entry .entry-input-panel > .archive-select-row,
  #entry .entry-input-panel > .archive-select-row .entry-import-inline { grid-template-columns: 1fr !important; }
  #entry .entry-preview-primary-row,
  #entry .entry-preview-product-row,
  #entry .entry-preview-recipient-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  #entry .entry-preview-primary-row .entry-preview-locate,
  #entry .entry-preview-primary-row .entry-preview-status-stack,
  #entry .entry-preview-product-row .field-product_name,
  #entry .entry-preview-recipient-row .field-address { grid-column: 1 / -1; }
  #entry .entry-preview-actionbar { align-items: stretch; flex-direction: column; }
  #entry .entry-preview-actionbar .entry-inline-actions { justify-content: flex-end; }
  #entry .entry-live-source-head-main { gap: 6px; }
}

/* Keep the order-management recipient column compact while making the
   optional remark explicit between the recipient name and phone. */
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-stack {
  grid-template-rows: repeat(3, minmax(16px, 1fr));
  min-height: 56px;
  gap: 2px;
}
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-stack > .order-cell-primary,
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-stack > .order-cell-secondary {
  min-height: 16px;
  height: 16px;
  line-height: 16px;
}
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-stack :is(input, select, textarea) {
  height: 17px;
  min-height: 17px;
  line-height: 15px;
  font-size: 10px;
}
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-stack .order-cell-primary :is(input, select, textarea) {
  font-size: 11px;
  font-weight: 750;
}
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-remark :is(input, select, textarea) {
  color: #718099;
  font-size: 9px;
}
#orders .admin-orders-data-table td.order-col-recipient .order-recipient-remark input::placeholder {
  color: #9aa7ba;
  opacity: 1;
}

/* 客户知识库 r335 最终覆盖：旧版问答样式位于文件中段，需在其后锁定新版布局。 */
#customerFaqs .customer-faq-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 10px;
  min-height: 0;
  color: #697586;
}
#customerFaqs .customer-faq-summary > span {
  display: grid;
  gap: 3px;
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8faff);
  box-shadow: 0 5px 16px rgba(35, 61, 105, .06);
}
#customerFaqs .customer-faq-summary strong { color: #174fae; font-size: 22px; line-height: 1; }
#customerFaqs .customer-faq-summary .is-warning { border-color: #f2d5a1; background: #fffaf0; }
#customerFaqs .customer-faq-summary .is-warning strong { color: #b66a08; }
#customerFaqs .customer-faq-toolbar {
  grid-template-columns: minmax(320px, 1fr) auto auto;
  align-items: end;
  gap: 9px;
  padding: 14px;
  border-bottom: 0;
}
#customerFaqs .customer-faq-toolbar .primary,
#customerFaqs .customer-faq-pager .primary {
  border-color: #315ee7;
  background: #315ee7;
  color: #fff;
}
#customerFaqs .customer-faq-table { min-width: 1120px; }
#customerFaqs .customer-faq-insight-table { min-width: 1160px; }
#customerFaqs .customer-faq-table th:nth-child(1) { width: 20%; }
#customerFaqs .customer-faq-table th:nth-child(2) { width: 34%; }
#customerFaqs .customer-faq-table th:nth-child(3) { width: 17%; }
#customerFaqs .customer-faq-table th:nth-child(4) { width: 9%; }
#customerFaqs .customer-faq-table th:nth-child(5) { width: 8%; }
#customerFaqs .customer-faq-table th:nth-child(6) { width: 12%; }
#customerFaqs .customer-faq-insight-table th:nth-child(1) { width: 6%; }
#customerFaqs .customer-faq-insight-table th:nth-child(2) { width: 31%; }
#customerFaqs .customer-faq-insight-table th:nth-child(3),
#customerFaqs .customer-faq-insight-table th:nth-child(4),
#customerFaqs .customer-faq-insight-table th:nth-child(5) { width: 8%; }
#customerFaqs .customer-faq-insight-table th:nth-child(6) { width: 13%; }
#customerFaqs .customer-faq-insight-table th:nth-child(7) { width: 10%; }
#customerFaqs .customer-faq-insight-table th:nth-child(8) { width: 16%; }
@media (max-width: 980px) {
  #customerFaqs .customer-faq-summary { grid-template-columns: repeat(3, minmax(118px, 1fr)); }
  #customerFaqs .customer-faq-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  #customerFaqs .customer-faq-toolbar #customerFaqClearBtn { grid-column: 2; }
}
@media (max-width: 640px) {
  #customerFaqs .customer-faq-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #customerFaqs .customer-faq-toolbar { grid-template-columns: 1fr; }
  #customerFaqs .customer-faq-toolbar #customerFaqClearBtn { grid-column: auto; }
}

/* FIN-TAX-001-R3：资金、对账、销项和进项的紧凑工作台。 */
body.input-invoice-drawer-open,
body.funds-detail-drawer-open { overflow: hidden; }
#funds {
  --funds-line: #dce5f1;
  --funds-muted: #6f7e95;
  --funds-blue: #2459d3;
  --funds-bg: #f7f9fc;
}
#funds > .topbar {
  min-height: 78px;
  padding: 13px 18px;
  gap: 16px;
}
#funds > .topbar h1 { margin-bottom: 2px; font-size: 24px; }
#funds > .topbar p { margin: 0; font-size: 13px; }
#funds > .topbar .integrated-header-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  flex: 1;
  max-width: 720px;
  margin-left: auto;
}
#funds > .topbar .integrated-header-metrics > span { min-height: 48px; padding: 6px 13px; }
#funds > .topbar .integrated-header-metrics > span[hidden] { display: none !important; }
#funds > .topbar .integrated-header-metrics:has(.finance-unresolved-metric:not([hidden])) {
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  max-width: 840px;
}
#funds > .topbar .integrated-header-metrics > .finance-unresolved-metric {
  border-color: #f2c36b;
  background: #fff8e8;
}
#funds > .topbar .integrated-header-metrics > .finance-unresolved-metric b { color: #a04d00; }
#funds > .topbar .integrated-header-metrics small { font-size: 11px; }
#funds > .topbar .integrated-header-metrics b { font-size: 20px; }
#funds .funds-finance-panel { padding: 0; overflow: visible; }
#funds .funds-view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 6px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--funds-line);
  scrollbar-width: thin;
}
#funds .funds-tab-group-label {
  flex: 0 0 auto;
  padding: 0 5px;
  color: #8a96a8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}
#funds .funds-tab-group-label--tax { margin-left: 10px; padding-left: 15px; border-left: 1px solid var(--funds-line); }
#funds .funds-view-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 13px;
}
#funds [data-funds-panel] { padding: 12px; }

/* 客户账户：表格保持整页宽，详情按需从右侧打开。 */
#funds .funds-customer-toolbar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto minmax(390px, auto) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 10px;
}
#funds .funds-customer-toolbar input { min-width: 0; height: 34px; }
#funds .funds-smart-sort { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
#funds .funds-customer-quick-filters { display: flex; gap: 4px; min-width: 0; }
#funds .funds-customer-quick-filters button { min-height: 32px; padding: 5px 9px; white-space: nowrap; }
#funds .funds-customer-workspace { position: relative; display: block; min-width: 0; }
#funds .funds-customer-master { width: 100%; min-width: 0; }
#funds .funds-customer-workspace .finance-customers-wrap {
  max-height: calc(100vh - 290px);
  min-height: 360px;
  overflow-x: auto;
}
#funds .funds-customer-workspace .finance-customers-table { min-width: 920px; table-layout: fixed; }
#funds .funds-customer-workspace .finance-customers-table th,
#funds .funds-customer-workspace .finance-customers-table td { height: 44px; padding: 6px 10px; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(1) { width: 22%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(2) { width: 10%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(3) { width: 8%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(4),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(5),
#funds .funds-customer-workspace .finance-customers-table th:nth-child(6) { width: 10%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(7) { width: 14%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(8) { width: 16%; }
#funds .funds-customer-workspace .finance-customers-table th:nth-child(7) {
  color: #cf3f39;
  background: #fff0ef;
}
#funds .funds-customer-workspace .finance-customers-table td:nth-child(7) {
  overflow: hidden;
  color: #cf3f39;
  background: rgba(255, 240, 239, .58);
  text-overflow: clip;
  white-space: normal;
}
#funds .funds-customer-workspace .finance-customers-table th:nth-child(8) {
  color: #3b4860;
  background: #f6f8fc;
}
#funds .funds-customer-workspace .finance-customers-table td:nth-child(8) {
  overflow: hidden;
  color: inherit;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#funds .funds-customer-workspace .finance-customers-table td:nth-child(7) .debt-trigger {
  display: grid;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal;
}
#funds .funds-customer-workspace .finance-customers-table td:nth-child(7) .debt-trigger small {
  display: block;
  margin: 1px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#funds .fund-action-cell { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
#funds .fund-action-cell button { min-height: 30px; padding: 4px 7px; font-size: 12px; }
#funds .funds-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  border: 0;
  border-radius: 0;
  background: rgba(13, 27, 53, .24);
}
#funds .funds-customer-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  width: min(480px, calc(100vw - 24px));
  max-height: none;
  padding: 18px;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid var(--funds-line);
  border-radius: 0;
  background: #fff;
  box-shadow: -18px 0 48px rgba(28, 48, 78, .18);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform .2s ease, visibility .2s;
}
#funds .funds-customer-workspace.is-detail-open .funds-detail-backdrop { display: block; }
#funds .funds-customer-workspace.is-detail-open .funds-customer-detail { transform: translateX(0); visibility: visible; }
#funds .funds-detail-head { align-items: flex-start; }
#funds .funds-detail-head-actions { display: flex; align-items: center; gap: 7px; }
#funds .funds-detail-metrics { grid-template-columns: repeat(2, 1fr); gap: 8px; }
#funds .funds-detail-metrics > div { min-height: 72px; padding: 10px; }
#funds .funds-detail-ledger-row { min-height: 48px; }

/* 收扣流水：筛选不挤压，服务端分页与旧接口客户端分页共用同一页脚。 */
#funds .funds-ledger-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 2px 8px;
}
#funds .funds-ledger-title strong { color: #14233e; font-size: 16px; }
#funds .funds-ledger-title span { color: var(--funds-muted); font-size: 12px; }
#funds .funds-ledger-filters {
  display: grid;
  grid-template-columns: 145px 145px minmax(170px, .8fr) 135px minmax(210px, 1fr) auto auto auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 8px;
}
#funds .funds-ledger-filters input,
#funds .funds-ledger-filters select,
#funds .funds-ledger-filters button { min-width: 0; height: 34px; }
#funds .finance-ledger-wrap {
  max-height: calc(100vh - 300px);
  min-height: 340px;
  overflow-x: auto;
  overflow-y: auto;
}
#funds .finance-ledger-table { min-width: 1540px; table-layout: fixed; }
#funds .finance-ledger-table th,
#funds .finance-ledger-table td { height: 40px; padding: 5px 8px; font-size: 12px; }
#funds .funds-ledger-pager,
#funds .funds-customer-pager,
#funds .input-invoice-pager { min-height: 42px; padding: 6px 8px; }

/* 对账：七步进度、应收账款与预存资金分组，避免会计含义混用。 */
#funds .statement-workflow-steps--seven,
.portal-statement-workflow {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 6px;
  min-width: 0;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--funds-line);
  border-radius: 12px;
  background: #fff;
}
#funds #fundsStatementPanel > .statement-workflow-steps--seven { margin-bottom: 9px; }
#funds .statement-workflow-steps--seven > span,
.portal-statement-workflow > span {
  position: relative;
  display: grid;
  grid-template-columns: 25px 1fr;
  grid-template-rows: auto auto;
  column-gap: 7px;
  min-height: 47px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f7f9fc;
}
#funds .statement-workflow-steps--seven b,
.portal-statement-workflow b { grid-row: 1 / 3; align-self: center; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #e8edf6; color: #718098; }
#funds .statement-workflow-steps--seven strong,
.portal-statement-workflow strong { align-self: end; font-size: 12px; white-space: nowrap; }
#funds .statement-workflow-steps--seven small,
.portal-statement-workflow small { align-self: start; color: #8490a2; font-size: 10px; white-space: nowrap; }
#funds .statement-workflow-steps--seven .done,
.portal-statement-workflow .done { background: #eefaf4; color: #13845c; }
#funds .statement-workflow-steps--seven .done b,
.portal-statement-workflow .done b { background: #d9f3e6; color: #13845c; }
#funds .statement-workflow-steps--seven .current,
.portal-statement-workflow .current { border-color: #91b1ff; background: #eff4ff; }
#funds .statement-workflow-steps--seven .current b,
.portal-statement-workflow .current b { background: #2f63dd; color: #fff; }
#funds .statement-workflow-steps--seven .warning,
.portal-statement-workflow .warning { border-color: #f1c16d; background: #fff8eb; color: #a66009; }
#funds .statement-filter-bar { padding: 8px; gap: 6px; }
#funds .statement-filter-bar input,
#funds .statement-filter-bar button { min-height: 34px; }
#funds .statement-sheet { display: grid; gap: 9px; }
#funds .statement-overview-bar,
.portal-statement-workspace .statement-overview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 9px 12px;
}
#funds .statement-sheet-head h2,
.portal-statement-workspace .statement-sheet-head h2 { margin: 0 0 3px; font-size: 17px; }
#funds .statement-sheet-head p,
.portal-statement-workspace .statement-sheet-head p { margin: 0; font-size: 11px; line-height: 1.5; }
.statement-money-groups {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 9px;
}
.statement-money-groups > section {
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #fff;
}
.statement-money-groups header { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.statement-money-groups header strong { color: #1b2c49; font-size: 13px; }
.statement-money-groups header span { color: #7c899c; font-size: 10px; }
.statement-money-groups section > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.statement-money-groups section:nth-child(2) > div { grid-template-columns: repeat(4, 1fr); }
.statement-money-groups .statement-card { min-width: 0; min-height: 54px; padding: 7px 8px; border-radius: 9px; }
.statement-money-groups .statement-card span { font-size: 10px; }
.statement-money-groups .statement-card strong { margin-top: 3px; font-size: 14px; white-space: nowrap; }
.portal-statement-hero {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: linear-gradient(100deg, #edf4ff, #f8fbff);
}
.portal-statement-hero > span { color: #56657b; font-weight: 700; }
.portal-statement-hero > strong { color: #165ed1; font-size: 28px; }
.portal-statement-hero > small { color: #718096; text-align: right; }
#funds .statement-payments-panel,
#funds .statement-orders-panel,
.portal-statement-workspace .statement-payments-panel,
.portal-statement-workspace .statement-orders-panel { padding: 9px; }
#funds .statement-section-title,
.portal-statement-workspace .statement-section-title { min-height: 38px; margin-bottom: 6px; }
#funds .statement-payment-table th,
#funds .statement-payment-table td,
#funds .statement-orders-table th,
#funds .statement-orders-table td,
.portal-statement-workspace .statement-payment-table th,
.portal-statement-workspace .statement-payment-table td,
.portal-statement-workspace .statement-orders-table th,
.portal-statement-workspace .statement-orders-table td { padding: 6px 8px; font-size: 12px; }

/* 销项/进项：紧凑表格，复杂处理统一由右侧抽屉承载。 */
#funds .invoice-page-head--combined,
.customer-invoice-page-head {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.25fr) minmax(410px, 1.4fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 8px 10px;
}
#funds #fundsInputInvoicePanel .invoice-page-head--combined { grid-template-columns: minmax(260px, 1fr) auto auto auto; }
#funds .invoice-page-title { min-width: 0; }
#funds .invoice-page-title strong { font-size: 16px; }
#funds .invoice-page-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
#funds .invoice-stats--inline,
.customer-invoice-page-head .invoice-stats--inline { display: grid; grid-template-columns: repeat(4, minmax(75px, 1fr)); gap: 5px; }
#funds .invoice-stats--inline > div,
.customer-invoice-page-head .invoice-stats--inline > div { min-height: 40px; padding: 5px 7px; }
#funds .invoice-stats--inline span,
.customer-invoice-page-head .invoice-stats--inline span { font-size: 10px; }
#funds .invoice-stats--inline strong,
.customer-invoice-page-head .invoice-stats--inline strong { font-size: 17px; }
#funds .invoice-filter-bar { display: grid; grid-template-columns: minmax(180px, 1fr) 150px auto; gap: 6px; padding: 7px 0; }
#funds .invoice-filter-bar input,
#funds .invoice-filter-bar select,
#funds .invoice-filter-bar button { min-width: 0; height: 34px; }
#funds .invoice-table-wrap { max-height: calc(100vh - 285px); overflow: auto; }
#funds .invoice-table { min-width: 1050px; }
#funds .invoice-table th,
#funds .invoice-table td { height: 42px; padding: 6px 8px; font-size: 12px; }
#funds .invoice-row-actions { flex-wrap: nowrap; gap: 5px; }
#funds .invoice-number-inline { width: 118px; min-width: 118px; height: 30px; }
#funds .invoice-upload-btn { min-height: 30px; padding: 5px 9px; white-space: nowrap; }
#funds .invoice-upload-btn--primary { border-color: #2f63dd; background: #2f63dd; color: #fff; }
#funds .input-invoice-stats {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  margin-bottom: 7px;
}
#funds .input-invoice-stats > span { display: flex; align-items: baseline; gap: 7px; padding: 6px 10px; border: 1px solid var(--funds-line); border-radius: 9px; background: #fff; }
#funds .input-invoice-stats small { color: var(--funds-muted); }
#funds .input-invoice-stats strong { color: var(--funds-blue); font-size: 18px; }
#funds .input-invoice-stats em { margin-left: auto; color: #7c899c; font-size: 11px; font-style: normal; }
#funds .input-invoice-pager { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--funds-line); }
#funds .input-invoice-pager > div { display: flex; gap: 6px; }
#funds #fundsInputInvoicePanel .input-invoice-filter-bar {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 150px auto auto;
  align-items: center;
}
#funds #fundsInputInvoicePanel .input-invoice-filter-bar > * { min-width: 0; max-width: 100%; }
#funds #fundsInputInvoicePanel .input-invoice-filter-bar button { white-space: nowrap; }
#fundsInputInvoicePanel .input-invoice-model-summary {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e9f4;
  color: #60708a;
  background: #f4f8ff;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#fundsInputInvoicePanel .input-invoice-model-summary strong { color: #244fb8; }
#funds #fundsInputInvoicePanel .input-invoice-model-matches { min-width: 170px; max-width: 280px; white-space: normal; }
#fundsInputInvoicePanel .input-invoice-model-matches > div { display: flex; flex-wrap: wrap; gap: 4px; }
#fundsInputInvoicePanel .input-invoice-model-matches > div > span {
  max-width: 100%;
  padding: 2px 5px;
  border-radius: 4px;
  color: #2454a5;
  background: #edf4ff;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
#inputInvoiceDrawer .input-invoice-model-hit { padding: 2px 3px; border-radius: 3px; color: #684701; background: #fff0af; }
#inputInvoiceDrawer .input-invoice-detail-table td.input-invoice-line-model { min-width: 120px; max-width: 240px; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  #funds #fundsInputInvoicePanel .input-invoice-filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; }
  #funds #fundsInputInvoicePanel .input-invoice-filter-bar > input { grid-column: span 2; }
  #funds #fundsInputInvoicePanel .input-invoice-filter-bar > select { grid-column: span 2; }
}
@media (max-width: 720px) {
  #funds #fundsInputInvoicePanel .input-invoice-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #funds #fundsInputInvoicePanel .input-invoice-filter-bar > input,
  #funds #fundsInputInvoicePanel .input-invoice-filter-bar > select { grid-column: 1 / -1; width: 100%; }
}
.input-invoice-drawer { position: fixed; inset: 0; z-index: 1120; visibility: hidden; pointer-events: none; }
.input-invoice-drawer.is-open { visibility: visible; pointer-events: auto; }
.input-invoice-drawer-mask { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgba(13, 27, 53, .28); opacity: 0; transition: opacity .2s; }
.input-invoice-drawer.is-open .input-invoice-drawer-mask { opacity: 1; }
.input-invoice-drawer > aside {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(980px, calc(100vw - 24px));
  background: #fff;
  box-shadow: -18px 0 48px rgba(28, 48, 78, .2);
  transform: translateX(105%);
  transition: transform .2s ease;
}
.input-invoice-drawer.is-open > aside { transform: translateX(0); }
.input-invoice-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid #dce5f1; }
.input-invoice-drawer-head > div { display: grid; gap: 2px; }
.input-invoice-drawer-head span { color: #77859a; font-size: 11px; }
.input-invoice-drawer #inputInvoicePreview { min-height: 0; margin: 0; padding: 12px; overflow: auto; border: 0; border-radius: 0; }
.input-invoice-drawer .input-invoice-preview-summary { position: sticky; top: -12px; z-index: 2; background: #fff; }
.input-invoice-template-download { align-items: center; justify-content: center; min-height: 34px; text-decoration: none; }
#funds .invoice-status.closed,
.input-invoice-drawer .invoice-status.closed { color: #b23b35; background: #fff0ef; }
.input-invoice-header-check { color: #246f4b; border: 1px solid #b9dfca; background: #eef9f3 !important; font-weight: 700; }
.input-invoice-header-check.is-invalid { color: #b23b35; border-color: #f0c2bf; background: #fff0ef !important; }
.input-invoice-header-error { margin: 8px 0; padding: 9px 11px; border: 1px solid #efc1bd; border-radius: 8px; color: #b23b35; background: #fff4f3; font-size: 12px; overflow-wrap: anywhere; }
.input-invoice-preview-list { max-height: none !important; border: 1px solid #dfe6f1; border-radius: 9px; }
.input-invoice-preview-list .invoice-table { min-width: 820px !important; }
.input-invoice-preview-pager,
.input-invoice-line-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px; color: #66758b; font-size: 11px; }
.input-invoice-preview-pager > div,
.input-invoice-line-pager > div { display: flex; gap: 6px; }
.input-invoice-record-expansion > td { height: auto !important; padding: 10px !important; background: #f6f8fc; }
.input-invoice-record-detail { display: grid; gap: 10px; min-width: 0; text-align: left; }
.input-invoice-record-check { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid #b9dfca; border-radius: 9px; color: #246f4b; background: #eef9f3; }
.input-invoice-record-check span { color: #557366; font-size: 11px; }
.input-invoice-detail-section { min-width: 0; overflow: hidden; border: 1px solid #dfe6f1; border-radius: 10px; background: #fff; }
.input-invoice-detail-section > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e4eaf3; background: #f7f9fd; }
.input-invoice-detail-section > header > div { display: grid; gap: 2px; }
.input-invoice-detail-section > header strong { color: #1e3151; font-size: 14px; }
.input-invoice-detail-section > header span,
.input-invoice-detail-section > header em { color: #76849a; font-size: 10px; font-style: normal; }
.input-invoice-field-grid,
.input-invoice-system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.input-invoice-field-grid > div,
.input-invoice-system-grid > div { display: grid; min-width: 0; gap: 4px; padding: 9px 11px; border-right: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; }
.input-invoice-field-grid > div:nth-child(3n),
.input-invoice-system-grid > div:nth-child(3n) { border-right: 0; }
.input-invoice-field-grid > div.is-wide { grid-column: 1 / -1; border-right: 0; }
.input-invoice-field-grid dt,
.input-invoice-system-grid dt { color: #7a879b; font-size: 10px; }
.input-invoice-field-grid dd,
.input-invoice-system-grid dd { min-width: 0; margin: 0; color: #243653; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; white-space: normal; }
.input-invoice-detail-table-wrap { width: 100%; max-height: 390px; overflow: auto; scrollbar-gutter: stable; }
.input-invoice-detail-table { width: 100%; min-width: 1520px; border-collapse: collapse; font-size: 11px; }
.input-invoice-detail-table th { position: sticky; z-index: 1; top: 0; padding: 8px 9px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }
.input-invoice-detail-table td { max-width: 230px; padding: 8px 9px; border-top: 1px solid #e8edf5; color: #2d3d57; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.input-invoice-detail-table td:nth-child(2) { max-width: 180px; }
.input-invoice-detail-table td:nth-child(4) { max-width: 300px; }
.input-invoice-detail-section > .input-invoice-line-pager { padding: 8px 11px; border-top: 1px solid #e8edf5; }
.input-invoice-system-head { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-bottom: 1px solid #e8edf5; color: #5e6c81; font-size: 11px; }
.input-invoice-system-head > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.input-invoice-detail-issues { display: grid; gap: 4px; margin: 0; padding: 9px 12px 9px 30px; border-top: 1px solid #f0d1ce; color: #b23b35; background: #fff7f6; font-size: 11px; }
.input-invoice-detail-audit { margin: 9px 11px 11px; padding: 8px 10px; border: 1px solid #e0e7f2; border-radius: 8px; background: #fbfcff; }
.input-invoice-detail-audit summary { cursor: pointer; color: #30466c; font-size: 11px; font-weight: 700; }
.input-invoice-detail-audit ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.input-invoice-detail-audit li { display: grid; grid-template-columns: 135px 105px minmax(0, 1fr) 90px; gap: 7px; color: #59677c; font-size: 10px; }
.input-invoice-detail-audit li > * { min-width: 0; overflow-wrap: anywhere; }
.input-invoice-drawer-state { display: grid; place-items: center; align-content: center; gap: 7px; min-height: 220px; padding: 20px; color: #6f7d92; text-align: center; }
.input-invoice-drawer-state strong { color: #263955; font-size: 16px; }
.input-invoice-drawer-state.is-loading::before { width: 24px; height: 24px; border: 3px solid #dce5f5; border-top-color: #315fd8; border-radius: 50%; content: ""; animation: input-invoice-spin .8s linear infinite; }
.input-invoice-drawer-state.is-error { color: #b23b35; }
@keyframes input-invoice-spin { to { transform: rotate(360deg); } }

.finance-process-drawer { align-items: stretch !important; justify-content: flex-end !important; padding: 0 !important; background: rgba(13, 27, 53, .28) !important; }
.finance-process-drawer-panel {
  width: min(760px, calc(100vw - 24px)) !important;
  max-width: none !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: -18px 0 48px rgba(28, 48, 78, .2) !important;
}
.finance-process-drawer-panel .invoice-detail-body { min-height: 0; overflow: hidden; padding: 10px; }
.finance-process-drawer-panel .invoice-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.finance-process-drawer-panel .invoice-detail-table-wrap { max-height: none; }
.finance-process-drawer-panel .invoice-detail-footer { flex-wrap: wrap; padding: 8px 10px; }
.invoice-upload-review { width: min(390px, calc(100vw - 20px)); }
.invoice-upload-review .follow-confirm-card { display: grid; gap: 10px; }
.invoice-upload-review dl { display: grid; gap: 5px; margin: 0; }
.invoice-upload-review dl > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px; padding: 6px 8px; border-radius: 8px; background: #f6f8fc; }
.invoice-upload-review dt { color: #758399; font-size: 11px; }
.invoice-upload-review dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #1b2b47; font-size: 12px; font-weight: 700; }
.invoice-upload-review textarea { width: 100%; min-height: 62px; resize: vertical; }
.invoice-upload-review .invoice-review-check { display: flex; align-items: flex-start; gap: 8px; color: #3c4b64; font-size: 12px; line-height: 1.5; }
.invoice-upload-review .invoice-review-check input { flex: 0 0 auto; margin-top: 2px; }
.invoice-upload-review .invoice-review-error { margin: 0; padding: 7px 9px; border-radius: 8px; background: #fff0ef; color: #c33e36; font-size: 11px; }

/* 客户端账单 / 发票：先看金额与状态，再看明细。 */
#customerStatementView .customer-statement-toolbar { min-height: 56px; padding: 8px 11px; gap: 8px; }
#customerStatementView .portal-statement-workspace { display: grid; gap: 9px; }
#customerStatementView .portal-statement-workflow { margin: 0; }
#customerStatementView .statement-money-groups { grid-template-columns: .82fr 1.18fr; }
#customerInvoiceView .customer-invoice-workspace-card { padding: 0; }
#customerInvoiceView .customer-invoice-page-head { grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.4fr) auto; }
#customerInvoiceView > .customer-invoice-workspace-card > .invoice-filter-bar { display: grid; grid-template-columns: minmax(260px, 1fr) 170px auto; gap: 7px; padding: 8px 10px; }
#customerInvoiceView .invoice-table-wrap { max-height: calc(100vh - 300px); overflow: auto; }
#customerInvoiceView .invoice-table th,
#customerInvoiceView .invoice-table td { height: 42px; padding: 6px 8px; font-size: 12px; }

.statement-server-page-note,
.customer-statement-page-info { color: #718097; font-size: 11px; }
.customer-statement-page-info { min-width: 88px; text-align: center; }
.invoice-lifecycle-panel {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #f8faff;
}
.invoice-lifecycle-panel > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.invoice-lifecycle-panel > div:last-child { justify-content: flex-end; }
.invoice-lifecycle-panel small { color: #718097; }
.invoice-red-complete { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) auto; gap: 7px; align-items: center; width: 100%; }
.invoice-red-complete input { min-width: 0; }
.invoice-audit-panel { margin-top: 10px; padding: 9px 11px; border: 1px solid #e0e7f2; border-radius: 10px; background: #fbfcff; }
.invoice-audit-panel summary { cursor: pointer; color: #30466c; font-weight: 700; }
.invoice-audit-panel ul { display: grid; gap: 5px; margin: 8px 0; padding: 0; list-style: none; }
.invoice-audit-panel li { display: grid; grid-template-columns: 140px minmax(0, 1fr) 110px; gap: 8px; color: #59677c; font-size: 11px; }
.invoice-audit-panel p { margin: 0; color: #718097; font-size: 11px; }

@media (max-width: 1366px) {
  #funds > .topbar { min-height: 70px; padding: 10px 12px; }
  #funds > .topbar p { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #funds > .topbar .integrated-header-metrics { max-width: 560px; grid-template-columns: repeat(4, minmax(90px, 1fr)); }
  #funds .funds-customer-toolbar { grid-template-columns: auto minmax(180px, 1fr) auto minmax(350px, auto) auto; }
  #funds .funds-customer-page-size { display: none; }
  #funds .funds-ledger-filters {
    grid-template-columns: 115px 115px minmax(145px, 1fr) 105px minmax(160px, 1fr) 54px 48px 88px;
  }
  #funds .funds-ledger-filters #searchFundsLedgerBtn,
  #funds .funds-ledger-filters #resetFundsLedgerBtn,
  #funds .funds-ledger-filters #exportFundsLedgerBtn { padding-inline: 6px; font-size: 11px; }
  #funds .funds-ledger-filters #fundsLedgerCount { grid-column: 1 / -2; }
  #funds .funds-ledger-page-size { justify-self: end; }
  #funds .invoice-page-head--combined { grid-template-columns: minmax(210px, .8fr) minmax(340px, 1.2fr) auto; }
  #funds .invoice-page-head--combined > .invoice-filter-bar { grid-column: 1 / -1; grid-row: 2; padding: 0; }
  .statement-money-groups { grid-template-columns: 1fr; }
  #customerInvoiceView .customer-invoice-page-head { grid-template-columns: minmax(180px, 1fr) minmax(340px, 1.4fr) auto; }
}

@media (max-width: 1024px) {
  #funds > .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #funds > .topbar .integrated-header-metrics { grid-column: 1 / -1; width: 100%; max-width: none; }
  #funds > .topbar .integrated-header-metrics > span { min-height: 42px; }
  #funds [data-funds-panel] { padding: 8px; }
  #funds .funds-customer-toolbar { display: flex; flex-wrap: wrap; }
  #funds .funds-customer-toolbar > .funds-customer-search { flex: 1 1 360px; width: auto; }
  #funds .funds-customer-quick-filters { order: 4; flex: 1 1 100%; overflow-x: auto; }
  #funds .funds-ledger-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #funds .funds-ledger-filters #fundsLedgerCustomer,
  #funds .funds-ledger-filters #fundsLedgerKeyword { grid-column: span 2; }
  #funds .funds-ledger-filters #fundsLedgerCount { grid-column: 1; }
  #funds .statement-workflow-steps--seven,
  .portal-statement-workflow { min-width: 0; display: flex; overflow-x: auto; }
  #funds .statement-workflow-steps--seven > span,
  .portal-statement-workflow > span { flex: 0 0 120px; }
  #funds .invoice-page-head--combined,
  #funds #fundsInputInvoicePanel .invoice-page-head--combined,
  #customerInvoiceView .customer-invoice-page-head { grid-template-columns: minmax(0, 1fr) auto; }
  #funds .invoice-page-head--combined > .invoice-stats,
  #customerInvoiceView .customer-invoice-page-head > .invoice-stats { grid-column: 1 / -1; grid-row: 2; }
  #funds .invoice-page-head--combined > .invoice-filter-bar { grid-column: 1 / -1; grid-row: 3; }
  #customerInvoiceView > .customer-invoice-workspace-card > .invoice-filter-bar { grid-template-columns: 1fr 150px auto; }
  .portal-statement-hero { grid-template-columns: 1fr auto; }
  .portal-statement-hero > small { grid-column: 1 / -1; text-align: left; }
}

@media (max-width: 720px) {
  #funds > .topbar .integrated-header-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #funds .funds-tab-group-label { display: none; }
  #funds .funds-view-tabs { padding-inline: 7px; }
  #funds .funds-customer-detail,
  .input-invoice-drawer > aside,
  .finance-process-drawer-panel { width: 100vw !important; }
  #funds .funds-ledger-title span { display: none; }
  #funds .statement-filter-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #funds .statement-customer-field,
  #funds .statement-advanced-filters { grid-column: 1 / -1; }
  .statement-money-groups section > div,
  .statement-money-groups section:nth-child(2) > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #funds .invoice-filter-bar,
  #customerInvoiceView > .customer-invoice-workspace-card > .invoice-filter-bar { grid-template-columns: 1fr; }
  #funds .input-invoice-stats { overflow-x: auto; }
  #funds .input-invoice-stats > span { flex: 0 0 auto; }
  #funds .input-invoice-stats em { display: none; }
  .input-invoice-field-grid,
  .input-invoice-system-grid { grid-template-columns: 1fr; }
  .input-invoice-field-grid > div,
  .input-invoice-system-grid > div { border-right: 0; }
  .input-invoice-record-check,
  .input-invoice-preview-pager,
  .input-invoice-line-pager { align-items: flex-start; flex-direction: column; }
  .input-invoice-detail-audit li { grid-template-columns: 1fr; }
  .invoice-lifecycle-panel { grid-template-columns: 1fr; }
  .invoice-lifecycle-panel > div:last-child { justify-content: flex-start; }
  .invoice-red-complete { grid-template-columns: 1fr; }
  .invoice-audit-panel li { grid-template-columns: 1fr; }
  #customerInvoiceView .invoice-table { display: block; min-width: 0; }
  #customerInvoiceView .invoice-table thead { display: none; }
  #customerInvoiceView .invoice-table tbody { display: grid; gap: 8px; }
  #customerInvoiceView .invoice-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; padding: 10px; border: 1px solid #dce5f1; border-radius: 12px; background: #fff; }
  #customerInvoiceView .invoice-table td { display: grid; height: auto; padding: 0; border: 0; }
  #customerInvoiceView .invoice-table td::before { content: attr(data-label); color: #7a879b; font-size: 10px; }
  #customerInvoiceView .invoice-table td:nth-child(2),
  #customerInvoiceView .invoice-table td:nth-child(4) { grid-column: 1 / -1; }
}

/* 订单录入：闲置时只保留摘要条，为待提交区让出垂直空间。 */
#entry > .entry-input-panel .entry-input-summary-bar {
  display: flex;
  position: relative;
  z-index: 4;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
}

#entry .entry-input-summary-copy {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#entry .entry-input-summary-copy strong {
  flex: 0 0 auto;
  color: #243550;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

#entry .entry-input-summary-copy span {
  min-width: 0;
  overflow: hidden;
  color: #75839a;
  font-size: 11px;
  font-weight: 620;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#entry .entry-input-toggle {
  flex: 0 0 auto;
  min-width: 88px;
  min-height: 34px;
  padding: 0 12px;
  border-color: #c9d5e7;
  background: #fff;
  color: #234f9d;
  font-size: 11px;
  font-weight: 720;
}

#entry .entry-input-toggle:hover {
  border-color: #86a5dd;
  background: #f1f6ff;
}

#entry .entry-input-toggle:focus-visible {
  outline: 2px solid rgba(46, 100, 206, .3);
  outline-offset: 2px;
}

#entry > .entry-input-panel:not(.entry-input-collapsed) .entry-input-summary-bar {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f2;
}

#entry .entry-input-body {
  display: block;
  min-width: 0;
}

#entry .entry-input-body[hidden] {
  display: none !important;
}

#entry > .entry-input-panel.entry-input-collapsed {
  min-height: 54px !important;
  padding: 4px 10px !important;
  overflow: hidden !important;
}

#entry .entry-input-body > .archive-select-row {
  display: grid !important;
  grid-template-columns: minmax(210px, 270px) minmax(210px, 270px) minmax(420px, 1fr) !important;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  overflow: visible;
}

#entry .entry-input-body > .archive-select-row > label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: none;
  min-width: 0;
}

#entry .entry-input-body > .archive-select-row .entry-import-inline {
  display: grid !important;
  grid-template-columns: minmax(180px, 1fr) auto auto !important;
  grid-column: auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

#entry.entry-input-collapsed > .entry-result-panel {
  flex: 1 1 0;
  min-height: clamp(360px, calc(100dvh - 190px), 760px);
}

#entry.entry-input-collapsed #parseResult {
  min-height: clamp(280px, calc(100dvh - 300px), 650px);
}

/* Pending entry orders stay visible across dates until explicitly submitted. */
.nav-pending-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: #e9effb;
  color: #315cae;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.nav-pending-badge.overdue {
  background: #ffdfda;
  color: #b52e29;
  box-shadow: 0 0 0 1px rgba(181, 46, 41, .12);
}

#entry .entry-pending-alert {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #efba77;
  border-radius: 10px;
  background: #fff8e9;
  color: #865411;
  box-shadow: 0 5px 14px rgba(139, 92, 23, .07);
}

#entry .entry-pending-alert-icon {
  display: inline-flex;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #dc7b18;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}

#entry .entry-pending-alert > div {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

#entry .entry-pending-alert strong { font-size: 13px; }
#entry .entry-pending-alert div span { color: #9a6b2b; font-size: 11px; }
#entry .entry-pending-alert button { flex: 0 0 auto; border-color: #e2ab63; background: #fff; color: #8d570e; }

#entry .entry-pending-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f1;
  background: #f8faff;
  color: #5e6d82;
  font-size: 11px;
}

#entry .entry-pending-scopes {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d9e1ed;
  border-radius: 8px;
  background: #fff;
}

#entry .entry-pending-scopes button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #617086;
  font-size: 11px;
  font-weight: 700;
}

#entry .entry-pending-scopes button.active {
  background: #315fd2;
  color: #fff;
  box-shadow: 0 2px 6px rgba(49, 95, 210, .2);
}

#entry #entryPendingQuery {
  flex: 1 1 220px;
  min-width: 160px;
  height: 32px;
}

#entry .entry-pending-toolbar > label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

#entry .entry-pending-toolbar input[type="date"] { width: 132px; height: 32px; }
#entry .entry-pending-filter-state { flex: 0 1 auto; min-width: 120px; color: #69788d; }

#orders .order-category-summary {
  align-items: center;
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fffaf0;
}

#orders .order-category-summary > strong { color: #76531b; font-size: 11px; }
#orders .order-category-summary > button { margin-left: auto; min-height: 28px; }

@media (min-width: 981px) {
  body.sidebar-collapsed .nav-pending-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 8px;
  }
}

@media (max-width: 1250px) {
  #entry .entry-pending-toolbar { flex-wrap: wrap; }
  #entry #entryPendingQuery { flex-basis: 280px; }
  #entry .entry-pending-filter-state { flex-basis: 100%; }
}

@media (max-width: 700px) {
  #entry .entry-pending-alert { align-items: flex-start; flex-wrap: wrap; }
  #entry .entry-pending-alert button { margin-left: 34px; }
  #entry .entry-pending-scopes { width: 100%; }
  #entry .entry-pending-scopes button { flex: 1 1 0; padding: 0 5px; }
  #entry #entryPendingQuery { flex-basis: 100%; }
  #entry .entry-pending-toolbar > label { flex: 1 1 150px; }
  #entry .entry-pending-toolbar input[type="date"] { flex: 1 1 auto; min-width: 110px; }
}

@media (max-width: 1180px) {
  #entry .entry-input-body > .archive-select-row {
    grid-template-columns: repeat(2, minmax(210px, 1fr)) !important;
  }

  #entry .entry-input-body > .archive-select-row .entry-import-inline {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  #entry > .entry-input-panel .entry-input-summary-bar {
    gap: 8px;
  }

  #entry .entry-input-summary-copy {
    display: grid;
    gap: 1px;
  }

  #entry .entry-input-summary-copy strong {
    font-size: 11px;
  }

  #entry .entry-input-summary-copy span {
    font-size: 9px;
  }

  #entry .entry-input-toggle {
    min-width: 78px;
    padding: 0 9px;
  }

  #entry .entry-input-body > .archive-select-row,
  #entry .entry-input-body > .archive-select-row .entry-import-inline {
    grid-template-columns: 1fr !important;
  }
}
#entry .entry-license-field-wrap { display:flex; align-items:center; gap:4px; min-width:0; }
#entry .entry-license-field-wrap > .entry-preview-field, #entry .entry-license-field-wrap > .entry-edit-input, #entry .entry-license-field-wrap > .entry-hover-wrap { min-width:0; flex:1 1 auto; }
#entry .entry-license-issue { display:inline-flex; align-items:center; gap:4px; max-width:100%; padding:3px 6px; border:1px solid #f0c47a; border-radius:6px; background:#fff8e9; color:#9a6411; font-size:9px; font-weight:750; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#entry .entry-license-issue > span { display:inline-grid; width:13px; height:13px; flex:0 0 auto; place-items:center; border-radius:50%; background:#e6a331; color:#fff; font-size:9px; font-weight:900; }
#entry .entry-license-issue:not(.compact) { display:flex; width:fit-content; }
#entry .entry-preview-license-note { margin-top:6px; }

/* Railway supplier provenance is a read-only column, independent of company/shop. */
#railwayProducts .railway-table th,
#railwayProducts .railway-table td { text-align: left; overflow: hidden; text-overflow: ellipsis; }
#railwayProducts .railway-table th:first-child,
#railwayProducts .railway-table td:first-child { text-align: center; }
#railwayProducts .railway-table .railway-product-link-cell,
#railwayProducts .railway-table .railway-product-note-cell,
#railwayProducts .railway-table .railway-listing-cell,
#railwayProducts .railway-table .railway-actions { overflow: visible; }
#railwayProducts .railway-source-supplier-cell { color: #50627d; }
#railwayH5CatalogModal .project-invite-dialog { width: min(880px, 100%); }
#railwayH5CatalogModal .project-invite-create { grid-template-columns: minmax(150px, .9fr) minmax(220px, 1.3fr) 120px; }
#railwayH5CatalogModal .project-invite-create > label:first-child { grid-column: 1; }
#railwayH5CatalogModal .project-invite-create > label:has(#railwayH5CatalogDays) { grid-column: 3; grid-row: 1; }
#railwayH5CatalogModal .railway-h5-shop-info { grid-column: 1 / -1; display: flex; flex-direction: row; align-items: center; gap: 7px; color: #334766; }
#railwayH5CatalogModal .railway-h5-shop-info input { width: 16px; height: 16px; margin: 0; flex: 0 0 16px; accent-color: #3859d6; }
#railwayH5CatalogModal .railway-h5-watermark-note { grid-column: 1 / -1; margin: 0; color: #8c6740; font-size: 12px; line-height: 1.5; }
#railwayH5CatalogModal .railway-h5-target-field { display: grid; gap: 6px; align-self: start; }
#railwayH5CatalogModal .railway-h5-target-selected { color: #167454; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#railwayH5CatalogModal .railway-h5-target-error { color: #bc3434; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
#railwayH5CatalogModal .product-catalog-customer-results button:focus-visible { outline: 2px solid #3859d6; outline-offset: -2px; background: #edf3ff; }
#railwayH5CatalogModal .railway-h5-list-head { flex-wrap: wrap; }
#railwayH5CatalogModal .railway-h5-list-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#railwayH5CatalogModal .railway-h5-filters { display: flex; gap: 5px; flex-wrap: wrap; }
#railwayH5CatalogModal .railway-h5-filters button { min-height: 34px; padding: 6px 9px; font-size: 12px; }
#railwayH5CatalogModal .railway-h5-filters button.active { color: #fff; background: #3859d6; border-color: #3859d6; box-shadow: 0 2px 6px rgba(56, 89, 214, .18); }
#railwayH5CatalogModal .project-invite-row > div:first-child { min-width: 0; }
#railwayH5CatalogModal .project-invite-row strong { overflow-wrap: anywhere; }
#railwayH5CatalogModal .project-invite-link { min-width: 0; overflow-wrap: anywhere; }
#railwayH5CatalogModal .railway-h5-pricing { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#railwayH5CatalogModal .railway-h5-pricing label { display: grid; gap: 6px; min-width: 0; color: #66738a; font-size: 12px; }
#railwayH5CatalogModal .railway-h5-pricing select { width: 100%; min-width: 0; }
#railwayH5CatalogModal .railway-h5-pricing small { grid-column: 1 / -1; color: #41628c; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#railwayH5CatalogModal .railway-h5-pricing-editor { display: grid; gap: 12px; margin: 12px 0; padding: 14px; border: 1px solid #c9d9f5; border-radius: 10px; background: #f5f8ff; }
#railwayH5CatalogModal .railway-h5-pricing-editor > strong { overflow-wrap: anywhere; }
#railwayH5CatalogModal .railway-h5-pricing-editor > p { margin: 0; color: #66738a; font-size: 12px; line-height: 1.5; }
#railwayH5CatalogModal .railway-h5-pricing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
#railwayH5CatalogModal .project-invite-row > div:last-child { flex-wrap: wrap; }
@media (max-width: 760px) {
  #railwayH5CatalogModal .project-invite-create { grid-template-columns: minmax(0, 1fr); }
  #railwayH5CatalogModal .project-invite-create > label:has(#railwayH5CatalogDays) { grid-column: 1; grid-row: auto; }
  #railwayH5CatalogModal .railway-h5-list-tools { align-items: stretch; }
  #railwayH5CatalogModal .railway-h5-filters { flex: 1 1 100%; }
  #railwayH5CatalogModal .railway-h5-filters button { flex: 1 1 auto; }
  #railwayH5CatalogModal .railway-h5-pricing { grid-template-columns: minmax(0, 1fr); }
}

/* Keep module labels stationary when an administrative reminder appears. */
.side .nav { position: relative; }
.side .nav > :is(.nav-pending-badge, .railway-pass-nav-badge, .notification-unread-badge) {
  position: absolute;
  inset: auto 12px auto auto;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff0ef;
  color: #dc2626;
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.side .nav > :is(.nav-pending-badge, .railway-pass-nav-badge, .notification-unread-badge):is(.hidden, [hidden]) { display: none; }
.side .nav > [role="button"]:focus-visible { outline: 2px solid #315fd2; outline-offset: 2px; }
.registration-pending-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px;
  border-radius: 999px; color: #dc2626; background: #fff0ef;
  font-size: 12px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums;
}
.registration-pending-count.hidden { display: none; }
@media (min-width: 981px) {
  body.sidebar-collapsed .side .nav > :is(.nav-pending-badge, .railway-pass-nav-badge, .notification-unread-badge) {
    top: 3px; right: 4px; transform: none; min-width: 17px; height: 17px; padding: 0 4px; font-size: 8px;
  }
}
@media (max-width: 980px) {
  .side .nav > :is(.nav-pending-badge, .railway-pass-nav-badge, .notification-unread-badge) {
    top: 3px; right: 4px; transform: none; min-width: 17px; height: 17px; padding: 0 4px; font-size: 8px;
  }
}

/* Customer correction is a management-only native top-layer dialog. */
.customer-correction-dialog { width: min(760px, calc(100vw - 32px)); max-height: min(90vh, 980px); padding: 0; border: 1px solid #d8e3f3; border-radius: 18px; color: #243751; background: #fff; box-shadow: 0 22px 80px #172e4b38; }
.customer-correction-dialog[open] { display: flex; flex-direction: column; }
.customer-correction-dialog::backdrop { background: #10203975; }
.customer-correction-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid #e2eaf5; }
.customer-correction-heading h2 { margin: 0 0 6px; font-size: 21px; }
.customer-correction-heading p { margin: 0; color: #7586a1; font-size: 13px; }
.customer-correction-content { padding: 18px 22px; overflow-y: auto; min-height: 140px; }
.customer-correction-identity { display: grid; gap: 6px; padding: 12px 14px; background: #f4f7fd; border-radius: 10px; margin-bottom: 16px; overflow-wrap: anywhere; }
.customer-correction-identity span, .customer-correction-identity small { color: #687d9a; }
.customer-correction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.customer-correction-grid label, .customer-correction-field { display: flex; flex-direction: column; gap: 7px; font-size: 14px; margin-bottom: 12px; }
.customer-correction-grid label[hidden] { display: none; }
.customer-correction-dialog input, .customer-correction-dialog select, .customer-correction-dialog textarea { box-sizing: border-box; width: 100%; min-width: 0; border: 1px solid #cedcf0; border-radius: 8px; padding: 9px 11px; font: inherit; background: white; }
.customer-correction-dialog :disabled { cursor: not-allowed; opacity: .6; }
.customer-correction-hint { background: #eef5ff; color: #42628c; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; }
.customer-correction-restrictions { color: #9a6a2a; font-size: 12px; line-height: 1.5; }
.customer-correction-restrictions:empty { display: none; }
.customer-correction-records, .customer-correction-history { margin-top: 14px; padding: 10px 12px; border: 1px solid #e0e8f3; border-radius: 8px; font-size: 13px; }
.customer-correction-dialog summary { cursor: pointer; color: #476990; font-weight: 600; }
.customer-correction-records p { display: flex; justify-content: space-between; gap: 12px; }
.customer-correction-history article { padding: 10px 0; border-bottom: 1px solid #e9eef5; }
.customer-correction-history small { display: block; color: #7586a1; margin-top: 5px; }
.customer-correction-history p { margin-bottom: 0; overflow-wrap: anywhere; }
.customer-correction-merge { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; font-size: 13px; color: #687d9a; }
.customer-correction-footer { border-top: 1px solid #e2eaf5; padding: 14px 22px; background: #fafcff; }
.customer-correction-footer p { margin: 0 0 10px; font-size: 13px; color: #476990; overflow-wrap: anywhere; }
.customer-correction-footer p:empty { display: none; }
.customer-correction-footer .is-error { color: #bc3d37; }
.customer-correction-footer > div { display: flex; justify-content: flex-end; gap: 10px; }
#archiveMergePreview .archive-merge-preview-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.archive-merge-preview-summary small { color: #73839d; font-size: 12px; }
@media (max-width: 760px) {
  .customer-correction-grid { grid-template-columns: 1fr; }
  .customer-correction-heading, .customer-correction-content, .customer-correction-footer { padding: 14px; }
  .customer-correction-merge { align-items: flex-start; flex-direction: column; }
  #archiveMergePreview .archive-merge-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Native top layer keeps merge confirmation above the fixed admin sidebar. */
#archiveMergeModal { box-sizing: border-box; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; border: 0; color: inherit; background: transparent; backdrop-filter: none; }
#archiveMergeModal::backdrop { background: rgba(19, 29, 44, .56); backdrop-filter: blur(2px); }

/* Authorization workspace: bounded content scrolling and stable local footer. */
#authorizations.active { display:flex; flex-direction:column; height:100%; min-height:0; padding-bottom:8px; overflow:hidden; gap:0; }
#authorizations > .authorization-topbar,
#authorizations > .authorization-records-controls,
#authorizations > .authorization-alert { flex:0 0 auto; }
#authorizations .authorization-topbar { grid-template-columns:minmax(170px,.7fr) minmax(0,2fr); gap:12px; }
#authorizations .authorization-top-actions { min-width:0; gap:8px; justify-content:flex-end; }
#authorizations .authorization-metrics { flex:1; min-width:0; grid-template-columns:repeat(8,minmax(62px,1fr)); gap:6px; }
#authorizations .authorization-metric { min-width:0; min-height:68px; padding:8px 7px 8px 11px; }
#authorizations .authorization-metric span { white-space:normal; font-size:10px; }
#authorizations .authorization-metric.not_started::before { background:#5279b2; }
#authorizations .authorization-workflow-tabs small { margin-left:4px; font-size:10px; font-weight:500; }
#authorizations .authorization-list-panel,
#authorizations .authorization-applications-panel { display:flex; flex-direction:column; flex:1 1 0; min-height:0; min-width:0; margin-bottom:0; overflow:hidden; }
#authorizations .authorization-list-panel.hidden,
#authorizations .authorization-applications-panel.hidden { display:none; }
#authorizations .authorization-toolbar,
#authorizations .authorization-applications-toolbar { flex:0 0 auto; }
#authorizations .authorization-applications-toolbar { grid-template-columns:minmax(180px,1fr) minmax(220px,1fr) 150px auto; gap:10px; }
#authorizations .authorization-table-wrap,
#authorizations .authorization-customer-view,
#authorizations .authorization-application-list { flex:1 1 0; min-height:0; max-height:none; overflow:auto; align-content:start; }
#authorizations .authorization-application-list { display:grid; grid-template-columns:minmax(0,1fr); grid-auto-rows:max-content; }
#authorizations .authorization-application-list > * { flex:0 0 auto; }
#authorizations .authorization-applications-panel { padding-bottom:0; }
#authorizations .authorization-table-wrap.hidden,
#authorizations .authorization-customer-view.hidden { display:none; }
#authorizations .authorization-pager { flex:0 0 auto; min-height:48px; margin:0; padding:8px 12px; border-top:1px solid #e1e7f0; background:#fff; justify-content:flex-end; }
#authorizations .authorization-pager:empty { display:none; }
#authorizations .authorization-application-card { min-width:0; overflow:hidden; padding:13px; }
#authorizations .authorization-application-head { align-items:flex-start; }
#authorizations .authorization-application-head > .authorization-application-parties { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 18px; }
#authorizations .authorization-application-parties > strong,
#authorizations .authorization-application-parties > .authorization-application-submitter { min-width:0; max-width:100%; overflow-wrap:anywhere; }
#authorizations .authorization-application-parties > time { color:#8794a9; font-size:12px; }
#authorizations .authorization-application-head > em { flex:none; }
#authorizations .authorization-application-content { display:grid; grid-template-columns:minmax(0,1fr) minmax(280px,1.1fr); gap:12px; margin-top:12px; }
#authorizations .authorization-application-grid { grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; margin:0; padding:11px; gap:10px; align-content:center; }
#authorizations .authorization-application-grid > span { min-width:0; white-space:normal; flex-wrap:wrap; overflow-wrap:anywhere; }
#authorizations .authorization-application-grid > span:nth-child(4) { grid-column:1 / -1; }
#authorizations .authorization-estimated-hint { color:#8691a4; font-size:11px; font-style:normal; }
#authorizations .authorization-application-documents { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:12px; min-width:0; padding:11px; border-radius:10px; background:#f8f9fc; }
#authorizations .authorization-application-files { display:grid; gap:9px; min-width:0; }
#authorizations .authorization-application-file-row { grid-template-columns:72px minmax(0,1fr); align-items:center!important; gap:7px; min-width:0; }
#authorizations .authorization-application-actions { display:flex; flex-direction:column; align-items:stretch; justify-content:center; gap:8px; margin:0; max-width:180px; }
#authorizations .authorization-application-actions > button { white-space:normal; height:auto; min-height:34px; padding:7px 10px; font-size:12px; }
#authorizations .authorization-file-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; min-width:0; }
#authorizations .authorization-attachment-link { display:block; width:100%; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; }
#authorizations .authorization-submitter-group { display:flex; align-items:baseline; flex-wrap:wrap; gap:10px; margin-top:2px; color:#28436a; }
#authorizations .authorization-submitter-group > span { color:#8794a9; font-size:11px; }
#authorizations .authorization-actual-dates { flex:1 1 240px; font-size:12px; }
.authorization-status.not_started { color:#476c9e; background:#edf3fb; }
#authorizations .authorization-actual-period { line-height:1.5; }
#authorizations .authorization-inline-date { display:grid; gap:3px; color:#738097; font-size:10px; }
#authorizations .authorization-inline-date + .authorization-inline-date { margin-top:5px; }
.authorization-stamped-popover { max-height:calc(100dvh - 20px); overflow-y:auto; }
.authorization-stamped-popover > span:not([data-action-error]) { color:#7b879b; font-size:12px; }
@media(max-width:1360px) {
  #authorizations .authorization-topbar { grid-template-columns:minmax(0,1fr); gap:8px; }
  #authorizations .authorization-heading p { margin:3px 0 0; }
  #authorizations .authorization-top-actions { width:100%; min-width:0; flex-wrap:nowrap; justify-content:stretch; }
  #authorizations .authorization-metrics { grid-template-columns:repeat(8,minmax(0,1fr)); }
  #authorizations .authorization-metric strong { max-width:100%; font-size:clamp(15px,1.6vw,22px); overflow-wrap:anywhere; }
  #authorizations .authorization-top-actions > button { flex:0 0 auto; }
}
@media(max-width:1180px) {
  #authorizations .authorization-topbar { grid-template-columns:1fr; gap:8px; }
  #authorizations .authorization-heading p { margin:3px 0 0; }
  #authorizations .authorization-top-actions { justify-content:stretch; }
  #authorizations .authorization-applications-toolbar { grid-template-columns:minmax(0,1fr) 150px auto; }
  #authorizations .authorization-applications-toolbar > div { grid-column:1 / -1; }
  #authorizations .authorization-application-content { grid-template-columns:1fr; }
}
@media(max-width:760px) {
  #authorizations.active { height:100%; padding-bottom:8px; }
  #authorizations .authorization-top-actions { flex-wrap:wrap; }
  #authorizations .authorization-metrics { flex-basis:100%; grid-template-columns:repeat(4,minmax(0,1fr)); }
  #authorizations .authorization-applications-toolbar { grid-template-columns:minmax(0,1fr) auto; }
  #authorizations .authorization-applications-toolbar > label:first-of-type { grid-column:1 / -1; }
  #authorizations .authorization-application-documents { grid-template-columns:minmax(0,1fr) auto; gap:7px; padding:8px; }
  #authorizations .authorization-application-actions { max-width:104px; }
  #authorizations .authorization-application-grid { grid-template-columns:1fr; }
  #authorizations .authorization-application-grid > span:nth-child(4) { grid-column:auto; }
  #authorizations .authorization-applications-panel { padding:10px 10px 0; }
}

/* Compact authorization workflow. All selectors are local to authorization views. */
#authorizations .authorization-compact-row {
  position:relative; display:grid; grid-template-columns:64px minmax(36px,.45fr) minmax(56px,.65fr) 40px minmax(115px,1.5fr) minmax(92px,1fr) minmax(104px,1.1fr) minmax(96px,1fr) minmax(174px,1.75fr);
  align-items:center; gap:8px; min-height:124px; padding:12px; overflow:hidden;
}
#authorizations .authorization-compact-row .authorization-row-field { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:5px; min-width:0; min-height:80px; border-left:1px solid #e4eaf4; padding-left:8px; overflow-wrap:anywhere; font-size:12px; }
#authorizations .authorization-row-field > small,#authorizations .authorization-document-box > small { color:#8492a8; font-size:10px; }
#authorizations .authorization-row-field > strong { font-size:12px; line-height:1.5; }
#authorizations .authorization-row-company > strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
#authorizations .authorization-row-company > :is(.authorization-row-submitter,time,.authorization-row-note) { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; color:#8a96ab; }
#authorizations .authorization-row-contact > span { max-width:100%; line-height:1.5; }
#authorizations .authorization-document-box { display:flex; flex-direction:column; align-items:center; gap:4px; min-width:0; }
#authorizations .authorization-document-frame-wrap { position:relative; width:100%; display:flex; align-items:center; gap:3px; }
#authorizations .authorization-document-frame { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:0; height:62px; min-height:62px; padding:4px; border:1px solid #d3deef; border-radius:5px; background:#fff; color:#4a6ac7; font-size:9px; line-height:1.15; box-shadow:none; }
#authorizations .authorization-document-frame.is-empty { width:100%; border-style:dashed; color:#7b8fae; }
#authorizations .authorization-document-frame.is-empty b { font-size:23px; line-height:1; }
#authorizations .authorization-document-icon { display:grid; place-items:center; width:26px; height:30px; border:1px solid #a9bce9; border-radius:3px; color:#3861c4; background:#f4f7ff; font-size:10px; font-weight:800; }
#authorizations .authorization-document-remove { position:absolute; top:-6px; right:12px; z-index:2; width:18px; min-width:18px; height:18px; min-height:18px; display:grid; place-items:center; padding:0; border:1px solid #d5dfee; border-radius:50%; background:#f6f8fc; color:#6c7c92; font-size:14px; line-height:1; }
#authorizations .authorization-document-download { flex:0 0 16px; width:16px; min-width:16px; height:24px; min-height:24px; padding:0; border:0; color:#365fdf; background:transparent; font-size:21px; box-shadow:none; }
#authorizations .authorization-document-replace { min-height:20px; height:auto; padding:0; border:0; background:transparent; box-shadow:none; color:#4265ca; font-size:9px; }
#authorizations .authorization-compact-row .authorization-application-files { width:100%; gap:9px; }
#authorizations .authorization-compact-row .authorization-application-file-row { display:block!important; min-width:0; }
#authorizations .authorization-compact-row .authorization-application-file-row > b { display:none; }
#authorizations .authorization-compact-row .authorization-application-file-row > span { display:block; }
#authorizations .authorization-compact-row .authorization-file-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px; width:100%; }
#authorizations .authorization-compact-row .authorization-attachment-link { font-size:11px; }
#authorizations .authorization-compact-row .authorization-attachment-download { font-size:9px; min-height:21px; height:21px; padding:0 3px; }
#authorizations .authorization-row-period > em { font-style:normal; color:#8692a6; font-size:10px; }
#authorizations .authorization-row-period .authorization-period-countdown { color:#2d698c; font-size:12px; font-variant-numeric:tabular-nums; }
#authorizations .authorization-row-period .authorization-period-countdown.is-urgent { color:#ce4d44; }
#authorizations .authorization-compact-row > .authorization-application-actions { display:flex; flex-direction:row; align-items:center; justify-content:stretch; gap:6px; min-width:0; max-width:none; margin:0; }
#authorizations .authorization-controls-stack { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; flex:1; min-width:0; }
#authorizations .authorization-progress-control { display:flex; align-items:stretch; min-width:0; }
#authorizations .authorization-progress-control > .authorization-progress-button { width:100%; min-width:0; min-height:32px; height:auto; padding:6px; font-size:11px; line-height:1.3; white-space:normal; }
#authorizations .authorization-progress-control > .authorization-progress-correct { flex:0 0 20px; width:20px; min-width:20px; min-height:32px; height:auto; padding:0; border-radius:0 5px 5px 0; border:1px solid #d7e1f4; background:#eff4ff; color:#4766bc; box-shadow:none; }
#authorizations .authorization-progress-control:has(> .authorization-progress-correct) > .authorization-progress-button { border-radius:5px 0 0 5px; }
#authorizations .authorization-controls-stack > .authorization-result-button { width:100%; min-width:0; min-height:32px; height:auto; padding:6px; font-size:11px; line-height:1.3; white-space:normal; }
#authorizations .authorization-compact-row .authorization-void-button { flex:0 0 38px; width:38px; min-width:38px; height:32px; min-height:32px; padding:3px; font-size:11px; }
#authorizations .authorization-row-issuer { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#71819a; font-size:10px; }
#authorizations .authorization-table th:nth-child(11) { width:84px; }
#authorizations .authorization-table td.authorization-actions { display:table-cell; min-width:74px; white-space:nowrap; }
#authorizations .authorization-customer-record { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; padding-right:10px; border-bottom:1px solid #eef1f6; }
#authorizations .authorization-customer-record-main { display:grid; grid-template-columns:80px minmax(160px,1fr) 130px 100px 110px; align-items:center; gap:8px; min-height:52px; min-width:0; padding:7px 12px; border:0; border-radius:0; background:#fff; color:#293247; text-align:left; }
#authorizations .authorization-customer-record-main > span { min-width:0; }
#authorizations .authorization-customer-issuer { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#7b8799; font-size:10px; }
#authorizations .authorization-issuer-picker,#authorizationModal .authorization-issuer-picker,body:not(.customer-portal) .authorization-action-popover .authorization-issuer-picker { display:grid; min-width:0; gap:4px; }
#authorizations .authorization-issuer-picker > small,#authorizationModal .authorization-issuer-picker > small,body:not(.customer-portal) .authorization-action-popover .authorization-issuer-picker > small { color:#8795a8; font-size:10px; font-weight:400; line-height:1.4; white-space:normal; }
body:not(.customer-portal) .authorization-issuer-results,body:not(.customer-portal) .authorization-operation-menu { position:fixed; z-index:1801; display:grid; gap:3px; max-width:calc(100vw - 20px); max-height:min(300px,calc(100vh - 20px)); overflow:auto; box-sizing:border-box; padding:6px; border:1px solid #ccd9ec; border-radius:10px; background:#fff; color:#304966; box-shadow:0 12px 36px #1a2f4b2b; }
body:not(.customer-portal) .authorization-issuer-results.hidden { display:none!important; }
body:not(.customer-portal) .authorization-operation-menu { width:130px; }
body:not(.customer-portal) .authorization-issuer-results > button,body:not(.customer-portal) .authorization-operation-menu > button { display:block; width:100%; min-width:0; min-height:34px; padding:7px 10px; border:0; border-radius:5px; background:#fff; color:#304966; font-size:12px; line-height:1.5; text-align:left; white-space:normal; overflow-wrap:anywhere; cursor:pointer; }
body:not(.customer-portal) .authorization-issuer-results > button:is(:hover,:focus-visible,.active),body:not(.customer-portal) .authorization-operation-menu > button:is(:hover,:focus-visible) { background:#edf3ff; outline:2px solid transparent; }
body:not(.customer-portal) .authorization-operation-menu > button.is-danger { color:#ba3c3c; }
body:not(.customer-portal) .authorization-issuer-results > small { padding:4px 8px; color:#8290a4; font-size:11px; }
#authorizations .authorization-void-detail { grid-column:1/-1; padding:5px 120px 0 0; color:#9a5555; font-size:11px; border-top:1px solid #f4dddd; }
.authorization-void-stamp { display:inline-block; border:2px solid #cf4e4e; padding:2px 9px; color:#cf4e4e; border-radius:3px; font-size:16px; font-weight:800; line-height:1.3; transform:rotate(-12deg); opacity:.88; pointer-events:none; white-space:nowrap; }
#authorizations .authorization-void-detail > .authorization-void-stamp { position:absolute; right:22px; top:46%; transform:translateY(-50%) rotate(-12deg); font-size:23px; padding:5px 12px; }
#authorizations .authorization-compact-row.is-voided { background:#fffafa; border-color:#efdddd; }
#authorizations .authorization-compact-row.is-voided > .authorization-application-actions { justify-content:flex-end; padding-bottom:55px; }
.authorization-status.voided { color:#bb4848; background:#fff0ef; }
#authorizations .authorization-metric.voided::before { background:#c44c4c; }
#authorizations .authorization-row.voided .authorization-void-stamp { margin:6px 0; font-size:14px; }
#authorizations .authorization-customer-rows .authorization-void-stamp { font-size:12px; padding:2px 6px; }
.authorization-choice-popover select { width:100%; min-height:38px; border:1px solid #d5deeb; border-radius:6px; padding:6px; background:#fff; color:#314967; }
@media(max-width:1150px) {
  #authorizations .authorization-compact-row { grid-template-columns:64px minmax(70px,.7fr) minmax(80px,1fr) 44px minmax(160px,1.8fr); gap:10px; }
  #authorizations .authorization-document-box { grid-column:1; grid-row:1/3; }
  #authorizations .authorization-row-brand { grid-column:2; }
  #authorizations .authorization-row-project { grid-column:3; }
  #authorizations .authorization-row-level { grid-column:4; }
  #authorizations .authorization-row-company { grid-column:5; }
  #authorizations .authorization-row-contact { grid-column:2; }
  #authorizations .authorization-row-attachments { grid-column:3; }
  #authorizations .authorization-row-period { grid-column:4; }
  #authorizations .authorization-compact-row > .authorization-application-actions { grid-column:5; }
}
@media(max-width:760px) {
  #authorizations .authorization-compact-row { grid-template-columns:64px minmax(0,1fr) minmax(0,1fr); gap:9px; }
  #authorizations .authorization-document-box { grid-column:1; grid-row:1/4; }
  #authorizations .authorization-row-brand { grid-column:2; }
  #authorizations .authorization-row-project { grid-column:3; }
  #authorizations .authorization-row-level { grid-column:2; }
  #authorizations .authorization-row-company { grid-column:2/-1; }
  #authorizations .authorization-row-contact { grid-column:1/-1; }
  #authorizations .authorization-row-attachments { grid-column:1/3; }
  #authorizations .authorization-row-period { grid-column:3; }
  #authorizations .authorization-compact-row > .authorization-application-actions { grid-column:1/-1; }
  #authorizations .authorization-compact-row .authorization-row-field { min-height:0; }
}
#authorizations .authorization-metrics { grid-template-columns:repeat(9,minmax(0,1fr)); }
@media(max-width:1600px) and (min-width:761px) {
  #authorizations > .authorization-topbar { display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:8px; align-items:start; }
  #authorizations > .authorization-topbar .authorization-top-actions { display:flex; width:100%; flex-wrap:nowrap; }
  #authorizations .authorization-metrics { grid-template-columns:repeat(9,minmax(0,1fr)); }
}
@media(max-width:760px) { #authorizations .authorization-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); } }

/* Admin authorization layouts follow the space remaining beside the sidebar. */
#authorizations #authorizationApplicationsList { container-type:inline-size; container-name:authorization-applications; }
#authorizations .authorization-compact-row {
  grid-template-columns:64px minmax(40px,.45fr) minmax(70px,.7fr) 40px minmax(145px,1.4fr) 106px minmax(180px,1.55fr) 110px max-content;
}
#authorizations .authorization-compact-row > :is(.authorization-document-box,.authorization-row-field,.authorization-application-actions) { grid-column:auto; grid-row:auto; }
#authorizations .authorization-compact-row > .authorization-application-actions { justify-content:flex-start; align-items:center; justify-self:start; max-width:240px; }
#authorizations .authorization-controls-stack { flex:0 1 auto; width:max-content; max-width:190px; grid-template-columns:max-content; justify-items:start; }
#authorizations .authorization-progress-control { width:max-content; max-width:100%; }
#authorizations .authorization-progress-control > .authorization-progress-button,
#authorizations .authorization-controls-stack > .authorization-result-button { width:auto; max-width:100%; justify-self:start; padding:6px 10px; }
#authorizations .authorization-compact-row .authorization-attachment-link,
#authorizations .authorization-compact-row .authorization-file-label,
#authorizations .authorization-compact-row .authorization-application-file-row summary { display:flex; align-items:center; gap:2px; min-width:0; width:100%; overflow:hidden; text-overflow:clip; white-space:nowrap; }
#authorizations .authorization-file-kind,#authorizations .authorization-file-suffix,#authorizations .authorization-file-extra { flex:none; }
#authorizations .authorization-file-name { display:flex; flex:1 1 auto; min-width:0; overflow:hidden; }
#authorizations .authorization-file-stem { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#authorizations .authorization-file-suffix { white-space:nowrap; }
#authorizations .authorization-compact-row .authorization-application-file-row details { min-width:0; width:100%; }
#authorizations .authorization-compact-row .authorization-application-file-row summary { cursor:pointer; list-style:none; font-size:11px; }
#authorizations .authorization-compact-row .authorization-application-file-row summary::-webkit-details-marker { display:none; }
#authorizations .authorization-application-file-list { display:grid; gap:5px; padding-top:5px; min-width:0; }
#authorizations .authorization-compact-row .authorization-application-file-row em { display:block; color:#8794a8; font-size:11px; font-style:normal; }
@container authorization-applications (max-width:1099px) {
  #authorizations .authorization-compact-row { grid-template-columns:64px 106px minmax(140px,1fr) 40px 110px minmax(175px,1fr); gap:8px; }
  #authorizations .authorization-compact-row > .authorization-document-box { grid-column:1; grid-row:1/3; }
  #authorizations .authorization-compact-row > .authorization-row-brand { grid-column:2; grid-row:1; }
  #authorizations .authorization-compact-row > .authorization-row-project { grid-column:3/5; grid-row:1; }
  #authorizations .authorization-compact-row > .authorization-row-level { grid-column:5; grid-row:1; justify-self:end; border-left:0; padding-right:6px; }
  #authorizations .authorization-compact-row > .authorization-row-company { grid-column:6; grid-row:1; }
  #authorizations .authorization-compact-row > .authorization-row-contact { grid-column:2; grid-row:2; }
  #authorizations .authorization-compact-row > .authorization-row-attachments { grid-column:3/5; grid-row:2; }
  #authorizations .authorization-compact-row > .authorization-row-period { grid-column:5; grid-row:2; }
  #authorizations .authorization-compact-row > .authorization-application-actions { grid-column:6; grid-row:2; }
}
@container authorization-applications (max-width:839px) {
  #authorizations .authorization-compact-row { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  #authorizations .authorization-compact-row > .authorization-document-box { grid-column:1; grid-row:1; width:64px; justify-self:start; }
  #authorizations .authorization-compact-row > .authorization-row-brand { grid-column:2; grid-row:1; }
  #authorizations .authorization-compact-row > .authorization-row-project { grid-column:1; grid-row:2; }
  #authorizations .authorization-compact-row > .authorization-row-level { grid-column:2; grid-row:2; justify-self:stretch; border-left:1px solid #e4eaf4; padding-right:0; }
  #authorizations .authorization-compact-row > .authorization-row-company { grid-column:1/-1; grid-row:3; }
  #authorizations .authorization-compact-row > .authorization-row-contact { grid-column:1; grid-row:4; }
  #authorizations .authorization-compact-row > .authorization-row-attachments { grid-column:2; grid-row:4; }
  #authorizations .authorization-compact-row > .authorization-row-period { grid-column:1; grid-row:5; }
  #authorizations .authorization-compact-row > .authorization-application-actions { grid-column:2; grid-row:5; flex-wrap:wrap; }
  #authorizations .authorization-compact-row .authorization-row-field { min-height:0; }
}
@container authorization-applications (max-width:479px) {
  #authorizations .authorization-compact-row > .authorization-row-attachments { grid-column:1/-1; grid-row:5; }
  #authorizations .authorization-compact-row > .authorization-row-period { grid-column:1; grid-row:6; }
  #authorizations .authorization-compact-row > .authorization-application-actions { grid-column:1/-1; grid-row:7; }
}

#authorizations #authorizationListView { container-type:inline-size; container-name:authorization-records; min-width:0; }
#authorizations .authorization-table { --authorization-fixed-width:664px; --authorization-period-width:104px; --authorization-level-width:54px; width:100%; min-width:0; max-width:none; table-layout:fixed; }
#authorizations .authorization-table:has(.authorization-inline-row) { --authorization-fixed-width:706px; --authorization-period-width:128px; --authorization-level-width:72px; }
#authorizations .authorization-table th { width:auto!important; height:auto; padding:8px 6px; white-space:normal; line-height:1.35; }
#authorizations .authorization-table td { min-width:0; padding:8px 6px; white-space:normal; overflow-wrap:anywhere; vertical-align:middle; }
#authorizations .authorization-table col.authorization-col-document { width:56px; }
#authorizations .authorization-table col.authorization-col-number { width:128px; }
#authorizations .authorization-table col.authorization-col-brand { width:54px; }
#authorizations .authorization-table col.authorization-col-level { width:var(--authorization-level-width); }
#authorizations .authorization-table col.authorization-col-period { width:var(--authorization-period-width); }
#authorizations .authorization-table col.authorization-col-status,
#authorizations .authorization-table col.authorization-col-created { width:96px; }
#authorizations .authorization-table col.authorization-col-actions { width:76px; }
#authorizations .authorization-table col.authorization-col-project { width:calc((100% - var(--authorization-fixed-width)) * .25); }
#authorizations .authorization-table col.authorization-col-customer,
#authorizations .authorization-table col.authorization-col-issuer { width:calc((100% - var(--authorization-fixed-width)) * .375); }
#authorizations .authorization-table td:first-child,#authorizations .authorization-table td:last-child { position:static; left:auto; right:auto; z-index:auto; box-shadow:none; }
#authorizations .authorization-table th:first-child,#authorizations .authorization-table th:last-child { position:sticky; top:0; left:auto; right:auto; box-shadow:none; }
#authorizations .authorization-table td.clip { max-width:none; overflow:visible; white-space:normal; }
#authorizations .authorization-table .authorization-cell-text,
#authorizations .authorization-table .authorization-customer-name,
#authorizations .authorization-table .authorization-document-locked { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; min-width:0; overflow:hidden; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
#authorizations .authorization-table .authorization-customer-relation { display:flex; align-items:center; min-width:0; }
#authorizations .authorization-table .authorization-customer-name { flex:1; }
#authorizations .authorization-table .authorization-created-at > span { display:block; white-space:nowrap; line-height:1.5; }
#authorizations .authorization-table .authorization-status { max-width:100%; white-space:normal; line-height:1.4; }
#authorizations .authorization-table td .authorization-status-detail { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; max-width:100%; max-height:2.8em; overflow:hidden; overflow-wrap:anywhere; white-space:normal; line-height:1.4; }
#authorizations .authorization-table .authorization-document-button { max-width:100%; }
#authorizations .authorization-table .authorization-inline-row .authorization-customer-picker { min-width:0; width:100%; }
#authorizations .authorization-table .authorization-inline-row .authorization-inline-actions { display:table-cell; min-width:0; white-space:normal; }
#authorizations .authorization-table .authorization-inline-actions > button { display:block; width:100%; min-width:0; padding:6px 4px; }
#authorizations .authorization-table .authorization-inline-actions > button + button { margin-top:5px; }
#authorizations .authorization-table .authorization-inline-actions > span { display:block; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
#authorizations #authorizationPager { flex-wrap:wrap; height:auto; }
@container authorization-records (max-width:959px) {
  #authorizations .authorization-table { width:960px; min-width:960px; }
}

/* Keep clear + price direction together at every catalog viewport width. */
#railwayProducts .railway-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
#railwayProducts #railwayKeyword { flex:1 1 240px; width:auto; min-width:180px; }
#railwayProducts .railway-price-sort-actions { display:inline-flex; flex:0 0 auto; align-items:center; gap:8px; }
#railwayProducts .railway-price-sort-actions > button,
#railwayProducts #railwaySearchBtn { height:40px; margin:0; white-space:nowrap; }
#railwayProducts .railway-price-sort-button { min-width:116px; }
#railwayProducts .railway-price-sort-button.active { color:#1768ae; border-color:#83b6e4; background:#edf5ff; }
@media (max-width:760px) {
  #railwayProducts #railwayKeyword { flex:1 1 100%; min-width:0; width:100%; }
  #railwayProducts .railway-price-range { flex:1 1 100%; }
  #railwayProducts .railway-price-sort-actions { gap:6px; }
  #railwayProducts .railway-price-sort-actions > button,
  #railwayProducts #railwaySearchBtn { padding:0 10px; font-size:13px; height:44px; }
  #railwayProducts .railway-price-sort-button { min-width:108px; }
  #railwayProducts .railway-view-switch,
  #railwayProducts .railway-column-picker { flex:1 1 100%; }
}


.funds-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid #dbe3f0;
  border-radius: 8px;
  background: #eef2f8;
}

/* Reconciliation section color map: quiet backgrounds, strong edge recognition. */
#fundsStatementPanel .statement-filter-bar { border: 1px solid #dfc58f; background: #fffdf7; }
#fundsStatementPanel .statement-company-workspace { border: 1px solid #cfc7ec; background: #fbfaff; }
#fundsStatementPanel .statement-company-head strong { color: #55499d; }
.statement-history-details summary { color: #5e52aa; border-color: #cec7ec; background: #f7f5ff; }
#fundsStatementResult .statement-workflow { border: 1px solid #aebfea; background: #f5f8ff; }
#fundsStatementResult .statement-workflow.done { border-color: #a9d8c4; background: #f2faf6; }
#fundsStatementResult .statement-workflow.disputed { border-color: #ecc39f; background: #fff8f2; }
#fundsStatementResult .statement-overview-bar { border: 1px solid #acd2dd; background: #f8fdff; }
#fundsStatementResult .statement-overview-bar .statement-sheet-head h2 { color: #176b82; }
#fundsStatementResult .statement-exception-banner { border-left-width: 1px; }
#fundsStatementResult .statement-payments-panel { border: 1px solid #acd9cd; background: #fbfffd; }
#fundsStatementResult .statement-payments-panel .statement-section-title { color: #176e5d; background: #f2faf7; }
.statement-section-title > .statement-section-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; white-space: nowrap; }
.statement-section-title > .statement-section-actions button { width: auto; flex: 0 0 auto; }
.statement-clear-status { border: 1px solid #9fd2bb; border-radius: 6px; color: #16784c; background: #eaf7f0; font-weight: 700; opacity: 1 !important; }
.statement-issue-status { border: 1px solid #f1bd8e; border-radius: 6px; color: #b45309; background: #fff4e8; font-weight: 700; opacity: 1 !important; }
#fundsStatementResult .statement-payment-table th { background: #edf8f5; }
#fundsStatementResult .statement-orders-panel { border: 1px solid #cec3e8; background: #fdfcff; }
#fundsStatementResult .statement-orders-panel .statement-section-title { color: #5d469c; background: #f7f4fc; }
#fundsStatementResult .statement-orders-toolbar { background: #fbf9ff; }
#fundsStatementResult .statement-orders-table th { background: #f2eef9; }
#fundsStatementResult .statement-total { border: 1px solid #cbd3df; background: #f8fafc; }
.statement-workflow-steps > span:nth-child(1) { background: #f6f8ff; }
.statement-workflow-steps > span:nth-child(2) { background: #f5fbf9; }
.statement-workflow-steps > span:nth-child(3) { background: #faf8ff; }

.funds-view-tab {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.funds-view-tab:hover {
  color: #315bd8;
}

.funds-view-tab.is-active {
  background: #fff;
  color: #315bd8;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.funds-view-tab:focus-visible {
  outline: 2px solid #315bd8;
  outline-offset: 2px;
}

.funds-tab-pane[hidden] {
  display: none !important;
}

#funds.view.active.statement-page-scroll { overflow-y: scroll !important; scrollbar-gutter: stable; }
#funds .funds-finance-panel.statement-mode { flex: 0 0 auto !important; min-height: 0; overflow: visible !important; }
#funds .funds-finance-panel.statement-mode #fundsStatementPanel { min-height: 0; overflow: visible; }

.statement-filter-bar,
.customer-statement-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid #dce3ef;
  border-radius: 9px;
  background: #f8faff;
}
.statement-filter-bar label,
.customer-statement-toolbar label { display: grid; min-width: 170px; gap: 5px; color: #667085; font-size: 12px; }
.customer-statement-title { display: grid; flex: 0 0 auto; gap: 3px; }.customer-statement-title span { color: #7b8799; font-size: 11px; }
#customerStatementView { box-sizing: border-box; width: auto; max-width: none; min-width: 0; min-height: calc(100vh - 360px); flex: 0 0 auto; align-self: stretch; height: auto; overflow: visible; padding-bottom: 32px; }
#customerStatementResult { flex: 0 0 auto; width: 100%; min-width: 0; }
#customerStatementView .customer-statement-toolbar { box-sizing: border-box; width: 100%; min-width: 0; align-items: center; flex-wrap: nowrap; }
#customerStatementView .customer-statement-toolbar > div { min-width: 0; }
#customerStatementView .customer-statement-toolbar > button { flex: 0 0 auto; white-space: nowrap; }
.customer-statement-current { display: flex !important; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; margin-left: 8px; padding-left: 18px; border-left: 1px solid #dce3ef; }.customer-statement-current[hidden] { display: none !important; }.customer-statement-current select { width: clamp(190px, 24vw, 310px); min-width: 0; border: 0; color: #315fd8; background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; }.customer-statement-current > span { overflow: hidden; color: #68758b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.customer-statement-current > em { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }.customer-statement-current > em.done { color: #138653; background: #eaf7ef; }.customer-statement-current > em.pending { color: #315fd8; background: #edf2ff; }.customer-statement-current > em.disputed { color: #d85e1d; background: #fff1e7; }
.statement-filter-bar label:first-child { min-width: 300px; flex: 1; }
.statement-customer-picker { position: relative; display: block; }
.statement-customer-picker > input[type="text"] { width: 100%; padding-right: 34px; }
.statement-customer-clear { position: absolute; z-index: 3; top: 50%; right: 7px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; color: #7a8598; background: transparent; font-size: 18px; line-height: 24px; transform: translateY(-50%); cursor: pointer; }
.statement-customer-clear:hover { color: #315bd8; background: #edf2ff; }
.statement-customer-results { position: absolute; z-index: 20; top: calc(100% + 5px); right: 0; left: 0; max-height: 320px; overflow-y: auto; padding: 5px; border: 1px solid #cfd8e7; border-radius: 8px; background: #fff; box-shadow: 0 12px 28px rgba(31, 48, 77, .16); }
.statement-customer-results[hidden] { display: none; }
.statement-customer-results button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; color: #29364d; background: transparent; text-align: left; cursor: pointer; }
.statement-customer-results button:hover, .statement-customer-results button.active { color: #244fc4; background: #edf3ff; }
.statement-customer-results button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statement-customer-results button span { flex: 0 0 auto; color: #7b8799; font-variant-numeric: tabular-nums; }
.statement-customer-no-result { display: block; padding: 16px 10px; color: #8a94a6; text-align: center; }
.statement-company-workspace { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid #dce3ef; border-radius: 9px; background: #f8faff; }.statement-company-workspace.hidden { display: none; }.statement-company-head { display: flex; align-items: center; justify-content: space-between; }.statement-company-head > div { display: grid; gap: 3px; }.statement-company-head strong { font-size: 15px; }.statement-company-head span { color: #7b8799; font-size: 10px; }.statement-period-candidate { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid #dce3ef; border-left: 4px solid #315fd8; border-radius: 8px; background: #fff; }.statement-period-candidate.warning { border-left-color: #df8b24; }.statement-period-candidate.query { border-left-color: #138653; }.statement-period-candidate > div:first-child { display: grid; gap: 4px; }.statement-period-candidate span,.statement-period-candidate small { color: #7b8799; font-size: 10px; }.statement-period-candidate strong { font-size: 13px; }.statement-period-money { display: grid; gap: 4px; }.statement-period-money b { color: #315fd8; }.statement-history { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 12px; }.statement-history > div:first-child { display: grid; gap: 3px; padding: 8px 2px; }.statement-history > div:first-child span { color: #7b8799; font-size: 10px; }.statement-history-list { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; }.statement-history-item { display: grid; flex: 0 0 235px; gap: 3px; padding: 8px 10px; border: 1px solid #dce3ef; border-radius: 7px; color: #344158; background: #fff; text-align: left; cursor: pointer; }.statement-history-item span,.statement-history-item em { color: #7b8799; font-size: 9px; font-style: normal; }.statement-history-item strong { overflow: hidden; color: #315fd8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.statement-history-empty { padding: 10px; color: #8a94a6; font-size: 10px; }
.statement-advanced-filters { display: flex; align-items: end; gap: 8px; }.statement-advanced-filters.hidden { display: none; }.statement-advanced-filters label { display: grid; min-width: 150px; gap: 4px; }.statement-company-head > label { display: flex; align-items: center; gap: 6px; color: #68758b; font-size: 11px; white-space: nowrap; }.statement-company-head select { min-width: 88px; padding: 6px 8px; }.statement-list-wrap { width: 100%; max-height: 470px; overflow: auto; border: 1px solid #dce3ef; border-radius: 8px; background: #fff; scrollbar-gutter: stable; }.statement-list-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 11px; }.statement-list-table th { position: sticky; z-index: 2; top: 0; padding: 10px 12px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }.statement-list-table td { padding: 10px 12px; border-top: 1px solid #e8edf5; white-space: nowrap; }.statement-current-period-row { background: #f7f9ff; }.statement-current-period-row em { margin-left: 6px; padding: 3px 7px; border-radius: 999px; color: #315fd8; background: #e9efff; font-size: 9px; font-style: normal; font-weight: 700; }.statement-list-status { display: inline-block; padding: 3px 7px; border-radius: 999px; color: #138653; background: #eaf7ef; }.statement-list-status.generate { color: #a56212; background: #fff4df; }.statement-list-status.new_version { color: #d85e1d; background: #fff1e7; }.statement-list-status.query { color: #138653; background: #eaf7ef; }
.statement-empty { min-height: 220px; margin-top: 12px; display: grid; place-items: center; color: #8a94a6; }
.statement-detail-collapsed { display: none !important; }.statement-detail-toolbar { box-sizing: border-box; display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0 10px; padding: 10px 14px; border: 1px solid #dce3ef; border-radius: 9px; background: #fff; }.statement-detail-toolbar > div { display: flex; min-width: 0; align-items: center; gap: 10px; }.statement-detail-toolbar strong { white-space: nowrap; }.statement-detail-toolbar span { overflow: hidden; color: #7b8799; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.statement-detail-toolbar button { flex: 0 0 auto; }
.statement-empty-message { display: grid; gap: 7px; text-align: center; }.statement-empty-message span { font-size: 12px; }
.statement-sheet { margin-top: 12px; color: #27344b; }
.statement-workflow { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 11px 14px; border: 1px solid #cfdcf7; border-radius: 9px; color: #315fd8; background: #f3f6ff; }.statement-workflow span { flex: 1; color: #6f7d94; font-size: 11px; }.statement-workflow button { padding: 7px 12px; border: 0; border-radius: 6px; color: #8490a3; background: #e7ebf1; font-weight: 700; }.statement-workflow.done { color: #138653; border-color: #bde4cf; background: #eef9f3; }.statement-workflow.disputed { color: #d85e1d; border-color: #f2c4a8; background: #fff7f0; }.statement-workflow .invoice-ready { color: #fff; background: #138653; }
.statement-summary-cards { display: grid; width: 100%; max-width: 100%; min-width: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.statement-card { min-width: 0; padding: 14px; border: 1px solid #e0e6f0; border-radius: 9px; background: #fff; }
.statement-card span { display: block; margin-bottom: 8px; color: #7b8698; font-size: 11px; }
.statement-card strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.statement-card.blue strong { color: #315fd8; }.statement-card.green strong, .statement-total .green { color: #138653; }.statement-card.orange strong, .statement-total .orange { color: #df5d24; }
.statement-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; border: 1px solid #e0e6f0; border-bottom: 0; border-radius: 9px 9px 0 0; background: #fff; }
.statement-sheet-head h2 { margin: 0 0 5px; font-size: 18px; }.statement-sheet-head p { margin: 0; color: #707c91; font-size: 11px; }
.statement-confirm-status { padding: 5px 10px; border-radius: 999px; color: #315fd8; background: #edf2ff; font-size: 11px; font-weight: 700; }
.statement-confirm-status.done { color: #138653; background: #eaf7ef; }.statement-confirm-status.disputed { color: #d85e1d; background: #fff1e7; }
.statement-overview-bar { box-sizing: border-box; display: flex; width: 100%; min-width: 0; min-height: 102px; align-items: stretch; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #e0e6f0; border-radius: 9px; background: #fff; box-shadow: 0 4px 12px rgba(31,48,77,.04); }.statement-overview-bar .statement-sheet-head { box-sizing: border-box; min-width: 280px; flex: 0 1 420px; align-items: center; padding: 4px 20px 4px 2px; border: 0; border-right: 1px solid #dce3ef; border-radius: 0; }.statement-overview-bar .statement-sheet-head h2 { font-size: 17px; }.statement-overview-bar .statement-sheet-head p { line-height: 1.8; }.statement-overview-bar .statement-summary-cards { display: grid; flex: 1 1 auto; min-width: 0; grid-template-columns: repeat(6, minmax(76px, 1fr)); gap: 0; margin: 0; }.statement-overview-bar .statement-card { min-width: 0; align-content: center; padding: 4px 13px; border: 0; border-right: 1px solid #e1e7f0; border-radius: 0; background: transparent; }.statement-overview-bar .statement-card span { overflow: hidden; margin-bottom: 7px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }.statement-overview-bar .statement-card strong { font-size: 16px; white-space: nowrap; }.statement-overview-actions { display: grid; flex: 0 0 auto; min-width: 128px; align-content: center; justify-items: center; gap: 8px; padding-left: 14px; }.statement-overview-actions button { white-space: nowrap; }
.statement-table-wrap { max-height: 470px; overflow: auto; border: 1px solid #e0e6f0; background: #fff; }
.statement-table { width: 100%; min-width: 1160px; border-collapse: collapse; font-size: 11px; }
.statement-table th { position: sticky; z-index: 2; top: 0; padding: 9px 8px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }
.statement-table td { padding: 9px 8px; border-top: 1px solid #e8edf5; white-space: nowrap; }
.statement-table .clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.statement-status { padding: 3px 7px; border-radius: 999px; color: #287a50; background: #eaf7ef; }
.statement-voided { color: #9aa2b1; text-decoration: line-through; background: #fafafa; }
.statement-total { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 13px 16px; border: 1px solid #e0e6f0; border-top: 0; border-radius: 0 0 9px 9px; background: #fff; }
.statement-total span { color: #687489; }.statement-total b { color: #315fd8; font-variant-numeric: tabular-nums; }.statement-total button:first-of-type { margin-left: auto; }
.statement-final-state { margin-left: auto; padding: 7px 11px; border-radius: 7px; font-weight: 700; }.statement-final-state.done { color: #138653; background: #eaf7ef; }.statement-final-state.disputed { color: #d85e1d; background: #fff1e7; }.statement-dispute-btn { color: #d85e1d !important; border-color: #ef9a68 !important; }
.portal-statement-workspace { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; width: 100%; max-width: 100%; min-width: 0; margin-top: 12px; overflow: hidden; }
.portal-statement-list { position: static; display: flex; width: 100%; max-width: 100%; flex-direction: row; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 9px; scrollbar-gutter: stable; }.portal-statement-list button { display: grid; flex: 0 0 290px; min-width: 0; min-height: 72px; align-content: center; gap: 7px; padding: 11px 13px; border: 1px solid #dce3ef; border-radius: 8px; color: #344158; background: #fff; line-height: 1.35; text-align: left; cursor: pointer; }.portal-statement-list button.active { color: #315fd8; border-color: #8da8f2; background: #f4f7ff; box-shadow: 0 4px 12px rgba(49,95,216,.08); }.portal-statement-list button strong,.portal-statement-list button span { display: block; overflow: hidden; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }.portal-statement-list button strong { font-size: 13px; }.portal-statement-list button span { color: #7b8799; font-size: 10px; }
#portalStatementDetail { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }.portal-statement-workspace .statement-sheet { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin-top: 0; overflow: hidden; }.portal-statement-workspace .statement-total { position: sticky; z-index: 5; bottom: 0; box-shadow: 0 -5px 16px rgba(31,48,77,.08); }
.statement-payment-list { display: grid; gap: 8px; padding: 10px 0; }
.statement-payment-card { box-sizing: border-box; display: grid; width: 100%; max-width: 100%; min-width: 0; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 13px 15px; border: 1px solid #d9e3f4; border-radius: 9px; background: #f8faff; }
.statement-payment-card > div > span { display: block; color: #68758b; font-size: 11px; }.statement-payment-card > div > strong { display: block; margin-top: 5px; color: #315fd8; font-size: 20px; }
.statement-payment-card dl { display: grid; min-width: 0; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0; }
.statement-payment-card dl div { min-width: 0; }.statement-payment-card dt { color: #8a94a6; font-size: 10px; }.statement-payment-card dd { overflow: hidden; margin: 4px 0 0; color: #37445a; text-overflow: ellipsis; white-space: nowrap; }
.statement-payment-empty { padding: 12px; border-radius: 8px; color: #7b8799; background: #f7f8fb; }
.statement-allocation-badge { display: inline-block; padding: 3px 8px; border-radius: 999px; color: #7d8795; background: #f0f1f3; font-size: 10px; font-weight: 700; white-space: nowrap; }.statement-allocation-badge.done { color: #138653; background: #eaf7ef; }.statement-allocation-badge.partial { color: #d85e1d; background: #fff1e7; }.statement-allocation-badge.none { color: #b23a3a; background: #fcebec; }
.statement-orders-panel { overflow: hidden; border: 1px solid #dfe6f1; border-radius: 9px 9px 0 0; background: #fff; }
.statement-orders-table small.statement-after-sale-note { display: block; max-width: 330px; margin-top: 3px; color: #a35a20; font-size: 10px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.statement-orders-toolbar .statement-period-scope { color: #69798e; font-size: 10px; white-space: nowrap; }
.statement-after-sale-adjustments { flex: 0 0 auto; min-width: 0; margin: 0; border-top: 1px solid #e1e7f0; background: #fffcf7; }
.statement-after-sale-adjustments > summary { padding: 6px 10px; color: #935c26; font-size: 11px; font-weight: 700; cursor: pointer; }
.statement-after-sale-adjustments > summary span { margin-left: 7px; color: #7f7c77; font-size: 10px; font-weight: 400; }
.statement-after-sale-adjustments-tools { display: flex; align-items: center; gap: 8px; padding: 4px 10px; }
.statement-after-sale-adjustments-tools input { width: min(300px, 60%); min-height: 26px; height: 26px; padding: 3px 7px; font-size: 11px; }
.statement-after-sale-adjustments-tools small { color: #7b7d83; font-size: 10px; }
.statement-after-sale-adjustments-wrap { max-height: min(150px, 25vh); overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.statement-after-sale-adjustments-wrap table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: 11px; }
.statement-after-sale-adjustments-wrap th { position: sticky; top: 0; z-index: 1; padding: 5px 9px; text-align: left; color: #7b694e; background: #fbf3e6; white-space: nowrap; }
.statement-after-sale-adjustments-wrap td { padding: 5px 9px; border-top: 1px solid #f0e7db; white-space: nowrap; }
.statement-after-sale-adjustments-wrap .statement-after-sale-adjustment-product { max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.statement-after-sale-adjustments-wrap .compact-btn { min-height: 22px; height: 22px; padding: 2px 5px; font-size: 10px; }
.statement-orders-toolbar { box-sizing: border-box; display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; background: #f8faff; }.statement-orders-toolbar > input { min-width: min(280px, 100%); flex: 1 1 420px; }.statement-orders-toolbar > select { flex: 0 1 130px; min-width: 105px; }.statement-orders-toolbar > label { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; color: #68758b; white-space: nowrap; }.statement-orders-toolbar > small { flex: 0 0 auto; color: #7b8799; white-space: nowrap; }
.statement-orders-panel .statement-table-wrap { height: clamp(300px, 44vh, 520px); max-height: none; overflow: scroll; border: 0; border-top: 1px solid #e1e7f0; border-radius: 0; scrollbar-gutter: stable both-edges; overscroll-behavior: contain; }
.statement-orders-panel .statement-table-wrap::-webkit-scrollbar-track { background: #edf1f6; }.statement-orders-panel .statement-table-wrap::-webkit-scrollbar-thumb { border: 2px solid #edf1f6; background: #8f9bad; background-clip: padding-box; }
.statement-orders-table { min-width: 1120px; }.statement-orders-table td.green { color: #138653; }
.statement-address-cell { display: flex; align-items: center; gap: 6px; }.statement-address-cell span { max-width: 140px; overflow: hidden; color: #66758d; text-overflow: ellipsis; white-space: nowrap; }.statement-address-cell button { padding: 2px 5px; border: 0; color: #315fd8; background: transparent; cursor: pointer; }
.statement-address-detail td { padding: 9px 16px !important; color: #53647e; background: #f3f7ff; text-decoration: none !important; }.statement-address-detail td strong { margin-right: 20px; color: #315fd8; }.statement-address-detail td span { margin-right: 24px; }
.statement-pagination { position: sticky; z-index: 3; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid #e4e9f1; color: #778398; background: #fff; }.statement-pagination div { display: flex; gap: 5px; }.statement-pagination button { min-width: 30px; padding: 5px 8px; border: 1px solid #d8e0ec; border-radius: 5px; color: #536077; background: #fff; cursor: pointer; }.statement-pagination button.active { color: #fff; border-color: #315fd8; background: #315fd8; }

/* Reconciliation workbench: one company, one period, exceptions first. */
.statement-workflow-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0 0 8px; overflow: hidden; border: 1px solid #dce3ef; border-radius: 8px; background: #dce3ef; }
.statement-workflow-steps > span { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 8px; align-items: center; min-height: 42px; padding: 6px 12px; background: #fff; }
.statement-workflow-steps b { grid-row: 1 / 3; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #6e7b90; background: #edf1f6; font-size: 11px; }
.statement-workflow-steps strong { color: #344158; font-size: 12px; }.statement-workflow-steps small { overflow: hidden; color: #8993a3; text-overflow: ellipsis; white-space: nowrap; }
.statement-workflow-steps .active { background: #f5f8ff; }.statement-workflow-steps .active b { color: #fff; background: #315fd8; }.statement-workflow-steps .active strong { color: #315fd8; }
@media (max-width: 980px) {
  .statement-workflow-steps { grid-template-columns: 1fr; }
  .statement-workflow-steps small { white-space: normal; }
}
#fundsStatementPanel .statement-filter-bar { align-items: end; padding: 9px 12px; border: 1px solid #dce3ef; border-radius: 8px; background: #fff; }
#fundsStatementPanel .statement-advanced-filters { display: flex; align-items: end; gap: 8px; }
#fundsStatementPanel .statement-period-shortcut { padding-inline: 10px; }
.statement-exception-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 12px; padding: 11px 14px; border: 1px solid #f1bd8e; border-left: 4px solid #e57b22; border-radius: 8px; color: #a64d14; background: #fff8f1; }
.statement-exception-banner > div { display: grid; gap: 3px; }.statement-exception-banner strong { font-size: 13px; }.statement-exception-banner span { color: #a86b43; font-size: 10px; }
.statement-exception-banner.clear { color: #16784c; border-color: #b9e2cc; border-left-color: #169a5d; background: #f1faf5; }.statement-exception-banner.clear span { color: #5c806e; }
.statement-section-title { display: flex; align-items: center; justify-content: space-between; padding: 11px 12px; border-bottom: 1px solid #e1e7f0; }.statement-section-title > div { display: grid; gap: 2px; }.statement-section-title strong { font-size: 13px; }.statement-section-title span { color: #7b8799; font-size: 10px; }
.statement-orders-table { min-width: 1320px; }.statement-orders-table td strong,.statement-orders-table td small { display: block; }.statement-orders-table td small { margin-top: 3px; color: #7b8799; }.statement-orders-table td.orange { color: #d85e1d; }
.statement-order-issue { background: #fff9f3; }.statement-order-issue td:first-child { box-shadow: inset 3px 0 #e57b22; }.statement-pagination > div { flex-wrap: wrap; justify-content: flex-end; }

/* Compact reconciliation layout: keep the actual checking work above the fold. */
#fundsStatementPanel .statement-company-workspace { margin-top: 8px; padding: 0; border-radius: 8px; background: #fff; }
#fundsStatementPanel .statement-company-head { flex-wrap: wrap; gap: 8px; min-height: 40px; padding: 7px 12px; }
#fundsStatementPanel .statement-company-head > div { display: flex; align-items: baseline; gap: 10px; }
#fundsStatementPanel .statement-company-main { min-width: 0; flex: 1 1 760px; align-items: center; overflow: hidden; white-space: nowrap; }
#fundsStatementPanel .statement-company-main > strong { max-width: min(360px, 32vw); flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#fundsStatementPanel .statement-company-main > span { flex: 0 0 auto; }
#fundsStatementPanel .statement-company-main .statement-inline-status { flex: 0 0 auto; }
#fundsStatementPanel .statement-company-loading,.statement-history-empty-label { color: #8a94a6; }
#fundsStatementPanel .statement-company-controls { flex: 0 0 auto; align-items: center; gap: 7px; }
#fundsStatementPanel .statement-company-controls button { white-space: nowrap; }
.statement-history-details { position: relative; margin-left: auto; }
.statement-history-details summary { padding: 6px 10px; border: 1px solid #d8e0ec; border-radius: 6px; color: #536077; background: #fff; font-size: 11px; font-weight: 700; cursor: pointer; list-style-position: inside; }
.statement-history-details[open] { width: 100%; margin-left: 0; }
.statement-history-details[open] summary { width: max-content; margin: 0 0 7px auto; }
.statement-history-details .statement-list-wrap { max-height: 230px; }
.statement-history-note { display: block; padding: 7px 2px 1px; color: #7b8799; text-align: right; }
#fundsStatementResult:not(.statement-detail-collapsed) { margin-top: 8px; }
#fundsStatementResult .statement-sheet { margin-top: 0; }
#fundsStatementResult .statement-workflow { min-height: 38px; margin-bottom: 8px; padding: 7px 12px; }
#fundsStatementResult .statement-overview-bar { min-height: 82px; margin-bottom: 8px; padding: 8px 12px; box-shadow: none; }
#fundsStatementResult .statement-overview-bar .statement-sheet-head { min-width: 250px; flex-basis: 340px; padding-right: 14px; }
#fundsStatementResult .statement-overview-bar .statement-sheet-head h2 { font-size: 15px; }
#fundsStatementResult .statement-overview-bar .statement-sheet-head p { line-height: 1.55; }
#fundsStatementResult .statement-overview-bar .statement-card { padding-inline: 10px; }
#fundsStatementResult .statement-overview-bar .statement-card span { margin-bottom: 4px; }
#fundsStatementResult .statement-overview-actions { min-width: 116px; gap: 5px; padding-left: 10px; }
#fundsStatementResult .statement-overview-bar .statement-sheet-head { width: auto; min-width: max-content; flex: 0 1 auto; }
.statement-company-title-row { display: flex; width: max-content; max-width: 100%; align-items: center; gap: 10px; }
.statement-company-title-row h2 { flex: 0 1 auto; min-width: 0; }
.statement-inline-status { width: auto; flex: 0 0 auto; padding: 5px 9px; border: 1px solid #afc3ef; border-radius: 7px; color: #315fd8; background: #edf2ff; font-size: 10px; font-weight: 700; white-space: nowrap; opacity: 1 !important; }
.statement-inline-status.done { color: #138653; border-color: #a9d8c4; background: #eaf7ef; }
.statement-inline-status.warning { color: #c46125; border-color: #ecc39f; background: #fff4e9; }
#fundsStatementResult .statement-summary-cards { grid-template-columns: repeat(6, minmax(max-content, 1fr)); }
#fundsStatementResult .statement-overview-actions button { padding-block: 6px; }
#fundsStatementResult .statement-exception-banner { margin-bottom: 8px; padding: 8px 12px; }
#fundsStatementResult .statement-payment-list { padding: 0 0 8px; }
#fundsStatementResult .statement-payment-card { padding: 9px 12px; }
#fundsStatementResult .statement-payment-card > div > strong { margin-top: 2px; font-size: 17px; }
#fundsStatementResult .statement-section-title { padding: 8px 10px; }
#fundsStatementResult .statement-orders-toolbar { padding: 7px 9px; }
.statement-orders-toolbar--combined { border-bottom: 1px solid #e1e7f0; }
.statement-orders-title { flex: 0 0 auto; padding-right: 4px; color: #5d469c; font-size: 13px; white-space: nowrap; }
.statement-payments-panel { margin-bottom: 8px; overflow: hidden; border: 1px solid #dfe6f1; border-radius: 8px; background: #fff; }
.statement-payment-table-wrap { max-height: 310px; overflow: auto; }
.statement-payment-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 11px; }
.statement-payment-table th { position: sticky; z-index: 2; top: 0; padding: 8px 10px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }
.statement-payment-table td { padding: 8px 10px; border-top: 1px solid #e8edf5; white-space: nowrap; }
.statement-payment-table td strong { color: #315fd8; font-size: 13px; }
.statement-payment-table .green,.statement-drawer-summary .green,.statement-drawer-table .green { color: #138653; }
.statement-payment-table .orange,.statement-drawer-summary .orange,.statement-drawer-table .orange { color: #df5d24; }
.statement-payment-issue { background: #fffaf5; }.statement-payment-issue td:first-child { box-shadow: inset 3px 0 #e57b22; }
.statement-payment-pager { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-top: 1px solid #e4e9f1; color: #778398; background: #fff; }
.statement-payment-pager div { display: flex; gap: 6px; }.statement-payment-pager button,.statement-allocation-drawer footer button { padding: 5px 9px; border: 1px solid #d8e0ec; border-radius: 5px; color: #536077; background: #fff; cursor: pointer; }.statement-payment-pager button:disabled,.statement-allocation-drawer footer button:disabled { cursor: not-allowed; opacity: .4; }
.statement-allocation-drawer[hidden] { display: none; }
.statement-allocation-drawer { position: fixed; z-index: 1600; inset: 0; display: flex; justify-content: flex-end; }
.statement-drawer-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(20,29,45,.34); cursor: default; }
.statement-allocation-drawer aside { position: relative; display: grid; width: min(980px, 78vw); height: 100vh; grid-template-rows: minmax(0,1fr); background: #f7f9fc; box-shadow: -16px 0 40px rgba(31,48,77,.2); }
.statement-allocation-drawer aside > div { display: grid; min-height: 0; grid-template-rows: auto auto auto minmax(0,1fr) auto; }
.statement-allocation-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #dfe6f1; background: #fff; }.statement-allocation-drawer header > div { display: grid; gap: 3px; }.statement-allocation-drawer header span,.statement-allocation-drawer header small { color: #778398; }.statement-allocation-drawer header strong { color: #315fd8; font-size: 22px; }
.statement-drawer-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 12px 14px 0; border: 1px solid #dfe6f1; border-radius: 8px; background: #fff; }.statement-drawer-summary > div { display: grid; gap: 5px; padding: 11px 14px; border-right: 1px solid #e6ebf2; }.statement-drawer-summary > div:last-child { border-right: 0; }.statement-drawer-summary span { color: #7b8799; font-size: 10px; }.statement-drawer-summary strong { font-size: 16px; }
.statement-drawer-tools { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }.statement-drawer-tools input { min-width: 0; flex: 1; }.statement-drawer-tools span { color: #778398; white-space: nowrap; }
.statement-drawer-table { min-height: 0; margin: 0 14px; overflow: auto; border: 1px solid #dfe6f1; border-radius: 8px; background: #fff; }.statement-drawer-table table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 11px; }.statement-drawer-table th { position: sticky; z-index: 2; top: 0; padding: 9px 10px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }.statement-drawer-table td { padding: 9px 10px; border-top: 1px solid #e8edf5; white-space: nowrap; }.statement-drawer-table td small { display: block; margin-top: 2px; color: #d85e1d; }.statement-drawer-table .clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.statement-allocation-drawer footer { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 10px 14px; border-top: 1px solid #dfe6f1; background: #fff; }.statement-allocation-drawer footer span { margin: 0 auto; color: #778398; }
body.statement-drawer-open { overflow: hidden; }
@media (max-width: 760px) { .statement-allocation-drawer aside { width: 96vw; }.statement-drawer-summary { grid-template-columns: 1fr; }.statement-drawer-summary > div { border-right: 0; border-bottom: 1px solid #e6ebf2; }.statement-drawer-summary > div:last-child { border-bottom: 0; } }

/* Independent bank-flow review. This panel is deliberately outside the
   statement sheet so a missing/slow bank endpoint can never block statement
   generation, customer confirmation, or invoicing. */
.statement-bank-review-panel { overflow: hidden; border: 1px solid #b9d8df; border-radius: 8px; background: #fbfeff; }
.statement-bank-review-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #d9ebee; background: #f2fbfc; }
.statement-bank-review-head > div:first-child { display: grid; min-width: 0; flex: 1 1 auto; gap: 2px; }
.statement-bank-review-head strong { color: #176b82; font-size: 13px; }
.statement-bank-review-head span { color: #718797; font-size: 10px; }
.statement-bank-review-head span b { color: #176b82; font-weight: 700; }
.statement-bank-review-status,.statement-bank-review-badge { display: inline-flex; align-items: center; width: max-content; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.statement-bank-review-status.is-done,.statement-bank-review-badge.is-done { color: #147a52; background: #e8f7ef; }
.statement-bank-review-status.is-pending,.statement-bank-review-badge.is-pending { color: #9a6415; background: #fff4df; }
.statement-bank-review-status.is-warning { color: #b45309; background: #fff0df; }
.statement-bank-review-status.is-error,.statement-bank-review-badge.is-error { color: #b42318; background: #feeceb; }
.statement-bank-review-status.is-loading { color: #315fd8; background: #edf2ff; }
.statement-bank-review-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.statement-bank-review-import { display: inline-flex; align-items: center; cursor: pointer; }
.statement-bank-review-import input { display: none; }
.statement-bank-review-metrics { display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); border-bottom: 1px solid #e3eff1; background: #fff; }
.statement-bank-review-metrics > div { display: grid; gap: 3px; min-width: 0; padding: 7px 10px; border-right: 1px solid #edf3f4; }
.statement-bank-review-metrics > div:last-child { border-right: 0; }
.statement-bank-review-metrics small { color: #8293a0; font-size: 10px; }
.statement-bank-review-metrics strong { overflow: hidden; color: #28465b; font-size: 14px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.statement-bank-review-metrics strong.green { color: #138653; }.statement-bank-review-metrics strong.orange { color: #c46a1a; }.statement-bank-review-metrics strong.red { color: #c43d3d; }
.statement-bank-review-note { padding: 6px 10px; color: #778b97; background: #f9fdfe; font-size: 10px; }
.statement-bank-review-note.is-error { color: #a14a27; background: #fff8f2; }
.statement-bank-review-detail { border-top: 1px solid #d9ebee; background: #fff; }
.statement-bank-review-detail-head { display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
.statement-bank-review-detail-head strong { color: #28465b; font-size: 12px; }
.statement-bank-review-detail-head span { flex: 1 1 auto; color: #8293a0; font-size: 10px; }
.statement-bank-review-table-wrap { max-height: 300px; overflow: auto; border-top: 1px solid #edf3f4; }
.statement-bank-review-table { width: 100%; min-width: 1050px; border-collapse: collapse; font-size: 10px; }
.statement-bank-review-table th { position: sticky; z-index: 1; top: 0; padding: 7px 8px; color: #647986; background: #f4fafb; text-align: left; white-space: nowrap; }
.statement-bank-review-table td { padding: 7px 8px; border-top: 1px solid #eef3f4; color: #3a5261; white-space: nowrap; }
.statement-bank-review-table td.numeric { font-variant-numeric: tabular-nums; }
.statement-bank-review-loading { padding: 18px; color: #728793; text-align: center; font-size: 11px; }

/* 全公司银行流水复查总览：银行文件只导入一次，按公司查看结果。 */
.bank-review-overview { min-width: 0; }
.bank-overview-card { overflow: hidden; border: 1px solid #b9d8df; border-radius: 9px; background: #fbfeff; }
.bank-overview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #d9ebee; background: #f2fbfc; }
.bank-overview-head > div:first-child { display: grid; gap: 3px; min-width: 0; }
.bank-overview-head strong { color: #176b82; font-size: 15px; }
.bank-overview-head span { color: #718797; font-size: 11px; }
.bank-overview-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.bank-overview-import { display: inline-flex; align-items: center; cursor: pointer; }
.bank-overview-import input { display: none; }
.bank-overview-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; padding: 11px 14px; border-bottom: 1px solid #e3eff1; background: #fff; }
.bank-overview-filters label { display: grid; gap: 4px; color: #6c7f8a; font-size: 10px; }
.bank-overview-filters input,.bank-overview-filters select { min-width: 145px; }
.bank-overview-filters > input { min-width: 240px; flex: 1 1 240px; }
.bank-overview-metrics { display: grid; grid-template-columns: repeat(6, minmax(100px, 1fr)); border-bottom: 1px solid #e3eff1; background: #fff; }
.bank-overview-metrics > div { display: grid; gap: 3px; min-width: 0; padding: 10px 12px; border-right: 1px solid #edf3f4; }
.bank-overview-metrics > div:last-child { border-right: 0; }
.bank-overview-metrics small { color: #8293a0; font-size: 10px; }
.bank-overview-metrics strong { overflow: hidden; color: #28465b; font-size: 16px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.bank-overview-metrics strong.green,.bank-overview-table .green,.bank-overview-detail-table .green { color: #138653; }
.bank-overview-metrics strong.orange,.bank-overview-table .orange { color: #c46a1a; }
.bank-overview-metrics strong.red,.bank-overview-table .red,.bank-overview-detail-table .red { color: #c43d3d; }
.bank-overview-note { padding: 8px 14px; color: #778b97; background: #f9fdfe; font-size: 10px; }
.bank-overview-note.is-error { color: #a14a27; background: #fff8f2; }
.bank-overview-table-wrap { max-height: 520px; overflow: auto; background: #fff; }
.bank-overview-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 11px; }
.bank-overview-table th,.bank-overview-detail-table th { position: sticky; z-index: 1; top: 0; padding: 9px 10px; color: #647986; background: #f4fafb; text-align: left; white-space: nowrap; }
.bank-overview-table td,.bank-overview-detail-table td { padding: 9px 10px; border-top: 1px solid #eef3f4; color: #3a5261; white-space: nowrap; }
.bank-overview-account { display: block; margin-top: 3px; color: #8293a0; font-size: 10px; font-weight: 400; }
.bank-overview-table tbody tr.is-selected { background: #eef8ff; }
.bank-overview-table td.numeric,.bank-overview-detail-table td.numeric { font-variant-numeric: tabular-nums; }
.bank-overview-status { display: inline-flex; align-items: center; width: max-content; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.bank-overview-status.is-done { color: #147a52; background: #e8f7ef; }
.bank-overview-status.is-pending { color: #9a6415; background: #fff4df; }
.bank-overview-status.is-error { color: #b42318; background: #feeceb; }
.bank-overview-empty { padding: 26px 14px; color: #8293a0; text-align: center; background: #fff; font-size: 11px; }
.bank-overview-detail { margin-top: 10px; overflow: hidden; border-top: 1px solid #d9ebee; background: #fff; }
.bank-overview-detail header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #edf3f4; }
.bank-overview-detail header strong { color: #28465b; font-size: 12px; }
.bank-overview-detail-wrap { max-height: 360px; overflow: auto; }
.bank-overview-detail-table { width: 100%; min-width: 970px; border-collapse: collapse; font-size: 10px; }
.bank-overview-loading { padding: 20px; color: #728793; text-align: center; font-size: 11px; }
@media (max-width: 900px) {
  .bank-overview-head { align-items: flex-start; flex-wrap: wrap; }
  .bank-overview-actions { width: 100%; }
  .bank-overview-actions button,.bank-overview-import { flex: 1 1 0; justify-content: center; }
  .bank-overview-metrics { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
  .bank-overview-metrics > div:nth-child(3n) { border-right: 0; }
}
@media (max-width: 760px) {
  .statement-bank-review-head { align-items: flex-start; flex-wrap: wrap; }
  .statement-bank-review-status { margin-left: auto; }
  .statement-bank-review-actions { width: 100%; }
  .statement-bank-review-actions button { flex: 1 1 0; }
  .statement-bank-review-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statement-bank-review-metrics > div:nth-child(2n) { border-right: 0; }
}

.invoice-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 14px 16px; border: 1px solid #dce3ef; border-radius: 9px; background: #fff; }.invoice-page-head > div { display: grid; gap: 4px; }.invoice-page-head strong { font-size: 16px; }.invoice-page-head span { color: #7b8799; font-size: 11px; }
.invoice-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }.invoice-stats > div { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid #dce3ef; border-radius: 9px; background: #fff; }.invoice-stats span { color: #7b8799; font-size: 11px; }.invoice-stats strong { color: #315fd8; font-size: 22px; }
.invoice-page-head--combined { box-sizing: border-box; display: flex; width: 100%; min-width: 0; min-height: 82px; padding: 12px 16px; }.invoice-page-head--combined .invoice-page-title { min-width: 245px; flex: 0 1 360px; padding-right: 18px; border-right: 1px solid #dce3ef; }.invoice-page-head--combined > button { flex: 0 0 auto; white-space: nowrap; }.invoice-stats--inline { display: grid; flex: 1 1 auto; min-width: 0; grid-template-columns: repeat(4, minmax(90px, 1fr)); gap: 0; margin: 0; }.invoice-stats--inline > div { min-width: 0; align-content: center; gap: 4px; padding: 2px 18px; border: 0; border-right: 1px solid #e1e7f0; border-radius: 0; background: transparent; }.invoice-stats--inline > div:last-child { border-right: 0; }.invoice-stats--inline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.invoice-stats--inline strong { line-height: 1; }
.invoice-stats--inline.invoice-stats--management { grid-template-columns: repeat(8, minmax(62px, 1fr)); }
.invoice-stats--management .invoice-stat-filter { display: grid; min-width: 0; align-content: center; gap: 3px; padding: 5px 7px; border: 0; border-right: 1px solid #e1e7f0; border-radius: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.invoice-stats--management .invoice-stat-filter:last-child { border-right: 0; }.invoice-stats--management .invoice-stat-filter:hover { background: #f3f6ff; }.invoice-stats--management .invoice-stat-filter.active { background: #edf2ff; box-shadow: inset 0 -2px #315fd8; }.invoice-stats--management .invoice-stat-filter:disabled { cursor: wait; opacity: .6; }
.invoice-stats--management .invoice-stat-filter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.invoice-stats--management .invoice-stat-filter strong { color: #315fd8; font-size: 18px; line-height: 1; }
.invoice-filter-bar { box-sizing: border-box; display: flex; width: 100%; gap: 9px; margin-bottom: 12px; padding: 12px; border: 1px solid #dce3ef; border-radius: 9px; background: #f8faff; }.invoice-filter-bar input { min-width: 0; flex: 1; }.invoice-filter-bar select { min-width: 150px; }
.invoice-result { min-width: 0; border: 1px solid #dce3ef; border-radius: 9px; background: #fff; overflow: hidden; }.invoice-result.empty { min-height: 180px; display: grid; place-items: center; color: #8a94a6; }.invoice-table-wrap { width: 100%; overflow: auto; }.invoice-table { width: 100%; min-width: 1120px; border-collapse: collapse; font-size: 11px; }.invoice-table th { padding: 10px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }.invoice-table td { padding: 11px 10px; border-top: 1px solid #e8edf5; vertical-align: middle; }.invoice-table td small { display: block; margin-top: 4px; color: #7b8799; }.invoice-status { display: inline-block; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }.invoice-status.pending { color: #d85e1d; background: #fff1e7; }.invoice-status.ready { color: #315fd8; background: #edf2ff; }.invoice-status.sent { color: #7d4bd1; background: #f3edff; }.invoice-status.done { color: #138653; background: #eaf7ef; }.invoice-upload-btn { display: inline-flex; padding: 6px 10px; border: 1px solid #8da8f2; border-radius: 6px; color: #315fd8; cursor: pointer; }.invoice-upload-btn input { display: none; }.invoice-note { margin: 0; padding: 10px 14px; border-top: 1px solid #e8edf5; color: #7b8799; font-size: 10px; }.invoice-table .green { color: #138653; }.invoice-request-message { color: #68758b; font-size: 11px; }.invoice-request-message.success { color: #138653; }.invoice-request-message.error { color: #c43f36; }
.invoice-load-error { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f2cf9e; color: #9a5a0b; background: #fff8e9; font-size: 12px; }.invoice-load-error span { min-width: 0; }.invoice-load-error button { flex: 0 0 auto; }
.invoice-terminal-summary { max-width: 260px; color: #8b5a45 !important; white-space: normal; }
#customerInvoiceView { box-sizing: border-box; width: auto; max-width: none; min-width: 0; align-self: stretch; padding-bottom: 32px; }
.invoice-row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.invoice-tax-template-status { display: inline-flex; margin-top: 5px; align-items: center; gap: 5px; color: #315fd8; white-space: nowrap; }
.invoice-tax-template-status strong { padding: 3px 6px; border-radius: 5px; background: #edf2ff; font-size: 10px; }
.invoice-tax-template-status small { margin: 0 !important; color: #d85e1d !important; }
.invoice-tax-template-status.is-downloaded small { color: #138653 !important; }
.invoice-tax-template-download { color: #315fd8; border-color: #9eb4ed; }
/* 管理端销项开票独立布局；不复用 combined header 的跨页面覆盖。 */
#funds #fundsInvoicePanel { min-width: 0; }
#funds #fundsInvoicePanel .invoice-management-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 14px 16px; border: 1px solid #dce3ef; border-bottom: 0; border-radius: 9px 9px 0 0; background: #f8faff; }
#funds #fundsInvoicePanel .invoice-management-head > strong { color: #19375e; font-size: 20px; line-height: 1.3; }
#funds #fundsInvoicePanel .invoice-management-head > span { color: #75849a; font-size: 12px; line-height: 1.5; }
#funds #fundsInvoicePanel .invoice-management-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; min-width: 0; margin-bottom: 12px; padding: 12px 16px; border: 1px solid #dce3ef; border-top-color: #e9edf5; border-radius: 0 0 9px 9px; background: #fff; }
#funds #fundsInvoicePanel #fundsInvoiceStatus[hidden] { display: none; }
#funds #fundsInvoicePanel #fundsInvoiceStats { display: flex; flex: 0 1 auto; order: 0; align-items: center; gap: 6px; width: auto; min-width: 0; max-width: 100%; margin: 0; padding: 0; overflow-x: auto; }
#funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 11px; border: 1px solid #dfe6f3; border-radius: 6px; color: #284368; background: #fff; box-shadow: none; white-space: nowrap; }
#funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter span { overflow: visible; color: inherit; font-size: 12px; line-height: 1.3; text-overflow: clip; white-space: nowrap; }
#funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter strong { display: inline-block; min-width: 16px; padding: 1px 4px; border-radius: 4px; color: #60769b; background: #edf2fa; font-size: 12px; line-height: 1.3; }
#funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter:hover { border-color: #9bb4f1; background: #f5f8ff; }
#funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter.active { border-color: #315fd8; color: #fff; background: #315fd8; }
#funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter.active strong { color: #fff; background: #ffffff26; }
#funds #fundsInvoicePanel #fundsInvoiceMoreStatus { flex: 0 0 122px; width: 122px; max-width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 6px 9px; border: 1px solid #dfe6f3; border-radius: 6px; color: #284368; background-color: #fff; font-size: 12px; }
#funds #fundsInvoicePanel #fundsInvoiceMoreStatus.active { border-color: #8ca9ef; color: #315fd8; background-color: #edf3ff; }
#funds #fundsInvoicePanel .invoice-management-search { display: flex; flex: 1 1 310px; align-items: center; gap: 8px; min-width: 0; max-width: 520px; margin: 0 0 0 auto; }
#funds #fundsInvoicePanel .invoice-management-search > input { box-sizing: border-box; flex: 1 1 200px; width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 7px 11px; border: 1px solid #d6e0f0; border-radius: 6px; background: #fff; }
#funds #fundsInvoicePanel .invoice-management-search > button { flex: 0 0 auto; height: 36px; min-height: 36px; padding: 6px 14px; white-space: nowrap; }
#funds #fundsInvoicePanel .invoice-list-note { margin: 0; padding: 9px 12px; border-top: 1px solid #e8edf5; color: #75849a; font-size: 11px; line-height: 1.5; }
#funds #fundsInvoicePanel .invoice-table-wrap { max-width: 100%; overflow: auto; }
#funds #fundsInvoicePanel .invoice-table { width: 100%; min-width: 1000px; table-layout: fixed; }
#funds #fundsInvoicePanel .invoice-col-merge { width: 4%; }
#funds #fundsInvoicePanel .invoice-col-time { width: 11%; }
#funds #fundsInvoicePanel .invoice-col-customer { width: 13%; }
#funds #fundsInvoicePanel .invoice-col-statement { width: 10%; }
#funds #fundsInvoicePanel .invoice-col-amount { width: 10%; }
#funds #fundsInvoicePanel .invoice-col-profile { width: 14%; }
#funds #fundsInvoicePanel .invoice-col-status { width: 11%; }
#funds #fundsInvoicePanel .invoice-col-file { width: 12%; }
#funds #fundsInvoicePanel .invoice-col-actions { width: 15%; }
#funds #fundsInvoicePanel .invoice-table th,#funds #fundsInvoicePanel .invoice-table td { box-sizing: border-box; min-width: 0; padding: 9px 8px; vertical-align: middle; }
#funds #fundsInvoicePanel .invoice-table td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#funds #fundsInvoicePanel .invoice-table td > strong,#funds #fundsInvoicePanel .invoice-table td > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#funds #fundsInvoicePanel .invoice-table .invoice-amount { text-align: right; font-variant-numeric: tabular-nums; }
#funds #fundsInvoicePanel .invoice-status.ready { color: #a76a19; background: #fbf1df; }
#funds #fundsInvoicePanel .invoice-status.sent { color: #138653; background: #e8f7ef; }
#funds #fundsInvoicePanel .invoice-row-actions { flex-wrap: wrap; gap: 6px; }
#funds #fundsInvoicePanel .invoice-row-actions > button { flex: 0 0 auto; padding: 6px; white-space: nowrap; }
#funds #fundsInvoicePanel .invoice-tax-template-status { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 100%; white-space: normal; }
#funds #fundsInvoicePanel .invoice-tax-template-status > small { max-width: 100%; overflow-wrap: anywhere; }
#funds #fundsInvoicePanel .invoice-file-summary { display: grid; min-width: 0; gap: 4px; line-height: 1.4; }
#funds #fundsInvoicePanel .invoice-formal-file { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; color: #315fd8; background: none; box-shadow: none; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; cursor: pointer; }
#funds #fundsInvoicePanel .invoice-formal-file > span:not(.invoice-file-kind) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#funds #fundsInvoicePanel .invoice-formal-file:hover { color: #1744bc; text-decoration: underline; }
#funds #fundsInvoicePanel .invoice-formal-file:focus-visible { outline: 2px solid #8ca9ef; outline-offset: 2px; }
#funds #fundsInvoicePanel .invoice-file-kind { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 24px; padding: 2px 4px; border-radius: 4px; color: #b94a4c; background: #fcebed; font-size: 9px; font-weight: 700; line-height: 1.2; text-decoration: none; }
#funds #fundsInvoicePanel .invoice-file-sync { display: block; color: #bf7824; font-size: 11px; white-space: normal; }
#funds #fundsInvoicePanel .invoice-file-sync.synced { color: #138653; }
#funds #fundsInvoicePanel .invoice-file-sync.pending { color: #bf7824; }
#funds #fundsInvoicePanel .invoice-file-muted { color: #8895a8; font-size: 11px; white-space: normal; }
#fundsInvoiceFilePreviewDialog { position: fixed; inset: 0; box-sizing: border-box; width: min(980px,calc(100vw - 24px)); height: min(800px,calc(100dvh - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: hidden; border: 1px solid #cad6e9; border-radius: 12px; color: #253d5e; background: #fff; box-shadow: 0 20px 64px #10284740; }
#fundsInvoiceFilePreviewDialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
#fundsInvoiceFilePreviewDialog::backdrop { background: #142b4b66; }
#fundsInvoiceFilePreviewDialog .invoice-file-preview-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 12px; border-bottom: 1px solid #dce3ef; background: #f8faff; }
#fundsInvoiceFilePreviewDialog .invoice-file-preview-header > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
#fundsInvoiceFilePreviewDialog .invoice-file-preview-header > button { flex: 0 0 auto; min-height: 34px; padding: 6px 12px; white-space: nowrap; }
#fundsInvoiceFilePreviewDialog .invoice-file-preview-body { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); min-width: 0; min-height: 0; place-items: center; overflow: auto; background: #edf1f6; font-size: 12px; }
#fundsInvoiceFilePreviewDialog .invoice-file-preview-body > img { display: block; width: 100%; max-width: 100%; height: 100%; max-height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
#fundsInvoiceFilePreviewDialog .invoice-file-preview-body > iframe { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; border: 0; background: #fff; }
#fundsInvoiceUploadDialog { position: fixed; inset: 0; box-sizing: border-box; width: min(440px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); margin: auto; padding: 18px; overflow: auto; border: 1px solid #cad6e9; border-radius: 12px; color: #253d5e; background: #fff; box-shadow: 0 20px 64px #10284740; }
#fundsInvoiceUploadDialog::backdrop { background: #142b4b66; }
#fundsInvoiceProfileCorrectionDialog { position: fixed; inset: 0; box-sizing: border-box; width: min(620px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); margin: auto; padding: 20px; overflow: auto; border: 1px solid #cad6e9; border-radius: 12px; color: #253d5e; background: #fff; box-shadow: 0 20px 64px #10284740; }
#fundsInvoiceProfileCorrectionDialog::backdrop { background: #142b4b66; }
#fundsInvoiceProfileCorrectionDialog p { margin: 0; font-size: 13px; line-height: 1.6; }
#fundsInvoiceProfileCorrectionDialog .invoice-upload-field { display: grid; gap: 6px; }
#fundsInvoiceProfileCorrectionDialog textarea { box-sizing: border-box; width: 100%; }
#fundsInvoiceProfileCorrectionDialog .follow-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
#fundsInvoiceProfileCorrectionDialog [hidden] { display: none; }
.invoice-tax-model-choice-source { display: block; margin-top: 3px; color: #687d99; font-size: 11px; }
#fundsInvoiceUploadDialog .follow-confirm-card { display: grid; gap: 12px; }
#fundsInvoiceUploadDialog .follow-confirm-heading { display: flex; align-items: center; gap: 10px; }
#fundsInvoiceUploadDialog .follow-confirm-heading small,#fundsInvoiceUploadDialog .follow-confirm-heading strong { display: block; }
#fundsInvoiceUploadDialog .follow-confirm-heading small { margin-bottom: 3px; color: #6d7e94; font-size: 12px; }
#fundsInvoiceUploadDialog dl { display: grid; gap: 5px; margin: 0; }
#fundsInvoiceUploadDialog dl > div { display: grid; grid-template-columns: 108px minmax(0,1fr); gap: 8px; padding: 7px 9px; border-radius: 6px; background: #f5f8fc; }
#fundsInvoiceUploadDialog dt { color: #74849a; font-size: 11px; }
#fundsInvoiceUploadDialog dd { min-width: 0; margin: 0; color: #263e5f; overflow-wrap: anywhere; font-size: 12px; }
#fundsInvoiceUploadDialog .invoice-upload-field { display: grid; gap: 6px; font-size: 12px; }
#fundsInvoiceUploadDialog .invoice-upload-field input { box-sizing: border-box; width: 100%; min-width: 0; height: auto; padding: 8px 10px; border: 1px solid #ccd8e8; border-radius: 6px; color: #253d5e; background: #fff; }
#fundsInvoiceUploadDialog .invoice-review-check { display: flex; align-items: flex-start; gap: 8px; color: #435970; font-size: 12px; line-height: 1.5; }
#fundsInvoiceUploadDialog .invoice-review-check input { flex: 0 0 auto; margin-top: 3px; }
#fundsInvoiceUploadDialog .invoice-upload-hint { margin: -5px 0 0; color: #8391a4; font-size: 11px; }
#fundsInvoiceUploadDialog .invoice-review-error { margin: 0; color: #b33b32; font-size: 12px; }
#fundsInvoiceUploadDialog .invoice-review-error[hidden] { display: none; }
#fundsInvoiceUploadDialog .follow-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
#invoiceDetailModal .invoice-files-detail { min-width: 0; padding-top: 6px; font-size: 11px; }
#invoiceDetailModal .invoice-files-detail summary { color: #526d91; cursor: pointer; }
#invoiceDetailModal .invoice-files-detail ul { display: grid; max-height: 150px; gap: 6px; margin: 8px 0; padding: 0; overflow: auto; list-style: none; }
#invoiceDetailModal .invoice-files-detail li { display: grid; gap: 3px; padding: 6px 8px; border-radius: 6px; background: #f4f7fc; }
#invoiceDetailModal .invoice-files-detail li span { overflow-wrap: anywhere; }
#invoiceDetailModal .invoice-files-detail li small { color: #7a8aa0; }
#invoiceDetailModal .invoice-file-link { display: inline-block; justify-self: start; width: auto; max-width: 100%; min-width: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; color: #315fd8; background: none; box-shadow: none; text-align: left; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; cursor: pointer; }
#invoiceDetailModal .invoice-file-link:hover { color: #1744bc; text-decoration: underline; }
#invoiceDetailModal .invoice-file-link:focus-visible { outline: 2px solid #8ca9ef; outline-offset: 2px; }
#invoiceDetailModal { z-index: 1300; align-items: center; }
.invoice-detail-modal-panel { box-sizing: border-box; display: grid; width: min(1420px, calc(100vw - 36px)); height: min(850px, calc(100vh - 36px)); grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.invoice-detail-modal-panel .modal-bar > div { display: flex; min-width: 0; align-items: center; gap: 10px; }.invoice-detail-modal-panel .modal-bar span { overflow: hidden; color: #7b8799; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-detail-body { display: grid; min-height: 0; grid-template-rows: auto auto auto auto auto minmax(120px, 1fr) auto; gap: 8px; overflow: hidden; padding: 10px; }
.finance-process-drawer-panel .invoice-detail-body.has-tax-warning { overflow-y: auto; }
.invoice-detail-lock { display: grid; gap: 4px; padding: 8px 11px; border: 1px solid #bde4cf; border-radius: 8px; color: #138653; background: #eef9f3; }.invoice-detail-lock span { font-size: 10px; }
.invoice-detail-lock.is-warning { min-height: 196px; max-height: 210px; grid-template-rows: auto auto minmax(112px, 1fr); overflow: hidden; border-color: #f2d39a; color: #9a5a0b; background: #fff9ed; }
.invoice-tax-gate { min-width: 0; }
.invoice-tax-gate-head { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; }
.invoice-tax-gate-head > strong { flex: 0 0 auto; }
.invoice-tax-gate-head > span { min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.invoice-tax-gate > p { margin: 0; color: #8b6b3c; font-size: 10px; }
.invoice-tax-summary-chips { display: flex; min-width: 0; align-items: center; gap: 5px; overflow-x: auto; padding-bottom: 1px; scrollbar-width: thin; }
.invoice-tax-summary-chips > span { flex: 0 0 auto; padding: 3px 7px; border: 1px solid rgba(19,134,83,.16); border-radius: 999px; color: #3c6d58; background: rgba(255,255,255,.72); white-space: nowrap; }
.invoice-tax-summary-chips b { color: #137e56; font-variant-numeric: tabular-nums; }
.invoice-tax-issue-list { display: flex; min-height: 112px; max-height: 150px; flex-direction: column; gap: 5px; overflow-y: auto; padding-right: 2px; scrollbar-gutter: stable; }
.invoice-lifecycle-panel { grid-template-columns: 1fr; align-items: stretch; }
.invoice-lifecycle-panel > .invoice-lifecycle-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.invoice-lifecycle-head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.invoice-lifecycle-panel > .invoice-lifecycle-history { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 7px; width: 100%; padding-top: 8px; border-top: 1px solid #e0e7f2; }
.invoice-lifecycle-history > div { display: grid; min-width: 0; gap: 3px; padding: 7px 9px; border-radius: 7px; background: #fff; }.invoice-lifecycle-history span { color: #68758b; font-size: 10px; }.invoice-lifecycle-history strong,.invoice-lifecycle-history small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.invoice-lifecycle-history strong { color: #344158; font-size: 11px; }.invoice-audit-error { color: #b23b35 !important; }
.tax-mapping-issue { min-height: 34px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(154,90,11,.16); border-radius: 7px; background: rgba(255,255,255,.7); }
.tax-mapping-issue > summary { position: relative; box-sizing: border-box; display: flex; min-width: 0; min-height: 34px; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px; cursor: pointer; list-style: none; }
.tax-mapping-issue > summary::-webkit-details-marker { display: none; }
.tax-mapping-issue > summary::after { flex: 0 0 auto; content: "▾"; color: #9a6a27; transform: rotate(-90deg); transition: transform .15s ease; }
.tax-mapping-issue[open] > summary::after { transform: rotate(0); }
.tax-mapping-issue > summary > span { display: flex; min-width: 0; align-items: center; gap: 8px; }
.tax-mapping-issue > summary strong { overflow: hidden; color: #76501f; text-overflow: ellipsis; white-space: nowrap; }
.tax-mapping-issue > summary small { flex: 0 0 auto; color: #a06b28; white-space: nowrap; }
.tax-mapping-issue > summary em { flex: 0 0 auto; margin-left: auto; color: #9a6a27; font-size: 9px; font-style: normal; }
.tax-mapping-issue-body { display: grid; gap: 6px; padding: 0 8px 8px; border-top: 1px solid rgba(154,90,11,.1); }
.tax-mapping-issue-body ul { display: grid; gap: 2px; margin: 6px 0 0; padding-left: 17px; color: #875a20; font-size: 10px; }
.tax-mapping-suggestion-source { margin: 0; padding: 5px 7px; border-radius: 5px; color: #336d59; background: #edf8f3; font-size: 9px; }
.tax-mapping-empty { padding: 8px; color: #936a33; font-size: 10px; text-align: center; }
.tax-mapping-inline { display: grid; grid-template-columns: minmax(180px,2fr) minmax(160px,1.4fr) minmax(90px,.7fr) minmax(70px,.6fr) auto; gap: 7px; }
.tax-mapping-inline input,.invoice-number-inline { min-width: 0; height: 31px; padding: 5px 8px; border: 1px solid #d9e1ed; border-radius: 6px; background: #fff; }
.input-invoice-preview-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px; border: 1px solid #dce5f2; border-radius: 9px; background: #f7f9fd; }
.input-invoice-preview-summary strong { margin-right: auto; }.input-invoice-preview-summary span { padding: 4px 8px; border-radius: 999px; background: #fff; }
.input-invoice-errors { max-height: 130px; margin: 10px 0; overflow: auto; color: #b94141; }
.funds-follow-input textarea { width: 100%; min-height: 86px; resize: vertical; padding: 9px 10px; border: 1px solid #d8e1ee; border-radius: 7px; font: inherit; }
.invoice-detail-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #dfe6f1; border-radius: 8px; background: #fff; }.invoice-detail-meta > div { display: grid; min-width: 0; gap: 3px; padding: 7px 10px; border-right: 1px solid #e5eaf2; }.invoice-detail-meta > div:last-child { border-right: 0; }.invoice-detail-meta span { color: #7b8799; font-size: 9px; }.invoice-detail-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-detail-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.invoice-detail-controls label { display: flex; align-items: center; gap: 6px; color: #68758b; }
.invoice-detail-table-wrap { min-width: 0; min-height: 0; overflow-x: scroll; overflow-y: scroll; border: 1px solid #dfe6f1; border-radius: 8px; scrollbar-gutter: stable both-edges; }.invoice-detail-table { width: 100%; min-width: 1250px; border-collapse: collapse; font-size: 11px; }.invoice-detail-table th { position: sticky; z-index: 2; top: 0; padding: 10px; color: #657187; background: #f2f5fa; text-align: left; white-space: nowrap; }.invoice-detail-table td { padding: 10px; border-top: 1px solid #e8edf5; white-space: nowrap; }.invoice-detail-table td:nth-child(8) { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.invoice-detail-body > .invoice-lifecycle-panel,.invoice-detail-body > .invoice-audit-panel { margin: 0; }
.invoice-detail-table tr.invoice-detail-voided td { color: #9aa2b1; background: #fafafa; text-decoration: line-through; }.invoice-detail-voided-status { display: inline-block; padding: 3px 7px; border-radius: 999px; color: #b23a3a; background: #fcebec; font-weight: 700; text-decoration: none; }
.invoice-detail-footer { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid #e1e7f0; background: #fff; }.invoice-detail-footer > span { color: #68758b; }.invoice-detail-footer > button:first-of-type { margin-left: auto; }.invoice-detail-pages { display: flex; gap: 5px; }.invoice-detail-pages button { padding: 6px 10px; border: 1px solid #d8e0ec; border-radius: 5px; color: #536077; background: #fff; cursor: pointer; }.invoice-detail-pages button.active { color: #fff; border-color: #315fd8; background: #315fd8; }.invoice-detail-pages button:disabled { cursor: not-allowed; opacity: .45; }

/* 销项开票明细是独立工作台，不继承资金管理其他右侧抽屉的强制布局。 */
#invoiceDetailModal.invoice-workbench-modal {
  box-sizing: border-box;
  z-index: 1300;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overscroll-behavior: contain;
  background: rgba(13, 27, 53, .38);
}

#invoiceDetailModal .invoice-workbench-dialog {
  position: relative;
  box-sizing: border-box;
  display: grid;
  width: min(1280px, 82vw);
  height: min(840px, calc(100dvh - 40px));
  min-width: min(760px, calc(100vw - 32px));
  min-height: min(520px, calc(100dvh - 32px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 24px 72px rgba(16, 37, 70, .3);
  transform: translateZ(0);
}

#invoiceDetailModal .invoice-workbench-dialog.is-positioned {
  position: fixed;
}

#invoiceDetailModal .invoice-workbench-dialog.is-dragging,
#invoiceDetailModal .invoice-workbench-dialog.is-resizing {
  box-shadow: 0 30px 90px rgba(16, 37, 70, .4);
  user-select: none;
}

#invoiceDetailModal .invoice-workbench-dialog.is-dirty {
  box-shadow: 0 0 0 2px rgba(49, 95, 216, .22), 0 24px 72px rgba(16, 37, 70, .3);
}

#invoiceDetailModal .invoice-workbench-dialog.is-maximized {
  position: fixed !important;
  inset: 8px !important;
  width: auto !important;
  height: auto !important;
  max-width: none;
  max-height: none;
  border-radius: 9px;
}

.invoice-workbench-dialog .invoice-detail-body {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 9px;
}
.invoice-workbench-dialog .invoice-detail-footer { min-width: 0; gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
.invoice-workbench-dialog .invoice-detail-footer > button { white-space: nowrap; }

#invoiceDetailModal .invoice-workbench-titlebar {
  position: relative;
  z-index: 12;
  min-width: 0;
  gap: 14px;
  padding: 9px 12px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: linear-gradient(180deg, #fbfcff 0%, #f3f6fc 100%);
}

.invoice-workbench-dialog.is-dragging .invoice-workbench-titlebar { cursor: grabbing; }
.invoice-workbench-heading { display: grid !important; min-width: 0; flex: 1 1 auto; justify-content: stretch !important; gap: 2px !important; }
.invoice-workbench-titleline { display: flex; min-width: 0; align-items: baseline; gap: 7px; }
.invoice-workbench-titleline > strong:first-child { flex: 0 0 auto; color: #1e3151; font-size: 15px; }
.invoice-workbench-titleline > span { flex: 0 0 auto; color: #94a0b2; }
.invoice-workbench-customer { min-width: 0; overflow: hidden; color: #315fd8; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-workbench-subtitle { display: block; min-width: 0; overflow: hidden; color: #75839a !important; font-size: 10px !important; text-overflow: ellipsis; white-space: nowrap; }
.invoice-workbench-title-actions { display: flex !important; flex: 0 0 auto; align-items: center; justify-content: flex-end !important; gap: 6px !important; }
.invoice-workbench-window-button { min-width: 68px; padding: 6px 10px; cursor: pointer; }

.invoice-workbench-resize-handle {
  position: absolute;
  z-index: 20;
  display: block;
  touch-action: none;
}
.invoice-workbench-resize-handle.is-n,
.invoice-workbench-resize-handle.is-s { left: 16px; right: 16px; height: 8px; cursor: ns-resize; }
.invoice-workbench-resize-handle.is-n { top: -3px; }
.invoice-workbench-resize-handle.is-s { bottom: -3px; }
.invoice-workbench-resize-handle.is-e,
.invoice-workbench-resize-handle.is-w { top: 16px; bottom: 16px; width: 8px; cursor: ew-resize; }
.invoice-workbench-resize-handle.is-e { right: -3px; }
.invoice-workbench-resize-handle.is-w { left: -3px; }
.invoice-workbench-resize-handle.is-ne,
.invoice-workbench-resize-handle.is-nw,
.invoice-workbench-resize-handle.is-se,
.invoice-workbench-resize-handle.is-sw { width: 18px; height: 18px; }
.invoice-workbench-resize-handle.is-ne { top: -3px; right: -3px; cursor: nesw-resize; }
.invoice-workbench-resize-handle.is-nw { top: -3px; left: -3px; cursor: nwse-resize; }
.invoice-workbench-resize-handle.is-se { right: -3px; bottom: -3px; cursor: nwse-resize; }
.invoice-workbench-resize-handle.is-sw { bottom: -3px; left: -3px; cursor: nesw-resize; }
.invoice-workbench-resize-handle.is-ne::after,
.invoice-workbench-resize-handle.is-nw::after,
.invoice-workbench-resize-handle.is-se::after,
.invoice-workbench-resize-handle.is-sw::after {
  position: absolute;
  width: 7px;
  height: 7px;
  border-color: #9aabd0;
  border-style: solid;
  content: "";
  opacity: .7;
}
.invoice-workbench-resize-handle.is-ne::after { top: 3px; right: 3px; border-width: 1px 1px 0 0; }
.invoice-workbench-resize-handle.is-nw::after { top: 3px; left: 3px; border-width: 1px 0 0 1px; }
.invoice-workbench-resize-handle.is-se::after { right: 3px; bottom: 3px; border-width: 0 1px 1px 0; }
.invoice-workbench-resize-handle.is-sw::after { bottom: 3px; left: 3px; border-width: 0 0 1px 1px; }
.invoice-workbench-resize-handle:hover::after { border-color: #315fd8; opacity: 1; }
.invoice-workbench-dialog.is-maximized .invoice-workbench-resize-handle { display: none; }

/* 合并“客户确认 + 发票生命周期”后的单行状态区。 */
#invoiceDetailModal .invoice-workbench-statusbar {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  grid-template-columns: none;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #cbe5d8;
  border-radius: 8px;
  color: #176c4b;
  background: #f0faf5;
}
#invoiceDetailModal .invoice-workbench-status-main { display: flex; min-width: 0; flex: 1 1 auto; align-items: center; justify-content: flex-start; gap: 7px; flex-wrap: wrap; }
.invoice-workbench-status-main > div:first-child { display: flex; min-width: 0; align-items: center; gap: 7px; flex-wrap: wrap; }
.invoice-workbench-status-main > strong { color: #138653; white-space: nowrap; }
.invoice-workbench-lock { color: #138653; white-space: nowrap; }
.invoice-workbench-status-meta { min-width: 0; overflow: hidden; color: #607268; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-workbench-status-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: auto; }
.invoice-workbench-status-history { margin-left: auto; }
.invoice-workbench-history { position: relative; flex: 0 0 auto; margin-left: auto; }
.invoice-workbench-history > summary { padding: 5px 8px; border: 1px solid #c9ded3; border-radius: 6px; color: #356a55; background: rgba(255,255,255,.72); cursor: pointer; list-style: none; font-size: 10px; font-weight: 700; white-space: nowrap; }
.invoice-workbench-history > summary::-webkit-details-marker { display: none; }
.invoice-workbench-history > .invoice-lifecycle-history { position: absolute; z-index: 70; top: calc(100% + 6px); right: 0; display: grid; width: min(720px, calc(100vw - 64px)); max-height: 280px; grid-template-columns: repeat(2, minmax(210px, 1fr)); gap: 6px; overflow-y: auto; padding: 8px; border: 1px solid #ccd9e8; border-radius: 8px; background: #fff; box-shadow: 0 14px 36px rgba(24,42,72,.2); }

.invoice-terminal-workbench { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid #efcf9e; border-radius: 8px; color: #825214; background: #fff8eb; }
.invoice-terminal-workbench > div { display: grid; min-width: 0; gap: 3px; }
.invoice-terminal-workbench strong { color: #a45e08; font-size: 13px; }
.invoice-terminal-workbench span { color: #765d3b; font-size: 11px; }
.invoice-terminal-workbench small { color: #9a6b31; font-size: 10px; }
.invoice-terminal-workbench p { flex: 0 1 520px; margin: 0; color: #705938; font-size: 10px; line-height: 1.5; }

.invoice-tax-gate--compact { min-height: 0 !important; max-height: none !important; grid-template-columns: minmax(230px, auto) minmax(0, 1fr); grid-template-rows: auto !important; align-items: center; gap: 8px; padding: 6px 9px; overflow: visible !important; }
.invoice-tax-gate--compact .invoice-tax-summary-chips { justify-content: flex-end; }
.invoice-tax-gate--compact.is-valid { border-color: #bde4cf; color: #138653; background: #eef9f3; }
.invoice-tax-gate--compact.is-frozen { border-color: #cbd8f5; color: #315fd8; background: #f1f5ff; }
.invoice-workbench-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.invoice-workbench-dialog .invoice-detail-controls { min-width: 0; padding-inline: 2px; }
.invoice-workbench-dialog .invoice-detail-controls > small { min-width: 0; overflow: hidden; color: #7b8799; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-workbench-dialog .invoice-detail-controls > label { flex: 0 0 auto; margin-left: auto; }

/* 订单主行和税务匹配次行共用一个可滚动工作区。 */
.invoice-workbench-order-tax {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #dfe6f1;
  border-radius: 9px;
  background: #fff;
}
.invoice-workbench-order-tax-head { display: flex; min-width: 0; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #e2e8f2; background: #f7f9fd; }
.invoice-workbench-order-tax-head > strong { color: #263955; }
.invoice-workbench-order-tax-head > span { min-width: 0; overflow: hidden; color: #728097; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-workbench-order-tax-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; margin-left: auto; }
.invoice-workbench-order-tax-list { min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable; }
/* 税局模板的十一列原序呈现：每条有效订单仅一行，金额只读。 */
#invoiceDetailModal .invoice-template-scroll { display: block; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
#invoiceDetailModal .invoice-template-table { width: 1627px; min-width: 100%; table-layout: fixed; border-spacing: 0; border-collapse: separate; font-size: 12px; }
#invoiceDetailModal .invoice-template-table th { position: sticky; z-index: 2; top: 0; height: 38px; padding: 6px; border-bottom: 1px solid #dbe3ef; border-right: 1px solid #e4eaf2; color: #596a83; background: #f3f6fb; text-align: left; font-size: 11px; font-weight: 600; }
#invoiceDetailModal .invoice-template-table th small { display: block; color: #728298; font-size: 10px; }
#invoiceDetailModal .invoice-template-table td { height: 48px; padding: 5px 6px; border-right: 1px solid #edf0f5; border-bottom: 1px solid #e5eaf2; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
#invoiceDetailModal .invoice-template-table tbody tr:nth-child(even) { background: #f8faff; }
#invoiceDetailModal .invoice-template-table tbody tr:hover { background: #eef4ff; }
#invoiceDetailModal .invoice-template-table .is-number { text-align: right; font-variant-numeric: tabular-nums; }
#invoiceDetailModal .invoice-template-table input { width: 100%; min-width: 0; height: 31px; padding: 5px 7px; border: 1px solid #ccd8e9; border-radius: 5px; color: #223855; background: #fff; font-size: 12px; }
#invoiceDetailModal .invoice-template-table input:focus { border-color: #315fd8; outline: 2px solid #315fd81c; }
#invoiceDetailModal .invoice-template-table .is-missing { background: #fff7ec; }
#invoiceDetailModal .invoice-template-table .is-missing input { border-color: #e8b573; }
#invoiceDetailModal .invoice-template-table .invoice-template-row-number { color: #7e8ba0; text-align: center; }
#invoiceDetailModal .invoice-template-amount { font-weight: 700; color: #213e6b; }
#invoiceDetailModal .invoice-template-source { white-space: normal !important; }
#invoiceDetailModal .invoice-template-source > span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: 10px; }
#invoiceDetailModal .invoice-template-table .invoice-tax-model-cell { height: auto; min-height: 48px; overflow: visible; white-space: normal; }
#invoiceDetailModal .invoice-tax-model-source { display: block; overflow: hidden; color: #2e4567; font-weight: 600; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
#invoiceDetailModal .invoice-tax-model-export-select { display: block; width: 100%; height: 23px; min-height: 0; margin-top: 3px; padding: 1px 4px; border: 1px solid #cbd8ee; border-radius: 4px; color: #315fd8; background: #f6f9ff; font-size: 10px; }
#invoiceDetailModal .invoice-tax-model-export-select.is-blank { border-color: #e4b4a7; color: #aa4a37; background: #fff5f1; }
#invoiceDetailModal .invoice-tax-model-export-select.is-unknown { border-color: #e4b573; color: #9b5e14; background: #fff8eb; }
#invoiceDetailModal .invoice-tax-model-export-badge { display: inline-block; margin-top: 3px; padding: 2px 5px; border-radius: 4px; color: #2e7958; background: #eaf7ef; font-size: 9px; font-weight: 700; }
#invoiceDetailModal .invoice-tax-model-export-badge.is-blank { color: #a34c39; background: #fff0eb; }
#invoiceDetailModal .invoice-tax-model-export-badge.is-unknown { color: #9b5e14; background: #fff1d8; }
#invoiceDetailModal .invoice-template-row.is-model-pending { background: #fffaf0; }
#invoiceDetailModal .invoice-template-source .invoice-template-order-no { max-width: 122px; margin-left: 3px; color: #78869b; }
#invoiceDetailModal .invoice-template-source select { display: block; width: 100%; height: 23px; min-height: 0; margin-top: 3px; padding: 1px 4px; border: 1px solid #dce4ef; border-radius: 4px; color: #456897; background: #fff; font-size: 10px; }
#invoiceDetailModal .invoice-template-source small { display: block; overflow: hidden; color: #a26720; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
#invoiceDetailModal .invoice-template-source .invoice-snapshot-price-notice { color: #728097; white-space: normal; line-height: 1.35; }
#invoiceDetailModal .invoice-template-source-toggle { display: inline-block; height: 22px; margin-left: 4px; padding: 1px 5px; border: 1px solid #cdddf2; border-radius: 4px; color: #315f9c; background: #eff5ff; font-size: 10px; vertical-align: middle; }
#invoiceDetailModal .invoice-template-source-detail > td { height: auto; padding: 5px 10px; border-left: 3px solid #b6cdf0; background: #f5f8fd; }
#invoiceDetailModal .invoice-template-source-scroll { max-height: 245px; overflow: auto; }
#invoiceDetailModal .invoice-template-source-scroll > table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 11px; }
#invoiceDetailModal .invoice-template-source-scroll th { top: 0; height: 28px; padding: 4px 6px; background: #eaf0fa; }
#invoiceDetailModal .invoice-template-source-scroll td { height: 27px; padding: 4px 6px; font-weight: 400; }
.invoice-template-revision-comparison { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding: 7px 0 0; border-top: 1px solid #d4deed; font-size: 11px; }
.invoice-template-revision-comparison strong { color: #315fd8; }
.invoice-template-revision-comparison small { color: #6c7b91; }
.invoice-template-mode { flex: 0 0 auto; padding: 3px 7px; border-radius: 5px; color: #1b7192; background: #eaf7fb; font-size: 11px; font-weight: 600; }
.invoice-template-totals { display: flex; align-items: center; justify-content: flex-end; gap: 20px; min-height: 30px; padding: 5px 8px; border: 1px solid #dce5f1; border-radius: 6px; color: #77849a; background: #f8faff; font-size: 11px; }
.invoice-template-totals strong { margin-left: 4px; color: #244268; font-variant-numeric: tabular-nums; }
.invoice-tax-profile-popover { position: fixed; z-index: 50000; display: flex; box-sizing: border-box; min-height: 0; flex-direction: column; overflow: hidden; padding: 6px; border: 1px solid #b9cbe4; border-radius: 8px; color: #274366; background: #fff; box-shadow: 0 12px 36px #1a345b33; }
.invoice-tax-profile-popover-heading { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 6px 7px; border-bottom: 1px solid #e6ecf4; }
.invoice-tax-profile-popover-heading strong { font-size: 12px; }
.invoice-tax-profile-popover-heading small { color: #7a8a9f; font-size: 11px; }
.invoice-tax-profile-list { min-height: 0; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.invoice-tax-profile-popover button.invoice-tax-profile-choice { position: static !important; display: grid !important; box-sizing: border-box; width: 100%; height: auto !important; min-height: 0 !important; max-height: none !important; grid-template-rows: repeat(4, auto); align-content: start; align-items: start; gap: 3px; margin: 0; padding: 7px 8px; border: 0; border-bottom: 1px solid #edf1f7; border-radius: 4px; color: #294c78; background: #fff; line-height: 1.35; text-align: left; white-space: normal; cursor: pointer; }
.invoice-tax-profile-popover button:hover,.invoice-tax-profile-popover button:focus { outline: none; background: #eaf2ff; }
.invoice-tax-profile-popover button.invoice-tax-profile-choice > * { position: static !important; display: block; box-sizing: border-box; min-width: 0; height: auto !important; margin: 0; overflow: visible; transform: none !important; text-overflow: clip; white-space: normal; }
.invoice-tax-profile-title strong { display: block; color: #24476f; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.invoice-tax-profile-title b { display: block; margin-top: 1px; color: #6b7f99; font-size: 10px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.invoice-tax-profile-popover .invoice-tax-profile-meta { color: #425f83; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1.35; overflow-wrap: anywhere; }
.invoice-tax-profile-popover .invoice-tax-profile-evidence { color: #8290a4; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.invoice-tax-profile-popover p { padding: 8px; color: #8e6b35; font-size: 12px; }
.invoice-tax-profile-popover .invoice-tax-profile-message { flex: 0 0 auto; margin: 0; border-bottom: 1px solid #edf1f7; color: #60738e; background: #f7f9fd; font-size: 11px; line-height: 1.35; }
.invoice-tax-profile-popover .invoice-tax-profile-empty { margin: 0; line-height: 1.5; }
.invoice-tax-profile-popover .invoice-tax-profile-conflict { display: block; margin: 1px 0 0; padding: 3px 5px; border-radius: 4px; color: #a52d27; background: #fff0ee; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; white-space: normal; }
#invoiceDetailModal .invoice-template-table td.is-product-conflict { height: auto; min-height: 48px; overflow: visible; background: #fff0ee; white-space: normal; }
.invoice-tax-product-conflict { display: block; margin-top: 3px; color: #bd332c; font-size: 9px; font-weight: 700; line-height: 1.25; white-space: normal; }
.invoice-order-tax-row { min-width: 940px; border-bottom: 1px solid #e8edf5; background: #fff; }
.invoice-order-tax-row:last-child { border-bottom: 0; }
.invoice-order-tax-row.is-voided { color: #929cad; background: #fafbfc; }
.invoice-order-tax-row.is-attention { box-shadow: inset 3px 0 #e1a041; }
.invoice-order-tax-main {
  display: grid;
  min-width: 0;
  min-height: 42px;
  grid-template-columns: minmax(130px, 1.05fr) minmax(190px, 1.55fr) minmax(115px, .85fr) minmax(95px, .72fr) minmax(220px, 1.7fr) minmax(92px, .7fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
}
.invoice-order-tax-main > * { min-width: 0; }
.invoice-order-tax-main > div { overflow: hidden; }
.invoice-order-tax-main > div > strong,
.invoice-order-tax-main > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-order-tax-main .clip,
.invoice-order-tax-mapping .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-order-tax-main small { display: block; margin-top: 2px; color: #78859a; font-size: 9px; }
.invoice-order-tax-mapping { display: block; min-width: 0; border-top: 1px dashed #e2cfad; background: #fffaf1; }
.invoice-order-tax-mapping > summary { display: flex; min-height: 33px; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; list-style: none; }
.invoice-order-tax-mapping > summary::-webkit-details-marker { display: none; }
.invoice-order-tax-mapping > summary::after { flex: 0 0 auto; margin-left: auto; color: #8d6a35; content: "▸"; transition: transform .15s ease; }
.invoice-order-tax-mapping[open] > summary::after { transform: rotate(90deg); }
.invoice-order-tax-mapping > summary > strong { min-width: 0; overflow: hidden; color: #5e4828; text-overflow: ellipsis; white-space: nowrap; }
.invoice-order-tax-mapping > summary > small { min-width: 0; overflow: hidden; color: #8a724c; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.invoice-order-tax-row.is-matched .invoice-order-tax-mapping { border-top-color: #cee5d9; background: #f3faf6; }
.invoice-order-tax-mapping.is-unresolved { border-top-color: #e2cfad; background: #fffaf1; }
.invoice-order-tax-mapping.is-valid { border-top-color: #cee5d9; background: #f3faf6; }
.invoice-order-tax-mapping.is-frozen { border-top-color: #ced9ef; background: #f3f6fd; }
.invoice-order-tax-mapping.is-valid > summary > strong,
.invoice-order-tax-mapping.is-frozen > summary > strong { color: #315f50; }
.invoice-tax-state { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; color: #9a5a0b; background: #fff0d9; font-size: 9px; font-weight: 700; }
.invoice-tax-state.is-valid { color: #138653; background: #e7f6ee; }
.invoice-tax-state.is-frozen { color: #315fd8; background: #eaf0ff; }
.invoice-order-tax-editor { display: grid; grid-template-columns: minmax(200px, .9fr) minmax(0, 2.6fr); gap: 8px; padding: 4px 10px 9px; }
.invoice-order-tax-profile,
.invoice-order-tax-fields > label { display: grid; min-width: 0; gap: 3px; }
.invoice-order-tax-profile > span,
.invoice-order-tax-fields > label > span { color: #7b684b; font-size: 9px; }
.invoice-order-tax-profile select { width: 100%; min-width: 0; height: 31px; }
.invoice-order-tax-fields { display: grid; min-width: 0; grid-template-columns: minmax(180px, 1.8fr) minmax(160px, 1.35fr) minmax(82px, .62fr) minmax(72px, .55fr) minmax(96px, .75fr); gap: 7px; }
.invoice-order-tax-fields input { width: 100%; min-width: 0; height: 31px; padding: 5px 8px; border: 1px solid #d7e0ed; border-radius: 6px; background: #fff; }
.invoice-tax-readonly { display: grid; grid-template-columns: minmax(180px, 1.8fr) minmax(160px, 1.35fr) minmax(82px, .62fr) minmax(72px, .55fr) minmax(160px, 1.3fr); gap: 7px; padding: 4px 10px 9px; }
.invoice-tax-readonly > span { display: grid; min-width: 0; gap: 2px; }
.invoice-tax-readonly small { color: #6f8078; font-size: 9px; }
.invoice-tax-readonly strong { min-width: 0; overflow: hidden; color: #2d5947; text-overflow: ellipsis; white-space: nowrap; }
.invoice-tax-readonly > em { align-self: end; overflow: hidden; color: #5f7f71; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.invoice-tax-reference { margin: 3px 10px 9px; padding: 7px 9px; border-radius: 6px; color: #456457; background: #eff7f3; font-size: 10px; }
.invoice-order-tax-mapping input,
.invoice-order-tax-mapping select { width: 100%; min-width: 0; height: 31px; padding: 5px 8px; border: 1px solid #d7e0ed; border-radius: 6px; background: #fff; }
.invoice-tax-save-all:not([hidden]) { border-color: #91aaf0; color: #315fd8; background: #f1f5ff; }

@media (max-width: 1280px) {
  .statement-summary-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .statement-overview-bar .statement-summary-cards { grid-template-columns: repeat(6, minmax(70px, 1fr)); }.statement-overview-bar .statement-sheet-head { min-width: 235px; flex-basis: 300px; }.statement-overview-bar .statement-card { padding-inline: 8px; }.statement-overview-bar .statement-card strong { font-size: 14px; }
  .portal-statement-list button { flex: 0 0 250px; }
  .statement-payment-card dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .invoice-page-head--combined .invoice-page-title { min-width: 210px; flex-basis: 280px; }.invoice-stats--inline > div { padding-inline: 12px; }
  #fundsInvoicePanel .invoice-page-head--combined { flex-wrap: wrap; }
  #fundsInvoicePanel .invoice-stats--inline.invoice-stats--management { order: 3; flex-basis: 100%; grid-template-columns: repeat(8, minmax(62px, 1fr)); }
  .invoice-lifecycle-panel > .invoice-lifecycle-history { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 980px) {
  #fundsStatementPanel .statement-company-main { flex-basis: 100%; flex-wrap: wrap; overflow: visible; white-space: normal; }
  #fundsStatementPanel .statement-company-main > strong { max-width: min(520px, 70vw); }
  #fundsStatementPanel .statement-history-details { margin-left: 0; }
  #fundsStatementPanel .statement-company-controls { margin-left: auto; }
}

@media (max-width: 720px) {
  .funds-view-tabs {
    display: flex;
    width: 100%;
  }

  .funds-view-tab {
    flex: 1;
    padding-inline: 10px;
  }
  .statement-summary-cards { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .statement-total { gap: 10px; align-items: flex-start; flex-direction: column; }
  .statement-total button { width: 100%; margin-left: 0; }
  .statement-payment-card { grid-template-columns: 1fr; }.statement-payment-card dl { grid-template-columns: repeat(2, minmax(100px, 1fr)); }.statement-orders-toolbar { align-items: center; flex-direction: row; flex-wrap: wrap; }.statement-orders-title { flex-basis: 100%; }.statement-orders-toolbar > input { min-width: 0; width: 100%; flex: 1 1 100%; }.statement-orders-toolbar > select,.statement-orders-toolbar > button { min-width: 0; flex: 1 1 calc(50% - 4px); }.statement-orders-toolbar > label,.statement-orders-toolbar > small { flex: 0 0 auto; }.statement-orders-panel .statement-table-wrap { height: 52vh; min-height: 280px; }
  #customerStatementView .customer-statement-toolbar { align-items: stretch; flex-wrap: wrap; }
  #customerStatementView .customer-statement-toolbar > .customer-statement-title { flex-basis: 100%; }
  .customer-statement-current { order: 2; flex-basis: 100%; margin-left: 0; padding: 8px 0 0; border-top: 1px solid #dce3ef; border-left: 0; }
  .statement-overview-bar { flex-wrap: wrap; }.statement-overview-bar .statement-sheet-head { flex: 1 1 calc(100% - 140px); border-right: 0; }.statement-overview-actions { min-width: 120px; }.statement-overview-bar .statement-summary-cards { order: 3; flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #e1e7f0; }.statement-overview-bar .statement-card { padding: 10px; border-bottom: 1px solid #e1e7f0; }.statement-overview-bar .statement-card:nth-child(2n) { border-right: 0; }
  .invoice-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }.invoice-filter-bar { flex-direction: column; }.invoice-filter-bar select { width: 100%; }
  .invoice-page-head--combined { align-items: stretch; flex-wrap: wrap; }.invoice-page-head--combined .invoice-page-title { flex: 1 1 auto; min-width: 0; border-right: 0; }.invoice-stats--inline { order: 3; flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }.invoice-stats--inline > div { padding: 10px; border-top: 1px solid #e1e7f0; }.invoice-stats--inline > div:nth-child(2) { border-right: 0; }
  #funds #fundsInvoicePanel .invoice-management-head { gap: 4px; padding: 12px; }
  #funds #fundsInvoicePanel .invoice-management-head > span { flex-basis: 100%; font-size: 11px; }
  #funds #fundsInvoicePanel .invoice-management-toolbar { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; padding: 10px 12px; }
  #funds #fundsInvoicePanel #fundsInvoiceStats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; overflow: visible; }
  #funds #fundsInvoicePanel #fundsInvoiceStats .invoice-stat-filter { padding-inline: 9px; }
  #funds #fundsInvoicePanel #fundsInvoiceMoreStatus { grid-column: 1 / -1; width: 100%; }
  #funds #fundsInvoicePanel .invoice-management-search { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; width: 100%; margin: 0; }
  #funds #fundsInvoicePanel .invoice-management-search > input { grid-column: 1 / -1; }
  #funds #fundsInvoicePanel .invoice-management-search > #searchFundsInvoicesBtn { grid-column: 2; }
  #funds #fundsInvoicePanel .invoice-management-search > #refreshFundsInvoicesBtn { grid-column: 3; }
  .invoice-lifecycle-panel > .invoice-lifecycle-head { align-items: stretch; flex-direction: column; }.invoice-lifecycle-panel > .invoice-lifecycle-history { grid-template-columns: 1fr; }
  .finance-process-drawer-panel .invoice-detail-body { display: block; overflow-y: auto; padding: 8px; }
  .finance-process-drawer-panel .invoice-detail-body > * + * { margin-top: 8px; }
  .finance-process-drawer-panel .invoice-detail-table-wrap { height: 44vh; min-height: 260px; }
  .invoice-detail-body.has-tax-warning .invoice-detail-lock.is-warning { min-height: 0; max-height: none; overflow: visible; }
  .invoice-detail-body.has-tax-warning .invoice-tax-issue-list { min-height: 0; max-height: none; overflow: visible; }
  .invoice-tax-gate-head,.tax-mapping-issue > summary { align-items: flex-start; flex-direction: column; }
  .tax-mapping-issue > summary em { margin-left: 0; }
  .tax-mapping-issue > summary::after { position: absolute; right: 18px; }
  .invoice-detail-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .invoice-detail-meta > div:nth-child(2) { border-right: 0; }
  .invoice-detail-meta > div:nth-child(-n+2) { border-bottom: 1px solid #e5eaf2; }
  .tax-mapping-inline { grid-template-columns: 1fr; }
  #invoiceDetailModal.invoice-workbench-modal { align-items: stretch; padding: 0; }
  #invoiceDetailModal .invoice-workbench-dialog,
  #invoiceDetailModal .invoice-workbench-dialog.is-positioned,
  #invoiceDetailModal .invoice-workbench-dialog.is-maximized {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    transform: none !important;
  }
  #invoiceDetailModal .invoice-workbench-titlebar { cursor: default; touch-action: auto; }
  .invoice-workbench-titleline > strong:first-child { display: none; }
  .invoice-workbench-titleline > span { display: none; }
  .invoice-workbench-customer { font-size: 14px; }
  #maximizeInvoiceDetailBtn,
  .invoice-workbench-resize-handle { display: none !important; }
  .invoice-workbench-dialog .invoice-detail-body { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; overflow: hidden; padding: 7px; }
  #invoiceDetailModal .invoice-workbench-statusbar { align-items: flex-start; flex-wrap: wrap; }
  #invoiceDetailModal .invoice-workbench-status-main { align-items: flex-start; }
  .invoice-workbench-status-actions { margin-left: 0; }
  .invoice-workbench-history { margin-left: 0; }
  .invoice-workbench-history > .invoice-lifecycle-history { position: fixed; top: auto; right: 8px; bottom: 64px; left: 8px; width: auto; max-height: 52dvh; grid-template-columns: 1fr; }
  .invoice-tax-gate--compact { grid-template-columns: 1fr; }
  .invoice-tax-gate--compact .invoice-tax-summary-chips { justify-content: flex-start; }
  .invoice-workbench-order-tax-list { overflow: auto; }
  .invoice-order-tax-row { min-width: 860px; }
  .invoice-workbench-dialog .invoice-detail-footer { flex-wrap: wrap; }
  .invoice-workbench-dialog .invoice-detail-footer > span { flex: 1 1 auto; }
  .invoice-workbench-dialog .invoice-detail-footer > button:first-of-type { margin-left: 0; }
  .statement-period-candidate { grid-template-columns: 1fr; }.statement-period-candidate button { width: 100%; }.statement-history { grid-template-columns: 1fr; }
}

/* Customer-account reconciliation: make periods and money movement explicit. */
#funds .funds-reconciliation-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 8px;
  padding: 9px 12px;
  border: 1px solid #efbd83;
  border-radius: 8px;
  color: #8f4f0b;
  background: #fff8ed;
  font-size: 12px;
}
#funds .funds-reconciliation-alert[hidden] { display: none !important; }
#funds .funds-reconciliation-alert strong { flex: 0 0 auto; }
#funds .funds-reconciliation-alert b { color: #c64b32; font-variant-numeric: tabular-nums; }
#funds .funds-customer-workspace .finance-customers-table { min-width: 1240px; }
#funds .funds-customer-workspace .finance-customers-table th > small {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  font-weight: 600;
  opacity: .72;
}
#funds .funds-customer-workspace .finance-customers-table th.fund-col-name { width: 18%; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-account { width: 9%; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-settlement { width: 7%; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-balance { width: 10%; color: #087b5d; background: #eaf9f3; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-today-due { width: 9%; color: #315fd2; background: #edf3ff; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-today-received { width: 9%; color: #087c89; background: #eaf8fa; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-debt { width: 13%; color: #cf3f39; background: #fff0ef; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-reconcilable { width: 12%; color: #a55809; background: #fff6e7; }
#funds .funds-customer-workspace .finance-customers-table th.fund-col-actions { width: 13%; color: #3b4860; background: #f6f8fc; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.balance { color: #087b5d; background: rgba(234,249,243,.58); }
#funds .funds-customer-workspace .finance-customers-table td.money-value.due { color: #315fd2; background: rgba(237,243,255,.68); }
#funds .funds-customer-workspace .finance-customers-table td.money-value.received { color: #087c89; background: rgba(234,248,250,.68); }
#funds .funds-customer-workspace .finance-customers-table td.money-value.debt { color: #cf3f39; background: rgba(255,240,239,.58); }
#funds .funds-customer-workspace .finance-customers-table td.money-value.reconcilable {
  overflow: hidden;
  color: #a55809;
  background: rgba(255,246,231,.66);
  text-overflow: ellipsis;
  white-space: normal;
}
#funds .funds-customer-workspace .finance-customers-table td:nth-child(9) { color: inherit; background: #fff; }
#funds .finance-customers-table .money-value.has-value { font-weight: 800; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.is-zero { font-weight: 400; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.balance.is-zero { color: #7fa99a; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.due.is-zero { color: #91a5cc; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.received.is-zero { color: #80aeb3; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.debt.is-zero { color: #c7a29f; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.reconcilable.is-zero { color: #bea274; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.reconcilable.is-zero .fund-reconciliation-clear { color: inherit; font-weight: inherit; }
#funds .funds-customer-workspace .finance-customers-table td.money-value.is-unknown { color: #8a94a6; font-weight: 400; }
#funds .finance-customers-table .money-value.is-negative {
  color: #b42318 !important;
  background: #ffebe9 !important;
  font-weight: 850;
}
#funds .finance-customers-table .money-value.is-negative small { color: inherit; }
#funds .funds-money-anomaly-label {
  display: block;
  margin-top: 2px;
  color: inherit;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}
#funds .finance-customers-table tr.has-reconciliation-warning td:first-child { box-shadow: inset 3px 0 #dd7a1e; }
#funds .finance-customers-table tr.has-reconciliation-warning.is-selected td:first-child { box-shadow: inset 3px 0 #dd7a1e; }
#funds .money-value.reconcilable { line-height: 1.2; }
#funds .money-value.reconcilable strong,
#funds .money-value.reconcilable small { display: block; }
#funds .money-value.reconcilable small { margin-top: 2px; color: #b76518; font-size: 9px; font-weight: 600; }
#funds .fund-reconciliation-clear,
#funds .fund-reconciliation-unknown { color: #8a94a6; font-weight: 600; }
#funds .funds-detail-reconciliation-warning {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 3px;
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid #efbd83;
  border-radius: 8px;
  color: #8f4f0b;
  background: #fff8ed;
}
#funds .funds-detail-reconciliation-warning > div { display: grid; min-width: 0; gap: 3px; }
#funds .funds-detail-reconciliation-warning > button { white-space: nowrap; }
#funds .funds-detail-reconciliation-warning span { font-size: 11px; line-height: 1.5; }
#funds .funds-detail-reconciliation-warning.is-data-error {
  border-color: #efb8b3;
  color: #b42318;
  background: #ffebe9;
}
#funds .funds-detail-metrics .funds-money-metric { font-variant-numeric: tabular-nums; }
#funds .funds-detail-metrics .funds-money-metric.balance { color: #087b5d; border-color: #c6e9dc; background: #f0faf6; }
#funds .funds-detail-metrics .funds-money-metric.due { color: #315fd2; border-color: #d3ddf7; background: #f3f6ff; }
#funds .funds-detail-metrics .funds-money-metric.received { color: #087c89; border-color: #cce8eb; background: #f1fafb; }
#funds .funds-detail-metrics .funds-money-metric.debt { color: #cf3f39; border-color: #f2d1ce; background: #fff5f4; }
#funds .funds-detail-metrics .funds-money-metric.reconcilable { color: #a55809; border-color: #eedab7; background: #fff9ef; }
#funds .funds-detail-metrics .funds-money-metric.has-value strong { font-weight: 800; }
#funds .funds-detail-metrics .funds-money-metric.is-zero strong { font-weight: 400; }
#funds .funds-detail-metrics .funds-money-metric.balance.is-zero { color: #7fa99a; }
#funds .funds-detail-metrics .funds-money-metric.due.is-zero { color: #91a5cc; }
#funds .funds-detail-metrics .funds-money-metric.received.is-zero { color: #80aeb3; }
#funds .funds-detail-metrics .funds-money-metric.debt.is-zero { color: #c7a29f; }
#funds .funds-detail-metrics .funds-money-metric.reconcilable.is-zero { color: #bea274; }
#funds .funds-detail-metrics .funds-money-metric.is-unknown { color: #8a94a6; }
#funds .funds-detail-metrics .funds-money-metric.is-unknown strong { font-weight: 400; }
#funds .funds-detail-metrics .funds-money-metric.is-negative {
  color: #b42318 !important;
  border-color: #efb8b3 !important;
  background: #ffebe9 !important;
}
#funds .funds-detail-ledger-row {
  display: grid;
  align-items: stretch;
  gap: 7px;
  padding: 11px 0;
}
#funds .funds-detail-ledger-row > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#funds .funds-detail-ledger-row > header > span { min-width: 0; }
#funds .funds-detail-ledger-row > header b,
#funds .funds-detail-ledger-row > header small { display: block; }
#funds .funds-detail-ledger-row > header small { margin-top: 2px; color: #7b8799; }
#funds .funds-detail-ledger-row > header > strong { flex: 0 0 auto; font-size: 12px; }
#funds .funds-detail-ledger-breakdown { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }
#funds .funds-detail-ledger-breakdown > span { display: grid; min-width: 0; gap: 2px; padding: 6px 7px; border-radius: 6px; background: #f6f8fc; }
#funds .funds-detail-ledger-breakdown i { color: #7b8799; font-size: 9px; font-style: normal; }
#funds .funds-detail-ledger-breakdown b { overflow: hidden; color: #344158; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
#funds .funds-detail-ledger-breakdown b.warn { color: #c45e12; }
#funds .funds-detail-ledger-allocation { overflow: hidden; color: #68758b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#funds .finance-ledger-table { min-width: 1900px; }
#funds .finance-ledger-table .finance-amount.allocated { color: #16854f; }
#funds .finance-ledger-table .finance-amount.unallocated { color: #c45e12; font-weight: 800; }
#funds .finance-ledger-table th:nth-child(5),
#funds .finance-ledger-table td:nth-child(5) { width: 180px; min-width: 180px; }
#funds .finance-ledger-table td.funds-ledger-type-cell { overflow: visible; text-overflow: clip; white-space: nowrap; }
#funds .finance-ledger-table .receipt-view-btn--inline { margin-left: 6px; }

/* Final ledger layout: the page-size control belongs to the bottom-left
 * display area; numeric amounts stay intact while allocation text can be
 * inspected in full via the cell tooltip. */
#funds .finance-ledger-wrap { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: auto; }
#funds .finance-ledger-table { width: 100%; min-width: max(100%, 1540px); table-layout: auto; }
#funds .finance-ledger-table th,
#funds .finance-ledger-table td { box-sizing: border-box; }
#funds .finance-ledger-table th:nth-child(7),
#funds .finance-ledger-table td:nth-child(7),
#funds .finance-ledger-table th:nth-child(8),
#funds .finance-ledger-table td:nth-child(8),
#funds .finance-ledger-table th:nth-child(9),
#funds .finance-ledger-table td:nth-child(9),
#funds .finance-ledger-table th:nth-child(10),
#funds .finance-ledger-table td:nth-child(10),
#funds .finance-ledger-table th:nth-child(11),
#funds .finance-ledger-table td:nth-child(11),
#funds .finance-ledger-table th:nth-child(12),
#funds .finance-ledger-table td:nth-child(12) { overflow: visible; text-overflow: clip; white-space: nowrap; }
#funds .finance-ledger-table .finance-amount { display: inline-block; min-width: max-content; white-space: nowrap; }
#funds .finance-ledger-table th:nth-child(15),
#funds .finance-ledger-table td:nth-child(15) { width: 260px; max-width: 260px; }
#funds .finance-ledger-table td.funds-ledger-allocation-cell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#funds .funds-ledger-pager-left { display: inline-flex; min-width: 0; align-items: center; gap: 8px; }
#funds .funds-ledger-pager-left .funds-ledger-display-label { color: #526784; font-weight: 700; }
#funds .funds-ledger-pager-left .funds-ledger-page-size { display: inline-flex; align-items: center; gap: 6px; margin-left: 0; color: var(--muted); white-space: nowrap; }
#funds .funds-ledger-pager-left .funds-ledger-page-size select { width: 82px; height: 30px; padding: 0 8px; }
@media (max-width: 760px) {
  #funds .funds-ledger-pager-left { flex-wrap: wrap; }
}

/* Invoice workbench model evidence and company copy affordance. */
#invoiceDetailModal .invoice-tax-model-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; margin-bottom: 3px; }
#invoiceDetailModal .invoice-tax-model-line .invoice-tax-model-source { flex: 1 1 100px; min-width: 0; max-width: 100%; margin: 0; overflow: visible; overflow-wrap: anywhere; word-break: break-word; text-overflow: clip; white-space: normal; }
#invoiceDetailModal .invoice-input-model-missing { display: inline-block; flex: 0 0 auto; margin: 0; padding: 2px 4px; border-radius: 4px; color: #b42318; background: #fff0ee; font-size: 9px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
#invoiceDetailModal .invoice-workbench-copy-company { flex: 0 0 auto; margin-left: 4px; padding: 2px 6px; border: 1px solid #c5d5f2; border-radius: 4px; color: #315fd8; background: #f2f6ff; font-size: 10px; line-height: 1.4; cursor: pointer; }
#invoiceDetailModal .invoice-workbench-copy-company:hover { border-color: #8da8ed; background: #eaf1ff; }
#invoiceDetailModal .invoice-workbench-copy-company.is-copied { border-color: #b9e4d5; color: #087b5d; background: #eaf9f3; }

/* Invoice merge selection and preview summary. */
#funds #fundsInvoicePanel .invoice-col-merge { width: 4%; }
#funds #fundsInvoicePanel .invoice-merge-select { width: 16px; height: 16px; margin: 0; }
#funds #fundsInvoicePanel .invoice-merge-action { flex: 0 0 auto; }
#funds #fundsInvoicePanel .invoice-merge-source { display: block; color: #315fd8; font-size: 10px; line-height: 1.35; }
#funds #fundsInvoicePanel .invoice-merge-status { color: #9a5a0b; background: #fff4dc; }
#funds #fundsInvoicePanel .invoice-management-search { flex-wrap: wrap; }

.payment-reconciliation-preview {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid #bdd8cb;
  border-radius: 11px;
  background: #f7fcf9;
}
.payment-reconciliation-preview.hidden { display: none; }
.payment-reconciliation-preview.is-unavailable { border-color: #efbd83; background: #fff8ed; }
.payment-reconciliation-preview.is-blocked { border-color: #e7a4a0; background: #fff3f2; }
.payment-reconciliation-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.payment-reconciliation-preview-head h3 { margin: 0 0 3px; color: #176e5d; font-size: 13px; }
.payment-reconciliation-preview.is-unavailable .payment-reconciliation-preview-head h3 { color: #9b5810; }
.payment-reconciliation-preview.is-blocked .payment-reconciliation-preview-head h3,
.payment-reconciliation-preview.is-blocked .payment-reconciliation-preview-head small { color: #b13e38; }
.payment-reconciliation-preview-head small,
.payment-reconciliation-preview-head > span { color: #6f7d94; font-size: 10px; }
.payment-reconciliation-preview-head > span { flex: 0 0 auto; }
.payment-reconciliation-preview-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: hidden; border: 1px solid #dfe8e3; border-radius: 8px; background: #fff; }
.payment-reconciliation-preview-metrics > div { min-width: 0; padding: 7px 8px; border-right: 1px solid #e5ebe8; }
.payment-reconciliation-preview-metrics > div:last-child { border-right: 0; }
.payment-reconciliation-preview-metrics span,
.payment-reconciliation-preview-metrics strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-reconciliation-preview-metrics span { color: #7b8799; font-size: 9px; }
.payment-reconciliation-preview-metrics strong { margin-top: 3px; color: #344158; font-size: 12px; font-variant-numeric: tabular-nums; }
.payment-reconciliation-preview-metrics .allocated strong,
.payment-reconciliation-preview-metrics .balance strong { color: #138653; }
.payment-reconciliation-preview-metrics .unallocated strong,
.payment-reconciliation-preview-metrics .debt strong { color: #c45e12; }
.payment-reconciliation-preview-metrics > p,
.payment-reconciliation-preview-orders > p { margin: 0; padding: 7px 8px; color: #8f4f0b; font-size: 11px; line-height: 1.5; }
.payment-reconciliation-preview-metrics > p { grid-column: 1 / -1; }
.payment-reconciliation-preview-orders > strong { display: block; margin-bottom: 5px; color: #4b596e; font-size: 10px; }
.payment-reconciliation-preview-orders > div { display: flex; gap: 5px; max-width: 100%; overflow-x: auto; padding-bottom: 2px; }
.payment-reconciliation-preview-orders > div > span { display: grid; flex: 0 0 155px; min-width: 0; gap: 2px; padding: 6px 7px; border: 1px solid #e1e7ef; border-radius: 6px; background: #fff; }
.payment-reconciliation-preview-orders b,
.payment-reconciliation-preview-orders small,
.payment-reconciliation-preview-orders em { overflow: hidden; font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.payment-reconciliation-preview-orders small { color: #7b8799; }
.payment-reconciliation-preview-orders em { color: #138653; font-weight: 700; }

#funds .funds-detail-refund { padding: 11px; border: 1px solid #ddd4c2; border-radius: 9px; background: #fffdf8; }
#funds .funds-detail-refund > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#funds .funds-detail-refund h4 { margin: 0; color: #725b30; font-size: 12px; }
#funds .funds-detail-refund-metrics { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 9px; color: #778398; font-size: 10px; }
#funds .funds-detail-refund-metrics b { margin-left: 4px; color: #92601d; font-size: 12px; font-variant-numeric: tabular-nums; }
#funds .funds-detail-refund-status { margin: 7px 0 0; color: #7f7055; font-size: 10px; line-height: 1.5; }
/* This modal is opened from the 1100-layer customer drawer. It must remain
   above that drawer, with original/payment evidence one layer above it. */
#balanceRefundModal { z-index: 1400; align-items: center; }
body:has(#balanceRefundModal:not(.hidden)) #paymentReceiptViewerModal { z-index: 1500; }
.balance-refund-panel { display: grid; width: min(980px,calc(100vw - 32px)); max-height: min(880px,calc(100vh - 32px)); grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; }
.balance-refund-head > div { display: grid; min-width: 0; gap: 4px; }
.balance-refund-head small { color: #7b8799; font-size: 10px; line-height: 1.4; }
.balance-refund-body { display: grid; gap: 11px; min-height: 0; overflow-y: auto; padding: 13px; background: #f6f8fb; }
.balance-refund-message { padding: 10px 12px; border: 1px solid #c9dcec; border-radius: 8px; color: #426276; background: #f2f8fc; font-size: 11px; line-height: 1.6; }
.balance-refund-message.is-danger { color: #a43c37; border-color: #e7aaa6; background: #fff3f2; }
.balance-refund-policy { margin: 0; padding: 8px 10px; border-left: 3px solid #d8bd85; color: #807052; background: #fffdf7; font-size: 11px; line-height: 1.6; }
.balance-refund-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: hidden; border: 1px solid #dce5ee; border-radius: 8px; background: #fff; }
.balance-refund-metrics > div { display: grid; min-width: 0; gap: 5px; padding: 10px; border-right: 1px solid #e5eaf0; }
.balance-refund-metrics > div:last-child { border-right: 0; }
.balance-refund-metrics span { color: #748196; font-size: 10px; }
.balance-refund-metrics strong { overflow-wrap: anywhere; color: #344158; font-size: 15px; font-variant-numeric: tabular-nums; }
.balance-refund-metrics > div:last-child strong { color: #976219; }
.balance-refund-card { display: grid; gap: 9px; padding: 12px; border: 1px solid #dfe5ed; border-radius: 9px; background: #fff; }
.balance-refund-card h3 { margin: 0; color: #39485d; font-size: 13px; }
.balance-refund-card > p { margin: 0; color: #7a879a; font-size: 11px; line-height: 1.6; }
.balance-refund-card label { display: grid; min-width: 0; gap: 5px; color: #5c6980; font-size: 11px; }
.balance-refund-card input:not([type="checkbox"]), .balance-refund-card select, .balance-refund-card textarea { box-sizing: border-box; width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #d9e0ea; border-radius: 7px; background: #fff; color: #39485d; font: inherit; }
.balance-refund-card input[readonly] { color: #67748a; background: #f1f4f8; }
.balance-refund-card textarea { min-height: 58px; resize: vertical; }
.balance-refund-card label > small { color: #8b96a6; font-size: 10px; }
.balance-refund-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.balance-refund-card .balance-refund-check { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid #e5c27f; border-radius: 7px; color: #875318; background: #fff9ee; line-height: 1.5; }
.balance-refund-card .balance-refund-check input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; padding: 0; margin-top: 2px; }
.balance-refund-card > button { justify-self: end; }
.balance-refund-pay-controls { display: grid; gap: 9px; border: 0; padding: 0; margin: 0; min-width: 0; }
.balance-refund-pay-controls > button { justify-self: end; }
.balance-refund-pay-controls:disabled input, .balance-refund-pay-controls:disabled textarea { background: #f1f4f8; color: #67748a; }
.balance-refund-pay-controls:disabled button { opacity: .55; cursor: not-allowed; }
.balance-refund-source-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding: 8px; border: 1px solid #e3e8ef; border-radius: 7px; color: #6e7d93; background: #f8fafc; font-size: 10px; overflow-wrap: anywhere; }
.balance-refund-source > p { margin: 7px 0 0; color: #966021; font-size: 10px; line-height: 1.5; }
.balance-refund-muted { color: #929cad; }
.balance-refund-record { display: grid; gap: 6px; padding: 10px; border: 1px solid #e1e7ef; border-radius: 8px; background: #fff; }
.balance-refund-record + .balance-refund-record { margin-top: 9px; }
.balance-refund-record > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px; color: #3d4b60; font-size: 11px; }
.balance-refund-record p { margin: 0; color: #718097; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.balance-refund-badge { padding: 3px 7px; border-radius: 999px; color: #95600d; background: #fff1d9; font-size: 10px; font-weight: 700; white-space: nowrap; }
.balance-refund-badge.is-complete { color: #137c50; background: #e8f7ef; }
.balance-refund-badge.is-terminal { color: #7d8493; background: #eff1f5; }
.balance-refund-paid { display: grid; justify-items: start; gap: 5px; padding-top: 6px; border-top: 1px solid #e8edf3; }
.balance-refund-record details { padding-top: 5px; color: #6f7b90; font-size: 10px; }
.balance-refund-record summary { cursor: pointer; }
.balance-refund-record ul { display: grid; gap: 6px; margin: 8px 0 0; padding-left: 17px; }
.balance-refund-record li small { display: block; margin-top: 2px; overflow-wrap: anywhere; }
.balance-refund-review-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.balance-refund-permission-hint { padding: 8px 10px; border-left: 3px solid #97aec8; color: #596b82 !important; background: #f2f6fc; }
.balance-refund-permission-hint:empty { display: none; }
.balance-refund-proof-list { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; overflow-wrap: anywhere; }
.balance-refund-proof-item { display: grid; gap: 4px; align-content: start; max-width: 160px; padding: 6px; border: 1px solid #e0e7ef; border-radius: 6px; }
.balance-refund-proof-item img { width: 90px; height: 65px; object-fit: contain; background: #f5f7fa; }
.balance-refund-receipt-upload { display: grid; grid-template-columns: minmax(0,1fr) 138px; gap: 12px; align-items: start; }
.balance-refund-receipt-qr { display: grid; gap: 5px; justify-items: center; text-align: center; color: #718097; font-size: 10px; }
.balance-refund-receipt-qr img { width: 116px; height: 116px; }
#balanceRefundReceiptStatus { margin: 7px 0; color: #607590; font-size: 11px; }
.balance-refund-ocr { padding: 10px; border: 1px solid #d9e4ef; border-radius: 7px; background: #f4f8fc; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.balance-refund-ocr.is-blocked { color: #a33e36; background: #fff3f1; border-color: #e5b1ab; }
.balance-refund-ocr.is-manual { color: #8a601a; background: #fff9ee; border-color: #e7d09e; }
.balance-refund-ocr dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 12px; margin: 6px 0; }
.balance-refund-ocr dl div { min-width: 0; }
.balance-refund-ocr dt { color: #7a8799; }
.balance-refund-ocr dd { margin: 0; font-weight: 600; }
.balance-refund-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-top: 1px solid #e1e7ef; background: #fff; }
.balance-refund-footer > span { color: #758197; font-size: 10px; line-height: 1.5; }
.balance-refund-footer > button { flex: 0 0 auto; }
.balance-refund-card.hidden, .balance-refund-card .hidden { display: none !important; }
@media (max-width: 760px) {
  .balance-refund-panel { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .balance-refund-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .balance-refund-metrics > div { border-bottom: 1px solid #e5eaf0; }
  .balance-refund-fields { grid-template-columns: 1fr; }
  .balance-refund-receipt-upload { grid-template-columns: minmax(0,1fr); }
  .balance-refund-receipt-qr { justify-items: start; text-align: left; }
  .balance-refund-card > button, .balance-refund-pay-controls > button { width: 100%; }
  .balance-refund-footer { align-items: flex-start; flex-direction: column; }
  #funds .funds-detail-refund > header { align-items: flex-start; flex-direction: column; }
}

.balance-reconciliation-modal-panel {
  display: grid;
  width: min(1040px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
}
.balance-reconciliation-head > div { display: flex; min-width: 0; align-items: center; gap: 9px; }
.balance-reconciliation-head > div:first-child { display: grid; gap: 3px; }
.balance-reconciliation-head small { overflow: hidden; color: #778398; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.balance-reconciliation-status { padding: 4px 8px; border-radius: 999px; color: #5e6b80; background: #edf0f5; font-size: 10px; font-weight: 700; white-space: nowrap; }
.balance-reconciliation-status.is-pending { color: #9b5810; background: #fff0d8; }
.balance-reconciliation-status.is-complete { color: #137c50; background: #e8f7ef; }
.balance-reconciliation-status.is-rejected { color: #b13e38; background: #fdeceb; }
.balance-reconciliation-body { display: grid; min-height: 0; grid-template-rows: auto auto auto minmax(120px,1fr) auto; gap: 10px; overflow: hidden; padding: 13px; }
.balance-reconciliation-message { padding: 9px 11px; border: 1px solid #c9dcec; border-radius: 8px; color: #426276; background: #f2f8fc; font-size: 11px; line-height: 1.5; }
.balance-reconciliation-message.is-danger { color: #a43c37; border-color: #e7aaa6; background: #fff3f2; }
.balance-reconciliation-audit { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border: 1px solid #e0e6ef; border-radius: 8px; background: #fff; }
.balance-reconciliation-audit > span { display: grid; min-width: 0; gap: 3px; padding: 7px 9px; border-right: 1px solid #e7ebf1; }
.balance-reconciliation-audit > span:last-child { border-right: 0; }
.balance-reconciliation-audit i { color: #7a879a; font-size: 9px; font-style: normal; }
.balance-reconciliation-audit b { overflow: hidden; color: #39465b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.balance-reconciliation-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: hidden; border: 1px solid #dce5ee; border-radius: 9px; background: #fff; }
.balance-reconciliation-metrics > div { display: grid; min-width: 0; gap: 5px; padding: 10px; border-right: 1px solid #e5eaf0; }
.balance-reconciliation-metrics > div:last-child { border-right: 0; }
.balance-reconciliation-metrics span { overflow: hidden; color: #748196; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.balance-reconciliation-metrics strong { overflow: hidden; color: #344158; font-size: 15px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.balance-reconciliation-metrics .allocated strong { color: #b46010; }
.balance-reconciliation-metrics .balance strong,
.balance-reconciliation-metrics .balance-after strong { color: #137e56; }
.balance-reconciliation-metrics .debt strong,
.balance-reconciliation-metrics .debt-after strong { color: #c4433e; }
.balance-reconciliation-orders { min-height: 0; overflow: hidden; border: 1px solid #dfe5ed; border-radius: 9px; background: #fff; }
.balance-reconciliation-orders > .empty { display: grid; min-height: 130px; place-items: center; color: #8792a3; }
.balance-reconciliation-orders-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #e5eaf1; }
.balance-reconciliation-orders-head strong { font-size: 12px; }
.balance-reconciliation-orders-head span { color: #778398; font-size: 10px; }
.balance-reconciliation-table-wrap { max-height: 100%; overflow: auto; }
.balance-reconciliation-orders table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 11px; }
.balance-reconciliation-orders th { position: sticky; z-index: 1; top: 0; padding: 8px 10px; color: #67748a; background: #f2f5f9; text-align: left; white-space: nowrap; }
.balance-reconciliation-orders td { padding: 8px 10px; border-top: 1px solid #e8ecf2; white-space: nowrap; }
.balance-reconciliation-orders td.allocated { color: #b45c0c; font-weight: 800; }
.balance-reconciliation-ack { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; border: 1px solid #e5c27f; border-radius: 8px; color: #875318; background: #fff9ee; font-size: 11px; line-height: 1.45; }
.balance-reconciliation-ack input { margin-top: 2px; }
.balance-reconciliation-review { display: grid; gap: 5px; color: #556278; font-size: 10px; }
.balance-reconciliation-review textarea { box-sizing: border-box; width: 100%; min-height: 64px; resize: vertical; padding: 8px 9px; border: 1px solid #d9e0ea; border-radius: 7px; font: inherit; }
.balance-reconciliation-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 13px; border-top: 1px solid #e1e7ef; background: #fff; }
.balance-reconciliation-actions > span { color: #758197; font-size: 10px; line-height: 1.4; }
.balance-reconciliation-actions > div { display: flex; flex: 0 0 auto; gap: 8px; }

/* Derived "待对账" queue. It is intentionally compact so the operator can
   see many customers before opening one statement preview. */
.statement-candidates { display: grid; gap: 9px; margin-top: 12px; padding: 11px 12px 12px; border: 1px solid #cddcf4; border-radius: 9px; background: #f8fbff; }
.statement-candidates-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.statement-candidates-head > div:first-child { display: grid; min-width: 0; gap: 3px; }
.statement-candidates-head strong { color: #294a80; font-size: 14px; }
.statement-candidates-head span { overflow: hidden; color: #7b8799; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.statement-candidate-counts { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.statement-candidate-count { display: inline-flex; align-items: baseline; gap: 4px; min-width: 66px; padding: 5px 8px; border: 1px solid #d7e1f1; border-radius: 7px; color: #68758b; background: #fff; cursor: pointer; }
.statement-candidate-count b { color: #315fd8; font-size: 14px; font-variant-numeric: tabular-nums; }
.statement-candidate-count span { font-size: 10px; white-space: nowrap; }
.statement-candidate-count:hover, .statement-candidate-count.is-active { border-color: #86a4ed; color: #244fc4; background: #edf3ff; }
.statement-candidates-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.statement-candidates-toolbar input { min-width: 220px; flex: 1 1 280px; }
.statement-candidates-toolbar select { min-width: 116px; flex: 0 0 auto; }
.statement-candidates-toolbar > span { margin-left: auto; color: #7b8799; font-size: 10px; white-space: nowrap; }
.statement-candidates-result { min-width: 0; }
.statement-candidates-result[aria-busy="true"] { opacity: .65; }
.statement-candidates-table-wrap { max-height: min(390px, 46vh); overflow: auto; border: 1px solid #dce5f3; border-radius: 7px; background: #fff; scrollbar-gutter: stable; }
.statement-candidates-table { width: 100%; min-width: 850px; border-collapse: collapse; font-size: 11px; }
.statement-candidates-table th { position: sticky; z-index: 1; top: 0; padding: 8px 10px; color: #657187; background: #eef4fd; text-align: left; white-space: nowrap; }
.statement-candidates-table td { padding: 8px 10px; border-top: 1px solid #e8edf5; vertical-align: middle; white-space: nowrap; }
.statement-candidates-table td > strong, .statement-candidates-table td > small { display: block; overflow: hidden; max-width: 245px; text-overflow: ellipsis; }
.statement-candidates-table td > small { margin-top: 3px; color: #8792a4; font-size: 10px; }
.statement-candidate-number { text-align: right; }
.statement-candidate-number b { color: #315fd8; font-variant-numeric: tabular-nums; }
.statement-candidate-number small { text-align: right; }
.statement-candidate-status { display: inline-block; padding: 3px 7px; border-radius: 999px; color: #a56212; background: #fff3dc; font-size: 10px; font-weight: 700; }
.statement-candidate-status.ready { color: #286b50; background: #eaf7ef; }
.statement-candidate-status.disputed { color: #c5572a; background: #fff0e8; }
.statement-candidate-status.generated { color: #2857a8; background: #eaf1ff; }
.statement-record-actions { display: flex; gap: 6px; align-items: center; }
.statement-record-dialog { box-sizing: border-box; width: min(1180px, 94vw); max-height: 88dvh; padding: 0; border: 1px solid #d8e2f2; border-radius: 12px; color: #263a56; background: #fff; }
.statement-record-dialog::backdrop { background: rgba(15, 32, 59, .35); }
.statement-record-dialog > header, .statement-record-dialog > footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; }
.statement-record-dialog > header { border-bottom: 1px solid #e5ebf4; }
.statement-record-dialog > header small { display: block; margin-top: 5px; color: #7b8799; font-size: 12px; }
.statement-record-dialog > footer { border-top: 1px solid #e5ebf4; font-size: 12px; }
.statement-record-dialog > footer > div { display: flex; gap: 8px; }
.statement-record-table-wrap { overflow: auto; max-height: 60dvh; }
.statement-candidate-row.blocked { background: #fffdfa; }
.statement-candidate-row.disputed { background: #fffaf8; }
.statement-candidate-reason { max-width: 210px !important; color: #b45309 !important; }
.statement-candidates-empty { display: grid; min-height: 54px; place-items: center; padding: 14px; border: 1px dashed #d5dfed; border-radius: 7px; color: #8995a7; background: #fff; font-size: 11px; }
.statement-candidates-error { color: #a56212; background: #fffaf0; }
.statement-candidate-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 2px 0; color: #778398; font-size: 10px; }
.statement-candidate-pager > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.statement-candidate-pager button { min-width: 30px; padding: 4px 8px; border: 1px solid #d8e0ec; border-radius: 5px; color: #536077; background: #fff; font: inherit; cursor: pointer; }
.statement-candidate-pager button:hover:not(:disabled) { color: #244fc4; border-color: #86a4ed; background: #edf3ff; }
.statement-candidate-pager button.active { color: #fff; border-color: #315fd8; background: #315fd8; font-weight: 700; }
.statement-candidate-pager button:disabled { cursor: not-allowed; opacity: .45; }
#fundsStatementResult.statement-empty { min-height: 88px; margin-top: 8px; padding: 16px; border: 1px dashed #d5dfed; border-radius: 8px; background: #fbfcfe; }
@media (max-width: 760px) {
  .statement-candidates-head { align-items: flex-start; flex-direction: column; }
  .statement-candidate-counts { width: 100%; overflow-x: auto; }
  .statement-candidates-toolbar > span { margin-left: 0; }
  .statement-candidate-pager { align-items: flex-start; flex-direction: column; }
  .statement-candidate-pager > div { width: 100%; justify-content: flex-start; }
  #funds .funds-reconciliation-alert { align-items: flex-start; flex-direction: column; }
  #funds .funds-detail-reconciliation-warning { grid-template-columns: 1fr; }
  #funds .funds-detail-reconciliation-warning > button { width: 100%; }
  .payment-reconciliation-preview-head { flex-direction: column; }
  .payment-reconciliation-preview-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payment-reconciliation-preview-metrics > div { border-bottom: 1px solid #e5ebe8; }
  .balance-reconciliation-modal-panel { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .balance-reconciliation-head { align-items: flex-start; }
  .balance-reconciliation-head > div:last-child { flex-direction: column; align-items: flex-end; }
  .balance-reconciliation-body { overflow-y: auto; }
  .balance-reconciliation-audit,
  .balance-reconciliation-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .balance-reconciliation-audit > span,
  .balance-reconciliation-metrics > div { border-bottom: 1px solid #e7ebf1; }
  .balance-reconciliation-actions { align-items: stretch; flex-direction: column; }
  .balance-reconciliation-actions > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .balance-reconciliation-actions > div button:only-child { grid-column: 1 / -1; }
}

/* File-first invoice review is shared by initial upload and attachment replacement. */
dialog.invoice-recognition-review,
#fundsInvoiceUploadDialog.invoice-recognition-review { position: fixed; inset: 0; height: fit-content; box-sizing: border-box; width: min(540px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 18px; overflow: auto; border: 1px solid #cad6e9; border-radius: 12px; color: #253d5e; background: #fff; box-shadow: 0 20px 64px #10284740; }
dialog.invoice-recognition-review::backdrop { background: #142b4b66; }
dialog.invoice-recognition-review .follow-confirm-card { display: grid; gap: 10px; padding: 0; border: 0; max-height: none; overflow: visible; box-shadow: none; }
dialog.invoice-recognition-review::before { display: none; }
dialog.invoice-recognition-review .follow-confirm-heading { display: flex; align-items: center; gap: 10px; }
dialog.invoice-recognition-review .follow-confirm-heading small,
dialog.invoice-recognition-review .follow-confirm-heading strong { display: block; }
dialog.invoice-recognition-review .follow-confirm-heading small { margin-bottom: 3px; color: #6d7e94; font-size: 12px; }
dialog.invoice-recognition-review .invoice-upload-field { display: grid; gap: 5px; min-width: 0; font-size: 12px; }
dialog.invoice-recognition-review .invoice-upload-field input,
dialog.invoice-recognition-review textarea,
dialog.invoice-recognition-review .invoice-recognition-correction input,
dialog.invoice-recognition-review .invoice-recognition-correction select { box-sizing: border-box; width: 100%; min-width: 0; height: auto; padding: 8px 10px; border: 1px solid #ccd8e8; border-radius: 6px; color: #253d5e; background: #fff; font: inherit; }
dialog.invoice-recognition-review textarea { min-height: 54px; }
dialog.invoice-recognition-review input[readonly] { background: #f4f7fb; }
dialog.invoice-recognition-review .invoice-recognition-file { overflow-wrap: anywhere; padding: 8px 10px; border: 1px solid #ccd8e8; border-radius: 6px; }
dialog.invoice-recognition-review .invoice-recognition-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; font-size: 11px; }
dialog.invoice-recognition-review .invoice-upload-hint { margin: 0; color: #7d8aa0; font-size: 11px; line-height: 1.5; }
dialog.invoice-recognition-review .invoice-recognition-status { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; background: #f1f6ff; color: #3c5b83; font-size: 12px; line-height: 1.5; }
dialog.invoice-recognition-review .invoice-recognition-status button { flex: 0 0 auto; }
dialog.invoice-recognition-review .invoice-recognition-fields { display: grid; gap: 5px; margin: 0; }
dialog.invoice-recognition-review .invoice-recognition-fields > div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 8px; padding: 7px 9px; border-radius: 6px; background: #f5f8fc; }
dialog.invoice-recognition-review .invoice-recognition-fields dt { color: #74849a; font-size: 11px; }
dialog.invoice-recognition-review .invoice-recognition-fields dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; min-width: 0; color: #263e5f; font-size: 12px; }
dialog.invoice-recognition-review .invoice-recognition-fields dd > span:first-child { flex: 1 1 160px; overflow-wrap: anywhere; }
dialog.invoice-recognition-review .invoice-recognition-badge { display: inline-block; padding: 2px 5px; border-radius: 4px; color: #758399; background: #eaf0f7; white-space: nowrap; font-size: 10px; font-weight: 400; }
dialog.invoice-recognition-review .invoice-recognition-badge[data-status="match"] { color: #167353; background: #e4f5ec; }
dialog.invoice-recognition-review .invoice-recognition-badge[data-status="mismatch"] { color: #b13a31; background: #fff0eb; }
dialog.invoice-recognition-review .invoice-recognition-correction { flex: 1 1 100%; margin-top: 4px; padding-top: 6px; border-top: 1px solid #e0e7f0; font-weight: 400; }
dialog.invoice-recognition-review .invoice-recognition-correction small { display: block; margin-bottom: 5px; color: #b13a31; overflow-wrap: anywhere; }
dialog.invoice-recognition-review .invoice-recognition-correction label { display: grid; gap: 4px; font-size: 11px; }
dialog.invoice-recognition-review .invoice-recognition-warnings { margin: 0; padding: 7px 9px; border-radius: 6px; background: #fff7e8; color: #906427; font-size: 11px; line-height: 1.5; }
dialog.invoice-recognition-review .invoice-review-check { display: flex; align-items: flex-start; gap: 8px; color: #435970; font-size: 12px; line-height: 1.5; }
dialog.invoice-recognition-review .invoice-review-check input { flex: 0 0 auto; margin-top: 3px; }
dialog.invoice-recognition-review .follow-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
dialog.invoice-recognition-review [hidden] { display: none !important; }
@media (max-width: 440px) {
  dialog.invoice-recognition-review,
  #fundsInvoiceUploadDialog.invoice-recognition-review { padding: 13px; }
  dialog.invoice-recognition-review .invoice-recognition-fields > div { grid-template-columns: 84px minmax(0,1fr); gap: 5px; }
  dialog.invoice-recognition-review .invoice-recognition-fields dd > span:first-child { flex-basis: 100%; }
}


/* Balance refund V1: implement docs/design/balance-refund-compact-v1.png.
   All rules are scoped: do not redesign the underlying funds/correction pages. */
#balanceRefundModal { background: rgba(28, 43, 67, .12); backdrop-filter: none; padding: 0; }
#balanceRefundModal .balance-refund-panel {
  position: fixed; margin: 0; transform: none; inset: auto;
  width: min(1220px, calc(100vw - 24px)); height: min(810px, calc(100dvh - 24px));
  min-width: min(680px, calc(100vw - 24px)); min-height: min(420px, calc(100dvh - 24px));
  max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px);
  border: 1px solid #cad9ed; border-radius: 12px; resize: both; overflow: hidden;
  box-shadow: 0 14px 48px rgba(24, 48, 84, .2); background: #fff;
  container-type: inline-size; container-name: refund-dialog;
}
#balanceRefundModal .hidden, #balanceRefundModal [hidden] { display: none !important; }
#balanceRefundModal .balance-refund-head { padding: 14px 22px; border-bottom: 1px solid #e0e9f5; cursor: move; touch-action: none; user-select: none; background: #fff; }
#balanceRefundModal .balance-refund-head strong { color: #172f50; font-size: 18px; }
#balanceRefundModal .balance-refund-head small { font-size: 12px; }
#balanceRefundModal .balance-refund-head button { cursor: pointer; touch-action: manipulation; }
#balanceRefundModal .balance-refund-body { display: flex; flex-direction: column; gap: 10px; padding: 12px 22px; background: #fff; overscroll-behavior: contain; scrollbar-gutter: stable; }
#balanceRefundModal .balance-refund-body > * { flex: 0 0 auto; min-width: 0; }
#balanceRefundModal .balance-refund-message { font-size: 12px; line-height: 1.5; padding: 7px 10px; }
#balanceRefundModal .balance-refund-compact-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; padding: 10px 16px; border: 1px solid #d4e2f4; border-radius: 7px; background: #fafcff; color: #50617b; font-size: 13px; }
#balanceRefundModal .balance-refund-compact-summary > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
#balanceRefundModal .balance-refund-compact-summary strong { color: #163459; }
#balanceRefundModal .balance-refund-compact-summary .refund-total, #balanceRefundModal .balance-refund-compact-summary .balance-refund-summary-amount { color: #1264db; font-size: 26px; font-weight: 750; font-variant-numeric: tabular-nums; }
#balanceRefundModal .balance-refund-steps { display: flex; align-items: center; list-style: none; gap: 12px; margin: 0; padding: 8px 7%; color: #8290a4; font-size: 13px; }
#balanceRefundModal .balance-refund-steps li { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
#balanceRefundModal .balance-refund-steps li:not(:last-child)::after { content: ''; height: 2px; min-width: 16px; flex: 1; margin-left: 8px; background: #dce4ef; }
#balanceRefundModal .balance-refund-steps b, #balanceRefundModal .balance-refund-steps .step-number { display: inline-grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; color: #fff; background: #98a4b6; border-radius: 50%; }
#balanceRefundModal .balance-refund-steps .is-current, #balanceRefundModal .balance-refund-steps .active { color: #1264db; }
#balanceRefundModal .balance-refund-steps .is-current b, #balanceRefundModal .balance-refund-steps .active b { background: #1264db; }
#balanceRefundModal .balance-refund-steps .is-done, #balanceRefundModal .balance-refund-steps .complete { color: #138563; }
#balanceRefundModal .balance-refund-steps .is-done b, #balanceRefundModal .balance-refund-steps .complete b { background: #138563; }
#balanceRefundModal .balance-refund-balance-details { color: #6b7d93; font-size: 11px; }
#balanceRefundModal .balance-refund-balance-details > summary { cursor: pointer; }
#balanceRefundModal .balance-refund-balance-details .balance-refund-metrics { margin-top: 7px; }
#balanceRefundModal .balance-refund-policy { margin-top: 5px; padding: 5px 8px; font-size: 11px; }
#balanceRefundModal .balance-refund-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
#balanceRefundModal .balance-refund-card { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-color: #d1e1f5; border-radius: 8px; }
#balanceRefundModal .balance-refund-card > * { flex-shrink: 0; min-width: 0; }
#balanceRefundModal .balance-refund-card-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: -14px -16px 2px; padding: 12px 16px; background: #f7faff; border-radius: 8px 8px 0 0; }
#balanceRefundModal .balance-refund-card-heading h3 { font-size: 16px; color: #173453; }
#balanceRefundModal .balance-refund-source-status { color: #22846c; font-size: 12px; }
#balanceRefundModal .balance-refund-original-block { display: grid; grid-template-columns: 124px minmax(0,1fr); grid-template-areas: "proof summary" "proof tools"; align-items: center; gap: 6px 14px; }
#balanceRefundModal .balance-refund-original-block .balance-refund-original-proof { grid-area: proof; }
#balanceRefundModal .balance-refund-original-block .balance-refund-source-summary { grid-area: summary; overflow-wrap: anywhere; }
#balanceRefundModal .balance-refund-original-block .balance-refund-source-tools { grid-area: tools; justify-content: flex-start; }
/* A receipt is not a 34px toolbar button: its image and caption must size the grid. */
#balanceRefundModal .balance-refund-original-thumb { display: grid; grid-template-rows: auto auto; width: 115px; max-width: 100%; height: auto; min-height: 0; gap: 5px; border: 0; padding: 0; font-size: 10px; line-height: 1.4; white-space: normal; color: #7085a1; background: none; }
#balanceRefundModal .balance-refund-original-thumb span { display: block; }
#balanceRefundModal .balance-refund-original-proof { display: flex; align-items: center; min-width: 0; gap: 16px; min-height: 80px; }
#balanceRefundModal .balance-refund-original-proof img { display: block; width: 115px; height: 100px; object-fit: contain; background: #f6f8fb; border: 1px solid #dde5ef; border-radius: 5px; }
#balanceRefundModal .balance-refund-original-proof button { cursor: pointer; }
#balanceRefundModal .balance-refund-original-proof .balance-refund-original-meta { display: grid; gap: 6px; font-size: 12px; color: #667890; }
#balanceRefundModal .balance-refund-original-proof strong { color: #183657; }
#balanceRefundModal .balance-refund-source-summary { font-size: 12px; color: #69809a; }
#balanceRefundModal .balance-refund-source-summary:empty, #balanceRefundModal .balance-refund-source-tools:has(button.hidden) { display: none; }
#balanceRefundModal .balance-refund-source-tools { display: flex; justify-content: flex-end; }
#balanceRefundModal .balance-refund-source-tools button { color: #2165c7; border: 0; background: none; padding: 0; min-height: 24px; }
#balanceRefundModal .balance-refund-card label { font-size: 12px; color: #324b6b; }
#balanceRefundModal .balance-refund-card input:not([type=checkbox]), #balanceRefundModal .balance-refund-card select { min-height: 36px; font-size: 12px; }
#balanceRefundModal .balance-refund-card input[readonly] { background: #f0f4f9; color: #344965; }
#balanceRefundModal .balance-refund-account-fields { display: grid; gap: 11px; padding-top: 12px; border-top: 1px solid #e1eaf5; }
#balanceRefundModal .balance-refund-account-fields > label { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 10px; align-items: center; }
#balanceRefundModal .balance-refund-account-fields label > span:first-child { display: grid; gap: 3px; }
#balanceRefundModal .balance-refund-account-fields small { color: #347ddd; font-size: 10px; white-space: nowrap; }
#balanceRefundModal .balance-refund-copy-field { display: flex; gap: 4px; align-items: center; min-width: 0; }
#balanceRefundModal .balance-refund-copy-field input { flex: 1; min-width: 0; }
#balanceRefundModal .balance-refund-copy-field button { padding: 3px 5px; border: 0; font-size: 11px; color: #276bce; }
#balanceRefundModal .balance-refund-route-caption { margin: 10px 0 0; font-size: 11px; color: #7c89a0; }
#balanceRefundModal .balance-refund-account-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; }
#balanceRefundModal .balance-refund-account-actions span { color: #667e99; font-size: 11px; }
#balanceRefundModal .balance-refund-account-actions button { padding: 8px 12px; font-size: 12px; }
#balanceRefundModal .balance-refund-account-actions button.is-complete { background: #f0fbf6; color: #11845e; border: 1px solid #8acfb6; opacity: 1; }
#balanceRefundModal #balanceRefundStartReadinessHint { font-size: 11px; color: #a46b26; }
#balanceRefundModal #balanceRefundStartReadinessHint:empty { display: none; }
#balanceRefundModal .balance-refund-permission-hint { margin: 0; font-size: 11px; line-height: 1.45; padding: 6px 8px; }
#balanceRefundModal .balance-refund-pay-controls { gap: 9px; }
#balanceRefundModal .balance-refund-receipt-upload { grid-template-columns: minmax(0, 1fr) 128px; gap: 12px; align-items: center; padding: 12px; min-height: 124px; border: 1px dashed #9dc4f6; border-radius: 6px; background: #f8fbff; }
#balanceRefundModal .balance-refund-computer-upload { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: #1768df; min-width: 0; }
#balanceRefundModal .balance-refund-computer-upload > small { font-size: 10px; color: #71829a; text-align: center; }
#balanceRefundModal .balance-refund-card .balance-refund-file-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; width: min(180px, 100%); min-height: 37px; padding: 4px 12px; border-radius: 5px; background: #1768df; color: #fff; font-size: 13px; cursor: pointer; overflow: hidden; }
#balanceRefundModal .balance-refund-file-picker input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
#balanceRefundModal .balance-refund-file-picker:focus-within { outline: 2px solid #1454ad; outline-offset: 2px; }
#balanceRefundModal .balance-refund-pay-controls:disabled .balance-refund-file-picker { opacity: .5; cursor: not-allowed; }
#balanceRefundModal .balance-refund-receipt-qr { border-left: 1px dashed #b4cce9; padding-left: 10px; min-height: 96px; align-content: center; }
#balanceRefundModal .balance-refund-receipt-qr img { width: 86px; height: 86px; }
#balanceRefundModal .balance-refund-receipt-qr button { font-size: 11px; padding: 3px 5px; }
#balanceRefundModal #balanceRefundReceiptStatus { margin: 0; padding: 7px 9px; background: #f1f5fa; border-radius: 5px; font-size: 11px; overflow-wrap: anywhere; }
#balanceRefundModal #balanceRefundReceiptStatus:empty { display: none; }
#balanceRefundModal #balanceRefundReceiptPreview:empty { display: none; }
#balanceRefundModal .balance-refund-auto-caption { margin: 0; font-size: 11px; color: #7889a0; }
#balanceRefundModal .balance-refund-derived-fields { gap: 9px 13px; }
#balanceRefundModal .balance-refund-derived-fields label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
#balanceRefundModal .balance-refund-derived-fields label input { flex: 1; min-width: 0; }
#balanceRefundModal .balance-refund-wide-field { grid-column: 1 / -1; }
#balanceRefundModal .balance-refund-ocr { padding: 8px; font-size: 11px; }
#balanceRefundModal .balance-refund-ocr details { margin-top: 6px; }
#balanceRefundModal .balance-refund-ocr summary { cursor: pointer; }
#balanceRefundModal .balance-refund-source-exception, #balanceRefundModal .balance-refund-payment-exception { padding: 9px; margin-top: 8px; border: 1px solid #ecd099; border-radius: 6px; background: #fffaf0; font-size: 11px; color: #8c632b; }
#balanceRefundModal .balance-refund-source-exception summary { cursor: pointer; }
#balanceRefundModal .balance-refund-source-exception .balance-refund-fields { margin: 8px 0; }
#balanceRefundModal .balance-refund-source-exception textarea, #balanceRefundModal .balance-refund-payment-exception textarea { min-height: 52px; }
#balanceRefundModal .balance-refund-details-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0 14px; padding: 9px 12px; border: 1px solid #dfe8f5; border-radius: 6px; color: #385171; font-size: 12px; }
#balanceRefundModal .balance-refund-details-row > details { min-width: 0; }
#balanceRefundModal .balance-refund-details-row > details > summary { padding: 3px 0; cursor: pointer; }
#balanceRefundModal .balance-refund-details-row > details[open] { grid-column: 1 / -1; }
#balanceRefundModal .balance-refund-details-row > details[open] > div { margin-top: 8px; }
#balanceRefundModal .balance-refund-history-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#balanceRefundModal .balance-refund-history-chips > span { display: block; padding: 7px 10px; max-width: 100%; border: 1px solid #e0e8f3; border-radius: 5px; background: #f8faff; font-size: 11px; overflow-wrap: anywhere; }
#balanceRefundModal .balance-refund-history-chips small { display: block; color: #8190a5; margin-top: 4px; }
#balanceRefundModal .balance-refund-exception-details summary { color: #2d69ba; }
#balanceRefundModal .balance-refund-exception-details label { display: grid; gap: 6px; margin: 8px 0; font-size: 12px; }
#balanceRefundModal .balance-refund-exception-details textarea { min-height: 58px; width: 100%; box-sizing: border-box; padding: 8px; border: 1px solid #d8e3f1; border-radius: 6px; }
#balanceRefundModal .balance-refund-exception-details label.balance-refund-check { display: flex; align-items: flex-start; }
#balanceRefundModal .balance-refund-failure { margin: 10px 0; padding: 10px; border: 1px solid #ead3b0; border-radius: 6px; }
#balanceRefundModal .balance-refund-footer { padding: 12px 22px; align-items: center; flex-direction: row; }
#balanceRefundModal .balance-refund-footer .balance-refund-review-actions { align-items: center; gap: 8px; }
#balanceRefundModal .balance-refund-footer > span { max-width: 34%; font-size: 11px; }
#balanceRefundModal .balance-refund-final-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#balanceRefundModal .balance-refund-final-action > button { font-size: 13px; padding: 9px 15px; }
#balanceRefundModal .balance-refund-final-action small { max-width: 290px; font-size: 10px; color: #7a8ba1; }
#balanceRefundModal .balance-refund-final-action small:empty { display: none; }
#balanceRefundModal .balance-refund-resize-grip { position: absolute; width: 14px; height: 14px; right: 3px; bottom: 3px; pointer-events: none; background: repeating-linear-gradient(135deg, transparent 0 3px, #8eabc9 3px 4px); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
@container refund-dialog (max-width: 890px) {
  #balanceRefundModal .balance-refund-workspace { grid-template-columns: minmax(0, 1fr); }
  #balanceRefundModal .balance-refund-body { padding: 12px 14px; }
  #balanceRefundModal .balance-refund-head, #balanceRefundModal .balance-refund-footer { padding: 12px 14px; }
  #balanceRefundModal .balance-refund-steps { padding: 5px 0; font-size: 11px; }
  #balanceRefundModal .balance-refund-compact-summary { gap: 8px; }
}
@media (max-width: 680px) {
  #balanceRefundModal .balance-refund-panel { min-width: 0; resize: none; }
  #balanceRefundModal .balance-refund-head strong { font-size: 15px; }
  #balanceRefundModal .balance-refund-account-fields > label { grid-template-columns: 85px minmax(0, 1fr); }
  #balanceRefundModal .balance-refund-footer { gap: 8px; flex-wrap: wrap; }
  #balanceRefundModal .balance-refund-footer > span { max-width: none; }
  #balanceRefundModal .balance-refund-footer .balance-refund-review-actions { width: 100%; }
  #balanceRefundModal .balance-refund-details-row { grid-template-columns: 1fr; }
  #balanceRefundModal .balance-refund-derived-fields { grid-template-columns: 1fr; }
  #balanceRefundModal .balance-refund-receipt-upload { grid-template-columns: minmax(0, 1fr) 104px; }
}


/* Quote workspace layout overrides loaded after the shared admin stylesheet. */
@media (min-width: 1201px) {
  .product-quote-controls {
    grid-template-columns: minmax(250px, 1.15fr) minmax(180px, .78fr) minmax(235px, .92fr) auto minmax(92px, auto);
    gap: 10px;
    align-items: end;
    padding: 16px 18px;
  }

  .product-quote-row-count,
  .product-quote-actions {
    grid-column: auto;
  }

  .product-quote-row-count {
    align-self: end;
    height: 40px;
    white-space: nowrap;
  }

  .product-quote-row-count span { margin-right: 7px; }
  .product-quote-row-count button { min-width: 54px; }
  .product-quote-actions { align-self: end; flex-wrap: nowrap; gap: 7px; }
  .product-quote-actions button { min-width: 92px; white-space: nowrap; }

  .product-quote-controls > label:not(.product-quote-check) {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
  }

  .product-quote-controls > label:not(.product-quote-check) select,
  .product-quote-controls > label:not(.product-quote-check) input {
    min-width: 0;
    flex: 1 1 auto;
  }
}

.product-quote-results {
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(35, 55, 80, .05);
}

.product-quote-results .product-quote-summary {
  border: 0;
  border-bottom: 1px solid #e4eaf2;
  border-radius: 0;
  box-shadow: none;
}

.product-quote-results .product-quote-table-wrap {
  border: 0;
  border-radius: 0;
}

.product-quote-entry {
  overflow: hidden;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(35, 55, 80, .05);
}

.product-quote-entry .product-quote-controls {
  border: 0;
  border-bottom: 1px solid #e4eaf2;
  border-radius: 0;
  box-shadow: none;
}

.product-quote-entry .product-quote-paste-panel {
  align-items: stretch;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
}

.product-quote-paste-side {
  display: flex;
  min-width: 138px;
  align-items: stretch;
  justify-content: flex-end;
  flex-direction: column;
  gap: 12px;
}

.product-quote-paste-side span {
  color: #6b778c;
  text-align: center;
  white-space: nowrap;
}

.product-quote-paste-side strong { color: #1266e3; }
.product-quote-paste-side button { min-height: 42px; }

#productQuoteCustomer {
  height: 40px;
  border: 1px solid #cbd6e4;
  border-radius: 7px;
  padding: 0 11px;
  color: #172b4d;
  background: #fff;
}

.product-quote-results .product-quote-table { width: 100%; min-width: 1080px; table-layout: auto; }
.product-quote-results .product-quote-table :is(th, td) {
  box-sizing: border-box;
  text-align: center !important;
  white-space: nowrap;
}
.product-quote-results .product-quote-table :is(th, td):nth-child(3) { min-width: 150px; }
.product-quote-results .product-quote-table :is(th, td):nth-child(4) { min-width: 130px; }
.product-quote-results .product-quote-quantity,
.product-quote-results .product-quote-price { display: block; width: 76px; margin: 0 auto; text-align: center; }
.product-quote-results .product-quote-row-actions { justify-content: center; }
.product-quote-meta,
.product-quote-stock {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.product-quote-meta { color: #315fd8; background: #edf2ff; }
.product-quote-stock.available { color: #18864b; background: #e8f8ef; }
.product-quote-stock.unavailable { color: #c53d3d; background: #fff0f0; }

.quote-doc-meta.no-customer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quote-doc-paper .quote-doc-table { width: 100%; table-layout: auto; }
.quote-doc-paper .quote-doc-table th { width: auto !important; }
.quote-doc-paper .quote-doc-table :is(th, td) {
  text-align: center;
  white-space: nowrap;
}
.quote-doc-paper .quote-doc-table :is(th, td):nth-child(3) { min-width: 130px; }
.quote-doc-paper .quote-doc-table :is(th, td):nth-child(4) { min-width: 110px; }
.product-image-batch-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .45); }
#productImageBatchModal.product-image-batch-modal { box-sizing: border-box; width: auto; max-width: none; margin: 0; }
.product-image-batch-modal.hidden { display: none; }
.product-image-batch-dialog { box-sizing: border-box; width: min(1180px, 100%); max-width: 100%; min-width: 0; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(15, 23, 42, .24); }
.product-image-batch-head, .product-image-batch-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; }
.product-image-batch-head { border-bottom: 1px solid #e2e8f0; }.product-image-batch-head h2 { margin: 0 0 4px; font-size: 20px; }.product-image-batch-head p { margin: 0; color: #64748b; }
.product-image-batch-head > div { min-width: 0; }.product-image-batch-head > button { flex: 0 0 auto; }
.product-image-batch-stats { display: flex; gap: 10px; padding: 12px 20px; background: #f8fafc; }.product-image-batch-stats span { padding: 7px 11px; border: 1px solid #dbe3ee; border-radius: 7px; background: #fff; }.product-image-batch-stats .done { color: #087443; border-color: #b8ddca; }.product-image-batch-stats .error { color: #b45309; border-color: #f2c99f; }
.product-image-batch-tools { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid #e2e8f0; }.product-image-batch-tools span { margin-left: auto; color: #475569; }
.product-image-batch-tools, .product-image-batch-stats { flex-wrap: wrap; }
.product-image-batch-history { max-height: 230px; overflow: auto; padding: 10px 20px; border-bottom: 1px solid #dbe3ee; background: #fbfcfe; }.product-image-batch-history.hidden { display: none; }.product-image-batch-history table { width: 100%; border-collapse: collapse; }.product-image-batch-history th, .product-image-batch-history td { padding: 7px 9px; border-bottom: 1px solid #e8edf3; text-align: left; }
.product-image-batch-table-wrap { min-height: 260px; overflow: auto; }.product-image-batch-table { width: 100%; min-width: 0 !important; border-collapse: collapse; table-layout: fixed; }.product-image-batch-table th, .product-image-batch-table td { min-width: 0; padding: 9px 10px; border-bottom: 1px solid #edf1f6; text-align: left; vertical-align: middle; overflow-wrap: anywhere; }.product-image-batch-table th { position: sticky; top: 0; z-index: 1; background: #f3f6fa; white-space: nowrap; }.product-image-batch-table td small { display: block; color: #7a8799; margin-top: 3px; }.product-image-batch-table th:nth-child(1), .product-image-batch-table td:nth-child(1) { width: 64px; text-align: center; }.product-image-batch-table th:nth-child(2), .product-image-batch-table td:nth-child(2) { width: 86px; }.product-image-batch-table th:nth-child(3), .product-image-batch-table td:nth-child(3) { width: 21%; }.product-image-batch-table th:nth-child(4), .product-image-batch-table td:nth-child(4) { width: 29%; }.product-image-batch-table th:nth-child(5), .product-image-batch-table td:nth-child(5) { width: 96px; }.product-image-batch-table th:nth-child(6), .product-image-batch-table td:nth-child(6) { width: 150px; }
.product-image-batch-table-wrap { width: 100%; max-width: 100%; min-width: 0; }
.product-image-batch-preview { width: 58px; height: 58px; display: block; object-fit: contain; border: 1px solid #dbe3ee; border-radius: 7px; background: #fff; }.product-image-batch-preview.old { opacity: .88; }
.product-image-batch-status { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eef2f7; white-space: nowrap; }.product-image-batch-status.done { color: #087443; background: #eaf7f0; }.product-image-batch-status.warning { color: #b45309; background: #fff4e8; }.product-image-batch-status.error { color: #b42318; background: #fff0ef; }
.product-image-batch-suggestions { min-width: 0; font-size: 12px; line-height: 1.4; }.product-image-batch-suggestions > div { margin-top: 5px; }.product-image-batch-suggestions strong { font-weight: 500; overflow-wrap: anywhere; }.product-image-batch-table td .product-image-batch-reason { margin: 4px 0 6px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }.product-image-batch-table .product-image-batch-status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.product-image-batch-foot { border-top: 1px solid #e2e8f0; color: #64748b; }.product-image-batch-foot > div { display: flex; gap: 10px; }
@media (max-width: 760px) { .product-image-batch-modal { padding: 8px; }.product-image-batch-dialog { width: 100%; max-height: 96vh; }.product-image-batch-stats { overflow-x: auto; }.product-image-batch-table { min-width: 720px !important; }.product-image-batch-foot { align-items: flex-start; flex-direction: column; } }
#products.category-library-mode > :not(.topbar):not(.product-workspace-tabs):not(#productCategoryLibraryWorkspace) { display: none !important; }
.product-category-library-workspace{display:grid;gap:14px}.product-category-library-head,.product-category-library-toolbar,.product-category-library-columns,.product-category-library-footer,.product-category-import-preview{border:1px solid #dbe4ef;border-radius:12px;background:#fff}.product-category-library-head{padding:18px 20px}.product-category-library-head h2{margin:0;color:#172b4d}.product-category-library-head p{margin:5px 0 0;color:#718096}.product-category-library-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) auto auto auto auto auto auto;gap:10px;align-items:center;padding:14px 16px}.product-category-library-toolbar input{height:42px;padding:0 13px;border:1px solid #cbd6e4;border-radius:9px}.product-category-library-toolbar small{color:#8290a3;white-space:nowrap}.product-category-import-label{display:inline-flex;align-items:center;justify-content:center;min-height:42px;cursor:pointer}.product-category-library-columns{display:grid;grid-template-columns:minmax(260px,34%) 1fr;min-height:500px;overflow:hidden}.product-category-list-panel{padding:18px;border-right:1px solid #dbe4ef;background:#fbfdff}.product-category-detail-panel{display:flex;min-width:0;flex-direction:column;padding:18px}.product-category-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.product-category-panel-head h3{margin:0;color:#172b4d}.product-category-panel-head h3 b{margin-left:8px;color:#3264df;font-size:14px;font-weight:600}.product-category-panel-head p{margin:5px 0 0;color:#718096}.product-category-panel-head h3 input{width:min(280px,60vw);padding:7px 9px;border:1px solid #cbd6e4;border-radius:8px;font:inherit}.product-category-library-list{display:grid;gap:9px;max-height:560px;overflow:auto}.product-category-list-item{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;width:100%;padding:14px 15px;border:1px solid #dbe4ef;border-radius:10px;background:#fff;color:#22324d;text-align:left}.product-category-list-item b{color:#718096;font-weight:500}.product-category-list-item i{color:#4c73df;font-size:24px;font-style:normal}.product-category-list-item.active{border-color:#4773ef;background:#f3f7ff;box-shadow:inset 3px 0 #3164e0}.product-category-attribute-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-content:start}.product-category-attribute-item{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center;padding:10px 12px;border:1px solid #dbe4ef;border-radius:9px;background:#fff}.product-category-attribute-item input{min-width:0;border:0;background:transparent;font:inherit;outline:none}.product-category-attribute-item button{padding:7px;background:transparent;color:#d14949}.product-category-drag{color:#99a7bb;font-size:20px}.product-category-detail-actions{display:flex;justify-content:space-between;gap:12px;margin-top:auto;padding-top:22px}.product-category-detail-actions .danger{background:#fff0f0;color:#bd3535}.product-category-library-footer{padding:13px 16px;color:#66768c}.product-category-import-preview{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:16px 18px;border-color:#9db5f7;background:#f7f9ff}.product-category-import-preview h3{margin:0 0 7px}.product-category-import-preview p{margin:0;color:#52637d}.product-category-import-preview ul{margin:9px 0 0;color:#bf3f3f}.product-category-import-preview>div:last-child{display:flex;gap:10px;white-space:nowrap}@media(max-width:1000px){.product-category-library-toolbar{grid-template-columns:1fr auto auto}.product-category-library-toolbar small{display:none}.product-category-library-columns{grid-template-columns:1fr}.product-category-list-panel{border-right:0;border-bottom:1px solid #dbe4ef}.product-category-attribute-list{grid-template-columns:1fr}}@media(max-width:700px){.product-category-library-toolbar{grid-template-columns:1fr 1fr}.product-category-library-toolbar input{grid-column:1/-1}.product-category-import-preview{flex-direction:column}}

/* 类目属性库：一屏维护两组“类目 + 逗号属性” */
.product-category-library-columns{display:block;min-height:0;overflow:hidden}
.product-category-grid-head,.product-category-grid-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.product-category-grid-head{grid-template-columns:minmax(130px,.34fr) minmax(340px,1fr) minmax(130px,.34fr) minmax(340px,1fr);border-bottom:1px solid #dbe4ef;background:#f7f9fc;color:#52637d;font-weight:700}
.product-category-grid-head span{padding:13px 16px}
.product-category-library-list{display:block;max-height:560px;overflow:auto}
.product-category-grid-row{border-bottom:1px solid #e3e9f1}
.product-category-grid-row:last-child{border-bottom:0}
.product-category-pair{display:grid;grid-template-columns:minmax(130px,.34fr) minmax(340px,1fr);position:relative;gap:14px;align-items:center;padding:6px 54px 6px 16px;border-right:1px solid #e3e9f1;background:#fff}
.product-category-pair:nth-child(2){border-right:0}
.product-category-pair label{min-width:0}
.product-category-pair input{width:100%;height:36px;min-width:0;padding:0 12px;border:1px solid #cbd6e4;border-radius:7px;background:#fff;color:#22324d;font:inherit;box-sizing:border-box}
.product-category-pair input:focus{border-color:#4773ef;box-shadow:0 0 0 3px rgba(71,115,239,.12);outline:0}
.product-category-attributes-field small{display:none}
.product-category-pair>button{position:absolute;top:50%;right:12px;padding:5px 4px;background:transparent;color:#d14949;font-size:13px;transform:translateY(-50%)}
.product-category-pair-empty{min-height:48px;background:#fbfcfe}
.product-category-grid-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px;border-top:1px solid #dbe4ef;color:#66768c}
.product-category-grid-actions span{color:#b24a42}
.product-category-grid-actions button{flex:0 0 auto}
@media(max-width:700px){.product-category-pair{grid-template-columns:1fr;padding-right:48px}.product-category-grid-actions{align-items:flex-start;flex-direction:column}.product-category-grid-actions button{align-self:stretch}}

/* 类目属性库：锁定、引用数和未保存状态 */
.product-category-library-head{display:flex;align-items:center;justify-content:space-between;gap:18px}
.product-category-library-state{display:flex;align-items:center;gap:12px;white-space:nowrap}
.product-category-library-state>div{display:grid;gap:3px;text-align:right;color:#718096;font-size:12px}
.product-category-lock-status{color:#64748b}.product-category-lock-status.unlocked{color:#087443}
#productCategoryDirtyStatus.dirty{color:#b45309;font-weight:700}
.product-category-import-label.disabled{cursor:not-allowed;opacity:.5;pointer-events:none}
.product-category-pair{grid-template-columns:minmax(130px,.34fr) minmax(300px,1fr);padding-right:118px;min-height:62px}
.product-category-name-field,.product-category-attributes-field{display:grid;gap:3px}
.product-category-name-field small,.product-category-attributes-field small{display:block!important;overflow:hidden;color:#8794a8;font-size:10px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.product-category-pair input:disabled{cursor:not-allowed;background:#f4f6f9;color:#8794a8}
.product-category-pair input[readonly]{background:#f8fafc;color:#52637d}
.product-category-pair.is-disabled{background:#f7f8fa}.product-category-pair.is-disabled input{color:#7f8a9b}
.product-category-pair-actions{position:absolute;top:50%;right:10px;display:flex;align-items:center;gap:5px;transform:translateY(-50%)}
.product-category-pair-actions button{position:static;padding:5px 7px;border-radius:6px;background:transparent;font-size:12px;transform:none}
.product-category-pair-actions .product-category-remove,.product-category-pair-actions .disable{color:#c24141}
.product-category-pair-actions .restore{color:#087443;background:#eaf7f0}
.product-category-pair-actions span{color:#8b96a8;font-size:11px}
.product-category-pair-actions button:disabled{cursor:not-allowed;opacity:.45}
@media(max-width:900px){.product-category-library-head{align-items:flex-start;flex-direction:column}.product-category-library-state{width:100%;justify-content:space-between}.product-category-library-state>div{text-align:left}}
@media(max-width:700px){.product-category-pair{padding-right:92px}.product-category-pair-actions{right:8px}}

/* 类目库响应式：按实际内容区宽度换行，不再依赖包含侧边栏的整个视口宽度 */
.product-category-library-workspace{width:100%;min-width:0;max-width:100%;container-type:inline-size}
.product-category-library-columns,.product-category-grid-row,.product-category-pair{min-width:0;max-width:100%;box-sizing:border-box}
@container(max-width:1180px){.product-category-grid-head{display:none}.product-category-grid-row{grid-template-columns:minmax(0,1fr)}.product-category-pair{border-right:0;border-bottom:1px solid #e3e9f1}.product-category-pair-empty{display:none}}
@media(max-width:700px){.product-category-library-head{min-width:0}.product-category-library-state{width:100%;min-width:0;align-items:stretch;flex-direction:column;white-space:normal}.product-category-library-state>div{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;text-align:left}.product-category-library-state .product-lock-button{width:100%;max-width:100%;white-space:normal}.product-category-library-toolbar,.product-category-library-toolbar>*{min-width:0}.product-category-pair{grid-template-columns:minmax(0,1fr);padding-right:92px}.product-category-import-preview>div:last-child{width:100%;flex-wrap:wrap;white-space:normal}.product-category-import-preview>div:last-child button{min-width:0;flex:1 1 120px}}

.product-category-confirm-popover{position:fixed;z-index:2600;width:min(330px,calc(100vw - 20px));box-sizing:border-box;color:#26344b}
.product-category-confirm-body{position:relative;z-index:1;width:100%;max-height:calc(100vh - 20px);overflow:auto;padding:14px;border:1px solid #d7dfeb;border-radius:12px;background:#fff;box-shadow:0 16px 42px rgba(27,42,72,.22);box-sizing:border-box}
.product-category-confirm-popover::before{content:"";position:absolute;z-index:0;left:var(--product-category-confirm-arrow-left,calc(100% - 30px));width:10px;height:10px;border:solid #d7dfeb;border-width:1px 0 0 1px;background:#fff;transform:translateX(-50%) rotate(45deg)}
.product-category-confirm-popover[data-placement="below"]::before{top:-6px}
.product-category-confirm-popover[data-placement="above"]::before{bottom:-6px;transform:translateX(-50%) rotate(225deg)}
.product-category-confirm-head{display:flex;align-items:center;gap:10px}
.product-category-confirm-icon{display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;color:#c83d3d;background:#fff0ef;font-size:15px;font-weight:800}
.product-category-confirm-head>div{display:grid;min-width:0;gap:1px}
.product-category-confirm-head small{color:#c24141;font-size:10px;font-weight:700}
.product-category-confirm-head strong{overflow:hidden;color:#1f2d43;font-size:15px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.product-category-confirm-body>p{margin:10px 0;color:#66758a;font-size:12px;line-height:1.55}
.product-category-confirm-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border-radius:7px;background:#f7f9fc;color:#53647b;font-size:11px}
.product-category-confirm-meta span{font-weight:700}
.product-category-confirm-meta small{color:#8a96a8}
.product-category-confirm-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:11px}
.product-category-confirm-actions button{min-width:74px;height:32px;padding:0 12px;border-radius:7px;font-size:12px}
.product-category-confirm-submit{border-color:#d94c4c;background:#d94c4c;color:#fff}
.product-category-confirm-submit:hover{border-color:#bd3636;background:#bd3636}
.product-category-confirm-popover.is-warning .product-category-confirm-icon{color:#aa6812;background:#fff5dc}
.product-category-confirm-popover.is-warning .product-category-confirm-head small{color:#9b620f}
.product-category-confirm-submit.is-warning{border-color:#c98520;background:#c98520}
.product-category-confirm-submit.is-warning:hover{border-color:#aa6b10;background:#aa6b10}
@media(max-width:480px){.product-category-confirm-popover{width:min(300px,calc(100vw - 16px))}.product-category-confirm-body{padding:12px}.product-category-confirm-meta{align-items:flex-start;flex-direction:column}.product-category-confirm-actions button{flex:1}}

/* CAT-001：恢复截图式双列列表，每半区均为“主类目 / 类目 / 属性 / 操作”。 */
.product-category-library-toolbar{grid-template-columns:minmax(240px,1fr) repeat(7,auto)}
.product-category-library-columns{display:block;min-height:0;overflow:hidden}
.product-category-grid-head,.product-category-grid-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.product-category-grid-half-head,.product-category-pair{display:grid;grid-template-columns:minmax(96px,.72fr) minmax(106px,.78fr) minmax(180px,1.5fr) minmax(78px,.45fr);min-width:0;box-sizing:border-box}
.product-category-grid-head{border-bottom:1px solid #dbe4ef;background:#f7f9fc;color:#52637d;font-weight:700}
.product-category-grid-half-head:first-child{border-right:1px solid #dbe4ef}
.product-category-grid-half-head span{padding:12px 10px;border-right:1px solid #e7ecf3;box-sizing:border-box}
.product-category-grid-half-head span:last-child{border-right:0;text-align:center}
.product-category-library-list{display:block;max-height:590px;overflow:auto}
.product-category-grid-row{border-bottom:1px solid #e3e9f1}
.product-category-grid-row:last-child{border-bottom:0}
.product-category-pair{gap:8px;align-items:center;min-height:68px;padding:7px 9px;border-right:1px solid #e3e9f1;background:#fff}
.product-category-pair:nth-child(2){border-right:0}
.product-category-pair.is-disabled{background:#f7f8fa;color:#7f8a9b}
.product-category-pair>label{display:grid;min-width:0;gap:3px;margin:0}
.product-category-pair :is(input,select){width:100%;height:36px;min-width:0;padding:0 9px;border:1px solid #cbd6e4;border-radius:7px;background:#fff;color:#22324d;font:inherit;box-sizing:border-box}
.product-category-pair :is(input,select):focus{border-color:#4773ef;box-shadow:0 0 0 3px rgba(71,115,239,.12);outline:0}
.product-category-pair :is(input,select):disabled{cursor:not-allowed;background:#f4f6f9;color:#8794a8}
.product-category-pair input[readonly]{background:#f8fafc;color:#52637d}
.product-category-pair label small{overflow:hidden;color:#8794a8;font-size:10px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
.product-category-main-field small{color:#60718a}
.product-category-attributes-field input{padding-right:12px}
.product-category-pair-actions{position:static;display:flex;align-items:center;justify-content:center;gap:4px;min-width:0;transform:none}
.product-category-pair-actions button{position:static;min-width:0;padding:5px 6px;border-radius:6px;background:transparent;font-size:12px;transform:none}
.product-category-pair-actions .product-category-remove,.product-category-pair-actions .disable{color:#c24141}
.product-category-pair-actions .restore{color:#087443;background:#eaf7f0}
.product-category-pair-actions span{color:#8b96a8;font-size:11px;text-align:center}
.product-category-pair-actions button:disabled{cursor:not-allowed;opacity:.45}
.product-category-pair-empty{min-height:68px;background:#fbfcfe}
.product-category-path-select{min-width:150px}

/* 主类目手工维护与一列导入的跟随弹窗。 */
.product-main-category-popover{position:fixed;z-index:2600;width:min(440px,calc(100vw - 20px));box-sizing:border-box;color:#26344b}
.product-main-category-popover.hidden{display:none}
.product-main-category-popover-body{position:relative;z-index:1;width:100%;max-height:calc(100vh - 20px);overflow:auto;padding:15px;border:1px solid #d5dfec;border-radius:14px;background:#fff;box-shadow:0 18px 48px rgba(27,42,72,.24);box-sizing:border-box}
.product-main-category-popover::before{content:"";position:absolute;z-index:0;left:var(--product-main-category-arrow-left,calc(100% - 34px));width:11px;height:11px;border:solid #d5dfec;border-width:1px 0 0 1px;background:#fff;transform:translateX(-50%) rotate(45deg)}
.product-main-category-popover[data-placement="below"]::before{top:-6px}
.product-main-category-popover[data-placement="above"]::before{bottom:-6px;transform:translateX(-50%) rotate(225deg)}
.product-main-category-popover header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px;border-bottom:1px solid #e7ecf3}
.product-main-category-popover header>div{display:grid;gap:2px}
.product-main-category-popover header small{color:#5574cb;font-size:10px;font-weight:700;letter-spacing:.06em}
.product-main-category-popover header strong{color:#1f2d43;font-size:16px}
.product-main-category-popover header>button{display:grid;place-items:center;width:30px;height:30px;padding:0;border-radius:8px;background:#f3f6fa;color:#64748b;font-size:20px}
.product-main-category-create-row{display:grid;gap:7px;padding:13px 0}
.product-main-category-create-row>label{color:#53647b;font-size:12px;font-weight:700}
.product-main-category-create-row>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.product-main-category-create-row input,.product-main-category-manager-item input{width:100%;height:36px;min-width:0;padding:0 10px;border:1px solid #c7d3e3;border-radius:8px;background:#fff;color:#22324d;font:inherit;box-sizing:border-box}
.product-main-category-create-row input:focus,.product-main-category-manager-item input:focus{border-color:#4773ef;box-shadow:0 0 0 3px rgba(71,115,239,.12);outline:0}
.product-main-category-create-row button{height:36px;padding:0 15px;border-radius:8px}
.product-main-category-manager-list{display:grid;gap:7px;max-height:235px;overflow:auto;padding:10px;border:1px solid #e0e7f0;border-radius:10px;background:#f8fafc}
.product-main-category-manager-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:center;padding:8px;border:1px solid #dfe6ef;border-radius:9px;background:#fff}
.product-main-category-manager-item>label{display:grid;min-width:0;gap:3px;margin:0}
.product-main-category-manager-item small{overflow:hidden;color:#8491a3;font-size:10px;text-overflow:ellipsis;white-space:nowrap}
.product-main-category-manager-item>button{padding:6px;background:transparent;color:#c24141;font-size:12px}
.product-main-category-manager-item :disabled{cursor:not-allowed;opacity:.55}
.product-main-category-in-use{padding:4px 7px;border-radius:999px;background:#eef2f7;color:#7b8798;font-size:10px;white-space:nowrap}
.product-main-category-manager-empty{padding:15px;color:#7b8798;font-size:12px;text-align:center}
.product-main-category-import-entry{display:grid;gap:10px;margin-top:12px;padding:12px;border:1px solid #cddaf4;border-radius:10px;background:#f5f8ff}
.product-main-category-import-entry>div:first-child{display:grid;gap:3px}
.product-main-category-import-entry strong{color:#315dbf;font-size:13px}
.product-main-category-import-entry small{color:#66768d;font-size:11px;line-height:1.5}
.product-main-category-import-entry>div:last-child{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.product-main-category-import-entry button{height:32px}

@container(max-width:1040px){.product-category-grid-head{display:none}.product-category-grid-row{grid-template-columns:minmax(0,1fr)}.product-category-pair{border-right:0;border-bottom:1px solid #e3e9f1}.product-category-pair-empty{display:none}}
@media(max-width:1050px){.product-category-library-toolbar{grid-template-columns:minmax(0,1fr) repeat(3,auto)}.product-category-library-toolbar small{display:none}}
@media(max-width:700px){.product-category-library-toolbar{grid-template-columns:1fr 1fr}.product-category-library-toolbar>input[type="search"]{grid-column:1/-1}.product-category-pair{grid-template-columns:minmax(0,1fr);gap:7px;padding:10px}.product-category-pair-actions{justify-content:flex-end}.product-category-pair>label{grid-template-columns:82px minmax(0,1fr);align-items:center}.product-category-pair>label>.sr-only{position:static!important;width:auto!important;height:auto!important;margin:0!important;overflow:visible!important;clip:auto!important;white-space:normal!important;color:#66768d;font-size:11px}.product-category-pair>label small{grid-column:2}.product-main-category-popover{width:min(380px,calc(100vw - 16px))}.product-main-category-popover-body{padding:12px}.product-main-category-import-entry>div:last-child button{flex:1 1 130px}}

/* CAT-STAT-001：节点容量、使用量、组合筛选和商品精确跳转。 */
.product-category-statistics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;overflow:visible}
.product-category-stat-control{position:relative;min-width:0}
.product-category-stat-card{display:grid;width:100%;min-height:92px;align-content:center;gap:3px;padding:13px 16px;border:1px solid #dbe4ef;border-radius:12px;background:#fff;color:#53647b;text-align:left;box-shadow:0 4px 14px rgba(35,55,80,.04);box-sizing:border-box}
button.product-category-stat-card{cursor:pointer}
button.product-category-stat-card:hover,button.product-category-stat-card:focus-visible{border-color:#83a3ef;background:#f7faff;outline:0}
button.product-category-stat-card.active{border-color:#4773ef;background:#edf3ff;box-shadow:inset 0 0 0 1px #4773ef}
.product-category-stat-card>span{font-size:12px;font-weight:700}
.product-category-stat-card>strong{color:#172b4d;font-size:23px;line-height:1.15;font-variant-numeric:tabular-nums}
.product-category-stat-card>small{overflow:hidden;color:#8290a3;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.product-category-stat-static .product-category-stat-card{cursor:default}
.product-category-stat-menu{position:absolute;top:calc(100% + 7px);left:0;z-index:80;width:min(340px,calc(100vw - 32px));padding:9px;border:1px solid #c9d5e5;border-radius:12px;background:#fff;box-shadow:0 16px 38px rgba(29,48,78,.2);box-sizing:border-box}
.product-category-stat-menu.hidden{display:none!important}
.product-category-main-filter-menu{width:min(460px,calc(100vw - 32px));max-height:420px;overflow:auto}
.product-category-main-filter-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px;padding:4px;border-radius:8px}
.product-category-main-filter-row:hover,.product-category-main-filter-row.active{background:#edf4ff}
.product-category-main-filter-row>button:first-child{display:grid;min-width:0;gap:2px;padding:8px;border:0;background:transparent;color:#25364e;text-align:left}
.product-category-main-filter-row>button:first-child strong,.product-category-main-filter-row>button:first-child small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-category-main-filter-row>button:first-child small{color:#7b899d;font-size:10px}
.product-category-main-filter-row>span{padding-right:8px;color:#708096;font-size:11px;white-space:nowrap}
.product-category-stat-menu-group{display:grid;gap:7px;padding:8px}
.product-category-stat-menu-group+ .product-category-stat-menu-group{border-top:1px solid #e5eaf1}
.product-category-stat-menu-group>strong{color:#65758b;font-size:11px}
.product-category-stat-menu-group>div{display:flex;gap:6px;flex-wrap:wrap}
.product-category-stat-menu-group button{padding:6px 10px;border:1px solid #d7dfeb;border-radius:999px;background:#fff;color:#53647b;font-size:12px}
.product-category-stat-menu-group button.active{border-color:#4773ef;background:#eaf1ff;color:#2455c6;font-weight:700}
.product-category-active-filters,.product-hierarchy-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid #a9c1f5;border-radius:10px;background:#eef4ff;color:#31558f;font-size:12px}
.product-category-active-filters.hidden,.product-hierarchy-filter-bar.hidden{display:none!important}
.product-category-active-filters>div{display:flex;min-width:0;align-items:center;gap:8px;flex-wrap:wrap}
.product-category-active-filters>div>span{font-weight:700;white-space:nowrap}
#productCategoryActiveFilterList{display:flex;min-width:0;gap:6px;flex-wrap:wrap}
#productCategoryActiveFilterList button{padding:5px 8px;border:1px solid #b8caf1;border-radius:999px;background:#fff;color:#31558f;font-size:11px}
#productCategoryActiveFilterList button:hover{border-color:#4773ef;color:#214eae}
#productCategoryVisibleSummary{margin-left:auto;color:#687d9d;white-space:nowrap}
.product-hierarchy-filter-bar{margin:-4px 0 10px;border-color:#91b3ef;background:#eaf2ff}
.product-hierarchy-filter-bar strong{color:#174fae}
.product-category-pair{align-items:start;min-height:112px}
.product-category-node-field{display:grid;min-width:0;align-content:start;gap:4px}
.product-category-node-field>label{display:block;min-width:0;margin:0}
.product-category-locked-node-value{display:block;width:100%;height:36px;min-width:0;overflow:hidden;padding:7px 9px;border:1px solid #d7e0eb;border-radius:7px;background:#f4f6f9;color:#53647b;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}
.product-category-node-meta{display:flex;min-width:0;align-items:center;gap:4px;overflow:hidden;color:#7c899a;font-size:10px;white-space:nowrap}
.product-category-node-meta>span{overflow:hidden;text-overflow:ellipsis}
.product-category-node-meta button,.product-category-count-link{min-width:0;padding:1px 3px;border:0;background:transparent;color:#315fd0;font:inherit;font-weight:700;white-space:nowrap;cursor:pointer}
.product-category-node-meta button:hover,.product-category-count-link:hover{color:#174bbd;text-decoration:underline}
.product-category-count-link:disabled{color:#929cac;cursor:default;text-decoration:none!important}
.product-category-attribute-badges{display:flex;min-width:0;max-height:50px;gap:4px;overflow:auto;flex-wrap:wrap;align-content:flex-start;scrollbar-width:thin}
.product-category-attribute-badge{display:inline-flex;max-width:100%;overflow:hidden;border:1px solid #d3deee;border-radius:999px;background:#f6f9fd}
.product-category-attribute-badge.active{border-color:#4773ef;background:#e6efff;box-shadow:inset 0 0 0 1px #4773ef}
.product-category-attribute-badge>button{min-width:0;padding:3px 6px;border:0;background:transparent;color:#415777;font-size:10px;line-height:1.2;cursor:pointer}
.product-category-attribute-badge>button:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-category-attribute-badge>.product-category-count-link{border-left:1px solid #d3deee;color:#2459c8;font-weight:800;font-variant-numeric:tabular-nums}
.product-category-attribute-badge>.product-category-count-link:disabled{color:#98a3b2}
.product-category-no-attribute{padding:3px 1px;color:#9a6b3b;font-size:10px}
.product-category-attributes-field>small{display:block!important;overflow:hidden;color:#8794a8;font-size:10px;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}
@container(max-width:1040px){.product-category-statistics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.product-category-pair{grid-template-columns:minmax(0,1fr);gap:7px;padding:10px}.product-category-pair>label{grid-template-columns:82px minmax(0,1fr);align-items:center}.product-main-category-popover{width:min(380px,calc(100vw - 16px))}.product-category-statistics{grid-template-columns:1fr 1fr}.product-category-stat-card{min-height:80px;padding:11px}.product-category-stat-card>strong{font-size:19px}.product-category-active-filters,.product-hierarchy-filter-bar{align-items:flex-start;flex-direction:column}.product-category-active-filters>div{align-items:flex-start;flex-direction:column}.product-category-active-filters>button,.product-hierarchy-filter-bar>button{width:100%}#productCategoryVisibleSummary{margin-left:0}.product-category-node-field>label{display:grid;grid-template-columns:82px minmax(0,1fr);align-items:center}.product-category-node-field>label>.sr-only{position:static!important;width:auto!important;height:auto!important;margin:0!important;overflow:visible!important;clip:auto!important;white-space:normal!important;color:#66768d;font-size:11px}.product-category-node-meta,.product-category-attribute-badges,.product-category-attributes-field>small{margin-left:82px}.product-category-pair{min-height:0}.product-category-stat-menu{position:fixed;top:50%;left:8px;right:8px;z-index:2700;width:auto;max-height:70vh;overflow:auto;transform:translateY(-50%)}}

/* CAT-COMPACT-001：把各级数量收进对应框内，减少重复说明和列表行高。 */
.product-category-grid-half-head,.product-category-pair{grid-template-columns:minmax(160px,.9fr) minmax(140px,.8fr) minmax(185px,1.55fr) minmax(82px,.42fr)}
.product-category-pair{align-items:center;min-height:64px;padding-top:6px;padding-bottom:6px}
.product-category-node-field{align-content:center;gap:0}
.product-category-mobile-field-label{display:none}
.product-category-control-shell{position:relative;min-width:0}
.product-category-control-shell>label{display:block;min-width:0;margin:0}
.product-category-control-shell>label :is(input,select,.product-category-locked-node-value){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.product-category-main-control-shell>label :is(select,.product-category-locked-node-value){padding-right:108px}
.product-category-name-control-shell>label input{padding-right:88px}
.product-category-inline-meta{position:absolute;z-index:2;top:50%;right:6px;display:flex;max-width:calc(100% - 42px);align-items:center;justify-content:flex-end;gap:3px;overflow:hidden;padding-left:8px;background:linear-gradient(90deg,rgba(255,255,255,0),#fff 9px);font-size:9px;line-height:1;white-space:nowrap;transform:translateY(-50%)}
.product-category-control-shell.is-locked .product-category-inline-meta{background:linear-gradient(90deg,rgba(244,246,249,0),#f4f6f9 9px)}
.product-category-main-control-shell.has-select .product-category-inline-meta{right:25px}
.product-category-inline-meta>span,.product-category-inline-meta>button{flex:0 0 auto;min-width:0;padding:2px;border:0;background:transparent;color:#315fd0;font:inherit;font-weight:750;font-variant-numeric:tabular-nums;white-space:nowrap}
.product-category-inline-meta>button{cursor:pointer}
.product-category-inline-meta>button:hover{color:#174bbd;text-decoration:underline}
.product-category-inline-meta>button:focus-visible{border-radius:4px;outline:2px solid #6d91eb;outline-offset:1px}
.product-category-inline-meta>.is-zero,.product-category-inline-meta>button:disabled{color:#a3adbb;cursor:default;text-decoration:none}
.product-category-inline-meta>.product-category-missing-count{color:#b56d13}
.product-category-inline-state{color:#c45656!important}
.product-category-control-shell:has(>label input:focus) .product-category-inline-meta{opacity:0;pointer-events:none}
.product-category-control-shell:has(>label input:focus)>label input{padding-right:9px}
.product-category-attribute-shell{min-width:0;overflow:hidden;border:1px solid #cbd6e4;border-radius:7px;background:#fff;box-sizing:border-box}
.product-category-attribute-shell.is-locked{background:#f4f6f9}
.product-category-attribute-shell>label{display:block;min-width:0;margin:0}
.product-category-attribute-shell.is-locked>label{display:none}
.product-category-attribute-shell>label input{height:31px!important;border:0!important;border-radius:6px 6px 0 0!important;box-shadow:none!important}
.product-category-attribute-shell.is-editing:focus-within{border-color:#4773ef;box-shadow:0 0 0 3px rgba(71,115,239,.12)}
.product-category-attribute-badges{min-height:32px;max-height:32px;align-items:center;align-content:center;gap:4px;overflow-x:auto;overflow-y:hidden;padding:4px 6px;flex-wrap:nowrap;box-sizing:border-box;scrollbar-width:thin}
.product-category-attribute-shell.is-editing .product-category-attribute-badges{border-top:1px solid #e2e8f1}
.product-category-attribute-shell.is-locked .product-category-attribute-badges{min-height:40px;max-height:40px}
.product-category-attribute-badge{flex:0 0 auto}
.product-category-attributes-field>small{display:none!important}
@container(max-width:1240px){.product-category-grid-head{display:none}.product-category-grid-row{grid-template-columns:minmax(0,1fr)}.product-category-pair{border-right:0;border-bottom:1px solid #e3e9f1}.product-category-pair-empty{display:none}}
@media(max-width:700px){.product-category-pair{grid-template-columns:minmax(0,1fr);min-height:0;gap:7px;padding:9px 10px}.product-category-node-field{display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;gap:7px}.product-category-mobile-field-label{display:block;overflow:hidden;color:#66768d;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.product-category-control-shell,.product-category-attribute-shell{grid-column:2}.product-category-main-control-shell>label :is(select,.product-category-locked-node-value){padding-right:108px}.product-category-name-control-shell>label input{padding-right:88px}.product-category-inline-meta{font-size:9px}.product-category-pair-actions{grid-column:1/-1}.product-category-attribute-badges{margin-left:0}}

/* CAT-LIB-COMPACT-001：压缩标题、统计与操作区，保留列表编辑所需行高。 */
#products.category-library-mode>.product-workspace-tabs{max-width:100%;margin-bottom:8px;overflow-x:auto;scrollbar-width:thin;flex:0 0 auto;min-height:40px;overflow-y:hidden}
#products.category-library-mode>.product-workspace-tabs button{flex:0 0 auto;padding:8px 18px}
.product-category-library-workspace{gap:8px}
.product-category-library-head{min-width:0;flex-direction:row;padding:10px 14px;border-radius:10px}
.product-category-library-head>div:first-child{display:flex;min-width:0;align-items:baseline;gap:12px}
.product-category-library-head h2{flex:0 0 auto;font-size:20px;line-height:1.2;white-space:nowrap}
.product-category-library-head p{min-width:0;overflow:hidden;margin:0;font-size:12px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.product-category-library-state{width:auto;flex:0 0 auto;gap:8px}
.product-category-library-state>div{display:flex;align-items:center;gap:6px;text-align:right}
.product-category-library-state .product-lock-button{height:36px;min-height:36px;padding:0 12px}
.product-category-statistics{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.product-category-stat-card{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"label value" "hint value";min-height:64px;gap:1px 8px;padding:8px 12px;border-radius:10px;box-shadow:0 2px 8px rgba(35,55,80,.035)}
.product-category-stat-card>span{grid-area:label;align-self:end}
.product-category-stat-card>strong{grid-area:value;align-self:center;font-size:20px}
.product-category-stat-card>small{grid-area:hint;align-self:start}
.product-category-library-toolbar{display:flex;min-width:0;align-items:center;flex-wrap:wrap;gap:6px;padding:8px 10px;border-radius:10px}
.product-category-library-toolbar>input[type="search"]{flex:1 1 300px;width:auto;height:36px;min-width:180px;padding:0 11px}
.product-category-library-toolbar>:is(button,.product-category-import-label){flex:0 0 auto;height:36px;min-height:36px;padding:0 12px;box-sizing:border-box}
.product-category-library-toolbar>small{min-width:0;font-size:10px}
.product-category-grid-half-head span{padding:8px 9px}
.product-category-grid-actions{padding:10px 12px}
.product-category-pagination{display:flex;min-height:42px;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;border-top:1px solid #dbe4ef;background:#fbfdff;color:#66768d;font-size:12px;box-sizing:border-box}.product-category-pagination>div{display:flex;gap:6px}.product-category-pagination button{min-width:76px;height:30px;padding:0 10px}.product-category-pagination button:disabled{cursor:not-allowed;opacity:.5}
@container(max-width:1180px){.product-category-library-toolbar>small{display:none}}
@container(max-width:860px){.product-category-library-head p{display:none}.product-category-library-toolbar>input[type="search"]{flex-basis:100%;min-width:0}}
@media(max-width:700px){.product-category-library-head{align-items:stretch;flex-direction:column;gap:8px;padding:10px}.product-category-library-head>div:first-child{display:block}.product-category-library-head h2{font-size:18px}.product-category-library-head p{display:none}.product-category-library-state{width:100%;align-items:center;flex-direction:row;justify-content:space-between;white-space:normal}.product-category-library-state>div{justify-content:flex-start;flex-wrap:wrap;text-align:left}.product-category-library-state .product-lock-button{width:auto;max-width:62%;white-space:nowrap}.product-category-statistics{grid-template-columns:repeat(2,minmax(0,1fr))}.product-category-stat-card{min-height:58px;padding:7px 9px}.product-category-library-toolbar>:is(button,.product-category-import-label){flex:1 1 calc(50% - 3px);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.product-category-grid-actions{gap:8px;padding:9px 10px}.product-category-pagination{align-items:flex-start;flex-direction:column}.product-category-pagination>div{width:100%}.product-category-pagination button{flex:1}}


#products .product-title-field.product-featured-title { display: flex; align-items: center; gap: 5px; min-width: 0; }
#products .product-featured-title > .product-wide-input { flex: 1 1 auto; width: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#products .product-featured-title > .product-title-magic { flex: 0 0 24px; }
#products .product-featured-inline { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; }
#products .product-featured-inline button { font-size: 11px; padding: 2px 6px; min-height: 24px; height: auto; }
#products .product-featured-badge { background: #fff3d9; color: #9b6000; border-radius: 4px; padding: 2px 5px; font-size: 11px; white-space: nowrap; }
#productFeaturedFilterBtn.active { color: #254fe5; background: #eef2ff; border-color: #91a7ff; }
#products #productFeaturedAddBtn[hidden], #products #productFeaturedRemoveBtn[hidden], #products [data-product-featured-edit][hidden] { display: none !important; }
#productFeaturedDialog { position: fixed; inset: 0; margin: auto; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box; border: 1px solid #dae3f5; border-radius: 14px; padding: 22px; color: #233957; box-shadow: 0 20px 70px #14254033; }
#productFeaturedDialog::backdrop { background: #11284755; }
#productFeaturedDialog h3 { margin: 0 0 14px; overflow-wrap: anywhere; }
#productFeaturedDialog p { color: #728099; font-size: 13px; line-height: 1.6; }
#productFeaturedDialog label { display: block; margin: 12px 0; }
#productFeaturedDialog [hidden] { display: none !important; }
#productFeaturedDialog .product-featured-check { display: flex; align-items: center; gap: 7px; }
#productFeaturedDialog .product-featured-check[hidden] { display: none; }
#productFeaturedDialog input[type="checkbox"] { display: inline-block; flex: 0 0 auto; width: auto; height: auto; margin: 0; }
#productFeaturedDialog .product-featured-tag-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 10px; }
#productFeaturedDialog .product-featured-tag-heading small { font-size: 12px; font-weight: 400; color: #728099; }
#productFeaturedDialog .product-featured-tag-options { display: flex; flex-wrap: wrap; gap: 8px; }
#productFeaturedDialog .product-featured-tag-options button { width: auto; min-width: 54px; height: 32px; padding: 4px 12px; font-size: 13px; }
#productFeaturedDialog .product-featured-tag-options button[aria-pressed="true"] { color: #254fe5; background: #eef2ff; border-color: #91a7ff; box-shadow: inset 0 0 0 1px #91a7ff; }
#productFeaturedDialog .product-featured-tag-status { color: #728099; font-size: 12px; margin-top: 6px; }
#productFeaturedTagManager { padding: 12px; margin-top: 12px; background: #f7f9fd; border: 1px solid #e0e6f3; border-radius: 8px; }
#productFeaturedTagManager p { margin: 0 0 10px; font-size: 12px; }
#productFeaturedDialog .product-featured-tag-create { display: flex; gap: 6px; }
#productFeaturedDialog .product-featured-tag-create input { min-width: 0; width: 100%; height: 34px; }
#productFeaturedDialog .product-featured-tag-create button { flex: 0 0 auto; height: 34px; padding: 4px 8px; font-size: 12px; }
#productFeaturedDialog .product-featured-tag-rows { max-height: 210px; overflow-y: auto; margin-top: 10px; }
#productFeaturedDialog .product-featured-tag-row { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid #e5eaf4; }
#productFeaturedDialog .product-featured-tag-row input { width: 0; flex: 1 1 auto; min-width: 40px; height: 30px; font-size: 13px; }
#productFeaturedDialog .product-featured-tag-row span { white-space: nowrap; font-size: 11px; color: #728099; }
#productFeaturedDialog .product-featured-tag-row button { flex: 0 0 auto; font-size: 12px; height: 30px; padding: 3px 6px; }
#productFeaturedDialog footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
#productFeaturedEditorError { color: #c02c38; font-size: 13px; white-space: pre-wrap; }


/* Brand library is isolated from product/quotation workspaces. */
.brand-library {
  --brand-blue: #3656df;
  --brand-ink: #1b2940;
  --brand-muted: #7b89a1;
  --brand-line: #e1e7f1;
  --brand-soft: #f6f8fc;
  min-width: 0;
  min-height: 0;
  height: var(--brand-library-height, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--brand-ink);
}
/* Activated only by the brand page router; other workspaces keep their scrolling. */
body.brand-library-page-active { overflow: hidden !important; }
body.brand-library-page-active:not(.customer-portal) .main,
body.brand-library-page-active.customer-portal .main,
body.brand-library-page-active.customer-portal #customer,
body.brand-library-page-active #customerBrandLibraryView,
body.brand-library-page-active #brandLibrary { overflow: hidden !important; min-height: 0; }
body.brand-library-page-active.customer-portal #customer { padding-bottom: 0 !important; }
body.brand-library-page-active.customer-portal #customer #customerBrandLibraryView { min-height: 0 !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }
body.brand-library-page-active:not(.customer-portal) #brandLibrary.view.active { padding-bottom: 12px; }
.brand-library *, .brand-library *::before, .brand-library *::after { box-sizing: border-box; }
.brand-library [hidden] { display: none !important; }
.brand-library button { height: auto; min-height: 34px; font: inherit; line-height: 1.4; white-space: normal; cursor: pointer; }
.brand-library button:focus-visible { outline: 3px solid #9dafff; outline-offset: 2px; }
.brand-library button:disabled { cursor: default; opacity: .5; }
.brand-library-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.brand-library-header h2 { margin: 0; font-size: 22px; line-height: 1.5; }
.brand-library-header p { margin: 4px 0 0; color: var(--brand-muted); font-size: 13px; }
.brand-library-button { border: 1px solid var(--brand-line); background: #fff; color: #4b5e7a; border-radius: 9px; padding: 9px 13px; white-space: nowrap; }
.brand-library-button:hover:not(:disabled) { border-color: #b9c7ff; color: var(--brand-blue); background: #f6f8ff; }
.brand-library-workspace { display: grid; flex: 1 1 0; min-height: 0; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: stretch; overflow: hidden; }
.brand-library-sidebar { min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; padding: 14px 10px 10px; border: 1px solid var(--brand-line); border-radius: 14px; background: #fff; }
.brand-library-sidebar-toolbar { flex: 0 0 auto; padding-bottom: 12px; }
.brand-library-sidebar-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 3px; }
.brand-library-sidebar-heading strong { font-size: 14px; }
.brand-library-sidebar-heading span { color: var(--brand-muted); font-size: 12px; white-space: nowrap; }
.brand-library-import-button { width: 100%; margin-top: 10px; padding: 6px 8px; font-size: 12px !important; }
.brand-library-directory { display: grid; flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; padding: 2px 3px 3px; }
body.brand-library-page-active :is(#adminBrandLibraryRoot, #customerBrandLibraryRoot) .brand-library-brand { width: 100%; min-width: 0; height: 72px !important; min-height: 72px !important; min-block-size: 72px !important; display: flex; align-items: center; gap: 6px; padding: 7px 6px !important; border: 1px solid var(--brand-line); border-radius: 10px; color: var(--brand-ink); background: #fff; transition: border-color .15s, background .15s; text-align: left; overflow: hidden; }
body.brand-library-page-active :is(#adminBrandLibraryRoot, #customerBrandLibraryRoot) .brand-library-brand:hover { border-color: #b6c4fb; background: #f7f9ff; }
body.brand-library-page-active :is(#adminBrandLibraryRoot, #customerBrandLibraryRoot) .brand-library-brand.is-selected { border-color: #7b95ff; background: #eef3ff; box-shadow: inset 0 0 0 1px #7b95ff; color: var(--brand-blue); }
.brand-library-brand-copy { min-width: 0; display: flex; flex: 1 1 0; flex-direction: column; gap: 3px; }
/* Keep long brand names to two lines; the full name remains on the button title. */
body.brand-library-page-active :is(#adminBrandLibraryRoot, #customerBrandLibraryRoot) .brand-library-brand-copy > strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; font-size: 11px !important; font-weight: 650; line-height: 14px; max-height: 28px; }
body.brand-library-page-active :is(#adminBrandLibraryRoot, #customerBrandLibraryRoot) .brand-library-brand-copy > small { color: var(--brand-muted); font-size: 10px !important; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.brand-library-page-active :is(#adminBrandLibraryRoot, #customerBrandLibraryRoot) .brand-library-logo { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 7px; padding: 1px; background: #f5f7fb; border: 1px solid #edf0f6; }
.brand-library-image-slot { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.brand-library-image-slot img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
.brand-library-image-fallback { grid-area: 1 / 1; color: #8898ad; text-align: center; font-size: 12px; overflow-wrap: anywhere; line-height: 1.5; }
.brand-library-logo .brand-library-image-fallback { color: #527294; font-size: 16px; font-weight: 700; }
.brand-library-directory-empty { grid-column: 1 / -1; padding: 26px 8px; color: var(--brand-muted); text-align: center; font-size: 13px; }
.brand-library-content { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 18px; border: 1px solid var(--brand-line); border-radius: 14px; background: #fff; }
.brand-library-selected-heading { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; margin-bottom: 12px; min-width: 0; }
.brand-library-selected-heading > div:nth-child(2) { min-width: 0; flex: 1; }
.brand-library-selected-heading h3 { margin: 0; font-size: 21px; overflow-wrap: anywhere; }
.brand-library-selected-heading p { margin: 5px 0 0; color: var(--brand-muted); font-size: 12px; overflow-wrap: anywhere; }
.brand-library-selected-logo { width: 48px; height: 48px; flex: 0 0 48px; padding: 4px; border: 1px solid var(--brand-line); border-radius: 9px; }
.brand-library-selected-logo .brand-library-image-fallback { color: #527294; font-weight: 700; }
.brand-library-logo-manage { padding: 7px 10px; font-size: 12px !important; }
.brand-library-filter { display: grid; flex: 0 1 auto; min-height: 42px; max-height: min(16vh, 116px); grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid #edf0f6; overflow: hidden; }
.brand-library-filter h4 { margin: 8px 0 0; color: var(--brand-muted); font-size: 13px; font-weight: 500; }
.brand-library-options { display: flex; min-height: 0; align-items: center; align-content: flex-start; flex-wrap: wrap; gap: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 1px 2px; }
.brand-library-option { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 34px; padding: 7px 11px; border: 1px solid var(--brand-line); border-radius: 8px; color: #53647e; background: #fff; overflow-wrap: anywhere; text-align: left; }
.brand-library-option small { color: #8b99ae; font-size: 11px; }
.brand-library-option.is-selected { background: #eef3ff; color: var(--brand-blue); border-color: #aebfff; }
.brand-library-option.is-selected small { color: var(--brand-blue); }
.brand-library-empty { min-height: 120px; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px 18px; color: #8190a5; text-align: center; }
.brand-library-empty strong { font-size: 15px; font-weight: 500; }
.brand-library-empty span { font-size: 12px; }
.brand-library-product-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 10px; }
.brand-library-product-heading strong { font-size: 15px; }
.brand-library-product-heading span { color: var(--brand-muted); font-size: 12px; }
.brand-library-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 14px; }
.brand-library-product-scroll { min-height: 0; flex: 1 1 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 2px 3px 3px; }
.brand-library-product { min-width: 0; overflow: hidden; border: 1px solid var(--brand-line); border-radius: 12px; background: #fff; }
.brand-library-product-image { width: 100%; aspect-ratio: 1.28; padding: 14px; background: #fff; }
.brand-library-product-body { padding: 0 13px 13px; }
.brand-library-product h3 { min-height: 42px; margin: 8px 0 5px; font-size: 14px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.brand-library-model { color: #77859a; font-size: 12px; line-height: 1.6; margin: 0 0 12px; overflow-wrap: anywhere; }
.brand-library-status { display: inline-block; border-radius: 5px; padding: 2px 6px; font-size: 11px; line-height: 1.5; }
.brand-library-status.is-available { color: #198663; background: #edf8f3; }
.brand-library-status.is-stopped { color: #7e8592; background: #eff1f5; }
.brand-library-status.is-pending { color: #bb7c18; background: #fff7e4; }
.brand-library-product-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 9px; }
.brand-library-price { color: #ff514f; font-size: 19px; line-height: 1.3; }
.brand-library-detail-button { border: 0; padding: 5px 0; background: transparent; color: var(--brand-blue); font-size: 12px !important; }
.brand-library-pagination { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #edf0f6; }
.brand-library-pagination span { color: var(--brand-muted); font-size: 12px; }
.brand-library-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; margin-bottom: 12px; border: 1px solid #ffd6d5; border-radius: 9px; background: #fff5f4; color: #bd4947; font-size: 13px; overflow-wrap: anywhere; }
.brand-library-notice { color: #5b6b81; flex: 0 0 auto; font-size: 13px; margin: 6px 0 0; min-height: 18px; }
.brand-library-notice:empty { display: none; }
.brand-library-detail { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; padding: 24px; border: 1px solid var(--brand-line); border-radius: 16px; background: #fff; color: var(--brand-ink); box-shadow: 0 18px 70px #25334a38; }
.brand-library-detail::backdrop { background: #13233f66; }
.brand-library-detail h3 { margin: 0 0 20px; font-size: 19px; overflow-wrap: anywhere; }
.brand-library-detail dl { margin: 0; }
.brand-library-detail dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef1f6; font-size: 13px; }
.brand-library-detail dt { color: var(--brand-muted); }
.brand-library-detail dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.brand-library-dialog-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.brand-library-import { width: min(960px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--brand-line); border-radius: 16px; background: #fff; color: var(--brand-ink); box-shadow: 0 18px 70px #25334a38; overflow: hidden; }
.brand-library-import[open] { display: flex; flex-direction: column; }
.brand-library-import::backdrop { background: #13233f66; }
.brand-library-import-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--brand-line); }
.brand-library-import-header h3 { margin: 0; font-size: 18px; }
.brand-library-import-header p { margin: 7px 0 0; color: var(--brand-muted); font-size: 12px; line-height: 1.6; }
.brand-library-import-table-wrap { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.brand-library-import-table { width: 100%; min-width: 690px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.brand-library-import-table th { position: sticky; top: 0; z-index: 1; background: #f6f8fc; text-align: left; }
.brand-library-import-table th, .brand-library-import-table td { padding: 10px 12px; border-bottom: 1px solid #edf0f6; vertical-align: middle; overflow-wrap: anywhere; }
.brand-library-import-table th:first-child { width: 27%; }
.brand-library-import-table th:nth-child(2) { width: 22%; }
.brand-library-import-table th:nth-child(3) { width: 12%; }
.brand-library-import-table th:nth-child(4) { width: 12%; }
.brand-library-import-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-library-import-preview { position: relative; display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--brand-line); border-radius: 7px; background: #f8fafc; padding: 3px; color: var(--brand-muted); font-size: 10px; }
.brand-library-import-preview > img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; object-position: center; }
.brand-library-import-table select { width: 100%; height: 36px; border: 1px solid #dbe3f1; border-radius: 7px; background: #fff; color: var(--brand-ink); font: inherit; }
.brand-library-import-replace { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.brand-library-import-replace input { width: 16px; height: 16px; margin: 0; }
.brand-library-import-none { color: var(--brand-muted); }
.brand-library-import-state { color: #62718a; line-height: 1.6; }
.brand-library-import-state.is-error { color: #bb4946; }
.brand-library-import-state.is-success { color: #198663; }
.brand-library-import-footer { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--brand-line); background: #fafbfe; }
.brand-library-import-footer p { margin: 0; font-size: 12px; line-height: 1.6; color: #62718a; }
.brand-library-import-footer button { flex: 0 0 auto; border-color: var(--brand-blue); background: var(--brand-blue); color: #fff; }
/* Portal-wide touch/button rules must not enlarge a fixed brand workspace. */
body.brand-library-page-active .brand-library .brand-library-content { padding: 12px; }
body.brand-library-page-active .brand-library .brand-library-selected-heading { min-height: 40px; margin: 0 0 6px; gap: 10px; }
body.brand-library-page-active .brand-library .brand-library-selected-logo { width: 40px; height: 40px; flex-basis: 40px; }
body.brand-library-page-active .brand-library .brand-library-selected-heading h3 { font-size: 18px; line-height: 24px; }
body.brand-library-page-active .brand-library .brand-library-selected-heading p { margin: 2px 0 0; font-size: 11px; line-height: 14px; }
body.brand-library-page-active .brand-library .brand-library-filter { flex: 0 0 auto; min-height: 0; max-height: 44px; padding: 4px 0; }
body.brand-library-page-active .brand-library .brand-library-filter h4 { margin: 7px 0 0; line-height: 18px; }
body.brand-library-page-active .brand-library .brand-library-options { min-height: 0; padding: 1px 2px; gap: 6px; }
body.brand-library-page-active .brand-library button.brand-library-option { height: 32px !important; min-height: 32px !important; max-height: none; padding: 5px 9px !important; line-height: 20px !important; font-size: 12px; white-space: nowrap; }
body.brand-library-page-active .brand-library .brand-library-product-heading { min-height: 18px; margin: 4px 0; line-height: 18px; }
body.brand-library-page-active .brand-library .brand-library-product-heading strong { font-size: 13px; }
body.brand-library-page-active .brand-library .brand-library-pagination { min-height: 0; height: auto; flex-wrap: nowrap; gap: 8px; margin: 6px 0 0; padding: 6px 0 0; line-height: 18px; }
body.brand-library-page-active .brand-library .brand-library-pagination > span { min-width: 0; margin: 0; padding: 0; font-size: 11px; line-height: 16px; text-align: center; }
body.brand-library-page-active .brand-library .brand-library-pagination button { flex: 0 0 auto; width: auto; min-width: 0; height: 32px !important; min-height: 32px !important; padding: 5px 9px !important; margin: 0; font-size: 12px; line-height: 20px !important; white-space: nowrap; }
body.brand-library-page-active.customer-portal #customerBrandLibraryView .brand-library-option,
body.brand-library-page-active.customer-portal #customerBrandLibraryView .brand-library-pagination button { height: 32px !important; min-height: 32px !important; min-block-size: 32px !important; }
@media (max-width: 1050px) {
  .brand-library-workspace { grid-template-columns: 280px minmax(0, 1fr); gap: 12px; }
  .brand-library-content { padding: 15px; }
  .brand-library-products { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 11px; }
}
.brand-library-request-badge { display: inline-flex; align-items: center; margin-left: 8px; padding: 6px 12px; border: 1px solid #efd5aa; border-radius: 999px; background: #fff2dd; color: #a85b00; font-size: 12px; font-weight: 600; vertical-align: middle; cursor: pointer; }
.brand-library-request-badge[hidden] { display: none; }
.brand-library-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.brand-product-cert-dialog { width: min(1320px, 94vw); height: min(820px, 90dvh); max-width: 96vw; max-height: 94dvh; padding: 0; border: 1px solid #dbe3ef; border-radius: 16px; color: #20324d; background: #fff; box-shadow: 0 18px 80px #17263e40; }
.brand-product-cert-dialog[open] { display: flex; flex-direction: column; }
.brand-product-cert-dialog::backdrop { background: #17263e66; }
.brand-product-cert-dialog * { box-sizing: border-box; }
.brand-product-cert-dialog button { height: auto !important; min-height: 34px; line-height: 1.5; border: 1px solid #d9e2f2; background: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; font-size: 13px; color: #31558d; cursor: pointer; }
.brand-product-cert-dialog button:disabled { opacity: .5; cursor: not-allowed; }
.brand-product-cert-dialog button:focus-visible, .brand-product-cert-dialog input:focus-visible, .brand-product-cert-dialog textarea:focus-visible { outline: 2px solid #5469ff; outline-offset: 2px; }
.brand-product-cert-dialog h3, .brand-product-cert-dialog h4, .brand-product-cert-dialog p { margin: 0; }
.bpc-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #e7ecf5; gap: 16px; }
.bpc-header h3 { font-size: 20px; }
.bpc-header p { margin-top: 6px; color: #7a89a1; font-size: 13px; }
.bpc-toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 24px; flex-wrap: wrap; }
.bpc-toolbar form { display: flex; gap: 8px; flex: 1; min-width: 0; }
.bpc-toolbar input { width: min(460px, 100%); min-width: 0; padding: 9px 12px; border: 1px solid #d9e2f2; border-radius: 8px; font: inherit; font-size: 14px; }
.brand-product-cert-dialog .bpc-notice { color: #117d69; padding: 0 24px 10px; font-size: 13px; min-height: 10px; }
.brand-product-cert-dialog .bpc-notice.is-error { color: #bd3428; }
.bpc-layout { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(280px, 1.2fr) minmax(300px, 1.4fr); flex: 1; min-height: 0; border-top: 1px solid #e7ecf5; }
.bpc-models, .bpc-documents, .bpc-preview { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px; }
.bpc-models { background: #f8faff; display: flex; flex-direction: column; }
.bpc-models > div { flex: 1; min-height: 0; overflow: auto; }
.bpc-models nav { padding-top: 12px; font-size: 12px; color: #7888a4; }
.bpc-models nav div { display: flex; justify-content: space-between; gap: 6px; margin-top: 8px; }
.brand-product-cert-dialog .bpc-model { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; flex: 0 0 auto; text-align: left; white-space: normal; line-height: 1.4; gap: 5px; width: 100%; min-height: 84px; margin-bottom: 8px; padding: 12px; overflow-wrap: anywhere; }
.bpc-model > * { flex-shrink: 0; max-width: 100%; white-space: normal; }
.brand-product-cert-dialog .bpc-model.is-selected { background: #eef2ff; border-color: #8094ff; }
.bpc-model small, .bpc-model span, .bpc-document small, .bpc-muted { color: #7a89a1; font-size: 12px; }
.bpc-documents { border-left: 1px solid #e7ecf5; border-right: 1px solid #e7ecf5; }
.bpc-documents > h4 { font-size: 17px; overflow-wrap: anywhere; }
.bpc-documents > h4 small { display: block; font-size: 12px; color: #7a89a1; margin-top: 6px; font-weight: normal; }
.bpc-type { margin-top: 18px; }
.bpc-type > h4 { font-size: 14px; margin-bottom: 8px; }
.bpc-document { display: flex; flex-direction: column; gap: 8px; border: 1px solid #e3e9f4; border-radius: 10px; padding: 12px; margin-bottom: 8px; overflow-wrap: anywhere; }
.bpc-document label { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; }
.bpc-document input { margin: 2px 0 0; }
.bpc-document > div { display: flex; flex-wrap: wrap; gap: 8px; }
.bpc-preview { background: #f5f7fb; }
.bpc-preview h4 { overflow-wrap: anywhere; font-size: 14px; }
.bpc-preview p { color: #7a89a1; font-size: 13px; padding: 12px 0; }
.bpc-preview img { display: block; width: 100%; height: auto; border: 1px solid #e1e7ef; background: #fff; }
.bpc-preview-pages { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.brand-product-cert-dialog:is(.bpc-customer,.bpc-compact) { overflow: hidden; }
:is(.bpc-customer,.bpc-compact) .bpc-header, :is(.bpc-customer,.bpc-compact) .bpc-toolbar, :is(.bpc-customer,.bpc-compact) > footer { flex: 0 0 auto; }
:is(.bpc-customer,.bpc-compact) .bpc-header { padding: 16px 20px; }
:is(.bpc-customer,.bpc-compact) .bpc-toolbar { padding: 10px 16px; gap: 8px; }
:is(.bpc-customer,.bpc-compact) .bpc-toolbar input { flex: 1 1 0; width: auto; }
:is(.bpc-customer,.bpc-compact) .bpc-notice { flex: 0 0 auto; min-height: 0; padding: 0 16px 8px; }
:is(.bpc-customer,.bpc-compact) .bpc-notice:empty { display: none; }
:is(.bpc-customer,.bpc-compact) .bpc-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-width: 0; overflow: hidden; }
:is(.bpc-customer,.bpc-compact) [hidden] { display: none !important; }
:is(.bpc-customer,.bpc-compact) .bpc-models { padding: 12px; overflow: hidden; }
:is(.bpc-customer,.bpc-compact) .bpc-models > div { display: block; flex: 1 1 0; min-width: 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
:is(.bpc-customer,.bpc-compact) .bpc-models nav { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
:is(.bpc-customer,.bpc-compact) .bpc-models nav div { margin-top: 0; }
:is(.bpc-customer,.bpc-compact) .bpc-model { display: grid; grid-template-columns: minmax(0, 1fr) max-content; grid-template-rows: repeat(2, minmax(36px, auto)); align-items: center; gap: 4px 12px; min-width: 0; min-height: 94px; background: #fff; border: 1px solid #d9e2f2; border-radius: 10px; padding: 8px 10px; }
.brand-product-cert-dialog .bpc-model-heading { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 4px; padding: 0 0 10px; border: 0; border-radius: 0; background: transparent; text-align: left; }
.bpc-model-heading strong { color: #243b63; font-size: 14px; }
.bpc-model-heading span { overflow-wrap: anywhere; }
:is(.bpc-customer,.bpc-compact) .bpc-model-heading { grid-column: 1; grid-row: 1 / span 2; align-self: stretch; justify-content: center; min-width: 0; min-height: 0 !important; min-block-size: 0 !important; height: 100% !important; padding: 0 !important; overflow: hidden; }
:is(.bpc-customer,.bpc-compact) .bpc-model-heading strong, :is(.bpc-customer,.bpc-compact) .bpc-model-heading span { display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; line-height: 20px; }
:is(.bpc-customer,.bpc-compact) .bpc-model-heading span { font-size: 12px; line-height: 18px; }
:is(.bpc-customer,.bpc-compact) .bpc-group { position: relative; display: grid; grid-column: 2; grid-template-columns: 28px 40px max-content max-content; justify-content: start; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; }
:is(.bpc-customer,.bpc-compact) .bpc-group-label { min-width: 26px; font-weight: 600; color: #42536e; }
:is(.bpc-customer,.bpc-compact) .bpc-group-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
:is(.bpc-customer,.bpc-compact) .bpc-group button { justify-self: start; flex: 0 0 auto; width: auto; min-width: 0; min-height: 36px !important; min-block-size: 36px !important; padding: 6px 8px !important; line-height: 20px; white-space: nowrap; }
:is(.bpc-customer,.bpc-compact) [data-bpc-group-action] { color: #fff; background: #405ce0; border-color: #405ce0; }
:is(.bpc-customer,.bpc-compact) .bpc-group button:disabled { background: #f0f2f6; border-color: #dce2eb; color: #8a94a5; opacity: 1; }
:is(.bpc-customer,.bpc-compact) [data-bpc-group-status] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
:is(.bpc-customer,.bpc-compact) .bpc-preview { overflow-x: hidden; overflow-y: auto; border-left: 1px solid #e7ecf5; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toggle { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 3px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toggle[aria-expanded="true"] { border-color: #8298ef; background: #eef2ff; color: #3656df; }
:is(.bpc-customer,.bpc-compact) .bpc-history-summary { font-size: 11px; white-space: nowrap; }
:is(.bpc-customer,.bpc-compact) .bpc-history-panel { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; border-top: 1px solid #e7ecf5; background: #f8faff; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toolbar { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px 8px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toolbar form { display: flex; flex: 1 1 260px; gap: 8px; min-width: 0; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toolbar input, :is(.bpc-customer,.bpc-compact) .bpc-history-toolbar select { min-width: 0; max-width: 100%; min-height: 36px; padding: 6px 8px; border: 1px solid #d9e2f2; border-radius: 8px; background: #fff; color: #31558d; font: inherit; font-size: 13px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toolbar input { width: 100%; flex: 1 1 0; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toolbar select { flex: 0 1 150px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-toolbar button, :is(.bpc-customer,.bpc-compact) .bpc-history-actions button, :is(.bpc-customer,.bpc-compact) .bpc-history-pages button { flex: 0 0 auto; width: auto; min-height: 36px !important; min-block-size: 36px !important; padding: 6px 8px !important; white-space: nowrap; }
:is(.bpc-customer,.bpc-compact) .bpc-history-hint { flex: 0 0 auto; margin: 0; padding: 0 16px 10px; color: #7a89a1; font-size: 12px; line-height: 1.5; }
:is(.bpc-customer,.bpc-compact) .bpc-history-list { flex: 1 1 0; min-width: 0; min-height: 0; padding: 0 16px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
:is(.bpc-customer,.bpc-compact) .bpc-history-empty { margin: 0; padding: 24px 8px; color: #7a89a1; font-size: 13px; line-height: 1.6; text-align: center; }
:is(.bpc-customer,.bpc-compact) .bpc-history-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) auto; align-items: center; gap: 12px; margin-bottom: 8px; padding: 12px; border: 1px solid #d9e2f2; border-radius: 10px; background: #fff; font-size: 13px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-info, :is(.bpc-customer,.bpc-compact) .bpc-history-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
:is(.bpc-customer,.bpc-compact) .bpc-history-info > strong, :is(.bpc-customer,.bpc-compact) .bpc-history-info > span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(.bpc-customer,.bpc-compact) .bpc-history-info > span, :is(.bpc-customer,.bpc-compact) .bpc-history-row small { color: #7a89a1; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
:is(.bpc-customer,.bpc-compact) .bpc-history-meta > strong { font-size: 12px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-status { display: inline-block; padding: 2px 7px; border-radius: 5px; background: #edf0f5; color: #6f7c91; font-size: 12px; line-height: 1.5; }
:is(.bpc-customer,.bpc-compact) .bpc-history-status.is-pending { background: #fff4df; color: #a46a15; }
:is(.bpc-customer,.bpc-compact) .bpc-history-status.is-downloadable { background: #e7f6ef; color: #198663; }
:is(.bpc-customer,.bpc-compact) .bpc-history-status.is-rejected { background: #fff0ed; color: #b74f43; }
:is(.bpc-customer,.bpc-compact) .bpc-history-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-actions [data-bpc-history-action] { border-color: #405ce0; background: #405ce0; color: #fff; }
:is(.bpc-customer,.bpc-compact) .bpc-history-actions button:disabled { border-color: #dce2eb; background: #f0f2f6; color: #8a94a5; opacity: 1; }
:is(.bpc-customer,.bpc-compact) .bpc-history-pages { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 16px; border-top: 1px solid #e7ecf5; color: #7888a4; font-size: 12px; }
:is(.bpc-customer,.bpc-compact) .bpc-history-pages > div { display: flex; gap: 6px; }
.bpc-preview-files { display: block; margin-bottom: 14px; font-size: 13px; color: #42536e; }
.bpc-preview-files select { display: block; width: 100%; max-width: 100%; margin-top: 8px; padding: 9px; border: 1px solid #d9e2f2; border-radius: 8px; background: #fff; color: #31558d; font: inherit; }
.brand-product-cert-dialog [data-bpc-application] { padding: 14px; background: #eef2ff; border-radius: 10px; margin-top: 18px; }
.brand-product-cert-dialog [data-bpc-application][hidden] { display: none; }
.brand-product-cert-dialog [data-bpc-application] label { display: block; margin: 10px 0; font-size: 13px; }
.brand-product-cert-dialog textarea { display: block; width: 100%; min-height: 76px; resize: vertical; padding: 8px; margin-top: 6px; border: 1px solid #d9e2f2; border-radius: 6px; font: inherit; }
.brand-product-cert-dialog [data-bpc-submit], .brand-product-cert-dialog [data-bpc-apply] { background: #405ce0; color: #fff; border-color: #405ce0; }
.brand-product-cert-dialog footer { padding: 12px 24px; font-size: 12px; color: #7a89a1; border-top: 1px solid #e7ecf5; }
@media (max-width: 780px) {
  .brand-product-cert-dialog { height: 94dvh; }
  .bpc-layout { display: flex; flex-direction: column; overflow: auto; }
  .bpc-models { flex: 0 0 auto; min-height: 0; max-height: none; padding: 12px; }
  .bpc-models > div { display: flex; flex: 0 0 auto; gap: 8px; overflow-x: auto; overflow-y: hidden; }
  .brand-product-cert-dialog .bpc-model { flex: 0 0 150px; width: 150px; margin-bottom: 0; }
  :is(.bpc-customer,.bpc-compact) .bpc-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1.15fr) minmax(0, .85fr); overflow: hidden; }
  :is(.bpc-customer,.bpc-compact) .bpc-models { flex: 1 1 0; min-height: 0; padding: 10px; overflow: hidden; }
  :is(.bpc-customer,.bpc-compact) .bpc-models > div { display: block; flex: 1 1 0; overflow-x: hidden; overflow-y: auto; scroll-snap-type: none; }
  :is(.bpc-customer,.bpc-compact) .bpc-model { width: 100%; min-width: 0; margin-bottom: 8px; }
  :is(.bpc-customer,.bpc-compact) .bpc-preview { min-height: 0; padding: 12px; overflow-x: hidden; overflow-y: auto; border-left: 0; border-top: 1px solid #e7ecf5; }
  :is(.bpc-customer,.bpc-compact) .bpc-header, :is(.bpc-customer,.bpc-compact) .bpc-toolbar { padding: 10px 12px; }
  :is(.bpc-customer,.bpc-compact) .bpc-header h3 { font-size: 17px; }
  :is(.bpc-customer,.bpc-compact) .bpc-header p { margin-top: 4px; font-size: 12px; }
  :is(.bpc-customer,.bpc-compact) .bpc-toolbar { gap: 6px; }
  :is(.bpc-customer,.bpc-compact) .bpc-toolbar > button { padding: 6px 8px; }
  :is(.bpc-customer,.bpc-compact) .bpc-toolbar button, :is(.bpc-customer,.bpc-compact) .bpc-models nav button, :is(.bpc-customer,.bpc-compact) .bpc-preview button { min-height: 36px !important; min-block-size: 36px !important; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-toolbar { padding: 10px 12px 8px; gap: 6px; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-hint { padding: 0 12px 8px; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-list { padding: 0 12px; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-actions { grid-column: 1 / -1; justify-content: flex-start; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-pages { padding: 8px 12px; }
  .bpc-models nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .bpc-models nav div { margin-top: 0; }
  .bpc-documents { flex: 0 0 auto; min-height: 0; max-height: none; overflow: visible; border: 0; border-top: 1px solid #e7ecf5; }
  .bpc-preview { flex: 0 0 auto; min-height: 180px; overflow: visible; }
  .bpc-header, .bpc-toolbar { padding: 12px; }
  .bpc-header { align-items: flex-start; }
  .bpc-header > div { min-width: 0; overflow-wrap: anywhere; }
  .bpc-header > button { flex: 0 0 auto; }
  .bpc-toolbar form { flex-basis: 100%; }
  .bpc-toolbar form button { flex: 0 0 auto; }
  .brand-product-cert-dialog footer { padding: 10px 12px; }
}
@media (max-width: 599px) {
  :is(.bpc-customer,.bpc-compact) .bpc-model { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; gap: 5px; padding: 8px; }
  :is(.bpc-customer,.bpc-compact) .bpc-model-heading { grid-column: 1; grid-row: auto; gap: 0; min-height: 38px !important; height: auto !important; }
  :is(.bpc-customer,.bpc-compact) .bpc-group { grid-column: 1; gap: 6px; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-toolbar form { flex-basis: 100%; order: 1; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-toolbar select { flex: 1 1 100px; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-row { grid-template-columns: minmax(0, 1fr); }
  :is(.bpc-customer,.bpc-compact) .bpc-history-actions { grid-column: 1; }
  :is(.bpc-customer,.bpc-compact) .bpc-history-summary { font-size: 10px; }
}
.product-certificate-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--brand-line); }
.product-certificate-section h4 { margin: 0 0 10px; font-size: 15px; }
.product-certificate-group { display: grid; gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid var(--brand-line); border-radius: 10px; background: #f8faff; }
.product-certificate-group > div:first-child { display: flex; align-items: center; gap: 10px; }
.product-certificate-group > div:first-child span { color: var(--brand-muted); font-size: 12px; }
.product-certificate-group > div:first-child em { margin-left: auto; color: #3d6bd9; font-style: normal; font-size: 12px; }
.product-certificate-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; align-items: center; gap: 7px; padding: 7px 8px; border-radius: 7px; background: #fff; font-size: 12px; }
.product-certificate-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-certificate-row small { color: var(--brand-muted); }
.product-certificate-row button { min-height: 26px; padding: 3px 8px; border: 1px solid #cfdbfb; border-radius: 6px; background: #fff; color: var(--brand-blue); cursor: pointer; }
.product-certificate-group > button { justify-self: start; min-height: 30px; }
@media (max-width: 760px) {
  .brand-library-header { margin-bottom: 12px; gap: 10px; }
  .brand-library-header h2 { font-size: 20px; }
  .brand-library-header p { font-size: 12px; }
  .brand-library-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(116px, 25%) minmax(0, 1fr); gap: 10px; }
  .brand-library-sidebar { width: 100%; padding: 8px; }
  .brand-library-sidebar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 7px; }
  .brand-library-sidebar-heading { flex: 1; }
  .brand-library-import-button { width: auto; margin: 0; }
  .brand-library-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .brand-library-content { width: 100%; padding: 10px; min-height: 0; }
  .brand-library-selected-heading { gap: 8px; margin-bottom: 6px; }
  .brand-library-selected-heading h3 { font-size: 19px; }
  .brand-library-logo-manage { margin-left: auto; }
  .brand-library-filter { grid-template-columns: 31px minmax(0, 1fr); gap: 5px; padding: 5px 0; max-height: 60px; min-height: 38px; }
  .brand-library-options { gap: 6px; }
  .brand-library-option { padding: 6px 8px; font-size: 12px; }
  .brand-library-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .brand-library-product-body { padding: 0 9px 10px; }
  .brand-library-product-image { padding: 9px; }
  .brand-library-product h3 { font-size: 13px; }
  .brand-library-model { font-size: 11px; }
  .brand-library-price { font-size: 17px; }
  .brand-library-pagination { justify-content: center; gap: 8px; }
  .brand-library-pagination .brand-library-button { padding: 7px 9px; }
  .brand-library-import-header, .brand-library-import-footer { padding: 12px; }
  .brand-library-import-footer { align-items: flex-end; gap: 8px; }
  body.brand-library-page-active .brand-library .brand-library-workspace { grid-template-rows: 116px minmax(0, 1fr); }
  body.brand-library-page-active .brand-library .brand-library-content { padding: 9px; }
  body.brand-library-page-active .brand-library .brand-library-selected-heading { min-height: 36px; gap: 8px; }
  body.brand-library-page-active .brand-library .brand-library-selected-logo { width: 36px; height: 36px; flex-basis: 36px; }
  body.brand-library-page-active .brand-library .brand-library-selected-heading h3 { font-size: 16px; line-height: 22px; }
  body.brand-library-page-active .brand-library .brand-library-selected-heading p { font-size: 10px; line-height: 12px; }
  body.brand-library-page-active .brand-library .brand-library-logo-manage { min-height: 32px !important; height: 32px !important; padding: 4px 6px !important; }
  body.brand-library-page-active .brand-library .brand-library-pagination { gap: 5px; }
  body.brand-library-page-active .brand-library .brand-library-pagination > span { font-size: 10px; }
  body.brand-library-page-active .brand-library .brand-library-pagination button { padding-right: 6px !important; padding-left: 6px !important; }
}

/* Customer phone layout repair: keep the directory visible and let the
   customer page grow naturally.  This block is intentionally phone-only;
   desktop brand-library sizing and scrolling remain unchanged. */
@media (max-width: 760px) {
  body.customer-portal.brand-library-page-active #customer {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body.customer-portal.brand-library-page-active #customerBrandLibraryView:not(.hidden) {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library-workspace {
    flex: 0 0 auto !important;
    grid-template-rows: 126px auto !important;
    gap: 8px !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library-sidebar {
    width: 100% !important;
    height: 126px !important;
    min-height: 126px !important;
    max-height: 126px !important;
    flex: 0 0 126px !important;
    overflow: hidden !important;
    padding: 6px !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library-directory {
    height: 82px !important;
    min-height: 82px !important;
    max-height: 82px !important;
    flex: 0 0 82px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 1px 2px 2px !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library-brand {
    height: 52px !important;
    min-height: 52px !important;
    min-block-size: 52px !important;
    gap: 4px !important;
    padding: 4px !important;
    border-radius: 8px !important;
    pointer-events: auto !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library-content {
    width: 100% !important;
    height: auto !important;
    min-height: 166px !important;
    overflow: visible !important;
    padding: 8px !important;
    border-radius: 11px !important;
  }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library-product-scroll {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* Shared admin/customer brand workspace: independent navigation and document panes. */
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-header { gap: 12px; margin-bottom: 10px; }
.brand-library-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-workspace { grid-template-columns: 286px minmax(0, 1fr); gap: 12px; }
.brand-library[data-layout="workspace"] .brand-library-brand-search { display: block; width: 100%; min-width: 0; height: 34px; min-height: 34px; margin: 10px 0 0; padding: 6px 10px; border: 1px solid var(--brand-line); border-radius: 8px; background: #f8fafc; font: inherit; font-size: 12px; color: var(--brand-ink); }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-selected-heading { padding-bottom: 8px; margin-bottom: 0; }
.brand-library[data-layout="workspace"] .brand-library-tabs { display: flex; flex: 0 0 auto; align-items: stretch; gap: 22px; min-width: 0; padding: 0 2px; margin-bottom: 12px; border-bottom: 1px solid var(--brand-line); }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-tabs > button { position: relative; width: auto; min-width: 0; min-height: 38px !important; min-block-size: 38px !important; padding: 8px 3px !important; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #687b96; font-size: 13px; line-height: 20px; white-space: nowrap; }
.brand-library[data-layout="workspace"] .brand-library-tabs > button.is-selected { color: var(--brand-blue) !important; font-weight: 650; }
.brand-library[data-layout="workspace"] .brand-library-tabs > button.is-selected::after { position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand-blue); content: ""; }
.brand-library[data-layout="workspace"] .brand-library-tabs small { margin-left: 4px; padding: 1px 6px; border-radius: 9px; background: #f0f3fa; color: #7889a1; font-size: 11px; }
.brand-library[data-layout="workspace"] .brand-library-catalog { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 14px; flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.brand-library[data-layout="workspace"] .brand-library-categories { min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 6px; border-radius: 9px; background: #f6f8fc; }
.brand-library[data-layout="workspace"] .brand-library-categories > h4 { margin: 0 9px 9px; color: #6c7c93; font-size: 12px; font-weight: 600; }
body.brand-library-page-active .brand-library[data-layout="workspace"] button.brand-library-category { display: flex; width: 100%; min-width: 0; min-height: 35px !important; min-block-size: 35px !important; height: auto; margin: 0 0 3px; padding: 7px 9px !important; justify-content: space-between; align-items: baseline; gap: 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; box-shadow: none; color: #52637d; font-size: 12px; text-align: left; line-height: 18px; }
.brand-library[data-layout="workspace"] .brand-library-category span { min-width: 0; overflow-wrap: anywhere; }
.brand-library[data-layout="workspace"] .brand-library-category small { color: #8290a6; font-size: 11px; }
.brand-library[data-layout="workspace"] button.brand-library-category:hover { background: #fff; }
.brand-library[data-layout="workspace"] button.brand-library-category.is-selected { border-color: #dae4ff; background: #eaf0ff; color: var(--brand-blue); font-weight: 600; }
.brand-library[data-layout="workspace"] .brand-library-catalog-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.brand-library[data-layout="workspace"] .brand-library-product-search { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; margin: 0 0 8px; min-width: 0; }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-product-search input { flex: 1; width: 0; min-width: 80px; height: 34px; min-height: 34px; margin: 0; padding: 6px 10px; border: 1px solid var(--brand-line); border-radius: 7px; font: inherit; font-size: 12px; background: #fff; color: var(--brand-ink); }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-product-search button { flex: 0 0 auto; width: auto; min-width: 0; min-height: 32px !important; min-block-size: 32px !important; height: 32px; padding: 5px 10px !important; margin: 0; font-size: 12px; line-height: 20px; white-space: nowrap; }
.brand-library[data-layout="workspace"] .brand-library-view-switch { display: flex; flex: 0 0 auto; border: 1px solid var(--brand-line); border-radius: 7px; overflow: hidden; }
.brand-library[data-layout="workspace"] .brand-library-view-switch button { border: 0; border-radius: 0; background: #fff; box-shadow: none; color: #677994; }
.brand-library[data-layout="workspace"] .brand-library-view-switch button.is-selected { background: #eaf0ff; color: var(--brand-blue); }
.brand-library[data-layout="workspace"] .brand-library-attributes { display: flex; flex: 0 0 auto; align-items: flex-start; gap: 8px; padding: 7px 0; border-top: 1px solid #f0f3f8; border-bottom: 1px solid #f0f3f8; font-size: 12px; }
.brand-library[data-layout="workspace"] .brand-library-attributes > span { padding-top: 8px; color: #7d8da5; }
.brand-library[data-layout="workspace"] .brand-library-attribute-options { display: flex; flex: 1; flex-wrap: wrap; gap: 5px; min-width: 0; max-height: 69px; overflow: hidden; }
.brand-library[data-layout="workspace"] .brand-library-attribute-options.is-expanded { max-height: min(180px, 25dvh); overflow-y: auto; }
.brand-library[data-layout="workspace"] .brand-library-all-attributes { flex: 0 0 auto; padding: 5px 0 9px; color: #7d8da5; font-size: 12px; }
.brand-library[data-layout="workspace"] .brand-library-category-select { display: none; }
.brand-library[data-layout="workspace"] .brand-library-product-heading > strong { min-width: 0; font-size: 12px !important; font-weight: 500; color: #6a7b93; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-library[data-layout="workspace"] .brand-library-product-heading > span { flex-shrink: 0; }
.brand-library[data-layout="workspace"] .brand-library-list { min-width: 0; border: 1px solid #e8edf5; border-radius: 8px; overflow: hidden; }
.brand-library[data-layout="workspace"] :is(.brand-library-list-head,.brand-library-list-row) { display: grid; grid-template-columns: minmax(130px, 1.8fr) minmax(100px, 1.1fr) 66px minmax(80px, .7fr) 62px; align-items: center; gap: 12px; padding: 10px; margin: 0; }
.brand-library[data-layout="workspace"] .brand-library-list-head { position: sticky; top: 0; z-index: 1; background: #f5f8fc; color: #8190a6; font-size: 11px; }
.brand-library[data-layout="workspace"] .brand-library-list-row { min-width: 0; border: 0; border-bottom: 1px solid #edf1f7; border-radius: 0; background: #fff; font-size: 12px; }
.brand-library[data-layout="workspace"] .brand-library-list-row:last-child { border-bottom: 0; }
.brand-library[data-layout="workspace"] .brand-library-list-row:hover { background: #fafbff; }
.brand-library[data-layout="workspace"] .brand-library-list-product { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-library[data-layout="workspace"] .brand-library-list-product > div { min-width: 0; }
.brand-library[data-layout="workspace"] .brand-library-list-product h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.brand-library[data-layout="workspace"] .brand-library-list-image { display: block; flex: 0 0 48px; width: 48px; height: 48px; padding: 3px; border: 1px solid #edf1f7; border-radius: 7px; background: #fff; }
.brand-library[data-layout="workspace"] .brand-library-list-image .brand-library-image-fallback { font-size: 10px; }
.brand-library[data-layout="workspace"] .brand-library-list-model { min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.brand-library[data-layout="workspace"] .brand-library-list-model strong { font-weight: 500; }
.brand-library[data-layout="workspace"] :is(.brand-library-list-product,.brand-library-list-model) small { font-size: 11px; line-height: 1.5; color: #8997ab; }
.brand-library[data-layout="workspace"] .brand-library-list-row > .brand-library-price { font-size: 14px; overflow-wrap: anywhere; }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-list-row > button { min-width: 0; min-height: 30px !important; min-block-size: 30px !important; padding: 4px 0 !important; margin: 0; font-size: 12px; }
.brand-library[data-layout="workspace"] .brand-library-product-image { aspect-ratio: 1.6; padding: 10px; }
.brand-library[data-layout="workspace"] .brand-library-products { gap: 10px; }
.brand-library[data-layout="workspace"] .brand-library-certificate-host { display: flex; flex: 1 1 0; min-width: 0; min-height: 0; overflow: hidden; }
@media (max-width: 1250px) {
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-workspace { grid-template-columns: 254px minmax(0, 1fr); gap: 10px; }
  .brand-library[data-layout="workspace"] .brand-library-catalog { grid-template-columns: 150px minmax(0, 1fr); gap: 10px; }
  .brand-library[data-layout="workspace"] :is(.brand-library-list-head,.brand-library-list-row) { grid-template-columns: minmax(110px, 1.5fr) minmax(90px, 1fr) 60px 78px 56px; gap: 7px; padding: 8px; }
  .brand-library[data-layout="workspace"] .brand-library-list-image { width: 38px; height: 38px; flex-basis: 38px; }
}
@media (max-width: 1050px) {
  .brand-library[data-layout="workspace"] .brand-library-catalog { display: flex; }
  .brand-library[data-layout="workspace"] .brand-library-categories { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-catalog-main { flex: 1; }
  .brand-library[data-layout="workspace"] .brand-library-category-select { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-bottom: 7px; color: #7d8da5; font-size: 12px; }
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-category-select select { width: auto; flex: 1; min-width: 0; height: 32px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--brand-line); border-radius: 6px; background: #fff; font: inherit; color: var(--brand-ink); }
}
@media (max-width: 760px) {
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(156px, 26%) minmax(0, 1fr); gap: 8px; }
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-header h2 { font-size: 18px; }
  .brand-library[data-layout="workspace"] .brand-library-header p { display: none; }
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-header-actions button { padding: 5px 8px !important; font-size: 11px; min-height: 30px !important; min-block-size: 30px !important; }
  .brand-library[data-layout="workspace"] .brand-library-sidebar-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 6px; padding-bottom: 7px; }
  .brand-library[data-layout="workspace"] .brand-library-brand-search { margin: 0; }
  .brand-library[data-layout="workspace"] .brand-library-import-button { grid-column: 1 / -1; margin: 0; }
  .brand-library[data-layout="workspace"] .brand-library-tabs { gap: 16px; margin-bottom: 8px; }
  .brand-library[data-layout="workspace"] .brand-library-product-search { flex-wrap: wrap; }
  .brand-library[data-layout="workspace"] .brand-library-product-search input { flex-basis: 100px; }
  .brand-library[data-layout="workspace"] .brand-library-list-head { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-list-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .brand-library[data-layout="workspace"] .brand-library-list-product { grid-column: 1 / -1; }
  .brand-library[data-layout="workspace"] .brand-library-list-model { font-size: 11px; }
  .brand-library[data-layout="workspace"] .brand-library-list-model small { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-list-row > button { justify-self: end; }
  .brand-library[data-layout="workspace"] .brand-library-product-heading { margin-top: 2px; }
}
/* The application's navigation can consume 220px even on a tablet: respond
   to the workspace's available width, not just the full browser viewport. */
.brand-library[data-layout="workspace"] { container-type: inline-size; container-name: brand-workspace; }
@container brand-workspace (max-width: 850px) {
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(156px, 26%) minmax(0, 1fr); gap: 8px; }
  .brand-library[data-layout="workspace"] .brand-library-sidebar-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 6px; padding-bottom: 7px; }
  .brand-library[data-layout="workspace"] .brand-library-brand-search { margin: 0; }
  .brand-library[data-layout="workspace"] .brand-library-import-button { grid-column: 1 / -1; margin: 0; }
  .brand-library[data-layout="workspace"] .brand-library-catalog { display: flex; }
  .brand-library[data-layout="workspace"] .brand-library-categories { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-catalog-main { flex: 1; }
  .brand-library[data-layout="workspace"] .brand-library-category-select { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin-bottom: 7px; color: #7d8da5; font-size: 12px; }
  body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-category-select select { width: auto; flex: 1; min-width: 0; height: 32px; min-height: 32px; padding: 4px 8px; border: 1px solid var(--brand-line); border-radius: 6px; background: #fff; font: inherit; color: var(--brand-ink); }
}
@container brand-workspace (max-width: 570px) {
  .brand-library[data-layout="workspace"] .brand-library-product-search { flex-wrap: wrap; }
  .brand-library[data-layout="workspace"] .brand-library-list-head { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-list-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .brand-library[data-layout="workspace"] .brand-library-list-product { grid-column: 1 / -1; }
  .brand-library[data-layout="workspace"] .brand-library-list-model { font-size: 11px; }
  .brand-library[data-layout="workspace"] .brand-library-list-model small { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-list-row > button { justify-self: end; }
}
/* Phone customer pages use the outer page scroller. New tab panes must have
   natural content height there rather than a zero flex basis in auto rows. */
@media (max-width: 760px) {
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library[data-layout="workspace"] .brand-library-catalog { flex: 0 0 auto; display: block; overflow: visible; }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library[data-layout="workspace"] .brand-library-catalog-main { flex: 0 0 auto; overflow: visible; }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library[data-layout="workspace"] .brand-library-certificate-host { flex: 0 0 auto; height: 760px; min-height: 680px; overflow: auto; }
}

/* Customer certificate approval attention stays inside the existing brand workspace. */
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-attention-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
.brand-library[data-layout="workspace"] .brand-library-attention-filter { display: inline-flex; align-items: center; gap: 5px; min-width: 0; margin: 0; padding: 5px 8px; border: 1px solid #e4e9f5; border-radius: 7px; background: #fff; color: #637795; font: inherit; font-size: 12px; line-height: 1.35; white-space: nowrap; cursor: pointer; }
.brand-library[data-layout="workspace"] .brand-library-attention-filter.is-selected { border-color: #becaff; background: #eef2ff; color: #3455e8; }
.brand-library[data-layout="workspace"] .brand-library-attention-badge { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; }
.brand-library[data-layout="workspace"] .brand-library-attention-badge[hidden] { display: none; }
.brand-library[data-layout="workspace"] .brand-library-brand:has([data-brand-attention-brand]) { position: relative; }
.brand-library[data-layout="workspace"] [data-brand-attention-brand] { position: absolute; right: 5px; top: 5px; }
.brand-library[data-layout="workspace"] [data-brand-attention-tab] { margin-left: 4px; vertical-align: middle; }
.brand-library[data-layout="workspace"] .brand-library-attention-retry { border: 0; padding: 4px; background: transparent; color: #b45309; font: inherit; font-size: 11px; cursor: pointer; }
.brand-library[data-layout="workspace"] .brand-library-attention-panel { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; container-type: inline-size; container-name: brand-attention; }
.brand-library[data-layout="workspace"] .brand-library-attention-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding-bottom: 12px; border-bottom: 1px solid #edf1f7; }
.brand-library[data-layout="workspace"] .brand-library-attention-heading h3 { margin: 0; color: #273c5a; font-size: 17px; line-height: 1.5; }
.brand-library[data-layout="workspace"] .brand-library-attention-heading p { margin: 3px 0 0; color: #8190a6; font-size: 11px; line-height: 1.5; }
.brand-library[data-layout="workspace"] .brand-library-attention-search { display: flex; flex: 0 0 auto; gap: 6px; align-items: center; min-width: 0; padding: 10px 0; }
.brand-library[data-layout="workspace"] .brand-library-attention-search input { flex: 1 1 200px; width: 100%; min-width: 0; height: 32px; min-height: 32px; padding: 5px 9px; border: 1px solid #dce5f5; border-radius: 7px; background: #fff; color: #334b6c; font: inherit; font-size: 12px; }
.brand-library[data-layout="workspace"] .brand-library-attention-list { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; border: 1px solid #e7edf7; border-radius: 8px; }
.brand-library[data-layout="workspace"] .brand-library-attention-row { display: grid; grid-template-columns: minmax(65px, .8fr) minmax(90px, 1.4fr) minmax(70px, .7fr) minmax(100px, .8fr) 138px; align-items: center; gap: 8px; min-width: 0; padding: 10px; border-bottom: 1px solid #edf1f7; color: #334b6c; font-size: 12px; }
.brand-library[data-layout="workspace"] .brand-library-attention-row:last-child { border-bottom: 0; }
.brand-library[data-layout="workspace"] .brand-library-attention-row-head { position: sticky; top: 0; z-index: 1; background: #f5f8fc; color: #8190a6; font-size: 11px; }
.brand-library[data-layout="workspace"] .brand-library-attention-row.is-new:not(.is-seen) { background: #f3f6ff; }
.brand-library[data-layout="workspace"] .brand-library-attention-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.brand-library[data-layout="workspace"] .brand-library-attention-subject { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.brand-library[data-layout="workspace"] .brand-library-attention-subject button { display: block; min-width: 0; max-width: 100%; margin: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; color: #355be8; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.brand-library[data-layout="workspace"] .brand-library-attention-subject small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8a98ad; font-size: 11px; }
.brand-library[data-layout="workspace"] .brand-library-attention-kind { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; }
.brand-library[data-layout="workspace"] [data-brand-attention-new] { color: #e04444; font-size: 10px; font-style: normal; }
.brand-library[data-layout="workspace"] .brand-library-attention-expiry { min-width: 0; color: #6e809b; font-variant-numeric: tabular-nums; }
.brand-library[data-layout="workspace"] .brand-library-attention-actions { display: flex; justify-content: flex-start; gap: 6px; min-width: 0; white-space: nowrap; }
body.brand-library-page-active .brand-library[data-layout="workspace"] .brand-library-attention-actions button { min-width: 0; min-height: 29px !important; min-block-size: 29px !important; padding: 4px 7px !important; margin: 0; font-size: 11px; }
.brand-library[data-layout="workspace"] .brand-library-attention-actions .is-primary { background: #eef2ff; border-color: #cfdaff; color: #3859e8; }
@container brand-attention (max-width: 650px) {
  .brand-library[data-layout="workspace"] .brand-library-attention-row { grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) minmax(0, 1fr); gap: 5px 8px; padding: 9px; }
  .brand-library[data-layout="workspace"] .brand-library-attention-row-head { display: none; }
  .brand-library[data-layout="workspace"] .brand-library-attention-expiry { grid-column: 1 / 3; font-size: 11px; }
  .brand-library[data-layout="workspace"] .brand-library-attention-actions { justify-self: end; }
  .brand-library[data-layout="workspace"] .brand-library-attention-heading { align-items: flex-start; }
  .brand-library[data-layout="workspace"] .brand-library-attention-heading h3 { font-size: 14px; }
}
@media (max-width: 760px) {
  .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-header { flex-wrap: wrap; gap: 6px; }
  .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-header-actions { flex-wrap: wrap; min-width: 0; }
  .brand-library[data-layout="workspace"] .brand-library-attention-filter { padding: 4px 6px; font-size: 11px; }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library[data-layout="workspace"] .brand-library-attention-panel { flex: 0 0 auto; height: 680px; min-height: 500px; }
}
@container brand-attention (max-width: 400px) {
  .brand-library[data-layout="workspace"] .brand-library-attention-row { grid-template-columns: minmax(0, 1fr) auto; }
  .brand-library[data-layout="workspace"] .brand-library-attention-name { grid-column: 1; grid-row: 1; }
  .brand-library[data-layout="workspace"] .brand-library-attention-kind { grid-column: 2; grid-row: 1; justify-self: end; }
  .brand-library[data-layout="workspace"] .brand-library-attention-subject { grid-column: 1 / -1; grid-row: 2; }
  .brand-library[data-layout="workspace"] .brand-library-attention-expiry { grid-column: 1; grid-row: 3; }
  .brand-library[data-layout="workspace"] .brand-library-attention-actions { grid-column: 2; grid-row: 3; }
  .brand-library[data-layout="workspace"] .brand-library-attention-heading { flex-wrap: wrap; }
}
.brand-library[data-layout="workspace"] [data-brand-attention-type-filter] { flex: 0 1 98px; min-width: 76px; width: 98px; max-width: 110px; height: 32px; min-height: 32px; margin: 0; padding: 4px 6px; border: 1px solid #dce5f5; border-radius: 7px; background: #fff; color: #637795; font: inherit; font-size: 12px; }
/* Keep action labels intact; compact phones put the query field on its own row. */
.brand-library[data-layout="workspace"] .brand-library-attention-search > button { flex: 0 0 auto; white-space: nowrap; }
@container brand-attention (max-width: 400px) {
  .brand-library[data-layout="workspace"] .brand-library-attention-search { flex-wrap: wrap; }
  .brand-library[data-layout="workspace"] .brand-library-attention-search > input { flex: 0 0 100%; width: 100%; box-sizing: border-box; }
  .brand-library[data-layout="workspace"] [data-brand-attention-type-filter] { flex: 0 0 98px; }
}

/* Keep the customer's global tools beside the selected brand, outside panes
   replaced by product, certificate and reminder navigation. */
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding: 12px; border: 1px solid var(--brand-line); border-radius: 14px; background: #fff; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-main > .brand-library-content { flex: 1 1 0; padding: 0; border: 0; border-radius: 0; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading { flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding-bottom: 10px; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-selected-identity { display: flex; flex: 1 1 180px; align-items: center; gap: 12px; min-width: 0; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-selected-copy { min-width: 0; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading > .brand-library-header-actions { flex: 0 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-attention-scope { color: #8a97ac; font-size: 11px; white-space: nowrap; }
.brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading .brand-library-attention-strip { gap: 5px; }
body.brand-library-page-active .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading .brand-library-attention-filter,
body.brand-library-page-active .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading [data-brand-action="refresh"] { min-height: 30px !important; min-block-size: 30px !important; padding: 5px 8px !important; border-radius: 7px; font-size: 12px; white-space: nowrap; }

/* One compact review action, with a separate truthful count/status badge. */
.brand-library[data-brand-role="admin"] .brand-library-header h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
body.brand-library-page-active .brand-library[data-brand-role="admin"] .brand-library-request-badge { position: relative; isolation: isolate; display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; height: 36px; min-height: 36px !important; min-block-size: 36px !important; margin: 0; padding: 0 11px !important; border: 1px solid #d8e2fc; border-radius: 8px; background: #eff4ff; color: #385bd0; font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap; box-shadow: none; transition: color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease; }
.brand-library[data-brand-role="admin"] .brand-library-request-badge::before { content: ""; position: absolute; z-index: -1; inset: -1px; border-radius: inherit; background: linear-gradient(115deg, #3567e8, #6651df); opacity: 0; transition: opacity 220ms ease; }
body.brand-library-page-active .brand-library[data-brand-role="admin"] .brand-library-request-badge:is(:hover, :focus-visible) { color: #fff; border-color: transparent; box-shadow: 0 4px 12px #4c5cdb26; transform: translateY(-1px); }
.brand-library[data-brand-role="admin"] .brand-library-request-badge:is(:hover, :focus-visible)::before { opacity: 1; }
.brand-library[data-brand-role="admin"] .brand-library-request-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.brand-library[data-brand-role="admin"] .brand-library-request-state { display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 3px 7px; border-radius: 5px; background: #fff0db; color: #a85d09; font-size: 11px; font-weight: 500; transition: color 220ms ease, background 220ms ease; }
.brand-library[data-brand-role="admin"] .brand-library-request-state b { font-size: 12px; font-variant-numeric: tabular-nums; }
.brand-library[data-brand-role="admin"] .brand-library-request-state.is-zero,
.brand-library[data-brand-role="admin"] [data-request-state="loading"] .brand-library-request-state { background: #e7ecf5; color: #6e7c92; }
.brand-library[data-brand-role="admin"] .brand-library-request-badge:is(:hover, :focus-visible) .brand-library-request-state { background: #ffffff24; color: #fff; }
.brand-library[data-brand-role="admin"] .brand-library-request-arrow { font-size: 19px; font-weight: 400; opacity: .65; }
@media (prefers-reduced-motion: reduce) {
  .brand-library[data-brand-role="admin"] .brand-library-request-badge,
  .brand-library[data-brand-role="admin"] .brand-library-request-badge::before,
  .brand-library[data-brand-role="admin"] .brand-library-request-state { transition: none; }
  body.brand-library-page-active .brand-library[data-brand-role="admin"] .brand-library-request-badge:is(:hover, :focus-visible) { transform: none; }
}
@media (max-width: 760px) {
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library[data-layout="workspace"] .brand-library-customer-main { height: auto; min-height: 0; overflow: visible; padding: 8px; border-radius: 11px; }
  body.customer-portal #customer #customerBrandLibraryView:not(.hidden) .brand-library[data-layout="workspace"] .brand-library-customer-main > .brand-library-content { flex: 0 0 auto; padding: 0 !important; border: 0; border-radius: 0 !important; }
  .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading > .brand-library-header-actions { display: grid; grid-template-columns: repeat(4, max-content); justify-content: flex-start; flex-basis: 100%; }
  .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading .brand-library-attention-scope { grid-column: 1 / -1; }
  .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-customer-heading .brand-library-attention-strip { display: contents; }
  .brand-library[data-layout="workspace"][data-brand-role="customer"] .brand-library-selected-identity { flex-basis: 100%; }
}

.brand-library[data-layout="workspace"][data-document-tab] .brand-library-tabs {
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  body.brand-library-page-active .brand-library[data-brand-role="admin"][data-document-tab] .brand-library-workspace {
    grid-template-rows: 164px minmax(0, 1fr);
  }
}


/* Scoped boutique workspace: navigation and pagination stay still. */
body.customer-featured-page-active,
body.customer-featured-page-active .main,
body.customer-featured-page-active #customer { overflow: hidden !important; }
body.customer-featured-page-active #customer { padding-bottom: 0 !important; }
body.customer-featured-page-active #customerFeaturedLibraryView { min-height: 0 !important; padding-bottom: 0 !important; margin-bottom: 0 !important; overflow: hidden; }
#customerFeaturedLibraryRoot { --featured-line: #e0e7f2; --featured-muted: #7889a3; display: flex; flex: 0 0 auto; flex-direction: column; min-width: 0; min-height: 0; height: var(--customer-featured-height, calc(100dvh - 155px)); overflow: hidden; color: #253953; }
#customerFeaturedLibraryRoot *, #customerFeaturedLibraryRoot *::before, #customerFeaturedLibraryRoot *::after { box-sizing: border-box; }
#customerFeaturedLibraryRoot [hidden] { display: none !important; }
#customerFeaturedLibraryRoot :is(button, input, select) { font: inherit; font-size: 13px; }
#customerFeaturedLibraryRoot button { width: auto; min-width: 0; height: 36px; min-height: 36px; min-block-size: 36px; padding: 6px 12px; border-radius: 8px; white-space: nowrap; cursor: pointer; }
#customerFeaturedLibraryRoot button:disabled { cursor: default; opacity: .5; }
#customerFeaturedLibraryRoot :is(button, input, select):focus-visible { outline: 2px solid #718bed; outline-offset: 2px; }
.customer-featured-header { display: grid; flex: 0 0 auto; grid-template-columns: minmax(190px, 1fr) minmax(0, max-content); align-items: center; gap: 16px; min-width: 0; padding: 0 1px 12px; }
.customer-featured-heading { min-width: 0; }
.customer-featured-header h2 { margin: 0; font-size: 22px; line-height: 1.35; }
.customer-featured-header p { margin: 4px 0 0; font-size: 12px; color: var(--featured-muted); }
.customer-featured-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; max-width: 100%; font-size: 13px; color: #52719c; }
.customer-featured-header-actions > span { flex: 0 0 auto; white-space: nowrap; }
.customer-featured-header-actions > [data-featured-refresh] { flex: 0 0 auto; }
.customer-featured-tag-filters { display: flex; flex: 0 1 auto; gap: 6px; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; padding: 3px 2px; scrollbar-width: thin; }
#customerFeaturedLibraryRoot .customer-featured-tag-filters button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; max-width: 230px; border: 1px solid var(--featured-line); background: #fff; color: #647894; }
#customerFeaturedLibraryRoot .customer-featured-tag-filters button > span { overflow: hidden; text-overflow: ellipsis; }
#customerFeaturedLibraryRoot .customer-featured-tag-filters button > small { flex: 0 0 auto; font-size: 11px; opacity: .78; }
#customerFeaturedLibraryRoot .customer-featured-tag-filters button[aria-pressed="true"] { border-color: #8b9fea; background: #edf2ff; color: #355bc1; font-weight: 700; }
.customer-featured-filters { display: grid; flex: 0 0 auto; grid-template-columns: minmax(180px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr) minmax(175px, 1.4fr) minmax(125px, 1fr) auto; gap: 8px; margin: 0; padding: 12px; background: #fff; border: 1px solid var(--featured-line); border-radius: 12px; }
#customerFeaturedLibraryRoot .customer-featured-filters :is(input, select) { width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--featured-line); border-radius: 8px; background: #f9fbff; color: #354b69; line-height: 20px; }
.customer-featured-price-filters { display: grid; grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr); align-items: center; gap: 5px; }
.customer-featured-price-filters > span { color: #90a0b7; text-align: center; }
.customer-featured-filter-actions { display: flex; align-items: center; gap: 6px; }
.customer-featured-status { flex: 0 0 auto; min-height: 28px; padding: 7px 2px; color: var(--featured-muted); font-size: 12px; line-height: 16px; }
.customer-featured-status.is-error { color: #b45038; }
.customer-featured-scroll { flex: 1 1 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 2px 3px 10px 1px; }
#customerFeaturedLibraryRoot .customer-product-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; align-items: stretch; width: 100%; min-width: 0; }
#customerFeaturedLibraryRoot .customer-product-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--featured-line); border-radius: 12px; overflow: hidden; background: #fff; }
#customerFeaturedLibraryRoot .customer-product-card-media { position: relative; flex: 0 0 auto; height: 180px; padding: 10px; }
#customerFeaturedLibraryRoot .customer-product-card-media img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
#customerFeaturedLibraryRoot .customer-product-card-placeholder { display: grid; place-items: center; height: 100%; color: #a0aec2; font-size: 12px; }
#customerFeaturedLibraryRoot .customer-product-card-tags { position: absolute; z-index: 1; top: 8px; left: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
#customerFeaturedLibraryRoot .customer-product-card-tags > span { padding: 2px 5px; border-radius: 4px; font-size: 10px; line-height: 16px; }
#customerFeaturedLibraryRoot .customer-featured-badge { background: #fff0d9; color: #9a5c12; }
#customerFeaturedLibraryRoot .customer-featured-pinned { background: #edf2ff; color: #4e69aa; }
#customerFeaturedLibraryRoot .customer-product-card-body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; padding: 2px 12px 12px; }
#customerFeaturedLibraryRoot .customer-product-card-body h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 40px; min-height: 40px; max-height: 40px; min-block-size: 40px; margin: 7px 0; color: #273b57; font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
#customerFeaturedLibraryRoot .customer-featured-category-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; margin: 0 0 8px; }
#customerFeaturedLibraryRoot .customer-featured-category-tags > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; background: #eff4ff; padding: 2px 5px; color: #5b719b; font-size: 11px; line-height: 16px; }
#customerFeaturedLibraryRoot .customer-product-card-price-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 5px; margin-top: auto; }
#customerFeaturedLibraryRoot .customer-product-card-price { color: #ec6254; font-size: 21px; font-weight: 700; line-height: 30px; }
#customerFeaturedLibraryRoot .customer-product-card-price small { font-size: 13px; margin-right: 2px; }
#customerFeaturedLibraryRoot .customer-product-card-labels { display: flex; flex-wrap: wrap; gap: 4px; font-size: 10px; color: #71839e; }
#customerFeaturedLibraryRoot .customer-product-card-labels span { background: #f0f5fa; border-radius: 4px; padding: 2px 4px; }
#customerFeaturedLibraryRoot .customer-product-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-width: 0; margin-top: 7px; font-size: 12px; color: #8090a8; }
#customerFeaturedLibraryRoot .customer-product-card-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
#customerFeaturedLibraryRoot .customer-featured-detail-button { align-self: flex-start; height: auto; min-height: 28px; min-block-size: 28px; padding: 5px 0 0; border: 0; color: #3959c9; background: transparent; font-size: 12px; }
.customer-featured-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; padding: 30px 12px; text-align: center; gap: 12px; color: #8190a8; font-size: 13px; }
.customer-featured-pager { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 9px 0 1px; border-top: 1px solid var(--featured-line); background: #f4f7fb; font-size: 12px; color: #7486a0; }
.customer-featured-pager > div, .customer-featured-pager form { display: flex; align-items: center; gap: 7px; margin: 0; }
.customer-featured-pager label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
#customerFeaturedLibraryRoot .customer-featured-pager input { width: 52px; height: 34px; padding: 4px 6px; border: 1px solid var(--featured-line); border-radius: 7px; background: white; text-align: center; }
#customerFeaturedLibraryRoot .customer-featured-detail { width: min(510px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 16px; border: 1px solid var(--featured-line); border-radius: 16px; background: #fff; color: #273b57; overflow: auto; }
.customer-featured-detail::backdrop { background: #1b31595e; }
#customerFeaturedLibraryRoot .customer-featured-detail .customer-product-card-grid { grid-template-columns: minmax(0, 1fr); }
#customerFeaturedLibraryRoot .customer-featured-detail .customer-product-card-media { height: 240px; }
#customerFeaturedLibraryRoot .customer-featured-detail .customer-featured-category-tags > span { white-space: normal; overflow-wrap: anywhere; }
.customer-featured-detail dl { margin: 12px 0; font-size: 13px; }
.customer-featured-detail dl > div { display: grid; grid-template-columns: 65px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2f7; }
.customer-featured-detail dt { color: #8492a8; }
.customer-featured-detail dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 1250px) {
  .customer-featured-filters { grid-template-columns: minmax(180px, 2fr) minmax(110px, 1fr) minmax(110px, 1fr); }
}
@media (max-width: 760px) {
  /* Keep the default workbench bubble clear of the fixed pager. A user's
     explicitly dragged inline position remains authoritative. */
  body.customer-portal.customer-featured-page-active #customer#customer #customerWorkbenchMobileOpen#customerWorkbenchMobileOpen.customer-workbench-mobile-open { bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 82px)) !important; }
  #customerFeaturedLibraryRoot { height: var(--customer-featured-height, calc(100dvh - 100px)); }
  .customer-featured-header { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; padding-bottom: 8px; }
  .customer-featured-heading { grid-column: 1 / -1; grid-row: 1; padding-right: 110px; }
  .customer-featured-header h2 { font-size: 18px; }
  .customer-featured-header p { font-size: 11px; margin-top: 2px; }
  .customer-featured-header-actions { display: contents; font-size: 11px; }
  .customer-featured-header-actions > [data-featured-total] { grid-column: 1 / -1; grid-row: 1; justify-self: end; }
  .customer-featured-header-actions > [data-featured-tag-filters] { grid-column: 1; grid-row: 2; width: 100%; }
  .customer-featured-header-actions > [data-featured-refresh] { grid-column: 2; grid-row: 2; justify-self: end; }
  body.customer-portal #customer #customerFeaturedLibraryRoot button { height: 34px !important; min-height: 34px !important; min-block-size: 34px !important; padding: 5px 9px; font-size: 12px; }
  .customer-featured-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px; border-radius: 10px; }
  .customer-featured-filters > [data-featured-query] { grid-column: 1 / -1; grid-row: 1; padding-right: 112px !important; }
  .customer-featured-filter-actions { grid-column: 2; grid-row: 1; justify-content: flex-end; padding-right: 3px; z-index: 1; pointer-events: none; }
  .customer-featured-filter-actions button { pointer-events: auto; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-filters :is(input, select) { height: 34px !important; min-height: 34px !important; min-block-size: 34px !important; padding: 5px 7px; font-size: 12px; }
  .customer-featured-status { min-height: 24px; padding: 5px 1px; font-size: 10px; line-height: 14px; }
  #customerFeaturedLibraryRoot .customer-product-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #customerFeaturedLibraryRoot .customer-product-card-media { height: 128px; padding: 6px; }
  #customerFeaturedLibraryRoot .customer-product-card-body { padding: 0 8px 8px; }
  #customerFeaturedLibraryRoot .customer-product-card-body h3 { font-size: 12px; line-height: 18px; height: 36px; min-height: 36px; max-height: 36px; min-block-size: 36px; margin: 5px 0; }
  #customerFeaturedLibraryRoot .customer-product-card-price { font-size: 18px; line-height: 26px; }
  #customerFeaturedLibraryRoot .customer-product-card-meta { font-size: 10px; margin-top: 5px; }
  #customerFeaturedLibraryRoot .customer-featured-category-tags { gap: 3px; margin-bottom: 5px; }
  #customerFeaturedLibraryRoot .customer-featured-category-tags > span { font-size: 10px; padding: 1px 4px; }
  #customerFeaturedLibraryRoot .customer-product-card-tags { top: 5px; left: 5px; gap: 3px; }
  #customerFeaturedLibraryRoot .customer-product-card-tags > span { font-size: 9px; padding: 1px 4px; }
  .customer-featured-pager { flex-direction: column; align-items: stretch; gap: 5px; padding-top: 6px; padding-bottom: env(safe-area-inset-bottom, 0px); font-size: 11px; }
  .customer-featured-pager > div { justify-content: space-between; gap: 4px; }
  .customer-featured-pager > span { text-align: center; }
  .customer-featured-pager form { gap: 4px; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-pager input { width: 42px; height: 34px !important; min-height: 34px !important; min-block-size: 34px !important; }
  .customer-featured-pager label { gap: 3px; }
}

@media (max-width: 760px) {
  /* Final compact pass for the customer phone only. */
  body.customer-portal #customer #customerFeaturedLibraryRoot {
    height: calc(100dvh - 118px) !important;
    min-height: 0 !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-header {
    gap: 4px 6px !important;
    padding-bottom: 5px !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-heading {
    padding-right: 0 !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-header h2 {
    font-size: 17px !important;
    line-height: 22px !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-header p {
    margin-top: 1px !important;
    font-size: 10px !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 6px !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-filters > [data-featured-query] {
    grid-column: 1 !important;
    grid-row: 1 !important;
    padding-right: 0 !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-filter-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 0 !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-scroll { padding: 4px 1px 6px !important; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-product-card-grid { gap: 7px !important; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-product-card-media { height: 112px !important; padding: 5px !important; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-product-card-body { padding: 0 7px 7px !important; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-product-card-body h3 {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 4px 0 !important;
    font-size: 11px !important;
    line-height: 17px !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-product-card-price { font-size: 16px !important; line-height: 22px !important; }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-product-card-meta,
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-category-tags > span { font-size: 9px !important; }
}

/* Customer phone layout repair: keep one bounded catalogue viewport with its
   own vertical scroll, so cards are never clipped by the page shell. Desktop
   keeps the existing fixed workspace and internal scroll. */
@media (max-width: 760px) {
  body.customer-portal.customer-featured-page-active #customer {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }
  body.customer-portal.customer-featured-page-active #customerFeaturedLibraryView:not(.hidden) {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot {
    height: calc(100dvh - 118px) !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    overflow: hidden !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 8px !important;
  }
  body.customer-portal #customer #customerFeaturedLibraryRoot .customer-featured-pager {
    flex: 0 0 auto !important;
    margin-top: 0 !important;
  }
}


.brand-library-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.brand-library-title-row .brand-library-certificate-entry { padding: 5px 10px; min-height: 30px; font-size: 12px; color: #3656df; background: #f1f5ff; border-color: #d6e0ff; }
dialog.brand-cert-dialog { --cert-blue: #3656df; --cert-ink: #213049; --cert-muted: #74829a; --cert-line: #e1e7f1; width: min(1120px, calc(100vw - 36px)); height: min(800px, calc(100dvh - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--cert-line); border-radius: 16px; background: #fff; color: var(--cert-ink); box-shadow: 0 24px 80px #14254640; overflow: hidden; }
dialog.brand-cert-dialog[open] { display: flex; flex-direction: column; }
.brand-cert-dialog::backdrop { background: #13233f70; }
.brand-cert-dialog *, .brand-cert-dialog *::before, .brand-cert-dialog *::after { box-sizing: border-box; }
.brand-cert-dialog [hidden] { display: none !important; }
.brand-cert-dialog h2, .brand-cert-dialog h3, .brand-cert-dialog p { margin: 0; }
.brand-cert-dialog h2 { font-size: 19px; line-height: 1.5; }
.brand-cert-dialog h2 > span { font-weight: 400; font-size: 14px; color: var(--cert-muted); }
.brand-cert-dialog h3 { font-size: 16px; line-height: 1.5; }
.brand-cert-dialog button { min-width: 0; width: auto; height: auto; min-height: 34px; min-block-size: 34px; padding: 7px 11px; border: 1px solid var(--cert-line); border-radius: 8px; background: #fff; color: #4b5e7a; font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; white-space: nowrap; }
.brand-cert-dialog button:hover:not(:disabled) { background: #f3f6ff; color: var(--cert-blue); border-color: #b7c6ff; }
.brand-cert-dialog button:disabled { opacity: .5; cursor: default; }
.brand-cert-dialog button.is-primary { background: var(--cert-blue); border-color: var(--cert-blue); color: #fff; }
.brand-cert-dialog button.is-danger { color: #bb4946; background: #fff8f7; }
.brand-cert-dialog :is(button,input,select):focus-visible { outline: 3px solid #a2b5ff; outline-offset: 2px; }
.brand-cert-dialog input:not([type="checkbox"]):not([type="file"]), .brand-cert-dialog select { width: 100%; min-width: 0; height: 36px; min-height: 36px; border: 1px solid #d7dfed; border-radius: 7px; background: #fff; padding: 7px 10px; color: var(--cert-ink); font: inherit; font-size: 13px; }
.brand-cert-dialog input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; margin: 0; flex: 0 0 16px; accent-color: var(--cert-blue); }
.brand-cert-header { padding: 20px 22px; border-bottom: 1px solid var(--cert-line); display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 18px; }
.brand-cert-header p, .brand-cert-panel-heading p { color: var(--cert-muted); font-size: 12px; margin-top: 6px; line-height: 1.7; }
.brand-cert-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.brand-cert-workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr); flex: 1 1 0; min-height: 0; overflow: hidden; }
.brand-cert-sidebar { min-height: 0; min-width: 0; padding: 16px 12px; background: #fafbfe; border-right: 1px solid var(--cert-line); display: flex; flex-direction: column; gap: 12px; }
.brand-cert-search-label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--cert-muted); }
.brand-cert-list { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.brand-cert-dialog .brand-cert-list-item { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 12px; flex: 0 0 auto; width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; border: 1px solid var(--cert-line); border-radius: 8px; background: #fff; }
.brand-cert-list-item strong { font-size: 15px; color: var(--cert-ink); }
.brand-cert-list-item small { font-size: 12px; color: var(--cert-muted); }
.brand-cert-list-item span { font-size: 11px; color: #557194; }
.brand-cert-dialog .brand-cert-list-item.is-selected { border-color: #899fff; background: #eef3ff; box-shadow: inset 0 0 0 1px #899fff; }
.brand-cert-list-item.is-selected strong { color: var(--cert-blue); }
.brand-cert-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 3px; width: 100%; }
.brand-cert-card-actions button { flex: 1 1 auto; padding-inline: 8px; }
.brand-cert-list-item .brand-cert-card-status { font-size: 11px; line-height: 1.6; color: #687b98; }
.brand-cert-detail { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 20px; gap: 14px; }
.brand-cert-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex: 0 0 auto; }
.brand-cert-detail-heading p { color: var(--cert-muted); font-size: 12px; margin-top: 5px; }
.brand-cert-preview { min-height: 0; flex: 1 1 0; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--cert-line); border-radius: 10px; background: #f4f6fa; padding: 18px; color: var(--cert-muted); font-size: 13px; }
.brand-cert-preview figure { margin: 0 0 18px; }
.brand-cert-preview img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: contain; background: #fff; box-shadow: 0 3px 14px #2637530e; }
.brand-cert-preview figcaption { text-align: center; font-size: 12px; color: var(--cert-muted); padding-top: 10px; }
.brand-cert-full-pdf { width: 100%; height: 100%; min-height: 350px; border: 0; background: #fff; }
.brand-cert-access { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 14px; border: 1px solid #dce5fa; background: #f6f8ff; border-radius: 10px; flex: 0 0 auto; }
.brand-cert-access strong { font-size: 13px; }
.brand-cert-access p { font-size: 12px; margin-top: 4px; color: var(--cert-muted); line-height: 1.6; }
.brand-cert-access > p { flex-basis: 100%; }
.brand-cert-access-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.brand-cert-empty { margin: auto !important; text-align: center; padding: 30px 14px; color: var(--cert-muted); font-size: 13px; line-height: 1.8; }
.brand-cert-panel { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px; }
.brand-cert-panel-heading { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.brand-cert-panel > .brand-cert-toolbar { margin-bottom: 14px; }
.brand-cert-table-scroll { overflow: auto; border: 1px solid var(--cert-line); border-radius: 9px; }
.brand-cert-table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 12px; text-align: left; }
.brand-cert-table :is(th,td) { padding: 11px 12px; border-bottom: 1px solid var(--cert-line); overflow-wrap: anywhere; text-align: left; max-width: 280px; }
.brand-cert-table th { color: #52637e; background: #f5f7fc; font-weight: 600; }
.brand-cert-table td small { display: block; color: var(--cert-muted); margin-top: 4px; }
.brand-cert-table td input { min-width: 120px !important; }
.brand-cert-table tr:last-child td { border-bottom: 0; }
.brand-cert-grant-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; border: 1px solid var(--cert-line); border-radius: 10px; background: #fafbfe; margin-bottom: 22px; }
.brand-cert-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: #5b6c86; font-size: 12px; }
.brand-cert-inline { display: flex; gap: 8px; }
.brand-cert-inline button { flex: 0 0 auto; }
.brand-cert-checks { grid-column: 1 / -1; margin: 0; border: 1px solid var(--cert-line); border-radius: 8px; padding: 12px; }
.brand-cert-checks legend { padding: 0 5px; font-size: 12px; color: #5b6c86; }
.brand-cert-checks legend button { padding: 3px 8px; min-height: 28px; margin-left: 8px; }
.brand-cert-checks > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 160px; overflow: auto; gap: 9px; }
.brand-cert-checks label { display: flex; align-items: center; gap: 8px; font-size: 12px; overflow-wrap: anywhere; }
.brand-cert-form-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.brand-cert-form-row > label { flex: 1 1 180px; }
.brand-cert-form-row > button { flex: 0 0 auto; }
.brand-cert-help { font-size: 12px; color: var(--cert-muted); line-height: 1.7; margin: 6px 0 12px !important; }
.brand-cert-footer { flex: 0 0 auto; padding: 12px 20px; border-top: 1px solid var(--cert-line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; background: #fafbfe; }
.brand-cert-footer p { font-size: 12px; color: #557194; line-height: 1.6; }
.brand-cert-footer small { font-size: 11px; color: var(--cert-muted); }
.brand-cert-dialog .is-error { color: #bc4745; }
.brand-cert-relink { margin-top: 20px; border-top: 1px solid var(--cert-line); padding-top: 14px; font-size: 12px; color: var(--cert-muted); }
.brand-cert-relink summary { cursor: pointer; }
.brand-cert-batch-actions { margin-top: 16px; }
.brand-cert-dialog [data-cert-batch-items] { max-height: none !important; }
.brand-cert-request-panel { display: flex; flex-direction: column; overflow: hidden; gap: 12px; }
.brand-cert-request-panel .brand-cert-panel-heading { margin-bottom: 0; flex: 0 0 auto; }
.brand-cert-request-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; flex: 0 0 auto; }
.brand-cert-request-filters label:first-child { flex: 0 1 140px; }
.brand-cert-request-filters label:nth-child(2) { flex: 1 1 180px; }
.brand-cert-request-filters > span { align-self: center; color: var(--cert-muted); font-size: 12px; }
.brand-cert-request-table-scroll { flex: 1 1 0; min-height: 120px; }
.brand-cert-request-table-scroll table { min-width: 850px; }
.brand-cert-request-table-scroll th { position: sticky; top: 0; z-index: 1; }
.brand-cert-request-table-scroll th:nth-child(1) { width: 23%; }
.brand-cert-request-table-scroll th:nth-child(2) { width: 28%; }
.brand-cert-request-table-scroll th:nth-child(3) { width: 21%; }
.brand-cert-request-table-scroll th:nth-child(4) { width: 14%; }
.brand-cert-request-state { display: inline-block; padding: 3px 7px; border-radius: 5px; color: #53657e; background: #eef2f7; white-space: nowrap; }
.brand-cert-request-state.is-pending { background: #fff4dd; color: #99610b; }
.brand-cert-request-state.is-approved { background: #e6f7ef; color: #167852; }
.brand-cert-request-state:is(.is-rejected,.is-revoked) { background: #fff0ee; color: #b34b46; }
.brand-cert-request-pages { flex: 0 0 auto; display: flex; justify-content: flex-end; align-items: center; gap: 12px; font-size: 12px; color: var(--cert-muted); }
.brand-cert-review-form { flex: 0 0 auto; max-height: 48%; overflow-y: auto; padding: 14px; border: 1px solid #becbfa; border-radius: 10px; background: #f5f7ff; }
.brand-cert-review-form > .brand-cert-field, .brand-cert-review-form > .brand-cert-form-row { margin: 10px 0; }
.brand-cert-review-form > .brand-cert-toolbar { margin-top: 12px; }
@media (max-width: 760px) {
  dialog.brand-cert-dialog { width: calc(100vw - 16px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  .brand-cert-header { padding: 14px; flex-direction: column; gap: 10px; }
  .brand-cert-header h2 { font-size: 17px; }
  .brand-cert-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: 205px minmax(0, 1fr); }
  .brand-cert-sidebar { padding: 10px; border-right: 0; border-bottom: 1px solid var(--cert-line); gap: 8px; }
  .brand-cert-search-label { flex-direction: row; align-items: center; white-space: nowrap; }
  .brand-cert-list { flex-direction: row; overflow-x: auto; }
  .brand-cert-dialog .brand-cert-list-item { width: 205px; padding: 7px 10px; }
  .brand-cert-detail { padding: 12px; gap: 10px; }
  .brand-cert-detail-heading { flex-wrap: wrap; }
  .brand-cert-detail-heading h3 { font-size: 14px; }
  .brand-cert-preview { padding: 10px; }
  .brand-cert-access { padding: 10px; }
  .brand-cert-panel { padding: 14px; }
  .brand-cert-grant-form { grid-template-columns: 1fr; padding: 12px; }
  .brand-cert-checks > div { grid-template-columns: 1fr; }
  .brand-cert-request-filters > span { flex-basis: 100%; }
  .brand-cert-review-form { max-height: 42%; }
}

/* Embedded workspaces share the brand library's tab area and its available height. */
.brand-cert-dialog.brand-cert-embedded,
.brand-product-cert-dialog.bpc-embedded {
  --cert-blue: #3656df; --cert-ink: #213049; --cert-muted: #74829a; --cert-line: #e1e7f1;
  display: flex; flex-direction: column; position: relative; width: 100%; max-width: none;
  height: 100%; min-height: 420px; max-height: none; margin: 0; padding: 0; border: 0;
  border-radius: 0; box-shadow: none; overflow: hidden; background: #fff; color: var(--cert-ink);
}
.brand-cert-embedded .brand-cert-header,
.bpc-embedded .bpc-header { padding: 12px 16px; align-items: center; gap: 10px; }
.brand-cert-embedded .brand-cert-header h2,
.bpc-embedded .bpc-header h3 { font-size: 15px; }
.brand-cert-embedded .brand-cert-header p,
.bpc-embedded .bpc-header p { display: none; }
.brand-cert-embedded .brand-cert-workspace { grid-template-columns: clamp(220px, 24%, 280px) minmax(0, 1fr); }
.brand-cert-embedded .brand-cert-sidebar { padding: 12px; }
.brand-cert-embedded .brand-cert-list-item { padding: 10px 12px; gap: 4px; }
.brand-cert-embedded .brand-cert-detail { padding: 14px; gap: 10px; }
.brand-cert-embedded .brand-cert-preview { padding: 12px; }
.brand-cert-embedded .brand-cert-footer { padding: 8px 16px; }
.brand-cert-embedded .brand-cert-panel { padding: 14px 16px; }
.bpc-embedded .bpc-toolbar { padding: 10px 14px; }
.bpc-embedded { container-type: inline-size; }
.bpc-embedded .bpc-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.bpc-embedded .bpc-models, .bpc-embedded .bpc-preview { padding: 12px; }
.bpc-embedded .bpc-model { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.bpc-embedded .bpc-model-heading { grid-column: 1; grid-row: auto; padding-bottom: 4px !important; }
.bpc-embedded .bpc-group { grid-column: 1; grid-template-columns: 28px 40px max-content max-content; }
.bpc-embedded > footer { flex: 0 0 auto; padding: 9px 14px; font-size: 11px; line-height: 1.6; }
.brand-product-cert-dialog.bpc-history-only > .bpc-toolbar,
.brand-product-cert-dialog.bpc-history-only > footer { display: none; }
.bpc-history-detail-open > :not(.bpc-history-detail) { display: none !important; }
.bpc-history-detail { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; min-width: 0; }
.bpc-history-detail-toolbar { flex: 0 0 auto; padding: 10px 14px; border-bottom: 1px solid #e1e7f1; }
.bpc-history-detail-content { flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.bpc-history-detail-content > :is(.brand-cert-embedded, .bpc-embedded) { min-height: 0; }

/* Certificate tabs only: the surrounding brand workspace keeps its layout. */
.brand-cert-embedded { container-type: inline-size; }
.brand-cert-embedded .brand-cert-header { min-height: 52px; padding: 8px 14px; }
.brand-cert-embedded .brand-cert-toolbar { gap: 6px; }
.brand-cert-embedded .brand-cert-list-item { display: block; padding: 0; overflow: hidden; }
.brand-cert-embedded button.brand-cert-select { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; min-height: 86px; padding: 11px 12px; border: 0; border-radius: 7px; background: transparent; text-align: left; white-space: normal; }
.brand-cert-embedded .brand-cert-select strong { font-size: 14px; }
.brand-cert-embedded .brand-cert-select small { font-size: 11px; line-height: 1.5; }
.brand-cert-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.brand-cert-item-heading > small { padding: 1px 5px; border-radius: 4px; background: #edf1fa; font-size: 10px; }
.brand-cert-item-type { color: #6b7d99; font-size: 12px; }
.brand-cert-more { position: relative; flex: 0 0 auto; }
.brand-cert-more > summary { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 7px 11px; border: 1px solid var(--cert-line); border-radius: 8px; background: #fff; color: #4b5e7a; font-size: 12px; cursor: pointer; list-style: none; white-space: nowrap; }
.brand-cert-more > summary::-webkit-details-marker { display: none; }
.brand-cert-more[open] > summary { color: var(--cert-blue); border-color: #b7c6ff; background: #f3f6ff; }
.brand-cert-more-menu { position: absolute; top: calc(100% + 5px); right: 0; z-index: 50; display: flex; flex-direction: column; gap: 3px; width: max-content; min-width: 154px; max-width: min(270px, 80vw); padding: 5px; border: 1px solid var(--cert-line); border-radius: 9px; background: #fff; box-shadow: 0 8px 24px #2130491a; }
.brand-cert-dialog .brand-cert-more-menu button { width: 100%; border: 0; text-align: left; }
.brand-cert-dialog .brand-cert-access.is-inline { gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.brand-cert-access.is-inline > div { min-width: 0; }
.brand-cert-access.is-inline strong { font-size: 12px; font-weight: 500; color: #687b98; }
.brand-cert-access.is-inline p { margin: 0; font-size: 11px; }
.brand-cert-dialog .brand-cert-access.is-inline > p { flex: 1 1 180px; }
.brand-cert-access-status { flex: 1 1 160px; color: #74829a; font-size: 11px; line-height: 1.7; }
.brand-cert-embedded button.brand-cert-archive { align-self: flex-start; padding: 3px 0; min-height: 24px; border: 0; border-radius: 0; background: transparent; color: #a76b6b; font-size: 11px; }
.brand-cert-embedded .brand-cert-detail-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; }
.brand-cert-embedded .brand-cert-detail-heading > div:first-child { flex: 1 1 230px; }
.brand-cert-embedded .brand-cert-detail-heading h3 { font-size: 16px; line-height: 24px; }
.brand-cert-embedded .brand-cert-detail-heading p { font-size: 11px; }
.brand-cert-preview-controls { display: flex; flex: 0 0 auto; align-items: center; flex-wrap: wrap; gap: 6px; padding: 8px 10px; border: 1px solid var(--cert-line); border-radius: 8px; background: #fafbfe; }
.brand-cert-preview-controls > span:first-child { margin-right: auto; padding: 4px 8px; border-radius: 5px; background: #eef3ff; color: var(--cert-blue); font-size: 11px; }
.brand-cert-dialog .brand-cert-preview-controls button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.brand-cert-preview-controls output { min-width: 42px; color: #52637e; font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.brand-cert-embedded .brand-cert-preview { container-type: size; padding: 16px; }
.brand-cert-embedded .brand-cert-preview figure { width: calc(100% * var(--cert-preview-scale, 1)); max-width: calc(760px * var(--cert-preview-scale, 1)); margin: 0 auto 16px; }
.brand-cert-embedded .brand-cert-preview figure img { width: 100%; max-height: max(140px, calc((100cqh - 48px) * var(--cert-preview-scale, 1))); object-fit: contain; object-position: center; }
.brand-cert-embedded .brand-cert-preview > img { width: calc(100% * var(--cert-preview-scale, 1)); max-width: calc(760px * var(--cert-preview-scale, 1)); max-height: max(140px, calc((100cqh - 20px) * var(--cert-preview-scale, 1))); margin-inline: auto; object-fit: contain; }
.brand-cert-embedded .brand-cert-preview figcaption { padding-top: 8px; font-size: 11px; }
.brand-cert-embedded .brand-cert-footer { padding: 6px 14px; }
.brand-cert-embedded .brand-cert-footer p:empty { display: none; }
.brand-cert-embedded .brand-cert-footer small { margin-left: auto; }

.bpc-catalog-workspace.bpc-embedded > .bpc-header { display: none; }
.bpc-catalog-workspace .bpc-toolbar { gap: 8px; padding: 10px 12px; }
.bpc-catalog-workspace .bpc-toolbar form { flex: 1 1 240px; max-width: 520px; }
.bpc-catalog-workspace .bpc-toolbar input { width: 100%; height: 36px; padding: 7px 10px; font-size: 13px; }
.bpc-catalog-workspace .bpc-toolbar button { min-height: 34px !important; min-block-size: 34px !important; padding: 6px 10px !important; font-size: 12px; }
.brand-product-cert-dialog .bpc-material-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-left: auto; color: #63748e; font-size: 12px; font-variant-numeric: tabular-nums; }
.brand-product-cert-dialog .bpc-material-counts > span { white-space: nowrap; }
.brand-product-cert-dialog .bpc-material-counts b { color: #3656df; }
.bpc-catalog-workspace.bpc-preview-collapsed .bpc-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.bpc-catalog-workspace.is-preview-open .bpc-layout { grid-template-columns: 320px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.bpc-catalog-workspace .bpc-models { padding: 0 12px 10px; background: #fff; }
.bpc-catalog-workspace .bpc-models > [data-bpc-model-list] { border: 1px solid #e1e7f1; border-radius: 8px; background: #fff; }
.bpc-catalog-workspace .bpc-table-head,
.bpc-catalog-workspace .bpc-model.bpc-table-row { display: grid; grid-template-columns: minmax(95px, .9fr) minmax(132px, 1.9fr) minmax(126px, 1.2fr) minmax(126px, 1.2fr) minmax(75px, .8fr); align-items: center; gap: 0 12px; padding: 10px 12px; }
.bpc-catalog-workspace .bpc-table-head { position: sticky; top: 0; z-index: 2; min-height: 40px; border-bottom: 1px solid #e1e7f1; background: #f6f8fc; color: #6b7d99; font-size: 12px; }
.bpc-catalog-workspace .bpc-model.bpc-table-row { grid-template-rows: none; grid-auto-rows: min-content; min-height: 70px; margin: 0; border: 0; border-bottom: 1px solid #edf0f6; border-radius: 0; background: #fff; font-size: 13px; }
.bpc-catalog-workspace .bpc-model.bpc-table-row:last-child { border-bottom: 0; }
.bpc-catalog-workspace .bpc-model.bpc-table-row.is-selected { background: #f0f4ff; box-shadow: inset 3px 0 #4a64ec; }
.bpc-catalog-workspace .bpc-table-row > * { min-width: 0; max-width: 100%; }
.bpc-catalog-workspace .bpc-table-row .bpc-model-heading { grid-column: auto; grid-row: auto; min-height: 0 !important; height: auto !important; padding: 0 !important; }
.bpc-catalog-workspace .bpc-model-cell strong { font-size: 13px; }
.bpc-catalog-workspace .bpc-product-cell { color: #3d506f; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.bpc-catalog-workspace .bpc-table-row .bpc-group { position: static; display: flex; grid-column: auto; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; }
.bpc-catalog-workspace .bpc-table-row .bpc-group-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.bpc-catalog-workspace .bpc-group-count { color: #6b7d99; font-size: 11px; }
.bpc-catalog-workspace .bpc-group-controls { display: flex; flex-wrap: wrap; gap: 4px; }
.bpc-catalog-workspace .bpc-group button { min-height: 28px !important; min-block-size: 28px !important; height: auto !important; padding: 3px 6px !important; font-size: 11px; line-height: 18px; }
.bpc-catalog-workspace .bpc-group-empty { color: #91a0b7; font-size: 12px; }
.bpc-catalog-workspace .bpc-group.is-empty [data-bpc-group-count] { display: none; }
.bpc-catalog-workspace .bpc-material-cell { color: #7a89a1; font-size: 11px; line-height: 1.6; }
.bpc-catalog-workspace .bpc-material-state { display: inline-block; padding: 3px 6px; border-radius: 5px; background: #f2f4f8; }
.bpc-catalog-workspace .bpc-material-state.is-complete { color: #34775f; background: #edf7f1; }
.bpc-catalog-workspace .bpc-material-state.is-partial { color: #6c7a9c; background: #eef2fa; }
.bpc-catalog-workspace .bpc-models nav { min-height: 42px; padding-top: 8px; }
.bpc-catalog-workspace .bpc-models nav button { min-height: 30px !important; min-block-size: 30px !important; padding: 4px 8px !important; font-size: 11px; }
.bpc-catalog-workspace .bpc-preview { padding: 12px; }
.bpc-catalog-workspace .bpc-preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.bpc-catalog-workspace .bpc-preview-toolbar button { min-height: 30px !important; padding: 4px 8px !important; font-size: 11px; }
.bpc-catalog-workspace .bpc-preview img { max-width: 760px; margin-inline: auto; object-fit: contain; }
.brand-product-cert-dialog .bpc-preview-status { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 150px; padding: 20px 16px; border: 1px solid #e2e8f4; border-radius: 9px; background: #f8faff; text-align: center; color: #355587; }
.brand-product-cert-dialog .bpc-preview-status strong { font-size: 14px; }
.brand-product-cert-dialog .bpc-preview-status small { color: #71819a; line-height: 1.6; }
.brand-product-cert-dialog .bpc-preview-status p { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.brand-product-cert-dialog .bpc-preview-status.is-failed { color: #8b4c34; background: #fffaf6; border-color: #eedfd3; }
.brand-product-cert-dialog .bpc-preview-spinner { width: 22px; height: 22px; border: 2px solid #dce5fa; border-top-color: #4869df; border-radius: 50%; animation: bpc-preview-spin 1s linear infinite; }
@keyframes bpc-preview-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .brand-product-cert-dialog .bpc-preview-spinner { animation: none; } }
.bpc-catalog-workspace.is-preview-open .bpc-models { padding: 10px; background: #fafbfe; }
.bpc-catalog-workspace.is-preview-open .bpc-table-head { display: none; }
.bpc-catalog-workspace.is-preview-open .bpc-model.bpc-table-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; min-height: 124px; padding: 10px; }
.bpc-catalog-workspace.is-preview-open .bpc-model-cell { grid-column: 1 / -1; }
.bpc-catalog-workspace.is-preview-open .bpc-product-cell { grid-column: 1 / -1; }
.bpc-catalog-workspace.is-preview-open .bpc-table-row .bpc-group-label { position: static; width: auto; height: auto; margin: 0; clip-path: none; font-size: 11px; }
.bpc-catalog-workspace.is-preview-open .bpc-table-row .bpc-group { flex-direction: row; flex-wrap: wrap; align-items: center; }
.bpc-catalog-workspace.is-preview-open .bpc-material-cell { grid-column: 1 / -1; }

/* Customer application and download actions stay in their original table cells. */
.brand-cert-dialog .certificate-new-badge,
.bpc-inline-applications .certificate-new-badge { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-width: 16px; padding: 1px 4px; border-radius: 4px; background: #fff0ed; color: #d3443f; font-size: 10px; font-weight: 600; line-height: 16px; white-space: nowrap; vertical-align: middle; }
.brand-cert-dialog .certificate-new-badge[hidden],
.bpc-inline-applications .certificate-new-badge[hidden] { display: none !important; }
.bpc-inline-applications .bpc-state-filters { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 5px; padding: 0 12px 8px; margin: 0; }
.brand-product-cert-dialog.bpc-inline-applications .bpc-state-filters button { min-height: 29px !important; min-block-size: 29px !important; padding: 4px 9px !important; border-color: transparent; background: #f5f7fb; color: #63748e; font-size: 11px; }
.brand-product-cert-dialog.bpc-inline-applications .bpc-state-filters button[aria-pressed="true"] { border-color: #cbd6ff; background: #edf2ff; color: #3656df; }
.bpc-inline-applications .bpc-state-filters span { font-variant-numeric: tabular-nums; }
.bpc-catalog-workspace.bpc-inline-applications .bpc-table-head,
.bpc-catalog-workspace.bpc-inline-applications .bpc-model.bpc-table-row { grid-template-columns: minmax(64px, .65fr) minmax(96px, 1fr) minmax(0, 1.8fr) minmax(0, 1.8fr); gap: 0 10px; padding: 8px 10px; }
.bpc-catalog-workspace.bpc-inline-applications .bpc-model.bpc-table-row { min-height: 52px; align-items: start; }
.bpc-inline-applications .bpc-model-cell,
.bpc-inline-applications .bpc-product-cell { align-self: start; padding-top: 5px; }
.bpc-inline-applications .bpc-model-cell :is(button,strong),
.bpc-inline-applications .bpc-product-cell { display: block; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpc-catalog-workspace.bpc-inline-applications .bpc-table-row .bpc-group { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; max-width: 100%; overflow: hidden; }
.bpc-inline-applications .bpc-group-line { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; min-width: 0; min-height: 28px; }
.bpc-inline-applications .bpc-group-line > * { min-width: 0; }
.bpc-inline-applications .bpc-group-line .bpc-group-count { flex: 0 0 auto; white-space: nowrap; font-size: 10px; }
.bpc-inline-applications .bpc-group-state { flex: 0 1 auto; padding: 2px 4px; border-radius: 4px; background: #f1f3f7; color: #7c899e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; line-height: 18px; }
.bpc-inline-applications .bpc-group-state.is-downloadable { color: #167852; background: #e9f7ef; }
.bpc-inline-applications .bpc-group-state.is-pending { color: #99610b; background: #fff4dd; }
.bpc-inline-applications .bpc-group-state:is(.is-rejected,.is-revoked) { color: #b34b46; background: #fff0ee; }
.bpc-inline-applications .bpc-group-deadline { flex: 0 1 auto; color: #73829a; font-size: 10px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpc-inline-applications .bpc-group-line .bpc-group-controls { display: flex; flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; margin-left: 0; }
.bpc-catalog-workspace.bpc-inline-applications .bpc-group button { min-height: 26px !important; min-block-size: 26px !important; padding: 3px 5px !important; font-size: 10px; line-height: 18px; white-space: nowrap; }
.bpc-inline-applications button[data-bpc-group-action]:not(:disabled) { color: #3656df; border-color: #d8e0ff; background: #f5f7ff; }
.bpc-inline-applications [data-bpc-group-status] { position: static; display: block; width: auto; height: auto; max-width: 100%; padding: 0; margin: 0; overflow: hidden; clip-path: none; white-space: normal; overflow-wrap: anywhere; color: #9a6b54; font-size: 10px; line-height: 1.5; }
.bpc-inline-applications [hidden] { display: none !important; }
.bpc-inline-history { min-width: 0; max-width: 100%; color: #7b89a0; font-size: 10px; }
.bpc-inline-history summary { cursor: pointer; width: fit-content; max-width: 100%; line-height: 20px; }
.bpc-inline-history ol { margin: 4px 0; padding: 6px 6px 6px 20px; border: 1px solid #e5eaf4; border-radius: 5px; background: #fafbfe; }
.bpc-inline-history li { margin-block: 4px; overflow-wrap: anywhere; line-height: 1.5; }
.bpc-inline-history li > :is(span,small) { display: block; font-size: 10px; }
.bpc-catalog-workspace.bpc-inline-applications.is-preview-open .bpc-model.bpc-table-row { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.bpc-catalog-workspace.bpc-inline-applications.is-preview-open .bpc-model-cell,
.bpc-catalog-workspace.bpc-inline-applications.is-preview-open .bpc-product-cell { grid-column: 1; padding-top: 0; }
.bpc-catalog-workspace.bpc-inline-applications.is-preview-open .bpc-group-label { position: static; width: auto; height: auto; margin: 0; clip-path: none; font-size: 10px; }
.brand-cert-current-access { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.brand-cert-current-access > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.brand-cert-application-history { flex: 0 0 auto; width: 100%; color: #74829a; font-size: 11px; }
.brand-cert-application-history summary { cursor: pointer; width: fit-content; line-height: 24px; }
.brand-cert-application-history ul { padding: 8px 12px 8px 26px; margin: 5px 0; border: 1px solid #e1e7f1; border-radius: 6px; background: #fafbfe; }
.brand-cert-application-history li { margin-block: 5px; line-height: 1.6; overflow-wrap: anywhere; }
.brand-cert-application-history li small { display: block; font-size: 11px; }

@container (max-width: 780px) {
  .bpc-catalog-workspace .bpc-table-head { display: none; }
  .bpc-catalog-workspace .bpc-model.bpc-table-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  .bpc-catalog-workspace :is(.bpc-model-cell,.bpc-product-cell,.bpc-material-cell) { grid-column: 1 / -1; }
  .bpc-catalog-workspace .bpc-table-row .bpc-group-label { position: static; width: auto; height: auto; margin: 0; clip-path: none; font-size: 11px; }
  .bpc-catalog-workspace .bpc-table-row .bpc-group { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .bpc-catalog-workspace.is-preview-open .bpc-layout { grid-template-columns: minmax(210px, 38%) minmax(0, 1fr); }
  .bpc-catalog-workspace.bpc-inline-applications .bpc-model.bpc-table-row { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 5px 10px; }
  .bpc-catalog-workspace.bpc-inline-applications .bpc-model-cell { grid-column: 1; }
  .bpc-catalog-workspace.bpc-inline-applications .bpc-product-cell { grid-column: 2; }
  .bpc-catalog-workspace.bpc-inline-applications .bpc-table-row .bpc-group { grid-column: 1 / -1; }
  .bpc-catalog-workspace.bpc-inline-applications .bpc-group-label { position: static; width: auto; height: auto; margin: 0; clip-path: none; font-size: 10px; }
}

@container (max-width: 620px) {
  .brand-cert-embedded .brand-cert-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(130px, .55fr) minmax(250px, 1fr); }
  .brand-cert-embedded .brand-cert-sidebar { border-right: 0; border-bottom: 1px solid var(--cert-line); }
  .brand-cert-embedded .brand-cert-list { flex-direction: column; }
  .brand-cert-embedded .brand-cert-detail-heading { gap: 8px; }
  .brand-cert-embedded .brand-cert-access.is-inline { width: 100%; }
  .brand-cert-embedded .brand-cert-preview { padding: 10px; }
  .bpc-catalog-workspace.is-preview-open .bpc-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(180px, .85fr) minmax(230px, 1fr); }
  .bpc-catalog-workspace .bpc-preview { border-left: 0; border-top: 1px solid #e1e7f1; }
}

@container (max-width: 640px) {
  .bpc-embedded .bpc-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) minmax(240px, 1fr); }
  .bpc-embedded .bpc-preview { border-left: 0; border-top: 1px solid #e1e7f1; }
  .bpc-embedded .bpc-toolbar form { flex-basis: 100%; }
  .bpc-embedded .bpc-group { grid-template-columns: 26px 30px max-content max-content; gap: 4px; }
  .bpc-embedded .bpc-group button { padding-inline: 5px !important; font-size: 12px; }
  .bpc-embedded .bpc-history-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bpc-embedded .bpc-history-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .brand-cert-dialog.brand-cert-embedded,
  .brand-product-cert-dialog.bpc-embedded { min-height: 620px; }
  .brand-cert-embedded .brand-cert-header,
  .bpc-embedded .bpc-header { padding: 10px 12px; }
  .brand-cert-embedded .brand-cert-header { flex-direction: row; flex-wrap: wrap; }
  .brand-cert-embedded .brand-cert-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(240px, 1fr); }
  .brand-cert-embedded .brand-cert-list { flex-direction: column; overflow-x: hidden; flex: 0 1 auto; max-height: 22dvh; }
  .brand-cert-embedded .brand-cert-list-item { width: 100%; }
  .brand-cert-embedded .brand-cert-sidebar { padding: 10px; max-height: 32dvh; }
  .brand-cert-embedded .brand-cert-search-label { flex-wrap: wrap; }
  .brand-cert-embedded .brand-cert-detail { padding: 10px; }
  .bpc-embedded .bpc-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) minmax(240px, 1fr); }
  .bpc-embedded .bpc-preview { border-left: 0; border-top: 1px solid #e1e7f1; }
  .bpc-embedded .bpc-toolbar form { flex-basis: 100%; }
}

/* A registration number is a directory; original, renewal and supplemental files coexist. */
.brand-cert-dialog .brand-cert-number-group { min-width: 0; border: 1px solid var(--cert-line); border-radius: 8px; background: #fff; overflow: hidden; flex: 0 0 auto; }
.brand-cert-dialog .brand-cert-group-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 6px; border: 0; border-radius: 0; padding: 8px 9px; background: #f7f9fd; text-align: left; white-space: normal; }
.brand-cert-dialog .brand-cert-group-toggle > span { min-width: 0; overflow-wrap: anywhere; }
.brand-cert-dialog .brand-cert-group-toggle strong { font-size: 13px; }
.brand-cert-dialog .brand-cert-group-toggle small { flex: 0 0 auto; color: var(--cert-muted); font-size: 10px; }
.brand-cert-dialog .brand-cert-group-files { min-width: 0; padding: 4px; display: flex; flex-direction: column; gap: 4px; }
.brand-cert-dialog .brand-cert-group-files .brand-cert-list-item { padding: 0; border-radius: 5px; }
.brand-cert-dialog .brand-cert-group-files .brand-cert-select { padding: 7px 8px; }
.brand-cert-dialog .brand-cert-group-files .brand-cert-item-heading strong { font-size: 11px; }
.brand-cert-dialog .brand-cert-review-label { display: inline-block; font-size: 10px; font-weight: 400; font-style: normal; color: #a96b1c; background: #fff5e6; border-radius: 4px; padding: 1px 4px; }
.brand-cert-dialog .brand-cert-group-access { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 7px 9px; border: 1px solid #e3e9f7; border-radius: 7px; color: var(--cert-muted); background: #fafbff; font-size: 11px; }
.brand-cert-dialog .brand-cert-group-access button { min-height: 29px; min-block-size: 29px; padding: 4px 7px; font-size: 11px; }
/* Recognition and review use the existing inner page without opening another dialog. */
.brand-cert-dialog .brand-cert-upload-panel { display: flex; flex-direction: column; gap: 9px; min-width: 0; overflow: hidden; container-type: inline-size; container-name: cert-upload; }
.brand-cert-dialog .brand-cert-upload-panel .brand-cert-panel-heading { flex: 0 0 auto; margin: 0; gap: 9px; }
.brand-cert-dialog .brand-cert-upload-panel .brand-cert-panel-heading p { font-size: 11px; margin-top: 3px; }
.brand-cert-dialog .brand-cert-upload-panel > .brand-cert-toolbar { flex: 0 0 auto; gap: 6px; margin: 0; }
.brand-cert-dialog .brand-cert-upload-panel > .brand-cert-toolbar button { min-height: 30px; min-block-size: 30px; padding: 4px 8px; font-size: 11px; }
.brand-cert-dialog .brand-cert-upload-summary { font-size: 11px; color: var(--cert-muted); }
.brand-cert-dialog .brand-cert-upload-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(220px, 1fr); gap: 9px; flex: 1 1 0; min-height: 0; min-width: 0; }
.brand-cert-dialog .brand-cert-upload-review { min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--cert-line); border-radius: 8px; }
.brand-cert-dialog .brand-cert-upload-row { display: grid; grid-template-columns: 20px minmax(80px, 1fr) minmax(105px, 1.15fr) minmax(105px, 1.15fr) minmax(100px, 1.1fr) minmax(85px, 1fr); gap: 6px; align-items: start; min-width: 0; padding: 8px; border-bottom: 1px solid var(--cert-line); font-size: 11px; }
.brand-cert-dialog .brand-cert-upload-row:last-child { border-bottom: 0; }
.brand-cert-dialog .brand-cert-upload-row.is-selected { background: #f2f5ff; }
.brand-cert-dialog .brand-cert-upload-row > * { min-width: 0; }
.brand-cert-dialog .brand-cert-upload-head { position: sticky; top: 0; z-index: 1; background: #f5f7fc; color: var(--cert-muted); padding-block: 7px; }
.brand-cert-dialog .brand-cert-upload-file { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.brand-cert-dialog .brand-cert-upload-file > button:first-child { min-width: 0; max-width: 100%; padding: 0; min-height: 0; min-block-size: 0; border: 0; background: none; font-size: 11px; color: #3656df; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.brand-cert-dialog .brand-cert-upload-file small { font-size: 10px; color: var(--cert-muted); }
.brand-cert-dialog .brand-cert-upload-fields { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.brand-cert-dialog .brand-cert-upload-fields label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-cert-dialog .brand-cert-upload-fields label > span { font-size: 10px; line-height: 1.4; color: var(--cert-muted); }
.brand-cert-dialog .brand-cert-upload-fields :is(input,select) { height: 28px; min-height: 28px; min-block-size: 28px; min-width: 0; padding: 3px 5px; border-radius: 5px; font-size: 11px; }
.brand-cert-dialog .brand-cert-upload-fields small { font-size: 10px; line-height: 1.45; color: var(--cert-muted); overflow-wrap: anywhere; }
.brand-cert-dialog .brand-cert-upload-check { padding-top: 7px; }
.brand-cert-dialog .brand-cert-upload-status { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.brand-cert-dialog .brand-cert-upload-status strong { font-size: 11px; font-weight: 500; line-height: 1.5; }
.brand-cert-dialog .brand-cert-upload-status small { font-size: 10px; line-height: 1.5; color: #9a6b3c; }
.brand-cert-dialog .brand-cert-text-button { width: fit-content; max-width: 100%; min-height: 0; min-block-size: 0; margin: 0; padding: 1px 0; border: 0; background: none; color: #3656df; font-size: 10px; white-space: normal; }
.brand-cert-dialog .brand-cert-upload-preview { display: flex; flex-direction: column; gap: 7px; min-width: 0; min-height: 0; }
.brand-cert-dialog [data-cert-upload-preview-title] { flex: 0 0 auto; min-width: 0; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.brand-cert-dialog [data-cert-upload-preview-host] { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; border: 1px solid var(--cert-line); border-radius: 8px; padding: 8px; background: #f4f6fa; color: var(--cert-muted); font-size: 12px; }
.brand-cert-dialog [data-cert-upload-preview-host] img { display: block; max-width: 100%; height: auto; }
.brand-cert-dialog [data-cert-upload-preview-host] iframe { display: block; width: 100%; height: 100%; min-height: 250px; border: 0; }
.brand-cert-dialog .brand-cert-upload-panel .brand-cert-relink { flex: 0 0 auto; margin-top: 0; padding-top: 6px; }
@container cert-upload (max-width: 1000px) {
  .brand-cert-dialog .brand-cert-upload-layout { grid-template-columns: minmax(0, 1fr) minmax(190px, .6fr); }
  .brand-cert-dialog .brand-cert-upload-row { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr); }
  .brand-cert-dialog .brand-cert-upload-head { display: none; }
  .brand-cert-dialog .brand-cert-upload-file { grid-column: 2 / -1; }
  .brand-cert-dialog .brand-cert-upload-fields { grid-column: auto; }
  .brand-cert-dialog .brand-cert-upload-fields:nth-child(5) { grid-column: 2; }
  .brand-cert-dialog .brand-cert-upload-status { grid-column: 3; }
}
@container cert-upload (max-width: 650px) {
  .brand-cert-dialog .brand-cert-upload-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(190px, 1.4fr) minmax(160px, 1fr); }
  .brand-cert-dialog .brand-cert-upload-preview { min-height: 160px; }
}
@container cert-upload (max-width: 1000px) {
  .brand-cert-dialog .brand-cert-upload-fields:nth-child(3) { grid-column: 2; }
  .brand-cert-dialog .brand-cert-upload-fields:nth-child(4) { grid-column: 3; }
}
.brand-cert-dialog .brand-cert-historical-files { min-width: 0; border-top: 1px dashed #dce3f0; padding-top: 4px; color: var(--cert-muted); font-size: 10px; }
.brand-cert-dialog .brand-cert-historical-files > summary { padding: 5px 4px; cursor: pointer; }
.brand-cert-dialog .brand-cert-historical-files > div { display: flex; flex-direction: column; gap: 4px; }
.brand-cert-dialog [data-cert-historical] { background: #fafbfe; }
/* PDF review never depends on a sandboxed browser PDF plugin. */
.brand-cert-dialog .brand-cert-upload-pdf-preview { display: flex; flex-direction: column; gap: 7px; height: 100%; min-height: 180px; min-width: 0; }
.brand-cert-dialog .brand-cert-upload-preview-caption { flex: 0 0 auto; color: #617391; font-size: 11px; line-height: 1.5; }
.brand-cert-dialog .brand-cert-upload-pdf-page { flex: 1 1 0; min-width: 0; min-height: 70px; overflow: auto; }
.brand-cert-dialog .brand-cert-upload-pdf-page img { width: 100%; height: auto; background: #fff; }
.brand-cert-dialog .brand-cert-upload-pdf-links { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.brand-cert-dialog .brand-cert-upload-pdf-link { display: inline-flex; max-width: 100%; min-width: 0; padding: 4px 7px; border: 1px solid #d7dfed; border-radius: 5px; background: #fff; color: #3656df; font-size: 11px; line-height: 1.5; text-decoration: none; overflow-wrap: anywhere; }

/* The catalog keeps its full list width behind the optional preview drawer. */
.brand-product-cert-dialog.bpc-unified { min-height: 0; }
.bpc-unified.bpc-catalog-workspace .bpc-layout {
  position: relative; display: grid; grid-template-columns: clamp(95px, 10%, 150px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr); flex: 1 1 0; min-height: 0; overflow: hidden;
}
@container (min-width: 681px) {
  .bpc-unified.bpc-catalog-workspace .bpc-layout:has(.bpc-preview[open]) {
    grid-template-columns: clamp(95px, 10%, 150px) minmax(0, 1fr) 49%;
  }
}
.bpc-unified .bpc-categories { min-width: 0; min-height: 0; overflow: auto; padding: 6px; background: #f6f8fc; }
.bpc-unified .bpc-categories h4 { margin: 6px; color: #66758b; font-size: 12px; }
.bpc-unified .bpc-categories button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 4px; text-align: left; white-space: normal; border: 0; background: transparent; font-size: 12px; padding: 6px; }
.bpc-unified .bpc-categories button small { color: #64758a; }
.bpc-unified button[aria-pressed="true"] { color: #304fc5; background-color: #edf2ff; }
.bpc-unified .bpc-views { display: flex; }
.bpc-unified .bpc-toolbar { display: flex; flex-wrap: wrap; align-items: center; }
.bpc-unified .bpc-toolbar select,.bpc-unified .bpc-compact-filebar select { min-width: 0; max-width: 185px; border: 1px solid #d8dfeb; border-radius: 5px; height: 32px; color: #344662; background: #fff; }
.bpc-unified .bpc-toolbar label { font-size: 12px; color: #546782; }
.bpc-unified .bpc-mobile-category { display: none; }
.bpc-unified.bpc-catalog-workspace .bpc-models { padding: 0 4px; }
.bpc-unified.bpc-catalog-workspace .bpc-models > [data-bpc-model-list] { overflow: auto; min-height: 0; flex: 1 1 0; }
.bpc-unified.bpc-catalog-workspace .bpc-model.bpc-table-row.bpc-catalog-grid,
.bpc-unified.bpc-catalog-workspace .bpc-table-head.bpc-catalog-grid {
  display: grid;
  grid-template-columns: 44px minmax(96px, min(18%, 168px)) minmax(132px, min(26%, 268px))
                         repeat(2, minmax(110px, min(20%, 190px))) minmax(88px, 1fr);
  min-width: 644px; grid-template-rows: auto; align-items: center;
  gap: 6px clamp(8px, 1%, 16px); padding: 7px 10px; box-sizing: border-box;
}
.bpc-unified.bpc-catalog-workspace .bpc-model.bpc-catalog-grid { min-height: 56px; }
.bpc-unified.bpc-catalog-workspace .bpc-model.bpc-catalog-grid > * { grid-column: auto; grid-row: auto; padding: 0; min-width: 0; align-self: center; }
.bpc-unified.bpc-catalog-workspace .bpc-category-cell { color: #3d506f; line-height: 1.5; overflow-wrap: anywhere; }
.bpc-unified.bpc-catalog-workspace .bpc-catalog-grid .bpc-model-heading { border: 0; background: none; overflow-wrap: anywhere; white-space: normal; text-align: left; font-size: 12px; padding: 0 !important; }
.bpc-unified .bpc-photo { position: relative; width: 40px; height: 40px; }
.bpc-unified .bpc-photo button[data-bpc-details] { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.bpc-unified .bpc-photo:not(:has(img:not([hidden]))) button[data-bpc-details] { visibility: hidden; }
img.bpc-photo-zoom {
  position: fixed; inset: auto; z-index: 1000; box-sizing: border-box; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 1px solid #d9e2ee; border-radius: 6px; background: white;
  box-shadow: 0 5px 20px rgb(27 49 75 / 20%); object-fit: contain; pointer-events: none;
}
.bpc-unified .bpc-photo .customer-image-retry { z-index: 1; position: relative; }
.bpc-unified .bpc-photo .brand-library-image-slot { height: 100%; }
.bpc-unified .bpc-catalog-grid .bpc-group-line { display: flex; flex-wrap: wrap; align-items: center; }
.bpc-unified .bpc-catalog-grid .bpc-group-controls { width: 100%; flex-wrap: wrap; gap: 3px; }
.bpc-unified.bpc-catalog-workspace .bpc-catalog-grid .bpc-group-controls button { min-height: 23px !important; min-block-size: 23px !important; padding: 1px 3px !important; font-size: 11px; }
.bpc-unified .bpc-catalog-grid .bpc-group [data-bpc-group-count] { display: inline; }
.bpc-unified .bpc-group-empty,.bpc-unified .bpc-group-state:is(.is-none,.is-downloadable) { display: none; }
.bpc-unified.bpc-catalog-workspace .bpc-catalog-grid .bpc-group-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bpc-unified.bpc-catalog-workspace .bpc-preview {
  position: absolute; inset: 0 0 0 auto; z-index: 3; margin: 0; box-sizing: border-box;
  width: 49%; height: 100%; max-width: 100%; max-height: none; min-height: 0; padding: 0;
  color: inherit; background: #fff; border: 0; border-left: 1px solid #dfe5ee;
  border-radius: 0; box-shadow: -6px 0 24px rgb(37 54 83 / 13%); overflow: hidden;
}
.bpc-unified .bpc-preview[hidden] { display: none; }
.bpc-unified [data-bpc-drawer-body] { box-sizing: border-box; height: 100%; overflow: auto; overscroll-behavior: contain; padding: 8px; }
.bpc-unified .bpc-preview .bpc-return {
  display: block; position: absolute; z-index: 2; top: 6px; right: 8px;
  min-height: 32px; padding: 4px 9px; border: 1px solid #d8dfeb; border-radius: 5px; background: #fff;
}
.bpc-unified [data-bpc-drawer-body] > :first-child { min-height: 32px; padding-inline-end: 52px; }
.bpc-unified [data-bpc-drawer-body] > .bpc-product-summary { padding-inline-end: 0; }
.bpc-unified .bpc-product-summary h4 { padding-inline-end: 52px; }
@keyframes bpc-drawer-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media (prefers-reduced-motion: no-preference) {
  .bpc-unified .bpc-preview[open] { animation: bpc-drawer-enter .18s ease-out; }
}
.bpc-unified .bpc-compact-filebar,.bpc-unified .bpc-preview-files,.bpc-unified .bpc-preview-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; }
.bpc-unified .bpc-compact-filebar { justify-content: space-between; padding: 0 0 4px; }
.bpc-unified .bpc-compact-filebar button { padding: 2px 5px !important; min-height: 26px !important; min-block-size: 26px !important; }
.bpc-unified .bpc-preview :is(.bpc-compact-filebar + img,.bpc-product-summary img) { width: 100%; max-width: none; height: auto; object-fit: contain; }
.bpc-unified .bpc-product-summary .brand-library-image-slot { width: 100%; height: auto; aspect-ratio: 1; }
.bpc-unified .bpc-preview-empty { padding: 16px 8px; color: #59708e; }
.bpc-unified.bpc-as-cards .bpc-table-head.bpc-catalog-grid { display: none; }
.bpc-unified.bpc-as-cards .bpc-model.bpc-table-row.bpc-catalog-grid { min-width: 0; grid-template-columns: 84px minmax(0, 1fr) minmax(0, 1fr); gap: 7px; }
.bpc-unified.bpc-as-cards .bpc-model.bpc-catalog-grid > .bpc-material-cell { grid-column: 1; grid-row: 2; }
.bpc-unified.bpc-as-cards .bpc-catalog-grid .bpc-group-label { position: static; width: auto; height: auto; clip-path: none; }
@container (max-width: 680px) {
  .bpc-unified.bpc-catalog-workspace .bpc-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
  .bpc-unified .bpc-categories { display: none; }
  .bpc-unified .bpc-mobile-category { display: block; }
  .bpc-unified.bpc-catalog-workspace .bpc-preview { width: 100%; }
  .bpc-unified .bpc-models nav { padding: 3px; }
  .bpc-unified .bpc-toolbar { gap: 5px; padding: 5px; }
  .bpc-unified .bpc-material-counts { flex: 1 0 100%; }
  .bpc-unified > footer { display: none; }
  .bpc-unified.bpc-catalog-workspace .bpc-mobile-category select { max-width: 160px; }
}
@media (max-width: 760px) {
  .bpc-unified.bpc-catalog-workspace .bpc-preview:modal {
    position: fixed; inset: 0; width: 100%; height: 100dvh; border: 0; box-shadow: none;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }
  /* The customer portal normally leaves a margin around phone dialogs. */
  body.customer-portal #customer dialog[data-bpc-preview-pane]:modal {
    max-width: 100vw !important; max-height: 100dvh !important;
  }
  .bpc-unified .bpc-preview .bpc-return {
    top: calc(6px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right));
  }
}

/* Keep the trademark and its actions together above the original-size preview. */
.brand-cert-dialog .brand-cert-identity,
.brand-cert-dialog .brand-cert-detail-info,
.brand-cert-dialog .brand-cert-class-editor label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  min-width: 0;
}
.brand-cert-identity { overflow-wrap: anywhere; }
.brand-cert-version { color: var(--cert-muted); font-size: 12px; }
.brand-cert-dialog .brand-cert-class-toggle {
  min-height: 32px;
  min-block-size: 32px;
  padding: 3px 7px;
  color: #3656af;
}
.brand-cert-dialog .brand-cert-class-editor label { font-size: 12px; }
.brand-cert-dialog .brand-cert-class-editor input { width: 126px; }
.brand-cert-embedded .brand-cert-header {
  min-height: 0;
  padding: 5px 10px;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.brand-cert-embedded .brand-cert-header .brand-cert-toolbar { margin-inline-start: auto; }
.brand-cert-embedded .brand-cert-detail {
  gap: 5px;
  padding: 6px 10px;
  overflow: auto;
}
.brand-cert-embedded .brand-cert-detail-heading { align-items: center; gap: 4px 10px; }
.brand-cert-embedded .brand-cert-detail-heading > .brand-cert-identity { flex: 1 1 auto; }
.brand-cert-embedded .brand-cert-detail-info { flex: 0 0 auto; gap: 3px 12px; }
.brand-cert-embedded .brand-cert-detail-info > .brand-cert-group-access {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.brand-cert-embedded .brand-cert-detail-info > details:not([open]) { width: auto; }
.brand-cert-embedded .brand-cert-detail-info > details[open] { width: 100%; }
.brand-cert-embedded .brand-cert-preview-controls { gap: 4px; padding: 3px 6px; }
.brand-cert-embedded .brand-cert-preview-controls .brand-cert-toolbar { gap: 4px; }
.brand-cert-embedded :is(.brand-cert-header,.brand-cert-detail-heading,.brand-cert-preview-controls) :is(button,summary) {
  min-height: 32px;
  min-block-size: 32px;
  padding: 4px 8px;
}
.brand-cert-embedded .brand-cert-access.is-inline:empty,
.brand-cert-embedded .brand-cert-detail-heading [data-cert-heading-action]:empty,
.brand-cert-embedded .brand-cert-picker { display: none; }
.brand-cert-embedded .brand-cert-preview { padding: 8px; min-height: 120px; }
@container (max-width: 760px) {
  .brand-cert-embedded .brand-cert-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .brand-cert-embedded .brand-cert-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--cert-line);
    max-height: 30dvh;
    gap: 5px;
    padding: 4px 8px;
  }
  .brand-cert-embedded .brand-cert-picker { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; }
  .brand-cert-picker::after { content: '▾'; }
  .brand-cert-picker[aria-expanded="true"]::after { transform: rotate(180deg); }
  .brand-cert-embedded .brand-cert-picker[aria-expanded="false"] ~ :is(.brand-cert-search-label,.brand-cert-list) { display: none; }
  .brand-cert-embedded .brand-cert-list { flex: 0 1 auto; overflow: auto; }
  .brand-cert-embedded .brand-cert-search-label { flex-flow: row nowrap; }
  .brand-cert-embedded .brand-cert-detail { padding: 5px 8px; }
}


.boq-root{width:100%;box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;color:#26334d;min-width:0;font-size:14px}.boq-root:is(dialog){width:min(1100px,94vw);max-height:90vh;border:1px solid #dce3f1;border-radius:16px;padding:24px}.boq-root::backdrop{background:#1d2b4877}.boq-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}.boq-header h3{margin:0 0 8px}.boq-header p,.boq-root small{color:#7585a5}.boq-root button,.boq-root input,.boq-root select{font:inherit;border:1px solid #d9e1f1;border-radius:8px;background:#fff;padding:9px 12px;color:inherit;box-sizing:border-box}.boq-root button{cursor:pointer}.boq-root button:hover{border-color:#5272ff}.boq-root button:disabled{opacity:.55;cursor:default}.boq-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.boq-message{min-height:20px;margin:8px 0;color:#3155d9}.boq-message.is-error{color:#ba3b45}.boq-toolbar{display:flex;gap:12px;align-items:end;margin-bottom:16px;flex-wrap:wrap}.boq-toolbar label{display:grid;gap:4px}.boq-layout{display:grid;grid-template-columns:minmax(230px,30%) minmax(0,1fr);border-top:1px solid #e3e8f2}.boq-list{padding:12px 14px 12px 0;max-height:70vh;overflow:auto}.boq-card{display:grid!important;gap:7px;width:100%;text-align:left;margin-bottom:10px;overflow-wrap:anywhere}.boq-card.is-selected{border-color:#5272ff;background:#f3f6ff}.boq-card span,.boq-card small{font-size:12px}.boq-detail{padding:16px;border-left:1px solid #e3e8f2;min-width:0;overflow:auto;max-height:75vh}.boq-detail h4{margin:0 0 10px;font-size:18px}.boq-detail>p{color:#7585a5;overflow-wrap:anywhere}.boq-detail details{margin:16px 0}.boq-history>div,.boq-history>p{padding:10px;background:#f7f9fc}.boq-history small{display:block;margin-top:5px}.boq-preview{border:1px solid #dce3f1;border-radius:10px;overflow:hidden;margin-top:18px;background:#f5f7fb}.boq-preview img{display:block;max-width:100%;height:auto;margin:auto}.boq-preview-nav{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px;background:#fff}.boq-new{font-size:12px;color:#3354ef;background:#eaf0ff;border-radius:5px;padding:2px 6px}.boq-form{display:grid;gap:14px;max-width:650px}.boq-form label{display:grid;gap:6px}.boq-form input[readonly]{background:#f3f5f8}.boq-request-list{display:grid;gap:12px;margin-top:15px}.boq-request-list article{border:1px solid #dde4f1;border-radius:10px;padding:15px}.boq-request-list article small{display:block;margin-bottom:10px}.boq-request-list article[hidden]{display:none}.brand-library-tabs [data-brand-other-count],.brand-library-tabs [data-brand-product-certificate-count]{padding:2px 7px;margin-left:6px;border-radius:10px;background:#eef2fa;font-size:12px}@media(max-width:760px){.boq-layout{grid-template-columns:1fr}.boq-list{max-height:32vh;padding-right:0}.boq-detail{border-left:0;border-top:1px solid #e3e8f2;padding:14px 0;max-height:none}.boq-toolbar input{min-width:0;flex:1}.boq-preview-nav{font-size:12px}.boq-root:is(dialog){padding:15px}.boq-header{gap:8px}}

.boq-root>[data-boq-content]{min-width:0;min-height:0}.boq-pagination{display:flex;gap:6px;align-items:center}
@media(max-width:760px){.brand-library[data-layout="workspace"] .brand-library-tabs{overflow-x:auto;gap:12px;flex-wrap:nowrap}.brand-library[data-layout="workspace"] .brand-library-tabs>button{flex:0 0 auto}}

/* Shared qualification editor: one compact metadata row, independent file recovery. */
.boq-root .boq-form{max-width:none;gap:12px;margin:0}.boq-form h4,.boq-categories h4{margin:0;font-size:17px}.boq-form>p{margin:0;color:#71819e}.boq-form-fields{display:grid;grid-template-columns:minmax(150px,1fr) minmax(220px,2fr) minmax(170px,1fr);gap:12px;align-items:end}.boq-form-fields>*{min-width:0}.boq-form-fields input,.boq-form-fields select{width:100%;min-width:0;height:38px}.boq-form label{font-size:13px}.boq-upload-area{border:1px dashed #cbd8ec;border-radius:10px;background:#f8faff;padding:14px;min-width:0}.boq-upload-area>small{display:block;margin-top:8px;line-height:1.65}.boq-file-picker{display:flex!important;align-items:center;gap:14px;flex-wrap:wrap;font-weight:600;color:#315bd5}.boq-file-picker input{max-width:100%;min-width:0;font-size:13px;background:#fff}.boq-file-list{display:grid;gap:8px;margin-top:12px}.boq-upload-row{display:flex;gap:12px;justify-content:space-between;align-items:center;background:#fff;border:1px solid #dfe6f2;border-radius:8px;padding:10px;min-width:0}.boq-upload-row>div:first-child{min-width:0;flex:1}.boq-upload-row strong{font-size:13px;overflow-wrap:anywhere}.boq-upload-row small{display:block;line-height:1.6;margin-top:3px;overflow-wrap:anywhere}.boq-upload-row[data-state=failed]{border-color:#ecc4c4;background:#fffafa}.boq-upload-row[data-state=failed] small,.boq-error{color:#a93939}.boq-upload-row[data-state=ready] small{color:#16856c}.boq-upload-row button,.boq-replace{font-size:12px!important;padding:6px 10px!important;white-space:nowrap}.boq-replace{display:inline-flex!important;position:relative;overflow:hidden;cursor:pointer;border:1px solid #d9e1f1;background:#fff;border-radius:8px;line-height:normal;gap:0!important}.boq-replace input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.boq-replace.is-disabled{opacity:.5;cursor:default}.boq-root .boq-primary{color:white;background:#365bdd;border-color:#365bdd}.boq-root .boq-primary:hover{background:#244ccf}.boq-root .boq-danger{border-color:#e5abab;color:#b03434;background:#fff7f7}.boq-empty-files{margin:2px 0;color:#71819e;font-size:13px}.boq-categories{display:grid;gap:12px;max-width:100%;min-width:0}.boq-category-new{display:flex;gap:8px;min-width:0}.boq-category-new input[name=name]{min-width:0;flex:1}.boq-category-new input[name=sort_order]{width:90px}.boq-category-list{display:grid;gap:8px}.boq-category-row{display:grid;grid-template-columns:minmax(180px,1fr) 90px minmax(100px,auto) auto auto;align-items:end;gap:8px;padding:10px;border:1px solid #e1e7f2;border-radius:8px}.boq-category-row label{display:grid;gap:4px;font-size:12px;color:#71819e;min-width:0}.boq-category-row input{width:100%;min-width:0}.boq-category-row span{align-self:center;font-size:12px;color:#71819e}.boq-category-delete{padding:12px;background:#fff8f2;border:1px solid #f0d6b7;border-radius:8px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.boq-category-delete p{flex-basis:100%;margin:0;overflow-wrap:anywhere}.boq-category-delete select{min-width:160px}.boq-root [data-boq-upload-status] p{margin:8px 0;font-size:13px}.boq-root .boq-header>div:first-child{min-width:0}.boq-root .boq-header h3{overflow-wrap:anywhere}
@media(max-width:760px){.boq-form-fields{grid-template-columns:1fr 1fr}.boq-form-fields>label:nth-child(2){grid-column:1/-1;grid-row:2}.boq-upload-area{padding:10px}.boq-upload-row{align-items:flex-start;flex-direction:column;gap:8px}.boq-category-row{grid-template-columns:minmax(0,1fr) 75px}.boq-category-row>span{grid-column:1/-1}.boq-category-row>button{min-width:0}.boq-category-new{flex-wrap:wrap}.boq-category-new input[name=name]{flex-basis:calc(100% - 105px)}.boq-header .boq-actions{gap:6px}.boq-header .boq-actions button{padding:7px 9px;font-size:13px}.boq-upload-row .boq-actions{width:100%}.boq-category-delete select{max-width:100%;min-width:0}.boq-root .boq-detail{overflow-wrap:anywhere}.boq-file-picker input{width:100%}}

/* Qualification cards contain multiple text rows, unlike mobile action buttons. */
body.customer-portal.customer-phone-layout #customer#customer#customer#customer#customer .boq-root button.boq-card {
  height: auto !important;
  padding: 9px 12px !important;
  white-space: normal !important;
}

.boq-root {
  container: other-qualifications / inline-size;
}
.boq-root .boq-header,
.boq-detail-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.boq-root .boq-header {
  justify-content: flex-start;
  padding: 6px 0;
}
.boq-root .boq-header h3,
.boq-root .boq-detail-heading h4 {
  margin: 0;
  line-height: 1.4;
  font-size: 16px;
}
.boq-detail-heading small {
  font-size: 13px;
  font-weight: normal;
}
.boq-root .boq-header .boq-toolbar {
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.boq-header .boq-toolbar input {
  width: clamp(110px, 15cqw, 210px);
  min-width: 0;
}
.boq-header .boq-toolbar select {
  max-width: 12em;
}
.boq-header .boq-toolbar span {
  white-space: nowrap;
  color: #586a86;
  font-size: 13px;
}
.boq-root .boq-header .boq-actions,
.boq-detail-heading .boq-actions {
  margin-left: auto;
  gap: 6px;
}
.boq-root :is(.boq-header, .boq-detail-heading, .boq-preview-nav, .boq-pagination) :is(button, select, input),
.boq-root .boq-more > summary,
.boq-root .boq-list-toggle {
  width: auto;
  min-height: 34px;
  height: auto;
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.4;
}
.boq-root .boq-message {
  margin: 0;
  min-height: 0;
}
.boq-root .boq-message:not(:empty) {
  margin: 4px 0;
}
.boq-root .boq-layout {
  grid-template-columns: minmax(160px, 23%) minmax(0, 1fr);
}
.boq-root .boq-list {
  padding: 8px 10px 8px 0;
}
.boq-root .boq-layout .boq-card {
  gap: 3px;
  margin-bottom: 5px;
}
.boq-root .boq-list-toggle {
  display: none;
}
.boq-root .boq-detail {
  padding: 8px 10px;
}
.boq-root .boq-detail-heading {
  justify-content: space-between;
}
.boq-root .boq-expiry {
  font-size: 13px;
  margin: 5px 0;
}
.boq-root .boq-records {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 14px;
  font-size: 13px;
}
.boq-root .boq-records details {
  margin: 4px 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.boq-root .boq-records details[open] {
  flex-basis: 100%;
}
.boq-root .boq-records summary {
  cursor: pointer;
  padding: 4px 0;
}
.boq-root .boq-preview {
  margin-top: 4px;
}
.boq-root .boq-preview-nav {
  flex-wrap: wrap;
  padding: 4px 6px;
  gap: 4px;
}
.boq-root .boq-more {
  position: relative;
  margin: 0;
}
.boq-root .boq-more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-sizing: border-box;
  cursor: pointer;
  border: 1px solid #d9e1f1;
  border-radius: 8px;
  background: #fff;
  list-style: none;
}
.boq-more > summary::-webkit-details-marker {
  display: none;
}
.boq-more > summary::after,
.boq-list-toggle::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.boq-more[open] > summary::after,
.boq-list-toggle[aria-expanded=true]::after {
  transform: translateY(2px) rotate(225deg);
}
.boq-more-list {
  position: absolute;
  top: calc(100% + 2px);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 2px;
  min-width: 100px;
  padding: 4px;
  background: white;
  border: 1px solid #d9e1f1;
  border-radius: 8px;
  box-shadow: 0 4px 14px #1d2b4822;
}
.boq-root .boq-more-list button {
  text-align: left;
  white-space: nowrap;
  border: none;
}
.boq-root .boq-more-list button:hover,
.boq-root .boq-more-list button:focus-visible {
  background: #f1f4ff;
}
.boq-root [hidden] {
  display: none !important;
}
@container other-qualifications (max-width: 740px) {
  .boq-root .boq-header {
    gap: 4px 8px;
  }
  .boq-root .boq-header .boq-toolbar {
    order: 1;
    flex-basis: 100%;
  }
  .boq-header .boq-toolbar select {
    max-width: 35%;
  }
  .boq-header .boq-toolbar input {
    flex: 1 1 78px;
    width: 0;
  }
  .boq-root .boq-layout {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .boq-root .boq-list-toggle {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: 5px;
  }
  .boq-list-toggle[aria-expanded=false] + .boq-list {
    display: none;
  }
  .boq-root .boq-list {
    max-height: 28vh;
    padding: 0;
  }
  .boq-root .boq-detail {
    max-height: none;
    padding: 6px 0;
    border-left: 0;
  }
  .boq-root .boq-detail-heading {
    gap: 4px 8px;
  }
}


.bmr-dialog{box-sizing:border-box;width:min(1440px,96vw);max-width:96vw;height:min(920px,92dvh);max-height:92dvh;margin:auto;padding:22px;border:1px solid #dce5f1;border-radius:16px;background:#fff;color:#263650;display:flex;flex-direction:column;gap:12px;overflow:hidden;font:14px/1.5 system-ui,sans-serif}.bmr-dialog:not([open]){display:none}.bmr-dialog::backdrop{background:#17243b80}.bmr-dialog [hidden]{display:none!important}.bmr-dialog *{box-sizing:border-box}.bmr-dialog :is(button,input,select,textarea){font:inherit;color:inherit;border:1px solid #d9e2f0;border-radius:7px;padding:7px 10px;background:#fff;min-width:0}.bmr-dialog button{cursor:pointer;white-space:nowrap;min-height:34px}.bmr-dialog button:disabled{cursor:default;opacity:.5}.bmr-dialog .is-primary{background:#3657e8;border-color:#3657e8;color:#fff}.bmr-heading,.bmr-footer,.bmr-preview header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.bmr-heading h2{font-size:22px;margin:0}.bmr-heading p{margin:4px 0 0;color:#75839c;font-size:12px}.bmr-row-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.bmr-tabs{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:4px;border-bottom:1px solid #e4eaf3}.bmr-tabs button{border:0;background:#f4f6fb}.bmr-tabs .is-active{background:#eaf0ff;color:#3457df;font-weight:650}.bmr-tabs b{font-size:12px;margin-left:3px}.bmr-filters{display:grid;grid-template-columns:145px 180px minmax(220px,1fr) auto;gap:10px;align-items:end}.bmr-filters label,.bmr-review label{display:grid;gap:5px;font-size:12px;color:#70809b}.bmr-filters :is(input,select){width:100%;height:38px;background:#fff}.bmr-message{margin:0;min-height:20px;font-size:12px;color:#3657ce}.bmr-dialog .is-error,.bmr-warning{color:#bf4854}.bmr-bulk{display:flex;gap:12px;flex-wrap:wrap;align-items:center;font-size:12px}.bmr-bulk label{display:flex;align-items:center;gap:6px}.bmr-bulk input,.bmr-table-wrap input[type=checkbox]{width:16px;height:16px;margin:0}.bmr-workspace{display:flex;gap:16px;min-height:0;flex:1 1 auto;overflow:hidden}.bmr-table-wrap{min-width:0;flex:1 1 auto;overflow:auto;border:1px solid #e2e9f3;border-radius:9px}.bmr-table-wrap table{width:100%;min-width:0;border-collapse:collapse;table-layout:fixed;font-size:12px}.bmr-table-wrap th{position:sticky;top:0;z-index:1;text-align:left;background:#f7f9fc;color:#73839c;font-weight:500;padding:11px 9px}.bmr-table-wrap td{vertical-align:top;padding:12px 9px;border-top:1px solid #e8edf5;overflow-wrap:anywhere}.bmr-table-wrap th:first-child{width:46px}.bmr-table-wrap th:nth-child(2){width:22%}.bmr-table-wrap th:nth-child(3){width:27%}.bmr-table-wrap th:nth-child(4){width:17%}.bmr-table-wrap th:nth-child(5){width:12%}.bmr-table-wrap strong,.bmr-table-wrap small{display:block;white-space:normal}.bmr-table-wrap small{color:#7c8aa2;margin-top:4px;font-size:11px}.bmr-table-wrap .bmr-warning{color:#b16d34}.bmr-kind{display:inline-block;background:#eef2ff;color:#4360c7;border-radius:4px;padding:1px 5px;margin-bottom:4px;font-size:10px}.bmr-state{display:inline-block;padding:3px 7px;border-radius:5px;background:#f2f5fa;color:#687b99}.bmr-state.is-pending{background:#fff3db;color:#a66c1b}.bmr-state.is-approved{background:#edf9f1;color:#2e8054}.bmr-table-wrap td .bmr-row-actions{gap:5px}.bmr-table-wrap td button{font-size:11px;padding:5px 7px;min-height:28px}.bmr-empty{text-align:center;color:#8491a5;padding:40px!important}.bmr-review,.bmr-results{flex:none;padding:12px 14px;border:1px solid #dce5f4;border-radius:9px;background:#f7f9ff;max-height:32dvh;overflow:auto}.bmr-review p{margin:5px 0 10px;font-size:12px;color:#6f7f9b}.bmr-review label{display:inline-grid;min-width:160px;max-width:100%;margin:4px 12px 10px 0}.bmr-review textarea{min-width:min(480px,100%);width:100%}.bmr-results{max-height:150px;font-size:12px}.bmr-results ul{margin:5px 0;padding-left:20px}.bmr-results .is-success{color:#2d8054}.bmr-footer{flex:none;align-items:center;font-size:12px;color:#7887a1}.bmr-preview{flex:0 0 36%;min-width:280px;overflow:auto;border:1px solid #dce5f3;border-radius:9px;padding:12px;background:#f7f9fc}.bmr-preview p{margin:5px 0 10px;color:#74849b;font-size:12px;overflow-wrap:anywhere}.bmr-preview header button{font-size:11px;padding:4px 6px}.bmr-preview label{display:grid;gap:5px;font-size:12px}.bmr-preview select{width:100%}.bmr-preview-nav{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:10px 0;font-size:12px}.bmr-preview img{display:block;width:100%;height:auto}.bmr-preview-caption{font-size:11px!important}.bmr-dialog.has-preview .bmr-table-wrap table{min-width:650px}
@media(max-width:1000px){.bmr-dialog{padding:16px;gap:10px}.bmr-dialog.has-preview .bmr-workspace{display:grid;grid-template-columns:1fr;overflow:auto}.bmr-dialog.has-preview .bmr-table-wrap{max-height:45dvh;min-height:200px;flex:none}.bmr-preview{min-width:0;max-height:65dvh;overflow:auto}.bmr-filters{grid-template-columns:130px minmax(140px,1fr) auto}.bmr-search{grid-column:1/3;grid-row:2}.bmr-filters>button{grid-column:3;grid-row:2}.bmr-table-wrap table{min-width:650px}}
@media(max-width:600px){.bmr-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:12px;gap:10px}.bmr-heading h2{font-size:19px}.bmr-heading p{max-width:220px}.bmr-heading>.bmr-row-actions{flex-wrap:nowrap}.bmr-heading button{padding:6px 8px;font-size:12px}.bmr-tabs{gap:5px}.bmr-tabs button{font-size:12px;padding:6px 8px}.bmr-filters{grid-template-columns:1fr 1fr;gap:8px}.bmr-search{grid-column:1/-1;grid-row:auto}.bmr-filters>button{grid-column:1/-1;grid-row:auto;justify-self:end;min-width:72px}.bmr-bulk{gap:8px}.bmr-bulk button{padding:5px 8px;font-size:12px}.bmr-workspace{overflow:auto;display:block}.bmr-table-wrap{overflow:visible;border:0}.bmr-dialog.has-preview .bmr-table-wrap{max-height:none;min-height:0}.bmr-table-wrap table,.bmr-dialog.has-preview .bmr-table-wrap table{display:block;min-width:0;table-layout:auto}.bmr-table-wrap thead{display:none}.bmr-table-wrap tbody{display:grid;gap:10px}.bmr-table-wrap tr{display:block;position:relative;border:1px solid #dde5f2;border-radius:9px;padding:12px;background:#fff}.bmr-table-wrap td{display:block;border:0;padding:4px 0}.bmr-table-wrap td:first-child{position:absolute;top:14px;right:12px;z-index:1}.bmr-table-wrap td:nth-child(2){padding-right:25px}.bmr-table-wrap td:nth-child(4){color:#76869e}.bmr-table-wrap td .bmr-row-actions{gap:7px;margin-top:4px}.bmr-table-wrap td button{min-height:32px;font-size:12px}.bmr-table-wrap strong{font-size:13px}.bmr-preview{margin-top:12px;max-height:none}.bmr-review{max-height:38dvh}.bmr-review label{display:grid;width:100%;margin-right:0}.bmr-results{max-height:100px}.bmr-footer{font-size:11px;gap:6px}.bmr-footer button{padding:5px 8px;font-size:12px}}

.bmr-original-actions{margin-top:10px}.bmr-preview iframe{display:block;width:100%;height:55dvh;min-height:320px;border:0;background:#fff}


.customer-authorization-apply-dialog { width: min(720px, calc(100vw - 24px)); max-height: min(90dvh, 900px); padding: 0; border: 1px solid #dbe5f1; border-radius: 14px; background: #fff; color: #243a57; box-shadow: 0 20px 70px #12253b40; overflow: auto; }
.customer-authorization-apply-dialog::backdrop { background: #152b4b66; }
.customer-authorization-apply-dialog > header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e4ebf4; background: #f6f9fd; }
.customer-authorization-apply-dialog h3 { margin: 0; font-size: 18px; }
.customer-authorization-apply-dialog [data-application-body] { padding: 16px 18px; }
.customer-authorization-apply-owner { margin: 0 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.customer-authorization-apply-note, .customer-authorization-apply-files > p { margin: 0 0 14px; font-size: 12px; color: #6d809a; }
.customer-authorization-apply-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.customer-authorization-apply-fields > label, .customer-authorization-upload { display: grid; min-width: 0; gap: 6px; font-size: 13px; }
.customer-authorization-apply-fields > label { align-content: start; }
.customer-authorization-option-field { display: grid; align-content: start; min-width: 0; gap: 6px; font-size: 13px; }
.customer-authorization-option-heading { display: flex; align-items: center; justify-content: space-between; min-height: 20px; gap: 4px; }
.customer-authorization-apply-dialog .customer-authorization-option-heading button { min-height: 20px; padding: 0 3px; border: 0; background: transparent; color: #3761bd; font-size: 11px; line-height: 20px; }
.customer-authorization-option-field [hidden] { display: none !important; }
.customer-authorization-option-field select { text-overflow: ellipsis; }
.customer-authorization-option-field small { color: #a55230; overflow-wrap: anywhere; font-size: 11px; }
.customer-authorization-options-help { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; color: #6d809a; font-size: 12px; }
.customer-authorization-apply-dialog .customer-authorization-options-help button { min-height: 30px; padding: 4px 8px; white-space: nowrap; font-size: 12px; }
.customer-authorization-apply-fields .is-wide { grid-column: 1 / -1; }
.customer-authorization-apply-dialog :is(input:not([type="checkbox"]), select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #cedbef; border-radius: 7px; background: #fff; color: #243a57; font: inherit; }
.customer-authorization-apply-dialog input[readonly] { background: #f2f5fa; color: #526783; }
.customer-authorization-apply-dialog textarea { resize: vertical; }
.customer-authorization-apply-files { display: grid; gap: 10px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #e4ebf4; }
.customer-authorization-apply-files h4 { margin: 0; font-size: 14px; }
.customer-authorization-apply-files > p { margin: 0; }
.customer-authorization-upload small { color: #6d809a; overflow-wrap: anywhere; }
.customer-authorization-apply-agreement { display: flex; align-items: flex-start; gap: 7px; margin-top: 16px; font-size: 12px; }
.customer-authorization-apply-agreement input { flex: none; margin: 2px 0 0; }
.customer-authorization-apply-dialog form > footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.customer-authorization-apply-dialog button { flex: none; min-height: 36px; padding: 8px 14px; border: 1px solid #d6e2f1; border-radius: 7px; font: inherit; cursor: pointer; }
.customer-authorization-apply-dialog button.primary { background: #365de6; border-color: #365de6; color: #fff; }
.customer-authorization-apply-dialog button.ghost { background: #fff; color: #3b5273; }
.customer-authorization-apply-dialog button:disabled { cursor: wait; opacity: .55; }
.customer-authorization-apply-dialog [data-application-message] { margin: 12px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.customer-authorization-apply-dialog .is-error { color: #b42338; }
.customer-authorization-apply-result { display: grid; gap: 12px; padding: 12px 0; overflow-wrap: anywhere; }
.customer-authorization-apply-result p { margin: 0; font-size: 14px; }
.customer-authorization-apply-result small { color: #6d809a; }
.customer-authorization-apply-result button { justify-self: start; }
#customerQualificationsView .customer-qualification-summary-actions > #customerQualificationApplyBtn { margin-left: auto; flex: none; min-height: 32px; padding: 6px 12px; font-size: 12px; white-space: nowrap; }
.customer-qualification-empty [data-customer-qualification-apply] { justify-self: center; margin-top: 6px; }
.customer-qualification-table-wrap [data-customer-qualification-edit] { margin-top: 5px; padding: 4px 8px; font-size: 11px; }
.customer-authorization-existing-files { display: grid; gap: 5px; min-width: 0; }
.customer-authorization-existing-files:empty { display: none; }
.customer-authorization-existing-file { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 7px; border: 1px solid #e0e8f5; border-radius: 6px; background: #f7faff; }
.customer-authorization-apply-dialog .customer-authorization-existing-link { flex: 1 1 auto; min-width: 0; max-width: 100%; min-height: 28px; padding: 2px 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; color: #315bd8; font-size: 12px; line-height: 22px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.customer-authorization-apply-dialog .customer-authorization-file-remove { min-height: 26px; padding: 2px 6px; color: #b42338; font-size: 11px; }
.customer-authorization-apply-history { margin: 0 0 12px; font-size: 12px; color: #526783; }
.customer-authorization-apply-history > summary { cursor: pointer; }
.customer-authorization-apply-history > ol { display: grid; gap: 8px; max-height: 220px; margin: 8px 0 0; padding-left: 18px; overflow: auto; }
.customer-authorization-apply-history li { overflow-wrap: anywhere; }
.customer-authorization-apply-history time { margin-right: 8px; color: #71829a; }
.customer-authorization-apply-history p { margin: 3px 0 0; white-space: pre-wrap; }
@media (max-width: 760px) {
  .customer-authorization-apply-dialog { max-height: calc(100dvh - 24px); }
  .customer-authorization-apply-dialog > header, .customer-authorization-apply-dialog [data-application-body] { padding: 12px; }
  .customer-authorization-apply-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; }
  .customer-authorization-apply-dialog :is(input:not([type="checkbox"]), select, textarea) { font-size: 16px; }
  .customer-authorization-apply-dialog input[type="date"] { min-width: 0; min-inline-size: 0; padding: 8px 4px; font-size: 14px; }
  .customer-authorization-apply-dialog [name="contact_phone"] { padding-left: 6px; padding-right: 6px; }
  .customer-authorization-option-heading label { font-size: 13px; }
  #customerQualificationsView .customer-qualification-title { flex-wrap: wrap; }
}
@media (max-width: 359px) { .customer-authorization-apply-fields { grid-template-columns: minmax(0, 1fr); } }

.customer-authorization-apply-optional { margin-top: 12px; font-size: 13px; }
.customer-authorization-apply-optional > summary { margin-bottom: 10px; cursor: pointer; color: #526783; }
.customer-authorization-apply-fields label > small { color: #71829a; font-size: 11px; }
.customer-qualification-beneficiary-table td[data-label="被授权公司"] { overflow-wrap: anywhere; }
.customer-qualification-beneficiary-table td[data-label="被授权公司"] > small { display: block; color: #71829a; font-size: 11px; }
@media (max-width: 760px) {
  body.customer-portal #customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tbody tr { grid-template-columns: minmax(0, 1fr) !important; }
  body.customer-portal #customer#customer #customerQualificationsView .customer-qualification-beneficiary-table td[data-label] { grid-column: 1 / -1 !important; grid-row: auto !important; min-width: 0; }
  body.customer-portal #customer#customer #customerQualificationsView .customer-qualification-beneficiary-table td[data-label]::before { content: attr(data-label) !important; }
}

/* Qualification-only workspace: records scroll, pagination occupies its own bottom row. */
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  height: var(--customer-qualification-workspace-height, 480px) !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
  overflow: hidden !important;
  gap: 0 !important;
  box-sizing: border-box !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-records {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > :is(.customer-qualification-empty,.customer-qualification-loading) {
  display: grid;
  place-content: center;
  justify-items: center;
  flex: 1 1 0;
  min-height: 0;
  padding: 16px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-company {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-company > header {
  flex-wrap: wrap;
  min-width: 0;
  gap: 4px 10px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-company > header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-table-wrap {
  max-width: 100% !important;
  overflow: visible !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-table-wrap table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-table-wrap :is(th,td) {
  min-width: 0 !important;
  padding: 8px 7px !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  vertical-align: middle;
  font-size: 12px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-table-wrap thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #f5f7fb !important;
  box-shadow: inset 0 -1px 0 #e3e9f2 !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-company-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView td[data-label="有效期"] > span {
  display: block;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-date-label {
  color: #76849a;
  font-size: 11px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-countdown {
  font-variant-numeric: tabular-nums;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .authorization-status.not_started {
  color: #586ca0;
  background: #eef2fa;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  min-width: 0 !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-top: 1px solid #e7ecf4 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}
@media (max-width:760px) {
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats.customer-qualification-stats {
    display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important; gap:6px!important; height:auto!important; max-height:none!important; overflow:visible!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats > div {
    display:grid!important; place-content:center!important; justify-items:center!important; gap:1px!important; height:36px!important; min-height:36px!important; min-width:0!important; padding:3px 1px!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats span {font-size:9px!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats strong {font-size:12px!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult.customer-qualification-result {
    display:flex!important; flex-direction:column!important; height:var(--customer-qualification-workspace-height,480px)!important; min-height:0!important; max-height:none!important; padding:0!important; overflow:hidden!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table,
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tbody {display:block!important; width:100%!important; min-width:0!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table :is(thead,colgroup) {display:none!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tbody tr {
    display:grid!important; grid-template-columns:minmax(0,1fr)!important; width:100%!important; gap:0!important; margin:0!important; border-bottom:8px solid #f4f7fb!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table td[data-label] {
    display:block!important; position:relative!important; grid-column:1/-1!important; grid-row:auto!important; box-sizing:border-box!important; width:100%!important; min-height:34px!important; padding:7px 9px 7px 88px!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table td[data-label]::before {
    content:attr(data-label)!important; position:absolute!important; top:7px!important; left:9px!important; width:70px!important; color:#74839a!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] {
    display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important; grid-template-areas:"total size jump" "prev page next"!important;
    position:static!important; flex:0 0 auto!important; height:auto!important; min-height:0!important; width:100%!important; max-height:none!important; overflow:visible!important; margin:0!important;
    gap:4px!important; padding:5px 7px calc(5px + env(safe-area-inset-bottom,0px))!important; font-size:10px!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > :nth-child(1) {grid-area:total!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > :nth-child(2) {grid-area:size!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > :nth-child(3) {grid-area:prev!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > :nth-child(4) {grid-area:page!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > :nth-child(5) {grid-area:next!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > :nth-child(6) {grid-area:jump!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > * {height:auto!important; min-width:0!important; width:auto!important; font-size:10px!important; justify-content:center!important; white-space:nowrap!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] :is(button,select,input) {box-sizing:border-box!important; min-width:0!important; height:34px!important; min-height:34px!important; font-size:11px!important; padding:0 3px!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] > button {width:100%!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] select {width:55px!important}
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationResult > .customer-portal-pager[data-customer-pager="qualifications"] input {width:30px!important}
}

/* Read-only customer authorization files and void history. */
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools {
  display: inline-grid;
  grid-template-columns: minmax(0, 32px) 18px;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  vertical-align: middle;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools > .customer-qualification-document {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 32px !important;
  height: 42px !important;
  padding: 0 !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools > .customer-qualification-document-download {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 18px !important;
  min-width: 18px !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 !important;
  border: 1px solid #dbe5f4;
  border-radius: 5px;
  background: #fff;
  color: #315bd8;
  line-height: 1;
  font-size: 15px !important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tr.is-voided { background: #fffafb; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .authorization-status.voided { background: #fff0ef; color: #c43e3e; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-record { display: grid; gap: 5px; align-content: start; margin-top: 6px; min-width: 0; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-stamp {
  display: inline-block;
  justify-self: start;
  padding: 2px 8px;
  border: 2px solid #cf4d4d;
  border-radius: 3px;
  color: #c43e3e;
  background: #fff8f8;
  transform: rotate(-10deg);
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
  letter-spacing: 3px;
  pointer-events: none;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-reason { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; color: #9b5c5c; font-size: 11px; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-record time { color: #8d8d99; font-size: 10px; overflow-wrap: anywhere; }
body.customer-portal #authorizationPreviewContent.is-voided { grid-template-rows: auto minmax(0, 1fr); }
body.customer-portal #authorizationPreviewContent .customer-authorization-preview-void { display: flex; align-items: center; flex-wrap: wrap; justify-self: stretch; align-self: start; gap: 5px 12px; padding: 8px 12px; background: #fff0ef; border-bottom: 1px solid #f3cece; color: #b53d3d; font-size: 12px; overflow-wrap: anywhere; }
body.customer-portal #authorizationPreviewContent .customer-authorization-preview-void strong { font-size: 14px; }
@media (max-width: 760px) {
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools { grid-template-columns: 42px 22px; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools > .customer-qualification-document { max-width: 42px !important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools > .customer-qualification-document-download { width: 22px !important; min-width: 22px !important; height: 32px !important; min-height: 32px !important; }
}

/* Keep authorization preview controls above the customer account header. */
body.customer-portal #authorizationPreviewModal.modal { z-index: 5001 !important; }

/* Phone authorization history: void rows keep readable records, without files. */
@media (max-width: 760px) {
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tr.is-voided,
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tr.is-voided > td {
    background: #f1f3f5 !important;
    color: #697383 !important;
    border-color: #dce1e8 !important;
    user-select: text;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView tr.is-voided .customer-qualification-document-tools {
    display: none !important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView tr.is-voided .customer-qualification-void-stamp {
    color: #c43e3e !important;
    border-color: #cf4d4d !important;
    background: #fff8f8 !important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView tr.is-voided .customer-qualification-void-reason {
    display: block !important;
    -webkit-line-clamp: unset;
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    color: #697383;
  }
}

/* Compact qualification rows: one deadline and void reason beside its status stamp. */
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-deadline {
  color: #526783;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-project-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-info-trigger {
  display: inline-flex !important;
  flex: none;
  align-items: center;
  width: auto !important;
  min-width: 0 !important;
  min-height: 28px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 2px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #3d65b1 !important;
  font-size: 11px !important;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-void-info-trigger:focus-visible {
  outline: 2px solid #6c91e7;
  outline-offset: 2px;
  border-radius: 3px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView td[data-label="状态"] .customer-qualification-void-status > .customer-qualification-void-stamp {
  margin: 0;
  padding: 2px 7px;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 2px;
  white-space: nowrap;
  vertical-align: middle;
}
@media (min-width: 761px) {
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table :is(th, td) {
    padding: 8px 5px !important;
    line-height: 1.4;
    vertical-align: middle !important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table tbody td {
    box-sizing: border-box;
    height: 58px;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table :is(th, td):is([data-label="授权书"], :first-child) {
    padding-right: 3px !important;
    padding-left: 3px !important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-beneficiary-table td[data-label="有效期"] {
    white-space: nowrap !important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-company-name,
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-project-name {
    max-height: 34px;
    line-height: 17px;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools {
    grid-template-columns: minmax(0, 32px) 16px;
    gap: 2px;
    width: 100%;
    max-width: 50px;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-document-tools > .customer-qualification-document-download {
    width: 16px !important;
    min-width: 16px !important;
  }
}

/* A native top-layer dialog; attachment preview and its 5001 layer are unchanged. */
body.customer-portal dialog.customer-authorization-void-dialog {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: min(520px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d5e0ef;
  border-radius: 14px;
  background: #fff;
  color: #29405e;
  box-shadow: 0 22px 75px #162d4e40;
}
body.customer-portal dialog.customer-authorization-void-dialog[open] {
  display: flex;
  flex-direction: column;
}
body.customer-portal dialog.customer-authorization-void-dialog::backdrop {
  background: #142b4d70;
}
body.customer-portal .customer-authorization-void-dialog-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4ebf4;
  background: #f6f8fc;
}
body.customer-portal .customer-authorization-void-dialog-title {
  min-width: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.customer-portal dialog.customer-authorization-void-dialog > .customer-authorization-void-dialog-subject {
  flex: none;
  max-height: 72px;
  margin: 12px 16px;
  overflow: auto;
  color: #71819a;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.customer-portal dialog.customer-authorization-void-dialog > dl {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 0 16px 16px;
  overflow: auto;
  overscroll-behavior: contain;
}
body.customer-portal dialog.customer-authorization-void-dialog > dl > dt {
  margin: 10px 0 5px;
  color: #8792a2;
  font-size: 12px;
}
body.customer-portal .customer-authorization-void-dialog-reason {
  min-height: 0;
  margin: 0;
  color: #43556e;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.customer-portal .customer-authorization-void-dialog-time {
  display: block;
  margin: 0;
  color: #7d899b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
body.customer-portal .customer-authorization-void-dialog-footer {
  display: flex;
  flex: none;
  justify-content: flex-end;
  padding: 10px 16px;
  border-top: 1px solid #e4ebf4;
  background: #fff;
}
body.customer-portal .customer-authorization-void-dialog-close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #d3deed;
  border-radius: 8px;
  background: #fff;
  color: #385273;
  font: inherit;
  cursor: pointer;
}
body.customer-portal .customer-authorization-void-dialog-close:focus-visible {
  outline: 2px solid #6c91e7;
  outline-offset: 2px;
}

/* Managed authorization notes are read-only on desktop and phone. */
body.customer-portal #customer#customer#customer#customer #customerQualificationsView td[data-label="备注"] { min-width:0; white-space:normal; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-authorization-note-preview { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; max-width:100%; min-width:0; width:auto; min-height:0; height:auto; padding:0; overflow:hidden; border:0; border-radius:0; background:transparent; box-shadow:none; color:#526685; font:inherit; font-size:12px; line-height:1.55; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-authorization-note-preview:focus-visible { outline:2px solid #4264cf; outline-offset:2px; }
body.customer-portal dialog.customer-authorization-note-dialog { position:fixed; inset:0; box-sizing:border-box; width:min(560px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); margin:auto; padding:20px; overflow:auto; border:1px solid #dce4f1; border-radius:14px; color:#344158; background:#fff; box-shadow:0 20px 70px #18253e35; }
body.customer-portal dialog.customer-authorization-note-dialog::backdrop { background:#17243b66; }
body.customer-portal .customer-authorization-note-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
body.customer-portal .customer-authorization-note-dialog h3 { margin:0; font-size:18px; }
body.customer-portal .customer-authorization-note-subject { margin:12px 0; color:#7e8da5; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
body.customer-portal .customer-authorization-note-body { min-height:50px; margin:12px 0; padding:12px; background:#f7f9fd; border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
body.customer-portal .customer-authorization-note-dialog > footer { display:flex; justify-content:flex-end; }
body.customer-portal .customer-authorization-note-dialog [data-close-customer-authorization-note] { flex:none; width:auto; min-width:32px; min-height:32px; padding:5px 12px; border:1px solid #dce4f1; border-radius:6px; color:#526685; background:#f8faff; box-shadow:none; }

/* Authorization summary and all company/search filters share two compact rows. */
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-summary {
  display:flex!important; align-items:center!important; flex-wrap:wrap!important; gap:10px 16px!important;
  min-width:0!important; padding:10px 12px!important; margin:0 0 10px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-title {
  display:flex!important; align-items:center!important; flex:1 1 180px!important; flex-wrap:nowrap!important;
  order:0!important; grid-column:auto!important; grid-row:auto!important; min-width:0!important; gap:8px!important; margin:0!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-title strong {
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; line-height:20px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-title span {
  flex:none; white-space:nowrap; font-size:11px;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats:not(.hidden):not([hidden]) {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important; grid-column:auto!important; grid-row:auto!important;
  order:1!important; flex:0 1 324px!important; width:324px!important; max-width:100%!important; min-width:0!important;
  gap:6px!important; height:auto!important; max-height:none!important; margin:0!important; overflow:visible!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats > div {
  display:flex!important; align-items:center!important; justify-content:space-between!important; grid-column:auto!important; grid-row:auto!important;
  gap:6px!important; min-width:0!important; height:36px!important; min-height:36px!important; padding:5px 9px!important; box-sizing:border-box;
  border:1px solid #e2e8f2; border-radius:8px; background:#f7f9fd; white-space:nowrap;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats span { font-size:11px!important; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats strong { font-size:14px!important; font-variant-numeric:tabular-nums; }
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-summary-actions {
  display:flex; align-items:center; flex:none; gap:10px; margin-left:auto; min-width:0; order:2!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-sync-state {
  flex:none!important; margin:0!important; white-space:nowrap; font-size:11px!important; line-height:16px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationApplyBtn {
  flex:none; min-height:36px!important; margin:0!important; padding:6px 12px!important; white-space:nowrap; font-size:12px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-filterbar {
  display:flex!important; flex-wrap:wrap!important; align-items:center!important; gap:6px!important;
  min-width:0!important; padding:8px 10px!important; margin:0 0 10px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-filterbar :is(input,select,button) {
  box-sizing:border-box!important; min-width:0!important; min-height:36px!important; height:36px!important; margin:0!important;
  font-size:12px!important; line-height:normal!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationKeyword {
  flex:1 1 180px!important; width:180px!important; max-width:100%!important; padding:6px 9px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-scope:not(.hidden):not([hidden]) {
  display:flex!important; align-items:center!important; flex:0 1 auto!important; flex-wrap:nowrap!important;
  grid-column:auto!important; grid-row:auto!important; width:auto!important; min-width:0!important; max-width:100%!important;
  gap:3px!important; padding:2px!important; margin:0!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-scope > button {
  flex:none!important; width:auto!important; padding:0 8px!important; white-space:nowrap;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationCompanyFilter {
  flex:1 1 144px!important; width:144px!important; max-width:180px!important; padding:0 6px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStatus {
  flex:0 0 112px!important; width:112px!important; padding:0 8px!important;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView :is(#customerQualificationSearchBtn,#customerQualificationClearBtn) {
  flex:none!important; width:52px!important; padding:0 9px!important; white-space:nowrap;
}
body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats:is(.hidden,[hidden]),
body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-scope:is(.hidden,[hidden]) { display:none!important; }
@media(max-width:760px) {
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-summary {
    display:grid!important; grid-template-columns:minmax(0,1fr) auto!important; gap:7px 8px!important; padding:8px!important; margin-bottom:8px!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-title {
    grid-column:1!important; grid-row:1!important; flex-wrap:wrap!important; align-content:center; gap:2px!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-title strong { flex:1 1 100%; font-size:13px; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-title span { font-size:10px; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-summary-actions {
    grid-column:2; grid-row:1; flex-direction:column-reverse; align-items:flex-end; gap:2px;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-sync-state { font-size:10px!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats:not(.hidden):not([hidden]) {
    grid-column:1/-1!important; grid-row:2!important; width:100%!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStats > div { padding:5px 7px!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-filterbar {
    display:grid!important; grid-template-columns:minmax(0,1fr) 52px 52px!important; gap:6px!important; padding:8px!important; margin-bottom:8px!important;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationKeyword { grid-column:1/-1!important; grid-row:auto!important; width:100%!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-scope:not(.hidden):not([hidden]) {
    grid-column:1/-1!important; grid-row:auto!important; display:grid!important; grid-template-columns:auto auto minmax(0,1fr)!important; width:100%!important; box-sizing:border-box;
  }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView .customer-qualification-scope > button { padding:0 6px!important; font-size:11px!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationCompanyFilter { grid-column:auto!important; grid-row:auto!important; width:100%!important; max-width:100%!important; padding:0 4px!important; font-size:11px!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationStatus { grid-column:1!important; grid-row:auto!important; width:100%!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationSearchBtn { grid-column:2!important; grid-row:auto!important; }
  body.customer-portal #customer#customer#customer#customer #customerQualificationsView #customerQualificationClearBtn { grid-column:3!important; grid-row:auto!important; }
}


#customerQuotesView { min-width: 0; }
#customerQuotesView .customer-quote-workspace { display: grid; gap: 16px; min-width: 0; }
#customerQuotesView .product-quote-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#customerQuotesView .product-quote-heading h2 { margin: 0 0 6px; font-size: 21px; }
#customerQuotesView .product-quote-heading p { margin: 0; color: #65768e; }
#customerQuotesView .product-quote-number { color: #65768e; white-space: nowrap; }
#customerQuotesView .customer-quote-workspace button { appearance: none; box-sizing: border-box; min-height: 38px; border: 1px solid #d7e0ed; border-radius: 8px; background: #fff; color: #42556f; padding: 8px 13px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; cursor: pointer; box-shadow: none; transition: background-color .15s, border-color .15s; }
#customerQuotesView .customer-quote-workspace button:hover:not(:disabled) { border-color: #95ace0; background: #f3f7ff; }
#customerQuotesView .customer-quote-workspace button.primary { border-color: #365de3; background: #365de3; color: #fff; }
#customerQuotesView .customer-quote-workspace button.primary:hover:not(:disabled) { border-color: #284dce; background: #284dce; }
#customerQuotesView .customer-quote-workspace button.danger { min-height: 32px; padding: 6px 10px; border-color: #f0d4d7; background: #fff5f5; color: #b82f37; }
#customerQuotesView .customer-quote-workspace button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
#customerQuotesView .customer-quote-workspace :is(button, input, textarea, select):focus-visible { outline: 2px solid #5278e9; outline-offset: 2px; }
#customerQuotesView .product-quote-controls { display: grid; grid-template-columns: minmax(160px, 220px) max-content; justify-content: start; align-items: end; gap: 18px; padding: 14px 16px; }
#customerQuotesView .product-quote-controls label { display: grid; gap: 7px; min-width: 0; font-size: 13px; color: #5b6e85; }
#customerQuotesView .product-quote-controls input { min-width: 0; width: 100%; height: 40px; box-sizing: border-box; border: 1px solid #d7e0ed; border-radius: 8px; padding: 0 10px; background: #fff; color: #263a56; font: inherit; font-size: 14px; }
#customerQuotesView .product-quote-row-count { display: flex; grid-column: auto; gap: 6px; align-items: center; height: 40px; white-space: nowrap; }
#customerQuotesView .product-quote-row-count > span { margin-right: 3px; font-size: 13px; color: #5b6e85; }
#customerQuotesView .product-quote-row-count button { min-width: 50px; min-height: 40px; padding: 6px 10px; }
#customerQuotesView .product-quote-row-count button.active { background: #eaf1ff; border-color: #7ba0fb; color: #2857d8; }
#customerQuotesView .product-quote-paste-panel { display: flex; gap: 14px; padding: 16px; }
#customerQuotesView .product-quote-paste-panel textarea { flex: 1; width: 100%; min-width: 0; resize: vertical; line-height: 1.6; }
#customerQuotesView .product-quote-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 14px 16px; }
#customerQuotesView .product-quote-summary > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#customerQuotesView .product-quote-summary strong { color: #2857d8; }
#customerQuotesView .product-quote-table-wrap { overflow-x: auto; }
#customerQuotesView .product-quote-table { border-collapse: collapse; }
#customerQuotesView .product-quote-table th { color: #52657f; background: #f6f8fc; }
#customerQuotesView .product-quote-table th, #customerQuotesView .product-quote-table td { padding: 11px 9px; border-bottom: 1px solid #e5ebf3; }
#customerQuotesView .product-quote-table select { display: block; min-width: 190px; max-width: 300px; margin-top: 7px; }
#customerQuotesView .product-quote-status { display: inline-block; border-radius: 6px; background: #fff3de; color: #a46405; padding: 4px 7px; font-size: 12px; }
#customerQuotesView .product-quote-status.matched { background: #e8f8ef; color: #18864b; }
#customerQuotesView .product-quote-status.error, #customerQuotesView .product-quote-status.missing, #customerQuotesView .product-quote-status.invalid-quantity { background: #fff0f0; color: #b82f37; }
#customerQuotesView .customer-quote-readonly-price { font-weight: 700; color: #ed5055; }
#customerQuotesView .customer-quote-warning { margin: 0; padding: 10px 16px; background: #fffbeb; color: #986409; font-size: 13px; }
#customerQuotesView .customer-quote-warning:empty { display: none; }
#customerQuotesView .customer-quote-limit-hint { display: block; margin-top: 6px; color: #8c6c1f; }
#customerQuotesView .customer-quote-storage-note { margin: 0; color: #7b899c; font-size: 12px; }
#customerQuotesView .over-limit { color: #bb3037 !important; }
body.customer-quote-modal-open { overflow: hidden; }
body.customer-quote-modal-open .main { overflow: hidden; }
#customerQuoteDialog.customer-quote-dialog { box-sizing: border-box; position: fixed; inset: auto; margin: 0; padding: 0; min-width: 0; max-width: none; min-height: 0; max-height: none; overflow: hidden; border: 1px solid #d1dcf0; border-radius: 14px; background: #fff; color: #1e2e49; box-shadow: 0 24px 80px #18294c38; transform: none; }
#customerQuoteDialog.customer-quote-dialog:not([open]) { display: none; }
#customerQuoteDialog.customer-quote-dialog[open] { display: flex; flex-direction: column; }
#customerQuoteDialog::backdrop { background: #1626454d; }
#customerQuoteDialog .customer-quote-dialog-titlebar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px 12px; background: #f6f8fd; border-bottom: 1px solid #e2e9f4; cursor: move; touch-action: none; user-select: none; }
#customerQuoteDialog .customer-quote-dialog-titlebar h3 { margin: 0 0 3px; color: #20314c; font-size: 17px; line-height: 1.4; }
#customerQuoteDialog .customer-quote-dialog-titlebar span { font-size: 11px; color: #7c899c; }
#customerQuoteDialog .customer-quote-window-actions, #customerQuoteDialog .customer-quote-export-actions { display: flex; align-items: center; gap: 8px; }
#customerQuoteDialog .customer-quote-dialog-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 16px; padding: 12px 18px; border-bottom: 1px solid #e2e9f4; background: #fff; }
#customerQuoteDialog .customer-quote-dialog-toolbar [role="status"] { min-width: 0; font-size: 12px; color: #667892; }
#customerQuoteDialog .customer-quote-dialog-scroll { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; background: #edf1f7; padding: 20px; }
#customerQuoteDialog button[hidden] { display: none; }
#customerQuoteDialog .customer-quote-window-actions button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
#customerQuoteDialog.is-maximized .customer-quote-dialog-titlebar { cursor: default; }
#customerQuoteDialog.is-dragging { user-select: none; }
#customerQuoteDialog .customer-quote-resize-handle { position: absolute; z-index: 2; touch-action: none; }
#customerQuoteDialog .customer-quote-resize-n { top: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
#customerQuoteDialog .customer-quote-resize-s { bottom: 0; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
#customerQuoteDialog .customer-quote-resize-e { right: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
#customerQuoteDialog .customer-quote-resize-w { left: 0; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
#customerQuoteDialog .customer-quote-resize-ne, #customerQuoteDialog .customer-quote-resize-nw, #customerQuoteDialog .customer-quote-resize-se, #customerQuoteDialog .customer-quote-resize-sw { width: 14px; height: 14px; }
#customerQuoteDialog .customer-quote-resize-ne { top: 0; right: 0; cursor: nesw-resize; }
#customerQuoteDialog .customer-quote-resize-nw { top: 0; left: 0; cursor: nwse-resize; }
#customerQuoteDialog .customer-quote-resize-se { right: 0; bottom: 0; cursor: nwse-resize; background: linear-gradient(135deg, transparent 58%, #9aaac3 59%, #9aaac3 66%, transparent 67%, transparent 77%, #9aaac3 78%, #9aaac3 85%, transparent 86%); }
#customerQuoteDialog .customer-quote-resize-sw { left: 0; bottom: 0; cursor: nesw-resize; }
#customerQuoteDialog.is-maximized .customer-quote-resize-handle { display: none; }
#customerQuotePaper { box-sizing: border-box; min-width: 730px; width: 100%; padding: 24px; border: 1px solid #e2e8f1; background: #fff; color: #172b4d; box-shadow: 0 3px 12px #223b5a0a; }
#customerQuotePaper h1 { margin: 0; text-align: center; font-size: 24px; }
#customerQuotePaper .quote-document-meta { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0; }
#customerQuotePaper table { border-collapse: collapse; width: 100%; min-width: 650px; }
#customerQuotePaper th, #customerQuotePaper td { border: 1px solid #dbe4ef; padding: 9px; text-align: center; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
#customerQuotePaper th { background: #f6f8fc; font-weight: 600; }
#customerQuotePaper footer { margin-top: 18px; text-align: right; font-size: 19px; font-weight: 700; }
@media (max-width: 600px) {
  #customerQuoteDialog.customer-quote-dialog { border-radius: 10px; }
  #customerQuoteDialog .customer-quote-dialog-titlebar { padding: 11px 12px; cursor: default; }
  #customerQuoteDialogHint, #customerQuoteMaximizeBtn, #customerQuoteDialog .customer-quote-resize-handle { display: none; }
  #customerQuoteDialog .customer-quote-dialog-toolbar { padding: 10px 12px; }
  #customerQuoteDialog .customer-quote-dialog-scroll { padding: 12px; }
  #customerQuoteDialog .customer-quote-export-actions { flex-wrap: wrap; }
  #customerQuotesView .product-quote-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  #customerQuotesView .product-quote-paste-panel { flex-direction: column; }
  #customerQuotesView .product-quote-paste-side { flex-direction: row; justify-content: space-between; align-items: center; }
  #customerQuotesView .product-quote-controls { grid-template-columns: minmax(130px, 210px) max-content; gap: 12px; padding: 12px; }
  #customerQuotesView .product-quote-summary > div { gap: 9px; }
}
@media (max-width: 420px) {
  #customerQuotesView .product-quote-controls { grid-template-columns: minmax(120px, 1fr) max-content; gap: 8px; }
  #customerQuotesView .product-quote-row-count > span { display: none; }
  #customerQuotesView .product-quote-row-count button { min-width: 44px; padding: 6px 8px; }
  #customerQuotesView .product-quote-paste-panel { padding: 12px; }
  #customerQuotesView .product-quote-paste-side { min-width: 0; gap: 8px; flex-wrap: wrap; }
  #customerQuotesView .product-quote-summary { padding: 12px; }
}

@media (max-width: 760px) {
  /* Keep batch quote entry compact while preserving the existing actions. */
  body.customer-portal #customer #customerQuotesView .customer-quote-workspace { gap: 7px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-heading { gap: 2px !important; padding: 0 1px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-heading h2 { margin: 0 !important; font-size: 17px !important; line-height: 22px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-heading p,
  body.customer-portal #customer #customerQuotesView .product-quote-number,
  body.customer-portal #customer #customerQuotesView .customer-quote-storage-note { font-size: 10px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-controls {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 6px !important;
    padding: 7px !important;
  }
  body.customer-portal #customer #customerQuotesView .product-quote-controls label { gap: 3px !important; font-size: 10px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-controls input,
  body.customer-portal #customer #customerQuotesView .product-quote-row-count,
  body.customer-portal #customer #customerQuotesView .product-quote-row-count button { height: 32px !important; min-height: 32px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-paste-panel { flex-direction: column !important; gap: 6px !important; padding: 7px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-paste-panel textarea { min-height: 104px !important; max-height: 150px !important; font-size: 11px !important; line-height: 1.45 !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-paste-side { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 6px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-summary { gap: 6px !important; padding: 7px !important; font-size: 11px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-summary > div { gap: 6px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-table-wrap { max-width: 100% !important; overflow-x: auto !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-table { min-width: 680px !important; font-size: 10px !important; }
  body.customer-portal #customer #customerQuotesView .product-quote-table th,
  body.customer-portal #customer #customerQuotesView .product-quote-table td { padding: 7px 6px !important; }
}


/* 国铁选品卡片共享视觉：管理端与客户端共用，仅客户端显示报备标签。 */
.railway-card-grid > .railway-product-card {
  min-height: 334px;
}

/* 兼容尚未刷新的旧卡片结构。 */
.railway-card-grid > .railway-product-card > .railway-card-topline,
.railway-card-grid > .railway-product-card .railway-card-primary-code > em {
  display: none !important;
}

.railway-card-grid > .railway-product-card .railway-card-image {
  height: 172px !important;
  flex: 0 0 172px;
  margin: 0 10px;
  padding: 3px;
}

.railway-card-grid > .railway-product-card .railway-card-image img {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center;
}

.railway-card-grid > .railway-product-card .railway-card-content {
  min-width: 0;
  min-height: 150px;
  padding: 5px 13px 9px;
}

/* 显式指定顺序，使旧客户端缓存也能把标题放在价格上方。 */
.railway-card-grid > .railway-product-card .railway-card-primary-code { order: 1; }
.railway-card-grid > .railway-product-card .railway-card-title { order: 2; }
.railway-card-grid > .railway-product-card .railway-card-commerce-row { order: 3; }
.railway-card-grid > .railway-product-card .railway-card-meta { order: 4; }
.railway-card-grid > .railway-product-card .railway-card-company-footer { order: 5; }
.railway-card-grid > .railway-product-card .railway-card-actions { order: 6; }

.railway-card-grid > .railway-product-card .railway-card-title {
  min-height: 36px;
  margin: 0 0 2px;
  font-size: 14px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
}

.railway-card-grid > .railway-product-card .railway-card-commerce-row {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 0 0 5px;
}

.railway-card-grid > .railway-product-card .railway-card-price {
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 管理端和客户端结算方式标签：与国铁商城价同一行并贴在价格行最右侧。 */
.railway-card-grid > .railway-product-card .railway-card-settlement-badge {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  margin-left: auto;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  padding: 2px 6px;
  border: 1px solid #b8d4ff;
  border-radius: 5px;
  color: #2f66b0;
  background: #eef5ff;
  font-size: 10px;
  font-weight: 750;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.railway-card-grid > .customer-railway-card .railway-card-settlement-deduction {
  border-color: #f4c58f;
  color: #a45d06;
  background: #fff7e8;
}

.railway-card-grid > .customer-railway-card .railway-card-settlement-refund {
  border-color: #a8dcca;
  color: #16735b;
  background: #ecfaf3;
}

.railway-card-grid > .railway-product-card .railway-card-meta {
  margin-top: auto;
}

.railway-card-grid > .railway-product-card .railway-card-meta > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.supply-status-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-right: 3px;
  padding: 1px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 16px;
}

.supply-status-badge.status-clearance {
  border-color: #d9c8ff;
  color: #6941c6;
  background: #f3efff;
}

.supply-status-badge.status-shortage {
  border-color: #f7c78f;
  color: #b45309;
  background: #fff7e8;
}

.supply-status-badge.status-stopped {
  border-color: #f2b8b5;
  color: #c2413a;
  background: #fff0ef;
}

.railway-card-grid > .railway-product-card .railway-card-company-footer {
  min-height: 24px;
}

.railway-card-grid > .customer-railway-card .railway-card-company-footer strong {
  flex: 1 1 auto;
}

.railway-card-grid > .customer-railway-card .customer-railway-report-button,
.railway-card-grid > .customer-railway-card .railway-card-report-tag {
  width: auto !important;
  min-width: 54px !important;
  height: 22px !important;
  min-height: 22px !important;
  flex: 0 0 auto;
  margin: 0 0 0 3px !important;
  padding: 0 7px !important;
  border: 1px solid #0e7f78 !important;
  border-radius: 6px !important;
  color: #fff !important;
  background: linear-gradient(135deg, #159b91, #087069) !important;
  box-shadow: 0 2px 6px rgba(8, 112, 105, .16) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 20px !important;
  white-space: nowrap;
}

.railway-card-grid > .customer-railway-card .customer-railway-report-button:hover:not(:disabled),
.railway-card-grid > .customer-railway-card .railway-card-report-tag:hover:not(:disabled) {
  background: linear-gradient(135deg, #19aaa0, #075f5a) !important;
  transform: translateY(-1px);
}

.railway-card-grid > .customer-railway-card .customer-railway-report-button:disabled,
.railway-card-grid > .customer-railway-card .railway-card-report-tag.is-disabled {
  border-color: #cbd2dc !important;
  color: #6f7b8d !important;
  background: #eef1f5 !important;
  box-shadow: none !important;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

@media (max-width: 780px) {
  .railway-card-grid > .railway-product-card {
    min-height: 266px;
  }

  .railway-card-grid > .railway-product-card .railway-card-image {
    height: 104px !important;
    flex-basis: 104px;
    margin-inline: 7px;
  }

  .railway-card-grid > .railway-product-card .railway-card-content {
    min-height: 154px;
    padding-inline: 10px;
  }
}

@media (max-width: 540px) {
  .railway-card-grid > .railway-product-card {
    min-height: 316px;
  }

  .railway-card-grid > .railway-product-card .railway-card-image {
    height: 150px !important;
    flex-basis: 150px;
    margin-inline: 10px;
  }

  .railway-card-grid > .railway-product-card .railway-card-settlement-badge {
    max-width: calc(100% - 4px);
    padding-inline: 4px;
    font-size: 10px;
  }
}

/* 税运提醒只跟随有效代发报价；没有提醒的卡片保持原价格行。 */
.railway-card-grid > .railway-product-card .railway-card-meta > .railway-card-meta-with-terms {
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 4px;
}
.railway-card-grid > .railway-product-card .railway-card-term-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 4px;
  border: 1px solid #f0b7bb;
  border-radius: 4px;
  background: #fff1f2;
  color: #c52839;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  white-space: nowrap;
}
.railway-card-grid > .railway-product-card .railway-card-profit-group {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
}
.railway-card-grid > .railway-product-card .railway-card-profit-group .railway-card-profit-label {
  flex: 0 0 auto;
  margin: 0;
}
.railway-card-grid > .railway-product-card .railway-card-meta-with-terms b {
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: visible;
}
/* 客户端紧凑卡片原有 nowrap 优先级较高，仅在出现提醒的行放开换行。 */
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div.railway-card-meta-with-terms {
  flex-wrap: wrap !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div > .railway-card-term-badge {
  line-height: 17px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div > .railway-card-profit-group {
  flex: 0 1 auto !important;
  margin-left: auto !important;
}

/* Store identity is an overlay: card dimensions and pagination stay unchanged. */
.railway-card-image { position:relative; overflow:hidden; }
.railway-shop-tag-corner { position:absolute; z-index:3; top:0; right:0; width:104px; height:104px; overflow:hidden; pointer-events:none; }
.railway-shop-tag-corner > span { position:absolute; top:23px; right:-37px; display:block; box-sizing:border-box; width:151px; padding:4px 0; transform:rotate(45deg); background:#2c86e8; color:#fff; font-size:12px; font-weight:600; line-height:1.4; text-align:center; white-space:nowrap; box-shadow:0 2px 5px #1858a124; }
.railway-shop-tag-inline { display:inline-flex; align-items:center; margin-left:6px; padding:2px 6px; border:1px solid #c9e0fc; border-radius:4px; background:#edf5ff; color:#2477ca; font-size:11px; line-height:1.4; white-space:nowrap; vertical-align:middle; }
@media(max-width:760px) { .railway-shop-tag-corner { width:88px; height:88px; } .railway-shop-tag-corner > span { top:18px; right:-39px; width:143px; font-size:11px; padding:3px 0; } }

/* Keep the existing new-product badge clear of the shop ribbon. */
.railway-card-image.has-shop-tag .customer-railway-new-badge { right:auto !important; left:8px !important; width:max-content !important; }

.railway-card-grid > .railway-product-card .railway-card-settlement-hint{color:#087f78;background:#eaf8f5;border-color:#b8e6df}


.customer-shop-tag-controls { display:grid; grid-template-columns:minmax(140px,1fr) auto; gap:10px 16px; align-items:end; margin-top:16px; padding-top:16px; border-top:1px solid #e2eaf7; }
.customer-shop-tag-controls label { display:grid; gap:8px; color:#657795; }
.customer-shop-tag-controls select { width:100%; }
.customer-shop-tag-controls small { grid-column:1 / -1; color:#7b8ba5; }
.railway-shop-tag-dialog { width:min(560px,calc(100vw - 24px)); max-height:85dvh; padding:20px; border:1px solid #dce6f6; border-radius:16px; color:#263b58; box-shadow:0 22px 70px #142c4a33; }
.railway-shop-tag-dialog::backdrop { background:#19334c55; }
.railway-shop-tag-dialog header { display:flex; gap:12px; justify-content:space-between; align-items:start; }
.railway-shop-tag-dialog h2 { margin:0 0 6px; font-size:20px; }
.railway-shop-tag-dialog p,.railway-shop-tag-dialog footer { margin:0; color:#7a8ba4; font-size:13px; }
.railway-shop-tag-dialog form { display:flex; gap:10px; margin:20px 0 10px; }
.railway-shop-tag-dialog form input { min-width:0; flex:1; }
.railway-shop-tag-dialog .railway-shop-tag-error { min-height:20px; color:#c34235; }
.railway-shop-tag-table { max-height:45dvh; overflow:auto; margin:6px 0 14px; }
.railway-shop-tag-dialog table { width:100% !important; min-width:0 !important; table-layout:fixed; border-collapse:collapse; }
.railway-shop-tag-dialog th,.railway-shop-tag-dialog td { padding:10px 6px; text-align:left; border-bottom:1px solid #e8eef7; }
.railway-shop-tag-dialog th,.railway-shop-tag-dialog td { min-width:0 !important; max-width:none; position:static !important; }
.railway-shop-tag-dialog th:nth-child(1),.railway-shop-tag-dialog td:nth-child(1) { width:38% !important; }
.railway-shop-tag-dialog th:nth-child(2),.railway-shop-tag-dialog td:nth-child(2) { width:20% !important; }
.railway-shop-tag-dialog th:nth-child(3),.railway-shop-tag-dialog td:nth-child(3) { width:42% !important; }
.railway-shop-tag-dialog th { color:#718198; font-size:13px; background:#f5f8fd; }
.railway-shop-tag-dialog td:last-child { white-space:nowrap; }
.railway-shop-tag-dialog td button { padding:5px 9px; margin-right:5px; }
.railway-shop-tag-dialog td input { width:110px; }


/* 商品查询卡片图片：移除已删除品牌留下的顶部空白，放大但不裁切商品。 */
.customer-product-card .customer-product-card-media {
  height: 190px;
  padding: 8px 10px;
}

.customer-product-card .customer-product-card-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

/* 京东链接使用固定小方标签；显式保护 SVG，避免全局隐藏规则只留下空框。 */
.customer-portal #customer .customer-product-card-jd-link {
  box-sizing: border-box;
  display: inline-grid;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  flex: 0 0 22px;
  place-items: center;
  padding: 0;
  border: 1px solid #f0b35b;
  border-radius: 6px;
  color: #d97706;
  background: #fff8eb;
  text-decoration: none;
}

.customer-portal #customer .customer-product-card-jd-link svg {
  display: block !important;
  visibility: visible !important;
  width: 12px;
  height: 12px;
  opacity: 1 !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.customer-portal #customer .customer-product-card-jd-link:hover {
  border-color: #dc8b1d;
  background: #ffefd1;
}

/* 手机仍维持紧凑的两列卡片，但释放原先预留给品牌的顶部空间。 */
@media (max-width: 760px) {
  #customerProductsView .customer-product-card .customer-product-card-media {
    height: 124px !important;
    padding: 4px 6px !important;
  }
}


/* Customer product list: keep the dense 14-column view calm and collision-free. */
#customer .customer-product-card-tags .customer-product-status {
  box-sizing: border-box;
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

#customer .customer-product-card-tags .customer-product-status.status-in-stock {
  border-color: #bfe9d7;
  color: #138a5b;
  background: #eaf9f2;
}

#customer .customer-product-card-tags .customer-product-status.status-producing,
#customer .customer-product-card-tags .customer-product-status.status-clearance {
  border-color: #d8c7ff;
  color: #7447c8;
  background: #f5f0ff;
}

#customer .customer-product-card-tags .customer-product-status.status-out-of-stock {
  border-color: #f7d7a2;
  color: #c57508;
  background: #fff6e7;
}

#customer .customer-product-card-tags .customer-product-status.status-discontinued {
  border-color: #ffc9c5;
  color: #d43b35;
  background: #fff0ef;
}

#customer #customerProductResult:not(.card-view) > .portal-product-table-wrap {
  background: #fff;
  scrollbar-color: #aab5c5 #eef2f7;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table {
  color: #5f6f86;
  font-size: 12px;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table thead th {
  height: 52px;
  padding: 0 12px;
  border-bottom: 1px solid #dfe6f0;
  color: #657289;
  background: #f6f8fc;
  box-shadow: 0 1px 0 rgba(28, 45, 75, .025);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .01em;
  vertical-align: middle;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td {
  height: 52px;
  padding: 0 12px;
  overflow: hidden;
  border-bottom: 1px solid #ebf0f6;
  color: #627188;
  background: #fff;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
  transition: color .12s ease, background-color .12s ease;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody tr:nth-child(even) td {
  background: #fcfdff;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody tr:hover td {
  color: #3f506a;
  background: #f3f7ff;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody tr:last-child td {
  border-bottom-color: transparent;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table td.portal-product-text,
#customer #customerProductResult:not(.card-view) .customer-product-list-table td.portal-product-note,
#customer #customerProductResult:not(.card-view) .customer-product-list-table td.portal-product-field-model {
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-text-value {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td.portal-product-field-brand {
  color: #34445c;
  font-weight: 680;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td.portal-product-field-product_name {
  color: #45556e;
  font-weight: 540;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td.portal-product-field-customer_price {
  color: #2459df;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -.01em;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td.portal-product-field-jd_price {
  color: #3862cd;
  font-size: 13px;
  font-weight: 760;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td.portal-product-image-cell {
  padding-right: 10px;
  padding-left: 10px;
  text-align: center;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-thumbnail,
#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-image-placeholder {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-thumbnail {
  border-color: #dfe6ef;
  background: #fff;
  object-fit: contain;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-image-placeholder {
  display: inline-grid;
  place-items: center;
  border: 1px dashed #d7e0eb;
  color: #98a6b8;
  background: #f8fafc;
  font-size: 15px;
  line-height: 1;
  vertical-align: middle;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-image-placeholder svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .product-status-badge {
  box-sizing: border-box;
  min-width: 46px;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  font-size: 11.5px;
  font-weight: 720;
  line-height: 1.2;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-link-icon {
  width: 28px;
  height: 28px;
  border-color: #c7d5f7;
  border-radius: 8px;
  color: #3564dc;
  background: #f2f6ff;
  box-shadow: 0 1px 2px rgba(42, 82, 175, .06);
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-link-icon:hover {
  border-color: #9eb5ee;
  background: #e8efff;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table [data-customer-product-full-text] {
  cursor: default;
}

#customer #customerProductResult:not(.card-view) .customer-product-list-table [data-customer-product-full-text]:focus-visible {
  outline: 2px solid rgba(55, 96, 213, .55);
  outline-offset: -3px;
  background: #f3f7ff;
}

#customer #customerProductResult:not(.card-view) > .customer-portal-pager {
  min-height: 50px;
  border-top-color: #e3e9f2;
  box-shadow: 0 -4px 14px rgba(31, 49, 82, .035);
}

/* The tooltip lives under body, so :has() keeps this visual override customer-list-only. */
body:has(#customer #customerProductResult:not(.empty)) > .portal-product-fast-tooltip {
  box-sizing: border-box;
  width: max-content;
  max-width: min(460px, calc(100vw - 24px)) !important;
  padding: 9px 12px;
  border: 1px solid #cbd7e7;
  border-radius: 9px;
  color: #34445d;
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 12px 32px rgba(25, 42, 72, .18), 0 2px 7px rgba(25, 42, 72, .08);
  font-size: 12px;
  font-weight: 540;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: normal;
  pointer-events: none;
}

@media (min-width: 761px) and (max-width: 1280px) {
  #customer #customerProductResult:not(.card-view) .customer-product-list-table col[data-product-col="product_attribute"],
  #customer #customerProductResult:not(.card-view) .customer-product-list-table col[data-product-col="note"],
  #customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-field-product_attribute,
  #customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-field-note {
    display: none;
  }
}

@media (max-width: 900px) {
  #customer #customerProductResult:not(.card-view) > .portal-product-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #customer #customerProductResult:not(.card-view) .customer-product-list-table {
    min-width: max(1120px, var(--portal-product-min-width, 960px));
  }

  #customer #customerProductResult:not(.card-view) .customer-product-list-table thead th,
  #customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #customer #customerProductResult:not(.card-view) .customer-product-list-table tbody td,
  #customer #customerProductResult:not(.card-view) .customer-product-list-table .portal-product-link-icon {
    transition: none;
  }
}


/* Customer order workspace: stable display schema, aligned columns and live status UI. */
:root {
  --customer-order-control-height: 36px;
  --customer-order-border: #d8e1ee;
  --customer-order-muted: #75839a;
  --customer-order-blue: #3563db;
}

#customerOrdersView .customer-result-bar {
  display: grid !important;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 44px !important;
  margin: 6px 0 !important;
}

#customerOrdersView .customer-result-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}

#customerOrdersView .customer-order-select-all,
#customerOrdersView .customer-result-actions > button,
#customerOrdersView .customer-order-view-switch {
  min-height: var(--customer-order-control-height) !important;
  height: var(--customer-order-control-height) !important;
  border: 1px solid #cfd9e8 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #43516a !important;
  box-shadow: 0 1px 2px rgba(31, 51, 82, .04) !important;
}

#customerOrdersView .customer-order-toolbar-control {
  height: var(--customer-order-control-height);
}

#customerOrdersView input.customer-order-toolbar-control {
  width: 16px !important;
  height: 16px !important;
}

#customerOrdersView .customer-order-select-all {
  padding: 0 12px !important;
  font-size: 13px !important;
  white-space: nowrap;
}

#customerOrdersView .customer-result-actions > button {
  padding: 0 14px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

#customerOrdersView .customer-order-view-switch {
  display: inline-flex !important;
  overflow: hidden !important;
}

#customerOrdersView .customer-order-view-switch button {
  min-width: 82px !important;
  height: 100% !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-right: 1px solid #d8e1ee !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #5c6980 !important;
  box-shadow: none !important;
}

#customerOrdersView .customer-order-view-switch button:last-child {
  border-right: 0 !important;
}

#customerOrdersView .customer-order-view-switch button.active {
  background: linear-gradient(135deg, #3971e5, #3e5fd5) !important;
  color: #fff !important;
}

body.customer-portal #customer #customerOrdersView #customerResult.customer-result:not(.empty) {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: calc(100dvh - 286px) !important;
  margin-top: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid var(--customer-order-border) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(36, 57, 91, .08) !important;
}

#customerOrdersView .customer-orders-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#customerOrdersView .customer-orders-table {
  width: max(100%, 1180px) !important;
  min-width: 1180px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
  color: #28364d !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
}

#customerOrdersView .customer-orders-table th,
#customerOrdersView .customer-orders-table td {
  box-sizing: border-box !important;
  height: 56px !important;
  padding: 8px 12px !important;
  overflow: hidden !important;
  border-right: 1px solid #eef2f7 !important;
  border-bottom: 1px solid #e8edf4 !important;
  line-height: 1.35 !important;
  vertical-align: middle !important;
  text-align: left !important;
}

#customerOrdersView .customer-orders-table th {
  position: sticky;
  z-index: 4;
  top: 0;
  height: 42px !important;
  padding-block: 7px !important;
  background: #f4f7fb !important;
  color: #42516a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-orders-table th:last-child,
#customerOrdersView .customer-orders-table td:last-child {
  border-right: 0 !important;
}

#customerOrdersView .customer-orders-table tbody tr:hover td {
  background: #f7faff !important;
}

#customerOrdersView .customer-orders-table tbody tr.is-selected td {
  background: #edf4ff !important;
}

#customerOrdersView .customer-orders-table .customer-order-select-cell {
  width: 44px !important;
  min-width: 44px !important;
  padding-inline: 13px 9px !important;
  text-align: center !important;
}

#customerOrdersView .customer-order-overflow,
#customerOrdersView .customer-order-product-brand,
#customerOrdersView .customer-order-recipient-cell small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#customerOrdersView .customer-order-overflow:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(53, 99, 219, .4);
  outline-offset: 2px;
}

#customerOrdersView .customer-order-product-brand,
#customerOrdersView .customer-order-recipient-cell small {
  margin-bottom: 3px;
  color: var(--customer-order-muted);
  font-size: 11px;
}

#customerOrdersView .customer-order-product-name,
#customerOrdersView .customer-order-model,
#customerOrdersView .customer-order-recipient {
  color: #202f47;
  font-weight: 750;
}

#customerOrdersView .customer-order-date {
  color: #4d5d75;
  font-variant-numeric: tabular-nums;
}

#customerOrdersView .customer-orders-table .customer-order-qty-head,
#customerOrdersView .customer-orders-table .customer-order-qty-cell {
  text-align: center !important;
}

#customerOrdersView .customer-order-qty-cell span {
  display: inline-flex;
  min-width: 32px;
  justify-content: center;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

#customerOrdersView .customer-order-logistics-cell {
  overflow: hidden !important;
}

#customerOrdersView .customer-logistics-display {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) 28px minmax(42px, max-content) !important;
  align-items: center !important;
  gap: 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#customerOrdersView .customer-logistics-display.logistics-multi-trigger {
  grid-template-columns: max-content minmax(0, 1fr) max-content !important;
}

#customerOrdersView .customer-logistics-display.customer-logistics-text-only {
  display: block !important;
}

#customerOrdersView .customer-logistics-number {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #31445e !important;
  font-weight: 750 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#customerOrdersView .logistics-company-chip {
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #eaf2ff !important;
  color: #3260c5 !important;
  font-size: 11px !important;
}

#customerOrdersView .customer-logistics-copy {
  display: inline-grid !important;
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid #d6e0ef !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #4667b8 !important;
}

#customerOrdersView .customer-logistics-track {
  width: auto !important;
  min-width: 42px !important;
  padding-inline: 6px !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

.customer-order-tooltip {
  position: fixed;
  z-index: 100020;
  width: max-content;
  max-width: min(440px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid #cbd8ea;
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 12px 30px rgba(26, 45, 76, .18);
  color: #24354f;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.customer-order-tooltip[hidden] {
  display: none !important;
}

#customerOrdersView .customer-order-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)) !important;
  gap: 8px !important;
  padding: 8px !important;
}

#customerOrdersView .customer-order-card {
  min-width: 0 !important;
  padding: 9px !important;
  border: 1px solid #dce4ef !important;
  border-radius: 11px !important;
  box-shadow: 0 4px 12px rgba(29, 48, 78, .05) !important;
}

#customerOrdersView .customer-order-card-select {
  top: 8px !important;
  left: 8px !important;
  width: 23px !important;
  height: 23px !important;
  border-radius: 6px !important;
}

#customerOrdersView .customer-order-card-select input {
  width: 14px !important;
  height: 14px !important;
}

#customerOrdersView .customer-order-card > header {
  min-height: 25px !important;
  align-items: center !important;
  gap: 5px !important;
  padding-left: 28px !important;
}

#customerOrdersView .customer-order-card-date {
  display: flex !important;
  min-width: 0 !important;
  align-items: baseline !important;
  gap: 4px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-date small {
  flex: 0 0 auto !important;
  color: #94a0b2 !important;
  font-size: 9px !important;
}

#customerOrdersView .customer-order-card-date time {
  display: grid !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: #53627a !important;
  font-size: clamp(9px, .72vw, 11px) !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  text-overflow: ellipsis !important;
}

#customerOrdersView .customer-order-card-date-day,
#customerOrdersView .customer-order-card-date-time {
  display: block !important;
  overflow: hidden !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-date-time {
  color: #8490a3 !important;
  font-size: .82em !important;
}

#customerOrdersView .customer-order-card > header .status-badge {
  flex: 0 0 auto !important;
  padding: 3px 6px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}

#customerOrdersView .customer-order-card-product {
  margin: 7px 0 6px !important;
}

#customerOrdersView .customer-order-card-product h3 {
  height: auto !important;
  margin: 0 !important;
  overflow: hidden !important;
  color: #1f2c43 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) max-content !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 5px !important;
  color: #69778e !important;
}

#customerOrdersView .customer-order-card-meta > span {
  display: flex !important;
  min-width: 0 !important;
  align-items: baseline !important;
  gap: 3px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-meta small {
  flex: 0 0 auto !important;
  color: #97a2b3 !important;
  font-size: 9px !important;
}

#customerOrdersView .customer-order-card-meta b {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #56657d !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
}

#customerOrdersView .customer-order-card-line {
  min-width: 0 !important;
  gap: 5px !important;
  padding: 5px 0 !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
}

#customerOrdersView .customer-order-card-line > span {
  flex: 0 0 auto !important;
}

#customerOrdersView .customer-order-card-line > strong {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-recipient {
  min-width: 0 !important;
  padding-top: 5px !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-recipient > span {
  margin-left: 5px !important;
  color: #66758d !important;
}

#customerOrdersView .customer-order-card-recipient p {
  min-height: 0 !important;
  margin: 3px 0 0 !important;
  overflow: hidden !important;
  color: #7c899c !important;
  font-size: 10px !important;
  line-height: 1.3 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-logistics {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) max-content !important;
  min-width: 0 !important;
  align-items: center !important;
  gap: 4px !important;
  margin-top: 6px !important;
  padding: 4px 5px !important;
  border: 1px solid #e4e9f1 !important;
  border-radius: 7px !important;
  background: #f7f9fc !important;
  white-space: nowrap !important;
}

#customerOrdersView .customer-order-card-logistics-label {
  color: #8591a4 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
}

#customerOrdersView .customer-card-logistics-summary {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 1fr) max-content !important;
  min-width: 0 !important;
  height: 23px !important;
  min-height: 23px !important;
  max-height: 23px !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 4px !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: #31435f !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

#customerOrdersView .customer-card-logistics-summary:hover {
  background: #edf3ff !important;
}

#customerOrdersView .customer-card-logistics-company,
#customerOrdersView .customer-card-logistics-state {
  padding: 2px 4px !important;
  border-radius: 999px !important;
  background: #eaf2ff !important;
  color: #3260c5 !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
}

#customerOrdersView .customer-card-logistics-number {
  min-width: 0 !important;
  overflow: hidden !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  font-variant-numeric: tabular-nums !important;
  text-overflow: ellipsis !important;
}

#customerOrdersView .customer-card-logistics-state {
  background: #edf7f3 !important;
  color: #16805c !important;
}

#customerOrdersView .customer-card-logistics-empty {
  min-width: 0 !important;
  overflow: hidden !important;
  color: #8b96a7 !important;
  font-size: 10px !important;
  text-overflow: ellipsis !important;
}

#customerOrdersView .customer-card-logistics-copy {
  display: inline-grid !important;
  width: 23px !important;
  min-width: 23px !important;
  height: 23px !important;
  min-height: 23px !important;
  max-height: 23px !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid #d4deee !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #4166ba !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

#customerOrdersView .customer-card-logistics-copy.copied {
  border-color: #9fd5c2 !important;
  background: #eaf8f2 !important;
  color: #12805a !important;
}

#customerOrdersView .customer-order-card-company {
  margin-top: 5px !important;
  padding-bottom: 0 !important;
}

/* Keep list and card status colors byte-for-byte aligned with the management palette. */
#customerOrdersView .status-badge.status-confirm {
  border-color: #c6d7f5;
  background: #edf4ff;
  color: #2457b6;
}

#customerOrdersView .status-badge.status-pending {
  border-color: #efd5a7;
  background: var(--amber-soft);
  color: #99560a;
}

#customerOrdersView .status-badge.status-shipped {
  border-color: #bdd1f8;
  background: #e8f1ff;
  color: #1758c7;
}

#customerOrdersView .status-badge.status-complete {
  border-color: #b9dfd0;
  background: var(--green-soft);
  color: #0e6c4c;
}

#customerOrdersView .status-badge.status-processing {
  border-color: #cbd3de;
  background: #f1f4f8;
  color: #46576e;
}

#customerOrdersView .status-badge.status-cancelled {
  border-color: #efc3c3;
  background: var(--red-soft);
  color: #ad3030;
}

#customerOrdersView .customer-portal-pager {
  position: sticky !important;
  z-index: 5 !important;
  bottom: 0 !important;
  flex: 0 0 auto !important;
  min-height: 54px !important;
  margin: 0 !important;
  border-top: 1px solid #dfe6f0 !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 -5px 16px rgba(33, 53, 84, .05) !important;
}

@media (max-width: 1100px) {
  #customerOrdersView .customer-result-bar {
    grid-template-columns: 1fr !important;
  }
  #customerOrdersView #customerSummary {
    justify-content: start !important;
  }
}

@media (max-width: 720px) {
  #customerOrdersView .customer-result-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  #customerOrdersView .customer-result-actions > * {
    flex: 0 0 auto;
  }
  body.customer-portal #customer #customerOrdersView #customerResult.customer-result:not(.empty) {
    max-height: calc(100dvh - 300px) !important;
  }
  #customerOrdersView .customer-order-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    padding: 5px !important;
  }
  #customerOrdersView .customer-order-card {
    padding: 7px !important;
    border-radius: 9px !important;
  }
  #customerOrdersView .customer-order-card-select {
    top: 6px !important;
    left: 6px !important;
    width: 21px !important;
    height: 21px !important;
  }
  #customerOrdersView .customer-order-card > header {
    padding-left: 25px !important;
  }
  #customerOrdersView .customer-order-card-date small {
    display: none !important;
  }
  #customerOrdersView .customer-order-card-date time {
    font-size: 8px !important;
  }
  #customerOrdersView .customer-order-card-product h3 {
    font-size: 11px !important;
  }
  #customerOrdersView .customer-order-card-meta {
    gap: 3px !important;
  }
  #customerOrdersView .customer-order-card-meta > span {
    display: block !important;
  }
  #customerOrdersView .customer-order-card-meta small,
  #customerOrdersView .customer-order-card-meta b {
    display: block !important;
    font-size: 8px !important;
  }
  #customerOrdersView .customer-order-card-logistics {
    gap: 3px !important;
    padding-inline: 3px !important;
  }
  #customerOrdersView .customer-card-logistics-summary {
    gap: 2px !important;
    padding-inline: 2px !important;
  }
  #customerOrdersView .customer-card-logistics-company,
  #customerOrdersView .customer-card-logistics-state {
    padding-inline: 3px !important;
    font-size: 8px !important;
  }
  #customerOrdersView .customer-card-logistics-number {
    font-size: 9px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card {
    padding: 7px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card-select {
    top: 6px !important;
    right: auto !important;
    left: 6px !important;
    width: 21px !important;
    height: 21px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card-select input {
    width: 14px !important;
    height: 14px !important;
    margin: 0 !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card > header {
    padding-right: 0 !important;
    padding-left: 25px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card-product {
    margin: 7px 0 6px !important;
    padding: 0 !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card-product h3 {
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card-recipient p {
    display: block !important;
    overflow: hidden !important;
    -webkit-line-clamp: unset !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-order-card-logistics {
    padding: 4px 3px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-card-logistics-summary {
    width: auto !important;
    min-width: 0 !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-card-logistics-copy {
    width: 23px !important;
    min-width: 23px !important;
    height: 23px !important;
    min-height: 23px !important;
    max-height: 23px !important;
  }
}

@media (max-width: 360px) {
  #customerOrdersView .customer-order-card-date-year {
    display: none !important;
  }
}
/* Completed-return quantities are current sales, with source evidence kept compact. */
.customer-order-return-note {
  display: block;
  margin-top: 3px;
  color: #7b89a5;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}


/* Customer railway catalog: desktop viewport workspace.
 * The filter and pager stay in place while only the card grid scrolls.
 * Mobile keeps the existing natural document flow. */

/* Scoped final layer: no catalog rule can change admin filters or other tabs. */
body.customer-portal #customer#customer #customerRailwayProductsView > .customer-railway-filter {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 12px !important;
  border-radius: 12px !important;
  overflow: visible !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main {
  display: grid !important;
  min-width: 0 !important;
  grid-template-columns: 88px minmax(180px, 1fr) 146px 112px 76px 68px !important;
  gap: 8px !important;
  align-items: center !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main > * {
  display: block !important;
  position: static !important;
  inset: auto !important;
  width: 100% !important;
  grid-column: auto !important;
  grid-row: auto !important;
  transform: none !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main > *,
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-summary > .customer-railway-facet,
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-own-shop-filter {
  box-sizing: border-box !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  line-height: 1.3 !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main > input:first-child {
  grid-column: auto !important;
  width: 100% !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-sort-direction {
  white-space: nowrap !important;
  border: 1px solid #c6dcd9 !important;
  color: #087d76 !important;
  background: #f0faf9 !important;
  box-shadow: none !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-sort-direction:disabled {
  color: #7b8898 !important;
  border-color: #dce3ec !important;
  background: #f6f8fb !important;
  opacity: 1 !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-summary {
  display: flex !important;
  min-width: 0 !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid #edf1f6 !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-summary > .customer-railway-facet {
  width: 130px !important;
  flex: 0 1 130px !important;
  border: 1px solid #dce4ef !important;
  color: #304660 !important;
  background: #f9fbfe !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-own-shop-filter {
  flex: 0 0 auto !important;
  font-weight: 650 !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  flex: 0 0 210px !important;
  height: 36px !important;
  min-height: 36px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 4px 0 0 !important;
  overflow: hidden !important;
  border: 1px solid #dce4ef !important;
  border-radius: 8px !important;
  background: #f9fbfe !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range:focus-within {
  border-color: #7a9ff0 !important;
  box-shadow: 0 0 0 2px rgba(63, 112, 232, .1) !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-profit-range { flex-basis: 248px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-advanced-ranges { display:flex; flex-wrap:wrap; gap:8px; min-width:0; }

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > span {
  padding: 0 8px !important;
  color: #53677f !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range small { color: #8190a4 !important; font-size: 11px !important; }

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > input {
  box-sizing: border-box !important;
  width: 0 !important;
  flex: 1 1 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  color: #20364f !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12px !important;
  text-align: center !important;
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > input::-webkit-inner-spin-button,
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > input::-webkit-outer-spin-button {
  margin: 0 !important;
  -webkit-appearance: none !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > i { flex: 0 0 auto !important; color: #b1bccb !important; }

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters { flex: 0 0 auto !important; min-width: 0 !important; }

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters > summary {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: fit-content !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  border: 1px solid #dce4ef !important;
  border-radius: 8px !important;
  color: #52667f !important;
  background: #fff !important;
  list-style: none !important;
  cursor: pointer !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters > summary::-webkit-details-marker { display: none !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters > summary::after { content: "⌄" !important; font-size: 14px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters[open] { flex: 1 1 100% !important; order: 10 !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters[open] > summary { color: #176a83 !important; border-color: #bddee5 !important; background: #f1f9fc !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters[open] > summary::after { content: "⌃" !important; }

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-content {
  display: grid !important;
  gap: 9px !important;
  margin-top: 8px !important;
  padding: 12px !important;
  border: 1px solid #e4eaf3 !important;
  border-radius: 9px !important;
  background: #f8fbff !important;
}

body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 8px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row > strong { flex: 0 0 78px !important; color: #607188 !important; font-size: 12px !important; font-weight: 600 !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row > button {
  min-height: 30px !important;
  margin: 0 !important;
  padding: 4px 10px !important;
  border: 1px solid #dce5f2 !important;
  border-radius: 6px !important;
  color: #455f80 !important;
  background: #fff !important;
  box-shadow: none !important;
  font-size: 12px !important;
}
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row > button:hover,
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row > button[aria-pressed="true"] { color: #1d5bd6 !important; border-color: #99b7f1 !important; background: #eef4ff !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-checkboxes > label { display: inline-flex !important; align-items: center !important; gap: 6px !important; min-height: 30px !important; margin: 0 8px 0 0 !important; color: #435970 !important; font-size: 12px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-checkboxes input { width: 15px !important; height: 15px !important; min-height: 0 !important; margin: 0 !important; accent-color: #1f79b3 !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-content > p { margin: 0 !important; color: #7e8ba0 !important; font-size: 11px !important; line-height: 1.6 !important; }

/* Basket actions share the result-count area; no detached third toolbar. */
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-actions {
  display: flex !important;
  flex: 0 1 auto !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: auto !important;
}
body.customer-portal #customer#customer #customerRailwayBasketTools {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
body.customer-portal #customer#customer #customerRailwayBasketTools button {
  flex: 0 0 auto !important;
  width: auto !important;
  padding: 4px 8px !important;
  white-space: nowrap !important;
}
body.customer-portal #customer#customer #customerRailwayResultSummary { min-width: 0 !important; margin-left: 0 !important; color: #62768e !important; font-size: 12px !important; white-space: normal !important; overflow-wrap: anywhere !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-info { width: 28px !important; min-width: 28px !important; height: 30px !important; min-height: 30px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; color: #899ab0 !important; background: transparent !important; box-shadow: none !important; font-size: 17px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-active-filters { display: flex !important; flex-wrap: wrap !important; align-items: center !important; gap: 6px !important; padding-top: 2px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-active-filters > button { display: inline-flex !important; align-items: center !important; gap: 6px !important; max-width: 100% !important; min-height: 28px !important; margin: 0 !important; padding: 3px 9px !important; border: 1px solid #d7e4fb !important; border-radius: 6px !important; color: #3c66a2 !important; background: #f0f5ff !important; box-shadow: none !important; font-size: 12px !important; overflow-wrap: anywhere !important; text-align: left !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-error { padding: 8px 10px !important; border: 1px solid #f0d4ba !important; border-radius: 7px !important; color: #a35419 !important; background: #fff7ec !important; font-size: 12px !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter [hidden] { display: none !important; }
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter :is(button, input, select, summary):focus-visible { outline: 2px solid #568bed !important; outline-offset: 2px !important; }

/* Compact customer cards use natural rows, not a fixed height budget. Keep
 * a minimum readable card width so codes, prices and both actions fit. */
body.customer-portal #customer#customer #customerRailwayProductGrid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important;
  grid-auto-rows: max-content !important;
  align-content: start !important;
  align-items: stretch !important;
  gap: 12px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid > .customer-railway-card {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-image {
  height: 164px !important;
  min-height: 164px !important;
  max-height: 164px !important;
  flex: 0 0 164px !important;
  margin: 0 8px !important;
  padding: 3px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transform: none !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-image > .supply-status-badge {
  position: absolute !important;
  top: 6px !important;
  left: 0 !important;
  z-index: 2 !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-content {
  display: flex !important;
  flex: 1 0 auto !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 6px 10px 9px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-content > * { flex-shrink: 0 !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-primary-code {
  height: auto !important;
  min-height: 22px !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 4px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-code-line { gap: 4px !important; align-items: center !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-code-line small { font-size: 9px !important; line-height: 20px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-primary-code strong {
  flex: 1 1 auto !important;
  font-size: 12px !important;
  line-height: 20px !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  overflow: visible !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-code-copy {
  flex: 0 0 20px !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-title {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  margin: 0 0 4px !important;
  overflow: hidden !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 17px !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-commerce-row { min-height: 27px !important; margin: 0 0 4px !important; gap: 4px !important; flex-wrap: wrap !important; overflow: visible !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-price { font-size: 20px !important; line-height: 27px !important; font-weight: 800 !important; letter-spacing: -.3px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-price small { font-size: 11px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-train { display: inline-flex !important; flex: 0 0 15px !important; width: 15px !important; height: 15px !important; margin-right: 3px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-settlement-badge { flex: 0 0 auto !important; font-size: 10px !important; padding: 1px 4px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-settlement-deduction { padding-inline: 0 !important; border: 0 !important; color: #3e6d5b !important; background: transparent !important; font-weight: 600; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-settlement-deduction > strong { font-weight: 750; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta { margin-top: auto !important; min-height: 19px !important; font-size: 10px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 3px !important;
  align-items: baseline !important;
  white-space: nowrap !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div > :is(span, b) { flex: 0 0 auto !important; min-width: 0 !important; margin: 0 !important; line-height: 19px !important; }
/* Only exceptional long numeric values wrap inside their own field. Never
 * truncate an amount/negative ratio or force a different financial value. */
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div > b { flex: 0 1 auto !important; white-space: normal !important; overflow-wrap: anywhere !important; overflow: visible !important; text-overflow: clip !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-meta > div > .railway-card-profit-label { margin-left: auto !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  min-height: 29px !important;
  max-height: none !important;
  gap: 4px !important;
  margin: 5px 0 0 !important;
  padding: 5px 0 0 !important;
  overflow: visible !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > span { font-size: 9px !important; }
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > strong { min-width: 0 !important; flex: 1 1 0 !important; font-size: 9px !important; white-space: nowrap !important; text-overflow: ellipsis !important; overflow: hidden !important; }
/* Match the code-copy control visually; phone layout keeps a larger hit area. */
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > :is(.railway-card-company-link, .railway-card-report-tag, .customer-railway-basket-toggle) {
  --railway-action-bg: #f1f7f6;
  --railway-action-border: #c6dcd7;
  --railway-action-color: #47776f;
  display: inline-grid !important;
  place-items: center !important;
  box-sizing: border-box !important;
  flex: 0 0 20px !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--railway-action-border) !important;
  border-radius: 5px !important;
  color: var(--railway-action-color) !important;
  background: var(--railway-action-bg) !important;
  box-shadow: none !important;
  transform: none !important;
  font-size: 15px !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > .customer-railway-basket-toggle[aria-pressed="true"] {
  --railway-action-bg: #ddeee9;
  --railway-action-border: #8cb9ad;
  --railway-action-color: #245f52;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > :is(.railway-card-company-link, .railway-card-report-tag, .customer-railway-basket-toggle):is(.missing, :disabled) {
  --railway-action-bg: #f3f5f4;
  --railway-action-border: #dce3e0;
  --railway-action-color: #a3ada8;
  cursor: not-allowed !important;
}
body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > :is(.railway-card-company-link, .railway-card-report-tag) svg {
  width: 12px !important;
  height: 12px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.customer-portal #customer#customer #customerRailwayProductGrid :is(button, a):focus-visible { outline: 2px solid #247ee7 !important; outline-offset: 2px !important; }

@media (max-width: 760px) {
  body.customer-portal #customer#customer #customerRailwayProductGrid > .customer-railway-card,
  body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-company-footer > :is(button, a) { scroll-margin-bottom: 72px !important; }
  body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-image { height: 150px !important; min-height: 150px !important; max-height: 150px !important; flex-basis: 150px !important; }
  body.customer-portal #customer#customer #customerRailwayProductGrid .railway-card-report-tag { min-width: 44px !important; height: 44px !important; min-height: 44px !important; }
  body.customer-portal #customer#customer #customerRailwayProductGrid .customer-railway-basket-toggle { width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main { grid-template-columns:80px minmax(0, 1fr) 124px 94px 64px 60px !important; gap: 6px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-summary { gap: 6px !important; }
}

@media (max-width: 760px) {
  /* The expanded filter can exceed a phone viewport. Keep it in document
   * flow instead of inheriting the old short, sticky mobile search strip. */
  body.customer-portal #customer#customer #customerRailwayProductsView#customerRailwayProductsView > .customer-railway-filter {
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }
  body.customer-portal #customer#customer #customerRailwayProductsView > .customer-railway-filter { padding: 10px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main > input:first-child { grid-column: 1 / -1 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main > *,
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-summary > .customer-railway-facet,
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-own-shop-filter,
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range { height: 44px !important; min-height: 44px !important; font-size: 14px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-summary > .customer-railway-facet { flex: 1 1 calc(50% - 8px) !important; width: 0 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-own-shop-filter { flex: 1 1 100% !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range { flex: 1 1 100% !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > span { flex: 0 0 110px !important; padding-left: 10px !important; box-sizing: border-box !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-range > input { font-size: 14px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-filters > summary,
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row > button,
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-checkboxes > label,
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-active-filters > button { min-height: 44px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-quick-row > strong { flex-basis: 100% !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-checkboxes > label { flex-basis: 100% !important; margin: 0 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-content { padding: 10px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-more-content > p { font-size: 12px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-info { min-width: 44px !important; width: 44px !important; height: 44px !important; min-height: 44px !important; }
}

@media (min-width: 761px) {
  body.customer-portal #customer.customer-railway-products-active:not(.portal-locked) {
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer.customer-railway-products-active > .customer-unified-header {
    flex: 0 0 auto !important;
  }

  body.customer-portal #customer #customerRailwayProductsView:not(.hidden) {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer#customer #customerRailwayProductsView > .customer-railway-filter {
    flex: 0 0 auto !important;
    max-height: min(55dvh, 450px) !important;
    overflow: auto !important;
    overscroll-behavior: contain;
  }

  body.customer-portal #customer #customerRailwayProductGrid {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: auto !important;
    align-content: start !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.customer-portal #customer #customerRailwayPager {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    margin: 2px 0 0 !important;
  }
}

/* Customer pass center: keep the selected flow in one readable summary and
 * show every mode-specific node without an inner scrollbar. */
body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  min-width: 0;
  margin-bottom: 9px;
  padding: 0 2px 8px;
  border-bottom: 1px solid #e7edf5;
  color: #526277;
  font-size: 12px;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-identity {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex: 1 1 260px;
  min-width: 0;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-identity strong {
  flex: 0 0 auto;
  color: #213451;
  font-size: 13px;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-identity span {
  min-width: 0;
  overflow: hidden;
  color: #42536d;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-mode {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #2756a8;
  font-weight: 750;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-stage,
body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-actor {
  flex: 0 0 auto;
  font-weight: 650;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-next {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-summary > small {
  margin-left: auto;
  color: #8190a5;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-track {
  box-sizing: border-box;
  grid-template-columns: repeat(var(--pass-node-count), minmax(0, 1fr));
  min-width: 0 !important;
  width: 100%;
  row-gap: 14px;
}

/* In a short workspace the page, not the complete flow summary, scrolls. */
body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwaySelectedFlow.customer-pass-flow-panel {
  flex: 0 0 auto !important;
  max-height: none !important;
  overflow: visible !important;
}
body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwayManagementView .customer-railway-step-button {
  scroll-margin-block: 12px;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-node {
  min-width: 0;
  padding: 0 2px;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-node strong {
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-node small {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* The active node's action badge needs space above each wrapped row. */
@media (max-width: 1280px) {
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-track {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    row-gap: 44px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-node:nth-child(5n + 1)::before {
    display: none;
  }
}

@media (max-width: 760px) {
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-summary {
    align-items: baseline;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-identity {
    flex-basis: 100%;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-next {
    flex-basis: 100%;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-node:nth-child(5n + 1)::before {
    display: block;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow .shared-pass-progress-node:nth-child(2n + 1)::before {
    display: none;
  }

  /* Phone only: one scrollable track; desktop keeps the original full flow. */
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow {
    min-width: 0;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-identity {
    display: flex; align-items: center; gap: 7px; min-width: 0; margin-bottom: 5px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-identity strong {
    flex: none; color: #213451; font-size: 12px; white-space: nowrap;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-identity > span:not(.customer-pass-void-stamp) {
    flex: 1; min-width: 0; overflow: hidden; color: #64748b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-void-stamp {
    flex: none; margin: 1px 2px; padding: 1px 5px; font-size: 11px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-context {
    display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 27px; color: #526277; font-size: 11px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-context > span {
    flex: none; color: #37639a; font-size: 10px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-context > strong {
    flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-context > button {
    flex: none; min-height: 32px; padding: 5px 7px; font-size: 10px; white-space: nowrap;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-flow-scroll {
    box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; height: 72px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-track {
    grid-template-columns: repeat(var(--pass-node-count), 54px) !important; column-gap: 2px; row-gap: 0;
    width: max-content; min-width: max-content !important; height: 60px; padding: 2px !important;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-node {
    box-sizing: border-box; width: 54px; min-height: 56px; padding: 6px 0; gap: 4px; align-content: start;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-dot {
    box-sizing: border-box; width: 24px; height: 24px; border-width: 2px; font-size: 11px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-node > strong {
    max-width: 54px; font-size: 12px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-node > small,
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-node-action {
    display: none;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-node::before {
    top: 18px; height: 2px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-node:not(:first-child)::before {
    display: block;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .shared-pass-progress-node:first-child::before {
    display: none;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-flow-hint {
    display: block; color: #8795a8; font-size: 10px; line-height: 15px;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-reason {
    display: block; box-sizing: border-box; width: 100%; min-height: 28px; margin: 3px 0; padding: 4px 0; overflow: hidden;
    border: 0; background: transparent; color: #9f4d45; font-size: 11px; line-height: 20px; text-align: left; text-overflow: ellipsis; white-space: nowrap;
  }
  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-phone-flow .customer-pass-phone-flow-toggle {
    min-height: 32px; padding: 4px 0; border: 0; background: transparent; color: #37639a; font-size: 11px;
  }
}

/* The list owns scrolling; each pass card uses the core facts needed to
 * choose a record. Detailed terms and evidence stay in the process dialog. */
body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view .customer-railway-report-card {
  box-sizing: border-box;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 10px 12px !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-report-card > header {
  min-height: 22px;
  gap: 6px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-report-card h3 {
  margin: 6px 0 4px;
  font-size: 14px;
  line-height: 1.3;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-related {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding-bottom: 6px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-related small {
  flex: 0 0 auto;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-related strong {
  min-width: 0;
}

body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view .customer-railway-report-card dl.customer-railway-card-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px 10px;
  margin: 7px 0 !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-summary > .is-product,
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-summary > .is-stage {
  grid-column: 1 / -1;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-summary dt {
  font-size: 10px;
  line-height: 1.2;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-summary dd {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.3;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-summary dd.is-money {
  overflow: visible;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-card-summary .customer-railway-report-stage {
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.25;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-report-card > footer {
  min-height: 30px;
  padding-top: 6px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-report-card .customer-railway-step-button {
  min-width: 82px;
  min-height: 32px;
  padding: 4px 9px;
  font-size: 12px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-report-card.is-completed::after {
  display: none;
}

@media (max-width: 1439px) {
  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 1199px) {
  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Reporting dialogs live directly under body, outside the portal's #customer
 * control styles. Keep a complete, local control contract here, after the
 * historical r123 baseline. Only the content pane may scroll vertically. */
body.customer-portal #customerRailwayReportDialog.customer-railway-report-dialog {
  box-sizing: border-box;
  width: 920px !important;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px) !important;
  max-height: calc(100dvh - 24px) !important;
  padding: 0;
  overflow: hidden !important;
  border: 1px solid #d5e1ed;
  border-radius: 12px;
  background: #fff;
  color: #20324a;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  box-shadow: 0 18px 56px rgba(21, 43, 68, .24);
}

body.customer-portal #customerRailwayReportDialog.customer-railway-report-dialog.is-batch-report {
  width: 1440px !important;
}

body.customer-portal #customerRailwayReportDialog > .customer-railway-report-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

body.customer-portal #customerRailwayReportDialog > form > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 7px 12px;
  border-bottom: 1px solid #e4ebf2;
  background: #f8fbfd;
  cursor: move;
  touch-action: none;
  user-select: none;
}

body.customer-portal #customerRailwayReportDialog > form > header > strong {
  min-width: 0;
  color: #173b51;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

body.customer-portal #customerRailwayReportDialog :is(button, input, select, textarea) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  font: inherit;
}

body.customer-portal #customerRailwayReportDialog button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #ccdae8;
  border-radius: 6px;
  background: #fff;
  color: #39536c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  box-shadow: none;
}

body.customer-portal #customerRailwayReportDialog button:hover:not(:disabled) {
  border-color: #78acae;
  background: #eff8f8;
}

body.customer-portal #customerRailwayReportDialog button:disabled {
  opacity: .46;
  cursor: not-allowed;
}

body.customer-portal #customerRailwayReportDialog :is(button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #4b9ba5;
  outline-offset: 2px;
}

body.customer-portal #customerRailwayReportDialog > form > header > button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-report-window-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

body.customer-portal #customerRailwayReportDialog .customer-railway-report-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-height: none !important;
  padding: 9px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.customer-portal #customerRailwayReportDialog .customer-railway-report-body :is(input, select) {
  height: 32px;
  min-height: 32px;
  padding: 3px 7px;
  border: 1px solid #d3deea;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  line-height: 1.35;
}

body.customer-portal #customerRailwayReportDialog .customer-railway-report-body input[readonly] {
  background: #f5f8fb;
  color: #66758a;
}

body.customer-portal #customerRailwayReportDialog .customer-railway-report-body :is(legend, label > span) {
  margin-bottom: 3px;
  font-size: 11px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-party {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 6px 9px;
  margin-bottom: 6px;
}

body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) .customer-report-party {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 12px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-modes button {
  flex-direction: row;
  gap: 8px;
  min-height: 38px;
  padding: 5px 9px;
  border-radius: 7px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-modes button strong {
  font-size: 13px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-modes button span {
  font-size: 11px;
}

/* Read-only identity is a compact overview, not six editable-looking fields.
 * Retained inputs preserve copy/selection and the existing value contract. */
body.customer-portal #customerRailwayReportDialog .customer-report-product-overview {
  min-width: 0;
  margin: 7px 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.customer-portal #customerRailwayReportDialog .customer-report-product-overview dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  min-width: 0;
  margin: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-report-product-overview dl > div {
  min-width: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-report-product-overview .is-wide {
  grid-column: span 2;
}

body.customer-portal #customerRailwayReportDialog .customer-report-product-overview dt {
  margin: 0 0 3px;
  color: #718398;
  font-size: 11px;
  line-height: 1.35;
}

body.customer-portal #customerRailwayReportDialog .customer-report-product-overview dd {
  min-width: 0;
  margin: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-report-product-overview input[readonly] {
  display: block;
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 3px 7px;
  border: 1px solid #d3deea;
  border-radius: 6px;
  background: #f5f8fb;
  color: #66758a;
  font-size: 12px;
  font-weight: 400;
  text-overflow: ellipsis;
}

body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) .customer-report-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
  margin-bottom: 6px;
}

body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) .customer-report-calculation-grid {
  grid-column: auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 12px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 15px;
  min-width: 0;
  margin: 7px 0;
  padding: 7px 10px;
  border-radius: 7px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-summary > div {
  min-width: 0;
  gap: 8px;
  padding: 2px 0;
}

body.customer-portal #customerRailwayReportDialog .customer-report-summary strong {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-report-formula {
  display: block;
  min-width: 0;
  margin: -3px 0 7px;
  padding: 0 2px;
  color: #75899c;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  grid-column: 1 / -1;
}

body.customer-portal #customerRailwayReportDialog .customer-report-project-hint {
  margin-top: 2px;
  font-size: 10px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-project-popup {
  z-index: 12;
}

body.customer-portal #customerRailwayReportDialog .customer-report-project-status {
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.35;
}

body.customer-portal #customerRailwayReportDialog #queryReportProjects {
  min-height: 0;
  max-height: 200px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.customer-portal #customerRailwayReportDialog .customer-report-project-option {
  min-height: 32px;
  padding: 6px 8px;
}

body.customer-portal #customerRailwayReportDialog .customer-report-project-option strong {
  font-size: 12px;
}

body.customer-portal #customerRailwayReportDialog [hidden] {
  display: none !important;
}

body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-railway-report-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-railway-report-body > .customer-report-party {
  flex: 0 0 auto;
  margin: 0;
}

body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-railway-report-body > fieldset,
body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-report-product-overview,
body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-report-grid,
body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-report-party:has(#queryReportActualFunder),
body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-report-summary,
body.customer-portal #customerRailwayReportDialog.is-batch-report .customer-report-formula,
body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) :is(#queryReportBatchPanel, #queryReportBatchTotals, #queryReportBatchPreviewBtn) {
  display: none !important;
}

body.customer-portal #customerRailwayReportDialog #queryReportBatchPanel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

body.customer-portal #customerRailwayReportDialog #queryReportBatchItems {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company {
  min-width: 0;
  margin-bottom: 8px;
  overflow: visible;
  border: 1px solid #dce6ef;
  border-radius: 7px;
  background: #fff;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company:last-child {
  margin-bottom: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 10px;
  min-height: 38px;
  padding: 5px 9px;
  border-bottom: 1px solid #e4ebf2;
  border-radius: 7px 7px 0 0;
  background: #eef6f8;
  color: #185b66;
  font-size: 11px;
  line-height: 1.4;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-header > :is(strong, h3) {
  flex: 1 1 180px;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-header > :is(small, span) {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 190px;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Company headings stay visible while only the product grid scrolls sideways.
 * The shared central pane remains the sole vertical scrolling container. */
body.customer-portal #customerRailwayReportDialog .customer-batch-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table {
  width: 100%;
  min-width: 1280px;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: #304761;
  font-size: 12px;
  line-height: 1.35;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td) {
  box-sizing: border-box;
  padding: 4px 5px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table th {
  background: #f7f9fc;
  color: #738399;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(1) { width: 70px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(2) { width: 145px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(3) { width: 130px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(4) { width: 62px; text-align: center; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(5) { width: 85px; text-align: right; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(6) { width: 96px; text-align: right; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(7) { width: 110px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(8) { width: 115px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(9) { width: 120px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(10) { width: 104px; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(11) { width: 110px; text-align: right; }
body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(th, td):nth-child(12) { width: 72px; text-align: center; }

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(td:nth-child(1), td:nth-child(2)) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(td:nth-child(3), td:nth-child(5), td:nth-child(6), td:nth-child(11)) {
  overflow: visible;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table td:nth-child(3) {
  font-size: 10px;
  letter-spacing: -.15px;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(td:nth-child(6), td:nth-child(11)) {
  color: #086f69;
  font-weight: 700;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table [data-batch-settlement] > strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table [data-batch-settlement] > small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #7a8b9c;
  font-size: 10px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is([data-batch-row-open], [data-batch-copy-code]) {
  display: inline-block;
  min-height: 24px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #315d7d;
  font-size: inherit;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table [data-batch-row-open] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table [data-batch-copy-code] {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table tr.customer-batch-item {
  display: table-row;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table :is(input, select) {
  display: block;
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 3px 5px;
  border-radius: 5px;
  font-size: 11px;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table input[data-batch-field="supply_amount"] {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-rate-control {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-rate-control > input {
  flex: 1 1 0;
  width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-rate-control > select {
  flex: 0 0 39px;
  width: 39px;
  padding-right: 0;
  padding-left: 3px;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-rate-control > span {
  flex: 0 0 16px;
  color: #75869a;
  text-align: center;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table input[data-batch-field="quantity"] {
  width: 100%;
  min-width: 0;
  height: 27px;
  min-height: 27px;
  padding: 2px 3px;
  text-align: center;
  font-size: 11px;
  appearance: textfield;
  -moz-appearance: textfield;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-table input[data-batch-field="quantity"]::-webkit-inner-spin-button,
body.customer-portal #customerRailwayReportDialog .customer-batch-table input[data-batch-field="quantity"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px 10px;
  padding: 5px 8px;
  background: #f6fafb;
  color: #667b8e;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-summary strong {
  color: #086f69;
  font-size: 12px;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-summary > span {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.customer-portal #customerRailwayReportDialog :is([data-batch-company-fee], [data-batch-total-fee]) {
  color: #a56b21;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  padding: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls > label {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls > label > span {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls :is(input, select) {
  height: 27px;
  min-height: 27px;
  padding: 2px 5px;
  font-size: 11px;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls select {
  width: 114px;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls input {
  width: 66px;
  text-align: right;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls > button {
  flex: 0 0 auto;
  min-height: 27px;
  padding: 3px 7px;
  border-color: #9bc2c7;
  background: #fff;
  color: #236774;
  font-size: 11px;
}

body.customer-portal #customerRailwayReportDialog [data-batch-remove] {
  min-height: 24px;
  padding: 2px 7px;
  border-color: #ecd4cf;
  color: #ac574b;
  font-size: 11px;
}

body.customer-portal #customerRailwayReportDialog #queryReportBatchPreview {
  flex: 0 0 auto;
  min-width: 0;
  color: #536f83;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

body.customer-portal #customerRailwayReportDialog #queryReportBatchPreview > strong {
  color: #2e7180;
}

body.customer-portal #customerRailwayReportDialog #queryReportBatchPreview p {
  margin: 3px 0;
  font-size: inherit;
}

body.customer-portal #customerRailwayReportDialog .customer-report-note {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
  color: #6c7f93;
  font-size: 11px;
  grid-column: 1 / -1;
}

body.customer-portal #customerRailwayReportDialog .customer-report-note > summary {
  min-height: 22px;
  line-height: 22px;
  cursor: pointer;
}

body.customer-portal #customerRailwayReportDialog .customer-report-note textarea {
  min-height: 42px;
  max-height: 90px;
  padding: 6px 8px;
  font-size: 12px;
  resize: vertical;
}

body.customer-portal #customerRailwayReportDialog .customer-report-footer {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px 12px 10px;
  border-top: 1px solid #dce6ef;
  background: #fff;
  box-shadow: 0 -3px 10px rgba(34, 64, 90, .035);
}

body.customer-portal #customerRailwayReportDialog .customer-batch-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  min-width: 0;
  color: #596f83;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-totals strong {
  color: #08756d;
  font-size: 16px;
  line-height: 1.25;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-totals > :is(span, div) {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 5px;
  min-width: 0;
  max-width: 100%;
}

body.customer-portal #customerRailwayReportDialog .customer-batch-totals > small {
  flex: 1 1 150px;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.customer-portal #customerRailwayReportDialog #queryReportError {
  min-width: 0;
  margin: 0;
  padding: 5px 7px;
  border: 1px solid #f5d0c9;
  border-radius: 5px;
  background: #fff5f2;
  color: #b33d32;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  max-height: 58px;
  overflow: auto;
  overflow-wrap: anywhere;
}

body.customer-portal #customerRailwayReportDialog .customer-report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

body.customer-portal #customerRailwayReportDialog .customer-report-actions > button {
  flex: 0 1 auto;
  width: auto;
  min-height: 32px;
  margin: 0;
  padding: 5px 11px;
  white-space: nowrap;
}

body.customer-portal #customerRailwayReportDialog #queryReportBatchPreviewBtn {
  margin: 0;
  min-height: 32px;
  border: 1px solid #86bdc2;
  border-radius: 6px;
  background: #f0f9f9;
  color: #13727a;
  font-size: 12px;
}

body.customer-portal #customerRailwayReportDialog #queryReportSubmit {
  width: auto;
  height: auto;
  min-height: 32px;
  margin: 0;
  border: 1px solid #077575;
  border-radius: 6px;
  background: #087f7c;
  color: #fff;
  font-size: 12px;
}

body.customer-portal #customerRailwayReportDialog #queryReportSubmit:hover:not(:disabled) {
  background: #096b69;
  border-color: #096b69;
}

body.customer-portal #customerRailwayReportDialog .customer-report-modes button.active {
  border-color: #0b7779;
  background: #eaf7f6;
  color: #075e63;
}

body.customer-portal #customerRailwayReportDialog #queryReportResizeHandle {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 13px;
  height: 13px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0 0 9px;
  background: repeating-linear-gradient(135deg, transparent 0 3px, #aac1cf 3px 4px);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  cursor: nwse-resize;
  touch-action: none;
  user-select: none;
}

@media (max-width: 760px) {
  body.customer-portal #customerRailwayReportDialog.customer-railway-report-dialog,
  body.customer-portal #customerRailwayReportDialog.customer-railway-report-dialog.is-batch-report {
    width: calc(100vw - 24px) !important;
    height: auto;
    border-radius: 10px;
  }

  body.customer-portal #customerRailwayReportDialog > form > header {
    cursor: default;
    touch-action: auto;
  }

  body.customer-portal #customerRailwayReportDialog .customer-batch-company-header {
    gap: 5px 7px;
    padding: 6px 7px;
  }

  body.customer-portal #customerRailwayReportDialog .customer-batch-company-header > h3 {
    flex-basis: 100%;
  }

  body.customer-portal #customerRailwayReportDialog .customer-batch-company-controls {
    margin-left: 0;
  }

  body.customer-portal #customerRailwayReportDialog .customer-batch-company-summary {
    gap: 3px 7px;
    padding: 5px 7px;
  }

  body.customer-portal #customerRailwayReportDialog #queryReportResizeHandle {
    display: none;
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-party {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) .customer-report-party,
  body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) .customer-report-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-product-overview dl {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px 10px;
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-product-overview .is-wide {
    grid-column: auto;
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-modes button {
    flex-direction: column;
    gap: 2px;
    min-height: 44px;
  }

  body.customer-portal #customerRailwayReportDialog:not(.is-batch-report) .customer-report-calculation-grid,
  body.customer-portal #customerRailwayReportDialog .customer-report-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  body.customer-portal #customerRailwayReportDialog :is(.customer-railway-report-body, .customer-report-footer) {
    padding-right: 9px;
    padding-left: 9px;
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-actions {
    gap: 5px;
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-actions > button {
    min-height: 38px;
    padding-right: 8px;
    padding-left: 8px;
  }

  body.customer-portal #customerRailwayReportDialog :is(#queryReportBatchPreviewBtn, #queryReportSubmit) {
    min-height: 38px;
  }
}

@media (max-width: 480px) {
  body.customer-portal #customerRailwayReportDialog .customer-report-product-overview dl {
    grid-template-columns: minmax(0, 1fr);
  }

  body.customer-portal #customerRailwayReportDialog .customer-report-product-overview .is-wide {
    grid-column: auto;
  }
}

/* Eight meaningful pass-ledger columns replace fragmented role/brand/price
 * columns. Full-width item rows disclose batches without a narrow nested pane. */
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table {
  width: 100% !important;
  min-width: 1140px !important;
  max-width: none !important;
  border-collapse: collapse;
  table-layout: fixed !important;
  color: #344c68;
  font-size: 12px;
  line-height: 1.4;
}

/* r123 retains important 14-column widths and a sticky last-column rule.
 * Reset that inherited contract for both the ledger and nested item tables;
 * colgroup alone defines the new ledger widths, never a competing th width. */
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table :is(th, td) {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: table-cell !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  box-shadow: none !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(1) { width: 12.8% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(2) { width: 15.6% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(3) { width: 17.3% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(4) { width: 7.6% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(5) { width: 8.7% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(6) { width: 13% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(7) { width: 13.8% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > colgroup > col:nth-child(8) { width: 11.2% !important; }

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > :is(thead, tbody) > tr > :is(th, td) {
  box-sizing: border-box;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
  white-space: normal;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table > thead > tr > th {
  position: sticky !important;
  z-index: 2 !important;
  top: 0 !important;
  right: auto !important;
  left: auto !important;
  width: auto !important;
  background: #f4f7fb !important;
  color: #677d96;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table td:nth-child(3) {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table :is(.customer-pass-identity, .customer-pass-project, .customer-pass-products, .customer-pass-node, .customer-pass-actions) {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-identity > strong {
  display: block;
  margin-bottom: 4px;
  color: #285574;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-identity :is(.customer-railway-card-role, .customer-pass-role) {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 2px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #edf4ff;
  color: #346593;
  font-size: 10px;
  line-height: 1.3;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-identity .customer-pass-batch-badge {
  display: block;
  max-width: 100%;
  margin: 3px 0 0;
  overflow: hidden;
  color: #778da2;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-project > strong {
  display: -webkit-box;
  margin-bottom: 4px;
  overflow: hidden;
  color: #304d69;
  font-size: 12px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-project > small {
  display: -webkit-box;
  overflow: hidden;
  color: #7a8da3;
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-product-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-product-line {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-bottom: 3px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-product-line + .customer-pass-product-line {
  border-top: 1px dashed #e1e8f0;
  padding-top: 3px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-product-line > strong {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #3c5872;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-product-line > small {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #7a8da2;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-toggle {
  min-height: 24px;
  margin: 4px 0 0;
  padding: 2px 6px;
  border: 1px solid #cadcec;
  border-radius: 4px;
  background: #f7fbff;
  color: #326b97;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-toggle[aria-expanded="true"] {
  border-color: #93bdc7;
  background: #eff8f8;
  color: #267681;
}

body.customer-portal #customer#customer #customerRailwayManagementView :is(.customer-pass-quantity, .customer-pass-order, .customer-pass-settlement) {
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customer#customer #customerRailwayManagementView :is(.customer-pass-quantity, .customer-pass-settlement) > :is(strong, small, span) {
  display: block;
}

body.customer-portal #customer#customer #customerRailwayManagementView :is(.customer-pass-quantity, .customer-pass-settlement) > small {
  margin-top: 3px;
  color: #7a8da2;
  font-size: 10px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-railway-management-table td.customer-pass-order {
  padding-right: 6px !important;
  padding-left: 6px !important;
  color: #117c6d;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-settlement > strong {
  margin: 4px 0 0;
  color: #0d776b;
  font-size: 12px;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-terms-label {
  color: #667f96;
  font-size: 10px;
  line-height: 1.4;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-node .customer-railway-report-stage {
  display: inline-block;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-node > small {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-top: 4px;
  color: #7b8ea2;
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-actions > .customer-railway-step-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 30px;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-updated {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 5px 0 0;
  color: #7b8fa6;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  white-space: nowrap;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-document-status {
  display: flex;
  box-sizing: border-box;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 4px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-document-status > .customer-pass-document-badge {
  display: inline-block;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 2px 5px;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-expanded-items > td {
  padding: 0 10px 10px !important;
  background: #f8fbfd;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #d9e6ee;
  border-radius: 6px;
  background: #fff;
  color: #536f87;
  font-size: 11px;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  line-height: 1.4;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table :is(th, td) {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: table-cell !important;
  padding: 5px 8px;
  border-bottom: 1px solid #e7edf3;
  text-align: left;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table th {
  background: #f5f9fc;
  color: #70879f;
  font-size: 10px;
  font-weight: 600;
}

/* Batch is rowspan, so later rows do not share the first row's td indices.
 * Explicit colgroup widths and semantic cell classes keep all seven columns
 * aligned; the full batch identifier can wrap instead of covering products. */
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-batch { width: 17% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-brand { width: 9% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-model { width: 22% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-code { width: 20% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-quantity { width: 6% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-unit { width: 12% !important; }
body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table > colgroup > .col-amount { width: 14% !important; }

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table :is(.customer-pass-item-brand, .customer-pass-item-model, .customer-pass-item-code, .customer-pass-item-batch) {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table .customer-pass-item-batch {
  vertical-align: top !important;
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel [data-customer-pass-copy-batch] {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 4px 5px;
  border: 1px solid #cfdfeb;
  border-radius: 4px;
  background: #f5faff;
  color: #366b93;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-align: left;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-item-batch [data-customer-pass-copy-batch] > small {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin-top: 4px;
  color: #8091a3;
  font-size: 10px;
  line-height: 1.4;
  white-space: normal !important;
  overflow-wrap: anywhere;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table .customer-pass-item-quantity {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table :is(.customer-pass-item-unit, .customer-pass-item-amount) {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap !important;
}

body.customer-portal #customer#customer #customerRailwayManagementView .customer-pass-list-items-panel > table tbody tr:last-child td {
  border-bottom: 0;
}

body.customer-portal #customerRailwayReportDialog :is(.customer-batch-totals, .customer-batch-company-summary) :is([data-batch-company-fee], [data-batch-total-fee]) {
  color: #a56b21;
}

/* Confirmed voided reports keep a visible, non-interactive terminal stamp. */
body.customer-portal .customer-pass-void-stamp {
  display: inline-block;
  flex: none;
  align-self: center;
  box-sizing: border-box;
  border: 3px double #bd3036;
  border-radius: 4px;
  color: #bd3036;
  background: transparent;
  padding: 2px 8px;
  margin: 4px 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  transform: rotate(-9deg);
  white-space: nowrap;
  pointer-events: none;
}

body.customer-portal #customer#customer #customerRailwaySelectedFlow .customer-pass-flow-identity .customer-pass-void-stamp {
  overflow: visible;
  color: #bd3036;
  font-weight: 700;
}

body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwayPriceSortBtn {
  white-space:nowrap !important;
  border:1px solid #c6dcd9 !important;
  color:#087d76 !important;
  background:#f0faf9 !important;
  box-shadow:none !important;
}
body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwayPriceSortBtn.active {
  border-color:#36a29b !important;
  background:#e5f6f3 !important;
  font-weight:650 !important;
}
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-other-sort-tools {
  display:flex; align-items:center; gap:10px; font-size:13px; margin-bottom:10px;
}
body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-other-sort-tools[hidden] { display:none !important; }
@media (max-width:760px) {
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:6px !important;
  }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwaySort { grid-column:1 / -1 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwayKeyword { grid-column:1 / -1 !important; grid-row:1 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwaySort { grid-row:2 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwayPriceSortBtn { grid-column:1 !important; grid-row:3 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwaySearchBtn { grid-column:2 !important; grid-row:3 !important; width:100% !important; height:44px !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwayClearBtn { grid-column:3 !important; grid-row:3 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView #customerRailwayMobileFilterR78 { grid-column:1 / -1 !important; grid-row:4 !important; }
  body.customer-portal #customer#customer #customerRailwayProductsView .customer-railway-filter-main > button {
    font-size:12px !important; padding:0 6px !important; white-space:nowrap !important;
  }
}


.railway-store-open>:not(.railway-store-page){display:none!important}
/* Keep the entry compact in the existing admin and customer search toolbars.
   The customer portal layers use repeated IDs and !important overrides. */
#railwayStoreCatalogBtn,body.customer-portal #customer#customer#customer#customer#customer #customerRailwayStoreCatalogBtn{display:inline-flex!important;align-items:center;justify-content:center;gap:5px;width:auto!important;min-width:0!important;padding:0 10px!important;border:1px solid #a8ddd7!important;border-radius:8px;background:#e8f7f5!important;color:#087f8c!important;box-shadow:none!important;font-weight:600;white-space:nowrap}
#railwayStoreCatalogBtn>svg,#customerRailwayStoreCatalogBtn>svg{width:16px;height:16px;flex:none;pointer-events:none}
#railwayStoreCatalogBtn>span,#customerRailwayStoreCatalogBtn>span{pointer-events:none}
#railwayStoreCatalogBtn:hover,body.customer-portal #customer#customer#customer#customer#customer #customerRailwayStoreCatalogBtn:hover{background:#d6f0eb!important;border-color:#8ccbc4!important}
#railwayStoreCatalogBtn:active,body.customer-portal #customer#customer#customer#customer#customer #customerRailwayStoreCatalogBtn:active{background:#c9eae5!important}
#railwayStoreCatalogBtn:focus-visible,body.customer-portal #customer#customer#customer#customer#customer #customerRailwayStoreCatalogBtn:focus-visible{outline:2px solid #087f8c;outline-offset:2px}
/* Existing portal layers deliberately repeat IDs and use !important. Store
   mode must also replace their forced product toolbar/grid on both layouts. */
body.customer-portal #customer#customer#customer#customer#customer #customerRailwayProductsView.railway-store-open>:not(.railway-store-page){display:none!important}
.railway-store-page{container-name:store;container-type:inline-size;width:100%;min-width:0;color:#23374f;background:#fff;border:1px solid #e0e7f1;border-radius:14px;padding:18px;box-sizing:border-box}
.railway-store-page[hidden]{display:none!important}
.store-heading,.store-heading>div,.store-filters,.store-pagination,.store-pagination>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.store-heading{justify-content:space-between;margin-bottom:16px}
.store-heading h2{font-size:23px;margin:0}.store-heading [data-store-total]{color:#738198;font-size:14px}
.store-filters{margin-bottom:10px}.store-filters input{flex:1 1 260px;min-width:180px}.store-filters select{width:auto;max-width:190px}.store-filters [name=sort]{margin-left:auto}
.store-facet-rows{display:grid;gap:6px;margin:4px 0 10px}
.store-facet-row{display:grid;grid-template-columns:76px minmax(0,1fr)56px;align-items:start;gap:6px;min-width:0}
.store-facet-label{font-size:13px;line-height:30px;color:#5c708a;white-space:nowrap}
.store-facet-viewport{height:30px;min-width:0;overflow:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#c7d5e9 transparent}
.store-facet-row.is-expanded .store-facet-viewport{height:98px;overflow-y:auto;overflow-x:hidden}
.store-facet-list{display:flex;flex-wrap:wrap;align-content:flex-start;gap:4px;min-width:0;position:relative}
.railway-store-page .store-facet-choice{box-sizing:border-box;flex:none;height:30px;min-height:30px;max-width:min(320px,100%);margin:0;padding:0 8px;border:1px solid transparent;border-radius:6px;background:transparent;color:#415e81;box-shadow:none;font-size:12px;line-height:28px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.railway-store-page .store-facet-choice:hover{background:#edf4fe;border-color:#d4e3fa}
.railway-store-page .store-facet-choice.is-selected{border-color:#b5ccfb;background:#eaf1ff;color:#285dd3;font-weight:600}
.railway-store-page .store-facet-row>[data-store-action=expand-facet]{box-sizing:border-box;height:30px;min-height:30px;margin:0;padding:0 5px;border:0;background:transparent;box-shadow:none;color:#456a9c;font-size:12px;line-height:30px}
.store-facet-choice:focus-visible,.store-facet-viewport:focus-visible{outline:2px solid #4b7bdd;outline-offset:-2px}
@container store (min-width:1080px){
 .is-customer .store-tools{display:flex;align-items:center;gap:14px;margin-bottom:10px;min-width:0}
 .is-customer .store-heading{flex:none;margin:0}.is-customer .store-heading>div{flex-wrap:nowrap;gap:8px}.is-customer .store-heading h2{font-size:19px;white-space:nowrap}.is-customer .store-heading [data-store-total]{font-size:12px;white-space:nowrap}
 .is-customer .store-filters{flex:1;min-width:0;flex-wrap:nowrap;gap:7px;margin:0}.is-customer .store-filters input[type=search]{flex:1 1 160px;min-width:140px;width:0}.is-customer .store-filters select{flex-shrink:0;font-size:13px}.is-customer .store-filters [name=category]{width:125px}.is-customer .store-filters [name=grade]{width:112px}.is-customer .store-filters [name=sort]{width:138px;margin-left:0}.is-customer .store-tools button{padding:7px 10px;font-size:13px}
}
.railway-store-page input,.railway-store-page select,.store-dialog input,.store-dialog select,.store-dialog textarea{box-sizing:border-box;min-height:38px;padding:8px 10px;border:1px solid #d8e2f0;border-radius:8px;color:#283b54;background:#fff;font:inherit}
.railway-store-page button,.store-dialog button{min-height:34px;padding:7px 12px;border-radius:8px;white-space:nowrap;font-size:14px;cursor:pointer}.railway-store-page button:disabled,.store-dialog button:disabled{opacity:.45;cursor:default}
.store-notice{font-size:14px;min-height:5px;margin:6px 0 10px;color:#6c7e94}.store-error,.store-dialog-error{color:#bd3e32}
.store-table-wrap{max-height:var(--store-table-height,calc(100dvh - 295px));min-height:190px;overflow:auto;border:1px solid #e3e9f3;border-radius:9px}
.store-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:1478px;font-size:13px;line-height:1.6}
.is-customer .store-table{min-width:1388px}
.store-col-company{width:195px}.store-col-shop{width:220px}.store-col-credit{width:110px}.store-col-brands{width:225px}.store-col-categories{width:150px}.store-col-paths{width:205px}.store-col-link{width:78px}.store-col-time{width:125px}.store-col-visibility{width:90px}.store-col-actions{width:80px}
.store-table th{position:sticky;top:0;z-index:1;background:#f4f7fc;color:#63738c;text-align:left;white-space:nowrap;font-weight:600}
.store-table td,.store-table th{padding:10px;border-bottom:1px solid #e6ecf5;vertical-align:middle}.store-table tr:nth-child(even){background:#fbfcff}
.store-table .store-company,.store-table .store-shop{position:sticky;z-index:2;left:0;background:#fff;overflow-wrap:anywhere}
.store-table .store-shop{left:var(--store-company-width,195px);box-shadow:1px 0 #e3e9f3;color:#245f9f}
.store-table tr:nth-child(even)>.store-company,.store-table tr:nth-child(even)>.store-shop{background:#fbfcff}
.store-table thead .store-company,.store-table thead .store-shop{z-index:4;background:#f4f7fc}
.store-table time{font-size:12px;white-space:normal;font-variant-numeric:tabular-nums}
.store-facts{font-size:12px;line-height:1.65;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.store-path-preview{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;font-size:12px;line-height:1.65}
.store-paths>button{padding-left:0!important;font-size:12px!important;white-space:normal!important;text-align:left}
.store-tag{display:inline-block;vertical-align:middle;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#eef4fd;color:#3d5d85;border-radius:5px;padding:3px 6px;margin:2px 3px 2px 0;font-size:12px}
.store-muted{color:#77879c;font-size:12px}.store-table td>small{display:block}.store-credit{display:inline-block;border-radius:6px;padding:4px 6px;background:#ebf7f4;color:#267363;font-size:12px;white-space:normal}
.store-mall-link{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:28px;height:28px;padding:0;border:1px solid #bfd3f2;border-radius:6px;background:#f4f8ff;color:#2464ad;text-decoration:none;vertical-align:middle}.store-mall-link>svg{width:17px;height:17px}.store-mall-link:hover{background:#eaf2ff}.store-mall-link:focus-visible{outline:2px solid #3b72d9;outline-offset:2px}
.store-visibility{display:inline-block;background:#edf0f5;color:#718099;border-radius:6px;padding:4px 8px;font-size:12px;white-space:nowrap}.store-visibility.is-visible{background:#e8f7ed;color:#338354}
.store-operations{white-space:nowrap}.store-operations button,.store-table td>button,.store-table td>.ghost,.store-card footer button{padding:4px 6px;border:0!important;background:transparent!important;color:#2663aa;min-height:30px;box-shadow:none!important}
.store-table .store-operations>button[data-store-action=menu],.store-card [data-store-action=menu]{border:1px solid #cbd9ef!important;background:#fff!important;border-radius:6px;padding:4px 7px;font-size:12px;white-space:nowrap}
.store-action-menu{position:fixed;z-index:4001;width:166px;max-height:calc(100dvh - 16px);overflow:auto;padding:5px;border:1px solid #d7e1ef;border-radius:9px;background:#fff;box-shadow:0 8px 28px #19365330;box-sizing:border-box}
.store-action-menu>button{display:block;width:100%;min-height:38px;margin:0;padding:8px 12px;border:0;border-radius:5px;background:#fff;text-align:left;color:#2b4668;box-shadow:none;font-size:14px;font-family:inherit;cursor:pointer}.store-action-menu>button:hover,.store-action-menu>button:focus-visible{background:#edf4ff;outline:none}.store-action-menu>[data-store-action=delete]{color:#bc4137}
.store-pagination{justify-content:space-between;padding-top:13px;font-size:13px;color:#6f8098}.store-pagination select{min-height:34px;padding:4px 8px;min-width:64px}
.store-cards{display:none}.store-dialog{width:min(820px,calc(100vw - 32px));max-height:88dvh;padding:0;border:1px solid #d8e2f0;border-radius:14px;color:#263c56;box-shadow:0 24px 80px #142c5033}.store-dialog-wide{width:min(1160px,calc(100vw - 32px))}.store-dialog::backdrop{background:#1d304765}
.store-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid #e3e9f3}.store-dialog h3{margin:0;font-size:20px}.store-dialog-body{padding:18px 20px;overflow:auto;max-height:calc(88dvh - 82px);box-sizing:border-box}.store-dialog-body p{line-height:1.6}.store-dialog h4{margin:20px 0 8px;font-size:14px}.store-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.store-category-list{padding:0;list-style:none;border:1px solid #e5eaf2;border-radius:8px;max-height:320px;overflow:auto}.store-category-list li{padding:9px 12px;border-bottom:1px solid #eef2f7;font-size:13px;overflow-wrap:anywhere}.store-dialog-body>input[type=search]{width:100%}.store-source-status{overflow-wrap:anywhere;font-size:13px;background:#f6f8fc;padding:10px;border-radius:7px}
.store-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.store-editor-grid label{display:flex;flex-direction:column;gap:7px;font-size:14px;min-width:0}.store-editor-grid input,.store-editor-grid textarea{width:100%}.store-editor-grid label:has([name=category_paths]){grid-column:1/-1}.store-visible-option{display:flex;align-items:center;gap:8px;font-size:14px;margin:12px 0}.store-visible-option input{width:17px;min-height:17px}.store-import-table{overflow:auto;max-height:50dvh;border:1px solid #e0e7f1}.store-import-table table{width:100%;font-size:13px;border-collapse:collapse}.store-import-table th{position:sticky;top:0;background:#f3f6fc}.store-import-table td,.store-import-table th{padding:9px;text-align:left;border-bottom:1px solid #e2e8f0}.store-import-table td small{display:block;color:#75879c}.store-import-table td:last-child{max-width:460px;overflow-wrap:anywhere}.store-import-table details p{max-height:140px;overflow:auto}
@media(max-width:760px){
 .railway-store-page{padding:12px;border-radius:10px}.store-heading h2{font-size:19px}.store-heading{gap:12px}.store-heading>div{gap:7px}.store-heading>div:last-child{width:100%}.store-heading>div:first-child{width:auto}.store-heading button{padding:7px 9px;font-size:12px}.store-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.store-filters input{grid-column:1/-1;width:100%;min-width:0}.store-filters select{width:100%;max-width:100%;min-width:0}.store-filters [name=sort]{margin:0;grid-column:1/-1}.store-filters button{min-width:0}.store-table-wrap{display:none}.store-cards{display:grid;gap:10px}.store-card{border:1px solid #dfe7f2;border-radius:10px;padding:13px;background:#fff;min-width:0}.store-card>strong,.store-card>small{display:block;overflow-wrap:anywhere}.store-card>strong{font-size:15px;color:#244f86}.store-card>small{font-size:12px;color:#7b899c;margin:6px 0}.store-card>.store-credit{margin:5px 0}.store-card>div{display:flex;align-items:center;flex-wrap:wrap;gap:3px;font-size:12px}.store-card label{color:#708199;margin-right:5px}.store-card footer{display:flex;align-items:center;gap:6px;margin-top:10px}.store-card footer>a{margin-left:auto}.store-pagination{gap:10px}.store-pagination>[data-store-page-info]{order:3;width:100%;text-align:center}.store-dialog{width:calc(100vw - 20px);max-height:92dvh}.store-dialog>header{padding:12px}.store-dialog-body{padding:12px;max-height:calc(92dvh - 70px)}.store-dialog h3{font-size:18px}.store-editor-grid{grid-template-columns:1fr}.store-editor-grid label:has([name=category_paths]){grid-column:auto}.store-dialog input[type=file]{width:100%}
}
@media(max-width:760px){
 .store-card>div>.store-facts{flex:1;min-width:0}.store-card>div>label{flex:0 0 58px;align-self:flex-start;padding-top:2px}.store-card>.store-card-paths{display:block;margin-top:7px}.store-card-paths>label{display:block}.store-card-paths>button{padding-left:0!important;font-size:12px!important;border:0!important;background:transparent!important;box-shadow:none!important;color:#2663aa}.store-card .store-mall-link{width:32px;height:32px}
 .store-facet-row{grid-template-columns:66px minmax(0,1fr)48px;gap:3px}.store-facet-label{font-size:12px}.railway-store-page .store-facet-choice{max-width:min(220px,100%);padding:0 6px}
}
@media(max-width:760px){
 body.customer-portal.customer-phone-layout #customer#customer#customer#customer#customer .railway-store-page .store-facet-choice,body.customer-portal.customer-phone-layout #customer#customer#customer#customer#customer .store-facet-row>[data-store-action=expand-facet]{height:30px!important;min-height:30px!important;min-block-size:30px!important;max-width:min(220px,100%);padding:0 6px!important;font-size:12px!important;line-height:28px!important;border-radius:6px!important;width:auto!important}
}


.catalog-facet-rows{display:grid;gap:6px;width:100%;min-width:0;flex:0 0 100%;grid-column:1/-1;margin:8px 0 2px}
.catalog-facet-row{display:grid;grid-template-columns:54px minmax(0,1fr)56px;align-items:start;gap:6px;min-width:0}
.catalog-facet-label{font-size:13px;line-height:30px;color:#657a94;white-space:nowrap}
.catalog-facet-viewport{height:30px;min-width:0;overflow:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:#b8cce5 transparent}
.catalog-facet-row.is-expanded .catalog-facet-viewport{height:98px;overflow-y:auto;overflow-x:hidden}
.catalog-facet-list{display:flex;flex-wrap:wrap;align-content:flex-start;gap:4px;min-width:0}
.catalog-facet-rows .catalog-facet-choice,.catalog-facet-rows .catalog-facet-toggle{box-sizing:border-box;flex:none;height:30px;min-height:30px;min-block-size:30px;max-width:min(300px,100%);width:auto;margin:0;padding:0 8px;border:1px solid transparent;border-radius:6px;background:transparent;color:#415f83;box-shadow:none;font-family:inherit;font-size:12px;line-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.catalog-facet-rows .catalog-facet-toggle{padding:0 3px;color:#3f6c9f}
.catalog-facet-rows .catalog-facet-choice:hover{background:#eef5ff;border-color:#d5e5fb}
.catalog-facet-rows .catalog-facet-choice.is-selected{background:#eaf1ff;border-color:#b9cefa;color:#285ed2;font-weight:600}
.catalog-facet-rows button:disabled{opacity:.4;cursor:default}
.catalog-facet-rows button:focus-visible,.catalog-facet-viewport:focus-visible{outline:2px solid #5686e2;outline-offset:-2px}
#railwayProducts .railway-toolbar:has(>.catalog-facet-rows){flex-wrap:wrap}
#customerRailwayBrand{display:none!important}
/* The portal's mobile and product-toolbar layers force larger button styles
   with repeated IDs. Keep these compact rows consistent on both surfaces. */
body.customer-portal #customer#customer#customer#customer#customer :is(#customerProductFacetRows#customerProductFacetRows#customerProductFacetRows,#customerRailwayFacetRows#customerRailwayFacetRows#customerRailwayFacetRows) button{box-sizing:border-box!important;display:inline-block!important;flex:none!important;height:30px!important;min-height:30px!important;min-block-size:30px!important;width:auto!important;max-width:min(300px,100%)!important;margin:0!important;padding:0 8px!important;border:1px solid transparent!important;border-radius:6px!important;background:transparent!important;box-shadow:none!important;color:#415f83!important;font-size:12px!important;line-height:28px!important;white-space:nowrap!important}
body.customer-portal #customer#customer#customer#customer#customer :is(#customerProductFacetRows#customerProductFacetRows#customerProductFacetRows,#customerRailwayFacetRows#customerRailwayFacetRows#customerRailwayFacetRows) button.is-selected{background:#eaf1ff!important;border-color:#b9cefa!important;color:#285ed2!important}
body.customer-portal #customer#customer#customer#customer#customer :is(#customerProductFacetRows#customerProductFacetRows#customerProductFacetRows,#customerRailwayFacetRows#customerRailwayFacetRows#customerRailwayFacetRows) button.catalog-facet-toggle{padding:0 3px!important}
@media(max-width:760px){
 .catalog-facet-row{grid-template-columns:42px minmax(0,1fr)48px;gap:3px}.catalog-facet-label{font-size:12px}
 body.customer-portal.customer-phone-layout #customer#customer#customer#customer#customer :is(#customerProductFacetRows#customerProductFacetRows#customerProductFacetRows,#customerRailwayFacetRows#customerRailwayFacetRows#customerRailwayFacetRows) button.catalog-facet-choice{max-width:min(220px,100%)!important;padding:0 6px!important}
}


.customer-product-h5{position:fixed;inset:0;z-index:12000;display:flex;align-items:center;justify-content:center;padding:18px;background:#172a4566}.customer-product-h5[hidden]{display:none!important}.cph-dialog{width:min(820px,100%);max-height:90dvh;background:#fff;border-radius:18px;box-shadow:0 20px 80px #10264633;overflow:hidden;display:flex;flex-direction:column;color:#233950;font-size:14px}.cph-dialog header{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid #e3eaf2;gap:12px}.cph-dialog h2{font-size:21px;margin:0 0 5px}.cph-dialog p{margin:4px 0;color:#72849a}.cph-dialog button,.cph-dialog a{font-size:14px;border-radius:8px;padding:8px 12px;min-height:36px;cursor:pointer;text-decoration:none}.cph-dialog button{border:1px solid #dce4ef;background:#fff;color:#294360}.cph-dialog button.primary{background:#147d8d;color:#fff;border-color:#147d8d}.cph-dialog button:disabled{opacity:.5;cursor:default}.cph-body{padding:18px 22px;overflow:auto;overscroll-behavior:contain}.cph-body fieldset{padding:0;margin:0;border:0;min-width:0}.cph-scopes{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cph-scopes details{border:1px solid #dbe5f0;border-radius:10px;padding:10px 12px;background:#f9fbfe;min-width:0}.cph-scopes summary{cursor:pointer;font-weight:600}.cph-scopes summary span{float:right;color:#16818a;font-size:12px;margin-right:10px}.cph-scopes input[type=search]{margin-top:10px;width:100%;height:36px;font-size:14px}.cph-options{max-height:156px;overflow:auto;margin:8px 0;display:grid;gap:7px}.cph-options label{display:flex;gap:7px;align-items:flex-start}.cph-options input{width:16px;height:16px;flex:none;margin:2px 0}.cph-text{color:#16818a!important}.cph-days{display:flex;align-items:center;gap:8px;margin:16px 0;flex-wrap:wrap}.cph-days>span{margin-right:4px}.cph-days label{cursor:pointer}.cph-days input{position:absolute;opacity:0;width:1px;height:1px}.cph-days label span{display:block;border:1px solid #dce4ed;border-radius:7px;padding:7px 13px}.cph-days input:checked+span{background:#e6f5f3;border-color:#16818a;color:#08776f}.cph-days input:focus-visible+span{outline:2px solid #226cce}.cph-create{display:flex;align-items:center;justify-content:space-between;gap:10px}.cph-create>span{font-size:13px;color:#54758f}.cph-note{font-size:12px;line-height:1.6;margin:10px 0!important}.cph-list-heading{display:flex;align-items:center;justify-content:space-between;margin:18px 0 8px}.cph-list-heading h3{font-size:16px;margin:0}.cph-list-heading small{font-size:12px;font-weight:400;color:#7a8ba2}.cph-link{padding:12px 0;border-bottom:1px solid #e6edf4;display:flex;gap:12px;align-items:center;justify-content:space-between}.cph-link>div:first-child{min-width:0;flex:1}.cph-link strong{font-size:14px;overflow-wrap:anywhere}.cph-link p{font-size:13px;max-width:480px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cph-link small,.cph-result small{font-size:12px;color:#72849a}.cph-link>div:last-child{display:flex;gap:6px;flex:none}.cph-status{margin-left:8px;font-size:12px;color:#8a7250;white-space:nowrap}.cph-status.active{color:#16846d}.cph-danger{color:#bd4545!important}.cph-pages{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;font-size:13px}#cph-message{color:#98702e;font-size:13px;margin-top:8px}.cph-result{display:flex;gap:16px;padding:14px;margin-top:14px;border:1px solid #bfdfde;border-radius:12px;background:#f3faf9}.cph-result[hidden]{display:none}.cph-result img{width:138px;height:138px;object-fit:contain;background:white;flex:none}.cph-result>div{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1}.cph-result input{width:100%;font-size:12px;min-height:32px}.cph-result a{color:#147b8b;display:inline-block}.cph-result strong{font-size:15px}#customerProductH5Btn{white-space:nowrap;color:#147d8d;border-color:#b7dadb;background:#f0f9f8}
@media(max-width:600px){.customer-product-h5{padding:8px}.cph-dialog{max-height:94dvh;border-radius:12px}.cph-dialog header,.cph-body{padding:14px}.cph-dialog header p{font-size:12px}.cph-scopes{grid-template-columns:1fr}.cph-create{align-items:stretch;flex-direction:column}.cph-link{align-items:flex-start;flex-direction:column}.cph-link>div:last-child{align-self:flex-end}.cph-result{gap:10px}.cph-result img{width:110px;height:110px}.cph-result a{padding:6px}.cph-result input{min-width:0}.cph-days{gap:6px}.cph-days label span{padding:7px 10px}}

.customer-h5-branding-dialog { width: min(480px, calc(100vw - 24px)); padding: 0; border: 1px solid #dae5ee; }
.customer-h5-branding-dialog:not([open]) { display: none; }
.customer-h5-branding-dialog::backdrop { background: #152a4666; }
.customer-h5-branding-dialog header h2 { margin: 0; }
.customer-h5-branding-dialog form { display: grid; gap: 10px; margin-top: 14px; }
.customer-h5-branding-dialog label { display: grid; gap: 5px; font-weight: 600; }
.customer-h5-branding-dialog label input { width: 100%; min-width: 0; font-size: 16px; }
.cph-branding-control { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cph-branding-control button { white-space: nowrap; }
.cph-branding-remaining { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #edf2f7; color: #52657b; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.cph-branding-remaining[hidden] { display: none; }
.cph-branding-remaining[data-state="active"] { background: #e6f5f1; color: #126552; }
.cph-branding-remaining:is([data-state="ending"], [data-state="expired"]) { background: #fff3e1; color: #8d4e12; }
.customer-railway-h5-actions { flex-wrap: wrap; }
.cph-branding-preview { display: flex; align-items: center; gap: 10px; border: 1px solid #dbe5f0; border-radius: 10px; padding: 10px; overflow-wrap: anywhere; }
.cph-branding-preview b { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #147d8d; color: #fff; font-size: 21px; }
.cph-branding-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }


.hsa-dialog{box-sizing:border-box;width:min(1220px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #dce5f1;border-radius:18px;background:#fff;color:#213550;box-shadow:0 24px 80px #152b4b40;font:14px/1.5 system-ui,sans-serif;overflow:auto}.hsa-dialog::backdrop{background:#14294370}.hsa-dialog *{box-sizing:border-box}.hsa-dialog [hidden]{display:none!important}.hsa-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 26px;border-bottom:1px solid #e3eaf4}.hsa-header h2{margin:0;font-size:23px}.hsa-header p{margin:5px 0 0;color:#71839a}.hsa-dialog button,.hsa-dialog input,.hsa-dialog select{font:inherit;min-height:38px;border:1px solid #d8e2ef;border-radius:8px;background:#fff;color:#26466c;padding:8px 12px}.hsa-dialog button{cursor:pointer;white-space:nowrap}.hsa-dialog button:hover{background:#edf4ff}.hsa-dialog button:disabled{opacity:.45;cursor:default}.hsa-dialog button:focus-visible,.hsa-dialog input:focus-visible,.hsa-dialog select:focus-visible{outline:2px solid #3265da;outline-offset:2px}.hsa-dialog .hsa-primary{background:#365bdd;color:#fff;border-color:#365bdd}.hsa-body{padding:20px 26px}.hsa-tabs{display:flex;gap:10px;padding:12px 26px 0}.hsa-tabs [aria-current]{background:#edf2ff;color:#365bdd;border-color:#aebfff}.hsa-filters,.hsa-list-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.hsa-filters label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:#687d99;min-width:0}.hsa-filters input,.hsa-filters select{max-width:100%;font-size:14px}.hsa-list-filters{flex:1 1 360px}.hsa-search{flex:1 1 150px}.hsa-filter-actions{display:flex;gap:8px}.hsa-error{color:#b93d37;overflow-wrap:anywhere}.hsa-error:empty{display:none}.hsa-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0;color:#7e8fa7;font-size:12px}.hsa-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:16px 0}.hsa-summary>div{padding:15px 12px;border:1px solid #e0e9f6;border-radius:10px;background:#f6f9fe}.hsa-summary span{display:block;font-size:12px;color:#6880a0}.hsa-summary strong{display:block;font-size:22px;color:#244d89;margin-top:5px;overflow-wrap:anywhere}.hsa-table-wrap{border:1px solid #e1e8f2;border-radius:10px;overflow:hidden}.hsa-dialog table{width:100%;border-collapse:collapse;table-layout:fixed}.hsa-dialog th{background:#f4f7fc;color:#627894;text-align:left;font-weight:600}.hsa-dialog td,.hsa-dialog th{padding:12px 10px;vertical-align:top;overflow-wrap:anywhere;border-bottom:1px solid #e7edf6;font-size:13px}.hsa-dialog tr:last-child td{border-bottom:0}.hsa-dialog td small{display:block;color:#7a8ba4;font-size:11px;margin-top:4px}.hsa-links th:first-child{width:23%}.hsa-links th:nth-child(2){width:17%}.hsa-links th:nth-child(6){width:15%}.hsa-links th:last-child{width:96px}.hsa-links td button{padding:6px 9px;font-size:12px}.hsa-status{display:inline-block;padding:2px 8px;border-radius:5px;background:#f0f2f6;color:#677b95}.hsa-status[data-status=active]{background:#e7f7ef;color:#15744d}.hsa-status[data-status=expired]{background:#fff2de;color:#a36a15}.hsa-status[data-status=disabled],.hsa-status[data-status=deleted]{color:#a94848;background:#fff0ee}.hsa-pager{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:14px 0;color:#71829b;font-size:12px}.hsa-pager>div{display:flex;gap:8px}.hsa-link-heading h3{margin:0;font-size:19px;overflow-wrap:anywhere}.hsa-link-heading p{margin:5px 0 0;color:#70829c;overflow-wrap:anywhere}.hsa-section-title{font-size:16px;margin:24px 0 10px}.hsa-empty{text-align:center;padding:32px 16px;color:#7e8fa7;background:#f8faff;border:1px dashed #dce6f5;border-radius:10px}.hsa-note{font-size:12px;color:#8190a7;margin:20px 0 0}.hsa-overview{white-space:nowrap}
@media(max-width:760px){.hsa-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.hsa-header{padding:16px}.hsa-header h2{font-size:20px}.hsa-header p{font-size:12px}.hsa-body{padding:14px}.hsa-tabs{padding:12px 14px 0}.hsa-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.hsa-filters>label:first-child{grid-column:1/-1}.hsa-list-filters{display:grid;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.hsa-search{grid-column:1/-1}.hsa-filter-actions{grid-column:1/-1;justify-content:flex-end}.hsa-filters input,.hsa-filters select{width:100%;min-width:0}.hsa-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.hsa-summary>div{padding:10px 8px}.hsa-summary strong{font-size:18px}.hsa-summary span{font-size:11px}.hsa-toolbar{flex-wrap:wrap;align-items:flex-start}.hsa-table-wrap{border:0;overflow:visible}.hsa-dialog table,.hsa-dialog tbody,.hsa-dialog tr,.hsa-dialog td{display:block;width:100%}.hsa-dialog thead{display:none}.hsa-dialog tr{border:1px solid #dfe7f2;border-radius:10px;padding:6px 12px;margin-bottom:10px;background:#fff}.hsa-dialog td,.hsa-dialog tr:last-child td{display:grid;grid-template-columns:92px minmax(0,1fr);gap:0 10px;border:0;padding:6px 0;min-width:0;font-size:13px}.hsa-dialog td:before{content:attr(data-label);color:#788ba5;font-size:12px}.hsa-dialog td>*{grid-column:2;min-width:0}.hsa-dialog td small{margin:3px 0 0}.hsa-dialog td button{justify-self:start}.hsa-dialog td .hsa-status{justify-self:start}.hsa-pager{flex-wrap:wrap;justify-content:center}.hsa-note{line-height:1.65}}
.hsa-history-tools{display:flex;align-items:center;gap:10px;margin:12px 0}.hsa-history-tools label{display:flex;align-items:center;gap:8px;color:#657e9d;font-size:13px}.hsa-history-tools select{min-height:36px;padding:6px 10px;border:1px solid #dce5f0;border-radius:8px;background:white;color:#294a6a;font:inherit}.hsa-history-pager{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:12px 0;font-size:13px;color:#7186a2}.hsa-history-pager[hidden]{display:none!important}.hsa-history-pager>div{display:flex;gap:8px}.cph-list-heading>div{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.cph-link>div:last-child{flex-wrap:wrap}

/* Isolate report tables from the admin workbench wide-table defaults. */
.hsa-dialog .hsa-table-wrap table{width:100%;min-width:0;max-width:100%;table-layout:fixed}.hsa-dialog .hsa-table-wrap th,.hsa-dialog .hsa-table-wrap td{min-width:0;max-width:none;white-space:normal;position:static;height:auto;padding:12px 10px}
@media(max-width:760px){.hsa-dialog .hsa-table-wrap th,.hsa-dialog .hsa-table-wrap td{padding:6px 0}}


.moments-entry{display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box!important;flex:0 0 24px!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;min-block-size:24px!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;cursor:pointer;vertical-align:middle;touch-action:manipulation}
.moments-entry svg{display:block;flex:none;width:16px!important;height:16px!important;max-width:none;stroke:none;transition:filter .25s ease}
.moments-entry:hover,.moments-entry:active{background:transparent!important;box-shadow:none!important}
@media(hover:hover){.moments-entry:hover svg{filter:hue-rotate(55deg) saturate(1.25)}}
@media(prefers-reduced-motion:reduce){.moments-entry svg{transition:none}}.moments-entry:focus-visible{outline:2px solid #167f79;outline-offset:2px}
.customer-product-card-meta>.moments-entry{margin-left:auto}.railway-card-code-line>.moments-entry{margin-left:auto}.railway-card-code-line>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.railway-card-code-line>.railway-card-code-copy{margin-left:0}
.moments-overlay{position:fixed;inset:0;z-index:120000;background:#132b4680;display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box;color:#20384b;font-family:system-ui,-apple-system,'PingFang SC',sans-serif}
.moments-overlay *{box-sizing:border-box}.moments-overlay [hidden]{display:none!important}
.moments-window{width:min(1040px,100%);max-height:calc(100dvh - 40px);display:flex;flex-direction:column;background:#fff;border:1px solid #dce7eb;border-radius:18px;overflow:hidden;box-shadow:0 22px 65px #0b283d30}
.moments-window header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #e7eef0}.moments-window h2{display:flex;align-items:center;gap:9px;font-size:21px;margin:0}.moments-window h2 svg{width:27px;height:27px}.moments-window header p{font-size:13px;color:#7a8b99;margin:5px 0 0}
.moments-window button,.moments-window summary,.moments-window a{font:inherit;cursor:pointer}.moments-window button{border:1px solid #d8e4e8;border-radius:8px;padding:8px 13px;color:#35526a;background:#fff;box-shadow:none;line-height:1.4}.moments-window button:disabled{opacity:.5;cursor:wait}.moments-window button:focus-visible,.moments-window summary:focus-visible{outline:2px solid #168b84;outline-offset:2px}
.moments-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;padding:22px 24px;overflow:auto;background:#f6f9fb;min-height:0}.moments-visual{text-align:center;min-width:0}.moments-visual>img{display:block;max-width:100%;max-height:58vh;margin:0 auto 10px;border-radius:12px;box-shadow:0 5px 18px #1b384514;object-fit:contain}.moments-visual #moments-empty{padding:65px 20px;border:1px dashed #c5d8dd;border-radius:12px;color:#81919a;margin-bottom:12px}
.moments-editor{min-width:0;align-self:start}.moments-styles{display:flex;gap:7px;flex-wrap:wrap}.moments-styles button{padding:7px 10px;font-size:13px}.moments-styles button[aria-pressed=true]{background:#e4f5ef;border-color:#40a88e;color:#087766;font-weight:650}.moments-more{margin:10px 0 17px;font-size:13px;color:#637d8d}.moments-more .moments-styles{margin-top:10px}.moments-copy-label{display:block;font-size:13px;color:#5b7286;margin-bottom:8px}.moments-editor textarea{display:block;width:100%;min-height:180px;resize:vertical;padding:14px;border:1px solid #cedee6;border-radius:10px;background:#fff;color:#20384b;font-size:15px;font-family:inherit;line-height:1.8}.moments-copy-actions{display:flex;gap:7px;margin-top:9px}.moments-copy-actions button{font-size:12px;padding:6px 10px}.moments-copy-actions button:last-child{margin-left:auto}
.moments-field{display:grid;gap:7px;font-size:13px;color:#607789;margin-top:17px}.moments-field input{width:100%;height:40px;padding:8px 11px;border:1px solid #cedee6;background:white;border-radius:8px;font-size:14px;color:#243e50}.moments-settings{font-size:13px;color:#607789;margin-top:18px}.moments-settings small{display:block;line-height:1.7;margin-top:10px}.moments-upload{display:inline-block;position:relative;color:#197e79;border:1px solid #c5e4dc;background:#f3fbf8;border-radius:8px;padding:8px 11px;font-size:13px;cursor:pointer;overflow:hidden}.moments-upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.moments-settings .moments-upload{margin:12px 8px 0 0}.moments-approval{display:flex;gap:7px;align-items:flex-start;text-align:left;font-size:12px;color:#738796;line-height:1.7;margin-top:12px}.moments-approval input{margin-top:4px;flex:none}.moments-notice{font-size:12px;color:#6a8394;line-height:1.65;margin:15px 0 0}.moments-notice.is-error{color:#b75435}.moments-window footer{display:flex;justify-content:flex-end;gap:12px;padding:14px 24px;border-top:1px solid #e6eef0;background:#fff}.moments-window .moments-primary{background:#12897c;border-color:#12897c;color:white;min-width:135px;font-weight:650}.moments-material{margin-top:15px;border:1px solid #cbe4db;border-radius:10px;padding:15px;background:#eff8f4;font-size:13px;line-height:1.7}.moments-qr{display:block;width:150px;height:150px;margin:10px auto}.moments-material-actions{display:flex;gap:12px;align-items:center}.moments-material a{color:#187e78}.moments-material p{margin:8px 0}
@media(max-width:760px){.moments-entry{height:32px!important;min-height:32px!important;min-block-size:32px!important}.moments-overlay{padding:0}.moments-window{width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0}.moments-window header{padding:13px 16px}.moments-window h2{font-size:19px}.moments-body{display:block;padding:15px 16px}.moments-visual>img{max-height:38vh}.moments-visual{margin-bottom:20px}.moments-editor textarea{min-height:150px;font-size:16px}.moments-window footer{padding:12px 16px max(12px,env(safe-area-inset-bottom));flex:none}.moments-window footer button{min-height:44px}.moments-window .moments-primary{flex:1}.moments-styles button{min-height:40px}.moments-copy-actions button{min-height:38px}.moments-field input{font-size:16px}.moments-material-actions button,.moments-material-actions a{min-height:44px}}

/* Compact editor; entry icons intentionally retain their transparent 16px design. */
.moments-window{width:min(1040px,100%)}.moments-body{grid-template-columns:minmax(0,.95fr) minmax(0,1fr);gap:28px;padding:18px 24px;background:#f7f9fa}
.moments-image-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;font-size:12px;color:#607789;text-align:left}.moments-window select{font:inherit;color:#35526a;border:1px solid #d8e4e8;border-radius:7px;background:#fff;padding:7px 9px;max-width:100%}.moments-image-toolbar .moments-upload{padding:6px 10px;font-size:12px}
.moments-visual>img{border-radius:3px;max-height:55vh;box-shadow:0 6px 18px #1b38451a}.moments-image-note{font-size:11px;color:#83959d;margin:7px 0}.moments-approval{font-size:11px;margin-top:8px}.moments-ai-status{font-size:12px;color:#128478;margin:0 0 13px;line-height:1.6}.moments-ai-status.is-error{color:#af4e2b;background:#fff3ec;border-radius:7px;padding:9px 11px}
.moments-more{display:flex;gap:9px;align-items:center;margin:9px 0 16px;font-size:12px}.moments-more select{font-size:12px}.moments-editor textarea{min-height:178px;font-size:15px}.moments-settings{border-top:1px solid #e3ebee;padding-top:15px;margin-top:17px;font-size:12px}.moments-settings summary{line-height:1.7}.moments-footer-hint{font-size:12px;color:#7a8d97;margin-right:auto;align-self:center}.moments-window footer{padding:12px 24px}
@media(max-width:760px){.moments-body{padding:14px 16px}.moments-image-toolbar{font-size:12px}.moments-visual>img{max-height:40vh}.moments-visual{margin-bottom:18px}.moments-footer-hint{display:none}.moments-window footer{padding:12px 16px max(12px,env(safe-area-inset-bottom))}.moments-more select{min-height:38px;font-size:14px}.moments-editor textarea{font-size:16px;min-height:144px}.moments-window .moments-primary{min-width:0}.moments-copy-actions{gap:5px}.moments-copy-actions button{padding:6px 8px}.moments-window select{font-size:14px}}

/* Sticker hit targets use the server's raster and normalized geometry. */
.moments-image-toolbar{justify-content:flex-start}.moments-image-toolbar>label:first-child{margin-right:auto}.moments-image-toolbar>button{font-size:12px;padding:6px 10px;white-space:nowrap}
.moments-image-frame{display:inline-block;position:relative;max-width:100%;vertical-align:top;box-shadow:0 6px 18px #1b38451a;line-height:0}.moments-image-frame>img{display:block;max-width:100%;max-height:55vh;width:auto;height:auto;border-radius:3px;user-select:none;-webkit-user-drag:none}
.moments-sticker-layer{position:absolute;inset:0;pointer-events:none}.moments-window .moments-sticker{position:absolute;display:block;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;border:0!important;border-radius:5px;background:transparent!important;box-shadow:none!important;padding:0!important;min-height:0!important;min-width:0!important;cursor:grab;line-height:0}.moments-sticker>img{display:block;width:100%;height:100%;pointer-events:none}.moments-sticker::after{content:'';position:absolute;inset:-9px}.moments-sticker[aria-pressed=true]{outline:1px dashed #236bca;outline-offset:2px}.moments-sticker.is-dragging{cursor:grabbing}
.moments-sticker-panel{border:1px solid #dbe6e8;border-radius:10px;background:white;padding:12px;margin-bottom:12px;text-align:left}.moments-sticker-panel-heading{display:flex;align-items:center;justify-content:space-between;color:#315766;font-size:13px;margin-bottom:9px}.moments-sticker-panel small{color:#80939b;font-size:11px}.moments-sticker-picker{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;max-height:190px;overflow:auto}.moments-window .moments-sticker-picker button{padding:7px 3px;font-size:12px;white-space:nowrap}.moments-sticker-picker button[aria-pressed=true]{color:#087f78;background:#eaf7f2;border-color:#61aea0}
.moments-sticker-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 10px;text-align:left}.moments-sticker-tools>span{font-size:12px;color:#607789}.moments-window .moments-sticker-tools button,.moments-window .moments-sticker-tools select{font-size:12px;padding:5px 7px}
.moments-sticker-proof{border-top:1px solid #e6edef;margin-top:12px;padding-top:12px;font-size:12px;color:#526d7b}.moments-sticker-proof p{margin:5px 0 8px;font-size:11px}.moments-sticker-proof label{display:grid;grid-template-columns:100px 1fr;align-items:center;gap:6px;margin:7px 0}.moments-sticker-proof input{width:100%;min-width:0;border:1px solid #d8e4e8;border-radius:6px;height:34px;padding:5px 8px;font:inherit}.moments-sticker-proof>div{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.moments-sticker-proof small{display:block;line-height:1.5}
@media(max-width:760px){.moments-image-frame>img{max-height:40vh}.moments-sticker-picker{grid-template-columns:repeat(3,minmax(0,1fr))}.moments-window .moments-sticker-picker button{min-height:38px}.moments-image-toolbar{gap:6px}.moments-image-toolbar label:first-child{flex:0 0 auto;min-width:118px}.moments-template-label{display:none}.moments-window .moments-image-toolbar select{font-size:13px;width:118px}.moments-window .moments-sticker-tools button,.moments-window .moments-sticker-tools select{min-height:34px}.moments-sticker-proof label{grid-template-columns:85px 1fr}.moments-sticker-proof input{font-size:16px}}


/* Keep admin ledger overrides after the shared workbench theme. */
.railway-pass-review-dialog { width: min(580px, calc(100vw - 24px)); max-height: 85vh; overflow: auto; padding: 16px; border: 1px solid #dce5f3; border-radius: 10px; color: #243b5e; background: #fff; }
.railway-pass-review-dialog::backdrop { background: #152b4666; }
.railway-pass-review-dialog header { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid #e1e8f1; padding-bottom: 10px; }
.railway-pass-review-dialog h3 { margin: 0 0 4px; font-size: 16px; }
.railway-pass-review-dialog small { color: #64748b; font-size: 12px; }
.railway-pass-review-project { font-size: 14px; font-weight: 600; margin: 10px 0 4px; overflow-wrap: anywhere; }
.railway-pass-review-dialog dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin: 14px 0; }
.railway-pass-review-dialog dl div { min-width: 0; display: flex; gap: 6px; align-items: baseline; }
.railway-pass-review-dialog dt { flex-shrink: 0; color: #64748b; font-size: 12px; }
.railway-pass-review-dialog dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.railway-pass-review-reason { display: grid; gap: 4px; padding: 9px 11px; margin: 9px 0; background: #fff7e8; color: #7c4a06; border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
#railwayPassSelectedFlow .shared-pass-selection-title.is-compact-header { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-width: 0; margin-bottom: 8px; }
#railwayPassSelectedFlow .is-compact-header > :is(strong,button,.railway-pass-void-stamp,.shared-pass-header-mode,em) { flex: none; white-space: nowrap; }
#railwayPassSelectedFlow .is-compact-header > .shared-pass-project-name { flex: 0 1 30%; min-width: 0; }
#railwayPassSelectedFlow .is-compact-header > .shared-pass-header-mode { font-size: 12px; color: #374d69; }
#railwayPassSelectedFlow .is-compact-header > .shared-pass-header-reason { flex: 1 1 120px; min-width: 0; padding: 3px 7px; border-radius: 5px; background: #fff7e8; color: #7c4a06; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#railwayPassSelectedFlow .is-compact-header > em { width: auto; margin-left: auto; }
@media (max-width: 1100px) {
  #railwayPassSelectedFlow .shared-pass-selection-title.is-compact-header { gap: 6px; }
  #railwayPassSelectedFlow .is-compact-header > .shared-pass-project-name { flex-basis: 15%; }
  #railwayPassSelectedFlow .is-compact-header > em { font-size: 10px; }
}
.railway-pass-review-history { margin: 12px 0 0; padding-left: 18px; font-size: 12px; }
.railway-pass-review-history li { padding: 8px 0; border-top: 1px solid #e1e8f1; overflow-wrap: anywhere; }
.railway-pass-review-history small { display: block; margin-top: 3px; }
.railway-pass-review-history p { margin: 4px 0 0; white-space: pre-wrap; }
.railway-pass-review-dialog [hidden] { display: none !important; }
.railway-pass-review-dialog { box-sizing: border-box; width: min(640px, calc(100vw - 24px)); }
.railway-pass-review-dialog button { cursor: pointer; min-height: 30px; padding: 4px 9px; font-size: 12px; }
.railway-pass-review-dialog button:disabled { opacity: .55; cursor: wait; }
.railway-pass-review-tabs { display: flex; gap: 4px; margin: 12px 0 4px; border-bottom: 1px solid #dce5f3; padding-bottom: 6px; }
.railway-pass-review-tabs button { flex: 1; border: 0; border-radius: 5px; background: #f4f7fc; color: #58708f; white-space: nowrap; }
.railway-pass-review-tabs button[aria-selected="true"] { background: #e8efff; color: #2457cd; font-weight: 600; }
.railway-pass-review-tabs button:focus-visible { outline: 2px solid #5084f5; outline-offset: 2px; }
.railway-pass-review-product { font-size: 12px; color: #506888; overflow-wrap: anywhere; }
.railway-pass-review-file-hint { background: #eef7ff; padding: 8px; border-radius: 5px; color: #375d8b; font-size: 12px; line-height: 1.5; }
.railway-pass-review-file-group h4 { font-size: 13px; margin: 12px 0 6px; }
.railway-pass-review-file-group h4 small { font-weight: 400; margin-left: 4px; }
.railway-pass-review-file-group details { margin-top: 6px; }
.railway-pass-review-file-group summary { color: #74849a; cursor: pointer; font-size: 12px; padding: 4px 0; }
.railway-pass-review-file { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #e8edf5; }
.railway-pass-review-file>div { flex: 1; min-width: 0; }
.railway-pass-review-file strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.railway-pass-review-file small { display: block; line-height: 1.5; overflow-wrap: anywhere; }
.railway-pass-review-file.is-superseded { background: #f8fafc; }
.railway-pass-review-file-actions { display: flex; gap: 4px; flex-shrink: 0; }
.railway-pass-review-history-file { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.railway-pass-review-history-file>span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.railway-pass-review-history .railway-pass-history-data { margin: 5px 0; gap: 4px 10px; }
.railway-pass-review-empty { padding: 18px 0; text-align: center; color: #70839d; font-size: 12px; }
.railway-pass-review-preview-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0; }
.railway-pass-review-preview-head strong { flex: 1; min-width: 80px; overflow-wrap: anywhere; font-size: 13px; }
.railway-pass-review-dialog [data-pass-review-preview-panel]>img { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; margin: auto; }
.railway-pass-review-dialog [data-pass-review-preview-panel]>iframe { display: block; width: 100%; height: 60vh; border: 1px solid #e2e8f0; }
.railway-pass-review-dialog [data-pass-review-preview-panel]>p { font-size: 12px; color: #70839d; }
.railway-pass-review-dialog > header { flex-wrap: wrap; gap: 6px; }
.railway-pass-review-dialog > header > div { flex: 1 1 250px; }
.railway-pass-review-dialog > header > div > small { display: block; }
.railway-pass-void-stamp { display: inline-block; flex: none; border: 2px double #a84141; border-radius: 4px; color: #a84141; padding: 2px 8px; margin: 4px 6px; font-size: 13px; line-height: 1.35; font-weight: 700; transform: rotate(-9deg); white-space: nowrap; }
.railway-pass-detail-action-dialog { box-sizing: border-box; width: min(430px, calc(100vw - 24px)); max-height: 85vh; overflow: auto; padding: 14px; border: 1px solid #dce5f3; border-radius: 10px; background: #fff; color: #243b5e; }
.railway-pass-detail-action-dialog::backdrop { background: #152b4666; }
.railway-pass-detail-action-dialog form { display: grid; gap: 10px; margin: 0; }
.railway-pass-detail-action-dialog header { display: flex; align-items: center; gap: 10px; }
.railway-pass-detail-action-dialog header > div { flex: 1; min-width: 0; }
.railway-pass-detail-action-dialog h3 { margin: 0 0 4px; font-size: 16px; }
.railway-pass-detail-action-dialog small { color: #64748b; font-size: 12px; }
.railway-pass-detail-action-dialog p { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.railway-pass-detail-action-dialog label { display: grid; gap: 5px; font-size: 13px; }
.railway-pass-detail-action-dialog input, .railway-pass-detail-action-dialog textarea, .railway-pass-detail-action-dialog select { box-sizing: border-box; width: 100%; min-width: 0; padding: 8px; border: 1px solid #cbd8ec; border-radius: 6px; font: inherit; }
.railway-pass-detail-action-dialog textarea { resize: vertical; }
.railway-pass-detail-action-dialog button { padding: 7px 12px; min-height: 32px; cursor: pointer; }
.railway-pass-detail-action-dialog footer { display: flex; justify-content: flex-end; }
.railway-pass-detail-action-dialog [data-pass-detail-action-error] { color: #b42318; background: #fff2ef; padding: 8px; border-radius: 5px; }
.railway-pass-detail-action-dialog [hidden] { display: none !important; }
.railway-pass-detail-action-dialog .pass-detail-action-source { padding: 8px; background: #f5f8fc; border-radius: 5px; }
.railway-pass-detail-action-dialog [data-pass-detail-action-submit] { color: #fff; background: #255de7; border: 0; border-radius: 6px; }
.railway-pass-detail-action-dialog [data-pass-detail-action-submit]:disabled { opacity: .6; cursor: wait; }
#railwayPassReports .railway-pass-batch-lines { min-width: 150px; max-width: 300px; overflow-wrap: anywhere; white-space: normal; }
#railwayPassReports .railway-pass-batch-lines summary { cursor: pointer; color: #2858b6; }
#railwayPassReports .railway-pass-batch-lines > div { margin-top: 8px; padding: 8px; border: 1px solid #dce5f3; border-radius: 6px; background: #f8faff; font-size: 12px; line-height: 1.6; }
@media (max-width: 480px) { .railway-pass-review-file, .railway-pass-review-history-file { flex-wrap: wrap; } .railway-pass-review-file-actions { flex-wrap: wrap; } }
/* Current tasks contain only this submission. Full history remains in details. */
#railwayPassStepModal.is-node-focused.is-node-slim .railway-pass-form { gap: 9px; padding: 10px 12px; }
#railwayPassStepModal.is-node-focused.is-node-slim .modal-bar { gap: 6px; padding: 10px 12px; }
#railwayPassStepModal.is-node-focused.is-node-slim .modal-bar>div { flex: 1; }
#railwayPassStepModal.is-node-focused.is-node-slim [data-pass-admin-node-details] { flex: none; min-height: 30px; padding: 4px 6px; font-size: 12px; white-space: nowrap; }
#railwayPassStepModal.is-node-focused.is-node-slim .customer-railway-step-workspace { gap: 9px; }
#railwayPassStepModal.is-node-focused.is-node-slim .customer-railway-step-evidence { padding: 8px; }
#railwayPassStepModal.is-node-focused.is-node-slim .pass-node-entry-limit { grid-column: 1 / -1; color: #63758e; font-size: 12px; line-height: 1.5; }
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry #railwayPassStepHistory,
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry #railwayPassPartialHistory,
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry #railwayPassStepEvidenceGrid,
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry .customer-railway-step-evidence-head { display: none !important; }
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry .customer-railway-step-evidence { border: 0; padding: 0; }
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry .customer-railway-step-upload { margin: 0; padding: 8px; }
@media (max-width: 480px) { .railway-pass-review-dialog dl div { display: block; } }
@media (min-width: 761px) {
  #railwayPassReports.view.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding-bottom: 0;
    overflow: hidden;
  }

  #railwayPassReports > .railway-pass-topbar {
    flex: 0 0 auto;
    min-width: 0;
  }

  #railwayPassReports > .railway-pass-ledger.panel {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
  }

  #railwayPassReports .railway-pass-ledger-head {
    flex: 0 0 auto;
    flex-wrap: wrap;
    min-width: 0;
    gap: 6px 14px;
  }

  #railwayPassReports .railway-pass-ledger-head > div:first-child {
    min-width: 0;
    flex-wrap: wrap;
    gap: 4px 10px;
    white-space: normal;
  }

  #railwayPassReports .railway-pass-toolbar {
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  #railwayPassReports .railway-pass-toolbar input {
    flex: 1 1 180px;
    min-width: 120px;
    width: auto;
  }

  #railwayPassReports #railwayPassSelectedFlow {
    flex: 0 0 auto;
    min-width: 0;
    max-height: min(230px, 30vh);
    margin: 8px 12px;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #railwayPassReports .railway-pass-table-wrap {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    max-height: none;
    overflow: auto;
    overscroll-behavior: contain;
  }

  #railwayPassReports .railway-pass-pagination {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    gap: 8px 14px;
    flex-wrap: wrap;
    font-size: 12px;
  }

  #railwayPassReports .railway-pass-pagination-actions {
    min-width: 0;
    margin-left: auto;
    flex-wrap: wrap;
    gap: 5px;
  }

  #railwayPassReports .railway-pass-pagination button { min-width: 52px; padding-right: 8px; padding-left: 8px; }
  #railwayPassReports .railway-pass-page-buttons { gap: 3px; }
  #railwayPassReports .railway-pass-page-buttons button { min-width: 26px; }
  #railwayPassReports .railway-pass-pagination select { width: 76px; min-width: 76px; }
  #railwayPassReports .railway-pass-page-jump input { width: 42px; }
}

@media (min-width: 761px) and (max-width: 1440px) {
  #railwayPassReports .railway-pass-toolbar { flex-basis: 100%; }
}

/* Short desktop windows must not fall back to scrolling the whole view. Keep
 * all controls available, with local scroll for long flow tracks / tables. */
@media (min-width: 761px) and (max-height: 680px) {
  #railwayPassReports > .railway-pass-topbar {
    /* The shared hero selector contains two :not(#id) specificity weights. */
    margin-top: 7px !important;
    margin-bottom: 7px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    gap: 7px 12px;
  }

  #railwayPassReports .railway-pass-topbar h1 { font-size: 22px; }
  #railwayPassReports .railway-pass-topbar p { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #railwayPassReports .railway-pass-stats button { height: 40px; padding-top: 5px; padding-bottom: 5px; }
  #railwayPassReports .railway-pass-ledger-head { padding: 5px 12px; }
  #railwayPassReports #railwayPassSelectedFlow {
    max-height: 24vh;
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 8px 10px;
  }
  #railwayPassReports .shared-pass-selection-title { margin-bottom: 6px; }
  #railwayPassReports .shared-pass-progress-head { margin-bottom: 8px; }
}

@media (min-width: 761px) and (max-height: 520px) {
  #railwayPassReports #railwayPassSelectedFlow { max-height: 18vh; }
}

@media (max-width: 760px) {
  #railwayPassReports.view.active {
    overflow-x: hidden;
    overflow-y: auto;
  }

  #railwayPassReports > .railway-pass-topbar,
  #railwayPassReports > .railway-pass-ledger.panel {
    flex: 0 0 auto;
    min-width: 0;
  }

  #railwayPassReports > .railway-pass-ledger.panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-auto-rows: auto;
    min-height: 0;
  }

  #railwayPassReports .railway-pass-ledger-head {
    height: auto;
    min-width: 0;
    gap: 8px;
    padding: 8px;
  }

  #railwayPassReports .railway-pass-ledger-head > div:first-child {
    flex-wrap: wrap;
    gap: 4px 8px;
    white-space: normal;
  }

  #railwayPassLedgerStats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  #railwayPassReports .railway-pass-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #railwayPassReports .railway-pass-toolbar :is(input, select, button) {
    width: 100%;
    min-width: 0;
  }

  #railwayPassKeyword, #railwayPassStage { grid-column: 1 / -1; }

  #railwayPassReports #railwayPassSelectedFlow { min-width: 0; }
  #railwayPassSelectedFlow .shared-pass-selection-title.is-compact-header { flex-wrap: wrap; }
  #railwayPassReports .railway-pass-table-wrap { max-height: min(420px, 55dvh); }

  #railwayPassReports .railway-pass-pagination {
    position: static;
    flex-wrap: wrap;
    gap: 6px;
  }

  #railwayPassReports :is(.railway-pass-pagination-summary, .railway-pass-pagination-actions) {
    min-width: 0;
    flex-wrap: wrap;
  }
}

.railway-pass-batch-items, .railway-pass-partial-history {
  min-width: 0; margin: 8px 0; padding: 10px 12px;
  border: 1px solid #dce7ef; border-radius: 10px; background: #f7fafc;
}
.railway-pass-batch-items summary, .railway-pass-partial-history summary { cursor: pointer; font-size: 13px; font-weight: 650; }
.railway-pass-batch-table { overflow-x: auto; max-width: 100%; margin-top: 8px; }
.railway-pass-batch-table table { width: 100%; border-collapse: collapse; font-size: 12px; }
.railway-pass-batch-table td, .railway-pass-batch-table th { padding: 7px 10px; text-align: left; border-bottom: 1px solid #e5edf3; }
.railway-pass-batch-items small, .railway-pass-partial-history small { display: block; color: #62748b; }
.railway-pass-partial-fields { display: grid; gap: 8px; grid-column: 1 / -1; padding: 10px; border: 1px solid #dce7ef; border-radius: 8px; background: #f3f8fc; }
.railway-pass-partial-fields > small { color: #61778a; }
.railway-pass-partial-fields > label { display: grid; grid-template-columns: minmax(0, 1fr) 95px; align-items: center; gap: 10px; font-size: 12px; }
.railway-pass-partial-fields input { min-width: 0; width: 100%; box-sizing: border-box; }
.railway-pass-partial-history ol { max-height: 260px; overflow-y: auto; padding-left: 22px; font-size: 12px; }
.railway-pass-partial-history li { margin: 7px 0; }
/* Keep the original company legible in the compact product price editor. */
#railwayProducts .railway-company-editor-cell > span,
#railwayProducts .railway-company-editor-cell > small { display:block; white-space:normal; overflow-wrap:anywhere; }
#railwayProducts .railway-company-editor-cell > small { color:#7b8aa0; font-size:11px; margin-top:2px; }

/* Short workflows show cumulative shipment / settlement facts beside new entry. */
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry.is-short-flow #railwayPassStepHistory:not([hidden]),
#railwayPassStepModal.is-node-focused.is-node-slim.is-current-entry.is-short-flow #railwayPassPartialHistory:not([hidden]) { display: block !important; }
#railwayPassStepModal.is-short-flow [data-pass-short-progress] { grid-column: 1 / -1; }
#railwayPassStepModal.is-short-flow .railway-pass-tracking-list { grid-column: 1 / -1; min-width: 0; }
[data-pass-archived-history] { margin-top: 10px; }
[data-pass-archived-history] > summary { cursor: pointer; color: #526780; font-weight: 600; }


/* Only the two over-order ledgers use this fixed, locally resizable grid. */
table.railway-pass-resizable-ledger { table-layout:fixed; border-collapse:separate; border-spacing:0; max-width:none; }
table.railway-pass-resizable-ledger>thead>tr>th,
table.railway-pass-resizable-ledger>tbody>tr>td { box-sizing:border-box; min-width:0; max-width:none; padding:10px 12px; white-space:normal; overflow-wrap:anywhere; }
table.railway-pass-resizable-ledger>thead>tr>th { position:sticky; padding-right:20px; overflow:visible; }
table.railway-pass-resizable-ledger>tbody>tr>td>small { display:block; margin-top:4px; line-height:1.45; }
table.railway-pass-resizable-ledger .railway-ledger-resize-handle { position:absolute; z-index:6; inset:0 -4px 0 auto; display:block; width:12px; min-width:12px; max-width:12px; height:100%; min-height:24px; margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; cursor:col-resize; touch-action:none; }
table.railway-pass-resizable-ledger .railway-ledger-resize-handle::after { content:""; position:absolute; top:20%; bottom:20%; left:5px; width:2px; border-radius:2px; background:#d2dce9; }
table.railway-pass-resizable-ledger .railway-ledger-resize-handle:hover::after,
table.railway-pass-resizable-ledger .railway-ledger-resize-handle:focus-visible::after { background:#3166c3; }
table.railway-pass-resizable-ledger .railway-ledger-resize-handle:focus-visible { outline:2px solid #3166c3; outline-offset:-2px; }
html.is-resizing-pass-column,html.is-resizing-pass-column * { cursor:col-resize!important; user-select:none!important; }
table.railway-pass-resizable-ledger .railway-ledger-code { display:flex; align-items:center; gap:5px; min-width:0; }
table.railway-pass-resizable-ledger .railway-ledger-code>span { min-width:0; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
table.railway-pass-resizable-ledger [data-ledger-copy-code] { display:inline-grid; flex:0 0 24px; place-items:center; width:24px; min-width:24px; height:24px; min-height:24px; margin:0; padding:3px; border:1px solid #c8dbed; border-radius:5px; background:#f4f8fd; color:#42678e; cursor:pointer; }
table.railway-pass-resizable-ledger [data-ledger-copy-code] svg { display:block; width:13px; height:13px; }
table.railway-pass-resizable-ledger [data-copy-state="copied"] { border-color:#94cdb9; background:#eef9f3; color:#257a5e; }
table.railway-pass-resizable-ledger .railway-ledger-category { display:block; color:#4f6076; }
table.railway-pass-resizable-ledger .railway-ledger-model { display:block; margin-top:4px; color:#748297; font-size:12px; overflow-wrap:anywhere; }
table.railway-pass-resizable-ledger [data-pass-batch-toggle] { min-height:28px; max-width:100%; padding:3px 7px; white-space:normal; text-align:left; }
table.railway-pass-resizable-ledger>tbody>tr.railway-ledger-batch-detail>td { background:#f8fbff; border-bottom:1px solid #e4edf7; font-size:12px; }
table.railway-pass-resizable-ledger>tbody>tr.railway-ledger-batch-detail[hidden] { display:none!important; }
table.railway-pass-resizable-ledger>tbody>tr.railway-ledger-batch-detail>td:first-child { color:#6e829b; }
@media(max-width:760px) {
  table.railway-pass-resizable-ledger .railway-ledger-resize-handle { width:16px; min-width:16px; max-width:16px; right:-6px; }
  table.railway-pass-resizable-ledger .railway-ledger-resize-handle::after { left:7px; }
  table.railway-pass-resizable-ledger [data-ledger-copy-code] { height:30px; min-height:30px; }
}

/* Retire the previous eight-column percentage contract only on the new keyed ledger. */
body.customer-portal #customer#customer #customerRailwayManagementView table.customer-railway-management-table.railway-pass-resizable-ledger {
  width:var(--ledger-table-width)!important; min-width:var(--ledger-table-width)!important; max-width:none!important;
}
body.customer-portal #customer#customer #customerRailwayManagementView table.customer-railway-management-table.railway-pass-resizable-ledger>colgroup>col[data-ledger-column] { width:var(--ledger-column-width)!important; }
body.customer-portal #customer#customer #customerRailwayManagementView table.customer-railway-management-table.railway-pass-resizable-ledger>:is(thead,tbody)>tr>:is(th,td)[data-ledger-column] { width:auto!important; min-width:0!important; max-width:none!important; }
body.customer-portal #customer#customer #customerRailwayManagementView table.customer-railway-management-table.railway-pass-resizable-ledger>thead>tr>th[data-ledger-column] { padding-right:20px; }
body.customer-portal #customer#customer #customerRailwayManagementView table.railway-pass-resizable-ledger>tbody>tr.customer-pass-item-row>td { background:#f8fbff; border-bottom:1px solid #e4edf7; font-size:12px; }
/* Badges must honor a user's narrowed column instead of painting over its neighbour. */
table.railway-pass-resizable-ledger :is(.railway-pass-stage,.customer-railway-report-stage) { box-sizing:border-box; max-width:100%; white-space:normal; overflow-wrap:anywhere; }


.pass-order-clock{display:inline-flex;white-space:nowrap;align-items:center;margin:4px 0;padding:3px 8px;border:1px solid #b7dace;border-radius:5px;background:#effaf6;color:#24725c;font-size:12px;line-height:1.5;cursor:pointer}.pass-order-clock.is-warning{background:#fff7e8;color:#9b640d;border-color:#f2d7a5}.pass-order-clock.is-danger{background:#fff0ef;color:#b63229;border-color:#f3b8b4}.pass-document-dialog{box-sizing:border-box;width:min(1000px,94vw);max-height:92dvh;padding:0;border:1px solid #dbe4f0;border-radius:14px;color:#23364c;box-shadow:0 20px 90px #102b4f44}.pass-document-dialog::backdrop{background:#14273b66}.pass-document-dialog>header{display:flex;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid #e6ecf4;position:sticky;top:0;background:#fff;z-index:1}.pass-document-dialog h2{margin:0;font-size:21px}.pass-document-dialog header p{margin:7px 0 0;color:#6d8097;font-size:13px}.pass-document-dialog>main{padding:20px 24px}.pass-document-dialog>footer{display:flex;justify-content:flex-end;gap:10px;padding:14px 24px;border-top:1px solid #e6ecf4;position:sticky;bottom:0;background:#fff}.pass-document-dialog button{border:1px solid #cfdbea;border-radius:7px;padding:8px 14px;background:#fff;color:#305a89;cursor:pointer}.pass-document-dialog button.primary{background:#315ce2;color:white;border-color:#315ce2}.pass-document-dialog button:disabled{opacity:.6;cursor:wait}.pass-document-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.pass-document-form label{display:flex;flex-direction:column;gap:7px;font-size:14px}.pass-document-form .is-wide{grid-column:1/-1}.pass-document-dialog input:not([type=checkbox]),.pass-document-dialog select,.pass-document-dialog textarea{box-sizing:border-box;border:1px solid #d1ddec;border-radius:7px;padding:10px;font:inherit;min-width:0;width:100%;background:#fff;color:#23364c}.pass-document-dialog textarea{min-height:80px}.pass-document-dialog small{font-size:12px;color:#74849a}.pass-document-table{overflow:auto;max-height:310px;border:1px solid #e0e7f1;border-radius:8px}.pass-document-table table{width:100%;border-collapse:collapse;min-width:520px;font-size:13px}.pass-document-table th{background:#f3f6fb;position:sticky;top:0;text-align:left}.pass-document-table th,.pass-document-table td{padding:10px;border-bottom:1px solid #e7edf5}.pass-document-table td small{display:block;margin-top:4px;max-width:300px}.pass-document-table td:last-child{width:150px}.pass-document-dialog .pass-document-totals{padding:12px;background:#edf6ff;border-radius:7px;font-weight:600}.pass-document-dialog .is-danger,.pass-document-error{color:#b52e2a}.pass-document-error{margin:0 24px 12px;padding:10px;background:#fff0ef;white-space:pre-wrap}.pass-document-hint{font-size:12px;color:#75869b}.pass-document-tools{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:8px 0}.pass-document-tools small{color:#6e8299}.pass-deadline-summary{display:flex;flex-direction:column;gap:10px;padding:14px;background:#f3f7fc;border-radius:9px;margin-bottom:16px}.pass-document-dialog article{padding:12px 0;border-bottom:1px solid #e3eaf3}.pass-document-dialog article span{display:block;margin-top:6px}@media(max-width:650px){.pass-document-dialog{width:98vw;max-height:96dvh}.pass-document-dialog>main{padding:14px}.pass-document-dialog>header,.pass-document-dialog>footer{padding:12px 14px}.pass-document-dialog h2{font-size:18px}.pass-document-form{grid-template-columns:1fr}.pass-document-form .is-wide{grid-column:auto}.pass-document-dialog>footer button{flex:1;font-size:13px;padding:10px 6px}.pass-document-dialog header p{max-width:260px}.pass-document-error{margin:0 14px 10px}}

.pass-document-dialog [hidden]{display:none!important}

@media(max-width:650px){.pass-document-table table{min-width:0}.pass-document-table thead{display:none}.pass-document-table tbody{display:block}.pass-document-table tbody tr{display:grid;grid-template-columns:24px minmax(0,1fr)112px;align-items:center;border-bottom:1px solid #e1e8f1;padding:8px 6px;gap:3px 6px}.pass-document-table td{padding:3px 0;border:0;min-width:0}.pass-document-table td:first-child{grid-column:1;grid-row:1/3}.pass-document-table td:nth-child(2){grid-column:2;grid-row:1;overflow-wrap:anywhere}.pass-document-table td:nth-child(3){grid-column:2;grid-row:2;color:#76879b;font-size:12px;overflow-wrap:anywhere}.pass-document-table td:last-child{grid-column:3;grid-row:1/3;width:auto}.pass-document-table td:last-child:before{content:"分配（元）";display:block;color:#6e8098;font-size:12px;margin-bottom:4px}.pass-document-table td small{max-width:none}.pass-document-dialog>header p{max-width:none}.pass-document-dialog h3{font-size:15px}}

.pass-document-dialog>header>div{min-width:0;flex:1}.pass-document-dialog>header>button{flex:0 0 auto;white-space:nowrap;align-self:flex-start}

/* Compact financial document editor, shared by desktop and phone. */
.pass-document-dialog { width:min(960px,calc(100vw - 24px)); max-height:85dvh; overflow:hidden; }
.pass-document-dialog[open] { display:flex; flex-direction:column; }
.pass-document-dialog>header { flex:none; padding:12px 16px; position:static; }
.pass-document-dialog h2 { font-size:18px; }
.pass-document-dialog header p { margin-top:4px; font-size:12px; }
.pass-document-dialog>main { min-height:0; overflow:auto; padding:12px 16px; }
.pass-document-dialog>footer { flex:none; position:static; padding:10px 16px; flex-direction:column; align-items:stretch; gap:9px; }
.pass-payment-modes { display:flex; gap:5px; padding:9px 16px; border-bottom:1px solid #e4eaf3; background:#f8faff; flex:none; }
.pass-payment-modes button { flex:1; min-width:0; border:1px solid transparent; background:transparent; color:#657894; border-radius:6px; padding:8px 10px; font-size:13px; cursor:pointer; white-space:nowrap; }
.pass-payment-modes button[aria-pressed=true] { color:#2556d5; border-color:#cbdafa; background:#fff; font-weight:650; box-shadow:0 1px 3px #2945720a; }
.pass-payment-modes button:focus-visible { outline:2px solid #4f7bed; outline-offset:1px; }
.pass-document-surface { min-width:0; color:#263b54; font-size:13px; }
.pass-document-surface [hidden],#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace [hidden] { display:none!important; }
.pass-document-surface label { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:13px; color:#526984; }
.pass-document-surface input:not([type=checkbox]):not([type=file]),.pass-document-surface select { box-sizing:border-box; min-width:0; width:100%; height:38px; padding:6px 9px; border:1px solid #d6e0ed; border-radius:6px; background:#fff; color:#233b58; font:inherit; }
.pass-document-surface input[type=checkbox] { width:15px; height:15px; margin:0; flex:none; accent-color:#315ce2; }
.pass-document-entry-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; }
.pass-document-reference { grid-column:span 1; }
.pass-document-upload { grid-column:span 2; display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; min-width:0; }
.pass-document-add-file { position:relative; flex:none; display:inline-flex!important; cursor:pointer; }
.pass-document-add-file input { position:absolute; inset:0; width:100%; opacity:0; cursor:pointer; }
.pass-document-add-file span { display:block; padding:8px 12px; border:1px dashed #a8c0ed; border-radius:6px; background:#f8fbff; color:#315fd0; }
.pass-document-add-file:focus-within { outline:2px solid #4f7bed; border-radius:6px; }
.pass-document-surface small { font-size:11px; color:#7b8ca3; }
.pass-document-files { flex-basis:100%; display:flex; flex-wrap:wrap; gap:5px; }
.pass-document-files>div { display:flex; align-items:center; min-width:0; max-width:210px; border:1px solid #e1e7f1; border-radius:5px; padding:3px; gap:3px; }
.pass-document-files a { display:flex; align-items:center; gap:5px; min-width:0; color:#426185; text-decoration:none; }
.pass-document-files a span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.pass-document-files img,.pass-document-files a>b { flex:none; width:30px; height:30px; object-fit:contain; border-radius:3px; background:#f3f6fb; font-size:10px; }
.pass-document-files button { flex:none; border:0; background:none; padding:4px; color:#74859c; cursor:pointer; }
.pass-document-check { grid-column:1 / -1; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.pass-document-check label { display:flex; flex-direction:row; align-items:center; flex:none; gap:6px; }
.pass-document-check>input { flex:1; min-width:180px!important; }
.pass-document-note { grid-column:1 / -1; display:grid!important; grid-template-columns:88px minmax(0,1fr); align-items:center; }
.pass-document-source { margin-bottom:10px; display:grid!important; grid-template-columns:100px minmax(0,1fr); align-items:center; }
.pass-document-source-summary { display:flex; flex-wrap:wrap; align-items:center; gap:5px 14px; border:1px solid #dbe5f6; border-radius:7px; background:#f7faff; padding:10px 12px; margin-bottom:12px; }
.pass-document-source-summary small { flex-basis:100%; overflow-wrap:anywhere; }
.pass-document-list-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:12px 0 8px; }
.pass-document-list-head strong { font-size:14px; white-space:nowrap; }
.pass-document-list-head input { max-width:300px; height:34px!important; }
.pass-document-surface .pass-document-table { max-height:260px; }
.pass-document-surface .pass-document-table table { font-size:12px; min-width:0; }
.pass-document-surface .pass-document-table th,.pass-document-surface .pass-document-table td { padding:8px 10px; }
.pass-document-surface .pass-document-table td:first-child { width:28px; }
.pass-document-surface .pass-document-table td:nth-child(2) { width:43%; }
.pass-document-surface .pass-document-table td:nth-child(3) { max-width:230px; overflow-wrap:anywhere; }
.pass-document-surface .pass-document-table td:last-child { width:135px; }
.pass-document-surface .pass-document-table td small { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-top:3px; }
.pass-document-surface .pass-document-table input[name=allocation] { height:34px; text-align:right; font-variant-numeric:tabular-nums; }
.pass-document-table em { font-size:11px; font-style:normal; color:#7788a0; }
.pass-document-table [data-empty] { font-size:12px; text-align:center; color:#8492a6; padding:12px; }
.pass-document-totals { display:flex; flex-wrap:wrap; gap:5px 20px; margin:0!important; padding:8px 10px!important; border-radius:6px; background:#f1f6ff; font-size:12px; font-weight:400!important; }
.pass-document-totals span { white-space:nowrap; }
.pass-document-totals b { color:#2b4e80; font-variant-numeric:tabular-nums; }
.pass-document-totals .is-danger,.pass-document-totals .is-danger b { color:#c23a33; }
.pass-document-actions { display:flex; justify-content:flex-end; gap:8px; }
.pass-document-actions button { min-height:36px; padding:7px 18px; border:1px solid #d1ddec; background:#fff; border-radius:6px; color:#496180; font-size:13px; cursor:pointer; }
.pass-document-actions button.primary { background:#315ce2; color:#fff; border-color:#315ce2; }
.pass-document-surface button:disabled { opacity:.5; cursor:not-allowed; }
.pass-document-hint { margin:8px 0 0; font-size:11px; line-height:1.5; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace { box-sizing:border-box; inline-size:min(960px,calc(100vw - 24px))!important; width:min(960px,calc(100vw - 24px))!important; max-width:calc(100vw - 24px)!important; max-height:85dvh!important; overflow:hidden!important; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-form { display:flex!important; flex-direction:column!important; max-height:85dvh!important; min-height:0; margin:0; overflow:hidden; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-form>header { flex:none; padding:10px 16px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-body { flex:1; min-height:0; padding:12px 16px!important; gap:10px!important; overflow:auto!important; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-modes { padding:8px 16px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-modes button { width:auto; min-height:36px; height:auto; margin:0; font-size:13px; padding:7px 10px; box-shadow:none; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace:not([data-pass-payment-mode=single]) .customer-railway-step-body>:not(.pass-payment-panel) { display:none!important; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px 12px; margin:0; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields>label { min-width:0; margin:0; gap:5px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields>label>span { font-size:13px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields input:not([type=checkbox]),#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields select { box-sizing:border-box; width:100%; min-height:38px!important; height:38px!important; padding:6px 9px!important; font-size:14px; border-radius:6px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields>label:has([data-customer-step-field=payment_method])>small { display:none; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-workspace { margin:0; gap:6px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-evidence { padding:0; border:0; background:transparent; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-evidence-head { display:none; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-upload { padding:8px 10px!important; min-height:58px!important; margin:0; display:grid; grid-template-columns:30px 1fr; gap:2px 8px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-upload>b { width:28px; height:28px; border-radius:6px; font-size:20px; grid-row:1/3; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-upload>strong { font-size:13px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-upload>small { font-size:11px; line-height:1.4; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-footer { flex:none; border-top:1px solid #e3e9f3; background:#fff; padding:10px 16px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-footer>footer { padding:0; border:0; background:none; display:grid; gap:9px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-single-total { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; font-size:13px; color:#576d88; margin-bottom:8px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-single-total b { color:#2b4e80; font-size:16px; font-variant-numeric:tabular-nums; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-single-total small { color:#7e8fa6; font-size:11px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions { position:static!important; display:flex; justify-content:flex-end; flex:none; gap:8px; padding:0!important; margin:0; border:0; background:none; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions button,#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-document-actions button { flex:0 0 auto; min-width:110px; min-height:36px; height:auto; margin:0; padding:7px 16px; border-radius:6px; font-size:13px; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions .ghost { border:1px solid #d1ddec; color:#496180; background:#fff; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-document-error { margin:8px 0; padding:8px; font-size:12px; }
@media(max-width:650px) {
  .pass-document-dialog { width:calc(100vw - 12px); max-height:94dvh; }
  .pass-payment-modes { gap:2px; padding:8px 10px; }
  .pass-payment-modes button { padding:8px 5px; font-size:12px; }
  .pass-document-entry-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 10px; }
  .pass-document-reference { grid-column:auto; }
  .pass-document-upload,.pass-document-check,.pass-document-note { grid-column:1 / -1; }
  .pass-document-note,.pass-document-source { grid-template-columns:1fr; gap:5px; }
  .pass-document-source-summary { display:grid; gap:5px; font-size:12px; }
  .pass-document-source-summary span { line-height:1.7; }
  .pass-document-check>input { min-width:100%!important; }
  .pass-document-list-head { gap:6px; }
  .pass-document-list-head input { font-size:12px!important; max-width:210px; }
  .pass-document-surface .pass-document-table { max-height:280px; }
  .pass-document-surface .pass-document-table tbody tr { grid-template-columns:20px minmax(0,1fr)102px; padding:7px 6px; gap:3px 6px; }
  .pass-document-surface .pass-document-table td { padding:2px 0; width:auto!important; max-width:none!important; }
  .pass-document-surface .pass-document-table td:nth-child(2) { font-size:11px; }
  .pass-document-surface .pass-document-table td:nth-child(3) { font-size:11px; }
  .pass-document-surface .pass-document-table td:last-child:before { content:'本次分配（元）'; font-size:10px; }
  .pass-document-totals { gap:4px 12px; font-size:11px; padding:7px 8px!important; }
  .pass-document-totals>span:first-child { flex-basis:100%; }
  .pass-document-actions button { flex:1; min-height:42px; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace { inline-size:calc(100vw - 12px)!important; width:calc(100vw - 12px)!important; max-width:calc(100vw - 12px)!important; max-height:94dvh!important; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-form { max-height:94dvh!important; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-body { padding:10px!important; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-modes { padding:8px 10px; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-modes button { font-size:12px; min-height:40px; padding:8px 5px; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px 10px; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields>label:has([data-customer-step-field=action_date]) { grid-column:1 / -1; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields input:not([type=checkbox]),#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace #customerRailwayStepFields select,.pass-document-surface input:not([type=checkbox]):not([type=file]),.pass-document-surface select { height:42px!important; min-height:42px!important; font-size:16px; }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-payment-footer { padding:9px 10px; padding-bottom:max(9px,env(safe-area-inset-bottom)); }
  #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions button,#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .pass-document-actions button { flex:1; min-height:42px; min-width:0; }
}

#customerRailwayStepDialog.pass-payment-workspace .pass-payment-local-thumb { flex:none; width:32px; height:32px; object-fit:contain; border-radius:4px; border:1px solid #e0e7f1; background:#fff; }
/* Existing customer button rules must not turn the compact action row into two rows. */
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions { display:flex!important; flex-direction:row!important; flex-wrap:nowrap!important; align-items:center; }
#customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions button { width:auto!important; inline-size:auto!important; flex:0 0 auto!important; }
#customerRailwayStepDialog.pass-payment-workspace #customerRailwaySelectedFiles button { border:1px solid #d6e0ee; border-radius:5px; background:#fff; box-shadow:none; color:#536d8e; padding:5px 9px; font-size:12px; }
@media(max-width:650px) {
 #customerRailwayStepDialog#customerRailwayStepDialog#customerRailwayStepDialog.pass-payment-workspace .customer-railway-step-actions button { flex:1 1 0!important; }
}

.pass-logistics-dialog{max-width:640px;width:calc(100vw - 28px)}
.pass-logistics-dialog main>p,.pass-logistics-current>small{font-size:12px;color:#64748b}
.pass-logistics-dialog form{display:flex;gap:8px}.pass-logistics-dialog form input{min-width:0;flex:1}
.pass-logistics-dialog [data-options]{max-height:300px;overflow:auto}
.pass-logistics-option{display:flex;flex-direction:row;gap:10px;padding:10px;border-bottom:1px solid #e2e8f0;align-items:center}
.pass-logistics-option input{width:auto}.pass-logistics-option span,.pass-logistics-option small{display:block}
.pass-logistics-edit-row{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end;margin:8px 0}
.pass-logistics-edit-row input,.pass-logistics-edit-row select{min-width:0;width:100%}
.pass-logistics-current{padding:10px;margin:8px 0;border:1px solid #dbe5f2;border-radius:10px;background:#f8fbff;font-size:12px}
.pass-logistics-current>strong,.pass-logistics-current>small{display:block;margin-bottom:6px}.pass-logistics-current em{display:block;color:#ad6200}
@media(max-width:480px){.pass-logistics-edit-row{grid-template-columns:1fr}.pass-logistics-dialog{max-height:92dvh}.pass-logistics-dialog [data-options]{max-height:44dvh}}
/* One compact, clickable status/deadline line, including the phone ledger. */
.pass-order-clock.pass-stage-clock{display:inline-flex;flex-wrap:nowrap;max-width:100%;min-width:0;gap:0;margin:0;padding:3px 5px;font-size:12px;line-height:1.5;vertical-align:middle;box-sizing:border-box;white-space:nowrap}
.pass-stage-clock .pass-clock-stage{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pass-stage-clock .pass-clock-divider,.pass-stage-clock [data-pass-clock-value]{flex:none;white-space:nowrap}
.pass-report-cancel,.collector-dialog button.pass-report-cancel{border:1px solid #efb8b1!important;background:#fff7f5!important;color:#a94c40!important;border-radius:6px}


.pass-sms-dialog {
  box-sizing: border-box; width: min(1080px, calc(100vw - 32px));
  max-width: calc(100vw - 32px); max-height: min(90vh, 920px);
  padding: 0; border: 1px solid #dce5f2; border-radius: 18px; color: #243852;
  background: #fff; box-shadow: 0 24px 80px #142e5450;
}
.pass-sms-dialog::backdrop { background: #15223980; }
.pass-sms-dialog > header {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid #e0e7f2;
}
.pass-sms-dialog h3 { margin: 0 0 5px; font-size: 21px; }
.pass-sms-dialog header p { margin: 0; color: #70839e; font-size: 13px; }
.pass-sms-dialog header button { flex-shrink: 0; }
.pass-sms-body { padding: 14px 22px 22px; max-height: calc(90vh - 112px); overflow-y: auto; }
.pass-sms-body > p { margin: 0 0 12px; font-size: 13px; color: #657c9c; }
.pass-sms-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.pass-sms-tabs button.active { color: #2451ce; background: #eaf0ff; border-color: #c1d1ff; }
.pass-sms-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pass-sms-toolbar input { flex: 1 1 230px; min-width: 0; }
.pass-sms-toolbar select { width: 155px; }
.pass-sms-toolbar :is(input,select,button), .pass-sms-company-controls input:not([type="checkbox"]) { height: 40px; box-sizing: border-box; }
.pass-sms-body [data-pass-sms-status] { margin-top: 10px; min-height: 18px; }
.pass-sms-body [data-pass-sms-status].is-error { color: #b63b2b; }
.pass-sms-body [data-pass-sms-summary] { font-size: 13px; color: #607798; margin: 0 0 12px; }
.pass-sms-body :is([data-pass-sms-record-list],[data-pass-sms-company-list]) { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pass-sms-record, .pass-sms-company { min-width: 0; padding: 14px; border: 1px solid #dfe7f2; border-radius: 12px; background: #fbfcff; overflow-wrap: anywhere; }
.pass-sms-record-top { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.pass-sms-record-top strong { min-width: 0; font-size: 14px; }
.pass-sms-record p, .pass-sms-company p { margin: 9px 0 0; font-size: 13px; line-height: 1.6; }
.pass-sms-muted { color: #697f9e; font-size: 13px; }
.pass-sms-state { flex-shrink: 0; font-size: 12px; padding: 3px 8px; border-radius: 20px; background: #e8eff8; color: #526e93; white-space: nowrap; }
.pass-sms-state.is-delivered { color: #267644; background: #e7f5ec; }
.pass-sms-state.is-failed { color: #b73a2d; background: #ffebe7; }
.pass-sms-state:is(.is-blocked,.is-unknown) { color: #96601a; background: #fff2d9; }
.pass-sms-reason { color: #925f23; display: block; font-size: 12px; line-height: 1.6; }
.pass-sms-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.pass-sms-actions:empty { display: none; }
.pass-sms-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.pass-sms-pagination span { margin-right: auto; color: #657c9c; font-size: 13px; }
.pass-sms-empty { grid-column: 1 / -1; padding: 32px 8px; text-align: center; color: #7b8da7; }
.pass-sms-company-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin: 12px 0 8px; }
.pass-sms-company-controls > label:first-child { display: flex; flex-direction: column; gap: 5px; flex: 1 1 130px; min-width: 0; font-size: 12px; }
.pass-sms-company-controls > label:first-child input { min-width: 0; width: 100%; }
.pass-sms-company-controls .pass-sms-toggle { display: flex; align-items: center; gap: 5px; min-height: 40px; font-size: 12px; }
.pass-sms-company-controls input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.pass-sms-row-link { display: block; padding: 3px 0; border: 0; background: none; color: #5577a6; font-size: 12px; text-align: left; cursor: pointer; }
.pass-sms-row-link:hover { text-decoration: underline; }
.pass-sms-dialog [hidden] { display: none !important; }
@media (max-width: 680px) {
  .pass-sms-dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: 94vh; border-radius: 12px; }
  .pass-sms-dialog > header { padding: 14px 12px; gap: 8px; }
  .pass-sms-dialog h3 { font-size: 18px; }
  .pass-sms-body { padding: 12px; max-height: calc(94vh - 110px); }
  .pass-sms-body :is([data-pass-sms-record-list],[data-pass-sms-company-list]) { grid-template-columns: minmax(0,1fr); }
  .pass-sms-toolbar input { flex-basis: 100%; width: 100%; }
  .pass-sms-toolbar select { flex: 1; width: auto; min-width: 100px; }
  .pass-sms-dialog button { font-size: 13px; }
}


dialog.customer-display-incidents {
  width: min(1280px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  color: #263954;
  background: #fff;
  border: 1px solid #dce5f1;
  border-radius: 18px;
  box-shadow: 0 24px 90px #1c315f33;
  overflow: auto;
}
.customer-display-incidents::backdrop { background: #18294375; }
.customer-display-incidents [hidden] { display: none !important; }
.customer-display-incidents button { white-space: nowrap; }
.customer-display-incidents button:disabled { opacity: .48; cursor: not-allowed; }
.customer-display-incidents button:focus-visible,
.customer-display-incidents input:focus-visible,
.customer-display-incidents select:focus-visible,
.customer-display-incidents textarea:focus-visible { outline: 3px solid #b8c8ff; outline-offset: 2px; }
.display-incidents-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; background: #f7f9fe; border-bottom: 1px solid #e1e8f3; }
.display-incidents-header h2 { margin: 0; font-size: 23px; }
.display-incidents-header p { margin: 7px 0 0; color: #687d9e; font-size: 14px; }
.display-incidents-content { padding: 20px 24px 24px; }
.display-incident-counts { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.display-incident-counts > span { display: inline-flex; align-items: center; gap: 30px; min-width: 140px; padding: 11px 16px; color: #667c9e; border: 1px solid #e1e8f3; border-radius: 10px; background: #f8faff; font-size: 13px; }
.display-incident-counts strong { color: #263954; font-size: 21px; }
.display-incident-filters { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-bottom: 14px; }
.display-incident-search { flex: 1 1 280px; }
.display-incident-filters input, .display-incident-filters select { width: 100%; min-height: 40px; box-sizing: border-box; padding: 9px 12px; border: 1px solid #d7e1f1; border-radius: 9px; background: #fff; color: #263954; font: inherit; }
.display-incident-filters select { min-width: 132px; }
.display-incident-message { padding: 10px 13px; color: #1b6b64; background: #eaf7f3; border: 1px solid #ccece2; border-radius: 9px; }
.display-incident-message.is-error { color: #a82c2c; background: #fff3f2; border-color: #f2d4cf; }
.display-incident-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.display-incident-bulk > span { min-width: 77px; font-size: 13px; color: #526b91; }
.display-incident-bulk small { color: #7488a6; }
.display-incident-bulk button { font-size: 13px; padding: 7px 10px; }
.display-incident-table { overflow: auto; border: 1px solid #e1e8f3; border-radius: 11px; }
.display-incident-table table { width: 100%; border-collapse: collapse; table-layout: auto; min-width: 940px; font-size: 13px; }
.display-incident-table th, .display-incident-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #edf1f7; vertical-align: middle; }
.display-incident-table th { background: #f4f7fc; color: #637c9f; font-weight: 600; white-space: nowrap; }
.display-incident-table th:first-child, .display-incident-table td:first-child { width: 30px; text-align: center; }
.display-incident-table td:nth-child(3) { max-width: 220px; overflow-wrap: anywhere; }
.display-incident-table td:nth-child(6) { white-space: nowrap; }
.display-incident-table tr:last-child td { border-bottom: 0; }
.display-incident-table tbody tr:nth-child(even) { background: #fafbfe; }
.display-incident-table small { display: block; margin-top: 5px; color: #7f90a9; }
.display-incident-table input[type=checkbox], .display-incident-check input[type=checkbox] { width: 16px; height: 16px; accent-color: #4059d5; }
.display-incident-link { border: 0; padding: 0; color: #4059d5; background: none; font: inherit; cursor: pointer; text-align: left; }
.display-incident-link:hover { text-decoration: underline; }
.display-incident-status { display: inline-block; padding: 5px 8px; border-radius: 7px; font-size: 12px; white-space: nowrap; background: #fff4dc; color: #986313; }
.display-incident-status.is-resolved { background: #e9f6ee; color: #347b50; }
.display-incident-status.is-escalated { background: #eef0ff; color: #535ea9; }
.display-incident-table td.display-incident-empty { padding: 34px 16px; text-align: center; color: #7c8ca7; }
.display-incident-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 13px; font-size: 13px; color: #6b7f9e; }
.display-incident-pagination > span { margin-right: auto; }
.display-incident-editor { margin-top: 22px; padding: 20px; border: 1px solid #d6e0fc; border-radius: 12px; background: #fafbff; }
.display-incident-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.display-incident-editor h3 { margin: 0; font-size: 18px; }
.display-incident-editor header p { margin: 7px 0 16px; color: #6e82a4; overflow-wrap: anywhere; }
.display-incident-current, .display-incident-preview { margin: 12px 0; padding: 14px; border: 1px solid #e0e7f4; border-radius: 9px; background: white; }
.display-incident-current strong, .display-incident-preview strong { font-size: 13px; color: #6b7f9e; }
.display-incident-current p, .display-incident-preview p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.display-incident-preview { background: #eef8f3; border-color: #d6ebde; }
.display-incident-editor form > label { display: block; margin-top: 15px; font-weight: 600; font-size: 14px; }
.display-incident-editor textarea { display: block; box-sizing: border-box; width: 100%; resize: vertical; min-height: 90px; margin-top: 8px; padding: 12px; border: 1px solid #cedaf3; border-radius: 9px; font: inherit; color: #263954; background: white; }
.display-incident-help { color: #7488a6; margin: 8px 0; font-size: 13px; }
.display-incident-source-hint { padding: 10px 12px; background: #fff6e4; color: #906115; border-radius: 8px; font-size: 14px; }
.display-incident-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.display-incident-editor form > .display-incident-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.display-incident-history { margin-top: 20px; padding-top: 15px; border-top: 1px solid #dfe6f3; font-size: 13px; }
.display-incident-history summary { cursor: pointer; color: #526b91; }
.display-incident-history ol { padding-left: 20px; }
.display-incident-history li { margin: 12px 0; }
.display-incident-history li span { margin-left: 12px; color: #7488a6; }
.display-incident-history li p { margin: 6px 0; white-space: pre-wrap; }
.display-incident-scan { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; padding-top: 17px; border-top: 1px solid #e5ebf5; }
.display-incident-scan small { color: #7488a6; }
.display-incident-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
@media (max-width: 700px) {
  dialog.customer-display-incidents { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .display-incidents-header, .display-incidents-content { padding: 16px; }
  .display-incidents-header h2 { font-size: 20px; }
  .display-incident-counts { gap: 7px; }
  .display-incident-counts > span { gap: 12px; min-width: 0; flex: 1; padding: 9px; }
  .display-incident-editor { padding: 14px; }
}


/* Desktop product/order workspaces fill the viewport. Keep the phone feed
   and every other portal module on their existing scrolling contract. */
@media (min-width: 761px) {
  /* Legacy <=1024px CSS made this fixed column wrap sideways in short
     windows. Keep the desktop rail bounded; its existing tab list scrolls. */
  body.customer-portal #customer:not(.portal-locked) > .customer-portal-tabs-row {
    width: var(--customer-workbench-width) !important;
    min-width: var(--customer-workbench-width) !important;
    margin: 0 !important;
    flex-wrap: nowrap !important;
  }

  body.customer-portal #customer:not(.portal-locked).workbench-collapsed > .customer-portal-tabs-row {
    width: var(--customer-workbench-collapsed-width) !important;
    min-width: var(--customer-workbench-collapsed-width) !important;
  }

  body.customer-portal #customer:not(.portal-locked) > .customer-portal-tabs-row > .portal-tabs {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  /* The old <=900px drawer rule reserved only 72px even while the desktop
     rail was expanded, allowing the header and table to cover navigation. */
  body.customer-portal #customer:not(.portal-locked):not(.workbench-collapsed) {
    padding-left: var(--customer-workbench-width) !important;
  }

  body.customer-portal #customer:not(.portal-locked):has(> #customerProductsView:not(.hidden):not([hidden]), > #customerOrdersView:not(.hidden):not([hidden])) {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer:not(.portal-locked):has(> #customerProductsView:not(.hidden):not([hidden]), > #customerOrdersView:not(.hidden):not([hidden])) > .customer-unified-header {
    flex-shrink: 0;
  }

  body.customer-portal #customer:not(.portal-locked) :is(#customerProductsView, #customerOrdersView):not(.hidden):not([hidden]) {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer :is(#customerProductToolbar, #customerOrdersView > .customer-search, #customerOrdersView > .customer-result-bar) {
    flex: 0 0 auto !important;
  }

  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult.customer-result).empty,
  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult.customer-result):not(.empty) {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-bottom: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  body.customer-portal #customer #customerProductResult > :is(.customer-product-card-grid, .portal-product-table-wrap),
  body.customer-portal #customer #customerOrdersView .customer-orders-content {
    flex: 1 1 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.customer-portal #customer #customerProductResult > .customer-product-card-grid {
    align-content: start;
    padding: 12px;
  }

  body.customer-portal #customer #customerProductResult > .portal-product-empty,
  body.customer-portal #customer #customerOrdersView .customer-orders-content:has(> .customer-orders-empty) {
    display: flex;
    flex: 1 1 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    color: #8491a4;
    text-align: center;
  }

  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult) > .customer-portal-pager {
    position: relative !important;
    inset: auto !important;
    z-index: 5;
    display: flex !important;
    flex: 0 0 auto !important;
    align-self: stretch;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border-top: 1px solid #dfe6f0;
    background: #fff;
    box-shadow: 0 -3px 12px rgba(33, 53, 84, .04);
  }

  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult) > .customer-portal-pager > :nth-child(2) {
    margin-right: auto;
  }

}

/* Short desktop windows must scroll whole cards rather than allocating the
   few pixels left after filters to a second, nested scrolling strip. */
@media (min-width: 761px) and (max-height: 850px) {
  body.customer-portal #customer#customer#customer:not(.portal-locked):has(> :is(#customerRailwayProductsView, #customerProductsView, #customerFeaturedLibraryView):not(.hidden):not([hidden])) {
    display:block !important;
    height:100% !important;
    min-height:0 !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    scrollbar-gutter:stable;
  }
  body.customer-portal #customer#customer#customer:not(.portal-locked) > .customer-unified-header:not(.hidden):not([hidden]) {
    display:grid !important;
    grid-template-columns:minmax(140px,.7fr) minmax(210px,1fr) minmax(230px,1.1fr) !important;
    grid-template-rows:auto !important;
    gap:8px !important;
    min-height:0 !important;
    height:auto !important;
    padding:10px 14px !important;
    margin-bottom:10px !important;
  }
  body.customer-portal #customer#customer#customer > .customer-unified-header > :is(.customer-unified-brand,.customer-header-metrics,.customer-unified-account) {
    grid-column:auto !important; grid-row:auto !important; width:100% !important; min-width:0 !important; max-width:none !important; margin:0 !important;
  }
  body.customer-portal #customer#customer#customer > .customer-unified-header > .customer-unified-brand { gap:8px !important; }
  body.customer-portal #customer#customer#customer .customer-unified-brand > span { width:32px !important; height:32px !important; min-width:32px !important; font-size:20px !important; }
  body.customer-portal #customer#customer#customer .customer-unified-brand strong { font-size:16px !important; white-space:nowrap !important; }
  body.customer-portal #customer#customer#customer .customer-unified-brand small { font-size:8px !important; letter-spacing:.06em !important; }
  body.customer-portal #customer#customer#customer .customer-header-metrics:not(.hidden):not([hidden]) { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; gap:0 !important; }
  body.customer-portal #customer#customer#customer .customer-header-metrics > .login-finance:not(.hidden):not([hidden]) { display:flex !important; flex-wrap:wrap !important; align-items:baseline !important; gap:2px 3px !important; min-width:0 !important; padding:0 7px !important; }
  body.customer-portal #customer#customer#customer .customer-header-metrics > .login-finance > :is(small,.metric-label) { flex:0 0 100% !important; font-size:10px !important; }
  body.customer-portal #customer#customer#customer .customer-header-metrics > .login-finance > strong { font-size:18px !important; line-height:24px !important; }
  body.customer-portal #customer#customer#customer .customer-header-metrics > .login-finance > em { font-size:10px !important; }
  body.customer-portal #customer#customer#customer .customer-unified-account { gap:5px !important; }
  body.customer-portal #customer#customer#customer .customer-unified-account > div { gap:4px !important; }
  body.customer-portal #customer#customer#customer .customer-account-name { flex-wrap:nowrap !important; gap:4px !important; }
  body.customer-portal #customer#customer#customer .customer-unified-account .login-company { max-width:100% !important; font-size:12px !important; }
  body.customer-portal #customer#customer#customer .customer-account-meta { gap:5px !important; font-size:10px !important; flex-wrap:wrap !important; }
  body.customer-portal #customer#customer#customer :is(#customerProfileBtn,#customerAccountValidityDesktop) { height:26px !important; min-height:26px !important; padding:3px 6px !important; font-size:10px !important; }
  body.customer-portal #customer#customer#customer > :is(#customerRailwayProductsView,#customerProductsView,#customerFeaturedLibraryView):not(.hidden):not([hidden]),
  body.customer-portal #customer#customer#customer #customerProductResult:not(.empty),
  body.customer-portal #customer#customer#customer #customerFeaturedLibraryRoot {
    display:block !important; flex:none !important; height:auto !important; min-height:0 !important; max-height:none !important; overflow:visible !important;
  }
  body.customer-portal #customer#customer#customer #customerRailwayProductsView > .customer-railway-filter { max-height:none !important; overflow:visible !important; padding:8px 10px !important; gap:6px !important; }
  body.customer-portal #customer#customer#customer #customerRailwayProductGrid,
  body.customer-portal #customer#customer#customer #customerProductResult > :is(.customer-product-card-grid,.portal-product-table-wrap),
  body.customer-portal #customer#customer#customer #customerFeaturedLibraryRoot .customer-featured-scroll {
    flex:none !important; height:auto !important; min-height:0 !important; max-height:none !important; overflow:visible !important;
  }
  body.customer-portal #customer#customer#customer #customerRailwayProductGrid { display:grid !important; }
  body.customer-portal #customer#customer#customer :is(#customerRailwayPager,#customerProductResult > .customer-portal-pager,#customerFeaturedLibraryRoot .customer-featured-pagination) { position:static !important; margin-top:10px !important; height:auto !important; }
}
@media (min-width: 761px) and (max-width: 1050px) and (max-height: 850px) {
  body.customer-portal #customer#customer#customer:not(.portal-locked) > .customer-unified-header:not(.hidden):not([hidden]) { grid-template-columns:minmax(120px,.7fr) minmax(0,1fr) !important; gap:6px 10px !important; }
  body.customer-portal #customer#customer#customer > .customer-unified-header > .customer-unified-account { grid-column:2 !important; grid-row:1 !important; }
  body.customer-portal #customer#customer#customer > .customer-unified-header > .customer-header-metrics { grid-column:1 / -1 !important; grid-row:2 !important; }
  body.customer-portal #customer#customer#customer .customer-unified-brand small { display:none !important; }
}

/* Customer phone layout final pass: compact the transfer/order-center
   controls after the shared viewport rules, without affecting desktop. */
@media (max-width: 760px) {
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management.panel {
    padding: 8px !important;
    overflow: visible !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head {
    display: grid !important;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr) !important;
    gap: 6px !important;
    align-items: center !important;
    margin-bottom: 7px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child strong {
    display: block !important;
    overflow: hidden !important;
    font-size: 16px !important;
    line-height: 22px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child span { display: none !important; }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: none !important;
    padding: 3px !important;
    overflow: hidden !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button {
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    margin: 0 !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats span {
    min-width: 0 !important;
    padding: 5px 2px !important;
    font-size: 9px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-controls > .customer-railway-management-scopes:not(.customer-railway-management-head-scopes) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-bottom: 6px !important;
    padding: 3px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-controls > .customer-railway-management-scopes:not(.customer-railway-management-head-scopes) > button {
    min-width: 0 !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 6px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > input {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: 34px !important;
    font-size: 11px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > :is(select, button) {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 5px !important;
    font-size: 10px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > .customer-railway-view-switch {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > .customer-railway-view-switch button {
    width: 100% !important;
    min-height: 30px !important;
    height: 30px !important;
    font-size: 10px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-results { min-height: 0 !important; overflow: visible !important; }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-table-wrap,
  body.customer-portal #customer #customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    height: auto !important;
    min-height: 120px !important;
    max-height: 54dvh !important;
    overflow: auto !important;
  }
  body.customer-portal #customer #customerRailwayManagementView #customerRailwayReportCards {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    padding: 6px 0 !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-card { min-width: 0 !important; padding: 9px !important; }
  body.customer-portal #customer #customerRailwayManagementView #customerRailwayManagementPager { margin-top: 5px !important; font-size: 10px !important; }
}

@media (min-width: 761px) and (max-width: 1200px) {
  /* Let controls wrap within the available workspace rather than clipping
     the rightmost date/search buttons when the sidebar is expanded. */
  /* Match the four-ID weight of the immutable r131 responsive layer. */
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar:not(.hidden):not(:has(> .customer-product-search-row)) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar:not(:has(> .customer-product-search-row)) #customerProductKeyword {
    flex: 1 1 240px;
    width: auto !important;
    min-width: 180px !important;
  }

  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar:not(:has(> .customer-product-search-row)) .customer-product-price-filter {
    flex: 0 1 100px;
    width: 100px;
    min-width: 85px !important;
  }

  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar:not(:has(> .customer-product-search-row)) > button,
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar:not(:has(> .customer-product-search-row)) .customer-product-price-separator,
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar:not(:has(> .customer-product-search-row)) .customer-product-view-switch {
    flex: 0 0 auto;
    width: auto !important;
    white-space: nowrap;
  }
}

@media (min-width: 761px) {
  /* The legacy order grid also overflows at 1201px: allow wrapping based on
     available workspace width, not the previous 1200px cutoff. */
  body.customer-portal #customer #customerOrdersView .customer-search-main {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
  }

  body.customer-portal #customer #customerOrdersView .customer-search-main .portal-field {
    flex: 1 1 150px;
    width: auto !important;
    min-width: 0 !important;
  }

  body.customer-portal #customer #customerOrdersView .customer-search-main .portal-search-field {
    flex: 1 1 220px;
  }

  body.customer-portal #customer #customerOrdersView .customer-search-main > button {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 0 !important;
    white-space: nowrap;
  }
}

@media (min-width: 761px) and (max-height: 640px) {
  /* In a short desktop window retain every filter but use desktop control
     sizes, leaving a scrollable result region above the pinned pager. */
  body.customer-portal #customer #customerOrdersView .customer-search { padding: 6px !important; }
  body.customer-portal #customer #customerOrdersView .customer-search :is(input, button) {
    height: 32px !important;
    min-height: 32px !important;
    min-block-size: 32px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-result-bar { gap: 4px !important; margin-block: 4px !important; }
  body.customer-portal #customer #customerOrdersView .customer-result-actions :is(button, label),
  body.customer-portal #customer #customerOrdersView .customer-order-view-switch {
    min-height: 30px !important;
    min-block-size: 30px !important;
    height: 30px !important;
  }
  body.customer-portal #customer #customerOrdersView .customer-summary { min-height: 0 !important; padding-block: 2px !important; }
  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult) > .customer-portal-pager {
    min-height: 42px !important;
    padding-block: 5px !important;
  }
  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult) > .customer-portal-pager :is(button, input, select) {
    min-height: 30px !important;
    min-block-size: 30px !important;
    height: 30px !important;
  }
}

/* Layout rules must never reveal an inactive or signed-out workspace, even
   when a legacy bundle supplies a more specific display:flex rule. */
body.customer-portal #customer.portal-locked > .portal-tab-view:is(#customerProductsView, #customerOrdersView),
body.customer-portal #customer > .portal-tab-view:is(#customerProductsView, #customerOrdersView)[hidden],
body.customer-portal #customer > .portal-tab-view:is(#customerProductsView, #customerOrdersView).hidden {
  display: none !important;
}

@media (max-width: 760px) {
  /* Empty desktop results keep pagination; phones retain their old empty
     state and the product infinite-loading feed. */
  body.customer-portal #customer :is(#customerProductResult, #customerOrdersView #customerResult).empty > .customer-portal-pager {
    display: none !important;
  }
}

/* The pass center uses the same bounded desktop workspace as the customer
   catalog. Its flow preview and records scroll independently of the pager. */
body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters[hidden] {
  display: none !important;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-label {
  color: #78869b;
  font-size: 12px;
  white-space: nowrap;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters > button {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  max-width: min(100%, 320px);
  min-height: 28px !important;
  padding: 3px 8px !important;
  border: 1px solid #d4e0f1 !important;
  border-radius: 6px !important;
  color: #365d93 !important;
  background: #f1f6ff !important;
  box-shadow: none !important;
  font-size: 12px;
  transform: none !important;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters > button > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters > button > b {
  font-size: 16px;
  line-height: 1;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-empty-content {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: #8290a5;
  font-weight: 500;
}

body.customer-portal #customer #customerRailwayManagementView .customer-railway-empty-action {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid #c9d9f3;
  border-radius: 7px;
  background: #f2f7ff;
  color: #2f61b3;
  font-weight: 700;
  cursor: pointer;
}

@media (min-width: 761px) {
  body.customer-portal #customer:not(.portal-locked):has(> #customerRailwayManagementView:not(.hidden):not([hidden])) {
    display: flex !important;
    height: 100% !important;
    min-height: 0 !important;
    flex-direction: column !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer #customerRailwayManagementView:not(.hidden):not([hidden]) {
    display: flex !important;
    flex: 1 1 0 !important;
    min-height: 0 !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
    padding: 0 0 7px !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management.panel,
  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view .customer-railway-management.panel {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-bottom: 0 !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-controls {
    flex: 0 0 auto !important;
    gap: 8px 12px !important;
    margin-bottom: 8px !important;
    padding: 11px 14px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head {
    min-width: 0;
    margin-bottom: 0 !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head strong {
    font-size: 19px;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-scopes {
    gap: 6px !important;
    padding: 0 !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-scopes > button {
    min-height: 34px !important;
    padding: 4px 11px !important;
    white-space: nowrap;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar {
    display: grid !important;
    grid-template-columns: minmax(200px, 1fr) minmax(125px, 175px) minmax(105px, 145px) minmax(105px, 145px) 58px 58px 58px 126px !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > * {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    min-block-size: 38px !important;
    margin: 0 !important;
    grid-row: auto !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > :is(input, select, button) {
    padding: 0 10px !important;
    border-radius: 8px !important;
    font-size: 13px;
    white-space: nowrap;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > input {
    min-width: 0 !important;
    background: #fff;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > .customer-railway-view-switch {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 2px;
    padding: 3px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-view-switch > button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 5px;
    font-size: 12px;
  }

  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management-results,
  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view .customer-railway-management-results {
    display: flex !important;
    flex: 1 1 0 !important;
    flex-direction: column !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px 14px 4px !important;
    overflow: hidden !important;
  }

  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-flow-panel {
    /* The complete flow is a summary, not a second scroll container. The
       table/card list below remains the viewport-sized scrolling region. */
    flex: 0 0 auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin-bottom: 8px !important;
    padding: 10px 12px !important;
    overflow: visible !important;
  }

  body.customer-portal #customer#customer #customerRailwaySelectedFlow.customer-pass-flow-panel:has(.shared-pass-selection-empty) {
    max-height: 56px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-table-wrap {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    display: grid !important;
    flex: 1 1 0 !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards:has(> .customer-railway-management-empty) {
    align-content: center !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-table-wrap:has(.customer-railway-management-empty) .customer-railway-management-table {
    min-height: 100%;
  }

  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView #customerRailwayManagementPager:not(:empty),
  body.customer-portal #customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayManagementPager:not(:empty) {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex: 0 0 auto !important;
    min-height: 52px !important;
    margin: auto 0 0 !important;
    padding: 8px 4px 3px !important;
  }
}

@media (min-width: 761px) and (max-width: 1240px) {
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-controls {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar {
    grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(95px, 1fr)) !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-scopes,
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar,
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters {
    grid-column: 1 !important;
  }
}

@media (max-width: 760px) {
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar:not(.mobile-filters-open-r78) #customerRailwayReportClearBtn {
    display: none !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar.mobile-filters-open-r78 #customerRailwayReportClearBtn {
    display: block !important;
    width: 100% !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-report-active-filters > button {
    min-height: 40px !important;
  }
}

/* A short desktop viewport cannot contain the complete wrapped flow, the
   controls, and the pager at once. Let the page scroll instead of clipping the
   flow or bringing back a scrollbar inside its preview. */
@media (min-width: 761px) and (max-width: 1280px) and (max-height: 650px),
       (min-width: 1281px) and (max-height: 500px) {
  body.customer-portal #customer:not(.portal-locked):has(> #customerRailwayManagementView:not(.hidden):not([hidden])):has(#customerRailwaySelectedFlow .shared-pass-progress-track) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.customer-portal #customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView:not(.hidden):not([hidden]),
  body.customer-portal #customer#customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management.panel,
  body.customer-portal #customer#customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView#customerRailwayManagementView.is-card-view .customer-railway-management.panel,
  body.customer-portal #customer#customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management-results,
  body.customer-portal #customer#customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView#customerRailwayManagementView.is-card-view .customer-railway-management-results {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body.customer-portal #customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView .customer-railway-management-table-wrap,
  body.customer-portal #customer#customer:has(#customerRailwaySelectedFlow .shared-pass-progress-track) #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    flex: 0 0 auto !important;
    height: min(40dvh, 260px) !important;
    min-height: 100px !important;
    overflow: auto !important;
  }
}

/* Runtime measures actual space after the header, notices, controls and full
   flow. A 720px window with a visible account notice can be shorter in practice
   than a 650px window without one; never squeeze its clickable list to zero. */
@media (min-width: 761px) {
  body.customer-portal #customer#customer#customer#customer.customer-pass-short-workspace:not(.portal-locked) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwayManagementView#customerRailwayManagementView:not(.hidden):not([hidden]),
  body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management.panel,
  body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management-results {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwayManagementView#customerRailwayManagementView .customer-railway-management-table-wrap,
  body.customer-portal #customer#customer.customer-pass-short-workspace #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards {
    flex: 0 0 auto !important;
    height: clamp(200px, 40dvh, 260px) !important;
    min-height: 200px !important;
    max-height: none !important;
    overflow: auto !important;
  }
}

/* 过单中心：标题与“我报备的订单 / 我店铺的订单”保持同一行，
   用清晰的分段卡片表达当前订单归属；原有待处理/全部/进度统计继续保留。 */
@media (min-width: 1101px) {
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head {
    display: grid !important;
    grid-template-columns: auto minmax(250px, 1fr) auto !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
    margin-bottom: 12px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: auto !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child strong {
    font-size: 18px !important;
    line-height: 1.15 !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child span {
    font-size: 12px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: stretch !important;
    gap: 5px !important;
    width: max-content !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 4px !important;
    overflow: visible !important;
    border: 1px solid #d8e3f1 !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 4px 12px rgba(37, 74, 125, .08) !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button {
    flex: 0 0 auto !important;
    min-width: 148px !important;
    min-height: 42px !important;
    padding: 7px 15px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: #536985 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button:hover {
    color: #164cae !important;
    background: #ffffff !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button.active,
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button[aria-pressed="true"] {
    border-color: #2b78df !important;
    background: linear-gradient(135deg, #2d6de0 0%, #079aa0 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 5px 12px rgba(35, 112, 210, .24), inset 0 1px 0 rgba(255, 255, 255, .24) !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button:active {
    transform: translateY(1px) !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes b {
    margin-left: 3px !important;
    font-size: 14px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats {
    grid-column: 3 !important;
    grid-row: 1 !important;
    grid-template-columns: repeat(4, minmax(86px, 1fr)) !important;
    gap: 6px !important;
    min-width: 0 !important;
    margin-right: 0 !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats span {
    min-width: 0 !important;
    padding: 7px 9px !important;
    font-size: 12px !important;
    text-align: center !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats b {
    margin-left: 3px !important;
    font-size: 16px !important;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child strong {
    font-size: 18px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    padding: 3px !important;
  }

  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button {
    min-width: 132px !important;
    min-height: 38px !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 760px) {
  /* Final phone ordering: title beside the two ownership tabs. */
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head {
    display: grid !important;
    grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr) !important;
    gap: 6px !important;
    align-items: center !important;
    margin-bottom: 7px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child strong {
    display: block !important;
    overflow: hidden !important;
    font-size: 16px !important;
    line-height: 22px !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > div:first-child span { display: none !important; }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px !important;
    width: 100% !important;
    max-width: none !important;
    padding: 3px !important;
    overflow: hidden !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head-scopes > button {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 4px 3px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    margin: 0 !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-head > .customer-railway-management-stats span {
    min-width: 0 !important;
    padding: 5px 2px !important;
    font-size: 9px !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-controls > .customer-railway-management-scopes:not(.customer-railway-management-head-scopes) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-bottom: 6px !important;
    padding: 3px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-controls > .customer-railway-management-scopes:not(.customer-railway-management-head-scopes) > button {
    min-width: 0 !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 4px 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 6px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > input {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: 34px !important;
    font-size: 11px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > :is(select, button) {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 5px !important;
    font-size: 10px !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > .customer-railway-view-switch {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }
  body.customer-portal #customer #customerRailwayManagementView .customer-railway-management-toolbar > .customer-railway-view-switch button {
    width: 100% !important;
    min-height: 30px !important;
    height: 30px !important;
    font-size: 10px !important;
  }
}

/* Keep the two railway workspace titles visible without restoring the
   historical desktop-sized title block on phones.  This lives in the final
   viewport layer so it wins over the older page-title compatibility rules. */
@media (max-width: 760px) {
  body.customer-portal #customer#customer > #customerRailwayProductsView#customerRailwayProductsView:not(.hidden):not([hidden])::before,
  body.customer-portal #customer#customer > #customerRailwayManagementView#customerRailwayManagementView:not(.hidden):not([hidden])::before {
    display: flex !important;
    min-height: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
    margin: 0 0 3px !important;
    padding: 0 2px !important;
    font-size: 18px !important;
    line-height: 28px !important;
  }
}


/* Customer workbench finish. Load after the existing customer layers.
   Width, drawer visibility, permissions, and business locks stay with their
   existing owners; this file only dresses the customer navigation. */
body.customer-portal #customer > .customer-portal-tabs-row {
  border-right: 1px solid #dce8f5;
  background: linear-gradient(165deg, #ffffff 0%, #fbfdff 62%, #f4f9ff 100%);
  box-shadow: 5px 0 22px rgba(42, 79, 129, .055), inset -1px 0 0 rgba(255, 255, 255, .85);
}

/* Match the immutable mobile layer's four-ID selector weight. These rules
   only close a locked workspace; open-state visibility stays with its owner. */
body.customer-portal #customer#customer#customer#customer.portal-locked > .customer-portal-tabs-row,
body.customer-portal #customer#customer.portal-locked > #customerWorkbenchMobileOpen#customerWorkbenchMobileOpen.customer-workbench-mobile-open,
body.customer-portal #customer#customer.portal-locked > #customerWorkbenchBackdrop#customerWorkbenchBackdrop.customer-workbench-backdrop {
  display: none !important;
}

body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-head {
  flex: 0 0 auto;
  padding: 0 5px 12px 8px;
  border-bottom-color: #e5edf7;
}

body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-head > strong {
  position: relative;
  padding-left: 14px;
  color: #173354;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: .035em;
}

body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-head > strong::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 21px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6aa7ff 0%, #2381ee 45%, #0bb5aa 100%);
  box-shadow: 0 1px 4px rgba(39, 133, 211, .12);
  content: "";
  transform: translateY(-50%);
}

body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-head > .customer-workbench-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px !important;
  border: 1px solid #ccdef5;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff 20%, #f5faff 100%);
  color: #1c68eb;
  box-shadow: 0 4px 12px rgba(59, 109, 176, .10), inset 0 1px 0 #fff;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-head > .customer-workbench-toggle:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: #a8c7f4;
  background: #f2f8ff;
  box-shadow: 0 5px 14px rgba(59, 109, 176, .15), inset 0 1px 0 #fff;
  transform: none;
}

/* Only this middle region scrolls, leaving the heading and logout in view.
   Do not set display on the rail or its buttons: hidden/permission rules win. */
body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  gap: 7px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d4e1f1 transparent;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab,
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  min-height: 46px;
  flex: 0 0 auto;
  gap: 10px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #49617f;
  box-shadow: none;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  transform: none;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

/* Native hidden must survive legacy navigation display:flex rules even
   when the permission owner does not also add the .hidden class. */
body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab[hidden],
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout[hidden] {
  display: none !important;
}

/* The legacy data-workbench-icon attribute remains for compatibility, but
   its text glyph must not render alongside the new inline SVG. */
body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab::before,
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout::before {
  display: none !important;
  content: none !important;
}

body.customer-portal #customer > .customer-portal-tabs-row .customer-nav-icon {
  position: relative;
  z-index: 1;
  display: block;
  box-sizing: border-box;
  flex: 0 0 32px;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 3px;
  overflow: visible;
  border: 1px solid rgba(170, 208, 251, .20);
  border-radius: 9px;
  background: linear-gradient(145deg, #edf6ff 0%, #e5f1ff 68%, #def4f7 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  transform: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab > span,
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout > span {
  position: relative;
  z-index: 1;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked)::after {
  display: none;
  content: none;
  animation: none;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab:hover:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked),
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: #d5e6fb;
  background: linear-gradient(#4b91ff, #2174f6) 4px center / 3px 22px no-repeat,
    linear-gradient(110deg, #eaf4ff 0%, #f3f8ff 100%);
  color: #1764df;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 2px 7px rgba(43, 98, 165, .035);
  transform: none;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab:hover:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked) > .customer-nav-icon,
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout:hover:not(:disabled):not([aria-disabled="true"]) > .customer-nav-icon {
  border-color: #c3dcfd;
  background: linear-gradient(145deg, #e4f2ff 0%, #dceaff 65%, #d8f4f6 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 5px rgba(36, 116, 205, .07);
  transform: translateY(-1px);
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab.active:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked) {
  border-color: rgba(44, 140, 228, .12);
  background: linear-gradient(#f1ffff, #c6fffa) 4px center / 3px 24px no-repeat,
    linear-gradient(110deg, #2767ee 0%, #2279e4 36%, #08aaa6 100%);
  color: #fff;
  box-shadow: 0 5px 14px rgba(31, 125, 182, .18), inset 0 1px 0 rgba(255, 255, 255, .24);
  font-weight: 750;
  transform: none;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab.active:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked) > .customer-nav-icon {
  border-color: rgba(255, 255, 255, .19);
  background: linear-gradient(145deg, rgba(255, 255, 255, .30), rgba(226, 245, 255, .17));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .23);
}

/* One short sweep when .active is applied. Foreground children and the
   notification badge sit above this decoration; it cannot receive input. */
body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab.active:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked)::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, .04) 36%, rgba(255, 255, 255, .28) 48%, rgba(255, 255, 255, .04) 60%, transparent 71%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-110%);
  transform-origin: center;
  transition: none;
  animation: customerNavSheen 450ms ease-out 1 both;
}

@keyframes customerNavSheen {
  0% { opacity: 0; transform: translateX(-110%); }
  18% { opacity: 1; }
  72% { opacity: .65; }
  100% { opacity: 0; transform: translateX(110%); }
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab > .notification-unread-badge {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px #fff;
}

body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer {
  flex: 0 0 auto;
  padding-top: 12px;
  border-top-color: #e3edf8;
}

body.customer-portal #customer > .customer-portal-tabs-row :is(.portal-tab, .customer-workbench-toggle, .customer-workbench-logout):focus-visible {
  outline: 2px solid #145bd6;
  outline-offset: -3px;
}

body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab.active:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 2px #145bd6, 0 5px 14px rgba(31, 125, 182, .18);
}

/* Keep the label in the accessibility tree when the desktop rail folds.
   Phone drawers retain the original full labels and drawer transitions. */
@media (min-width: 761px) {
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row > .customer-workbench-head {
    justify-content: center;
    padding-inline: 0;
  }

  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row > .portal-tabs > .portal-tab,
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout {
    justify-content: center;
    gap: 0;
    padding: 0;
  }

  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row > .portal-tabs > .portal-tab > span,
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row > .customer-workbench-footer > .customer-workbench-logout > span {
    position: absolute !important;
    display: block !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
  }

  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row > .portal-tabs > .portal-tab > .notification-unread-badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 16px;
    height: 16px;
    margin: 0;
    padding: 0 3px;
    font-size: 9px;
    box-shadow: 0 0 0 1px #fff;
  }
}

body.customer-portal > .customer-nav-tooltip {
  position: fixed;
  z-index: 150;
  box-sizing: border-box;
  max-width: 180px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 7px;
  background: #26374e;
  color: #fff;
  box-shadow: 0 5px 15px rgba(25, 48, 82, .18);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
  pointer-events: auto;
  transition: none;
}

body.customer-portal:has(#customer.portal-locked) > .customer-nav-tooltip {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.customer-portal #customer:not(.portal-locked),
  body.customer-portal #customer > .customer-portal-tabs-row,
  body.customer-portal #customer > .customer-portal-tabs-row :is(.portal-tab, .customer-nav-icon, .customer-workbench-toggle, .customer-workbench-logout) {
    transition: none !important;
  }

  body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab::after {
    animation: none !important;
  }

  body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab > .customer-nav-icon {
    transform: none !important;
  }
}

@media (forced-colors: active) {
  body.customer-portal #customer > .customer-portal-tabs-row {
    border-right-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-head > strong::before {
    background: Highlight;
    box-shadow: none;
  }

  body.customer-portal #customer > .customer-portal-tabs-row :is(.portal-tab, .customer-nav-icon, .customer-workbench-toggle, .customer-workbench-logout) {
    border-color: ButtonText !important;
    background: ButtonFace !important;
    color: ButtonText !important;
    box-shadow: none !important;
  }

  body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab.active:not(:disabled):not([aria-disabled="true"]):not(.is-business-locked) {
    border-color: Highlight !important;
    background: Highlight !important;
    color: HighlightText !important;
    box-shadow: none !important;
  }

  body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab::after {
    display: none !important;
    animation: none !important;
  }

  body.customer-portal #customer > .customer-portal-tabs-row :is(.portal-tab, .customer-workbench-toggle, .customer-workbench-logout):focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }

  body.customer-portal #customer > .customer-portal-tabs-row > .portal-tabs > .portal-tab.active:focus-visible {
    outline-color: HighlightText;
  }

  body.customer-portal > .customer-nav-tooltip {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}

/* Keep account actions in separate, stable rows on desktop and phone drawers. */
body.customer-portal #customer > .customer-portal-tabs-row > .customer-workbench-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

@media (max-width: 760px) {
  /* The floating trigger is a drag handle; the surrounding page still scrolls. */
  body.customer-portal #customer#customer#customer#customer > #customerWorkbenchMobileOpen#customerWorkbenchMobileOpen.customer-workbench-mobile-open {
    margin: 0 !important;
    touch-action: none !important;
    user-select: none;
    -webkit-user-select: none;
  }
}

/* The phone content layer ends at 760px. Match that boundary for the legacy
   drawer, whose original presentation stopped at 720px. */
@media (min-width: 721px) and (max-width: 760px) {
  body.customer-portal #customer:not(.portal-locked),
  body.customer-portal #customer:not(.portal-locked).workbench-collapsed {
    padding-left: 0 !important;
  }
  body.customer-portal #customer > .customer-portal-tabs-row,
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row,
  body.customer-portal #customer:not(.workbench-collapsed) > .customer-portal-tabs-row {
    z-index: 102;
    width: min(300px, 86vw) !important;
    min-width: min(300px, 86vw) !important;
    padding: 16px 12px;
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }
  body.customer-portal #customer.workbench-mobile-open > .customer-portal-tabs-row { transform: translateX(0); }
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row .customer-workbench-head { justify-content: space-between; padding: 0 5px 12px 10px; }
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row :is(.customer-workbench-head strong, .portal-tab > span, .customer-workbench-logout > span) { display: initial; }
  body.customer-portal #customer.workbench-collapsed > .customer-portal-tabs-row :is(.portal-tab, .customer-workbench-logout) { justify-content: flex-start; padding: 0 12px; }
  body.customer-portal #customer:not(.portal-locked) > #customerWorkbenchMobileOpen {
    display: inline-flex;
    z-index: 75;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    background: linear-gradient(135deg, #315ee8 0%, #0b9c91 100%);
    color: #fff;
    box-shadow: 0 10px 28px rgba(30, 104, 170, .3);
    font-weight: 750;
  }
  body.customer-portal #customer > #customerWorkbenchBackdrop {
    position: fixed;
    z-index: 101;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 32, 55, .34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }
  body.customer-portal #customer:not(.portal-locked).workbench-mobile-open > #customerWorkbenchBackdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
}


/* Customer header material only. The existing grid, height, responsive
   visibility, profile state, and company popover behavior remain in charge. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header {
  border: 1px solid #dce8f5;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #fcfdff 58%, #f5faff 100%);
  box-shadow: inset 0 1px 0 #fff, 0 2px 6px rgba(38, 71, 117, .045), 0 8px 20px rgba(38, 71, 117, .055);
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header::before {
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6da9ff 0%, #3688ee 40%, #0bb3a5 100%);
  box-shadow: none;
  pointer-events: none;
}

/* Remove the old second frame inside the header. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header::after {
  display: none;
  content: none;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-brand > span {
  box-sizing: border-box;
  border: 1px solid rgba(46, 139, 218, .15);
  border-radius: 12px;
  background: linear-gradient(145deg, #1c526e 0%, #167f8c 48%, #0aa69a 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .27), 0 3px 8px rgba(30, 122, 166, .13);
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-brand strong {
  color: #193758;
  font-weight: 750;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-brand small {
  color: #3d9e9c;
}

/* Keep the three existing metric slots; no additional cards or grid rows. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-header-metrics > .login-finance {
  border-left-color: #e1eaf5;
  background: transparent;
  box-shadow: none;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-header-metrics > .login-finance > small {
  color: #7b8da4;
  font-weight: 550;
  line-height: 1.3;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-header-metrics > .login-finance > .metric-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-header-metrics .customer-header-metric-icon {
  display: block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  color: #6b9dc7;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-header-metrics > .login-finance > strong {
  color: #193b63 !important;
  font-size: 18px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.015em;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-header-metrics > .login-finance > em {
  color: #8a9aaf;
  font-weight: 500;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-account,
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-account > div,
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-name {
  min-width: 0;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-account > div {
  border-left-color: #e1eaf5;
}

/* Retain the existing desktop/phone width limits, letting flex/grid shrink
   the name inside them instead of changing header column allocation. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-name > .login-company {
  min-width: 0;
  flex: 0 1 auto;
  padding-inline: 0;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  color: #244263;
  box-shadow: none;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-meta > span {
  color: #8696ab;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-meta > span > b {
  color: #667f9b;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

/* Pending identity badges retain their existing warning presentation.
   Only an already-certified identity receives the green material. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-name > .customer-certified-badge:not(.is-pending) {
  gap: 4px;
  border-color: #c6e9de;
  background: #edf9f4;
  color: #338374;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

/* Identity text is replaced by existing business code, so the decorative
   check belongs to CSS and is present only for a visible certified badge. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-name > .customer-certified-badge:not(.is-pending):not(.hidden):not([hidden])::before {
  display: block;
  flex: 0 0 7px;
  width: 7px;
  height: 4px;
  margin-top: -2px;
  border-bottom: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  content: "";
  transform: rotate(-45deg);
}

/* The existing required-state class owns the amber variant. A completed
   profile and all other account actions continue using their existing CSS. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required {
  border-color: #e5cfa7;
  background: #fff9ef;
  color: #96713d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 1px 3px rgba(125, 94, 48, .035);
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required::before {
  box-sizing: border-box;
  border: 1px solid #dec59d;
  background: #f5e8cf;
  color: #a1793e;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: #d9bd8d;
  background: #fff5e4;
  color: #896334;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 2px 5px rgba(125, 94, 48, .055);
  transform: none;
}

body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required:focus-visible {
  outline: 2px solid #997242;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required {
    transition: none !important;
  }
}

/* Native hidden and .hidden must win over historical explicit displays.
   These safeguards are scoped to the shared customer header only. */
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header:is(.hidden, [hidden]),
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header :is(.hidden, [hidden]),
body.customer-portal #customer:not(.portal-locked) > .customer-unified-header :is(
  #customerLoginState#customerLoginState,
  #customerIdentityBadge#customerIdentityBadge,
  #customerBalanceState#customerBalanceState,
  #customerPendingShipmentState#customerPendingShipmentState,
  #customerDebtState#customerDebtState,
  #customerProfileBtn#customerProfileBtn,
  #customerRelatedCompanies#customerRelatedCompanies
):is(.hidden, [hidden]),
body.customer-portal #customer.portal-locked > .customer-unified-header {
  display: none !important;
}

@media (forced-colors: active) {
  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }

  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header::before {
    background: Highlight;
  }

  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header > .customer-unified-brand > span {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
    box-shadow: none;
  }

  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header .customer-account-name > .customer-certified-badge:not(.is-pending),
  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required,
  body.customer-portal #customer:not(.portal-locked) > .customer-unified-header #customerProfileBtn.customer-profile-required::before {
    border-color: ButtonText !important;
    background: ButtonFace !important;
    color: ButtonText !important;
    box-shadow: none !important;
  }
}


/* Query failures are persistent feedback, not an empty-results body. */
body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-height: 112px;
  overflow: auto;
  padding: 8px 12px;
  border: 1px solid #f0cf95;
  border-radius: 8px;
  background: #fff8eb;
  color: #855512;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
}
body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) > div {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) :is(strong, span, small) {
  display: block;
}
body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) > button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding: 5px 10px;
  white-space: nowrap;
}
@media (max-width: 760px) {
  body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) {
    flex-wrap: wrap;
    max-height: none;
  }
}
@media (min-width: 761px) and (max-height: 640px) {
  /* Keep both retry and the footer reachable in a short window. Detailed
     failed/displayed query text scrolls inside the notice, not the page. */
  body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) {
    max-height: 56px;
    padding-block: 6px;
  }
  body.customer-portal #customer :is(.customer-products-query-notice, .customer-orders-query-notice) > div {
    max-height: 40px;
    overflow: auto;
  }
}


/* Customer catalogue: compact query controls and a single deliberate apply action. */
body.customer-portal #customer#customer #customerProductsView #customerProductToolbar.customer-product-inline-search:not(.hidden) {
  position: relative;
  z-index: 35;
  display: block !important;
  min-width: 0;
  min-height: 0 !important;
  margin: 0 0 8px !important;
  padding: 8px 10px !important;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(36, 64, 108, .05);
}

#customerProductsView #customerProductToolbar .customer-product-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(190px, 228px) 64px 70px 122px auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

#customerProductsView #customerProductToolbar :is(.customer-product-keyword-wrap, .customer-product-price-range) {
  display: flex;
  align-items: center;
  height: 38px;
  min-width: 0;
  border: 1px solid #d8e2f0;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

#customerProductsView #customerProductToolbar :is(.customer-product-keyword-wrap, .customer-product-price-range):focus-within {
  border-color: #7da7ee;
  box-shadow: 0 0 0 3px rgba(47, 110, 222, .12);
}

#customerProductsView #customerProductToolbar .customer-product-search-icon {
  flex: 0 0 30px;
  color: #8291aa;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

#customerProductsView #customerProductToolbar .customer-product-keyword-wrap #customerProductKeyword,
#customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-filter {
  height: 34px;
  min-height: 34px;
  min-width: 0;
  padding: 0 7px;
  border: 0;
  border-radius: 7px;
  outline: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

#customerProductsView #customerProductToolbar .customer-product-keyword-wrap #customerProductKeyword { padding-left: 0; }
#customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-filter { flex: 1 1 0; width: 0; }
#customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-filter::-webkit-inner-spin-button,
#customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-filter::-webkit-outer-spin-button { appearance: none; margin: 0; }

#customerProductsView #customerProductToolbar .customer-product-price-currency {
  flex: 0 0 auto;
  padding-left: 10px;
  color: #8a99af;
  font-size: 13px;
}

#customerProductsView #customerProductToolbar .customer-product-price-separator {
  flex: 0 0 12px;
  color: #9aa8bb;
  font-weight: 500;
  text-align: center;
}

#customerProductsView #customerProductToolbar .customer-product-search-row > button,
#customerProductsView #customerProductToolbar .customer-product-filter-button {
  height: 38px;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
}

#customerProductsView #customerProductToolbar #customerProductSearchBtn {
  border: 0;
  background: linear-gradient(115deg, #326beb, #099da1);
  color: #fff;
  box-shadow: 0 2px 6px rgba(42, 102, 194, .18);
  font-weight: 750;
}

#customerProductsView #customerProductToolbar .customer-product-filter-host { position: relative; min-width: 0; }
#customerProductsView #customerProductToolbar .customer-product-filter-button {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #d8e2f0;
  background: #fff;
  color: #455775;
  cursor: pointer;
}
#customerProductsView #customerProductToolbar .customer-product-filter-button:is(:hover, .is-active) { border-color: #9eb9ee; color: #265ed0; background: #f1f6ff; }
#customerProductsView #customerProductFilterCount:not([hidden]) { display: inline-flex; min-width: 17px; height: 17px; align-items: center; justify-content: center; border-radius: 999px; background: #dce9ff; font-size: 11px; }

#customerProductsView #customerProductToolbar #customerProductPriceSortBtn {
  height: 38px;
  min-height: 38px;
  min-width: 0;
  padding: 0 9px;
  font-size: 13px;
  white-space: nowrap;
}

#customerProductsView #customerProductToolbar .customer-product-view-switch { height: 38px; min-width: 0; }
#customerProductsView #customerProductToolbar .customer-product-view-switch button { min-width: 61px; padding: 0 8px; font-size: 13px; }

#customerProductsView #customerProductFilterPanel:not([hidden]) {
  position: absolute;
  z-index: 120;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: min(320px, calc(100vw - 30px));
  gap: 12px;
  padding: 16px;
  border: 1px solid #d8e4f3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(35, 61, 100, .18);
}

#customerProductsView .customer-product-filter-heading,
#customerProductsView .customer-product-filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#customerProductsView .customer-product-filter-heading strong { color: #20314b; font-size: 15px; }
#customerProductsView .customer-product-filter-heading button { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: #f3f6fa; color: #53647d; font-size: 20px; cursor: pointer; }
#customerProductsView .customer-product-filter-field { display: grid; gap: 6px; color: #52617a; font-size: 12px; font-weight: 650; }
#customerProductsView .customer-product-filter-field input { height: 36px; min-height: 36px; padding: 0 10px; border: 1px solid #d8e2f0; border-radius: 7px; font-size: 13px; }
#customerProductsView .customer-product-filter-hint { margin-top: -8px; color: #8491a7; font-size: 11px; }
#customerProductsView .customer-product-featured-toggle { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #e0e8f3; border-radius: 8px; background: #f8faff; color: #3d506c; font-size: 13px; font-weight: 650; cursor: pointer; }
#customerProductsView .customer-product-featured-toggle input { width: 16px; height: 16px; min-height: 0; margin: 0; accent-color: #2b67d9; }
#customerProductsView .customer-product-price-presets { display: grid; gap: 8px; }
#customerProductsView .customer-product-price-presets > span { color: #52617a; font-size: 12px; font-weight: 650; }
#customerProductsView .customer-product-price-presets > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
#customerProductsView .customer-product-price-presets button { min-height: 32px; padding: 0 5px; border: 1px solid #dce5f1; border-radius: 7px; background: #fff; color: #596a83; font-size: 12px; cursor: pointer; }
#customerProductsView .customer-product-price-presets button.active { border-color: #8eaff0; background: #ecf4ff; color: #245ac7; }
#customerProductsView .customer-product-filter-actions { padding-top: 3px; border-top: 1px solid #edf1f6; }
#customerProductsView .customer-product-filter-actions button { flex: 1 1 0; min-height: 35px; border-radius: 7px; font-size: 12px; }

#customerProductsView #customerProductActiveFilters:not([hidden]) { display: flex; align-items: center; gap: 8px; margin-top: 7px; min-width: 0; }
#customerProductsView #customerProductActiveFilterList { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
#customerProductsView .customer-product-filter-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 2px 7px; border: 1px solid #cdddf7; border-radius: 5px; background: #f2f7ff; color: #4268ad; font-size: 11px; cursor: pointer; }
#customerProductsView .customer-product-filter-chip span { color: #7188b4; font-size: 15px; line-height: 1; }
#customerProductsView #customerProductClearBtn { flex: 0 0 auto; min-height: 25px; padding: 2px 6px; border: 0; color: #65768e; background: transparent; font-size: 11px; }
#customerProductsView #customerProductFilterError:not([hidden]) { margin-top: 6px; color: #be453d; font-size: 12px; }
#customerProductsView #customerProductToolbar [aria-invalid="true"] { color: #b5342c; }

@media (min-width: 761px) {
  /* Size complete controls, not grid tracks narrower than their contents.
     Whole controls wrap with the actual workspace width (including the rail). */
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-search-row {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-width: 0;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-keyword-wrap {
    flex: 1 1 240px;
    width: auto;
    min-width: 180px;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-price-range {
    flex: 0 1 200px;
    width: 200px;
    min-width: 170px;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar #customerProductSearchBtn {
    flex: 0 0 64px;
    width: 64px !important;
    min-width: 64px;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-filter-host {
    flex: 0 0 70px;
    width: 70px;
    min-width: 70px;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar #customerProductPriceSortBtn {
    flex: 0 0 112px;
    width: 112px !important;
    min-width: 112px;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-view-switch {
    display: inline-flex;
    flex: 0 0 152px;
    width: 152px !important;
    min-width: 152px;
    max-width: 152px;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-view-switch > button {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    white-space: nowrap;
  }
  /* Immutable responsive CSS still gives the old flat toolbar inputs fixed
     minimum widths. Nested fields must shrink inside their own wrapper. */
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-keyword-wrap #customerProductKeyword,
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-filter {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
  }
}

@media (max-width: 760px) {
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar.customer-product-inline-search:not(.hidden) { padding: 7px !important; }
  #customerProductsView #customerProductToolbar .customer-product-search-row { grid-template-columns: minmax(0, 1fr) minmax(112px, 140px); gap: 6px; }
  #customerProductsView #customerProductToolbar .customer-product-keyword-wrap { grid-column: 1; grid-row: 1; }
  #customerProductsView #customerProductToolbar #customerProductSearchBtn { grid-column: 2; grid-row: 1; }
  #customerProductsView #customerProductToolbar .customer-product-price-range { grid-column: 1; grid-row: 2; }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-price-range #customerProductMinPrice,
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-price-range #customerProductMaxPrice {
    display: block !important;
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    grid-row: auto !important;
    grid-column: auto !important;
  }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-separator { display: block !important; }
  #customerProductsView #customerProductToolbar .customer-product-filter-host { grid-column: 2; grid-row: 2; }
  #customerProductsView #customerProductToolbar #customerProductPriceSortBtn { grid-column: 1; grid-row: 3; }
  #customerProductsView #customerProductToolbar .customer-product-view-switch { grid-column: 2; grid-row: 3; }
  #customerProductsView #customerProductToolbar :is(.customer-product-keyword-wrap, .customer-product-price-range) { height: 44px; }
  body.customer-portal #customer #customerProductsView #customerProductToolbar #customerProductKeyword,
  #customerProductsView #customerProductToolbar .customer-product-price-range .customer-product-price-filter { height: 40px !important; min-height: 40px !important; }
  #customerProductsView #customerProductToolbar .customer-product-search-row > button,
  #customerProductsView #customerProductToolbar .customer-product-filter-button,
  #customerProductsView #customerProductToolbar #customerProductPriceSortBtn,
  #customerProductsView #customerProductToolbar .customer-product-view-switch { height: 44px !important; min-height: 44px !important; }
  body.customer-portal #customer#customer #customerProductsView #customerProductToolbar #customerProductSearchBtn { width: 100% !important; height: 44px !important; min-height: 44px !important; }
  #customerProductsView #customerProductToolbar .customer-product-view-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  #customerProductsView #customerProductToolbar .customer-product-view-switch button { width: 100%; min-width: 0; min-height: 44px; padding: 0 2px; font-size: 11px; }
  #customerProductsView #customerProductToolbar #customerProductPriceSortBtn { width: 100%; }
  #customerProductsView #customerProductToolbar #customerProductActiveFilters:not([hidden]) { align-items: flex-start; }
  #customerProductsView .customer-product-filter-heading button,
  #customerProductsView .customer-product-price-presets button,
  #customerProductsView .customer-product-filter-actions button,
  #customerProductsView .customer-product-filter-chip,
  #customerProductsView #customerProductClearBtn { min-height: 40px; }
  #customerProductsView .customer-product-filter-heading button { width: 40px; }
}


/* One image slot remains stable while the authenticated image is fetched. */
body.customer-portal #customer.customer-layout-initializing { transition: none !important; }
.customer-image-slot { position: relative; }
.customer-image-status {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #94a3b8; font-size: 12px;
  background: #f8fafc; border-radius: inherit; z-index: 1;
}
.customer-image-status[hidden] { display: none !important; }
.customer-image-retry {
  border: 0; background: transparent; color: #64748b; font-size: 12px;
  padding: 6px; cursor: pointer; white-space: normal;
}
.customer-image-retry:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.portal-product-image-hover .customer-image-status { font-size: 10px; }


/* Admin order management: dense, stable two-line data table.
 * Scope this file to #orders so customer orders, supplier orders and order entry
 * keep their own table contracts.
 */

/* Compact quick filters share the utility row with the logistics import. */
#orders .orders-control-panel .orders-utility-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

#orders .order-selection-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 7px 0 7px 10px;
}

#orders #copySelectedOrdersBtn {
  width: auto;
}

#orders .order-selection-summary {
  color: #526074;
  font-size: 12px;
}

#orders .orders-control-panel .orders-utility-row .order-edit-lockbar {
  flex: 0 1 auto;
  max-width: 100%;
  padding: 7px 10px;
  gap: 7px;
}

#orders .orders-control-panel .orders-utility-row .order-lock-help {
  max-width: 72px;
  font-size: 11px;
}

#orders .orders-control-panel .orders-utility-row .orders-logistics-panel {
  display: flex;
  flex: 1 1 830px;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  overflow: visible;
  padding: 7px 10px;
}

#orders .orders-control-panel .orders-logistics-panel .panel-title {
  position: absolute;
  width: 1px;
  min-width: 0;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

#orders .orders-control-panel .orders-logistics-panel .order-count-summary {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  color: #69768b;
  font-size: 11px;
  white-space: nowrap;
}

#orders .orders-control-panel .orders-utility-row .orders-logistics-panel .actions {
  display: flex;
  flex: 1 1 745px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: auto;
  max-width: 100%;
  min-width: 0;
}

#orders .orders-control-panel .orders-utility-row .orders-logistics-panel input[type="file"] {
  flex: 1 1 150px;
  width: 150px;
  min-width: 0;
  max-width: 100%;
}

#orders .orders-control-panel .orders-logistics-panel .actions .logistics-template-link,
#orders .orders-control-panel .orders-logistics-panel .actions #importLogisticsBtn {
  flex: 0 0 auto;
  width: auto;
  padding: 0 10px;
  font-size: 12px;
}

#orders .orders-control-panel .orders-logistics-panel .actions .order-quick-filters {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 38px;
  margin-left: auto;
}

#orders .orders-control-panel .order-quick-filters .order-quick-filter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
  min-height: 36px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  border: 1px solid var(--quick-filter-border);
  border-radius: 8px;
  background: var(--quick-filter-soft);
  color: var(--quick-filter-color);
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

#orders .order-quick-filter-amber {
  --quick-filter-color: #99600b;
  --quick-filter-border: #ebd1a3;
  --quick-filter-soft: #fff8e9;
  --quick-filter-active: #fff0c9;
}

#orders .order-quick-filter-blue {
  --quick-filter-color: #245eb0;
  --quick-filter-border: #bfd2ee;
  --quick-filter-soft: #eff5ff;
  --quick-filter-active: #deebff;
}

#orders .order-quick-filter-red {
  --quick-filter-color: #b43b3f;
  --quick-filter-border: #efc8cb;
  --quick-filter-soft: #fff1f1;
  --quick-filter-active: #ffe0e1;
}

#orders .order-quick-filter-gray {
  --quick-filter-color: #5e697b;
  --quick-filter-border: #d2d9e2;
  --quick-filter-soft: #f4f6f9;
  --quick-filter-active: #e8ecf2;
}

#orders .order-quick-filter b {
  min-width: 18px;
  padding: 3px 4px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#orders .order-quick-filter-check {
  display: none;
}

#orders .orders-control-panel .order-quick-filters .order-quick-filter.active,
#orders .orders-control-panel .order-quick-filters .order-quick-filter:hover {
  border-color: var(--quick-filter-color);
  background: var(--quick-filter-active);
}

#orders .orders-control-panel .order-quick-filters .order-quick-filter.active {
  box-shadow: inset 0 0 0 1px var(--quick-filter-color);
}

#orders .order-quick-filter.active .order-quick-filter-check {
  display: inline;
}

#orders .order-quick-filter:focus-visible {
  outline: 2px solid var(--quick-filter-color);
  outline-offset: 2px;
}

#orders .order-logistics-import-scope {
  color: #7b8697;
  font-size: 10px;
  line-height: 1.2;
}

#orders .order-wechat-report-ttl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  color: #68758a;
  font-size: 11px;
  white-space: nowrap;
}

#orders .order-wechat-report-ttl select {
  height: 28px;
  padding: 0 20px 0 6px;
  border: 1px solid #cfd9e8;
  border-radius: 6px;
  background: #fff;
  color: #42516a;
  font-size: 11px;
}

#orders .orders-control-panel .orders-logistics-panel .mini-result:not(:empty) {
  flex-basis: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

#orders .order-category-summary {
  min-width: 0;
  flex-wrap: wrap;
}

#orders .order-category-summary > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}

#orders .order-category-summary > button {
  margin-left: 0;
}

@media (max-width: 1440px) {
  #orders .orders-control-panel .filters {
    display: flex;
    flex-wrap: wrap;
    width: auto;
    min-width: 0;
    overflow: visible;
  }

  #orders .orders-control-panel .date-filter-label {
    flex: 0 1 190px;
    min-width: 0;
    max-width: 100%;
  }

  #orders .orders-control-panel .date-filter-label input {
    width: 100%;
    min-width: 0;
  }

  #orders .orders-control-panel .filters #fQ {
    flex: 1 1 260px;
    width: auto;
    min-width: 0;
    max-width: 100%;
  }

  #orders .orders-control-panel #searchBtn,
  #orders .orders-control-panel .order-quick-dates,
  #orders .orders-control-panel .toggle-label {
    flex: 0 0 auto;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  #orders .orders-control-panel .orders-utility-row .order-edit-lockbar {
    flex-basis: 100%;
    flex-wrap: wrap;
    border-right: 0;
  }

  #orders .orders-control-panel .orders-utility-row .orders-logistics-panel {
    flex-basis: 100%;
  }

  #orders .orders-control-panel .orders-logistics-panel .actions .order-quick-filters {
    flex-basis: 100%;
    margin-left: 0;
  }

  #orders .orders-control-panel .orders-logistics-panel .actions #importLogisticsBtn {
    margin-left: auto;
  }

  #orders .orders-control-panel .filters {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
  }

  #orders .orders-control-panel .filters > input,
  #orders .orders-control-panel .filters #fQ,
  #orders .orders-control-panel .date-filter-label {
    flex: 1 1 190px;
    min-width: 0;
    max-width: 100%;
  }
}

#orders {
  --admin-orders-table-width: 1860px;
  --admin-orders-select-width: 40px;
  --admin-orders-identity-width: 140px;
  --admin-orders-header-height: 42px;
  --admin-orders-row-height: 68px;
}

#orders > .tablewrap,
#orders > .admin-orders-table-wrap {
  position: relative;
  isolation: isolate;
  width: auto;
  max-width: none;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #fff;
}

#orders .admin-orders-data-table {
  width: max(100%, var(--admin-orders-table-width));
  min-width: 1860px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

#orders .admin-orders-data-table th,
#orders .admin-orders-data-table td {
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  padding: 5px 7px;
  border-right: 1px solid #edf0f5;
  border-bottom: 1px solid #e5eaf2;
  color: #27354b;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

#orders .admin-orders-data-table th {
  position: sticky;
  z-index: 5;
  top: 0;
  height: var(--admin-orders-header-height);
  padding-top: 7px;
  padding-bottom: 7px;
  border-bottom-color: #d7deea;
  background: #f3f6fb;
  box-shadow: inset 0 -1px 0 #d7deea;
  color: #59677e;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .01em;
  text-align: center;
}

#orders .admin-orders-data-table td {
  height: var(--admin-orders-row-height);
  background: #fff;
}

#orders .admin-orders-data-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

#orders .admin-orders-data-table tbody tr:hover td {
  background: #f3f7ff;
}

#orders .admin-orders-data-table tbody tr:has(.row-check:checked) td {
  background: #eaf2ff;
}

#orders .admin-orders-data-table th:last-child,
#orders .admin-orders-data-table td:last-child {
  border-right: 0;
}

/* Stable 1860px column contract. Keep customer, supplier and remark distinct. */
#orders .admin-orders-data-table col.order-col-select,
#orders .admin-orders-data-table .order-col-select { width: 40px; }
#orders .admin-orders-data-table col.order-col-identity,
#orders .admin-orders-data-table .order-col-identity { width: 140px; }
#orders .admin-orders-data-table col.order-col-customer,
#orders .admin-orders-data-table .order-col-customer { width: 160px; }
#orders .admin-orders-data-table col.order-col-supplier,
#orders .admin-orders-data-table .order-col-supplier { width: 170px; }
#orders .admin-orders-data-table col.order-col-purchase,
#orders .admin-orders-data-table .order-col-purchase { width: 68px; }
#orders .admin-orders-data-table col.order-col-product,
#orders .admin-orders-data-table .order-col-product { width: 145px; }
#orders .admin-orders-data-table col.order-col-model,
#orders .admin-orders-data-table .order-col-model { width: 140px; }
#orders .admin-orders-data-table col.order-col-qty,
#orders .admin-orders-data-table .order-col-qty { width: 48px; }
#orders .admin-orders-data-table col.order-col-sale,
#orders .admin-orders-data-table .order-col-sale { width: 64px; }
#orders .admin-orders-data-table col.order-col-amount,
#orders .admin-orders-data-table .order-col-amount { width: 72px; }
#orders .admin-orders-data-table col.order-col-recipient,
#orders .admin-orders-data-table .order-col-recipient { width: 105px; }
#orders .admin-orders-data-table col.order-col-address,
#orders .admin-orders-data-table .order-col-address { width: 140px; }
#orders .admin-orders-data-table col.order-col-remark,
#orders .admin-orders-data-table .order-col-remark { width: 104px; }
#orders .admin-orders-data-table col.order-col-logistics,
#orders .admin-orders-data-table .order-col-logistics { width: 220px; }
#orders .admin-orders-data-table col.order-col-status,
#orders .admin-orders-data-table .order-col-status { width: 72px; }
#orders .admin-orders-data-table col.order-col-payment,
#orders .admin-orders-data-table .order-col-payment { width: 82px; }
#orders .admin-orders-data-table col.order-col-actions,
#orders .admin-orders-data-table .order-col-actions { width: 90px; }

#orders .admin-orders-data-table td.order-col-select,
#orders .admin-orders-data-table td.order-col-status,
#orders .admin-orders-data-table td.order-col-payment,
#orders .admin-orders-data-table td.order-col-actions {
  text-align: center;
}

#orders .admin-orders-data-table td.order-col-purchase,
#orders .admin-orders-data-table td.order-col-product,
#orders .admin-orders-data-table td.order-col-model,
#orders .admin-orders-data-table td.order-col-qty,
#orders .admin-orders-data-table td.order-col-sale,
#orders .admin-orders-data-table td.order-col-amount,
#orders .admin-orders-data-table td.order-col-recipient {
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#orders .admin-orders-data-table td.order-col-purchase :is(input, select, textarea),
#orders .admin-orders-data-table td.order-col-product :is(input, select, textarea),
#orders .admin-orders-data-table td.order-col-model :is(input, select, textarea),
#orders .admin-orders-data-table td.order-col-qty :is(input, select, textarea),
#orders .admin-orders-data-table td.order-col-sale :is(input, select, textarea),
#orders .admin-orders-data-table td.order-col-amount :is(input, select, textarea),
#orders .admin-orders-data-table td.order-col-recipient :is(input, select, textarea) {
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* No horizontal locked columns: the whole table scrolls as one surface. */
#orders .admin-orders-data-table th.order-col-select,
#orders .admin-orders-data-table th.order-col-identity,
#orders .admin-orders-data-table th.order-col-actions {
  position: sticky;
  z-index: 5;
  top: 0;
  right: auto;
  left: auto;
  box-shadow: inset 0 -1px 0 #d7deea;
}

#orders .admin-orders-data-table td.order-col-select,
#orders .admin-orders-data-table td.order-col-identity,
#orders .admin-orders-data-table td.order-col-actions {
  position: static;
  z-index: auto;
  right: auto;
  left: auto;
  box-shadow: none;
}

#orders .admin-orders-data-table tbody tr:nth-child(odd) td.order-col-select,
#orders .admin-orders-data-table tbody tr:nth-child(odd) td.order-col-identity,
#orders .admin-orders-data-table tbody tr:nth-child(odd) td.order-col-actions {
  background: #fff;
}

#orders .admin-orders-data-table tbody tr:nth-child(even) td.order-col-select,
#orders .admin-orders-data-table tbody tr:nth-child(even) td.order-col-identity,
#orders .admin-orders-data-table tbody tr:nth-child(even) td.order-col-actions {
  background: #fbfcfe;
}

#orders .admin-orders-data-table tbody tr:hover td.order-col-select,
#orders .admin-orders-data-table tbody tr:hover td.order-col-identity,
#orders .admin-orders-data-table tbody tr:hover td.order-col-actions {
  background: #f3f7ff;
}

#orders .admin-orders-data-table tbody tr:has(.row-check:checked) td.order-col-select,
#orders .admin-orders-data-table tbody tr:has(.row-check:checked) td.order-col-identity,
#orders .admin-orders-data-table tbody tr:has(.row-check:checked) td.order-col-actions {
  background: #eaf2ff;
}

/* Two-line information hierarchy: strong value above, supporting value below. */
#orders .admin-orders-data-table .order-cell-stack,
#orders .admin-orders-data-table .order-dual-cell {
  display: grid;
  align-content: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  overflow: hidden;
}

#orders .admin-orders-data-table .order-cell-primary,
#orders .admin-orders-data-table .order-cell-secondary,
#orders .admin-orders-data-table .order-dual-primary,
#orders .admin-orders-data-table .order-dual-secondary {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-cell-primary,
#orders .admin-orders-data-table .order-dual-primary {
  color: #263650;
  font-size: 11px;
  font-weight: 750;
}

#orders .admin-orders-data-table .order-cell-secondary,
#orders .admin-orders-data-table .order-dual-secondary {
  color: #77849a;
  font-size: 10px;
  font-weight: 500;
}

#orders .admin-orders-data-table .order-company-line {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-company-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-company-badge,
#orders .admin-orders-data-table .customer-price-level,
#orders .admin-orders-data-table .supplier-match-badge {
  flex: 0 0 auto;
  width: max-content;
  max-width: 64px;
  height: 18px;
  margin: 0;
  overflow: hidden;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 9px;
  line-height: 18px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Customer and supplier already have dedicated columns; no redundant prefixes. */
#orders .admin-orders-data-table .order-party-prefix,
#orders .admin-orders-data-table .order-customer-prefix,
#orders .admin-orders-data-table .order-supplier-prefix,
#orders .admin-orders-data-table [data-order-party-prefix] {
  display: none !important;
}

#orders .admin-orders-data-table input,
#orders .admin-orders-data-table select,
#orders .admin-orders-data-table textarea {
  min-width: 0;
  max-width: 100%;
  height: 22px;
  min-height: 22px;
  padding: 0 4px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 20px;
}

#orders .admin-orders-data-table textarea.order-expand-input {
  line-height: 20px;
  white-space: nowrap;
  word-break: normal;
}

#orders .admin-orders-data-table .order-cell-stack input,
#orders .admin-orders-data-table .order-cell-stack textarea,
#orders .admin-orders-data-table .order-dual-cell input,
#orders .admin-orders-data-table .order-dual-cell textarea,
#orders .admin-orders-data-table .order-company-line input,
#orders .admin-orders-data-table .order-company-line textarea {
  flex: 1 1 auto;
  width: 100%;
}

#orders .admin-orders-data-table .order-col-address [data-order-full-text],
#orders .admin-orders-data-table .order-col-remark [data-order-full-text],
#orders .admin-orders-data-table .order-company-name,
#orders .admin-orders-data-table .order-cell-primary,
#orders .admin-orders-data-table .order-cell-secondary,
#orders .admin-orders-data-table .order-dual-primary,
#orders .admin-orders-data-table .order-dual-secondary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A remark stays one line in the grid; editing happens in a compact anchored panel. */
#orders .admin-orders-data-table td.order-col-remark {
  overflow: hidden;
  text-align: left;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-remark-display {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 26px;
  min-height: 26px;
  padding: 0 4px 0 6px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: #4b5b72;
  font: inherit;
  line-height: 24px;
  text-align: left;
  white-space: nowrap;
}

/* A filled remark should stand out from the surrounding order fields. */
#orders .admin-orders-data-table .order-remark-display:not(.is-empty) {
  color: #c2410c;
  font-weight: 700;
}

#orders .admin-orders-data-table .order-remark-display.is-empty {
  color: #98a3b4;
}

#orders .admin-orders-data-table .order-remark-display.is-readonly:disabled {
  cursor: default;
  opacity: 1;
}

#orders .admin-orders-data-table .order-remark-display.is-editable {
  cursor: pointer;
}

#orders .admin-orders-data-table .order-remark-display.is-editable:hover,
#orders .admin-orders-data-table .order-remark-display.is-editable:focus-visible {
  border-color: #b7c8e6;
  background: #f2f6fd;
  color: #2e58a5;
  outline: none;
}

#orders .admin-orders-data-table .order-remark-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-remark-edit-affordance {
  flex: 0 0 14px;
  width: 14px;
  overflow: hidden;
  opacity: 0;
  color: #3769c4;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: translateX(3px);
  transition: opacity .14s ease, transform .14s ease;
}

#orders .admin-orders-data-table .order-remark-display.is-editable:hover .order-remark-edit-affordance,
#orders .admin-orders-data-table .order-remark-display.is-editable:focus-visible .order-remark-edit-affordance {
  opacity: 1;
  transform: translateX(0);
}

#orders .order-remark-editor {
  position: fixed;
  z-index: 10060;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  width: min(292px, calc(100vw - 24px));
  padding: 11px;
  border: 1px solid #b9c8df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 48, 77, .22);
  color: #2c3a50;
}

#orders .order-remark-editor.hidden {
  display: none !important;
}

#orders .order-remark-editor::before {
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 9px;
  height: 9px;
  border-top: 1px solid #b9c8df;
  border-left: 1px solid #b9c8df;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

#orders .order-remark-editor.popover-above::before {
  top: auto;
  bottom: -5px;
  border: 0;
  border-right: 1px solid #b9c8df;
  border-bottom: 1px solid #b9c8df;
}

#orders .order-remark-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#orders .order-remark-editor-head strong {
  min-width: 0;
  overflow: hidden;
  color: #263650;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .order-remark-editor-head span {
  flex: 0 0 auto;
  color: #7b8799;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#orders .order-remark-editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 78px;
  max-height: 156px;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid #cbd5e3;
  border-radius: 7px;
  outline: none;
  color: #263650;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
}

#orders .order-remark-editor textarea:focus {
  border-color: #5d83d8;
  box-shadow: 0 0 0 2px rgba(73, 113, 199, .14);
}

#orders .order-remark-editor textarea[aria-invalid="true"] {
  border-color: #d75b68;
  box-shadow: 0 0 0 2px rgba(200, 61, 76, .12);
}

#orders .order-remark-editor-status {
  min-height: 15px;
  color: #718096;
  font-size: 10px;
  line-height: 15px;
}

#orders .order-remark-editor[data-state="saving"] .order-remark-editor-status,
#orders .order-remark-editor[data-state="unchanged"] .order-remark-editor-status {
  color: #8a6518;
}

#orders .order-remark-editor[data-state="success"] {
  border-color: #9ccfb2;
}

#orders .order-remark-editor[data-state="success"] .order-remark-editor-status {
  color: #197249;
  font-weight: 700;
}

#orders .order-remark-editor[data-state="error"] .order-remark-editor-status {
  color: #bc3545;
  font-weight: 700;
}

#orders .order-remark-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

#orders .order-remark-editor-actions button {
  min-width: 54px;
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
}

/* The red report check keeps the order row compact. Its shared explanation is
   edited in one viewport popover, rather than adding another table column. */
#orders .order-wechat-report-note-editor {
  position: fixed;
  z-index: 10070;
  box-sizing: border-box;
  display: grid;
  gap: 8px;
  width: min(310px, calc(100vw - 24px));
  padding: 11px;
  border: 1px solid #e2a3a8;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(54, 33, 41, .22);
  color: #2c3a50;
}

#orders .order-wechat-report-note-editor.hidden {
  display: none !important;
}

#orders .order-wechat-report-note-editor::before {
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 9px;
  height: 9px;
  border-top: 1px solid #e2a3a8;
  border-left: 1px solid #e2a3a8;
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

#orders .order-wechat-report-note-editor.popover-above::before {
  top: auto;
  bottom: -5px;
  border: 0;
  border-right: 1px solid #e2a3a8;
  border-bottom: 1px solid #e2a3a8;
}

#orders .order-wechat-report-note-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#orders .order-wechat-report-note-editor-head strong {
  min-width: 0;
  overflow: hidden;
  color: #932a33;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .order-wechat-report-note-editor-head > span {
  flex: 0 0 auto;
  color: #7b8799;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

#orders .order-wechat-report-note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  color: #7b8799;
  font-size: 10px;
  line-height: 1.35;
}

#orders .order-wechat-report-note-editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 66px;
  max-height: 132px;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid #d8c4c7;
  border-radius: 7px;
  outline: none;
  color: #263650;
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.45;
}

#orders .order-wechat-report-note-editor textarea:focus {
  border-color: #cf5964;
  box-shadow: 0 0 0 2px rgba(207, 89, 100, .13);
}

#orders .order-wechat-report-note-editor textarea[aria-invalid="true"] {
  border-color: #d75b68;
  box-shadow: 0 0 0 2px rgba(200, 61, 76, .12);
}

#orders .order-wechat-report-note-editor-status {
  min-height: 15px;
  color: #718096;
  font-size: 10px;
  line-height: 15px;
}

#orders .order-wechat-report-note-editor[data-state="saving"] .order-wechat-report-note-editor-status,
#orders .order-wechat-report-note-editor[data-state="unchanged"] .order-wechat-report-note-editor-status {
  color: #8a6518;
}

#orders .order-wechat-report-note-editor[data-state="success"] {
  border-color: #9ccfb2;
}

#orders .order-wechat-report-note-editor[data-state="success"] .order-wechat-report-note-editor-status {
  color: #197249;
  font-weight: 700;
}

#orders .order-wechat-report-note-editor[data-state="error"] .order-wechat-report-note-editor-status {
  color: #bc3545;
  font-weight: 700;
}

#orders .order-wechat-report-note-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

#orders .order-wechat-report-note-editor-actions button {
  min-width: 54px;
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11px;
}

/* Logistics uses two visual rows: carrier + full number, then action icons. */
#orders .admin-orders-data-table .order-logistics-line,
#orders .admin-orders-data-table .logistics-cell,
#orders .admin-orders-data-table .logistics-cell.special-delivery-cell {
  display: grid;
  grid-template-rows: 24px 24px;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  overflow: hidden;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-logistics-line > *,
#orders .admin-orders-data-table .logistics-cell > * {
  min-width: 0;
}

#orders .admin-orders-data-table .order-logistics-primary,
#orders .admin-orders-data-table .logistics-input-shell {
  display: flex;
  grid-row: 1;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  height: 24px;
  overflow: hidden;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-logistics-primary .logistics-input-shell {
  grid-row: auto;
  flex: 1 1 auto;
  width: 100%;
}

#orders .admin-orders-data-table .order-logistics-primary input,
#orders .admin-orders-data-table .logistics-input-shell input,
#orders .admin-orders-data-table .logistics-input-shell textarea {
  flex: 1 1 170px;
  width: auto;
  min-width: 0;
  overflow: visible;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
}

#orders .admin-orders-data-table .logistics-empty-number {
  overflow: hidden;
  color: #9aa6b8;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .logistics-package-entry {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 22px;
  min-height: 22px;
  padding: 0 4px;
  overflow: hidden;
  border: 1px solid #d7e1ee;
  border-radius: 6px;
  background: #fff;
  color: #263650;
  font-size: 10px;
  line-height: 20px;
  text-align: left;
}

#orders .admin-orders-data-table .logistics-package-entry:hover {
  border-color: #91add7;
  background: #f7faff;
}

#orders .admin-orders-data-table .logistics-primary-number {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
  white-space: nowrap;
}

#orders .admin-orders-data-table .logistics-package-entry > b {
  flex: 0 0 auto;
  height: 17px;
  padding: 0 5px;
  color: #1768c5;
  font-size: 9px;
  font-weight: 750;
  line-height: 17px;
  border-radius: 9px;
  background: #eaf3ff;
}

#orders .admin-orders-data-table .logistics-package-count {
  box-sizing: border-box;
  flex: 0 0 auto;
  height: 20px;
  min-height: 20px;
  padding: 0 5px;
  color: #1768c5;
  font-size: 9px;
  font-weight: 750;
  line-height: 18px;
  white-space: nowrap;
  border: 1px solid #c9dcf6;
  border-radius: 9px;
  background: #eaf3ff;
}

#orders .admin-orders-data-table .logistics-package-count:hover,
#orders .admin-orders-data-table .logistics-package-count:focus-visible {
  border-color: #78a4df;
  background: #dfeeff;
  outline: none;
}

#orders .admin-orders-data-table .logistics-company-chip {
  flex: 0 0 auto;
  max-width: 58px;
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-logistics-secondary,
#orders .admin-orders-data-table .logistics-cell-actions {
  display: flex;
  grid-row: 2;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  width: 100%;
  min-width: 0;
  height: 24px;
  overflow: hidden;
  white-space: nowrap;
}

#orders .admin-orders-data-table .logistics-cell-actions button:not(.logistics-track-btn),
#orders .admin-orders-data-table .order-logistics-secondary button:not(.logistics-track-btn) {
  box-sizing: border-box;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  padding: 0;
  overflow: hidden;
  border-radius: 5px;
  font-size: 9px;
  line-height: 20px;
  white-space: nowrap;
}

#orders .admin-orders-data-table .logistics-track-btn > svg,
#orders .admin-orders-data-table .order-logistics-add-btn > svg,
#orders .admin-orders-data-table .special-delivery-row-btn > svg {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

#orders .admin-orders-data-table .logistics-track-btn .logistics-route-dash {
  stroke-dasharray: 1.6 1.8;
}

#orders .admin-orders-data-table .order-model-value {
  display: block;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

#orders .admin-orders-data-table .order-model-value > input {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-model-value > input:focus {
  text-overflow: clip;
}

#orders .admin-orders-data-table .special-delivery-cell .order-logistics-primary,
#orders .admin-orders-data-table .special-delivery-cell .special-delivery-view-tag {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Icon-only copy affordance; the accessible label and native title remain. */
#orders .admin-orders-data-table .order-icon-copy,
#orders .admin-orders-data-table .order-row-copy-btn,
#orders .admin-orders-data-table .order-company-copy-btn {
  position: relative;
  display: inline-flex;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 1px solid #cfd9e8;
  border-radius: 6px;
  background: #fff;
  color: transparent;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

#orders .admin-orders-data-table .order-icon-copy > *,
#orders .admin-orders-data-table .order-row-copy-btn > *,
#orders .admin-orders-data-table .order-company-copy-btn > * {
  display: none;
}

#orders .admin-orders-data-table .order-icon-copy::before,
#orders .admin-orders-data-table .order-row-copy-btn::before,
#orders .admin-orders-data-table .order-company-copy-btn::before {
  position: absolute;
  top: 5px;
  left: 7px;
  width: 7px;
  height: 8px;
  border: 1.3px solid #607089;
  border-radius: 2px;
  content: "";
}

#orders .admin-orders-data-table .order-icon-copy::after,
#orders .admin-orders-data-table .order-row-copy-btn::after,
#orders .admin-orders-data-table .order-company-copy-btn::after {
  position: absolute;
  top: 8px;
  left: 5px;
  width: 7px;
  height: 8px;
  border: 1.3px solid #607089;
  border-radius: 2px;
  background: #fff;
  content: "";
}

#orders .admin-orders-data-table .order-icon-copy:hover,
#orders .admin-orders-data-table .order-row-copy-btn:hover,
#orders .admin-orders-data-table .order-company-copy-btn:hover {
  border-color: #91abed;
  background: #edf3ff;
}

#orders .admin-orders-data-table .order-icon-copy:hover::after,
#orders .admin-orders-data-table .order-icon-copy:hover::before,
#orders .admin-orders-data-table .order-row-copy-btn:hover::after,
#orders .admin-orders-data-table .order-row-copy-btn:hover::before,
#orders .admin-orders-data-table .order-company-copy-btn:hover::after,
#orders .admin-orders-data-table .order-company-copy-btn:hover::before {
  border-color: #315fd2;
}

#orders .admin-orders-data-table .order-icon-copy.copied,
#orders .admin-orders-data-table .order-row-copy-btn.copied,
#orders .admin-orders-data-table .order-company-copy-btn.copied,
#orders .admin-orders-data-table .order-icon-copy.reported,
#orders .admin-orders-data-table .order-row-copy-btn.reported,
#orders .admin-orders-data-table .order-company-copy-btn.reported {
  border-color: #e7a2a5;
  background: #fff3f3;
}

#orders .admin-orders-data-table .order-icon-copy.copied::after,
#orders .admin-orders-data-table .order-icon-copy.copied::before,
#orders .admin-orders-data-table .order-row-copy-btn.copied::after,
#orders .admin-orders-data-table .order-row-copy-btn.copied::before,
#orders .admin-orders-data-table .order-company-copy-btn.copied::after,
#orders .admin-orders-data-table .order-company-copy-btn.copied::before,
#orders .admin-orders-data-table .order-icon-copy.reported::after,
#orders .admin-orders-data-table .order-icon-copy.reported::before,
#orders .admin-orders-data-table .order-row-copy-btn.reported::after,
#orders .admin-orders-data-table .order-row-copy-btn.reported::before,
#orders .admin-orders-data-table .order-company-copy-btn.reported::after,
#orders .admin-orders-data-table .order-company-copy-btn.reported::before {
  border-color: #b62932;
}

/* The report acknowledgement keeps the small red check visible while the
   copy control remains clickable. */
#orders .admin-orders-data-table .order-row-copy-btn.copied::before,
#orders .admin-orders-data-table .order-row-copy-btn.copied::after,
#orders .admin-orders-data-table .order-row-copy-btn.reported::before,
#orders .admin-orders-data-table .order-row-copy-btn.reported::after {
  opacity: 0;
}

#orders .admin-orders-data-table .order-row-copy-btn.copied > i,
#orders .admin-orders-data-table .order-row-copy-btn.reported > i {
  position: absolute;
  z-index: 2;
  top: 4px;
  right: 3px;
  display: inline-flex;
  width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d9363e;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 12px;
}

#orders .admin-orders-data-table .status-badge,
#orders .admin-orders-data-table .payment-badge {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding-right: 6px;
  padding-left: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-col-actions button {
  max-width: 100%;
  height: 24px;
  min-height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 9px;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-actions-line {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  white-space: nowrap;
}

#orders .admin-orders-data-table .order-actions-line > :not(.order-icon-copy) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#orders .admin-orders-data-table .order-after-sale-trigger.is-readonly {
  color: #53627a;
  border-color: #d8e0ec;
  background: #f5f7fb;
}

/* Chained contract for regression checks and to exclude similarly named tables. */
#orders .orders-table.admin-orders-data-table {
  width: max(100%, var(--admin-orders-table-width));
  min-width: 1860px;
}

#orders .orders-table.admin-orders-data-table th {
  position: sticky;
  top: 0;
  height: var(--admin-orders-header-height);
}

#orders .orders-table.admin-orders-data-table td {
  height: var(--admin-orders-row-height);
}

@media (max-width: 900px) {
  #orders {
    --admin-orders-header-height: 40px;
    --admin-orders-row-height: 68px;
  }

  #orders .admin-orders-data-table th,
  #orders .admin-orders-data-table td {
    padding-right: 5px;
    padding-left: 5px;
  }
}
#orders .admin-orders-data-table .order-original-term-readonly {
  background: #eef1f5;
  border-color: #dfe4eb;
  color: #687587;
  -webkit-text-fill-color: #687587;
  opacity: 1;
  cursor: text;
  user-select: text;
}

#orders .admin-orders-data-table div.order-original-term-readonly {
  border: 1px solid #dfe4eb;
  border-radius: 5px;
  padding: 2px;
}

#orders .admin-orders-data-table .order-logistics-pending-funds {
  flex: 0 0 auto;
  color: #9a6718;
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
}


/* Current order projections stay separate from immutable historical inputs. */
.admin-orders-data-table .order-current-sale-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  line-height: 1.35;
}

.admin-orders-data-table .order-current-sale-cell strong {
  font-weight: 600;
  color: #243b62;
}

.admin-orders-data-table .order-current-sale-cell small {
  max-width: 100%;
  color: #77869e;
  font-size: 10px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.order-partial-return-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 5px;
  border: 1px solid #b9d8ff;
  border-radius: 4px;
  background: #edf5ff;
  color: #1767c9;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

/* Reference workbench: compact state-based details; background remains usable. */
#orders.is-after-sale-mode > .orders-control-panel,
#orders.is-after-sale-mode > .tablewrap,
#orders.is-after-sale-mode > #ordersPager,
#orders.is-after-sale-mode .orders-integrated-metrics,
#orders.is-after-sale-mode > .topbar .top-actions,
#orders.is-after-sale-mode #orderOverviewRange {
  display: none !important;
}

#orders.is-after-sale-mode > .topbar {
  min-height: 66px;
  padding: 12px 18px;
  flex: 0 0 auto;
}

#orderAfterSaleQueue {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce5f3;
  border-radius: 12px;
  background: #fff;
}

#orderAfterSaleQueue[hidden],
#orderAfterSaleModal [hidden],
#orderAfterSaleModal.hidden {
  display: none !important;
}

.order-after-sale-queue .after-sale-queue-toolbar {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #e8edf5;
}

.order-after-sale-queue .after-sale-queue-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #667085;
  font-size: 12px;
}

.order-after-sale-queue .after-sale-queue-toolbar input,
.order-after-sale-queue .after-sale-queue-toolbar button,
.order-after-sale-queue .after-sale-queue-toolbar select {
  width: auto;
  min-height: 34px;
  height: 34px;
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
}

#afterSaleQueueQuery {
  flex: 1 1 220px;
  min-width: 160px;
  max-width: 440px;
}

.after-sale-queue-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 12px;
  overflow-x: auto;
  border-bottom: 1px solid #e3eaf4;
  background: #f9fbfe;
}

.after-sale-queue-tabs button {
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 9px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #475467;
  box-shadow: none;
  font-size: 13px;
}

.after-sale-queue-tabs button.active,
.after-sale-queue-tabs button[aria-pressed="true"],
.after-sale-queue-tabs button[aria-selected="true"] {
  border-bottom-color: #2563eb;
  color: #175cd3;
  font-weight: 700;
}

.after-sale-queue-table-wrap {
  flex: 1 1 0;
  min-height: 120px;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.after-sale-queue-table {
  width: 100%;
  min-width: 1030px;
  margin: 0;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  color: #344054;
  font-size: 12px;
}

.after-sale-queue-table th,
.after-sale-queue-table td {
  height: auto;
  max-height: none;
  padding: 11px 12px;
  border: 0;
  border-right: 1px solid #edf1f7;
  border-bottom: 1px solid #e6edf6;
  text-align: left;
  vertical-align: middle;
  line-height: 1.5;
}

.after-sale-queue-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-top: 10px;
  padding-bottom: 10px;
  background: #f0f4fa;
  color: #53627b;
  white-space: nowrap;
}

.after-sale-queue-table tbody tr:nth-child(even) td { background: #fafcff; }
.after-sale-queue-table tbody tr:hover td { background: #f0f6ff; }
.after-sale-queue-table th:last-child,
.after-sale-queue-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 105px;
  background: #fff;
  border-left: 1px solid #e0e8f4;
  box-shadow: -3px 0 6px rgb(25 56 100 / 4%);
  white-space: nowrap;
}
.after-sale-queue-table th:last-child { z-index: 4; background: #f0f4fa; }
.after-sale-queue-table td > strong,
.after-sale-queue-table td > small { display: block; }
.after-sale-queue-table small { color: #758198; font-size: 11px; }
.after-sale-queue-table button { width: auto; min-height: 32px; padding: 5px 11px; font-size: 12px; }
.after-sale-queue-table .after-sale-order-link { display: block; min-height: 0; margin: 0 0 4px; padding: 0; border: 0; background: transparent; color: #0868e8; box-shadow: none; font-weight: 700; text-align: left; }
.after-sale-queue-table .order-after-sale-stamp { display: inline-flex; padding: 3px 7px; font-size: 11px; }

#afterSaleQueuePager {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 46px;
  padding: 8px 14px;
  border-top: 1px solid #e2e9f3;
  background: #f9fbfe;
  color: #667085;
  font-size: 12px;
}
#afterSaleQueuePager > div { display: flex; align-items: center; gap: 6px; }
#afterSaleQueuePager button { width: auto; min-height: 28px; padding: 3px 10px; font-size: 12px; }

#orderAfterSaleModal {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: block;
  padding: 0;
  overflow: visible;
  background: transparent !important;
  backdrop-filter: none !important;
  pointer-events: none;
}

/* Override the legacy emergency overlay layer, keeping the shared financial
   confirmation (3600) above this window and the sticky navigation below it. */
#orderAfterSaleModal.order-after-sale-modal-root {
  z-index: 3500 !important;
  padding: 0 !important;
}

#orderAfterSaleModal .order-after-sale-modal-panel {
  position: fixed !important;
  display: flex;
  flex-direction: column;
  /* Match the 16px position clamp on both edges, including restored windows
     after the viewport narrows. A larger minimum would override the maximum. */
  width: min(560px, calc(100vw - 32px));
  height: min(780px, calc(100dvh - 32px));
  min-width: min(420px, calc(100vw - 32px));
  min-height: min(360px, calc(100dvh - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: 0;
  border: 1px solid #d8e2f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 38px rgb(25 52 90 / 22%);
  resize: both;
  overflow: hidden;
  pointer-events: auto;
}

/* A missing application is a truthful compact information view, not an empty
   financial form. Inline dimensions from an explicitly resized window win. */
#orderAfterSaleModal:is([data-view-state="no-case"], [data-view-state="legacy-void"], [data-view-state="read-error"], [data-view-state="missing-case"], [data-view-state="loading"]) .order-after-sale-modal-panel {
  height: min(490px, calc(100dvh - 32px));
}

#afterSaleNavPendingBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 11px;
  background: #fff0ed;
  color: #c43225;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}
#afterSaleNavPendingBadge.hidden { display: none !important; }
#afterSaleNavPendingBadge:focus-visible { outline: 2px solid #3b67cb; outline-offset: 2px; }

#orderAfterSaleModal .order-after-sale-modal-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  margin: 0;
  padding: 12px 20px;
  border-bottom: 1px solid #e3eaf3;
  background: #f9fbff;
  cursor: move;
  touch-action: none;
}
#orderAfterSaleModal .order-after-sale-modal-bar > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
#orderAfterSaleModal .order-after-sale-modal-bar strong { color: #173052; font-size: 20px; }
#orderAfterSaleModal .order-after-sale-drag-hint { margin: 0; color: #7c88a0; font-size: 10px; }
#orderAfterSaleModal .modal-icon-void { width: 28px; height: 28px; border-radius: 7px; font-size: 12px; }
#orderAfterSaleModal .order-after-sale-modal-bar button { flex: 0 0 auto; width: auto; min-height: 32px; margin: 0; padding: 5px 11px; }

#orderAfterSaleModal .order-after-sale-modal-body {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
  overscroll-behavior: contain;
}
#orderAfterSaleSummary { display: grid; gap: 5px; margin: 0 0 16px; padding: 0; border: 0; background: transparent; }
#orderAfterSaleSummary > strong { color: #173052; font-size: 21px; line-height: 1.35; overflow-wrap: anywhere; }
#orderAfterSaleSummary > span { color: #425571; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
#orderAfterSaleSummary > small { display: block; margin-top: 5px; padding: 10px 12px; border-radius: 7px; background: #f1f5fa; color: #68778f; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
#orderAfterSaleWorkflow { display: block; margin: 0; padding: 0; border: 0; background: transparent; }
#orderAfterSaleWorkflow:empty { display: none; }
#orderAfterSaleHeaderStatus { padding: 3px 7px; border-radius: 6px; color: #b35e00; background: #fff4df; font-size: 11px; font-weight: 700; }
#orderAfterSaleModal:is([data-view-state="completed"]) #orderAfterSaleHeaderStatus { background: #e8f8ef; color: #13835d; }
#orderAfterSaleModal:is([data-view-state="rejected"], [data-view-state="read-error"]) #orderAfterSaleHeaderStatus { background: #fff0ed; color: #bf3931; }
#orderAfterSaleModal:is([data-view-state="no-case"], [data-view-state="legacy-void"], [data-view-state="missing-case"], [data-view-state="loading"]) #orderAfterSaleHeaderStatus { background: #edf2f8; color: #596b84; }
#orderAfterSaleModal[data-view-state="processing"] #orderAfterSaleHeaderStatus { background: #edf3ff; color: #175cd3; }
.after-sale-application { display: grid; gap: 12px; margin: 0; }
#orderAfterSaleModal .order-after-sale-fieldset { gap: 10px 18px; padding: 0; border: 0; background: transparent; }
#orderAfterSaleModal .order-after-sale-fieldset legend { margin-bottom: 6px; padding: 0; font-size: 12px; }
#orderAfterSaleModal .order-after-sale-fieldset label { font-size: 13px; }
#orderAfterSaleModal .order-after-sale-item { grid-template-columns: minmax(0, 1fr) 70px 126px; padding: 10px 12px; border-radius: 7px; background: #f4f7fc; }
#orderAfterSaleModal .order-after-sale-item span { color: #667085; font-size: 12px; line-height: 1.5; }
#orderAfterSaleModal .order-after-sale-item strong { color: #175cd3; font-size: 13px; text-align: right; }
#orderAfterSaleModal label { color: #475467; font-size: 12px; }
#orderAfterSaleModal input:not([type="radio"]):not([type="checkbox"]),
#orderAfterSaleModal select,
#orderAfterSaleModal textarea {
  width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #d6e1f0;
  border-radius: 7px;
  background: #fff;
  color: #344054;
  font-size: 13px;
}
#orderAfterSaleModal textarea { min-height: 64px; max-height: 160px; resize: vertical; }
#orderAfterSaleModal input[readonly], #orderAfterSaleModal textarea[readonly] { background: #f9fbfe; }
#orderAfterSaleModal .after-sale-summary-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 0; margin: 0; padding: 0; border: 1px solid #e0e9f5; border-radius: 8px; background: #f5f8fc; color: #596b84; font-size: 12px; line-height: 1.6; overflow: hidden; }
#orderAfterSaleModal .after-sale-summary-strip > small { grid-column: 1 / -1; padding: 5px 14px 9px; color: #758198; font-size: 11px; }
#orderAfterSaleModal #orderAfterSaleAmountPreview > span { padding: 10px 12px; }
#orderAfterSaleModal #orderAfterSaleAmountPreview > strong { padding: 10px 12px; color: #0868e8; font-size: 14px; text-align: right; }
#orderAfterSaleModal .after-sale-metric { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; padding: 12px 16px; }
#orderAfterSaleModal .after-sale-metric + .after-sale-metric { border-left: 1px solid #e1e9f4; }
#orderAfterSaleModal .after-sale-metric > span { color: #566a8b; font-size: 13px; }
#orderAfterSaleModal .after-sale-metric > strong { color: #173052; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
#orderAfterSaleModal .after-sale-metric:nth-child(2) > strong { color: #0868e8; font-size: 30px; letter-spacing: -.35px; }
#orderAfterSaleModal .after-sale-frozen { display: grid; gap: 14px; }
#orderAfterSaleModal .after-sale-line { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; margin: 0; color: #475467; font-size: 13px; }
#orderAfterSaleModal .after-sale-line strong { color: #0868e8; }
#orderAfterSaleModal label.after-sale-line { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 8px 10px; color: #344967; font-size: 13px; }
#orderAfterSaleModal label.after-sale-line:has(> input) { grid-template-columns: 72px minmax(0, 1fr) auto auto; }
#orderAfterSaleModal label.after-sale-line > input { grid-column: 2; min-width: 0; }
#orderAfterSaleModal label.after-sale-line > textarea { grid-column: 2; min-width: 0; }
#orderAfterSaleModal label.after-sale-line > button { width: auto; min-height: 30px; margin: 0; padding: 3px 4px; border-color: transparent; color: #0868e8; background: transparent; box-shadow: none; font-size: 12px; white-space: nowrap; }
#orderAfterSaleModal .after-sale-reason-textarea { min-height: 64px; max-height: 160px; line-height: 1.65; background: #fff; resize: vertical; }
.after-sale-line small { color: #7a869c; font-size: 11px; }
.after-sale-line label { flex: 1 1 200px; }
.after-sale-line > input { flex: 1 1 180px; }
.after-sale-line p { flex: 1 1 200px; margin: 0; line-height: 1.55; overflow-wrap: anywhere; }
.after-sale-frozen-product { margin: 0; color: #667085; font-size: 12px; line-height: 1.55; }
.after-sale-actor-summary { margin: 0; color: #758199; font-size: 11px; line-height: 1.6; }
.after-sale-source-note { margin: 12px 0 0; color: #758199; font-size: 11px; line-height: 1.65; }
#orderAfterSaleModal .after-sale-empty-view { margin: 0; padding: 16px; border: 1px solid #e2e9f4; border-radius: 9px; background: linear-gradient(145deg, #f6f9ff, #fff); }
#orderAfterSaleModal .after-sale-empty-view > header { display: flex; align-items: flex-start; gap: 11px; margin: 0 0 14px; padding: 0; border: 0; background: transparent; }
#orderAfterSaleModal .after-sale-empty-view > header > span { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #dce7f7; border-radius: 9px; background: #edf4ff; color: #2470d5; font-size: 15px; font-weight: 700; }
#orderAfterSaleModal .after-sale-empty-view h3 { margin: 0 0 5px; color: #2c456a; font-size: 15px; line-height: 1.5; }
#orderAfterSaleModal .after-sale-empty-view p { margin: 0; color: #758199; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
#orderAfterSaleModal .after-sale-empty-view .after-sale-source-note { margin-top: 13px; padding-top: 11px; border-top: 1px solid #e5ebf4; font-size: 11px; }
#orderAfterSaleModal .after-sale-empty-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 20px; margin: 0 0 14px; padding: 13px 0; border-top: 1px solid #e5ebf4; border-bottom: 1px solid #e5ebf4; }
#orderAfterSaleModal .after-sale-empty-meta > div { display: grid; gap: 4px; min-width: 0; }
#orderAfterSaleModal .after-sale-empty-meta dt { color: #8290a6; font-size: 11px; }
#orderAfterSaleModal .after-sale-empty-meta dd { margin: 0; color: #344967; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#orderAfterSaleModal .after-sale-flow { padding: 13px 0; border-top: 1px solid #e5ebf4; border-bottom: 1px solid #e5ebf4; }
#orderAfterSaleModal .after-sale-flow h3 { margin: 0 0 14px; color: #294264; font-size: 14px; }
#orderAfterSaleModal .after-sale-flow-steps { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 16px 30px; margin: 0; padding: 0; list-style: none; }
#orderAfterSaleModal .after-sale-flow-steps > li { position: relative; display: flex; flex: 1 1 130px; align-items: flex-start; gap: 10px; min-width: 0; color: #425571; }
#orderAfterSaleModal .after-sale-flow-steps > li + li::before { position: absolute; top: 4px; left: -23px; color: #99aac2; content: "→"; font-size: 18px; }
#orderAfterSaleModal .after-sale-flow-steps i { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 25px; height: 25px; border: 3px solid #f5b258; border-radius: 50%; box-shadow: 0 0 0 4px #fff7ec; color: #fff; font-size: 13px; font-style: normal; }
#orderAfterSaleModal .after-sale-flow-steps > li[data-state="done"] i { border-color: #1670e7; background: #1670e7; box-shadow: 0 0 0 4px #edf4ff; }
#orderAfterSaleModal .after-sale-flow-steps > li > div { display: grid; gap: 4px; min-width: 0; }
#orderAfterSaleModal .after-sale-flow-steps strong { color: #344967; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#orderAfterSaleModal .after-sale-flow-steps time { color: #7d8ca3; font-size: 10px; line-height: 1.5; }
.after-sale-ledger-reference { margin: 0; color: #536a8d; font-size: 11px; overflow-wrap: anywhere; }
.after-sale-history h3 { margin: 0; color: #475467; font-size: 12px; }
.after-sale-history h3 small { color: #7a869c; font-size: 10px; font-weight: 400; }
#orderAfterSaleDescription { margin: 0 0 12px; color: #7a869c; font-size: 11px; }
.after-sale-confirmation { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #e6edf6; color: #344054; font-size: 12px; line-height: 1.55; }
.after-sale-confirmation input { flex: 0 0 auto; width: 15px; height: 15px; margin: 2px 0 0; }
.after-sale-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e5ebf4; }
.after-sale-history summary { color: #344054; font-size: 12px; font-weight: 700; cursor: pointer; }
.after-sale-case-history { margin-top: 9px; padding: 8px 0; border-bottom: 1px solid #edf1f7; }
.after-sale-case-history > summary { display: flex; flex-wrap: wrap; gap: 5px 10px; color: #667085; font-size: 11px; }
.after-sale-case-history ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.after-sale-case-history li { display: grid; flex: 1 1 150px; gap: 3px; min-width: 0; padding: 7px 9px; border-radius: 7px; background: #f7f9fc; color: #667085; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.after-sale-case-history li strong { color: #344054; }
.after-sale-case-history li small { white-space: normal; overflow: visible; }
#orderAfterSaleModalFooter { display: flex; flex: 0 0 auto; flex-direction: column; gap: 9px; margin: 0; padding: 13px 20px 15px; border-top: 1px solid #e4ebf5; background: #fff; }
#orderAfterSaleModalActions, #orderAfterSaleApplicationActions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#orderAfterSaleModalFooter button { flex: 1 1 150px; width: auto; min-width: 110px; min-height: 40px; margin: 0; padding: 8px 13px; font-size: 14px; }
#orderAfterSaleModalFooter button.danger { border-color: #ed4242; background: #fff; color: #dc3434; box-shadow: none; }
#orderAfterSaleModalFooter button.primary { border-color: #0868e8; background: #0868e8; color: #fff; box-shadow: none; }
#orderAfterSaleModalHint { margin: 0; color: #7a8699; font-size: 11px; line-height: 1.5; }
#orderAfterSaleModalFooter > #orderAfterSaleModalHint { order: 2; text-align: center; }
#orderAfterSaleError { margin: 8px 0 0; color: #b42318; font-size: 12px; }
#afterSaleLegacyPayment { display: grid; gap: 9px; padding-top: 12px; border-top: 1px solid #e6edf6; }
.after-sale-queue-actions { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.after-sale-wechat-copy { position: relative; }
.after-sale-wechat-copy.is-copied { border-color: #f1b4b4; color: #a52a2a; }
.after-sale-wechat-copy > i { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; margin-left: 3px; border-radius: 50%; background: #d9363e; color: #fff; font-size: 10px; font-style: normal; font-weight: 800; line-height: 13px; }

@media (max-width: 700px) {
  .order-after-sale-queue .after-sale-queue-toolbar { gap: 6px; padding: 8px; }
  .order-after-sale-queue .after-sale-queue-toolbar label { flex: 1 1 140px; }
  #afterSaleQueueQuery { flex: 1 1 100%; max-width: none; }
  .after-sale-queue-tabs { gap: 0; padding: 0 4px; }
  .after-sale-queue-tabs button { min-height: 38px; padding: 8px 10px; font-size: 12px; }
  #afterSaleQueuePager { padding: 8px; }
  #orderAfterSaleModal .order-after-sale-modal-bar { gap: 6px; padding: 10px 12px; }
  #orderAfterSaleModal .order-after-sale-drag-hint { display: none; }
  #orderAfterSaleModal .order-after-sale-modal-body { padding: 12px; }
  #orderAfterSaleModal .order-after-sale-modal-bar strong { font-size: 17px; }
  #orderAfterSaleModal .after-sale-metric { padding: 10px 12px; }
  #orderAfterSaleModal .after-sale-metric:nth-child(2) > strong { font-size: 25px; }
  #orderAfterSaleModal label.after-sale-line { grid-template-columns: 62px minmax(0, 1fr); gap: 7px; }
  #orderAfterSaleModal label.after-sale-line:has(> input) { grid-template-columns: 62px minmax(0, 1fr) auto; }
  #orderAfterSaleModal label.after-sale-line > button:last-child:not(:nth-child(2)) { grid-column: 3; }
  #orderAfterSaleModal .after-sale-empty-view { padding: 12px; }
  #orderAfterSaleModal .after-sale-empty-meta { gap: 10px 14px; }
  #orderAfterSaleModal .after-sale-flow-steps { gap: 14px 25px; }
  #orderAfterSaleModal .order-after-sale-item { grid-template-columns: minmax(0, 1fr) 64px; gap: 7px; }
  #orderAfterSaleModal .order-after-sale-item strong { grid-column: 1 / -1; }
  #orderAfterSaleModalFooter { padding: 9px 12px 12px; }
  #orderAfterSaleModalFooter button { min-width: 96px; min-height: 34px; }
}
#orderAfterSaleAdjustmentFields[hidden] { display: none !important; }
#orderAfterSaleAdjustmentFields:not([hidden]) { display: grid; gap: 10px; margin: 12px 0; }
#orderAfterSaleAdjustmentFields > small { color: #63738b; line-height: 1.6; }
#orderAfterSaleAdjustmentFields .after-sale-line { grid-template-columns: 110px minmax(0, 1fr); }
#orderAfterSaleAdjustmentFields input, #orderAfterSaleAdjustmentFields select { min-width: 0; width: 100%; }


/* Recognition review is separate from hard validation; retain the compact entry grid. */
#entry .entry-preview-field .entry-preview-field-notes{display:flex;flex-direction:column;gap:3px;grid-column:1 / -1;min-width:0;white-space:normal;line-height:1.5}
#entry .entry-preview-field .entry-preview-field-notes:empty{display:none}
#entry .entry-preview-field-error,#entry .entry-preview-hard-note{display:block;color:#ba3434;font-size:11px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
#entry .entry-preview-hard-note{padding:4px 7px;background:#fff5f4;border-radius:5px;margin-top:4px}
#entry .entry-preview-field.review-required:not(.invalid) input{border-color:#e6c384;background:#fffdf6;color:inherit;box-shadow:none}
#entry .entry-preview-review-note{display:flex;align-items:center;justify-content:space-between;gap:5px 8px;flex-wrap:wrap;padding:3px 5px;border-radius:5px;background:#fff8e9;color:#93651c;font-size:11px;line-height:1.5;min-width:0;white-space:normal}
#entry .entry-preview-field .entry-preview-review-note>span{white-space:normal;overflow-wrap:anywhere;flex:1 1 100px;min-width:0}
#entry .entry-preview-review-note button{min-height:24px;height:auto;padding:2px 7px;font-size:11px;line-height:1.5;background:#fff;border:1px solid #dfc18d;border-radius:5px;color:#8b5a13;white-space:nowrap;flex:none;cursor:pointer}
#entry .entry-preview-review-note button:hover{background:#fff1d4;border-color:#cc9a46}
#entry .entry-preview-review-note button:focus-visible{outline:2px solid #cba568;outline-offset:2px}
#entry .entry-preview-review-note button:disabled{opacity:.55;cursor:default}
#entry .entry-preview-review-confirmed{color:#238467;font-size:11px;font-weight:500;line-height:1.5}
#entry .entry-preview-readiness.review{color:#95651a;background:#fff6e3;border-color:#ecd7ad}
#entry .entry-preview-gate.review strong{color:#96651a}
#entry .entry-preview-order.review,#entry .entry-source-segment.review{border-color:#e6c98f}
#entry .entry-live-preview-fields .entry-preview-field.invalid input{border-color:#d57575;background:#fff6f5;box-shadow:0 0 0 1px #d575751a}
#entry .entry-preview-recipient-person{grid-template-rows:auto auto;align-content:start}
/* At narrow desktop widths the sidebar leaves too little room for two panes.
   Keep each pane's measured height and its own scrolling; stack the panes so
   recipient explanations and review actions remain inside the visible card. */
@media (max-width:1150px){
  #entry .entry-live-layout{grid-template-columns:minmax(0,1fr)!important}
  #entry .entry-live-source,#entry .entry-live-preview{padding:10px!important}
}
@media (min-width:681px) and (max-width:1150px){
  #entry .entry-preview-primary-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  #entry .entry-preview-primary-row .entry-preview-status-stack{grid-column:2 / -1;justify-content:flex-end}
}


/* Manual registration is a compact administrative ledger, separate from fulfilment. */
#manualRegistrations{color:#304863;font-size:13px;min-width:0;padding:12px 16px 24px;box-sizing:border-box}
#manualRegistrations [hidden]{display:none!important}
#manualRegistrations button,#manualRegistrations input,#manualRegistrations select,#manualRegistrations textarea{font:inherit;box-sizing:border-box}
#manualRegistrations button{border:1px solid #d9e3ef;border-radius:7px;background:#fff;color:#45617f;min-height:34px;padding:6px 10px;cursor:pointer;white-space:nowrap}
#manualRegistrations button:hover{background:#eef6ff;border-color:#a9c5e5}#manualRegistrations button:disabled{opacity:.5;cursor:default}
#manualRegistrations button.primary{background:#138f87;border-color:#138f87;color:#fff}#manualRegistrations button.danger{color:#b64040;border-color:#efc7c7;background:#fff6f5}
#manualRegistrations input,#manualRegistrations select,#manualRegistrations textarea{border:1px solid #d8e2ee;border-radius:7px;padding:7px 9px;color:#28405f;background:#fff;min-width:0;max-width:100%;min-height:34px}
#manualRegistrations input:focus,#manualRegistrations select:focus,#manualRegistrations textarea:focus,#manualRegistrations button:focus-visible{outline:2px solid #87b5dd;outline-offset:1px}
#manualRegistrations .mr-toolbar{padding:10px 12px;background:#fff;border:1px solid #dce5ef;border-radius:10px;min-width:0}
#manualRegistrations .mr-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0;margin-bottom:10px}
#manualRegistrations h1{font-size:20px;margin:0;white-space:nowrap}#manualRegistrations h2{font-size:18px;margin:0}
#manualRegistrations .mr-top nav{display:flex;gap:4px}#manualRegistrations .mr-top nav button{background:#f5f8fc;border-color:transparent}#manualRegistrations .mr-top nav .is-active{color:#147d76;background:#e5f4f1;border-color:#9bd0c8}
#manualRegistrations .mr-summary{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;flex:1;min-width:0;font-size:12px;color:#7890a8}
#manualRegistrations .mr-summary span+span{border-left:1px solid #e0e8f0;padding-left:12px}#manualRegistrations .mr-summary b{font-size:17px;color:#263f60;margin-left:4px;white-space:nowrap}
#manualRegistrations .mr-top-actions,#manualRegistrations .mr-actions{display:flex;gap:6px;flex:none}
#manualRegistrations .mr-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
#manualRegistrations .mr-filters>input[type=search]{flex:1 1 160px;width:160px;min-width:120px}#manualRegistrations #mrFilterCompany{flex:0 1 160px}#manualRegistrations #mrMonth{width:140px}#manualRegistrations #mrYear{width:100px}
#manualRegistrations .mr-date-range{display:flex;gap:5px;align-items:center;min-width:0}#manualRegistrations .mr-date-range input{width:132px}
#manualRegistrations details>summary{cursor:pointer;color:#506c8b;white-space:nowrap}#manualRegistrations #mrMore{position:relative;flex:none}#manualRegistrations #mrMore>summary{height:34px;box-sizing:border-box;padding:7px 9px;border:1px solid #d9e3ef;border-radius:7px;font-size:12px}
#manualRegistrations .mr-popover{position:absolute;right:0;top:calc(100% + 6px);z-index:25;width:300px;max-width:calc(100vw - 40px);max-height:65vh;overflow:auto;padding:12px;background:#fff;border:1px solid #d5e1ed;border-radius:9px;box-shadow:0 9px 28px #26405b22;display:grid;gap:10px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
#manualRegistrations #mrMore:not([open]) .mr-popover{display:none}#manualRegistrations label{display:grid;gap:5px;min-width:0;font-size:12px;color:#6f839e}#manualRegistrations label input,#manualRegistrations label select{width:100%}
#manualRegistrations .mr-status{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 2px;font-size:12px;color:#7d8ea6;min-width:0}#manualRegistrations .mr-status>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#manualRegistrations .mr-status>span:last-child{flex:none;max-width:50%}
#manualRegistrations .mr-error{color:#b64444!important}#manualRegistrations .mr-warning{color:#a87923!important}
#manualRegistrations .mr-table-scroll{max-width:100%;overflow:auto;min-width:0;border:1px solid #dce6ef;border-radius:10px;background:#fff;max-height:calc(100dvh - 290px);min-height:160px;overscroll-behavior:contain}
#manualRegistrations table{border-collapse:separate;border-spacing:0;text-align:left;font-size:13px}
#manualRegistrations .mr-ledger{table-layout:fixed}#manualRegistrations th{position:sticky;top:0;z-index:3;background:#f1f5fa;color:#67809c;font-weight:600;white-space:nowrap;padding:10px;border-bottom:1px solid #dce5f0}
#manualRegistrations td{padding:10px;border-bottom:1px solid #edf2f7;line-height:1.5;vertical-align:middle;word-break:break-word;font-variant-numeric:tabular-nums}#manualRegistrations tbody tr:last-child td{border-bottom:0}
#manualRegistrations .mr-fixed{position:sticky;background:#fff;z-index:2}#manualRegistrations th.mr-fixed{z-index:5;background:#f1f5fa}#manualRegistrations .mr-fixed-0{left:0}#manualRegistrations .mr-fixed-1{box-shadow:2px 0 4px #36516a0c}
#manualRegistrations .mr-resizer{position:absolute;right:-3px;top:0;bottom:0;width:8px;min-height:0;padding:0;cursor:col-resize;border:0;background:transparent;z-index:6;touch-action:none}#manualRegistrations .mr-resizer:hover{background:#aac9e7}
#manualRegistrations .mr-row-actions{white-space:normal}#manualRegistrations .mr-row-actions button,#manualRegistrations .mr-stat-table button{font-size:11px;min-height:27px;padding:3px 6px;margin:2px}
#manualRegistrations .mr-link{border:0;background:transparent;padding:0;font-weight:600;color:#326aa9;min-height:25px;white-space:normal;text-align:left}
#manualRegistrations .mr-state{display:inline-block;padding:2px 7px;border-radius:5px;background:#eef3fa;color:#6e829a;white-space:nowrap;font-size:12px}#manualRegistrations .mr-state.registered{background:#e8f6f0;color:#298363}#manualRegistrations .mr-state.void,#manualRegistrations .mr-state.voided{background:#fff0ef;color:#b94d47}
#manualRegistrations .mr-pager{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;padding:10px 2px;color:#7a8fa8;font-size:12px}#manualRegistrations .mr-pager>div{display:flex;gap:7px;align-items:center}
#manualRegistrations .mr-empty{padding:45px 16px;text-align:center;color:#8191a4}#manualRegistrations .mr-stats-tools{display:flex;align-items:center;gap:8px;margin:0 0 10px}#manualRegistrations #mrBreadcrumb{display:flex;align-items:center;gap:5px;flex-wrap:wrap}#manualRegistrations .mr-stat-table{width:100%;min-width:950px}
#manualRegistrations dialog{color:#304863;border:1px solid #ceddea;border-radius:12px;padding:0;box-shadow:0 18px 65px #16334b33;box-sizing:border-box}#manualRegistrations dialog::backdrop{background:#18344d52}
#manualRegistrations dialog header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-bottom:1px solid #dfe8f0;background:#fff;flex:none}#manualRegistrations dialog header small{display:block;margin-top:5px;color:#7b8fa6;line-height:1.5}
#manualRegistrations dialog footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding:12px 16px;border-top:1px solid #dfe8f0;background:#fff;flex:none}
#manualRegistrations .mr-drawer{position:fixed;inset:0 0 0 auto;margin:0;width:min(1390px,96vw);max-width:96vw;height:100dvh;max-height:100dvh;border-radius:12px 0 0 12px;overflow:hidden}
#manualRegistrations .mr-drawer[open]{display:flex;flex-direction:column}#manualRegistrations #mrEditor{flex:1;overflow:auto;min-height:0;padding:14px 16px;overscroll-behavior:contain}#manualRegistrations #mrEditorFields{border:0;margin:0;padding:0;min-width:0}
#manualRegistrations .mr-common-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px}#manualRegistrations .mr-common-fields small{font-size:11px;color:#8898ad}
#manualRegistrations .mr-lines-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:16px 0 8px}#manualRegistrations .mr-lines-head>div{display:flex;gap:6px;flex-wrap:wrap}#manualRegistrations .mr-lines-head button{font-size:12px;min-height:30px}
#manualRegistrations .mr-items-scroll{max-width:100%;overflow:auto;border:1px solid #dce6ef;border-radius:8px}#manualRegistrations .mr-item-editor{width:1600px;table-layout:fixed}#manualRegistrations .mr-item-editor th,#manualRegistrations .mr-item-editor td{padding:7px;vertical-align:top}#manualRegistrations .mr-item-editor th:nth-child(3){width:190px}#manualRegistrations .mr-item-editor th:nth-child(4){width:155px}#manualRegistrations .mr-item-editor th:nth-child(5),#manualRegistrations .mr-item-editor th:nth-child(6),#manualRegistrations .mr-item-editor th:nth-child(8){width:90px}#manualRegistrations .mr-item-editor input{width:100%;height:34px}#manualRegistrations .mr-item-editor small{display:block;color:#8194a9;font-size:11px;margin-top:3px}#manualRegistrations .mr-item-editor button{font-size:11px;min-height:27px;padding:3px 6px;margin-right:3px}
#manualRegistrations .mr-help{font-size:12px;color:#8798ac;line-height:1.6;margin:8px 0}#manualRegistrations #mrDropzone{padding:14px;border:1px dashed #bccfe2;border-radius:8px;background:#f6f9fd;color:#8295ad;font-size:12px;line-height:1.6}#manualRegistrations #mrDropzone.is-dragging{background:#e7f4f0;border-color:#329a88}
#manualRegistrations .mr-file-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px}#manualRegistrations .mr-file{display:flex;align-items:center;gap:6px;border:1px solid #e1e9f0;border-radius:7px;padding:7px;min-width:0}#manualRegistrations .mr-file>button:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;text-align:left;border:0;color:#2b6aaa}#manualRegistrations .mr-file small{color:#8b9bb0;font-size:11px}#manualRegistrations .mr-file button{font-size:12px;min-height:28px;padding:4px 6px}
#manualRegistrations #mrHistory{margin-top:16px}#manualRegistrations #mrHistoryBody{padding:8px;background:#f8fafc}#manualRegistrations #mrHistoryBody article{padding:8px;border-bottom:1px solid #e2eaf2}#manualRegistrations #mrHistoryBody small{display:block;color:#8293a9;margin-top:5px}#manualRegistrations #mrHistoryBody p{margin:6px 0}#manualRegistrations #mrHistoryBody pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
#manualRegistrations #mrEditorTotals{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;margin-right:auto;font-size:12px}#manualRegistrations #mrEditorTotals strong{font-size:17px;color:#214767}#manualRegistrations #mrEditorTotals small{color:#8a9bb0}#manualRegistrations #mrEditorStatus{font-size:12px;line-height:1.5;max-width:100%}#manualRegistrations .mr-save-actions{display:flex;gap:7px;align-items:center}
#manualRegistrations .mr-options{position:fixed;z-index:20;border:1px solid #bbd1e5;border-radius:8px;background:#fff;box-shadow:0 7px 26px #163c5c33;padding:5px;overflow:auto;box-sizing:border-box}#manualRegistrations #mrOptionList{display:grid;gap:3px}#manualRegistrations #mrOptionList>span{padding:10px;color:#8295ab}#manualRegistrations #mrOptionList button{display:grid;gap:3px;border:0;text-align:left;white-space:normal;line-height:1.5;padding:8px}#manualRegistrations #mrOptionList small{color:#8095ac;font-size:11px}
#manualRegistrations .mr-small-dialog{width:min(620px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:85dvh;overflow:auto;padding:14px}#manualRegistrations .mr-small-dialog header{margin:-14px -14px 14px}#manualRegistrations .mr-small-dialog footer{margin:14px -14px -14px}#manualRegistrations .mr-small-dialog p{font-size:13px;line-height:1.7;color:#748ca5}#manualRegistrations .mr-small-dialog textarea{width:100%}#manualRegistrations #mrColumnChoices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}#manualRegistrations #mrColumnChoices label{display:flex;align-items:center;gap:6px}#manualRegistrations #mrColumnChoices input{width:auto;min-height:0}
#manualRegistrations .mr-viewer{width:min(1100px,96vw);height:90dvh;max-width:96vw;max-height:90dvh}#manualRegistrations .mr-viewer[open]{display:flex;flex-direction:column}#manualRegistrations #mrFileBody{min-height:0;flex:1;overflow:auto;background:#eef2f7;text-align:center}#manualRegistrations #mrFileBody iframe{width:100%;height:100%;border:0}#manualRegistrations #mrFileBody img{max-width:100%;height:auto;display:block;margin:0 auto}
#manualRegistrations .mr-import-dialog{width:min(1100px,96vw);max-width:96vw;max-height:90dvh;padding:16px;overflow:auto}#manualRegistrations .mr-import-dialog header{margin:-16px -16px 14px}#manualRegistrations .mr-import-dialog footer{margin:14px -16px -16px}#manualRegistrations #mrImportStatus{padding:12px 0;font-size:13px}#manualRegistrations .mr-import-table{width:100%;min-width:850px}#manualRegistrations .mr-import-table td:nth-child(3){max-width:600px}#manualRegistrations .mr-import-table td span{display:inline-block;margin:3px 10px 3px 0;font-size:12px}
@media(max-width:1150px){#manualRegistrations .mr-summary{flex:1 1 auto}#manualRegistrations .mr-top-actions{margin-left:auto}#manualRegistrations .mr-common-fields{grid-template-columns:repeat(3,minmax(0,1fr))}#manualRegistrations .mr-file-list{grid-template-columns:1fr}}
@media(max-width:760px){#manualRegistrations{padding:10px 8px 20px}#manualRegistrations .mr-toolbar{padding:10px}#manualRegistrations .mr-top{gap:8px}#manualRegistrations .mr-summary{flex:1 1 100%;gap:8px}#manualRegistrations .mr-summary b{font-size:15px}#manualRegistrations .mr-top-actions{margin:0;flex-wrap:wrap}#manualRegistrations .mr-filters>input[type=search]{min-width:100px;flex:1 1 42%}#manualRegistrations #mrFilterCompany{flex:1 1 42%}#manualRegistrations .mr-status>span:first-child{white-space:normal}#manualRegistrations .mr-table-scroll{max-height:60dvh}#manualRegistrations .mr-pager>div{width:100%;justify-content:flex-end}#manualRegistrations .mr-drawer{width:100vw;max-width:100vw;border-radius:0}#manualRegistrations .mr-common-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#manualRegistrations #mrEditor{padding:12px}#manualRegistrations .mr-drawer footer{padding:10px;gap:8px}#manualRegistrations .mr-save-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}#manualRegistrations #mrEditorTotals{gap:6px 10px}#manualRegistrations #mrEditorTotals small{width:100%}#manualRegistrations .mr-file{flex-wrap:wrap}#manualRegistrations .mr-file>button:first-child{flex-basis:55%}#manualRegistrations #mrColumnChoices{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:440px){#manualRegistrations .mr-common-fields{grid-template-columns:1fr}#manualRegistrations .mr-summary span+span{padding-left:8px}#manualRegistrations .mr-top nav button{padding:6px 8px}}

#manualRegistrations .mr-cell-note{display:block;font-size:11px;color:#8799ac;margin-top:3px}
#manualRegistrations .mr-inline-shortcuts{display:flex;gap:5px;flex-wrap:wrap}#manualRegistrations .mr-inline-shortcuts button{min-height:24px;padding:2px 6px;font-size:11px}

#manualRegistrations .mr-common-fields label{align-content:start}#manualRegistrations .mr-common-fields input{height:36px}#manualRegistrations .mr-audit-changes{display:grid;grid-template-columns:minmax(90px,150px) minmax(0,1fr);gap:5px 10px;font-size:12px}#manualRegistrations .mr-audit-changes dt{color:#7990a9}#manualRegistrations .mr-audit-changes dd{margin:0;overflow-wrap:anywhere}

#manualRegistrations #mrFileViewer header{flex-wrap:wrap}#manualRegistrations #mrFileTitle{min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}#manualRegistrations #mrFileTools{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:12px}#manualRegistrations .mr-preview-message{font-size:13px;line-height:1.7;padding:14px;color:#6c839d}#manualRegistrations #mrFileBody>img{background:#fff;max-width:100%;margin:12px auto}

#manualRegistrations .mr-ledger .mr-fixed-1 .mr-link{white-space:nowrap;word-break:normal;overflow-wrap:normal}


/* FIN-DASH-001: r295 finance dashboard */
.finance-dashboard-view{position:relative;background:#f4f7fb}.finance-dashboard-hero{align-items:center}.finance-dashboard-freshness{margin-left:auto;display:grid;justify-items:end;gap:4px;color:#718198}.finance-dashboard-freshness span{padding:5px 10px;border-radius:999px;background:#fff3d9;color:#a86712;font-weight:700}.finance-dashboard-freshness small{font-size:12px}.finance-dashboard-toolbar{margin:16px 18px 0;padding:14px 16px;border:1px solid #dce5f1;border-radius:16px;background:#fff;box-shadow:0 8px 24px rgba(30,57,91,.05)}.finance-dashboard-tabs,.finance-dashboard-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.finance-dashboard-tabs{padding-bottom:13px;border-bottom:1px solid #e8eef6}.finance-dashboard-tabs button{border:0;background:transparent;color:#62748c;padding:9px 14px;border-radius:10px;font-weight:700}.finance-dashboard-tabs button.is-active{background:#eaf2ff;color:#2362d4}.finance-dashboard-filters{padding-top:13px}.finance-dashboard-filters label{display:flex;align-items:center;gap:8px;color:#61728a}.finance-dashboard-filters input[type=date]{width:142px}.finance-dashboard-filters #statsKeyword{flex:1;min-width:220px}.finance-dashboard-filters button[data-finance-range]{background:#fff;border:1px solid #d8e2ef;color:#51647c}.finance-dashboard-status{margin:12px 18px 0;padding:9px 13px;border-radius:10px;background:#edf4ff;color:#42638d;font-size:13px}.finance-dashboard-status.is-loading{background:#fff7e7;color:#9a6816}.finance-dashboard-status.is-error{background:#fff0ef;color:#bd493f}.finance-dashboard-status.is-ready{background:#ebf8f2;color:#27795b}.finance-dashboard-content{padding:12px 18px 28px}.finance-dashboard-kpis{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px}.finance-dashboard-kpi{display:grid;gap:8px;text-align:left;padding:16px;border:1px solid #dce6f2;border-radius:15px;background:#fff;box-shadow:0 7px 20px rgba(32,60,92,.05);min-height:112px}.finance-dashboard-kpi span{color:#708097;font-size:13px}.finance-dashboard-kpi b{font-size:24px;color:#172d4c;font-variant-numeric:tabular-nums}.finance-dashboard-kpi small{color:#8290a4;font-size:11px}.finance-dashboard-kpi:not(:disabled):hover{border-color:#81a9ee;transform:translateY(-1px)}.finance-dashboard-kpi.is-unavailable{background:#f8f9fb;border-style:dashed}.finance-dashboard-kpi.is-unavailable b{font-size:17px;color:#8a95a6}.finance-dashboard-grid{display:grid;gap:12px;margin-top:12px}.finance-dashboard-grid.wide{grid-template-columns:minmax(0,1.65fr) minmax(300px,.75fr)}.finance-dashboard-grid.thirds{grid-template-columns:repeat(3,minmax(0,1fr))}.finance-dashboard-grid.quarters{grid-template-columns:repeat(4,minmax(0,1fr))}.finance-dashboard-card{border:1px solid #dce6f2;border-radius:15px;background:#fff;padding:16px;min-width:0}.finance-dashboard-card>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.finance-dashboard-card h3{margin:0;color:#203650;font-size:16px}.finance-dashboard-card header span{color:#8997aa;font-size:12px}.finance-dashboard-chart svg{display:block;width:100%;height:235px;overflow:visible}.finance-dashboard-chart svg line{stroke:#dbe4ef;stroke-width:1}.finance-dashboard-chart svg polyline{fill:none;stroke:#1d9c88;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.finance-dashboard-chart svg circle{fill:#fff;stroke:#1d9c88;stroke-width:3}.finance-dashboard-chart svg text{fill:#7c8ca2;font-size:11px}.finance-dashboard-ranking>button{width:100%;display:grid;grid-template-columns:24px minmax(72px,1fr) minmax(60px,1fr) auto;align-items:center;gap:8px;border:0;border-top:1px solid #eef2f7;background:#fff;padding:10px 0;text-align:left}.finance-dashboard-ranking>button i{font-style:normal;color:#8090a5}.finance-dashboard-ranking>button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#3d5069}.finance-dashboard-ranking>button em{height:5px;border-radius:5px;background:#edf1f7;overflow:hidden}.finance-dashboard-ranking>button u{display:block;height:100%;background:linear-gradient(90deg,#2f6fdf,#37b4a0);border-radius:5px}.finance-dashboard-ranking>button b{font-size:12px;color:#23405f}.finance-dashboard-ranking>button:hover span{color:#245fc5}.finance-dashboard-risks>button{display:flex;align-items:center;width:100%;gap:10px;text-align:left;border:0;border-top:1px solid #edf1f6;background:#fff;padding:11px 0}.finance-dashboard-risks>button>i{width:9px;height:9px;border-radius:50%;background:#e6a139}.finance-dashboard-risks>button>i.severity-high,.finance-dashboard-risks>button>i.severity-critical{background:#df554f}.finance-dashboard-risks>button>span{display:grid;gap:3px;flex:1}.finance-dashboard-risks>button small{color:#8190a3}.finance-dashboard-risks>button em{font-style:normal;color:#bd5148}.finance-dashboard-empty,.finance-dashboard-unavailable{min-height:120px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;color:#8997aa;text-align:center}.finance-dashboard-unavailable{margin:20px;padding:28px;border:1px dashed #e0a5a0;border-radius:14px;background:#fff6f5}.finance-dashboard-unavailable b{color:#b8443d}.finance-dashboard-drawer{position:fixed;inset:0;z-index:460;pointer-events:none;visibility:hidden}.finance-dashboard-drawer.is-open{pointer-events:auto;visibility:visible}.finance-dashboard-drawer-mask{position:absolute;inset:0;border:0;background:rgba(18,31,48,.25);opacity:0;transition:opacity .18s}.finance-dashboard-drawer.is-open .finance-dashboard-drawer-mask{opacity:1}.finance-dashboard-drawer>section{position:absolute;right:0;top:0;width:min(920px,92vw);height:100%;display:grid;grid-template-rows:auto 1fr auto;background:#fff;box-shadow:-14px 0 45px rgba(20,39,64,.2);transform:translateX(102%);transition:transform .2s}.finance-dashboard-drawer.is-open>section{transform:translateX(0)}.finance-dashboard-drawer>section>header,.finance-dashboard-drawer>section>footer{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #e4ebf4}.finance-dashboard-drawer>section>footer{border-top:1px solid #e4ebf4;border-bottom:0}.finance-dashboard-drawer h2{margin:3px 0 0}.finance-dashboard-drawer header small{color:#7f8da0}.finance-dashboard-drawer-body{overflow:auto;padding:16px}.finance-dashboard-detail-table{overflow:auto;border:1px solid #e0e7f0;border-radius:12px}.finance-dashboard-detail-table table{width:100%;min-width:1040px;border-collapse:collapse}.finance-dashboard-detail-table th,.finance-dashboard-detail-table td{padding:11px 10px;border-bottom:1px solid #edf1f6;text-align:left;font-size:12px;white-space:nowrap}.finance-dashboard-detail-table th{position:sticky;top:0;background:#f5f8fc;color:#52647a}.finance-dashboard-detail-table td small{display:block;color:#8795a7;margin-top:3px}.finance-dashboard-drawer footer label{display:flex;align-items:center;gap:7px}.finance-dashboard-drawer footer>div{display:flex;align-items:center;gap:10px}.finance-dashboard-drawer footer>div>div{display:flex;gap:7px}.finance-dashboard-legacy{display:none!important}
@media(max-width:1300px){.finance-dashboard-kpis{grid-template-columns:repeat(3,minmax(150px,1fr))}.finance-dashboard-grid.quarters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.finance-dashboard-freshness{justify-items:start;margin-left:0}.finance-dashboard-toolbar{margin:10px}.finance-dashboard-tabs{overflow:auto;flex-wrap:nowrap}.finance-dashboard-tabs button{white-space:nowrap}.finance-dashboard-filters #statsKeyword{flex-basis:100%}.finance-dashboard-content{padding:10px}.finance-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-dashboard-grid.wide,.finance-dashboard-grid.thirds,.finance-dashboard-grid.quarters{grid-template-columns:1fr}.finance-dashboard-drawer>section{width:100vw}.finance-dashboard-kpi b{font-size:20px}}
@media(max-width:480px){.finance-dashboard-kpis{grid-template-columns:1fr}.finance-dashboard-filters input[type=date]{width:calc(50% - 30px)}.finance-dashboard-chart svg{height:190px}}
.finance-dashboard-tax-metrics>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.finance-dashboard-tax-metrics article{display:grid;gap:5px;padding:13px;border:1px solid #e0e8f2;border-radius:11px;background:#f8fbff}.finance-dashboard-tax-metrics article span{color:#65778e;font-size:12px}.finance-dashboard-tax-metrics article b{color:#1f3e60;font-size:18px}.finance-dashboard-tax-metrics article small{color:#8290a2}.finance-dashboard-tax-metrics article.is-unavailable{border-style:dashed;background:#f8f9fb}.finance-dashboard-tax-metrics article.is-unavailable b{color:#8c97a7;font-size:15px}@media(max-width:480px){.finance-dashboard-tax-metrics>div{grid-template-columns:1fr}}

/* FIN-RANKING-001: movable, resizable full-ranking window */
.finance-dashboard-ranking.is-expandable{cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.finance-dashboard-ranking.is-expandable:hover{border-color:#8aafe9;box-shadow:0 10px 28px rgba(36,76,130,.1)}.finance-dashboard-ranking.is-expandable:focus-visible{outline:3px solid rgba(47,111,223,.26);outline-offset:2px}.finance-dashboard-ranking-more{border:0;background:transparent;padding:4px 0;color:#5275a7;font-size:12px;font-weight:700;cursor:pointer}.finance-dashboard-ranking-more:hover,.finance-dashboard-ranking-more:focus-visible{color:#245fc5;text-decoration:underline;text-underline-offset:3px}.finance-dashboard-ranking>button[data-finance-detail-type]{position:relative;z-index:1;cursor:pointer}
body.finance-dashboard-ranking-open{overflow:hidden}.finance-dashboard-ranking-modal{position:fixed;inset:0;z-index:470;visibility:hidden;pointer-events:none}.finance-dashboard-ranking-modal.is-open{visibility:visible;pointer-events:auto}.finance-dashboard-ranking-mask{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(16,29,46,.38);opacity:0;transition:opacity .16s}.finance-dashboard-ranking-modal.is-open .finance-dashboard-ranking-mask{opacity:1}.finance-dashboard-ranking-modal>section{position:absolute;left:24px;top:24px;width:min(1080px,calc(100vw - 48px));height:min(700px,calc(100vh - 48px));min-width:min(680px,calc(100vw - 24px));min-height:min(460px,calc(100vh - 24px));display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;border:1px solid #d5e0ed;border-radius:16px;background:#fff;box-shadow:0 28px 80px rgba(13,31,55,.3);opacity:0;transform:scale(.985);transform-origin:center;transition:opacity .16s,transform .16s}.finance-dashboard-ranking-modal.is-open>section{opacity:1;transform:none}.finance-dashboard-ranking-modal.is-maximized>section{inset:12px!important;width:auto!important;height:auto!important;min-width:0;min-height:0}.finance-dashboard-ranking-modal>section:focus{outline:none}.finance-dashboard-ranking-titlebar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 18px;border-bottom:1px solid #e3eaf3;background:linear-gradient(180deg,#fff,#f8fbff);cursor:move;touch-action:none;user-select:none}.finance-dashboard-ranking-titlebar>div:first-child{min-width:0}.finance-dashboard-ranking-titlebar small{display:block;color:#77889e;font-size:11px}.finance-dashboard-ranking-titlebar h2{margin:3px 0 0;color:#1d3655;font-size:20px}.finance-dashboard-ranking-titlebar p{margin:4px 0 0;overflow:hidden;color:#73839a;font-size:12px;text-overflow:ellipsis;white-space:nowrap}.finance-dashboard-ranking-actions{display:flex;align-items:center;gap:8px;flex:none}.finance-dashboard-ranking-actions button{min-width:40px}.finance-dashboard-ranking-body{min-height:0;overflow:auto;padding:16px;overscroll-behavior:contain}.finance-dashboard-ranking-table{min-width:840px;overflow:visible;border:1px solid #dfe7f1;border-radius:12px}.finance-dashboard-ranking-table table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed}.finance-dashboard-ranking-table th,.finance-dashboard-ranking-table td{padding:12px 13px;border-bottom:1px solid #edf1f6;background:#fff;color:#344b67;font-size:13px;vertical-align:middle}.finance-dashboard-ranking-table th{position:sticky;top:0;z-index:2;background:#f4f8fc;color:#53667e;font-weight:700}.finance-dashboard-ranking-table th:first-child{width:64px}.finance-dashboard-ranking-table th:nth-child(2){width:32%}.finance-dashboard-ranking-table th:nth-child(3){width:84px}.finance-dashboard-ranking-table tr:last-child td{border-bottom:0}.finance-dashboard-ranking-table tbody tr:hover td{background:#f8fbff}.finance-dashboard-ranking-table .is-number{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.finance-dashboard-ranking-table .is-negative{color:#c34742}.finance-dashboard-ranking-rank{color:#7d8da2!important;text-align:center;font-weight:700;font-variant-numeric:tabular-nums}.finance-dashboard-ranking-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}.finance-dashboard-ranking-state{min-height:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:10px;padding:36px;color:#7b899c;text-align:center}.finance-dashboard-ranking-state b{color:#314963;font-size:16px}.finance-dashboard-ranking-state.is-error b{color:#b5433d}.finance-dashboard-ranking-spinner{width:25px;height:25px;border:3px solid #dbe6f3;border-top-color:#2f76d9;border-radius:50%;animation:finance-ranking-spin .8s linear infinite}@keyframes finance-ranking-spin{to{transform:rotate(360deg)}}.finance-dashboard-ranking-modal>section>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-top:1px solid #e3eaf3;background:#fbfcfe}.finance-dashboard-ranking-modal>section>footer label{display:flex;align-items:center;gap:7px;color:#61728a;font-size:13px;white-space:nowrap}.finance-dashboard-ranking-pager{display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:0;color:#6e7f95;font-size:12px}.finance-dashboard-ranking-pager nav{display:flex;align-items:center;gap:6px}.finance-dashboard-ranking-pager button{min-width:34px;padding:7px 9px}.finance-dashboard-ranking-ellipsis{display:inline-flex;align-items:center;justify-content:center;width:22px;color:#8290a3}.finance-dashboard-ranking-resize{position:absolute;z-index:5;display:block;touch-action:none}.finance-dashboard-ranking-resize.is-n{left:12px;right:12px;top:0;height:8px;cursor:n-resize}.finance-dashboard-ranking-resize.is-e{right:0;top:12px;bottom:12px;width:8px;cursor:e-resize}.finance-dashboard-ranking-resize.is-s{left:12px;right:12px;bottom:0;height:8px;cursor:s-resize}.finance-dashboard-ranking-resize.is-w{left:0;top:12px;bottom:12px;width:8px;cursor:w-resize}.finance-dashboard-ranking-resize.is-ne,.finance-dashboard-ranking-resize.is-se,.finance-dashboard-ranking-resize.is-sw,.finance-dashboard-ranking-resize.is-nw{width:14px;height:14px}.finance-dashboard-ranking-resize.is-ne{right:0;top:0;cursor:ne-resize}.finance-dashboard-ranking-resize.is-se{right:0;bottom:0;cursor:se-resize}.finance-dashboard-ranking-resize.is-sw{left:0;bottom:0;cursor:sw-resize}.finance-dashboard-ranking-resize.is-nw{left:0;top:0;cursor:nw-resize}.finance-dashboard-ranking-interacting,.finance-dashboard-ranking-interacting *{user-select:none!important}.finance-dashboard-ranking-modal>section.is-interacting{transition:none}
@media(max-width:720px){.finance-dashboard-ranking-modal>section,.finance-dashboard-ranking-modal.is-maximized>section{inset:0!important;width:100vw!important;height:100dvh!important;min-width:0;min-height:0;border:0;border-radius:0;transform:none!important}.finance-dashboard-ranking-titlebar{cursor:default;padding:13px 14px}.finance-dashboard-ranking-titlebar h2{font-size:18px}.finance-dashboard-ranking-titlebar p{max-width:calc(100vw - 125px)}.finance-dashboard-ranking-actions #financeDashboardRankingMaximize{display:none}.finance-dashboard-ranking-resize{display:none}.finance-dashboard-ranking-body{padding:10px}.finance-dashboard-ranking-modal>section>footer{align-items:flex-start;flex-direction:column;padding:10px 12px}.finance-dashboard-ranking-pager{width:100%;align-items:flex-start;flex-direction:column;gap:8px}.finance-dashboard-ranking-pager nav{width:100%;overflow-x:auto;padding-bottom:2px}.finance-dashboard-ranking-pager button{flex:none}}


/* Compact sales analytics: two desktop toolbar rows; only data tables scroll. */
.sales-analysis{margin:12px 18px 24px;min-width:0;color:#273b56;font-size:13px}
.sales-analysis[hidden],.sales-analysis [hidden]{display:none!important}
.sales-analysis button,.sales-analysis input,.sales-analysis select{font:inherit;min-height:36px;box-sizing:border-box}
.sales-analysis button{cursor:pointer;border:1px solid #dae3ef;border-radius:8px;background:#fff;color:#455d7b;padding:7px 10px;white-space:nowrap}
.sales-analysis button:hover{border-color:#91b9dc;background:#f1f7ff}.sales-analysis button:disabled{opacity:.5;cursor:default}
.sales-analysis button.primary{background:#11988d;border-color:#11988d;color:#fff}
.sales-analysis input,.sales-analysis select{border:1px solid #d9e3ef;border-radius:8px;background:#fff;color:#263c55;padding:7px 9px;min-width:0;width:100%}
.sales-analysis input:focus,.sales-analysis select:focus,.sales-analysis button:focus-visible,.sa-info:focus-visible{outline:2px solid #74a8e5;outline-offset:2px}
.sa-toolbar{background:#fff;border:1px solid #dbe5ef;border-radius:11px;padding:10px 12px;min-width:0}
.sa-toolbar-head{display:flex;align-items:center;gap:14px;min-width:0;min-height:36px;margin-bottom:10px}
.sa-views{display:flex;gap:4px;flex:none}.sa-views button{border-color:transparent;background:#f4f7fb;font-weight:650;padding:7px 10px;height:36px}
.sa-views button.is-active{background:#e7f4f2;border-color:#9cd2cb;color:#098276}
.sa-summary{display:flex;align-items:baseline;gap:0;flex:1;min-width:0;border:0;background:transparent;padding:0;margin:0}
.sa-summary>div{display:flex;align-items:baseline;gap:7px;padding:0 12px;border-left:1px solid #e2e9f1;white-space:nowrap;min-width:0;flex:none}
.sa-summary>div:first-child{border-left:0;padding-left:0;flex:0 1 auto}.sa-summary>div>span{color:#71829a;font-size:12px;white-space:nowrap}
.sa-summary strong{color:#203c5c;font-size:18px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.35}
.sa-summary>div:first-child strong{max-width:170px;min-width:28px;overflow:hidden;text-overflow:ellipsis}
.sa-summary small{font-size:12px;font-weight:400;color:#73869e;margin-left:3px}
.sa-breakdown{position:relative;font-size:12px;padding-left:12px;border-left:1px solid #e2e9f1;flex:none;margin-left:auto}
.sa-breakdown summary{cursor:pointer;white-space:nowrap;color:#60819d}
.sa-breakdown>div{position:absolute;z-index:30;right:0;top:25px;min-width:280px;max-width:calc(100vw - 50px);padding:12px;line-height:2;background:#fff;border:1px solid #d8e5ef;border-radius:8px;box-shadow:0 8px 20px #123b5220}
.sa-filters{margin:0;padding:0;min-width:0}.sa-query-row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;min-width:0}
.sa-query-row>label{position:relative;min-width:0;flex:1 1 140px}.sa-query-row>#saCustomerField{min-width:132px;flex:1.2 1 190px}.sa-query-row>#saBrandField{min-width:104px;flex:.8 1 130px}.sa-query-row>#saKeywordField{min-width:130px;flex:1.1 1 170px}
.sa-query-row label>span:not(.sa-date-divider){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#saFilters input,#saFilters select,#saActions>button,.sa-more>summary{height:36px}
.sa-period-fields{display:flex;align-items:center;gap:8px;flex:none;min-width:0}.sa-period-fields label{position:relative;display:block;min-width:0}.sa-period-fields .sa-period{width:76px;flex:none}.sa-period-fields #saMonthWrap{width:140px}.sa-period-fields #saYearWrap{width:100px}
.sa-date-range{display:flex;gap:5px;align-items:center}.sa-date-range label{width:128px;min-width:0}.sa-date-divider{font-size:12px;color:#8a9ab0;flex:none}
.sa-query-row>#saBasisField{display:flex;align-items:center;gap:5px;flex:0 0 135px;min-width:0}.sa-basis select{flex:1;min-width:0}.sa-info{display:inline-flex;align-items:center;justify-content:center;width:15px;height:15px;border:1px solid #93a5bb;border-radius:50%;font:11px Georgia,serif;color:#7890ac;cursor:help;flex:none}
.sa-query-row>#saSortField{flex:0 0 110px;min-width:0}.sa-actions{display:flex;gap:8px;flex:none;align-items:center}
.sa-picker{position:relative}.sa-picker-options{position:absolute;z-index:55;top:calc(100% + 4px);left:0;width:max(100%,280px);max-width:min(450px,calc(100vw - 60px));max-height:310px;overflow-y:auto;border:1px solid #cddded;border-radius:9px;background:#fff;box-shadow:0 8px 24px #142b4c26;padding:5px}
.sa-picker-options>button{display:block;width:100%;text-align:left;white-space:normal;word-break:break-word;border:0;border-radius:5px}.sa-option-note{display:block;padding:12px;color:#6d8199}.sa-option-footer{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:7px 4px;color:#6d8199;border-top:1px solid #e7edf4}.sa-option-footer button{padding:3px 6px;min-height:29px}
.sa-more{position:relative;flex:none}.sa-more>summary{cursor:pointer;padding:8px 9px;border:1px solid #dae3ef;border-radius:8px;color:#4d6a8b;white-space:nowrap;box-sizing:border-box;list-style:none}.sa-more>summary::after{content:'⌄';font-size:12px;margin-left:5px}.sa-more[open]>summary{border-color:#91b9dc;background:#f1f7ff}
#saMoreContent{position:fixed;z-index:50;width:380px;max-width:calc(100vw - 24px);overflow:auto;background:#fff;border:1px solid #dce6f0;border-radius:10px;padding:12px;box-shadow:0 8px 26px #1c375a24;box-sizing:border-box}
.sa-more-responsive,.sa-more-thresholds{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.sa-more-responsive:empty{display:none}.sa-more-responsive:not(:empty){padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid #edf1f7}.sa-more label{display:grid;gap:5px;font-size:12px;color:#6d8199;min-width:0;position:relative}.sa-more label>span{position:static!important;clip-path:none!important;white-space:normal!important;height:auto!important;width:auto!important;overflow:visible!important}.sa-more #saPeriodFields{grid-column:1/-1;align-items:flex-end;flex-wrap:wrap}.sa-more #saPeriodFields label{flex:1}.sa-more #saPeriodFields .sa-period{flex:0 0 76px}.sa-more .sa-date-range{flex:1 1 100%;width:100%}.sa-more .sa-date-range label{width:auto;flex:1}.sa-more #saBasisField{grid-template-columns:minmax(0,1fr) 15px;align-items:center}.sa-more #saBasisField>span{grid-column:1/-1}.sa-more .sa-picker-options{position:static;width:100%;max-width:100%;max-height:210px;grid-column:1/-1;box-sizing:border-box}.sa-more-actions{display:flex;gap:8px;justify-content:flex-end}.sa-more-actions:not(:empty){margin-top:12px;padding-top:12px;border-top:1px solid #edf1f7}
.sa-status-row{display:flex;align-items:center;gap:12px;min-width:0;padding:7px 2px;color:#72859e;font-size:12px;line-height:1.5;white-space:nowrap}
.sa-status-row>span:first-child{color:#627892;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.sa-status-row>span:last-child{margin-left:auto;max-width:60%;overflow:hidden;text-overflow:ellipsis;flex:none}
.sales-analysis .is-error{color:#b53b3b}.sales-analysis .is-negative{color:#bf4444}
.sa-compact .sa-summary>div{gap:5px;padding:0 9px}.sa-compact .sa-summary>div:first-child{padding-left:0}.sa-compact .sa-summary strong{font-size:17px}.sa-compact .sa-summary>div:first-child strong{max-width:125px}.sa-compact .sa-breakdown{padding-left:9px}
.sa-narrow .sa-toolbar-head{flex-wrap:wrap;gap:9px}.sa-narrow .sa-summary{flex:1 1 100%}.sa-narrow .sa-query-row>#saCustomerField{min-width:130px;flex:1}.sa-narrow .sa-summary>div{flex:1;justify-content:center}.sa-narrow .sa-summary>div:first-child{justify-content:flex-start}
.sa-mobile .sa-toolbar{padding:10px}.sa-mobile .sa-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 0}.sa-mobile .sa-summary>div{justify-content:flex-start;flex-wrap:wrap;padding:0 8px;gap:4px}.sa-mobile .sa-summary>div:nth-child(odd){padding-left:0;border-left:0}.sa-mobile .sa-summary strong{font-size:15px}.sa-mobile .sa-summary>div:first-child strong{max-width:150px}.sa-mobile .sa-breakdown{grid-column:1/-1;justify-self:end;border-left:0;margin:0;padding:0}.sa-mobile .sa-status-row>span:last-child{max-width:45%}
.sa-table-card,.sa-months-panel{background:white;border:1px solid #dbe5ef;border-radius:12px;min-width:0;overflow:hidden}.sa-table-title,.sa-section-title{padding:11px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-bottom:1px solid #e7edf4}.sa-table-title nav{display:flex;align-items:center;gap:7px;flex-wrap:wrap;min-width:0}.sa-table-title nav strong{overflow-wrap:anywhere}.sa-table-title nav button{padding:3px 7px;min-height:28px;border:0;color:#2a6db8}.sa-table-title>button{color:#a36916;background:#fff8e9;border-color:#f1ddac}.sa-sort-note{color:#71869c;font-size:12px;padding:8px 14px;line-height:1.6}.sa-table-wrap{overflow:auto;min-width:0;max-width:100%;transition:opacity .1s}.sa-table-wrap.is-loading{opacity:.5;pointer-events:none}.sa-table{width:100%;min-width:1040px;border-collapse:collapse;text-align:left;font-size:13px;table-layout:auto}.sa-table th{color:#60758f;font-weight:600;background:#f5f8fc;white-space:nowrap;padding:11px 12px;border-bottom:1px solid #e1e9f1}.sa-table td{padding:12px;border-bottom:1px solid #edf1f6;vertical-align:middle;font-variant-numeric:tabular-nums;white-space:nowrap}.sa-table tbody tr:hover{background:#f7fafc}.sa-table tr:last-child td{border-bottom:0}.sa-table td.sa-name{white-space:normal;min-width:150px;max-width:330px;overflow-wrap:anywhere;line-height:1.6}.sa-table small{display:block;color:#7c8da4;font-size:12px;font-weight:400;white-space:normal}.sa-table td.sa-reason{white-space:normal;min-width:160px;line-height:1.6}.sa-table .sa-row-actions{white-space:nowrap}.sa-row-actions button{min-height:28px;font-size:12px;padding:4px 7px;margin-right:4px;color:#2b6b9e}.sa-empty{text-align:center;padding:40px 16px;color:#8291a6;line-height:1.8}.sa-pager{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:10px 14px;border-top:1px solid #e6edf4;color:#71839c;font-size:12px}.sa-pager>div{display:flex;align-items:center;gap:7px}.sa-pager select{width:auto}.sa-pager button{min-height:31px;padding:5px 9px}.sa-months-panel{margin-bottom:12px}.sa-section-title>span{font-size:12px;color:#778ca4}.sa-months{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:0}.sa-months button{border:0;border-right:1px solid #edf2f7;border-bottom:1px solid #edf2f7;border-radius:0;text-align:left;display:grid;gap:5px;padding:10px 13px;white-space:normal;min-width:0}.sa-months button span{font-size:12px;color:#70849a}.sa-months button b{font-size:15px;overflow-wrap:anywhere}.sa-months button small{font-size:12px;color:#8192a7;overflow-wrap:anywhere}.sa-dialog{width:min(1100px,calc(100vw - 40px));max-width:calc(100vw - 40px);max-height:85dvh;border:1px solid #cfddea;border-radius:14px;padding:0;color:#2f4561;box-shadow:0 20px 80px #10294435}.sa-dialog::backdrop{background:#1a304954}.sa-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;padding:16px;border-bottom:1px solid #e3ebf2}.sa-dialog h2{font-size:19px;margin:0}.sa-dialog header p{font-size:12px;color:#7a8da4;margin:7px 0 0}.sa-dialog-body{max-height:calc(85dvh - 145px);overflow:auto}.sa-dialog .sa-table{min-width:850px}.sa-batch-form{padding:16px}.sa-batch-heading{display:flex;gap:15px;flex-wrap:wrap;margin-bottom:12px;color:#6d819c;font-size:13px}.sa-batch-row{display:grid;grid-template-columns:minmax(180px,1fr) 140px auto;gap:8px;margin:8px 0;align-items:end}.sa-batch-row label,.sa-batch-reason,.sa-batch-unit{display:grid;gap:5px;font-size:12px;color:#667e99}.sa-batch-reason{margin-top:14px}.sa-batch-unit{max-width:300px;margin:12px 0}.sa-batch-footer{display:flex;justify-content:flex-end;gap:8px;padding-top:14px}.sa-batch-notice{padding:9px 12px;background:#f4f8fd;line-height:1.7;font-size:12px;color:#68819b}.sa-batch-status{color:#b54343;line-height:1.7;margin-top:10px;font-size:13px}

@media(max-width:1100px){.sa-months{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:720px){.sales-analysis{margin:10px 8px 20px}.sa-months{grid-template-columns:repeat(2,minmax(0,1fr))}.sa-table-title,.sa-pager{padding:10px}.sa-pager>div{width:100%;justify-content:flex-end}.sa-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:92dvh;border-radius:10px}.sa-dialog-body{max-height:calc(92dvh - 150px)}.sa-batch-row{grid-template-columns:1fr 1fr}.sa-batch-row>label:first-child{grid-column:1/-1}.sa-picker-options{width:100%;max-width:100%}}


.archive-merge-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.archive-merge-panel {
  display: flex;
  width: min(1120px, calc(100vw - 40px));
  max-height: min(90vh, 940px);
  flex-direction: column;
  overflow: hidden;
}

.archive-merge-head > div {
  display: grid;
  justify-content: start;
  gap: 3px;
  text-align: left;
}

.archive-merge-head strong {
  color: #14284a;
  font-size: 19px;
}

.archive-merge-head small {
  color: #738098;
  font-size: 12px;
  font-weight: 500;
}

.archive-merge-tabs {
  display: flex;
  gap: 6px;
  padding: 9px 18px 0;
  border-bottom: 1px solid #e2e8f1;
  background: #fff;
}

.archive-merge-tabs button {
  padding: 10px 16px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #65738b;
  background: transparent;
  font-weight: 800;
}

.archive-merge-tabs button.active {
  border-bottom-color: #2866dc;
  color: #1f5fd7;
}

.archive-merge-pane {
  min-height: 0;
  padding: 16px 18px 20px;
  overflow: auto;
  background: #f6f8fc;
}

.archive-merge-direction-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  padding: 10px 12px;
  border: 1px solid #f0d9a9;
  border-radius: 9px;
  color: #7c540a;
  background: #fff9e9;
  font-size: 12px;
}

.archive-merge-direction-note strong {
  flex: 0 0 auto;
}

.archive-merge-picker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.archive-merge-picker {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce4f0;
  border-radius: 12px;
  background: #fff;
}

.archive-merge-picker.is-source {
  border-top: 3px solid #d57b42;
}

.archive-merge-picker.is-target {
  border-top: 3px solid #2d8c61;
}

.archive-merge-picker > header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.archive-merge-picker > header > span {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #365fba;
  font-weight: 900;
}

.archive-merge-picker > header > div {
  display: grid;
  gap: 2px;
}

.archive-merge-picker > header small {
  color: #7c899e;
}

.archive-merge-picker input[type="search"] {
  width: 100%;
  height: 39px;
  border: 1px solid #ccd7e6;
  border-radius: 8px;
  padding: 0 11px;
  background: #fbfcfe;
}

.archive-merge-arrow {
  display: grid;
  place-items: center;
  color: #5072aa;
  font-size: 28px;
  font-weight: 900;
}

.archive-merge-selection {
  min-height: 70px;
  padding: 11px 12px;
  border: 1px solid #a8bde4;
  border-radius: 9px;
  color: #1b355f;
  background: #eff5ff;
}

.archive-merge-selection.is-empty {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: #8995a8;
  background: #fafbfd;
}

.archive-merge-selection strong,
.archive-merge-selection span,
.archive-merge-selection small {
  display: block;
}

.archive-merge-selection strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-merge-selection span {
  margin-top: 5px;
  color: #526681;
  font-size: 12px;
}

.archive-merge-selection small {
  margin-top: 3px;
  color: #7c899d;
}

.archive-merge-candidates {
  display: grid;
  gap: 6px;
  max-height: 190px;
  overflow: auto;
}

.archive-merge-candidate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #e0e6ef;
  border-radius: 8px;
  color: #23364f;
  background: #fff;
  text-align: left;
}

.archive-merge-candidate:hover,
.archive-merge-candidate.is-selected {
  border-color: #7fa4ee;
  background: #f1f6ff;
}

.archive-merge-candidate > span {
  min-width: 0;
}

.archive-merge-candidate strong,
.archive-merge-candidate small {
  display: block;
}

.archive-merge-candidate strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-merge-candidate small {
  margin-top: 2px;
  color: #7b8799;
  font-weight: 500;
}

.archive-merge-candidate b,
.archive-merge-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #15784a;
  background: #e7f7ef;
  font-size: 11px;
  white-space: nowrap;
}

.archive-merge-candidate b.is-disabled,
.archive-merge-status.is-disabled {
  color: #6c7789;
  background: #edf0f4;
}

.archive-merge-preflight-bar,
.archive-merge-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
}

.archive-merge-preflight-bar > div,
.archive-merge-history-head > div {
  display: grid;
  gap: 3px;
}

.archive-merge-preflight-bar span,
.archive-merge-history-head span {
  color: #778499;
  font-size: 12px;
}

.archive-merge-preview,
.archive-merge-history {
  margin-top: 12px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
}

.archive-merge-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 20px;
  color: #8995a8;
  text-align: center;
}

.archive-merge-preview-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.archive-merge-preview-summary > div {
  display: grid;
  gap: 2px;
  min-height: 66px;
  align-content: center;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f3f6fb;
}

.archive-merge-preview-summary span {
  color: #6d7a90;
  font-size: 11px;
}

.archive-merge-preview-summary strong {
  color: #183a72;
  font-size: 20px;
}

.archive-merge-impact-list,
.archive-merge-warning-list,
.archive-merge-conflicts {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
}

.archive-merge-impact,
.archive-merge-warning,
.archive-merge-conflict {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #e4e9f1;
  border-radius: 8px;
}

.archive-merge-impact small,
.archive-merge-conflict small {
  display: block;
  margin-top: 2px;
  color: #7b8799;
}

.archive-merge-impact b {
  color: #2458ac;
}

.archive-merge-warning {
  display: block;
  border-color: #f2d3a0;
  color: #8d5b08;
  background: #fff9e9;
}

.archive-merge-warning.is-blocking {
  border-color: #efb6af;
  color: #a6382f;
  background: #fff2f1;
}

.archive-merge-conflicts {
  border-top: 1px solid #edf0f5;
  padding-top: 12px;
}

.archive-merge-conflicts > strong {
  color: #8d5b08;
}

.archive-merge-conflict select {
  min-width: 220px;
  height: 36px;
  border: 1px solid #d5a24f;
  border-radius: 7px;
  background: #fffaf0;
}

.archive-merge-confirm {
  display: grid;
  gap: 11px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #efc5bf;
  border-radius: 10px;
  background: #fff8f7;
}

.archive-merge-confirm-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 12px;
}

.archive-merge-confirm-fields label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: #526078;
  font-size: 12px;
  font-weight: 800;
}

.archive-merge-confirm textarea,
.archive-merge-confirm input[type="text"],
.archive-merge-confirm input:not([type]) {
  width: 100%;
  border: 1px solid #ccd5e2;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  resize: vertical;
}

.archive-merge-ack {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #6d3b35;
  font-size: 12px;
  line-height: 1.5;
}

.archive-merge-ack input {
  margin-top: 2px;
}

.archive-merge-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-top: 1px solid #e0e6ef;
  background: #fff;
}

.archive-merge-actions > span {
  min-height: 18px;
  color: #6e7a8d;
  font-size: 12px;
}

.archive-merge-actions > span.is-error {
  color: #b33831;
}

.archive-merge-actions > div {
  display: flex;
  gap: 8px;
}

.archive-merge-history {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.archive-merge-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e1e7ef;
  border-radius: 9px;
}

.archive-merge-history-item > div {
  min-width: 0;
}

.archive-merge-history-item strong,
.archive-merge-history-item span,
.archive-merge-history-item small {
  display: block;
}

.archive-merge-history-item span {
  margin-top: 4px;
  color: #415873;
}

.archive-merge-history-item small {
  margin-top: 3px;
  color: #7f8b9c;
}

.archive-merge-history-item time {
  color: #718096;
  font-size: 12px;
  white-space: nowrap;
}

.archive-merge-history-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: #718096;
  font-size: 12px;
}

.archive-merge-history-pager > div {
  display: flex;
  gap: 8px;
}

.archive-merge-panel[aria-busy="true"] .archive-merge-candidate {
  cursor: wait;
}

@media (max-width: 820px) {
  .archive-merge-panel {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .archive-merge-picker-grid {
    grid-template-columns: 1fr;
  }

  .archive-merge-arrow {
    height: 24px;
    transform: rotate(90deg);
  }

  .archive-merge-preview-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-merge-confirm-fields {
    grid-template-columns: 1fr;
  }

  .archive-merge-conflict {
    grid-template-columns: 1fr;
  }

  .archive-merge-conflict select {
    width: 100%;
    min-width: 0;
  }

  .archive-merge-preflight-bar,
  .archive-merge-history-head,
  .archive-merge-actions,
  .archive-merge-history-pager {
    align-items: stretch;
    flex-direction: column;
  }

  .archive-merge-actions > div,
  .archive-merge-actions button,
  .archive-merge-history-pager > div,
  .archive-merge-history-pager button {
    width: 100%;
  }
}


/* Supplier payment management workspace. Kept in a standalone sheet so the
 * finance pages can be rolled back without touching the customer funds UI. */
.supplier-payments-view {
  --sp-blue: #315fd8;
  --sp-blue-soft: #eef4ff;
  --sp-text: #24324a;
  --sp-muted: #70809d;
  --sp-border: #d8e2f1;
  --sp-panel: #fff;
  min-height: calc(100vh - 28px);
  padding-bottom: 28px;
}

.supplier-payments-topbar {
  align-items: flex-start;
  gap: 18px;
}

.supplier-payments-topbar h1 { margin-bottom: 6px; }
.supplier-payments-topbar p { margin: 0; color: var(--sp-muted); }

.supplier-payments-top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.supplier-payments-cutoff {
  color: #61728f;
  font-size: 12px;
  background: #f5f8fd;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  padding: 8px 12px;
}

.supplier-payments-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.supplier-payment-metric {
  min-height: 108px;
  text-align: left;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-panel);
  padding: 15px 17px;
  color: var(--sp-text);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.supplier-payment-metric:hover,
.supplier-payment-metric.is-active {
  border-color: #9eb8f5;
  box-shadow: 0 8px 22px rgba(49, 95, 216, .11);
  transform: translateY(-1px);
}

.supplier-payment-metric small,
.supplier-payment-metric span { display: block; color: var(--sp-muted); }
.supplier-payment-metric small { font-size: 13px; font-weight: 700; }
.supplier-payment-metric strong { display: block; margin: 9px 0 5px; font-size: 23px; line-height: 1; letter-spacing: .01em; }
.supplier-payment-metric span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.supplier-payment-metric.metric-pending strong { color: #9c5a05; }
.supplier-payment-metric.metric-paid strong { color: #16835d; }
.supplier-payment-metric.metric-confirm strong { color: #c27318; }
.supplier-payment-metric.metric-review strong { color: var(--sp-blue); }
.supplier-payment-metric.metric-blocked strong { color: #bd4b4b; }

.supplier-payments-filter-panel,
.supplier-payments-list-panel {
  border: 1px solid var(--sp-border);
  background: var(--sp-panel);
  border-radius: 14px;
  padding: 14px 16px;
}

.supplier-payments-filter-panel { margin-bottom: 14px; }
.supplier-payments-filter-grid { display: grid; grid-template-columns: 130px 20px 130px 1.15fr 1fr 1fr 1fr 1fr minmax(210px, 1.5fr) auto auto; gap: 9px; align-items: end; }
.supplier-payments-filter-grid label { display: flex; flex-direction: column; gap: 5px; color: #687997; font-size: 12px; font-weight: 700; min-width: 0; }
.supplier-payments-filter-grid input,
.supplier-payments-filter-grid select { width: 100%; min-width: 0; height: 38px; border: 1px solid var(--sp-border); border-radius: 9px; background: #fbfcff; padding: 0 10px; color: var(--sp-text); font: inherit; }
.supplier-payments-filter-grid input:focus,
.supplier-payments-filter-grid select:focus { outline: 2px solid rgba(49,95,216,.18); border-color: #8eabed; }
.supplier-payments-filter-separator { color: #8492a9; text-align: center; padding-bottom: 10px; font-size: 12px; }
.supplier-payments-filter-hint { margin-top: 10px; color: #7b8aa5; font-size: 12px; }
.supplier-payments-filter-hint.is-warning { color: #a96719; }
.supplier-payment-history-assignment { margin-bottom: 14px; border-color: #c9d9f6; background: #f7faff; }
.supplier-payment-history-assignment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.supplier-payment-history-assignment-head strong { color: #24477f; font-size: 15px; }
.supplier-payment-history-assignment-head p { margin: 5px 0 0; color: #71819b; font-size: 12px; line-height: 1.6; }
.supplier-payment-history-assignment-summary { margin-top: 12px; padding: 10px 12px; border: 1px solid #e0e8f5; border-radius: 9px; background: #fff; color: #435572; font-size: 13px; line-height: 1.7; }
.supplier-payment-history-assignment-summary strong { color: #1d4ed8; }
.supplier-payment-history-assignment-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.supplier-payment-history-assignment-actions label { display: flex; flex-direction: column; gap: 5px; min-width: 250px; color: #687997; font-size: 12px; font-weight: 700; }
.supplier-payment-history-assignment-actions select { height: 38px; border: 1px solid var(--sp-border); border-radius: 9px; background: #fff; padding: 0 10px; color: var(--sp-text); font: inherit; }
.supplier-payment-history-assignment-warnings { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: #fff7e8; color: #98631a; font-size: 12px; line-height: 1.6; }
.supplier-payment-role-defaults { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e3eaf4; }
.supplier-payment-role-defaults p { margin: 5px 0 12px; color: #71819b; font-size: 12px; line-height: 1.6; }
.supplier-payment-role-defaults-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.supplier-payment-role-defaults-grid label { display: flex; flex-direction: column; gap: 5px; color: #687997; font-size: 12px; font-weight: 700; }
.supplier-payment-role-defaults-grid select { height: 36px; border: 1px solid var(--sp-border); border-radius: 8px; background: #fff; padding: 0 9px; color: var(--sp-text); font: inherit; }
.supplier-payment-role-defaults-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: #71819b; font-size: 12px; }
@media (max-width: 900px) { .supplier-payment-role-defaults-grid { grid-template-columns: 1fr; } .supplier-payment-role-defaults-actions { align-items: flex-start; flex-direction: column; } }

.supplier-payments-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.supplier-payments-list-head > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.supplier-payments-list-head strong { color: var(--sp-text); font-size: 16px; }
.supplier-payments-list-head span { color: var(--sp-muted); font-size: 12px; }
.supplier-payments-list-tools { display: flex; align-items: center; gap: 12px; }
.supplier-payments-list-tools label { display: inline-flex; align-items: center; gap: 6px; color: var(--sp-muted); font-size: 12px; white-space: nowrap; }
.supplier-payments-list-tools select { border: 1px solid var(--sp-border); border-radius: 8px; background: #fbfcff; color: var(--sp-text); padding: 7px 8px; }
#supplierPaymentsLoadStatus { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.supplier-payments-table-wrap { overflow-x: auto; border: 1px solid #e1e8f3; border-radius: 10px; }
.supplier-payments-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.supplier-payments-table th,
.supplier-payments-table td { padding: 12px 11px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: middle; color: var(--sp-text); font-size: 13px; }
.supplier-payments-table th { background: #f5f8fd; color: #657491; font-size: 12px; font-weight: 800; white-space: nowrap; }
.supplier-payments-table tbody tr:last-child > td { border-bottom: 0; }
.supplier-payments-table tbody tr.supplier-payment-row:hover > td { background: #fafcff; }
.supplier-payments-table .sp-expand-col { width: 54px; text-align: center; }
.supplier-payments-table th:nth-child(2) { width: 18%; }
.supplier-payments-table th:nth-child(3) { width: 13%; }
.supplier-payments-table th:nth-child(4) { width: 8%; }
.supplier-payments-table th:nth-child(5) { width: 13%; }
.supplier-payments-table th:nth-child(6) { width: 15%; }
.supplier-payments-table th:nth-child(7) { width: 12%; }
.supplier-payments-table th:nth-child(8) { width: 13%; }
.supplier-payments-table th:nth-child(9) { width: 15%; }
.supplier-payment-supplier { display: block; min-width: 0; }
.supplier-payment-supplier strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-payment-amount { font-weight: 800; color: #1e407b !important; white-space: nowrap; }
.supplier-payment-expand { width: 28px; height: 28px; border: 1px solid #cfdbef; border-radius: 7px; background: #fff; color: var(--sp-blue); cursor: pointer; font-size: 14px; line-height: 1; }
.supplier-payment-expand[aria-expanded="true"] { background: var(--sp-blue-soft); border-color: #9eb8f5; }
.supplier-payment-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.supplier-payment-status.status-data-blocked,
.supplier-payment-status.status-rejected { color: #a53f3f; background: #fff0f0; }
.supplier-payment-status.status-operator-confirm { color: #9c5a05; background: #fff4dc; }
.supplier-payment-status.status-admin-review { color: #315aa9; background: #edf3ff; }
.supplier-payment-status.status-pending-pay { color: #6551a3; background: #f1edff; }
.supplier-payment-status.status-completed { color: #18744f; background: #e7f8ef; }
.supplier-payment-status.status-unknown { color: #66758e; background: #f1f4f8; }
.supplier-payment-handler { color: #475876; }
.supplier-payment-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.supplier-payment-actions button { font-size: 12px; padding: 6px 9px; min-height: 30px; }
.supplier-payment-actions button[data-sp-action="reject"],
.supplier-payment-actions button[data-sp-action="admin-reject"] { color: #b24545; border-color: #efc7c7; background: #fff8f8; }
.supplier-payment-detail-row > td { padding: 0; background: #fbfcff; }
.supplier-payment-inline-detail { padding: 13px 16px 15px 54px; border-top: 1px dashed #dce5f2; }
.supplier-payment-inline-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.supplier-payment-inline-detail-head strong { color: #385276; font-size: 12px; }
.supplier-payment-inline-detail-head span { color: #7988a0; font-size: 12px; }
.supplier-payment-items-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.supplier-payment-items-table th,
.supplier-payment-items-table td { border: 1px solid #e3eaf4; padding: 8px 9px; font-size: 12px; }
.supplier-payment-items-table th { background: #f3f6fb; color: #687997; font-weight: 700; }
.supplier-payment-items-table td { background: #fff; }
.supplier-payment-source-note { display: block; margin-top: 3px; color: #7187a8; font-size: 10px; }
.supplier-payment-items-table .supplier-payment-issue { color: #a15b00; max-width: 220px; white-space: normal; }
.supplier-payment-history-amount { display: block; margin-top: 4px; color: #6b7890; font-size: 12px; }
.supplier-payment-items-scroll { overflow-x: auto; }
.supplier-payment-item-confirmed { color: #197650; font-weight: 700; }
.supplier-payment-item-pending { color: #aa6a1e; font-weight: 700; }
.supplier-payment-item-rejected { color: #b24545; font-weight: 700; }
.supplier-payment-block-message { margin-top: 9px; padding: 8px 10px; border-radius: 8px; color: #9a5d12; background: #fff7e9; font-size: 12px; }

.supplier-payments-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; color: var(--sp-muted); font-size: 12px; }
.supplier-payments-pager button { min-width: 34px; }
.supplier-payments-pager strong { color: var(--sp-text); }
.supplier-payments-total-amount { color: #1e407b; font-size: 14px; margin-right: 8px; }

.supplier-payments-drawer { position: fixed; inset: 0; z-index: 1600; visibility: hidden; pointer-events: none; }
.supplier-payments-drawer.is-open { visibility: visible; pointer-events: auto; }
.supplier-payments-drawer-mask { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(15, 32, 65, .28); opacity: 0; transition: opacity .18s ease; cursor: default; }
.supplier-payments-drawer > section { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 92vw); display: flex; flex-direction: column; background: #fff; box-shadow: -15px 0 44px rgba(35, 59, 103, .2); transform: translateX(100%); transition: transform .2s ease; }
.supplier-payments-drawer.is-open .supplier-payments-drawer-mask { opacity: 1; }
.supplier-payments-drawer.is-open > section { transform: translateX(0); }
.supplier-payments-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 15px; border-bottom: 1px solid #e5ebf4; }
.supplier-payments-drawer-head small { display: block; color: #7c8ba3; font-size: 12px; }
.supplier-payments-drawer-head h2 { margin: 5px 0 0; color: #253b61; font-size: 20px; }
.supplier-payments-drawer-body { flex: 1; overflow: auto; padding: 18px 22px; }
.supplier-payments-drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 13px 22px; border-top: 1px solid #e5ebf4; background: #fbfcff; }
.supplier-payment-detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.supplier-payment-detail-summary div { padding: 10px 11px; border: 1px solid #e3eaf4; border-radius: 9px; background: #f8faff; }
.supplier-payment-detail-summary small { display: block; color: #7c8ba3; font-size: 11px; }
.supplier-payment-detail-summary strong { display: block; margin-top: 5px; color: #293f63; font-size: 15px; }
.supplier-payment-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.supplier-payment-flow-step { position: relative; padding: 10px 11px; border: 1px solid #dfe7f3; border-radius: 9px; background: #fff; }
.supplier-payment-flow-step::after { content: ""; position: absolute; top: 20px; right: -8px; width: 8px; border-top: 1px dashed #b9c8df; }
.supplier-payment-flow-step:last-child::after { display: none; }
.supplier-payment-flow-step b { display: block; color: #73839d; font-size: 11px; }
.supplier-payment-flow-step strong { display: block; margin-top: 4px; color: #2c4369; font-size: 13px; }
.supplier-payment-flow-step span { display: block; margin-top: 4px; color: #7c8ba3; font-size: 11px; line-height: 1.4; }
.supplier-payment-flow-step.is-done { border-color: #b9e6d0; background: #f2fbf6; }
.supplier-payment-flow-step.is-done strong { color: #197650; }
.supplier-payment-flow-step.is-current { border-color: #a8bdf2; background: #f3f6ff; }
.supplier-payment-flow-step.is-current strong { color: var(--sp-blue); }
.supplier-payment-history { margin-top: 17px; border-top: 1px solid #e6edf6; padding-top: 13px; }
.supplier-payment-history h3 { margin: 0 0 9px; color: #3d5376; font-size: 13px; }
.supplier-payment-history-item { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e5ebf4; font-size: 12px; }
.supplier-payment-history-item time { color: #7d8ca4; }
.supplier-payment-history-item strong { color: #405776; }
.supplier-payment-history-item p { margin: 3px 0 0; color: #7b8aa4; line-height: 1.5; }
.supplier-payment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 14px; border: 1px solid #dbe5f3; border-radius: 10px; background: #f7faff; }
.supplier-payment-form label { display: flex; flex-direction: column; gap: 5px; color: #657592; font-size: 12px; font-weight: 700; }
.supplier-payment-form label.is-wide { grid-column: 1 / -1; }
.supplier-payment-form input,
.supplier-payment-form select,
.supplier-payment-form textarea { width: 100%; border: 1px solid #cfdced; border-radius: 8px; background: #fff; padding: 9px 10px; color: var(--sp-text); font: inherit; box-sizing: border-box; }
.supplier-payment-form textarea { min-height: 70px; resize: vertical; }
.supplier-payment-form input:focus,
.supplier-payment-form select:focus,
.supplier-payment-form textarea:focus { outline: 2px solid rgba(49,95,216,.16); border-color: #8eabed; }
.supplier-payment-rejection { padding: 12px 13px; border-radius: 9px; background: #fff5f5; border: 1px solid #f0d1d1; color: #a34848; font-size: 12px; line-height: 1.55; }
.supplier-payment-repair { margin-top: 16px; padding: 13px 14px; border: 1px solid #f0d5a7; border-radius: 10px; background: #fffaf0; }
.supplier-payment-repair h3 { margin: 0 0 6px; color: #8b5b18; font-size: 13px; }
.supplier-payment-repair p { margin: 0 0 11px; color: #8a6b3d; font-size: 12px; line-height: 1.55; }
.supplier-payment-repair form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.supplier-payment-repair label { display: flex; flex-direction: column; gap: 5px; color: #6f5d3c; font-size: 12px; }
.supplier-payment-repair label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-payment-repair select { min-width: 0; border: 1px solid #e4c98f; border-radius: 8px; background: #fff; padding: 8px 9px; color: var(--sp-text); font: inherit; }
.supplier-payment-repair button { grid-column: 1 / -1; justify-self: start; }
.supplier-payment-empty-detail { padding: 36px 0; text-align: center; color: #8493aa; }
.supplier-payment-inline-loading,
.supplier-payment-inline-error { display: flex; align-items: center; gap: 9px; min-height: 54px; color: #71819a; font-size: 12px; }
.supplier-payment-inline-error { color: #a34848; }
.supplier-payment-inline-error button { margin-left: 6px; }
.supplier-payment-spinner { width: 14px; height: 14px; border: 2px solid #d8e3f4; border-top-color: var(--sp-blue); border-radius: 50%; animation: supplier-payment-spin .75s linear infinite; }
@keyframes supplier-payment-spin { to { transform: rotate(360deg); } }

@media (max-width: 1320px) {
  .supplier-payments-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .supplier-payments-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .supplier-payments-filter-separator { display: none; }
  .supplier-payments-filter-grid > label:nth-child(1),
  .supplier-payments-filter-grid > label:nth-child(3) { grid-column: span 1; }
  .supplier-payments-filter-grid > input { grid-column: span 2; }
}

@media (max-width: 820px) {
  .supplier-payments-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-payments-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-payments-filter-grid > input,
  .supplier-payments-filter-grid > button { grid-column: span 2; }
  .supplier-payments-list-head { align-items: flex-start; flex-direction: column; }
  .supplier-payments-list-tools { width: 100%; justify-content: space-between; }
  .supplier-payment-detail-summary { grid-template-columns: 1fr 1fr; }
  .supplier-payment-flow { grid-template-columns: 1fr; }
  .supplier-payment-flow-step::after { display: none; }
}

@media (max-width: 540px) {
  .supplier-payments-metrics { grid-template-columns: 1fr; }
  .supplier-payments-filter-grid { grid-template-columns: 1fr; }
  .supplier-payments-filter-grid > input,
  .supplier-payments-filter-grid > button { grid-column: auto; }
  .supplier-payment-detail-summary { grid-template-columns: 1fr; }
  .supplier-payment-form { grid-template-columns: 1fr; }
  .supplier-payment-form label.is-wide { grid-column: auto; }
  .supplier-payment-repair form { grid-template-columns: 1fr; }
  .supplier-payment-repair button { grid-column: auto; }
}


/* Supplier business-card resource center. Keep this surface self-contained so
   opening it never changes the existing supplier/product table layout. */
#resourceCenter .resource-center-topbar { margin-bottom: 12px; }
.resource-center-tabs { display: flex; gap: 6px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f4f7fc; width: fit-content; }
.resource-center-tabs button { min-height: 36px; padding: 7px 16px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #66768f; font-size: 13px; font-weight: 700; cursor: pointer; }
.resource-center-tabs button[aria-selected="true"] { border-color: #c7d6f7; background: #fff; color: var(--blue); box-shadow: 0 2px 7px rgba(37, 99, 235, .08); }
.resource-center-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.resource-supplier-heading, .resource-customer-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 12px; }
.resource-supplier-heading > p, .resource-customer-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.resource-customer-heading h2 { margin: 0 0 3px; color: var(--ink); font-size: 17px; }
.resource-customer-admin-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.resource-customer-admin-actions button { white-space: nowrap; }
.resource-customer-list-panel { padding: 16px; }
.resource-customer-toolbar, .resource-customer-search { display: flex; align-items: center; gap: 8px; }
.resource-customer-toolbar { justify-content: space-between; }
.resource-customer-search { flex: 1 1 auto; max-width: 780px; }
.resource-customer-search input { width: min(100%, 620px); min-width: 180px; height: 36px; }
.resource-customer-search button { min-height: 36px; }
.resource-customer-view-toggle { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f6f8fc; }
.resource-customer-view-toggle button { min-height: 30px; padding: 4px 13px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.resource-customer-view-toggle button.is-active { background: #fff; color: var(--blue); box-shadow: 0 1px 4px rgba(27, 56, 108, .12); }
.resource-customer-result-row { display: flex; align-items: center; gap: 12px; min-height: 35px; color: var(--muted); font-size: 12px; }
.resource-customer-result-row > span:first-child { color: var(--text); font-weight: 700; }
.resource-customer-result-row label { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; white-space: nowrap; }
.resource-customer-result-row select { min-height: 29px; }
.resource-customer-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.resource-customer-table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; }
.resource-customer-table th { padding: 10px 12px; background: #f6f8fc; color: #5b6b83; font-size: 12px; text-align: left; }
.resource-customer-table td { padding: 11px 12px; border-top: 1px solid #edf0f5; color: var(--text); font-size: 13px; vertical-align: top; overflow-wrap: anywhere; }
.resource-customer-table th:nth-child(1) { width: 12%; }
.resource-customer-table th:nth-child(2) { width: 24%; }
.resource-customer-table th:nth-child(3) { width: 17%; }
.resource-customer-table th:nth-child(4) { width: 18%; }
.resource-customer-table th:nth-child(5) { width: 25%; }
.resource-customer-table th:nth-child(6) { width: 80px; }
.resource-customer-table td:nth-child(2) { font-weight: 700; }
.resource-customer-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.resource-customer-note details summary { color: var(--blue); cursor: pointer; }
.resource-customer-note details p { margin: 6px 0 0; white-space: pre-wrap; }
.resource-customer-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.resource-customer-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.resource-customer-card h3 { margin: 0; color: var(--ink); font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.resource-customer-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.resource-customer-card-meta span { padding: 3px 7px; border-radius: 5px; background: #f3f6fb; color: #62738f; font-size: 11px; }
.resource-customer-card-phone { color: var(--blue); font-size: 15px; font-weight: 700; user-select: text; }
.resource-customer-card .resource-customer-note { color: var(--muted); font-size: 12px; line-height: 1.5; }
.resource-customer-card > button { align-self: flex-end; margin-top: auto; }
.resource-customer-import-modal, .resource-customer-edit-modal { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 760px); overflow: auto; }
.resource-customer-import-body { display: grid; gap: 11px; padding: 18px 20px; }
.resource-customer-import-body > label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.resource-customer-import-body input[type="file"] { width: 100%; }
.resource-customer-import-body > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.resource-customer-import-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.resource-customer-import-summary span { padding: 5px 9px; border-radius: 6px; background: #f3f6fb; color: #526580; font-size: 12px; }
.resource-customer-import-errors { max-height: 170px; overflow: auto; padding: 9px; border: 1px solid #f4d7bd; border-radius: 6px; background: #fffbf6; color: #986022; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.resource-customer-edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 20px 5px; }
.resource-customer-edit-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.resource-customer-edit-form label span { color: var(--red); }
.resource-customer-edit-form input, .resource-customer-edit-form textarea { width: 100%; min-width: 0; }
.resource-customer-edit-note { grid-column: 1 / -1; }
.resource-customer-edit-status { min-height: 18px; margin: 6px 20px; color: var(--muted); font-size: 12px; }
.resource-customer-edit-status.is-error, #customerResourceLoadState.is-error, #customerResourceImportStatus.is-error { color: var(--red); }
/* Customer-directory layout is kept independent of the supplier workspace. */
#resourceCenter.view.active.is-customer-resource-active { display: flex; flex: 1 1 0; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding-bottom: 12px; }
#resourceCenter.is-customer-resource-active [hidden] { display: none !important; }
#resourceCenter.is-customer-resource-active > .resource-center-topbar,
#resourceCenter.is-customer-resource-active > .resource-center-tabs { flex: 0 0 auto; }
#resourceCenter.is-customer-resource-active #resourceCustomerPanel { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; overflow: hidden; }
#resourceCustomerPanel > .resource-customer-heading { flex: 0 0 auto; }
#resourceCenter.is-customer-resource-active .resource-customer-list-panel { display: flex; flex: 1 1 0; flex-direction: column; min-height: 0; overflow: hidden; margin-bottom: 0; padding-bottom: 0; }
#resourceCustomerPanel .resource-customer-toolbar,
#resourceCustomerPanel .resource-customer-result-row { flex: 0 0 auto; }
#resourceCenter.is-customer-resource-active .resource-customer-table-wrap,
#resourceCenter.is-customer-resource-active .resource-customer-cards { flex: 1 1 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#resourceCenter.is-customer-resource-active .resource-customer-cards { align-content: start; padding: 2px; }
#resourceCenter.is-customer-resource-active .resource-customer-table th { position: sticky; top: 0; z-index: 1; background: #f6f8fc; box-shadow: 0 1px 0 var(--line); }
#customerResourcePager.resource-customer-pager { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; min-height: 54px; margin-top: 10px; padding: 10px 0; border-top: 1px solid var(--line); background: #fff; }
.resource-customer-page-summary { flex: 0 0 auto; white-space: nowrap; }
.resource-customer-page-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
#customerResourcePager label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#customerResourcePager [data-customer-resource-jump] { width: 66px; min-width: 0; min-height: 30px; height: 30px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; font: inherit; text-align: center; }
#customerResourcePager [data-customer-resource-jump]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
#customerResourcePager [data-customer-resource-jump]:disabled { background: #f3f5f8; color: var(--muted); }
#resourceCustomerPanel .resource-customer-table-wrap:focus-visible,
#resourceCustomerPanel .resource-customer-cards:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
#resourceCenter .resource-center-topbar { align-items: center; }
.resource-center-top-actions { display: flex; align-items: center; gap: 8px; }
.resource-card-summary { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; margin-bottom: 10px; }
.resource-card-summary > span,
.resource-card-summary > button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 58px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); text-align: left; }
.resource-card-summary > button { cursor: pointer; font: inherit; }
.resource-card-summary > button:hover,
.resource-card-summary > button.is-active { border-color: #9bb8ef; background: var(--blue-soft); }
.resource-card-summary small { font-size: 12px; }
.resource-card-summary strong { color: var(--ink); font-size: 21px; line-height: 1.1; }
.resource-card-toolbar { display: grid; gap: 9px; }
.resource-card-search-row { display: grid; grid-template-columns: minmax(260px, 1fr) 130px 120px 140px auto auto; gap: 8px; align-items: center; }
.resource-card-search-row input,
.resource-card-search-row select { width: 100%; min-width: 0; height: 34px; }
.resource-card-result-row { display: flex; align-items: center; gap: 14px; min-height: 27px; color: var(--muted); font-size: 12px; }
.resource-card-result-row > span:first-child { color: var(--text); font-weight: 700; }
.resource-card-result-row label { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; white-space: nowrap; }
.resource-card-result-row select { height: 28px; }
.resource-card-result-row #resourceCardLoadState { margin-left: 0; color: var(--muted); font-weight: 500; }
.resource-card-table-wrap { overflow: auto; margin-top: 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.resource-card-table { min-width: 1050px; table-layout: fixed; }
.resource-card-table th { height: 36px; padding: 7px 10px; color: #5b6b83; background: #f6f8fc; font-size: 12px; text-align: left; white-space: nowrap; }
.resource-card-table td { height: 58px; padding: 8px 10px; border-top: 1px solid #edf0f5; vertical-align: middle; }
.resource-card-table th:nth-child(1) { width: 210px; }
.resource-card-table th:nth-child(2) { width: 260px; }
.resource-card-table th:nth-child(3) { width: 115px; }
.resource-card-table th:nth-child(4) { width: 90px; }
.resource-card-table th:nth-child(5) { width: 110px; }
.resource-card-table th:nth-child(6) { width: 110px; }
.resource-card-table th:nth-child(7) { width: 105px; }
.resource-card-table th:nth-child(8) { width: 100px; }
.resource-card-company-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.resource-card-company-main { display: grid; gap: 3px; min-width: 0; }
.resource-card-company-cell strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.resource-card-company-cell small,
.resource-card-scope-cell small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.resource-card-scope-cell { display: grid; gap: 3px; min-width: 0; }
.resource-card-scope-cell span { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.resource-card-thumb-pair { display: flex; gap: 4px; }
.resource-card-image-trigger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #f6f8fc; cursor: zoom-in; }
.resource-card-image-trigger:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.resource-card-thumb-pair button { flex: 0 0 32px; }
.resource-card-company-thumb { flex: 0 0 42px; width: 42px; height: 34px; }
.resource-card-image-trigger img { width: 100%; height: 100%; object-fit: cover; transition: opacity .16s ease; }
.resource-card-image-trigger img.is-loading { opacity: .35; }
.resource-card-image-trigger img.is-error { opacity: .25; }
.resource-card-thumb-empty { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 34px; border: 1px dashed var(--line-strong); border-radius: 4px; color: #9aa6b8; font-size: 10px; }
.resource-card-company-thumb.resource-card-thumb-empty { flex: 0 0 42px; width: 42px; }
.resource-card-status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 999px; background: #f1f4f8; color: #657286; font-size: 12px; white-space: nowrap; }
.resource-card-status.is-ready { background: var(--green-soft); color: var(--green); }
.resource-card-status.is-pending { background: var(--amber-soft); color: var(--amber); }
.resource-card-status.is-failed { background: var(--red-soft); color: var(--red); }
.resource-card-row-actions { display: flex; gap: 5px; white-space: nowrap; }
.resource-card-row-actions button { padding: 4px 8px; font-size: 12px; }
.resource-card-pager { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-height: 42px; color: var(--muted); font-size: 12px; }
.resource-card-pager button { min-width: 60px; }
.resource-card-page-numbers { display: inline-flex; gap: 4px; }
.resource-card-page-numbers button { min-width: 28px; padding: 4px 7px; }
.resource-card-page-numbers button.is-current { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

/* Desktop supplier workspace: only the table scrolls; its sibling pager ends
   at the viewport edge, including empty and short result sets. Do not change
   the customer-directory tab, mobile flow, or other admin views. */
@media (min-width: 761px) {
  #resourceCenter.view.active:not(.is-customer-resource-active) { display: flex; flex-direction: column; height: 100%; min-height: 0; overflow: hidden; padding-bottom: 0; }
  #resourceCenter:not(.is-customer-resource-active) > .resource-center-topbar,
  #resourceCenter:not(.is-customer-resource-active) > .resource-center-tabs { flex: 0 0 auto; }
  #resourceCenter:not(.is-customer-resource-active) #resourceSupplierPanel { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
  #resourceSupplierPanel > .resource-supplier-heading,
  #resourceSupplierPanel > .resource-card-summary { flex: 0 0 auto; }
  #resourceSupplierPanel .resource-card-list-panel { display: flex; flex: 1 1 0; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; margin-bottom: 0; padding: 12px 12px 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  #resourceSupplierPanel .resource-card-toolbar { flex: 0 0 auto; }
  #resourceSupplierPanel .resource-card-search-row { grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(90px, .45fr)) auto auto; }
  #resourceSupplierPanel .resource-card-table-wrap { flex: 1 1 0; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  #resourceSupplierPanel .resource-card-table th { position: sticky; top: 0; z-index: 1; box-shadow: 0 1px 0 var(--line); }
  #resourceSupplierPanel .resource-card-table-wrap:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
  #resourceCardPager.resource-card-pager { flex: 0 0 auto; flex-wrap: wrap; min-height: 48px; margin: 0; padding: 8px 0; background: #fff; }
  #resourceCardPager label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
  #resourceCardPager [data-resource-page-jump] { width: 60px; min-width: 0; height: 30px; padding: 4px 6px; text-align: center; }
}
@media (min-width: 761px) and (max-height: 640px) {
  /* Match the shell title-card selector without affecting other page titles. */
  #resourceCenter.view:not(#customer):not(#supplierPortal):not(.is-customer-resource-active) > .resource-center-topbar { min-height: 0; padding-block: 8px; margin-top: 6px; margin-bottom: 6px; }
  #resourceCenter.view:not(#customer):not(#supplierPortal):not(.is-customer-resource-active) > .resource-center-topbar h1 { margin: 0; font-size: 20px; line-height: 24px; }
  #resourceCenter.view:not(#customer):not(#supplierPortal):not(.is-customer-resource-active) > .resource-center-topbar p { margin: 3px 0 0; font-size: 11px; line-height: 16px; }
  #resourceCenter:not(.is-customer-resource-active) > .resource-center-tabs { margin-bottom: 6px; }
  #resourceCenter:not(.is-customer-resource-active) > .resource-center-tabs button { min-height: 28px; padding-block: 3px; }
  #resourceSupplierPanel > .resource-supplier-heading { margin-bottom: 6px; }
  #resourceSupplierPanel .resource-center-top-actions button { min-height: 30px; padding-block: 5px; }
  #resourceSupplierPanel > .resource-card-summary { margin-bottom: 6px; gap: 6px; }
  #resourceSupplierPanel .resource-card-summary > span,
  #resourceSupplierPanel .resource-card-summary > button { min-height: 36px; padding: 6px 10px; flex-direction: row; align-items: center; gap: 8px; }
  #resourceSupplierPanel .resource-card-list-panel { padding-top: 8px; }
  #resourceSupplierPanel .resource-card-toolbar { gap: 4px; }
  #resourceCardPager.resource-card-pager { min-height: 42px; padding-block: 5px; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  #resourceSupplierPanel > .resource-supplier-heading { flex-wrap: wrap; gap: 6px; }
  #resourceSupplierPanel .resource-center-top-actions { flex-wrap: wrap; gap: 6px; }
  #resourceSupplierPanel > .resource-card-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  #resourceSupplierPanel .resource-card-summary > :is(span, button) { min-width: 0; padding-inline: 8px; }
  #resourceSupplierPanel .resource-card-search-row { grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; gap: 6px; }
  #resourceSupplierPanel .resource-card-search-row > input { grid-column: 1 / -1; }
  #resourceSupplierPanel .resource-card-search-row > button { min-width: 0; white-space: nowrap; }
  #resourceSupplierPanel .resource-card-result-row { flex-wrap: wrap; gap: 4px 8px; }
  #resourceCardPager.resource-card-pager { gap: 5px; }
  #resourceCardPager.resource-card-pager button { min-width: 0; padding-inline: 7px; }
}
.resource-card-modal { position: fixed; z-index: 1200; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 27, 47, .42); }
.resource-card-modal.hidden { display: none; }
.resource-card-modal-panel { width: min(900px, 100%); max-height: min(850px, calc(100vh - 40px)); overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 22px 64px rgba(24, 44, 79, .24); }
.resource-card-modal-head,
.resource-card-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.resource-card-modal-head h2,
.resource-card-detail-head h2 { margin: 0; color: var(--ink); font-size: 18px; }
.resource-card-modal-head p { margin: 4px 0 0; font-size: 12px; }
.resource-mobile-capture-panel { width: min(680px, 100%); }
.resource-mobile-capture-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: center; padding: 22px 4px 8px; }
.resource-mobile-capture-qr { display: grid; justify-items: center; gap: 8px; min-height: 248px; }
.resource-mobile-capture-qr img { display: block; width: 220px; height: 220px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; image-rendering: pixelated; }
.resource-mobile-capture-qr strong { color: var(--text); font-size: 13px; }
.resource-mobile-capture-qr small { color: var(--muted); font-size: 11px; text-align: center; }
.resource-mobile-capture-info { display: grid; gap: 12px; }
.resource-mobile-capture-info label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
.resource-mobile-capture-info input { width: 100%; min-width: 0; }
.resource-mobile-capture-info p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.resource-mobile-capture-progress { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 12px; }
.resource-mobile-capture-progress strong { color: var(--text); }
.resource-mobile-capture-dot { color: var(--line-strong); }
.resource-card-upload-meta { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr); gap: 10px; margin: 14px 0; }
.resource-card-upload-meta label,
.resource-card-detail-form label { display: grid; gap: 5px; color: #5b6b83; font-size: 12px; }
.resource-card-upload-meta input,
.resource-card-detail-form input,
.resource-card-detail-form select,
.resource-card-detail-form textarea { width: 100%; min-width: 0; }
.resource-card-side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.resource-card-side-slot { min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfd; }
.resource-card-side-title { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; margin-bottom: 9px; }
.resource-card-side-title strong { color: var(--text); }
.resource-card-side-title span { color: var(--muted); font-size: 11px; }
.resource-card-file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 130px; padding: 14px; border: 1px dashed #aebbd0; border-radius: 7px; background: #fff; color: var(--muted); text-align: center; cursor: pointer; }
.resource-card-file-drop:hover { border-color: var(--blue); background: var(--blue-soft); }
.resource-card-file-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.resource-card-file-drop b { color: var(--blue); font-size: 13px; }
.resource-card-file-drop small { margin-top: 4px; font-size: 11px; }
.resource-card-file-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: 4px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 20px; line-height: 1; }
.resource-card-upload-preview { position: relative; display: flex; align-items: center; justify-content: center; min-height: 10px; margin-top: 8px; }
.resource-card-upload-preview.has-image { min-height: 130px; }
.resource-card-upload-preview img { display: block; max-width: 100%; max-height: 180px; border: 1px solid var(--line); border-radius: 5px; object-fit: contain; }
.resource-card-upload-preview button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(20, 32, 52, .7); color: #fff; cursor: pointer; }
.resource-card-upload-progress { min-height: 20px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.resource-card-upload-progress.is-error { color: var(--red); }
.resource-card-bulk-file-drop { display: flex; flex-direction: column; justify-content: center; min-height: 76px; padding: 12px 16px; border: 1px dashed #b7c7d8; border-radius: 8px; background: #f8fbfe; cursor: pointer; }
.resource-card-bulk-file-drop input { display: none; }
.resource-card-bulk-file-drop b { color: var(--primary); }
.resource-card-bulk-file-drop small { margin-top: 4px; color: var(--muted); }
.resource-card-bulk-errors { max-height: 150px; overflow: auto; margin-top: 8px; color: var(--red); font-size: 12px; line-height: 1.6; }
.resource-card-modal-actions,
.resource-card-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.resource-card-modal-actions button { min-width: 112px; }
.resource-card-detail-drawer { position: fixed; z-index: 1190; inset: 0; visibility: hidden; pointer-events: none; }
.resource-card-detail-drawer.is-open { visibility: visible; pointer-events: auto; }
.resource-card-detail-mask { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(15, 27, 47, .38); cursor: default; }
.resource-card-detail-panel { position: absolute; top: 0; right: 0; display: flex; flex-direction: column; width: min(640px, 100%); height: 100%; padding: 18px; overflow: auto; background: #fff; box-shadow: -16px 0 42px rgba(24, 44, 79, .2); transform: translateX(100%); transition: transform .2s ease; }
.resource-card-detail-drawer.is-open .resource-card-detail-panel { transform: translateX(0); }
.resource-card-detail-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.resource-card-detail-images figure { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 7px; background: #fafbfd; }
.resource-card-detail-images img { display: block; width: 100%; height: 160px; object-fit: contain; background: #eef1f5; cursor: zoom-in; }
.resource-card-detail-images img.is-loading { opacity: .45; }
.resource-card-detail-images figcaption { margin-top: 5px; color: var(--muted); font-size: 11px; text-align: center; }
.resource-card-detail-state { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.resource-card-detail-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.resource-card-detail-wide { grid-column: 1 / -1; }
.resource-card-detail-actions { position: sticky; bottom: -18px; margin: 14px -18px -18px; padding: 12px 18px; background: rgba(255, 255, 255, .97); }
.resource-card-detail-actions span { margin-right: auto; color: var(--muted); font-size: 12px; }
.resource-card-image-preview-modal { position: fixed; z-index: 1300; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(15, 27, 47, .68); }
.resource-card-image-preview-modal.hidden,
.resource-card-image-hover-preview.hidden { display: none; }
.resource-card-image-preview-panel { width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: hidden; border: 1px solid rgba(255, 255, 255, .3); border-radius: 12px; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .3); }
.resource-card-image-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.resource-card-image-preview-head h2 { margin: 0; color: var(--ink); font-size: 17px; }
.resource-card-image-preview-stage { display: flex; min-height: 260px; max-height: calc(100vh - 125px); flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; background: #f2f5f9; }
.resource-card-image-preview-stage img { display: block; max-width: 100%; max-height: calc(100vh - 180px); object-fit: contain; }
.resource-card-image-preview-stage span { color: var(--muted); font-size: 12px; }
.resource-card-image-hover-preview { position: fixed; z-index: 1290; display: flex; min-height: 80px; align-items: center; justify-content: center; overflow: hidden; padding: 8px; border: 1px solid rgba(74, 101, 145, .34); border-radius: 8px; background: #fff; box-shadow: 0 12px 34px rgba(23, 42, 73, .24); pointer-events: none; }
.resource-card-image-hover-preview.is-loading::after { content: "正在读取…"; color: var(--muted); font-size: 12px; }
.resource-card-image-hover-preview.is-error::after { content: "图片暂不可用"; color: var(--red); font-size: 12px; }
.resource-card-image-hover-preview img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 1050px) {
  .resource-card-search-row { grid-template-columns: minmax(220px, 1fr) repeat(2, 120px) 130px auto auto; }
}
@media (max-width: 760px) {
  #customerResourcePager.resource-customer-pager { gap: 6px; }
  .resource-customer-page-controls { justify-content: flex-start; gap: 6px; }
  #customerResourcePager .resource-card-page-numbers { display: none; }
  #resourceCenter.is-customer-resource-active .resource-customer-list-panel { padding: 10px 10px 0; }
  .resource-center-tabs { width: 100%; }
  .resource-center-tabs button { flex: 1; min-width: 0; padding-inline: 8px; }
  .resource-supplier-heading, .resource-customer-heading { align-items: stretch; flex-direction: column; }
  .resource-center-top-actions, .resource-customer-admin-actions { flex-wrap: wrap; }
  .resource-customer-toolbar { align-items: stretch; flex-direction: column; }
  .resource-customer-search { max-width: none; }
  .resource-customer-search input { flex: 1; min-width: 0; }
  .resource-customer-view-toggle { align-self: flex-start; }
  .resource-customer-result-row { flex-wrap: wrap; }
  .resource-customer-result-row label { margin-left: auto; }
  .resource-customer-edit-form { grid-template-columns: 1fr; }
  .resource-customer-edit-note { grid-column: auto; }
  #resourceCenter .resource-center-topbar { align-items: flex-start; }
  .resource-center-topbar { flex-direction: column; gap: 8px; }
  .resource-center-top-actions { width: 100%; }
  .resource-center-top-actions button { flex: 1; }
  .resource-card-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-card-search-row { grid-template-columns: 1fr 1fr; }
  .resource-card-search-row input { grid-column: 1 / -1; }
  .resource-card-search-row button { min-width: 0; }
  .resource-card-result-row { flex-wrap: wrap; gap: 7px; }
  .resource-card-result-row label { margin-left: auto; }
  .resource-card-side-grid,
  .resource-card-upload-meta,
  .resource-card-detail-form { grid-template-columns: 1fr; }
  .resource-card-detail-wide { grid-column: auto; }
  .resource-card-modal { align-items: flex-end; padding: 0; }
  .resource-card-modal-panel { max-height: calc(100vh - 12px); border-radius: 12px 12px 0 0; padding: 14px; }
  .resource-mobile-capture-body { grid-template-columns: 1fr; gap: 12px; padding-top: 14px; }
  .resource-mobile-capture-qr img { width: 190px; height: 190px; }
  .resource-card-modal-actions { flex-wrap: wrap; }
  .resource-card-modal-actions button { flex: 1 1 30%; min-width: 0; }
}


/* Recovered from verified 2026-09-24 18:19:05 rollout line 212.
 * Source of truth: edit this stylesheet, never only generated admin-r*.css. */
/* 国铁待录独立待办页 */
#railwayPendingDedupeDialog.railway-pending-dedupe-dialog{box-sizing:border-box;inline-size:min(620px,calc(100vw - 28px));width:min(620px,calc(100vw - 28px));min-width:0;max-width:min(620px,calc(100vw - 28px));max-height:calc(100dvh - 36px);margin:auto;padding:0;border:1px solid #d8e3f4;border-radius:14px;color:#23354d;background:#fff;box-shadow:0 18px 60px #15305233;overflow:hidden}
#railwayPendingDedupeDialog[open]{display:flex;flex-direction:column}
.railway-pending-dedupe-dialog::backdrop{background:#172c4c66}
.railway-pending-dedupe-dialog header,.railway-pending-dedupe-dialog footer{display:flex;flex-shrink:0;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;background:#f7faff}
.railway-pending-dedupe-dialog header{border-bottom:1px solid #e5edf8}
.railway-pending-dedupe-dialog h2{margin:0;font-size:18px}
.railway-pending-dedupe-dialog header p{margin:5px 0 0;color:#6e7e96;font-size:12px}
.railway-pending-dedupe-dialog footer{justify-content:flex-end;border-top:1px solid #e5edf8}
.railway-pending-dedupe-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:14px 18px}
.railway-pending-dedupe-options{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.railway-pending-dedupe-options label{display:grid;gap:6px;font-size:12px;color:#667a96}
.railway-pending-dedupe-options select{width:100%;min-width:0;height:36px;border:1px solid #cedbf0;border-radius:7px;background:white;color:#253b5e;padding:0 8px}
.railway-pending-dedupe-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.railway-pending-dedupe-stats>div{display:grid;gap:5px;padding:10px;background:#f2f6ff;border-radius:8px}
.railway-pending-dedupe-stats small{font-size:11px;color:#6c7e99}
.railway-pending-dedupe-stats strong{font-size:20px;color:#2854c7}
.railway-pending-dedupe-note{margin:10px 0;font-size:12px;line-height:1.6;color:#6b7c94;overflow-wrap:anywhere}
.railway-pending-dedupe-note[data-kind="warning"]{color:#966000}
.railway-pending-dedupe-note[data-kind="error"]{color:#b72b38}
.railway-pending-dedupe-preview{max-height:250px;overflow:auto;border:1px solid #e0e8f5;border-radius:8px}
#railwayPendingDedupeDialog .railway-pending-dedupe-preview table{width:100%;min-width:0;max-width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.railway-pending-dedupe-preview th,.railway-pending-dedupe-preview td{padding:9px 12px;border-bottom:1px solid #edf1f8;text-align:left;overflow-wrap:anywhere}
.railway-pending-dedupe-preview th{position:sticky;top:0;background:#f6f9fe;color:#647895}
#railwayPendingDedupeDialog .railway-pending-dedupe-preview th,#railwayPendingDedupeDialog .railway-pending-dedupe-preview td{min-width:0;white-space:normal}
#railwayPendingDedupeDialog .railway-pending-dedupe-preview th:nth-child(1),#railwayPendingDedupeDialog .railway-pending-dedupe-preview td:nth-child(1){width:17%}
#railwayPendingDedupeDialog .railway-pending-dedupe-preview th:nth-child(2),#railwayPendingDedupeDialog .railway-pending-dedupe-preview td:nth-child(2){width:24%}
#railwayPendingDedupeDialog .railway-pending-dedupe-preview th:nth-child(3),#railwayPendingDedupeDialog .railway-pending-dedupe-preview td:nth-child(3){width:21%}
#railwayPendingDedupeDialog .railway-pending-dedupe-preview th:nth-child(4),#railwayPendingDedupeDialog .railway-pending-dedupe-preview td:nth-child(4){width:38%}
.railway-pending-dedupe-conflicts summary{margin-top:12px;color:#966000;cursor:pointer;font-size:12px;font-weight:600;overflow-wrap:anywhere}
.railway-pending-conflict-groups{max-height:240px;overflow:auto;margin-top:8px;font-size:12px;overflow-wrap:anywhere}
.railway-pending-conflict-groups section{padding:10px;border:1px solid #eadfc9;border-radius:8px;margin-bottom:8px}
.railway-pending-conflict-variant{padding:8px;margin-top:6px;background:#f7f9fc;border-radius:6px;line-height:1.6}
.railway-pending-conflict-variant.is-selected{background:#edf8f3}
.railway-pending-conflict-variant span{font-weight:600;color:#61718a}
@media(max-width:540px){.railway-pending-dedupe-options{grid-template-columns:1fr}.railway-pending-dedupe-stats{grid-template-columns:repeat(2,1fr)}}
.railway-pending-view{min-width:0;overflow:hidden}
/* Scope the fixed-height workspace to this view; other pages keep their own scrolling. */
body.railway-pending-page-active{overflow:hidden!important}
body.railway-pending-page-active .main{height:100vh;height:100dvh;box-sizing:border-box;min-height:0;overflow:hidden!important}
#railwayPending.view.active{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box}
#railwayPending>.railway-pending-topbar,#railwayPending>.railway-pending-kpis,#railwayPending>.railway-pending-tabs{flex-shrink:0}
#railwayPending .railway-pending-panel{display:flex;flex:1 1 0;flex-direction:column;min-height:0;margin-bottom:0}
#railwayPending .railway-pending-toolbar,#railwayPending .railway-pending-pagination{flex-shrink:0}
#railwayPending .railway-pending-feedback{flex-shrink:0;padding:8px 13px;border-bottom:1px solid #e7edf5;background:#f8faff;color:#586a85;font-size:12px;line-height:1.5;max-height:108px;overflow:auto}
#railwayPending .railway-pending-notice{margin-top:5px;color:#315582;overflow-wrap:anywhere}
#railwayPending .railway-pending-notice[data-kind="warning"]{color:#925600}
#railwayPending .railway-pending-notice[data-kind="error"]{color:#b52b35}
#railwayPending .railway-pending-notice[data-kind="success"]{color:#087c70}
#railwayPending #railwayPendingDetailNotice{flex-shrink:0;margin:0;padding:10px 22px;background:#f8faff;font-size:13px;line-height:1.6;max-height:140px;overflow:auto}
#railwayPending .railway-pending-table-wrap{flex:1 1 0;min-height:0;max-height:none}
.railway-pending-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px}
.railway-pending-kicker{margin-bottom:5px;color:#71819a;font-size:12px;font-weight:700}
.railway-pending-topbar h1{margin:0}
.railway-pending-title{display:flex;align-items:center;gap:8px}
.railway-pending-auto-status{margin-top:4px;color:#73829a;font-size:11px;line-height:1.5}
.railway-pending-auto-status[data-state="checking"]{color:#315fa5}
.railway-pending-auto-status[data-state="error"]{color:#925600}
.railway-pending-ready-feedback{display:flex;align-items:center;gap:10px;color:#087c70}
.railway-pending-inline-button{padding:0;border:0;background:transparent;color:#2754c3;font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
.railway-pending-topbar p{margin:6px 0 0;color:var(--muted)}
.railway-pending-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.railway-pending-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:12px 0}
.railway-pending-kpis button{display:grid;gap:5px;min-height:88px;padding:13px 15px;border:1px solid #dbe4f0;border-radius:12px;background:#fff;text-align:left;cursor:pointer;box-shadow:0 4px 14px rgba(26,52,92,.04);transition:.15s ease}
.railway-pending-kpis button:hover,.railway-pending-kpis button:focus-visible{border-color:#88a9eb;transform:translateY(-1px)}
.railway-pending-kpis small{color:#73829a;font-size:12px;font-weight:700}
.railway-pending-kpis strong{color:#1d4ed8;font-size:25px;line-height:1}
.railway-pending-kpis span{overflow:hidden;color:#96a1b0;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.railway-pending-tabs{display:flex;gap:6px;margin:4px 0 10px;overflow:auto}
.railway-pending-tabs button{padding:8px 16px;border:1px solid #d7e0ed;border-radius:999px;background:#fff;color:#61718a;font-weight:700;white-space:nowrap;cursor:pointer}
.railway-pending-tabs button.active{border-color:#3d5fe0;background:#3d5fe0;color:#fff}
.railway-pending-panel{padding:0;overflow:hidden}
.railway-pending-toolbar{display:grid;grid-template-columns:minmax(160px,1fr) 180px 130px 160px 100px auto auto;align-items:center;gap:8px;padding:13px;border-bottom:1px solid #e7edf5}
.railway-pending-toolbar input,.railway-pending-toolbar select{box-sizing:border-box;min-width:0;width:100%;height:38px;border:1px solid #d5dfed;border-radius:8px;background:#fff;padding:0 10px;color:var(--ink)}
.railway-pending-brand-picker{position:relative;min-width:0}
#railwayPending #railwayPendingBrand{padding-right:30px}
#railwayPending #railwayPendingBrandToggle{position:absolute;right:1px;top:1px;width:28px;height:calc(100% - 2px);min-height:0;padding:0;border:0;background:transparent;color:#526982;box-shadow:none}
#railwayPendingBrandPopup{position:fixed;z-index:1800;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;max-width:calc(100vw - 16px);border:1px solid #d4dfef;border-radius:9px;background:#fff;color:#253b5e;box-shadow:0 8px 24px #16345629;font-size:13px}
#railwayPendingBrandPopup[hidden]{display:none}
#railwayPendingBrandHint{flex-shrink:0;padding:8px 10px;border-bottom:1px solid #e7edf5;background:#f8faff;color:#6c7e99;font-size:11px;line-height:1.5}
#railwayPendingBrandOptions{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px}
#railwayPendingBrandOptions .railway-pending-brand-option{display:flex;align-items:center;gap:3px;padding:9px 10px;border-radius:6px;cursor:pointer;line-height:1.45;overflow-wrap:anywhere}
#railwayPendingBrandOptions .railway-pending-brand-option:hover,#railwayPendingBrandOptions .railway-pending-brand-option.is-active{background:#edf3ff;color:#2456bd}
#railwayPendingBrandOptions .railway-pending-brand-option[aria-selected="true"]{font-weight:700;background:#f0f5ff}
#railwayPendingBrandOptions .railway-pending-brand-count{flex-shrink:0;color:#5875a3;font-variant-numeric:tabular-nums}
#railwayPendingBrandOptions .railway-pending-brand-option.is-zero{color:#8a98ad}
.railway-pending-table-wrap{max-height:calc(100vh - 420px);min-height:280px;overflow:auto;overscroll-behavior:contain}
.railway-pending-table{width:100%;min-width:1190px;border-collapse:collapse;table-layout:fixed}
.railway-pending-table th,.railway-pending-table td{padding:11px 10px;border-bottom:1px solid #edf1f6;text-align:left;font-size:12px;vertical-align:middle}
.railway-pending-table th{position:sticky;top:0;z-index:2;background:#f7f9fc;color:#687890;font-weight:700;white-space:nowrap}
.railway-pending-table tbody tr:hover{background:#fafcff}
.railway-pending-table th:nth-child(1),.railway-pending-table td:nth-child(1){width:38px;text-align:center}
.railway-pending-table th:nth-child(2),.railway-pending-table td:nth-child(2){width:145px}
.railway-pending-table th:nth-child(3),.railway-pending-table td:nth-child(3){width:150px}
.railway-pending-table th:nth-child(4),.railway-pending-table td:nth-child(4){width:235px}
.railway-pending-table th:nth-child(5),.railway-pending-table td:nth-child(5){width:190px}
.railway-pending-table th:nth-child(6),.railway-pending-table td:nth-child(6),.railway-pending-table th:nth-child(7),.railway-pending-table td:nth-child(7){width:88px}
.railway-pending-table th:nth-child(8),.railway-pending-table td:nth-child(8){width:110px}
.railway-pending-table th:nth-child(9),.railway-pending-table td:nth-child(9){width:64px}
.railway-pending-table th:nth-child(10),.railway-pending-table td:nth-child(10){width:130px}
.railway-pending-table th:nth-child(11),.railway-pending-table td:nth-child(11){width:85px}
.railway-pending-table th:nth-child(12),.railway-pending-table td:nth-child(12){width:130px}
.railway-pending-table .pending-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.railway-pending-table .pending-inline-edit{display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:auto;min-height:0;padding:0;border:0;background:transparent;color:inherit;font:inherit;text-align:left;line-height:1.5;white-space:normal;overflow-wrap:anywhere;cursor:text}
.railway-pending-table .pending-inline-edit>span{margin-left:5px;color:#7292c0;font-size:11px;white-space:nowrap}
.railway-pending-table .pending-title .pending-inline-edit{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.railway-pending-table .pending-inline-edit:hover{color:#2859cb}
.railway-pending-table tr.is-editing{background:#f0f5ff}
.railway-pending-table tr.is-editing>td{padding-top:8px;padding-bottom:8px}
.railway-pending-table tr.is-editing>.pending-title{white-space:normal}
.railway-pending-table .pending-edit-fields{display:grid;gap:5px;min-width:0}
.railway-pending-table .pending-edit-fields label{display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:4px;margin:0;font-size:11px;color:#62758e}
.railway-pending-table .pending-edit-fields input,.railway-pending-table .pending-edit-title input{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;height:30px;margin:0;padding:5px 7px;border:1px solid #b7caed;border-radius:5px;background:#fff;color:#243957;font:inherit;font-size:12px;outline-offset:1px}
.railway-pending-table .pending-edit-fields input:focus,.railway-pending-table .pending-edit-title input:focus{border-color:#3c63e1;outline:2px solid #d9e4ff}
.railway-pending-table .pending-edit-title{min-width:0;max-width:100%}
.railway-pending-table .pending-edit-title small{display:block;min-height:16px;margin-top:4px;font-size:11px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;color:#62758e}
.railway-pending-table .pending-edit-title small[data-kind="error"]{color:#b52b35}
.railway-pending-table .pending-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0;max-width:100%}
.railway-pending-table .pending-row-actions>button{box-sizing:border-box;min-width:0;max-width:100%;margin:0;padding:5px 8px;font-size:12px;line-height:1.4;white-space:nowrap}
.railway-pending-table .pending-row-actions [data-pending-edit-reload]{font-size:11px}
.railway-pending-table .pending-inline-edit:disabled{opacity:1;cursor:default}
.railway-pending-table .pending-dropship{color:#087c70;font-weight:700}
.railway-pending-reason,.railway-pending-status{display:inline-flex;align-items:center;max-width:100%;padding:4px 8px;border-radius:999px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.railway-pending-reason.is-待录入,.railway-pending-status.is-待录入{background:#fff3e0;color:#a45d00}
.railway-pending-reason.is-待报价,.railway-pending-status.is-待报价{background:#fff7df;color:#98700c}
.railway-pending-reason.is-待确认,.railway-pending-status.is-待确认{background:#f3eefe;color:#6d4bb0}
.railway-pending-reason.is-待提交,.railway-pending-status.is-待提交{background:#e7f8f4;color:#087c70}
.railway-pending-reason.is-已提交,.railway-pending-status.is-已提交{background:#eaf0fa;color:#496482}
.railway-pending-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 13px;border-top:1px solid #e4eaf2;color:#697991;font-size:12px}
.railway-pending-page-controls{display:flex;align-items:center;gap:6px}
.railway-pending-page-controls label{display:flex;align-items:center;gap:5px;margin-left:5px}
.railway-pending-page-controls input{width:55px;height:32px;border:1px solid #d4ddea;border-radius:7px;text-align:center}
.railway-pending-page-controls button{height:32px}
.railway-pending-view button:disabled{cursor:not-allowed;opacity:.5}
.railway-pending-view button:focus-visible{outline:2px solid #3d5fe0;outline-offset:2px}
.railway-pending-view .pending-submit-one{margin-left:4px}
.railway-pending-drawer{position:fixed;z-index:80;inset:0;display:flex;justify-content:flex-end}
.railway-pending-drawer.hidden{display:none}
.railway-pending-drawer-mask{position:absolute;inset:0;width:100%;border:0;background:rgba(20,35,58,.32);cursor:pointer}
.railway-pending-drawer-panel{position:relative;z-index:1;display:flex;width:min(520px,94vw);height:100%;flex-direction:column;background:#fff;box-shadow:-10px 0 32px rgba(23,43,73,.18)}
.railway-pending-drawer-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:22px;border-bottom:1px solid #e8edf4}
.railway-pending-drawer-panel header small{color:#8693a7;font-size:11px}
.railway-pending-drawer-panel header h2{margin:5px 0 0;color:#1c2b43;font-size:20px}
.railway-pending-detail-body{flex:1;overflow:auto;padding:18px 22px}
.railway-pending-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.railway-pending-detail-grid>div{display:grid;gap:4px;padding:11px 12px;border:1px solid #e5ebf3;border-radius:9px;background:#fafbfd}
.railway-pending-detail-grid small,.railway-pending-detail-note small{color:#8693a7;font-size:11px}
.railway-pending-detail-grid strong{overflow-wrap:anywhere;color:#263852;font-size:13px}
.railway-pending-detail-note{margin-top:14px;padding:12px;border:1px solid #e5ebf3;border-radius:9px;background:#fafbfd}
.railway-pending-detail-note p{margin:7px 0 0;color:#52647d;line-height:1.6}
.railway-pending-drawer-panel footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px;border-top:1px solid #e8edf4}
@media(max-width:1280px){
.railway-pending-toolbar{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr) 100px auto auto}
.railway-pending-toolbar #railwayPendingKeyword{grid-column:1/-1}
}
@media(max-width:1100px){.railway-pending-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.railway-pending-topbar{align-items:flex-start;flex-direction:column}
.railway-pending-actions{justify-content:flex-start}
.railway-pending-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
.railway-pending-toolbar{grid-template-columns:1fr 1fr}
.railway-pending-toolbar #railwayPendingKeyword{grid-column:1/-1}
.railway-pending-pagination{align-items:flex-start;flex-direction:column}
.railway-pending-page-controls{flex-wrap:wrap}
.railway-pending-detail-grid{grid-template-columns:1fr}
}


#railwayPriceMonitor { overflow: auto; }
#railwayPriceMonitorRoot { padding-bottom: 24px; --rp-line: #e3e8ef; --rp-muted: #66758a; }
.rp-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
.rp-heading h1 { margin:0 0 7px; font-size:24px; }
.rp-heading p { margin:0; color:var(--rp-muted); line-height:1.7; }
.rp-actions,.rp-toolbar,.rp-tabs,.rp-pager,.rp-form-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.rp-rule { margin:16px 0; padding:11px 14px; background:#eef6ff; color:#254a76; border:1px solid #d6e7fa; border-radius:9px; line-height:1.7; }
.rp-stats { display:grid; grid-template-columns:repeat(4,minmax(100px,1fr)); gap:12px; margin:16px 0; }
.rp-stat { background:#fff; border:1px solid var(--rp-line); padding:16px; border-radius:10px; }
.rp-stat span { display:block; color:var(--rp-muted); font-size:12px; }
.rp-stat strong { display:block; font-size:26px; margin-top:8px; font-variant-numeric:tabular-nums; }
.rp-stat.rp-alert strong { color:#b74237; }.rp-stat.rp-good strong { color:#15785a; }
.rp-tabs { border-bottom:1px solid var(--rp-line); margin-bottom:14px; gap:5px; }
.rp-tabs button { background:transparent; border:0; border-radius:0; padding:13px 17px; color:var(--rp-muted); border-bottom:3px solid transparent; }
.rp-tabs button[aria-selected=true] { color:#2460a4; border-bottom-color:#2a6cba; font-weight:700; }
.rp-panel { background:#fff; border:1px solid var(--rp-line); border-radius:10px; padding:16px; min-width:0; }
.rp-toolbar { margin-bottom:14px; }
.rp-toolbar input { min-width:140px; max-width:260px; }.rp-toolbar select { min-width:125px; }
.rp-standard-picker { position:relative; flex:0 1 195px; min-width:150px; max-width:230px; }
.rp-standard-picker .rp-picker-toggle { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:38px; padding:8px 10px; border:1px solid #d4deeb; border-radius:7px; background:#fff; color:#34445c; font:inherit; font-size:13px; text-align:left; }
.rp-picker-toggle [data-rp-picker-label] { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.rp-picker-toggle[aria-expanded=true] { border-color:#416be2; box-shadow:0 0 0 2px #416be214; }
.rp-picker-toggle:disabled { color:#7b8798; cursor:wait; background:#f7f9fc; }
.rp-standard-picker .rp-picker-popup { position:fixed; z-index:15; inset:auto; margin:0; padding:8px; border:1px solid #d6e0ed; border-radius:8px; background:#fff; box-shadow:0 8px 25px #16385826; box-sizing:border-box; }
.rp-standard-picker [hidden],.rp-filter-status[hidden],.rp-filter-status [hidden] { display:none; }
.rp-standard-picker .rp-picker-popup input { min-width:0; max-width:none; width:100%; min-height:36px; margin:0 0 7px; padding:7px 9px; box-sizing:border-box; border:1px solid #d4deeb; border-radius:6px; font:inherit; font-size:13px; }
.rp-picker-options { max-height:min(240px,var(--rp-picker-options-height,35vh)); overflow:auto; overscroll-behavior:contain; }
.rp-picker-options [role=option] { display:block; width:100%; padding:9px; border:0; border-radius:5px; background:#fff; color:#34445c; font:inherit; font-size:13px; text-align:left; white-space:normal; overflow-wrap:anywhere; box-shadow:none; }
.rp-picker-options [role=option]:hover,.rp-picker-options [role=option]:focus-visible { outline:none; background:#f0f5fd; }
.rp-picker-options [aria-selected=true] { color:#285fb2; background:#edf4ff; font-weight:650; }
.rp-picker-empty { margin:0; padding:12px 9px; color:#66758a; font-size:12px; }
.rp-filter-status { display:flex; align-items:center; flex:1 0 100%; gap:8px; color:#66758a; font-size:12px; }
.rp-filter-status[role=alert] { color:#9b3027; }
.rp-filter-status button { padding:3px 8px; font-size:12px; }
.rp-standard-filters>input[name=q] { flex:0 1 160px; min-width:130px; }
@media(max-width:650px){.rp-standard-picker{flex:1 1 calc(50% - 4px);min-width:0;max-width:none}.rp-standard-filters>input[name=q]{flex:1 1 calc(50% - 4px);min-width:0;box-sizing:border-box}}
.rp-muted { color:var(--rp-muted); font-size:12px; line-height:1.7; }
.rp-review-tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:20px;padding:1px 6px;margin-left:7px;border-radius:12px;background:#fff0e8;color:#b85222;font-size:12px;font-weight:700}
.rp-review-filters select{min-width:140px;max-width:240px;flex:1 1 160px}.rp-review-filters input[name=q]{min-width:120px;max-width:180px;flex:1 1 150px}
.rp-review-bulk{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px;font-size:12px;color:#64748b}.rp-review-bulk .rp-check{display:flex;align-items:center;gap:6px}.rp-review-bulk input,.rp-review-grid input{width:16px;height:16px;margin:0;accent-color:#416be2;cursor:pointer}
.rp-review-grid{display:flex;flex-direction:column;min-width:0;min-height:0;flex:1;overflow:hidden}.rp-review-grid .rp-table{min-width:1380px}.rp-review-grid th:nth-child(1){width:48px}.rp-review-grid th:nth-child(2){width:215px}.rp-review-grid th:nth-child(3){width:160px}.rp-review-grid th:nth-child(4){width:110px}.rp-review-grid th:nth-child(5){width:100px}.rp-review-grid th:nth-child(6){width:190px}.rp-review-grid th:nth-child(7){width:160px}.rp-review-grid th:nth-child(8){width:210px}.rp-review-grid th:nth-child(9){width:150px}
.rp-review-note,.rp-review-reason{white-space:pre-wrap!important;overflow-wrap:anywhere}.rp-review-change{font-variant-numeric:tabular-nums}.rp-review-change.up{color:#b74b36}.rp-review-change.down{color:#27805a}.rp-review-scheduled{color:#926321!important}
.rp-review-dialog{width:min(1050px,calc(100vw - 28px))}.rp-review-dialog .rp-wide{min-width:0}.rp-review-dialog .rp-table{min-width:680px}.rp-review-dialog [hidden]{display:none!important}.rp-review-dialog .rp-table th:nth-child(1){width:36%}.rp-review-dialog .rp-table th:nth-child(2){width:28%}.rp-review-dialog .rp-table th:nth-child(3){width:20%}.rp-review-dialog .rp-table th:nth-child(4){width:16%}
@media(max-width:650px){.rp-review-filters select,.rp-review-filters input[name=q]{max-width:none;min-width:0;flex:1 1 calc(50% - 8px);box-sizing:border-box}.rp-review-bulk{gap:8px}.rp-review-bulk>.rp-muted{flex-basis:100%}}
.rp-notice { padding:12px 14px; background:#f7f9fc; border:1px solid var(--rp-line); border-radius:8px; margin:12px 0; line-height:1.7; }
.rp-notice.rp-error { background:#fff4f1; border-color:#efd1c9; color:#9b3027; }
.rp-table-wrap { overflow:auto; max-width:100%; }
.rp-table { width:100%; min-width:1000px; table-layout:fixed; border-collapse:collapse; font-size:13px; }
.rp-table th { background:#f5f7fa; color:#637089; text-align:left; font-weight:600; white-space:nowrap; }
.rp-table td,.rp-table th { padding:12px 10px; border-bottom:1px solid #edf0f5; vertical-align:middle; }
.rp-table td { max-width:270px; overflow-wrap:anywhere; white-space:normal; }.rp-table td.rp-money { white-space:normal; font-variant-numeric:tabular-nums; }
.rp-table .rp-sub { display:block; margin-top:4px; color:var(--rp-muted); font-size:12px; }
.rp-table button { font-size:12px; padding:5px 9px; }.rp-table .rp-actions { min-width:140px; }
.rp-badge { display:inline-block; border-radius:5px; padding:3px 7px; font-size:12px; white-space:nowrap; background:#eef2f7; color:#58677c; }
.rp-badge.normal,.rp-badge.fresh { background:#e9f6ef; color:#1a7950; }
.rp-badge.low,.rp-badge.high { background:#fff0ed; color:#b23831; }
.rp-badge.stale,.rp-badge.pending_recheck,.rp-badge.not_seen { background:#fff5e1; color:#8a5c13; }
.rp-badge.no_standard,.rp-badge.unmatched,.rp-badge.invalid_price,.rp-badge.unit_mismatch,.rp-badge.timestamp_conflict { background:#f0edfa; color:#7051a4; }
.rp-empty { padding:48px 16px; color:var(--rp-muted); text-align:center; line-height:1.8; }
.rp-pager { justify-content:flex-end; margin-top:16px; font-size:12px; color:var(--rp-muted); }
.rp-device-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
.rp-device { border:1px solid var(--rp-line); border-radius:9px; padding:16px; }
.rp-device h3 { margin:0 0 8px; font-size:15px; }.rp-device dl { display:grid; grid-template-columns:86px 1fr; font-size:12px; gap:8px; margin:15px 0; }.rp-device dt { color:var(--rp-muted); }.rp-device dd { margin:0; overflow-wrap:anywhere; }
.rp-dialog { width:min(780px,calc(100vw - 32px)); border:1px solid #d9e0e9; border-radius:13px; padding:0; box-shadow:0 20px 70px #132b4b33; max-height:calc(100vh - 48px); color:#25334a; }
.rp-dialog::backdrop { background:#12203966; }.rp-dialog-head { display:flex; justify-content:space-between; gap:14px; align-items:center; padding:18px 22px; border-bottom:1px solid #e3e8ef; }.rp-dialog-head h2 { margin:0; font-size:18px; }
.rp-branding-countdown { display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px;margin:10px 0 16px;padding:10px 14px;border:1px solid #dbe7f5;border-radius:9px;background:#f1f7ff;color:#365a82; }
.rp-branding-countdown[hidden] { display:none; }
.rp-branding-countdown div { display:flex;flex-wrap:wrap;align-items:baseline;gap:8px; }
.rp-branding-countdown strong { font-size:19px;font-variant-numeric:tabular-nums; }
.rp-branding-countdown.is-ending { background:#fff7e9;border-color:#f3d7aa;color:#92550e; }
.rp-branding-presets { min-width:0;margin:0;padding:0;border:0; }
.rp-branding-presets legend { padding:0;margin-bottom:7px;font-size:13px; }
.rp-branding-presets div { display:flex;flex-wrap:wrap;gap:8px; }
.rp-branding-presets button[aria-pressed="true"] { background:#eaf2ff;border-color:#8fb5ed;color:#2354a0; }
.rp-branding-presets small { display:block;margin-top:7px;line-height:1.5; }
.rp-dialog-body { padding:20px 22px; }.rp-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }.rp-form label { display:flex; flex-direction:column; gap:7px; font-size:13px; }.rp-form input,.rp-form select,.rp-form textarea { width:100%; box-sizing:border-box; min-height:38px; border:1px solid #cfd8e5; border-radius:6px; padding:8px 10px; background:#fff; color:inherit; }.rp-form input[readonly] { background:#f5f7fa; }.rp-form input[type=checkbox] { width:16px; min-height:16px; margin:0; }.rp-form .rp-check { flex-direction:row; align-items:center; }.rp-form .rp-wide { grid-column:1/-1; }.rp-form-actions { justify-content:flex-end; grid-column:1/-1; padding-top:10px; }.rp-dialog .rp-notice { grid-column:1/-1; margin:0; }.rp-dialog textarea { min-height:80px; resize:vertical; }.rp-secret { font-family:ui-monospace,monospace; font-size:12px; overflow-wrap:anywhere; }.rp-history { max-height:220px; overflow:auto; }.rp-file-preview { max-height:240px; overflow:auto; grid-column:1/-1; }
@media(max-width:1050px){.rp-stats{grid-template-columns:repeat(3,minmax(100px,1fr));}}
@media(max-width:650px){.rp-heading h1{font-size:21px}.rp-stats{grid-template-columns:repeat(2,minmax(100px,1fr))}.rp-tabs{flex-wrap:nowrap;overflow:auto}.rp-tabs button{white-space:nowrap;padding:12px}.rp-panel{padding:12px}.rp-form{grid-template-columns:1fr}.rp-toolbar input{max-width:none;flex:1}.rp-dialog-body{padding:16px}.rp-device-grid{grid-template-columns:1fr}}
.rp-requirements { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:300px;overflow:auto;padding:12px;border:1px solid #e3e8ef;border-radius:8px; }
.rp-requirements label[hidden] { display:none; }.rp-requirements small { color:#66758a; }.rp-dialog .rp-table { min-width:480px; }
.rp-h5-scope>header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:9px; }
.rp-supplier-invitations .rp-form>* { min-width:0; }
.rp-h5-manage-toolbar { display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:8px 0; }
.rp-h5-manage-toolbar label:first-child { flex:1 1 250px; }
.rp-h5-manage-toolbar .rp-check { min-height:40px; }
.rp-h5-create { border-top:1px solid #e3e8ef;padding-top:12px; }
.rp-h5-create summary { cursor:pointer;font-weight:600; }
.rp-h5-matches { display:flex;flex-wrap:wrap;gap:6px;max-height:210px;overflow:auto;margin:8px 0; }
.rp-h5-matches button { text-align:left; }
.rp-h5-matches small { display:block;color:#66758a;overflow-wrap:anywhere; }
.rp-h5-actions { white-space:normal; }
.rp-h5-actions button,.rp-h5-actions a { margin:3px 8px 3px 0;white-space:nowrap; }
.rp-h5-model { display:flex;gap:6px;align-items:start;justify-content:space-between; }
.rp-h5-model label { min-width:0;overflow-wrap:anywhere; }
.rp-supplier-invitations [data-h5-detail] { border:1px solid #dce4ef;border-radius:8px;padding:10px 14px;margin-top:10px; }
.rp-h5-scope-title { display:flex;align-items:center;flex-wrap:wrap;gap:18px; }
.rp-form .rp-h5-select-all { display:flex;gap:6px;white-space:nowrap;font-weight:400;cursor:pointer; }
.rp-h5-scope>header [data-h5-scope-count] { text-align:right; }
.rp-h5-scope [data-h5-scope-limit] { margin:10px 0 0;line-height:1.6; }
@media(max-width:650px){.rp-h5-scope>header{align-items:flex-start;flex-wrap:wrap}.rp-h5-scope>header [data-h5-scope-count]{text-align:left}}
.rp-h5-scope .rp-requirements .rp-check { align-items:flex-start; }
.rp-h5-scope .rp-requirements small { display:block; margin-top:4px; font-size:11px; line-height:1.5; }
@media(max-width:650px){.rp-requirements{grid-template-columns:1fr}}

/* Company import preview includes ownership and the precise product link. */
.rp-import-dialog { width:min(1120px,calc(100vw - 32px)); }
.rp-import-dialog .rp-file-preview { max-height:340px; }
.rp-import-dialog .rp-table { min-width:960px; }
.rp-actions [data-rp-action="capture-clear"] { color:#a94131; border-color:#e6c1ba; }
.rp-capture-dialog { width:min(980px,calc(100vw - 32px)); }
.rp-clear-preview { padding:15px; border:1px solid #dce3ec; border-radius:8px; background:#f8fafc; }
.rp-clear-counts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.rp-clear-counts span { display:flex; flex-direction:column; gap:6px; color:#68768a; font-size:13px; }
.rp-clear-counts strong { color:#25334a; font-size:24px; }
.rp-clear-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.rp-capture-dialog .rp-archive-list { max-height:55vh; overflow:auto; }
.rp-time-source { margin:0; }
.rp-capture-dialog button:disabled { cursor:default; }
@media(max-width:650px){.rp-clear-counts{gap:8px}.rp-clear-counts strong{font-size:21px}}
.rp-file-preview .rp-notice { margin:8px 0; }
.rp-pricing-import-dialog { width:min(1120px,calc(100vw - 32px)); }
.rp-pricing-preview { max-height:380px; overflow:auto; }
.rp-pricing-preview .rp-table { min-width:880px; }
.rp-pricing-preview .rp-table th { position:sticky; top:0; z-index:1; }
.rp-pricing-preview .rp-table th:first-child { width:60px; }
.rp-pricing-preview .rp-table th:nth-child(3) { width:180px; }
.rp-pricing-preview .rp-table th:last-child { width:220px; }
.rp-pricing-fill,.rp-pricing-update { background:#e9f6ef; color:#1a7950; }
.rp-pricing-invalid,.rp-pricing-not_found,.rp-pricing-brand_not_synced,.rp-pricing-conflict { background:#fff0ed; color:#b23831; }

.rp-setting-section { margin:0 0 24px; padding-bottom:22px; border-bottom:1px solid var(--rp-line); }
.rp-setting-section>header { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.rp-setting-section h3 { margin:0; font-size:16px; }
.rp-setting-section .rp-table { min-width:620px; }
.rp-form [hidden] { display:none!important; }

/* Standard pricing stays in five columns; editing never opens a dialog. */
.rp-standard-grid .rp-table { min-width:820px; }
.rp-standard-grid th:nth-child(1) { width:12%; }
.rp-standard-grid th:nth-child(2) { width:26%; }
.rp-standard-grid th:nth-child(3) { width:18%; }
.rp-standard-grid th:nth-child(4) { width:26%; }
.rp-standard-grid th:nth-child(5) { width:18%; }
.rp-inline-price { max-width:245px; min-width:170px; }
.rp-price-input-wrap { display:flex; align-items:center; gap:7px; border:1px solid #d4deeb; border-radius:7px; background:#fff; padding:0 10px; }
.rp-price-input-wrap:focus-within { border-color:#416be2; box-shadow:0 0 0 2px #416be214; }
.rp-price-input-wrap>span { color:#73839a; }
.rp-price-input-wrap input { width:100%; min-width:0; border:0; box-shadow:none; border-radius:0; padding:9px 0; font:inherit; font-variant-numeric:tabular-nums; background:transparent; }
.rp-price-input-wrap input:focus { outline:none; box-shadow:none; }
.rp-price-input-wrap input:disabled { color:#67768a; cursor:not-allowed; }
.rp-price-status { display:block; color:#78869a; font-size:11px; line-height:1.55; margin-top:5px; min-height:18px; }
.rp-price-status.saved { color:#187b52; }
.rp-price-status.saving { color:#4265a1; }
.rp-price-status.error { color:#b23831; }
.rp-inline-price-error .rp-price-input-wrap { border-color:#dc9b94; }
.rp-inline-price [data-rp-action="refresh-price"] { margin-top:4px; }
@media(max-width:650px){.rp-standard-grid .rp-table{min-width:780px}.rp-inline-price{min-width:155px}}

/* The headline and the four status filters share one compact desktop row. */
.rp-heading { display:grid; grid-template-columns:minmax(170px,210px) minmax(400px,1fr) auto; align-items:center; gap:14px; }
.rp-heading-title h1 { margin-bottom:5px; }
.rp-heading-title p { font-size:11px; max-width:210px; }
.rp-heading>.rp-actions { justify-content:flex-end; flex-wrap:nowrap; }
.rp-heading .rp-stats { margin:0; grid-template-columns:repeat(4,minmax(88px,1fr)); gap:8px; }
.rp-stat { width:100%; text-align:left; padding:10px 12px; cursor:pointer; font:inherit; color:inherit; box-shadow:none; }
.rp-stat strong { font-size:22px; margin-top:4px; }
.rp-stat[aria-pressed=true] { border-color:#416be2; background:#f0f5ff; box-shadow:0 0 0 1px #416be229; }
.rp-stat:hover { border-color:#98b1e5; }
.rp-stat:focus-visible,.rp-reason-filter:focus-visible,.rp-text-filter:focus-visible { outline:2px solid #416be2; outline-offset:2px; }
.rp-batch-summary { margin:12px 0 4px; padding:12px 14px; border:1px solid var(--rp-line); border-radius:9px; background:#fff; font-size:12px; }
.rp-batch-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; }
.rp-batch-line label { display:flex; align-items:center; gap:8px; color:#52627a; }
.rp-batch-line select { max-width:380px; min-width:200px; padding:6px 9px; border:1px solid #d8e1ed; border-radius:6px; background:#fff; color:#34445c; }
.rp-batch-counts { display:flex; align-items:center; flex-wrap:wrap; gap:4px 18px; margin:8px 0; line-height:1.8; font-variant-numeric:tabular-nums; }
.rp-text-filter { border:0; padding:0 2px; background:transparent; color:#3565ac; font:inherit; cursor:pointer; }
.rp-text-filter[aria-pressed=true] { font-weight:700; text-decoration:underline; }
.rp-reason-filters { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.rp-reason-filter { border:1px solid #e0e5ef; border-radius:6px; padding:5px 8px; background:#f8f9fc; color:#5d647c; font-size:12px; cursor:pointer; }
.rp-reason-filter strong { margin-left:4px; font-variant-numeric:tabular-nums; }
.rp-reason-filter[aria-pressed=true] { border-color:#799ae0; background:#eef4ff; color:#285ca8; }
.rp-auxiliary { margin:7px 0 0; }
.rp-product-link { display:inline-block; color:#285fb2; text-decoration:none; border:1px solid #d6e3f7; border-radius:5px; padding:3px 8px; font-size:12px; background:#f5f9ff; }
.rp-product-link:hover { background:#e9f1ff; text-decoration:underline; }
.rp-result-grid .rp-table { min-width:1060px; }
.rp-result-grid th:nth-child(1) { width:15%; }.rp-result-grid th:nth-child(2) { width:20%; }
.rp-result-grid th:nth-child(3),.rp-result-grid th:nth-child(4),.rp-result-grid th:nth-child(5) { width:10%; }
.rp-result-grid th:nth-child(6) { width:17%; }.rp-result-grid th:nth-child(7) { width:12%; }.rp-result-grid th:nth-child(8) { width:6%; }
.rp-result-grid .rp-actions { min-width:0; }
@media(max-width:1250px){.rp-heading{grid-template-columns:minmax(160px,1fr) auto}.rp-heading .rp-stats{grid-column:1/-1;grid-row:2}.rp-heading>.rp-actions{grid-column:2;grid-row:1}}
@media(max-width:650px){.rp-heading{grid-template-columns:1fr}.rp-heading>.rp-actions{grid-column:1;grid-row:3;justify-content:flex-start}.rp-heading .rp-stats{grid-template-columns:repeat(2,minmax(100px,1fr))}.rp-batch-line select{max-width:calc(100vw - 140px);min-width:150px}.rp-batch-summary{padding:10px}.rp-batch-counts{display:block}.rp-batch-counts>span{display:block}}

/* The module owns the remaining viewport; only its display area scrolls. */
#railwayPriceMonitor { overflow:hidden; }
#railwayPriceMonitor.view.active { padding-bottom:8px; }
#railwayPriceMonitorRoot { display:flex; flex-direction:column; min-height:0; min-width:0; overflow:hidden; padding-bottom:0; box-sizing:border-box; height:calc(100dvh - 30px); }
#railwayPriceMonitorRoot>.rp-heading,#railwayPriceMonitorRoot>.rp-tabs,#railwayPriceMonitorRoot>.rp-notice { flex:0 0 auto; }
#railwayPriceMonitorRoot>.rp-batch-summary { flex:0 0 auto; max-height:26vh; overflow:auto; }
#railwayPriceMonitorRoot>.rp-panel { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; overflow:hidden; padding:12px 14px 0; }
#railwayPriceMonitorRoot .rp-toolbar { flex:0 0 auto; margin-bottom:10px; }
#railwayPriceMonitorRoot .rp-display-area { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; min-width:0; overflow:hidden; }
#railwayPriceMonitorRoot .rp-display-area>.rp-result-grid,#railwayPriceMonitorRoot .rp-display-area>.rp-standard-grid,#railwayPriceMonitorRoot .rp-display-area>.rp-summary-grid { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; min-width:0; }
#railwayPriceMonitorRoot .rp-display-area .rp-table-wrap { flex:1 1 auto; min-height:0; overscroll-behavior:contain; scrollbar-gutter:stable; }
#railwayPriceMonitorRoot .rp-display-area .rp-table { border-collapse:separate; border-spacing:0; }
#railwayPriceMonitorRoot .rp-display-area .rp-table th { position:sticky; top:0; z-index:3; background:#f5f7fa; }
#railwayPriceMonitorRoot .rp-display-area .rp-table td:first-child { position:sticky; left:0; z-index:1; background:#fff; box-shadow:1px 0 0 #e8edf4; }
#railwayPriceMonitorRoot .rp-display-area .rp-table th:first-child { left:0; z-index:4; box-shadow:1px 0 0 #e8edf4; }
#railwayPriceMonitorRoot .rp-display-area>.rp-empty { flex:1 1 auto; display:flex; justify-content:center; align-items:center; min-height:0; padding:24px 16px; overflow:auto; }
#railwayPriceMonitorRoot .rp-panel-settings .rp-display-area { display:block; overflow:auto; padding-bottom:14px; }
#railwayPriceMonitorRoot .rp-panel-settings .rp-table-wrap { max-height:340px; }
#railwayPriceMonitorRoot .rp-pager { flex:0 0 auto; min-height:48px; margin:0; padding:8px 0; box-sizing:border-box; border-top:1px solid #e5eaf2; background:#fff; }
#railwayPriceMonitorRoot .rp-pager label { display:flex; align-items:center; gap:6px; margin-right:auto; }
#railwayPriceMonitorRoot .rp-pager select { border:1px solid #d8e1ed; border-radius:6px; padding:5px 8px; color:#52627a; background:#fff; font:inherit; }
#railwayPriceMonitorRoot .rp-summary-context { flex:0 0 auto; margin:8px 0 4px; padding:8px 13px; border:1px solid var(--rp-line); border-radius:9px; background:#fff; font-size:12px; max-height:25vh; overflow:auto; }
#railwayPriceMonitorRoot .rp-summary-breadcrumb { display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-height:27px; color:#42536c; }
#railwayPriceMonitorRoot .rp-summary-breadcrumb>button { padding:4px 8px; font-size:12px; }
#railwayPriceMonitorRoot .rp-summary-context p { margin:5px 0; }
#railwayPriceMonitorRoot .rp-summary-context .rp-reason-filters { margin:0; min-width:0; }
#railwayPriceMonitorRoot .rp-summary-context .rp-reason-filter { white-space:nowrap; }
#railwayPriceMonitorRoot .rp-summary-link { appearance:none; border:0; border-radius:4px; padding:4px 3px; background:transparent; color:#285fb2; font:inherit; text-align:left; cursor:pointer; box-shadow:none; }
#railwayPriceMonitorRoot .rp-summary-link:hover { background:#edf4ff; text-decoration:underline; }
#railwayPriceMonitorRoot .rp-summary-link:focus-visible { outline:2px solid #416be2; outline-offset:2px; }
#railwayPriceMonitorRoot .rp-summary-link:disabled { color:#7c899d; cursor:default; text-decoration:none; background:transparent; }
#railwayPriceMonitorRoot .rp-summary-alert { color:#b23831; font-weight:650; }
#railwayPriceMonitorRoot .rp-summary-companies .rp-table { min-width:0; table-layout:auto; }
#railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td) { box-sizing:border-box; max-width:none; white-space:nowrap; overflow-wrap:normal; }
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):first-child { width:1%; min-width:0; }
#railwayPriceMonitorRoot .rp-company-heading { display:inline-flex; align-items:center; gap:8px; width:max-content; max-width:min(520px,60vw); }
#railwayPriceMonitorRoot .rp-company-heading .rp-summary-link { min-width:0; height:auto; white-space:normal; overflow-wrap:anywhere; }
#railwayPriceMonitorRoot .rp-company-heading .rp-badge { flex:0 0 auto; }
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):nth-child(2) { position:sticky; left:var(--rp-company-column-width,0px); width:1%; min-width:0; background:#fff; z-index:2; box-shadow:1px 0 #e8edf4; }
#railwayPriceMonitorRoot .rp-summary-companies td:nth-child(2) .rp-summary-link { width:max-content; max-width:min(240px,30vw); height:auto; white-space:normal; overflow-wrap:anywhere; }
#railwayPriceMonitorRoot .rp-summary-companies th:nth-child(2) { background:#f5f7fa; z-index:4; }
#railwayPriceMonitorRoot .rp-summary-companies th:last-child { width:1%; }
#railwayPriceMonitorRoot .rp-company-primary:not(:first-child) td { border-top:1px solid #dde5ef; }
#railwayPriceMonitorRoot .rp-company-child td { background:#f8faff; }
#railwayPriceMonitorRoot .rp-company-child td:nth-child(2) { background:#f8faff; padding-left:19px; }
#railwayPriceMonitorRoot .rp-company-expand { display:block; border:0; background:transparent; color:#526e9d; font:inherit; font-size:11px; padding:4px 3px; margin-top:3px; text-align:left; cursor:pointer; box-shadow:none; }
#railwayPriceMonitorRoot .rp-company-expand:hover { color:#285fb2; text-decoration:underline; }
#railwayPriceMonitorRoot .rp-company-expand:focus-visible { outline:2px solid #416be2; outline-offset:2px; }
#railwayPriceMonitorRoot .rp-company-state td { background:#f8faff; color:#66758a; font-size:12px; }
#railwayPriceMonitorRoot .rp-company-retry { margin-left:10px; padding:4px 8px; font-size:12px; }
#railwayPriceMonitorRoot .rp-group-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#railwayPriceMonitorRoot .rp-summary-brands .rp-table { min-width:1250px; }
#railwayPriceMonitorRoot .rp-summary-brands th:first-child { width:145px; }
#railwayPriceMonitorRoot .rp-summary-brands th:last-child { width:180px; }
#railwayPriceMonitorRoot .rp-summary-missing .rp-table { min-width:750px; }
@media(max-width:650px){#railwayPriceMonitorRoot>.rp-panel{padding:10px 10px 0}#railwayPriceMonitorRoot .rp-summary-context{padding:8px 10px}#railwayPriceMonitorRoot .rp-pager{gap:6px;font-size:11px}#railwayPriceMonitorRoot .rp-pager label{margin-right:0}#railwayPriceMonitorRoot .rp-pager button{padding:6px 8px}#railwayPriceMonitorRoot .rp-summary-breadcrumb{gap:5px}}

/* The same field names remain visible in desktop tables and phone cards. */
#railwayPriceMonitorRoot .rp-summary-filters{min-width:0}
#railwayPriceMonitorRoot .rp-summary-filters select[name=shop_id]{min-width:150px;max-width:310px}
#railwayPriceMonitorRoot .rp-summary-companies .rp-table{min-width:1420px}
#railwayPriceMonitorRoot .rp-summary-brands .rp-table{min-width:1190px}
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):nth-child(2){position:static;left:auto;width:auto;max-width:230px;white-space:normal;overflow-wrap:anywhere;box-shadow:none}
#railwayPriceMonitorRoot .rp-company-repeat{display:block;max-width:190px;color:#6d7b8f;font-size:12px;white-space:normal;overflow-wrap:anywhere}
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):first-child{min-width:210px;max-width:280px;white-space:normal}
#railwayPriceMonitorRoot .rp-company-heading{width:auto;max-width:270px;align-items:flex-start}
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):nth-child(3){min-width:90px}
#railwayPriceMonitorRoot .rp-summary-brands th:first-child{width:210px}
#railwayPriceMonitorRoot .rp-summary-models .rp-table,#railwayPriceMonitorRoot .rp-summary-extra .rp-table{min-width:1040px}
#railwayPriceMonitorRoot .rp-shop-stats .rp-stat{min-width:0}
#railwayPriceMonitorRoot .rp-batch-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
#railwayPriceMonitorRoot .rp-batch-stats .rp-stat{min-width:0;white-space:normal}
#railwayPriceMonitorRoot .rp-batch-stats .rp-stat span{white-space:normal}
#railwayPriceMonitorRoot .rp-gap-stat strong{font-size:16px;line-height:1.55}
#railwayPriceMonitorRoot .rp-gap-stat .rp-summary-link{font-size:16px;font-weight:650}
#railwayPriceMonitorRoot .rp-gap-stat .rp-sub{display:block;font-size:11px;font-weight:400}
#railwayPriceMonitorRoot .rp-gap-missing,#railwayPriceMonitorRoot .rp-gap-missing .rp-summary-link{color:#a8640c;font-weight:650}
#railwayPriceMonitorRoot .rp-gap-extra,#railwayPriceMonitorRoot .rp-gap-extra .rp-summary-link{color:#7744ad;font-weight:650}
#railwayPriceMonitorRoot .rp-gap-equal{color:#247a50;font-weight:650}
#railwayPriceMonitorRoot .rp-gap-pending{color:#708096;font-weight:400}
#railwayPriceMonitorRoot .rp-gap-separator{color:#91a0b4;font-weight:400}
@media(max-width:650px){
 #railwayPriceMonitor{overflow:auto}
 #railwayPriceMonitorRoot{height:auto!important;min-height:calc(100dvh - 24px);overflow:visible}
 #railwayPriceMonitorRoot>.rp-panel{display:block;overflow:visible;padding-bottom:12px}
 #railwayPriceMonitorRoot .rp-display-area,#railwayPriceMonitorRoot .rp-display-area>.rp-responsive-grid{display:block;overflow:visible}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table-wrap{overflow:visible;max-height:none}
 #railwayPriceMonitorRoot .rp-summary-filters>*{min-width:0;max-width:none;box-sizing:border-box;flex:1 1 calc(50% - 8px)}
 #railwayPriceMonitorRoot .rp-summary-filters>button{flex:0 0 auto}
 #railwayPriceMonitorRoot .rp-summary-filters select[name=shop_id]{min-width:0;max-width:100%;flex-basis:100%;width:100%}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table{display:block;min-width:0;width:100%;table-layout:auto}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table tbody{display:block;width:100%}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table tr{display:block;margin:0 0 12px;border:1px solid #e2e9f2;border-radius:9px;overflow:hidden;background:#fff}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table :is(td,td:first-child,td:nth-child(2)){display:grid;grid-template-columns:126px minmax(0,1fr);align-items:start;column-gap:10px;position:static;width:auto;min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;box-shadow:none;padding:10px 11px;border-bottom:1px solid #edf0f5;background:#fff}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table td::before{content:attr(data-label);grid-column:1;grid-row:1 / span 8;color:#65768d;font-size:12px;font-weight:400;line-height:1.6}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table td>*{grid-column:2;min-width:0}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table td:last-child{border-bottom:0}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table td[colspan]{display:block}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table td[colspan]::before{display:none}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-company-heading{max-width:none;display:flex;flex-wrap:wrap}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-company-repeat{max-width:none;font-size:13px;color:#34435a}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-summary-link{height:auto;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table th:first-child{position:static}
 #railwayPriceMonitorRoot .rp-shop-stats .rp-stat{padding:9px 10px;white-space:normal;min-width:0}
 #railwayPriceMonitorRoot .rp-shop-stats .rp-stat span{white-space:normal}
 #railwayPriceMonitorRoot .rp-shop-stats .rp-stat strong{font-size:20px}
 #railwayPriceMonitorRoot .rp-shop-stats .rp-gap-stat strong,#railwayPriceMonitorRoot .rp-gap-stat .rp-summary-link{font-size:14px}
}

/* Explicit customer price grants, independent from monitoring/capture controls. */
.rp-visibility-filters{align-items:flex-end}.rp-visibility-filters>label{display:flex;flex:1 1 160px;min-width:0;max-width:260px;flex-direction:column;gap:5px;font-size:12px;color:#526682}.rp-visibility-filters input,.rp-visibility-filters select{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.rp-visibility-grid{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;overflow:hidden}.rp-visibility-context{flex:0 0 auto;max-height:40%;overflow:auto;padding:0 0 10px}.rp-visibility-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.rp-visibility-actions>strong{margin-right:auto}.rp-visibility-checks{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:8px}.rp-visibility-check{padding:8px 10px;background:#f5f7fb;border-radius:7px;font-size:12px;min-width:0}.rp-visibility-check strong,.rp-visibility-check span{display:block;overflow-wrap:anywhere}.rp-visibility-check span{color:#64748b;margin-top:3px}.rp-visibility-check.is-ok strong{color:#287452}.rp-visibility-check.is-blocked strong{color:#b74b36}.rp-visibility-grid .rp-table{min-width:1100px}.rp-visibility-grid th:nth-child(1){width:230px}.rp-visibility-grid th:nth-child(2){width:135px}.rp-visibility-grid th:nth-child(3){width:165px}.rp-visibility-grid th:nth-child(4){width:195px}.rp-visibility-grid td:last-child{white-space:normal;overflow-wrap:anywhere}
.rp-visibility-dialog .rp-wide{min-width:0}.rp-visibility-brand-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-height:280px;overflow:auto;border:1px solid #e1e8f1;padding:14px;border-radius:8px}.rp-visibility-brand-list .rp-check{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere}.rp-visibility-brand-list input,.rp-visibility-dialog .rp-check input{width:16px;height:16px;flex:none;accent-color:#416be2}.rp-visibility-diff{padding:10px 14px;background:#f5f7fb;border-radius:8px;overflow-wrap:anywhere}.rp-visibility-diff p{margin:5px 0}.rp-visibility-dialog .rp-check{display:flex;align-items:flex-start;gap:8px}
.rp-catalog-sync-dialog .rp-wide{min-width:0}.rp-catalog-sync-dialog select[data-rp-catalog-brand]{height:250px;min-height:0;padding:6px;max-width:100%;font:inherit}.rp-catalog-sync-dialog select[data-rp-catalog-brand] option{padding:9px 10px;white-space:normal;overflow-wrap:anywhere}.rp-catalog-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;color:#64748b;font-size:12px;line-height:1.7}.rp-catalog-status[role=alert]{color:#9b3027}.rp-catalog-status button{font-size:12px}.rp-catalog-sync-dialog input[type=search]{min-width:0}.rp-catalog-sync-dialog .rp-notice{font-size:13px}
@media(max-width:650px){.rp-visibility-filters>label{flex-basis:calc(50% - 8px);max-width:none}.rp-visibility-context{max-height:44%}.rp-visibility-checks{grid-template-columns:repeat(2,minmax(0,1fr))}.rp-visibility-brand-list{grid-template-columns:1fr}.rp-visibility-actions>strong{flex-basis:100%}}

/* Company equals shop: keep brand rows and foreground actionable price results. */
#railwayPriceMonitorRoot .rp-company-stats{grid-template-columns:180px 140px;width:328px;max-width:328px}
#railwayPriceMonitorRoot .rp-company-stats .rp-stat{min-width:0;white-space:normal}
#railwayPriceMonitorRoot .rp-company-stats .rp-stat strong{font-size:22px;white-space:normal}
#railwayPriceMonitorRoot .rp-company-stats .rp-stat strong>span:not(.rp-sub){font-size:inherit}
#railwayPriceMonitorRoot .rp-company-stats .rp-stat .rp-summary-link{font-size:inherit;padding:0 3px}
#railwayPriceMonitorRoot .rp-company-stats .rp-stat .rp-sub{display:block;font-size:12px;font-weight:400}
#railwayPriceMonitorRoot .rp-summary-history,#railwayPriceMonitorRoot .rp-summary-history .rp-summary-link{color:#956012;font-weight:500}
#railwayPriceMonitorRoot .rp-summary-unknown{color:#718096;font-weight:400;font-size:13px}
#railwayPriceMonitorRoot .rp-summary-companies .rp-table{min-width:1120px}
#railwayPriceMonitorRoot .rp-summary-brands .rp-table{min-width:920px}
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):nth-child(2){position:sticky;left:var(--rp-company-column-width,0px);min-width:100px;width:100px;max-width:160px;background:#fff;z-index:2;box-shadow:1px 0 #e8edf4}
#railwayPriceMonitorRoot .rp-summary-companies th:nth-child(2){background:#f5f7fa;z-index:4}
#railwayPriceMonitorRoot .rp-summary-companies .rp-company-child td:nth-child(2){background:#f8faff}
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):nth-child(3){min-width:135px}
#railwayPriceMonitorRoot .rp-summary-companies :is(th,td):last-child{min-width:210px;max-width:245px;white-space:normal}
#railwayPriceMonitorRoot .rp-summary-brands th:first-child{width:130px}
#railwayPriceMonitorRoot .rp-summary-brands th:last-child{width:230px}
#railwayPriceMonitorRoot .rp-summary-models .rp-table,#railwayPriceMonitorRoot .rp-summary-covered .rp-table,#railwayPriceMonitorRoot .rp-summary-extra .rp-table{min-width:850px}
#railwayPriceMonitorRoot .rp-company-brand-count{font-size:12px;color:#6d7d94}
#railwayPriceMonitorRoot .rp-summary-model-context{padding-top:3px}
#railwayPriceMonitorRoot .rp-summary-model-context p{margin:4px 0}
@media(max-width:650px){
 #railwayPriceMonitorRoot .rp-company-stats{max-width:none;width:100%;grid-template-columns:repeat(2,minmax(0,1fr))}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table{min-width:0}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-table :is(td,td:nth-child(2),td:nth-child(3),td:last-child){position:static;left:auto;min-width:0;max-width:none;width:auto;z-index:auto;white-space:normal;box-shadow:none}
 #railwayPriceMonitorRoot .rp-responsive-grid .rp-company-child td:first-child{display:none}
 #railwayPriceMonitorRoot .rp-summary-filters [name=q]{flex-basis:100%}
}

/* Desktop company records stay on one line; full names remain accessible. */
@media(min-width:651px){
 #railwayPriceMonitorRoot :is(.rp-summary-companies,.rp-summary-brands) .rp-table{min-width:1600px;table-layout:auto}
 #railwayPriceMonitorRoot :is(.rp-summary-companies,.rp-summary-brands) .rp-table :is(th,td){white-space:nowrap;overflow-wrap:normal;line-height:20px}
 #railwayPriceMonitorRoot :is(.rp-summary-companies,.rp-summary-brands) .rp-table tbody td{height:56px;box-sizing:border-box;padding:10px 12px}
 #railwayPriceMonitorRoot :is(.rp-summary-companies,.rp-summary-brands) .rp-table td .rp-sub{display:inline-flex;align-items:center;margin:0 0 0 8px;white-space:nowrap;vertical-align:middle}
 #railwayPriceMonitorRoot :is(.rp-summary-companies,.rp-summary-brands) .rp-table .rp-summary-link{height:auto;max-width:none;white-space:nowrap;overflow-wrap:normal;font-size:inherit;line-height:20px;vertical-align:middle}
 #railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td):first-child{width:1%;min-width:320px;max-width:420px}
 #railwayPriceMonitorRoot .rp-company-inline{display:inline-flex;align-items:center;gap:8px;width:max-content;max-width:396px;min-width:0;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-company-inline .rp-company-heading{display:inline-flex;flex:0 1 auto;align-items:center;width:auto;min-width:0;max-width:240px}
 #railwayPriceMonitorRoot .rp-company-inline .rp-company-heading .rp-summary-link{display:block;flex:0 1 auto;min-width:0;max-width:100%;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-company-inline .rp-company-heading .rp-summary-link strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-company-inline .rp-company-heading .rp-badge{flex:0 0 auto}
 #railwayPriceMonitorRoot .rp-company-inline .rp-company-brand-count{flex:0 0 auto;margin:0}
 #railwayPriceMonitorRoot .rp-company-inline .rp-company-expand{display:inline-flex;flex:0 0 auto;align-items:center;gap:8px;margin:0;padding:0;font-size:12px;line-height:20px;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td):nth-child(2){min-width:100px;width:100px;max-width:none}
 #railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td):nth-child(3){min-width:210px}
 #railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td):nth-child(4){min-width:125px}
 #railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td):nth-child(5){min-width:200px}
 #railwayPriceMonitorRoot .rp-summary-companies .rp-table :is(th,td):nth-child(6){min-width:125px}
 #railwayPriceMonitorRoot :is(.rp-summary-companies,.rp-summary-brands) .rp-table :is(th,td):last-child{min-width:480px;width:auto;max-width:none;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-summary-brands .rp-table{min-width:1300px}
 #railwayPriceMonitorRoot .rp-summary-brands .rp-table :is(th,td):nth-child(2){min-width:210px}
 #railwayPriceMonitorRoot .rp-summary-brands .rp-table :is(th,td):nth-child(4){min-width:200px}
}

/* Summary headlines use compact content-sized cards; other tabs keep their metrics. */
@media(min-width:651px){
 #railwayPriceMonitorRoot>.rp-heading-company{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:14px}
 #railwayPriceMonitorRoot .rp-heading-company>.rp-heading-title{flex:0 1 210px;min-width:170px;max-width:210px}
 #railwayPriceMonitorRoot .rp-heading-company>.rp-company-stats{flex:0 0 328px;grid-column:auto;grid-row:auto;justify-self:start}
 #railwayPriceMonitorRoot .rp-heading-company>.rp-actions{margin-left:auto;grid-column:auto;grid-row:auto}
 #railwayPriceMonitorRoot .rp-company-stats .rp-stat{box-sizing:border-box;height:56px;min-height:56px;padding:6px 10px;cursor:default}
 #railwayPriceMonitorRoot .rp-company-stats .rp-stat>span{font-size:12px;line-height:16px;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-company-stats .rp-stat>strong{display:flex;align-items:center;gap:6px;font-size:22px;line-height:24px;white-space:nowrap;margin:0}
 #railwayPriceMonitorRoot .rp-company-stats .rp-stat .rp-summary-link{padding:0;font-size:inherit;line-height:24px;white-space:nowrap}
 #railwayPriceMonitorRoot .rp-company-stats .rp-stat>strong>.rp-sub{display:inline-flex;font-size:12px;line-height:18px;white-space:nowrap;margin:0}
}

/* Supplier-level H5 identity controls; authorization stays in supplier management. */
.railway-h5-branding { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 20px; padding:12px 14px; border:1px solid #dbe5ee; border-radius:10px; background:#fff; min-width:0; }
.railway-h5-branding > div:first-child { display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; min-width:0; }
.railway-h5-branding strong { font-size:14px; color:#263d58; }
.railway-h5-branding [role=status] { font-size:13px; color:#627590; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.railway-h5-branding[data-state=active] [role=status] { color:#167668; }
.railway-h5-branding-actions { display:flex; flex-wrap:wrap; gap:8px; }
.supplier-h5-branding-authorization { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin:10px 0 6px; padding:10px 12px; border-radius:8px; background:#f0f7ff; font-variant-numeric:tabular-nums; }
.supplier-h5-branding-dialog [data-supplier-branding-owner] { margin:0; overflow-wrap:anywhere; font-weight:600; }
.supplier-h5-branding-dialog [data-supplier-branding-deadline] { display:block; margin-bottom:18px; }
.supplier-h5-branding-dialog .rp-form-actions { display:flex; flex-wrap:wrap; gap:10px; }
.supplier-h5-branding-dialog [data-supplier-branding-error] { color:#b42318; overflow-wrap:anywhere; }
.supplier-h5-branding-preview { display:flex; align-items:center; gap:14px; min-width:0; padding:18px; border:1px solid #dceae6; border-radius:12px; background:linear-gradient(110deg,#fbfefd,#e7f3ef); color:#153e3b; }
.supplier-h5-branding-preview > b { display:flex; align-items:center; justify-content:center; flex:0 0 56px; height:56px; border-radius:13px; background:#176c60; color:white; font-size:32px; }
.supplier-h5-branding-preview > div { min-width:0; flex:1; }
.supplier-h5-branding-preview strong { display:block; font-size:20px; line-height:1.4; overflow-wrap:anywhere; }
.supplier-h5-branding-preview small { display:block; margin-top:3px; color:#167568; }
.supplier-h5-branding-preview aside { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; max-width:40%; }
.supplier-h5-branding-preview aside span { font-size:12px; overflow-wrap:anywhere; }
.supplier-h5-branding-preview em { border-radius:20px; background:#dbefe8; padding:5px 10px; font-style:normal; font-size:12px; white-space:nowrap; }
@media(max-width:650px) {
  .railway-h5-branding { padding:10px; }
  .supplier-h5-branding-preview { flex-wrap:wrap; padding:12px; gap:10px; }
  .supplier-h5-branding-preview > b { flex-basis:44px; height:44px; font-size:26px; border-radius:10px; }
  .supplier-h5-branding-preview strong { font-size:17px; }
  .supplier-h5-branding-preview aside { flex:0 0 100%; max-width:100%; }
}

.supplier-h5-branding-dialog [hidden] { display:none !important; }

/* Share scope stays inside authenticated link-management dialogs. */
#railwayH5CatalogModal .railway-h5-scope-preview { margin: 8px 0 10px; padding: 10px 12px; border: 1px solid #dbe6f4; border-radius: 9px; background: #f5f9ff; color: #405875; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
#railwayH5CatalogModal .railway-h5-scope-preview summary { cursor: pointer; font-weight: 600; }
#railwayH5CatalogModal .railway-h5-scope-preview summary > span { color: #4166b0; font-size: 12px; margin-left: 6px; white-space: nowrap; }
#railwayH5CatalogModal .railway-h5-scope-preview ul { list-style: none; padding: 0; margin: 8px 0 0; max-height: 180px; overflow: auto; }
#railwayH5CatalogModal .railway-h5-scope-preview li { display: flex; gap: 12px; justify-content: space-between; padding: 5px 0; border-top: 1px solid #e3ebf5; }
#railwayH5CatalogModal .railway-h5-scope-preview li > span { min-width: 0; }
#railwayH5CatalogModal .railway-h5-scope-preview li > strong { flex-shrink: 0; font-weight: 500; }
#railwayH5CatalogModal .railway-h5-scope-preview small { display: block; margin-top: 4px; }

#railwayH5CatalogModal .railway-h5-scope-field { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid #dbe6f4; border-radius: 10px; }
#railwayH5CatalogModal .railway-h5-scope-field label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 16px 4px 0; }
#railwayH5CatalogModal .railway-h5-scope-field input { width: auto; accent-color: #4159df; }
#railwayH5CatalogModal .railway-h5-scope-field legend { padding: 0 4px; font-size: 13px; color: #526985; }


/* Supplier payment management workspace. Kept in a standalone sheet so the
 * finance pages can be rolled back without touching the customer funds UI. */
.supplier-payments-view {
  --sp-blue: #315fd8;
  --sp-blue-soft: #eef4ff;
  --sp-text: #24324a;
  --sp-muted: #70809d;
  --sp-border: #d8e2f1;
  --sp-panel: #fff;
  min-height: calc(100vh - 28px);
  padding-bottom: 28px;
}

.supplier-payments-topbar {
  align-items: flex-start;
  gap: 18px;
}

.supplier-payments-topbar h1 { margin-bottom: 6px; }
.supplier-payments-topbar p { margin: 0; color: var(--sp-muted); }

.supplier-payments-top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.supplier-payments-cutoff {
  color: #61728f;
  font-size: 12px;
  background: #f5f8fd;
  border: 1px solid var(--sp-border);
  border-radius: 999px;
  padding: 8px 12px;
}

.supplier-payments-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

.supplier-payment-metric {
  min-height: 108px;
  text-align: left;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: var(--sp-panel);
  padding: 15px 17px;
  color: var(--sp-text);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.supplier-payment-metric:hover,
.supplier-payment-metric.is-active {
  border-color: #9eb8f5;
  box-shadow: 0 8px 22px rgba(49, 95, 216, .11);
  transform: translateY(-1px);
}

.supplier-payment-metric small,
.supplier-payment-metric span { display: block; color: var(--sp-muted); }
.supplier-payment-metric small { font-size: 13px; font-weight: 700; }
.supplier-payment-metric strong { display: block; margin: 9px 0 5px; font-size: 23px; line-height: 1; letter-spacing: .01em; }
.supplier-payment-metric span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.supplier-payment-metric.metric-pending strong { color: #9c5a05; }
.supplier-payment-metric.metric-paid strong { color: #16835d; }
.supplier-payment-metric.metric-confirm strong { color: #c27318; }
.supplier-payment-metric.metric-review strong { color: var(--sp-blue); }
.supplier-payment-metric.metric-blocked strong { color: #bd4b4b; }

.supplier-payments-filter-panel,
.supplier-payments-list-panel {
  border: 1px solid var(--sp-border);
  background: var(--sp-panel);
  border-radius: 14px;
  padding: 14px 16px;
}

.supplier-payments-filter-panel { margin-bottom: 14px; }
.supplier-payments-filter-grid { display: grid; grid-template-columns: 130px 20px 130px 1.15fr 1fr 1fr 1fr 1fr minmax(210px, 1.5fr) auto auto; gap: 9px; align-items: end; }
.supplier-payments-filter-grid label { display: flex; flex-direction: column; gap: 5px; color: #687997; font-size: 12px; font-weight: 700; min-width: 0; }
.supplier-payments-filter-grid input,
.supplier-payments-filter-grid select { width: 100%; min-width: 0; height: 38px; border: 1px solid var(--sp-border); border-radius: 9px; background: #fbfcff; padding: 0 10px; color: var(--sp-text); font: inherit; }
.supplier-payments-filter-grid input:focus,
.supplier-payments-filter-grid select:focus { outline: 2px solid rgba(49,95,216,.18); border-color: #8eabed; }
.supplier-payments-filter-separator { color: #8492a9; text-align: center; padding-bottom: 10px; font-size: 12px; }
.supplier-payments-filter-hint { margin-top: 10px; color: #7b8aa5; font-size: 12px; }
.supplier-payments-filter-hint.is-warning { color: #a96719; }
.supplier-payment-rebuild-preview { margin-bottom: 14px; border-color: #c9d9f6; background: #f8fbff; }
.supplier-payment-rebuild-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.supplier-payment-rebuild-preview-head > div { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.supplier-payment-rebuild-preview-head strong { color: #24477f; font-size: 15px; }
.supplier-payment-rebuild-preview-head span { color: #71819b; font-size: 12px; }
.supplier-payment-rebuild-preview-hint { margin: 8px 0 10px; color: #71819b; font-size: 12px; line-height: 1.6; }
.supplier-payment-rebuild-preview-list { max-height: 310px; overflow: auto; border: 1px solid #dfe7f3; border-radius: 9px; background: #fff; }
.supplier-payment-preview-item { display: grid; grid-template-columns: 28px minmax(0, 1.8fr) minmax(150px, 1fr) 100px; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #edf1f7; color: #394c68; font-size: 12px; cursor: pointer; }
.supplier-payment-preview-item:last-child { border-bottom: 0; }
.supplier-payment-preview-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-payment-preview-item > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.supplier-payment-preview-item small { overflow: hidden; color: #8190a7; text-overflow: ellipsis; white-space: nowrap; }
.supplier-payment-preview-item > strong:last-child { color: #24477f; text-align: right; }
.supplier-payment-preview-item.is-excluded { background: #fffaf5; color: #9a7b58; cursor: not-allowed; }
.supplier-payment-preview-state { display: inline-block; margin-right: 4px; font-style: normal; font-weight: 800; }
.supplier-payment-preview-state.is-new { color: #2a6edb; }
.supplier-payment-preview-state.is-generated { color: #8a6a2b; }
.supplier-payment-preview-state.is-blocked { color: #b74747; }
.supplier-payment-preview-item.is-excluded input { cursor: not-allowed; }
.supplier-payment-rebuild-preview-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; color: #71819b; font-size: 12px; }
#supplierPaymentsDrawer [data-sp-ocr-status] { margin-top: 5px; color: #557397; font-size: 11px; line-height: 1.5; }
#supplierPaymentsDrawer [data-sp-ocr-status].is-warning { color: #9b681d; }
#supplierPaymentsDrawer [data-sp-ocr-status].is-danger { color: #b74747; }
#supplierPaymentsDrawer [data-sp-ocr-status].is-ok { color: #1b805c; }
.supplier-payment-history-assignment { margin-bottom: 14px; border-color: #c9d9f6; background: #f7faff; }
.supplier-payment-history-assignment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.supplier-payment-history-assignment-head strong { color: #24477f; font-size: 15px; }
.supplier-payment-history-assignment-head p { margin: 5px 0 0; color: #71819b; font-size: 12px; line-height: 1.6; }
.supplier-payment-history-assignment-summary { margin-top: 12px; padding: 10px 12px; border: 1px solid #e0e8f5; border-radius: 9px; background: #fff; color: #435572; font-size: 13px; line-height: 1.7; }
.supplier-payment-history-assignment-summary strong { color: #1d4ed8; }
.supplier-payment-history-assignment-actions { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.supplier-payment-history-assignment-actions label { display: flex; flex-direction: column; gap: 5px; min-width: 250px; color: #687997; font-size: 12px; font-weight: 700; }
.supplier-payment-history-assignment-actions select { height: 38px; border: 1px solid var(--sp-border); border-radius: 9px; background: #fff; padding: 0 10px; color: var(--sp-text); font: inherit; }
.supplier-payment-history-assignment-warnings { margin-top: 10px; padding: 9px 12px; border-radius: 8px; background: #fff7e8; color: #98631a; font-size: 12px; line-height: 1.6; }
.supplier-payment-role-defaults { margin-top: 18px; padding-top: 16px; border-top: 1px solid #e3eaf4; }
.supplier-payment-role-defaults p { margin: 5px 0 12px; color: #71819b; font-size: 12px; line-height: 1.6; }
.supplier-payment-role-defaults-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.supplier-payment-role-defaults-grid label { display: flex; flex-direction: column; gap: 5px; color: #687997; font-size: 12px; font-weight: 700; }
.supplier-payment-role-defaults-grid select { height: 36px; border: 1px solid var(--sp-border); border-radius: 8px; background: #fff; padding: 0 9px; color: var(--sp-text); font: inherit; }
.supplier-payment-role-defaults-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; color: #71819b; font-size: 12px; }
@media (max-width: 900px) { .supplier-payment-role-defaults-grid { grid-template-columns: 1fr; } .supplier-payment-role-defaults-actions { align-items: flex-start; flex-direction: column; } }
@media (max-width: 650px) {
  .supplier-payment-preview-item { grid-template-columns: 26px minmax(0, 1fr) 86px; }
  .supplier-payment-preview-item > strong:last-child { grid-column: 2 / -1; text-align: left; }
  .supplier-payment-rebuild-preview-head > div { align-items: flex-start; flex-direction: column; gap: 3px; }
}

.supplier-payments-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.supplier-payments-list-head > div:first-child { display: flex; align-items: baseline; gap: 12px; }
.supplier-payments-list-head strong { color: var(--sp-text); font-size: 16px; }
.supplier-payments-list-head span { color: var(--sp-muted); font-size: 12px; }
.supplier-payments-list-tools { display: flex; align-items: center; gap: 12px; }
.supplier-payments-list-tools label { display: inline-flex; align-items: center; gap: 6px; color: var(--sp-muted); font-size: 12px; white-space: nowrap; }
.supplier-payments-list-tools select { border: 1px solid var(--sp-border); border-radius: 8px; background: #fbfcff; color: var(--sp-text); padding: 7px 8px; }
#supplierPaymentsLoadStatus { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.supplier-payments-table-wrap { overflow-x: auto; border: 1px solid #e1e8f3; border-radius: 10px; }
.supplier-payments-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.supplier-payments-table th,
.supplier-payments-table td { padding: 12px 11px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: middle; color: var(--sp-text); font-size: 13px; }
.supplier-payments-table th { background: #f5f8fd; color: #657491; font-size: 12px; font-weight: 800; white-space: nowrap; }
.supplier-payments-table tbody tr:last-child > td { border-bottom: 0; }
.supplier-payments-table tbody tr.supplier-payment-row:hover > td { background: #fafcff; }
.supplier-payments-table .sp-expand-col { width: 54px; text-align: center; }
.supplier-payments-table th:nth-child(2) { width: 18%; }
.supplier-payments-table th:nth-child(3) { width: 13%; }
.supplier-payments-table th:nth-child(4) { width: 8%; }
.supplier-payments-table th:nth-child(5) { width: 13%; }
.supplier-payments-table th:nth-child(6) { width: 15%; }
.supplier-payments-table th:nth-child(7) { width: 12%; }
.supplier-payments-table th:nth-child(8) { width: 13%; }
.supplier-payments-table th:nth-child(9) { width: 15%; }
.supplier-payment-supplier { display: block; min-width: 0; }
.supplier-payment-supplier strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-payment-amount { font-weight: 800; color: #1e407b !important; white-space: nowrap; }
.supplier-payment-expand { width: 28px; height: 28px; border: 1px solid #cfdbef; border-radius: 7px; background: #fff; color: var(--sp-blue); cursor: pointer; font-size: 14px; line-height: 1; }
.supplier-payment-expand[aria-expanded="true"] { background: var(--sp-blue-soft); border-color: #9eb8f5; }
.supplier-payment-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.supplier-payment-status.status-data-blocked,
.supplier-payment-status.status-rejected { color: #a53f3f; background: #fff0f0; }
.supplier-payment-status.status-operator-confirm { color: #9c5a05; background: #fff4dc; }
.supplier-payment-status.status-admin-review { color: #315aa9; background: #edf3ff; }
.supplier-payment-status.status-pending-pay { color: #6551a3; background: #f1edff; }
.supplier-payment-status.status-completed { color: #18744f; background: #e7f8ef; }
.supplier-payment-status.status-unknown { color: #66758e; background: #f1f4f8; }
.supplier-payment-handler { color: #475876; }
.supplier-payment-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.supplier-payment-actions button { font-size: 12px; padding: 6px 9px; min-height: 30px; }
.supplier-payment-actions button[data-sp-action="reject"],
.supplier-payment-actions button[data-sp-action="admin-reject"] { color: #b24545; border-color: #efc7c7; background: #fff8f8; }
.supplier-payment-detail-row > td { padding: 0; background: #fbfcff; }
.supplier-payment-inline-detail { padding: 13px 16px 15px 54px; border-top: 1px dashed #dce5f2; }
.supplier-payment-inline-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.supplier-payment-inline-detail-head strong { color: #385276; font-size: 12px; }
.supplier-payment-inline-detail-head span { color: #7988a0; font-size: 12px; }
.supplier-payment-items-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.supplier-payment-items-table th,
.supplier-payment-items-table td { border: 1px solid #e3eaf4; padding: 8px 9px; font-size: 12px; }
.supplier-payment-items-table th { background: #f3f6fb; color: #687997; font-weight: 700; }
.supplier-payment-items-table td { background: #fff; }
.supplier-payment-source-note { display: block; margin-top: 3px; color: #7187a8; font-size: 10px; }
.supplier-payment-items-table .supplier-payment-issue { color: #a15b00; max-width: 220px; white-space: normal; }
.supplier-payment-history-amount { display: block; margin-top: 4px; color: #6b7890; font-size: 12px; }
.supplier-payment-items-scroll { overflow-x: auto; }
.supplier-payment-item-confirmed { color: #197650; font-weight: 700; }
.supplier-payment-item-pending { color: #aa6a1e; font-weight: 700; }
.supplier-payment-item-rejected { color: #b24545; font-weight: 700; }
.supplier-payment-block-message { margin-top: 9px; padding: 8px 10px; border-radius: 8px; color: #9a5d12; background: #fff7e9; font-size: 12px; }

.supplier-payments-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 12px; color: var(--sp-muted); font-size: 12px; }
.supplier-payments-pager button { min-width: 34px; }
.supplier-payments-pager strong { color: var(--sp-text); }
.supplier-payments-total-amount { color: #1e407b; font-size: 14px; margin-right: 8px; }

.supplier-payments-drawer { position: fixed; inset: 0; z-index: 1600; visibility: hidden; pointer-events: none; }
.supplier-payments-drawer.is-open { visibility: visible; pointer-events: auto; }
.supplier-payments-drawer-mask { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; opacity: 1; transition: none; cursor: default; }
.supplier-payments-drawer > section { position: absolute; top: 7vh; right: 24px; width: min(760px, calc(100vw - 48px)); height: min(86vh, 900px); min-width: 440px; min-height: 420px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); display: flex; flex-direction: column; overflow: hidden; resize: both; background: #fff; box-shadow: 0 18px 48px rgba(35, 59, 103, .24); transform: none; transition: box-shadow .18s ease; }
.supplier-payments-drawer.is-open .supplier-payments-drawer-mask { opacity: 1; }
.supplier-payments-drawer.is-open > section { transform: none; }
.supplier-payments-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 15px; border-bottom: 1px solid #e5ebf4; cursor: move; user-select: none; touch-action: none; }
.supplier-payments-drawer-head small { display: block; color: #7c8ba3; font-size: 12px; }
.supplier-payments-drawer-head h2 { margin: 5px 0 0; color: #253b61; font-size: 20px; }
.supplier-payments-drawer-drag-hint { display: block; margin-top: 5px; color: #8b9ab2; font-size: 11px; font-weight: 500; }
.supplier-payments-drawer-head button { cursor: pointer; }
.supplier-payments-drawer-body { flex: 1; overflow: auto; padding: 18px 22px; }
.supplier-payments-drawer-footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 13px 22px; border-top: 1px solid #e5ebf4; background: #fbfcff; }
.supplier-payment-detail-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.supplier-payment-detail-summary div { padding: 10px 11px; border: 1px solid #e3eaf4; border-radius: 9px; background: #f8faff; }
.supplier-payment-detail-summary small { display: block; color: #7c8ba3; font-size: 11px; }
.supplier-payment-detail-summary strong { display: block; margin-top: 5px; color: #293f63; font-size: 15px; }
.supplier-payment-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.supplier-payment-flow-step { position: relative; padding: 10px 11px; border: 1px solid #dfe7f3; border-radius: 9px; background: #fff; }
.supplier-payment-flow-step::after { content: ""; position: absolute; top: 20px; right: -8px; width: 8px; border-top: 1px dashed #b9c8df; }
.supplier-payment-flow-step:last-child::after { display: none; }
.supplier-payment-flow-step b { display: block; color: #73839d; font-size: 11px; }
.supplier-payment-flow-step strong { display: block; margin-top: 4px; color: #2c4369; font-size: 13px; }
.supplier-payment-flow-step span { display: block; margin-top: 4px; color: #7c8ba3; font-size: 11px; line-height: 1.4; }
.supplier-payment-flow-step.is-done { border-color: #b9e6d0; background: #f2fbf6; }
.supplier-payment-flow-step.is-done strong { color: #197650; }
.supplier-payment-flow-step.is-current { border-color: #a8bdf2; background: #f3f6ff; }
.supplier-payment-flow-step.is-current strong { color: var(--sp-blue); }
.supplier-payment-history { margin-top: 17px; border-top: 1px solid #e6edf6; padding-top: 13px; }
.supplier-payment-history h3 { margin: 0 0 9px; color: #3d5376; font-size: 13px; }
.supplier-payment-history-item { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e5ebf4; font-size: 12px; }
.supplier-payment-history-item time { color: #7d8ca4; }
.supplier-payment-history-item strong { color: #405776; }
.supplier-payment-history-item p { margin: 3px 0 0; color: #7b8aa4; line-height: 1.5; }
.supplier-payment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 14px; border: 1px solid #dbe5f3; border-radius: 10px; background: #f7faff; }
.supplier-payment-form label { display: flex; flex-direction: column; gap: 5px; color: #657592; font-size: 12px; font-weight: 700; }
.supplier-payment-form label.is-wide { grid-column: 1 / -1; }
.supplier-payment-form input,
.supplier-payment-form select,
.supplier-payment-form textarea { width: 100%; border: 1px solid #cfdced; border-radius: 8px; background: #fff; padding: 9px 10px; color: var(--sp-text); font: inherit; box-sizing: border-box; }
.supplier-payment-form textarea { min-height: 70px; resize: vertical; }
.supplier-payment-form input:focus,
.supplier-payment-form select:focus,
.supplier-payment-form textarea:focus { outline: 2px solid rgba(49,95,216,.16); border-color: #8eabed; }
.supplier-payment-rejection { padding: 12px 13px; border-radius: 9px; background: #fff5f5; border: 1px solid #f0d1d1; color: #a34848; font-size: 12px; line-height: 1.55; }
.supplier-payment-repair { margin-top: 16px; padding: 13px 14px; border: 1px solid #f0d5a7; border-radius: 10px; background: #fffaf0; }
.supplier-payment-repair h3 { margin: 0 0 6px; color: #8b5b18; font-size: 13px; }
.supplier-payment-repair p { margin: 0 0 11px; color: #8a6b3d; font-size: 12px; line-height: 1.55; }
.supplier-payment-repair form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.supplier-payment-repair label { display: flex; flex-direction: column; gap: 5px; color: #6f5d3c; font-size: 12px; }
.supplier-payment-repair label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-payment-repair select { min-width: 0; border: 1px solid #e4c98f; border-radius: 8px; background: #fff; padding: 8px 9px; color: var(--sp-text); font: inherit; }
.supplier-payment-repair button { grid-column: 1 / -1; justify-self: start; }
.supplier-payment-empty-detail { padding: 36px 0; text-align: center; color: #8493aa; }

@media (max-width: 1320px) {
  .supplier-payments-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .supplier-payments-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .supplier-payments-filter-separator { display: none; }
  .supplier-payments-filter-grid > label:nth-child(1),
  .supplier-payments-filter-grid > label:nth-child(3) { grid-column: span 1; }
  .supplier-payments-filter-grid > input { grid-column: span 2; }
}

@media (max-width: 820px) {
  .supplier-payments-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-payments-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-payments-filter-grid > input,
  .supplier-payments-filter-grid > button { grid-column: span 2; }
  .supplier-payments-list-head { align-items: flex-start; flex-direction: column; }
  .supplier-payments-list-tools { width: 100%; justify-content: space-between; }
  .supplier-payment-detail-summary { grid-template-columns: 1fr 1fr; }
  .supplier-payment-flow { grid-template-columns: 1fr; }
  .supplier-payment-flow-step::after { display: none; }
}

@media (max-width: 540px) {
  .supplier-payments-metrics { grid-template-columns: 1fr; }
  .supplier-payments-filter-grid { grid-template-columns: 1fr; }
  .supplier-payments-filter-grid > input,
  .supplier-payments-filter-grid > button { grid-column: auto; }
  .supplier-payment-detail-summary { grid-template-columns: 1fr; }
  .supplier-payment-form { grid-template-columns: 1fr; }
  .supplier-payment-form label.is-wide { grid-column: auto; }
  .supplier-payment-repair form { grid-template-columns: 1fr; }
  .supplier-payment-repair button { grid-column: auto; }
  .supplier-payments-drawer > section { top: 12px; right: 10px; width: calc(100vw - 20px); height: calc(100vh - 24px); min-width: 0; min-height: 360px; }
  .supplier-payments-drawer-drag-hint { display: none; }
}

/* r421: scoped compact workspace. Keep legacy page sheets immutable; this
   last-loaded sheet owns the new layout without changing other finance views. */
body.supplier-payments-workspace-active { overflow: hidden !important; }
body.supplier-payments-workspace-active .main { overflow: hidden; }
#supplierPayments.active { display: flex; flex-direction: column; gap: 8px; height: var(--sp-workspace-height, calc(100dvh - 32px)); min-height: 0; padding-bottom: 0; overflow: hidden; }
#supplierPayments .supplier-payments-topbar { flex: none; padding: 10px 14px; margin: 0; align-items: center; gap: 8px; }
#supplierPayments .supplier-payments-topbar h1 { font-size: 20px; margin: 0 0 3px; }
#supplierPayments .supplier-payments-topbar p { font-size: 11px; line-height: 1.4; }
#supplierPayments .supplier-payments-top-actions { gap: 6px; }
#supplierPayments .supplier-payments-top-actions button { min-height: 30px; padding: 6px 10px; font-size: 12px; }
#supplierPayments .supplier-payments-cutoff { padding: 6px 9px; font-size: 11px; }
#supplierPayments .supplier-payments-filter-panel { flex: none; margin: 0; padding: 9px 12px 7px; }
#supplierPayments .supplier-payments-metrics { display: flex; gap: 0; margin: 0 0 8px; border-bottom: 1px solid #e4ebf5; padding-bottom: 7px; }
#supplierPayments .supplier-payment-metric { display: flex; flex: 1; justify-content: center; align-items: baseline; gap: 7px; min-height: 32px; padding: 5px 8px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; transform: none; }
#supplierPayments .supplier-payment-metric + .supplier-payment-metric { border-left: 1px solid #e5ebf5; }
#supplierPayments .supplier-payment-metric.is-active, #supplierPayments .supplier-payment-metric:hover { background: #eef4ff; }
#supplierPayments .supplier-payment-metric small, #supplierPayments .supplier-payment-metric span, #supplierPayments .supplier-payment-metric strong { display: inline; margin: 0; white-space: nowrap; }
#supplierPayments .supplier-payment-metric small { font-size: 12px; }
#supplierPayments .supplier-payment-metric strong { font-size: 19px; }
#supplierPayments .supplier-payment-metric span { font-size: 11px; }
#supplierPayments .supplier-payments-filter-grid { grid-template-columns: 125px 125px minmax(150px,1fr) minmax(145px,.8fr) minmax(210px,1.35fr) auto auto auto; gap: 7px; }
#supplierPayments .supplier-payments-filter-separator { display: none; }
#supplierPayments .supplier-payments-filter-grid label { gap: 3px; font-size: 11px; white-space: nowrap; }
#supplierPayments .supplier-payments-filter-grid .supplier-payment-date-field { min-width: 118px; }
#supplierPaymentsStart, #supplierPaymentsEnd { min-width: 118px !important; box-sizing: border-box; }
#supplierPayments .supplier-payments-filter-grid input, #supplierPayments .supplier-payments-filter-grid select { height: 32px; padding: 0 7px; font-size: 12px; }
#supplierPayments .supplier-payments-filter-grid > input { grid-column: auto; }
#supplierPayments .supplier-payments-filter-grid button { min-height: 32px; padding: 5px 10px; font-size: 12px; }
#supplierPayments .supplier-payments-advanced-filters { position: relative; align-self: end; min-width: 96px; }
#supplierPayments .supplier-payments-advanced-filters summary { display: flex; align-items: center; justify-content: center; height: 32px; box-sizing: border-box; border: 1px solid #d8e2f1; border-radius: 8px; background: #fff; color: #435b7c; font-size: 12px; font-weight: 700; cursor: pointer; list-style: none; white-space: nowrap; }
#supplierPayments .supplier-payments-advanced-filters summary::-webkit-details-marker { display: none; }
#supplierPayments .supplier-payments-advanced-filters summary::after { content: "\25BE"; margin-left: 6px; color: #7183a0; }
#supplierPayments .supplier-payments-advanced-filters[open] summary { border-color: #8eabed; background: #eef4ff; color: #2755a6; }
#supplierPayments .supplier-payments-advanced-filters > div { position: absolute; z-index: 9; top: calc(100% + 6px); right: 0; display: grid; grid-template-columns: repeat(3,minmax(150px,1fr)); gap: 8px; width: min(520px,calc(100vw - 32px)); padding: 10px; border: 1px solid #ccd9ed; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(25,49,88,.16); }
#supplierPayments .supplier-payments-filter-hint { margin-top: 5px; font-size: 11px; }
#supplierPayments .supplier-payment-history-assignment { flex: none; max-height: 240px; overflow: auto; margin: 0; padding: 9px 12px; }
#supplierPayments .supplier-payment-history-assignment[hidden] { display: none; }
#supplierPayments .supplier-payment-history-assignment-summary { margin-top: 6px; padding: 5px 8px; }
#supplierPayments .supplier-payment-history-assignment-actions { margin-top: 6px; }
#supplierPayments .supplier-payments-list-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 8px 10px 0; margin: 0; overflow: hidden; }
#supplierPayments .supplier-payments-list-head { flex: none; margin: 0 0 7px; }
#supplierPayments .supplier-payments-list-head strong { font-size: 13px; }
#supplierPayments .supplier-payments-list-tools { gap: 8px; }
#supplierPayments .supplier-payments-list-tools select { padding: 4px 6px; }
#supplierPayments .supplier-payments-table-wrap { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
/* Keep native table layout and scope every main-table selector to direct
   children: expanded order details have their own independent nine columns. */
#supplierPayments .supplier-payments-table { display: table; width: 100%; max-width: none; min-width: 1200px; margin: 0 auto; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-expand { width: 44px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-supplier { width: 260px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-date { width: 110px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-count { width: 64px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-amount { width: 124px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-state { width: 170px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-time { width: 190px; }
#supplierPayments .supplier-payments-table > colgroup > .sp-col-actions { width: 238px; }
#supplierPayments .supplier-payments-table > thead > tr > th, #supplierPayments .supplier-payments-table > tbody > tr > td { width: auto; min-width: 0; padding: 7px 8px; height: 52px; box-sizing: border-box; line-height: 1.3; font-size: 12px; }
/* Seven content columns retain their readable baseline, then share extra
   container width evenly. cqw resolves to lengths before native table layout;
   mixed percentage/px col widths otherwise redistribute unpredictably.
   Half of each extra width becomes padding on each side, giving comparable
   inter-column whitespace even between right-aligned money and left text.
   Only the main header and ordinary batch rows participate, never colspan
   expansion rows or their independent detail table. */
@supports (width: 1cqw) {
  @media (min-width: 901px) {
    #supplierPayments .supplier-payments-table-wrap { container-type: inline-size; }
    #supplierPayments .supplier-payments-table {
      --sp-column-extra: max(0px, calc(14.2857142857cqw - 171.4285714286px));
      --sp-column-half-extra: max(0px, calc(7.1428571429cqw - 85.7142857143px));
    }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-supplier { width: calc(260px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-date { width: calc(110px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-count { width: calc(64px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-amount { width: calc(124px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-state { width: calc(170px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-time { width: calc(190px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > colgroup > .sp-col-actions { width: calc(238px + var(--sp-column-extra)); }
    #supplierPayments .supplier-payments-table > thead > tr > th:not(:first-child),
    #supplierPayments .supplier-payments-table > tbody > .supplier-payment-row > td:not(:first-child) { padding-inline: calc(8px + var(--sp-column-half-extra)); }
  }
}
#supplierPayments .supplier-payments-table > thead { position: sticky; top: 0; z-index: 3; }
#supplierPayments .supplier-payments-table > thead > tr > th { position: static; height: 34px; border-bottom: 1px solid #dfe7f3; }
#supplierPayments .supplier-payments-table > thead > tr > th:nth-child(4), #supplierPayments .supplier-payment-row > td:nth-child(4) { text-align: center; }
#supplierPayments .supplier-payments-table > thead > tr > th:nth-child(5), #supplierPayments .supplier-payment-row > td:nth-child(5) { text-align: right; }
#supplierPayments .supplier-payment-stack { display: flex; min-width: 0; height: 100%; flex-direction: column; justify-content: center; gap: 3px; }
#supplierPayments .supplier-payment-stack > .supplier-payment-status { align-self: flex-start; max-width: 100%; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; }
#supplierPayments .supplier-payment-stack > small { overflow: hidden; color: #74839a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
#supplierPayments .supplier-payment-stack > strong { display: block; }
#supplierPayments .supplier-payment-times span, #supplierPayments .supplier-payment-times small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#supplierPayments .supplier-payments-table > thead > tr > th:last-child, #supplierPayments .supplier-payment-row > td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -3px 0 4px rgba(26,49,87,.04); z-index: 1; }
#supplierPayments .supplier-payments-table > thead > tr > th:last-child { z-index: 3; background: #f5f8fd; }
#supplierPayments .supplier-payment-actions { align-items: center; flex-wrap: nowrap; gap: 4px; height: 100%; white-space: nowrap; }
#supplierPayments .supplier-payment-actions button { flex: 0 0 auto; padding: 4px 7px; min-height: 28px; }
#supplierPayments .supplier-payments-table > tbody > .supplier-payment-detail-row > td { height: auto; padding: 0; }
#supplierPayments .supplier-payment-inline-detail { padding: 8px 12px 10px 44px; }
#supplierPayments .supplier-payment-inline-detail .supplier-payment-items-scroll { max-height: 260px; overflow: auto; overscroll-behavior: contain; }
#supplierPayments .supplier-payment-items-table { display: table; width: 100%; min-width: 1244px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
#supplierPayments .supplier-payment-items-table > thead { display: table-header-group; }
#supplierPayments .supplier-payment-items-table > tbody { display: table-row-group; }
#supplierPayments .supplier-payment-items-table > thead > tr, #supplierPayments .supplier-payment-items-table > tbody > tr { display: table-row; }
#supplierPayments .supplier-payment-items-table > thead > tr > th, #supplierPayments .supplier-payment-items-table > tbody > tr > td { display: table-cell; height: 40px; padding: 6px 8px; box-sizing: border-box; font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
#supplierPayments .supplier-payment-items-table > thead > tr > th { position: sticky; top: 0; z-index: 1; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(1) { width: 140px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(2) { width: 190px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(3) { width: 230px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(4) { width: 56px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(5) { width: 114px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(6) { width: 92px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(7) { width: 150px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(8) { width: 92px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(9) { width: 180px; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(4), #supplierPayments .supplier-payment-items-table > tbody > tr > td:nth-child(4) { text-align: center; }
#supplierPayments .supplier-payment-items-table > thead > tr > th:nth-child(5), #supplierPayments .supplier-payment-items-table > tbody > tr > td:nth-child(5) { text-align: right; }
#supplierPayments .supplier-payments-pager { flex: none; min-height: 42px; padding: 6px 2px; box-sizing: border-box; background: #fff; margin: 0; border-top: 1px solid #e4ebf5; }
#supplierPayments .supplier-payments-pager > span:first-child { margin-right: auto; }

#supplierPaymentsDrawer { pointer-events: none; margin: 0 !important; padding: 0; }
#supplierPaymentsDrawer.is-open { pointer-events: none; }
#supplierPaymentsDrawer .supplier-payments-drawer-mask { display: none; }
#supplierPaymentsDrawer > section { pointer-events: auto; margin: 0; border: 1px solid #cbd9ed; border-radius: 12px; width: 85vw; height: 85vh; min-width: min(440px,calc(100vw - 16px)); min-height: min(360px,calc(100vh - 16px)); max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); container-type: inline-size; container-name: supplier-payment-window; }
#supplierPaymentsDrawer .supplier-payments-drawer-head { padding: 10px 13px; align-items: center; gap: 8px; flex: none; }
#supplierPaymentsDrawer .supplier-payments-drawer-head h2 { font-size: 17px; margin: 3px 0 0; }
#supplierPaymentsDrawer .supplier-payments-drawer-drag-hint { display: inline; margin-left: 8px; font-size: 10px; }
#supplierPaymentsDrawer .supplier-payments-drawer-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; padding: 9px 13px; overflow: hidden; }
#supplierPaymentsDrawer .supplier-payment-detail-summary { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin: 0; padding: 7px 9px; background: #f5f8fe; border: 1px solid #e1e9f5; border-radius: 7px; font-size: 12px; color: #6e7e98; }
#supplierPaymentsDrawer .supplier-payment-detail-summary strong { display: inline; font-size: 13px; margin: 0 0 0 4px; }
#supplierPaymentsDrawer .supplier-payment-order-workspace { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 165px; overflow: hidden; }
#supplierPaymentsDrawer .supplier-payment-inline-detail-head { margin-bottom: 5px; flex: none; }
#supplierPaymentsDrawer .supplier-payment-order-tools { display: flex; gap: 7px; margin-bottom: 6px; flex: none; }
#supplierPaymentsDrawer .supplier-payment-order-tools input, #supplierPaymentsDrawer .supplier-payment-order-tools select { height: 30px; min-width: 0; border: 1px solid #d8e2f1; border-radius: 6px; padding: 0 7px; background: #fbfcff; font-size: 12px; color: #304969; }
#supplierPaymentsDrawer .supplier-payment-order-tools input { flex: 1; }
#supplierPaymentsDrawer [data-sp-detail-items] { flex: 1; display: flex; min-height: 0; overflow: hidden; }
#supplierPaymentsDrawer .supplier-payment-items-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#supplierPaymentsDrawer .supplier-payment-items-table { min-width: 1080px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
#supplierPaymentsDrawer .supplier-payment-items-table th { position: sticky; top: 0; z-index: 1; }
#supplierPaymentsDrawer .supplier-payment-items-table th, #supplierPaymentsDrawer .supplier-payment-items-table td { padding: 6px 7px; font-size: 12px; line-height: 1.4; border-width: 0 1px 1px 0; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(1) { width: 128px; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(2) { width: 175px; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(3) { width: auto; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(4) { width: 48px; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(5) { width: 104px; text-align: right; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(6) { width: 84px; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(7) { width: 150px; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(8) { width: 82px; }
#supplierPaymentsDrawer .supplier-payment-items-table th:nth-child(9) { width: 120px; }
#supplierPaymentsDrawer .supplier-payment-amount { text-align: right; }
#supplierPaymentsDrawer .supplier-payment-order-total { flex: none; padding: 6px 0 0; text-align: right; color: #6a7b96; font-size: 12px; }
#supplierPaymentsDrawer .supplier-payment-order-total strong { margin-left: 8px; color: #20447b; }
#supplierPaymentsDrawer .supplier-payment-history { flex: none; margin: 0; padding: 6px 0 0; }
#supplierPaymentsDrawer .supplier-payment-history h3 { margin: 0 0 5px; font-size: 11px; }
#supplierPaymentsDrawer .supplier-payment-history-rail { display: flex; gap: 7px; overflow: auto; overscroll-behavior: contain; max-height: 90px; padding-bottom: 3px; }
#supplierPaymentsDrawer .supplier-payment-history-item { display: block; flex: none; min-width: 170px; max-width: 380px; margin: 0; padding: 5px 8px; background: #f7f9fd; border: 1px solid #e2e9f3; border-radius: 6px; font-size: 11px; }
#supplierPaymentsDrawer .supplier-payment-history-item summary { cursor: pointer; }
#supplierPaymentsDrawer .supplier-payment-history-item summary strong { font-size: 11px; }
#supplierPaymentsDrawer .supplier-payment-history-item summary time { display: block; margin-top: 2px; font-size: 10px; }
#supplierPaymentsDrawer .supplier-payment-history-item p { word-break: break-word; }
#supplierPaymentsDrawer .supplier-payment-history-amount { font-size: 11px; }
#supplierPaymentsDrawer .supplier-payment-repair { flex: none; max-height: 130px; overflow: auto; padding: 7px 9px; margin: 0; }
#supplierPaymentsDrawer .supplier-payment-rejection { flex: none; padding: 6px 8px; max-height: 70px; overflow: auto; }
#supplierPaymentsDrawer .supplier-payments-drawer-footer { flex: none; padding: 7px 13px; min-height: 44px; }
#supplierPaymentsDrawer .supplier-payments-drawer-footer small { margin-right: auto; font-size: 11px; color: #72829e; }
#supplierPaymentsDrawer .supplier-payments-drawer-footer button { padding: 6px 12px; min-height: 30px; font-size: 12px; }
#supplierPaymentsDrawer .supplier-payment-form { flex: none; gap: 7px 10px; padding: 8px 10px; margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 32%; overflow: auto; }
#supplierPaymentsDrawer .supplier-payment-form label { gap: 3px; font-size: 11px; min-width: 0; }
#supplierPaymentsDrawer .supplier-payment-form .is-wide { grid-column: 1 / -1; }
#supplierPaymentsDrawer .supplier-payment-form input, #supplierPaymentsDrawer .supplier-payment-form select, #supplierPaymentsDrawer .supplier-payment-form textarea { padding: 5px 7px; font-size: 12px; min-height: 30px; }
#supplierPaymentsDrawer .supplier-payment-form textarea { height: 30px; min-height: 30px; }
#supplierPaymentsDrawer .supplier-payment-form textarea:focus { height: 55px; }
#supplierPaymentsDrawer .supplier-payment-form small { font-size: 10px; color: #7786a0; line-height: 1.4; }
#supplierPaymentsDrawer .supplier-payment-receipt-upload { display: grid; grid-template-columns: minmax(0,1fr) 120px; gap: 10px; align-items: start; }
#supplierPaymentsDrawer .supplier-payment-receipt-qr { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#supplierPaymentsDrawer .supplier-payment-receipt-qr button { min-height: 22px; padding: 3px 6px; font-size: 10px; }
#supplierPaymentsDrawer .supplier-payment-receipt-qr a { font-size: 10px; }
#supplierPaymentsDrawer [data-sp-qr-image] { display: flex; align-items: center; justify-content: center; width: 110px; height: 110px; border: 1px solid #d9e3f2; border-radius: 6px; background: #fff; font-size: 11px; color: #7b8ba4; }
#supplierPaymentsDrawer [data-sp-qr-image] img { max-width: 100%; }
#supplierPaymentsDrawer [data-sp-receipt-status] { margin-top: 7px; color: #3d5d8a; font-size: 11px; }
#supplierPaymentsDrawer [data-sp-receipt-preview] { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 5px; }
#supplierPaymentsDrawer [data-sp-receipt-preview] a { font-size: 11px; }
#supplierPaymentsDrawer .supplier-payment-receipt-thumb { width: 70px; max-height: 65px; object-fit: contain; border: 1px solid #e1e8f3; }
@media (max-width: 1500px) {
  #supplierPayments .supplier-payments-filter-grid { grid-template-columns: 125px 125px minmax(150px,1fr) minmax(140px,1fr) minmax(190px,1.4fr) auto auto auto; }
}
@media (max-width: 1050px) {
  #supplierPayments .supplier-payment-metric { gap: 4px; flex-wrap: wrap; padding: 4px; }
  #supplierPayments .supplier-payment-metric small { font-size: 10px; }
  #supplierPayments .supplier-payment-metric strong { font-size: 16px; }
  #supplierPayments .supplier-payments-filter-grid { grid-template-columns: repeat(4,minmax(118px,1fr)); }
  #supplierPayments .supplier-payments-filter-grid > input { grid-column: span 2; }
  #supplierPayments .supplier-payments-filter-separator { display: none; }
  #supplierPayments .supplier-payments-topbar p { display: none; }
}
@media (min-width: 901px) and (max-width: 1280px) {
  #supplierPayments .supplier-payments-filter-grid { grid-template-columns: repeat(4,minmax(118px,1fr)); }
  #supplierPayments .supplier-payments-filter-grid > input { grid-column: auto; }
}
@media (max-width: 900px) {
  #supplierPayments .supplier-payments-table { display: block; min-width: 0; max-width: none; }
  #supplierPayments .supplier-payments-table > colgroup, #supplierPayments .supplier-payments-table > thead { display: none; }
  #supplierPayments .supplier-payments-table > tbody { display: block; width: 100%; padding: 6px; box-sizing: border-box; }
  #supplierPayments .supplier-payment-row { display: grid; grid-template-columns: 38px minmax(0,1fr) minmax(0,1fr); gap: 0 8px; margin-bottom: 8px; padding: 8px; border: 1px solid #dfe7f3; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(31,59,101,.05); }
  #supplierPayments .supplier-payment-row > td { position: static !important; display: block; height: auto; min-height: 36px; padding: 5px 4px; border: 0; box-shadow: none !important; }
  #supplierPayments .supplier-payment-row > td::before { display: block; margin-bottom: 2px; color: #8290a6; content: attr(data-label); font-size: 9px; }
  #supplierPayments .supplier-payment-row > td:nth-child(1) { grid-column: 1; grid-row: 1 / span 5; padding-top: 7px; }
  #supplierPayments .supplier-payment-row > td:nth-child(1)::before, #supplierPayments .supplier-payment-row > td:nth-child(2)::before { display: none; }
  #supplierPayments .supplier-payment-row > td:nth-child(2) { grid-column: 2 / -1; grid-row: 1; }
  #supplierPayments .supplier-payment-row > td:nth-child(3) { grid-column: 2; grid-row: 2; }
  #supplierPayments .supplier-payment-row > td:nth-child(4) { grid-column: 2; grid-row: 3; text-align: left; }
  #supplierPayments .supplier-payment-row > td:nth-child(5) { grid-column: 3; grid-row: 2 / span 2; }
  #supplierPayments .supplier-payment-row > td:nth-child(6) { grid-column: 2 / -1; grid-row: 4; }
  #supplierPayments .supplier-payment-row > td:nth-child(7) { grid-column: 2 / -1; grid-row: 5; }
  #supplierPayments .supplier-payment-row > td:nth-child(8) { grid-column: 1 / -1; grid-row: 6; border-top: 1px solid #edf1f7; }
  #supplierPayments .supplier-payment-actions { justify-content: flex-end; min-height: 36px; overflow-x: auto; }
  #supplierPayments .supplier-payment-detail-row { display: block; margin: -8px 6px 8px; width: calc(100% - 12px); }
  #supplierPayments .supplier-payments-table > tbody > .supplier-payment-detail-row > td { display: block; width: 100%; }
  #supplierPayments .supplier-payment-inline-detail { padding-left: 10px; }
  #supplierPayments .supplier-payments-advanced-filters > div { right: auto; left: 0; grid-template-columns: 1fr; width: min(280px,calc(100vw - 32px)); }
}
@media (max-width: 650px) {
  #supplierPayments .supplier-payments-topbar { align-items: start; }
  #supplierPayments .supplier-payments-top-actions { justify-content: start; }
  #supplierPayments .supplier-payments-metrics { flex-wrap: wrap; }
  #supplierPayments .supplier-payment-metric { flex-basis: 28%; }
  #supplierPayments .supplier-payments-filter-panel { max-height: 36vh; overflow: auto; }
  #supplierPayments .supplier-payments-filter-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
  #supplierPayments .supplier-payments-filter-grid > label { grid-column: span 3; }
  #supplierPayments .supplier-payments-filter-grid > input { grid-column: 1 / -1; }
  #supplierPayments .supplier-payments-filter-grid > .supplier-payments-advanced-filters, #supplierPayments .supplier-payments-filter-grid > button { grid-column: span 2; min-width: 0; }
  #supplierPayments .supplier-payments-list-head { flex-direction: row; align-items: center; }
  #supplierPayments .supplier-payments-list-tools { width: auto; }
  #supplierPaymentsLoadStatus { display: none; }
  #supplierPayments .supplier-payments-pager { flex-wrap: wrap; gap: 5px; font-size: 10px; }
  #supplierPaymentsDrawer .supplier-payments-drawer-drag-hint { display: none; }
  #supplierPaymentsDrawer .supplier-payment-detail-summary { gap: 6px 10px; font-size: 11px; }
  #supplierPaymentsDrawer .supplier-payment-order-tools { flex-wrap: wrap; }
  #supplierPaymentsDrawer .supplier-payment-form { max-height: 30%; }
}

/* Wide payment windows reserve the full middle row for orders. A stacked
   payment form must never shrink a hundred-row viewport down to a scrollbar. */
@container supplier-payment-window (min-width: 800px) {
  #supplierPaymentsDrawer .supplier-payments-drawer-body.is-paying { display: grid; grid-template-columns: minmax(290px,35%) minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; }
  #supplierPaymentsDrawer .is-paying > .supplier-payment-detail-summary { grid-column: 1 / -1; grid-row: 1; }
  #supplierPaymentsDrawer .is-paying > .supplier-payment-form { grid-column: 1; grid-row: 2; max-height: none; min-height: 0; align-content: start; }
  #supplierPaymentsDrawer .is-paying > .supplier-payment-order-workspace { grid-column: 2; grid-row: 2; min-height: 0; }
  #supplierPaymentsDrawer .is-paying > .supplier-payment-history { grid-column: 1 / -1; grid-row: 3; min-width: 0; }
}

#supplierPaymentsDrawer .supplier-payment-archived { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; padding: 6px 8px; font-size: 11px; background: #f1faf6; border: 1px solid #d8eee2; border-radius: 6px; max-height: 120px; overflow: auto; }
#supplierPaymentsDrawer .supplier-payment-archived button { font-size: 11px; min-height: 25px; padding: 3px 7px; }
#supplierPaymentsDrawer [data-sp-archived-preview-host] { display: flex; gap: 8px; align-items: center; }


/* These selectors are activated only after desktop_context verifies the shell. */
html.akd-desktop-shell .akd-desktop-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99980;
  width: 104px;
  min-width: 104px;
  max-width: 104px;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: 14px;
  color: #183153;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .2);
  backdrop-filter: blur(12px);
}

html.akd-desktop-shell .akd-desktop-launcher > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 13px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  user-select: none;
}

html.akd-desktop-shell .akd-desktop-launcher[open] {
  width: min(300px, calc(100vw - 36px));
  min-width: min(300px, calc(100vw - 36px));
  max-width: min(300px, calc(100vw - 36px));
}

html.akd-desktop-shell .akd-desktop-launcher > summary::-webkit-details-marker { display: none; }
html.akd-desktop-shell .akd-desktop-launcher > summary::after { content: "+"; font-size: 18px; }
html.akd-desktop-shell .akd-desktop-launcher[open] > summary::after { content: "−"; }

html.akd-desktop-shell .akd-desktop-launcher-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

html.akd-desktop-shell .akd-desktop-launcher button,
html.akd-desktop-shell .akd-desktop-feature-badge button,
html.akd-desktop-shell .akd-desktop-update button {
  min-width: 0;
  border: 1px solid #cbd8e8;
  border-radius: 9px;
  padding: 8px 10px;
  color: #183153;
  background: #f7faff;
  cursor: pointer;
}

html.akd-desktop-shell .akd-desktop-launcher button:hover,
html.akd-desktop-shell .akd-desktop-feature-badge button:hover,
html.akd-desktop-shell .akd-desktop-update button:hover {
  border-color: #2563eb;
  background: #edf4ff;
}

html.akd-desktop-shell .akd-desktop-launcher button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

html.akd-desktop-main .akd-desktop-update {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99990;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 36px));
  padding: 15px;
  border: 1px solid rgba(37, 99, 235, .32);
  border-radius: 14px;
  color: #183153;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  backdrop-filter: blur(12px);
}

html.akd-desktop-main .akd-desktop-update > strong { font-size: 15px; }
html.akd-desktop-main .akd-desktop-update > p {
  max-height: 6.2em;
  margin: 0;
  overflow: auto;
  color: #526a85;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

html.akd-desktop-main .akd-desktop-update-status {
  min-height: 1.3em;
  color: #53708e;
  font-size: 11px;
}
html.akd-desktop-main .akd-desktop-update-status.is-error { color: #b42318; }
html.akd-desktop-main .akd-desktop-update-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 8px;
}
html.akd-desktop-main .akd-desktop-update button.primary {
  border-color: #2563eb;
  color: #fff;
  background: #2563eb;
}
html.akd-desktop-main .akd-desktop-update button:disabled {
  cursor: wait;
  opacity: .58;
}

html.akd-desktop-feature .akd-desktop-launcher { display: none !important; }
html.akd-desktop-feature .akd-desktop-feature-badge {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 99980;
  display: grid;
  gap: 8px;
  width: min(560px, calc(100vw - 24px));
  padding: 9px;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: 12px;
  color: #29425f;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  font-size: 12px;
}

html.akd-desktop-feature .akd-desktop-feature-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  padding: 0 3px;
}

html.akd-desktop-feature .akd-desktop-feature-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.akd-desktop-feature .akd-desktop-feature-status {
  min-height: 1em;
  color: #53708e;
  font-size: 11px;
  white-space: nowrap;
}

html.akd-desktop-feature .akd-desktop-feature-status.is-error { color: #b42318; }

html.akd-desktop-feature .akd-desktop-feature-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

/* A docked feature window collapses to a narrow edge strip when the pointer
   leaves it.  Hide the underlying portal/workbench while collapsed so the
   strip never leaves a second page visible behind it. */
html.akd-desktop-feature-collapsed .akd-desktop-feature-badge {
  top: 50%;
  right: 0;
  bottom: auto;
  left: auto;
  display: grid;
  width: 42px !important;
  min-width: 42px !important;
  height: 88px;
  min-height: 88px;
  padding: 0;
  transform: translateY(-50%);
  border-radius: 12px 0 0 12px;
  cursor: pointer;
  place-items: center;
}

html.akd-desktop-feature-collapsed[data-akd-dock-side="left"] .akd-desktop-feature-badge {
  right: auto;
  left: 0;
  border-radius: 0 12px 12px 0;
}

html.akd-desktop-feature-collapsed .akd-desktop-feature-heading,
html.akd-desktop-feature-collapsed .akd-desktop-feature-controls {
  display: none !important;
}

html.akd-desktop-feature-collapsed .akd-desktop-feature-badge::after {
  content: "‹";
  color: #2563eb;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
}

html.akd-desktop-feature-collapsed[data-akd-dock-side="left"] .akd-desktop-feature-badge::after {
  content: "›";
}

html.akd-desktop-feature-collapsed body > :not(.akd-desktop-feature-badge) {
  visibility: hidden !important;
  pointer-events: none !important;
}

html.akd-desktop-feature .akd-desktop-feature-controls button {
  min-height: 32px;
  padding: 6px 7px;
  font-size: 12px;
  white-space: nowrap;
}

html.akd-desktop-feature .akd-desktop-feature-controls button[aria-pressed="true"] {
  border-color: #2563eb;
  color: #174dad;
  background: #e6efff;
}

html.akd-desktop-feature .akd-desktop-feature-controls button:disabled {
  cursor: wait;
  opacity: .58;
}

html.akd-desktop-feature body:not(.customer-portal) > .side { display: none !important; }
html.akd-desktop-feature body:not(.customer-portal) > .main {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
}

html.akd-desktop-feature body.customer-portal .customer-portal-tabs-row,
html.akd-desktop-feature body.customer-portal #customerWorkbenchMobileOpen,
html.akd-desktop-feature body.customer-portal #customerWorkbenchBackdrop {
  display: none !important;
}

@media (max-width: 640px) {
  html.akd-desktop-shell .akd-desktop-launcher-actions { grid-template-columns: 1fr; }
  html.akd-desktop-feature .akd-desktop-feature-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  html.akd-desktop-shell .akd-desktop-launcher[open] {
    width: min(280px, calc(100vw - 24px));
    min-width: min(280px, calc(100vw - 24px));
    max-width: min(280px, calc(100vw - 24px));
  }
}


.notification-unread-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d92d20;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

.notification-nav {
  position: relative;
}

.notification-center-view {
  min-width: 0;
}

.notification-center {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 20px;
}

.notification-center-head,
.admin-notification-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notification-center-head h2 {
  margin: 0;
  color: #15324b;
  font-size: 22px;
}

.notification-center-head p {
  margin: 5px 0 0;
  color: #65788a;
  font-size: 13px;
}

.notification-center-actions,
.admin-notification-summary {
  flex: 0 0 auto;
}

.notification-center-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #3c556b;
  font-size: 13px;
}

.notification-center-status {
  min-height: 22px;
  padding: 7px 0 3px;
  color: #66788a;
  font-size: 12px;
}

.notification-list {
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.notification-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #dce5ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(28, 54, 78, .05);
}

.notification-item.is-unread {
  border-color: #a7cce1;
  background: #f7fcff;
}

.notification-item-marker {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: transparent;
}

.notification-item.is-unread .notification-item-marker {
  background: #087f8c;
  box-shadow: 0 0 0 4px rgba(8, 127, 140, .12);
}

.notification-item-body {
  min-width: 0;
}

.notification-item-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.notification-item-heading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #17354e;
  font-size: 14px;
}

.notification-item-heading span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: #1a6370;
  background: #e8f5f7;
  font-size: 11px;
}

.notification-item-body p {
  margin: 7px 0;
  overflow-wrap: anywhere;
  color: #52687b;
  font-size: 13px;
  line-height: 1.55;
}

.notification-item-body time {
  color: #8291a0;
  font-size: 11px;
}

.notification-item-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.notification-empty {
  display: grid;
  min-height: 120px;
  place-items: center;
  border: 1px dashed #cfdbe5;
  border-radius: 12px;
  color: #7a8c9c;
  background: rgba(255, 255, 255, .7);
}

.notification-center-footer {
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

.admin-notification-panel {
  position: fixed;
  z-index: 9000;
  top: 0;
  right: 0;
  display: flex;
  width: min(460px, calc(100vw - 24px));
  height: 100vh;
  height: 100dvh;
  padding: 20px;
  flex-direction: column;
  gap: 8px;
  border-left: 1px solid #d8e2ea;
  background: #f5f8fb;
  box-shadow: -16px 0 42px rgba(23, 48, 70, .2);
  overflow: hidden;
}

.admin-notification-panel[hidden],
.admin-notification-panel.hidden {
  display: none !important;
}

.admin-notification-summary {
  padding: 8px 0 5px;
  color: #415a70;
  font-size: 13px;
}

.admin-notification-panel .notification-list {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-notification-panel .notification-item {
  grid-template-columns: 8px minmax(0, 1fr);
}

.admin-notification-panel .notification-item-actions {
  grid-column: 2;
  justify-content: flex-end;
}

.admin-notification-composer {
  display: grid;
  gap: 8px;
  margin: 4px 0 10px;
  padding: 12px;
  border: 1px solid #cfe0eb;
  border-radius: 10px;
  background: #fff;
}

.admin-notification-panel [hidden] { display: none !important; }
.admin-notification-tabs { display: flex; flex: 0 0 auto; gap: 6px; }
.admin-notification-tabs button { flex: 1; padding: 9px 5px; border: 1px solid #d4e0ea; border-radius: 8px; background: #fff; color: #52687b; }
.admin-notification-tabs button[aria-pressed="true"] { background: #e7f5f8; color: #075e72; border-color: #80bcc8; }
.admin-notification-composer { overflow-y: auto; min-height: 0; }
.admin-notification-history { min-height: 0; flex: 1; overflow-y: auto; }
.notification-history-note { color: #66788a; font-size: 12px; line-height: 1.5; }
.notification-history-item { padding: 12px; border: 1px solid #dce5ed; border-radius: 10px; background: #fff; overflow-wrap: anywhere; }
.notification-history-item p { margin: 7px 0; color: #52687b; font-size: 12px; }
.notification-history-item small { color: #66788a; }
.notification-recipient-picker { display: grid; gap: 8px; min-width: 0; }
.notification-customer-choices { display: grid; gap: 5px; max-height: 210px; overflow-y: auto; border: 1px solid #dce5ed; border-radius: 8px; padding: 7px; }
.admin-notification-composer .notification-customer-choice { display: flex; align-items: flex-start; gap: 8px; padding: 5px; font-weight: 400; overflow-wrap: anywhere; }
.admin-notification-composer .notification-customer-choice input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; }
.notification-customer-choice small { display: block; color: #718296; margin-top: 3px; }
.notification-customer-pager, .notification-batch-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.notification-selected-customers { display: flex; flex-wrap: wrap; gap: 5px; max-height: 145px; overflow-y: auto; }
.notification-selected-customers strong { flex-basis: 100%; font-size: 12px; color: #385670; }
.notification-selected-chip { max-width: 100%; border: 1px solid #c9dfec; border-radius: 14px; padding: 4px 8px; background: #eef7fb; color: #285a72; font-size: 12px; overflow-wrap: anywhere; text-align: left; }
.notification-audience-note, .notification-batch-preview, .notification-batch-detail { padding: 12px; border: 1px solid #b9d5e4; border-radius: 9px; background: #f3f9fc; overflow-wrap: anywhere; }
.notification-audience-note, .notification-batch-preview { font-size: 12px; line-height: 1.65; }
.notification-batch-preview h3, .notification-batch-detail h3 { margin: 0 0 9px; font-size: 15px; }
.notification-batch-preview h4 { margin: 9px 0 5px; font-size: 14px; }
.notification-message-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.notification-history-heading { margin: 15px 0 8px; font-size: 14px; color: #254860; }
.notification-batch-item > button { display: block; margin-top: 9px; }
.notification-batch-detail { margin: 10px 0; }
.admin-notification-history .notification-list { overflow: visible; }
.notification-batch-detail .notification-list { max-height: 380px; overflow-y: auto; }
.admin-notification-panel button:disabled { cursor: not-allowed; opacity: .6; }
.customer-notification-toast .notification-toast-actions { display: flex; justify-content: flex-end; gap: 8px; }

.admin-notification-composer-title {
  color: #17354e;
  font-size: 14px;
  font-weight: 800;
}

.admin-notification-composer label {
  display: grid;
  gap: 4px;
  color: #52687b;
  font-size: 12px;
  font-weight: 700;
}

.admin-notification-composer input,
.admin-notification-composer select,
.admin-notification-composer textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d4e0ea;
  border-radius: 7px;
  color: #17354e;
  background: #fbfdff;
  font: inherit;
  font-size: 12px;
}

.admin-notification-composer textarea {
  min-height: 66px;
  resize: vertical;
}

.admin-notification-composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-notification-composer-actions span {
  min-height: 1.2em;
  color: #60778b;
  font-size: 11px;
}

.customer-notification-toast {
  position: fixed;
  z-index: 99970;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(360px, calc(100vw - 40px));
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid #84cfd0;
  border-radius: 12px;
  color: #123a4b;
  background: rgba(247, 255, 255, .98);
  box-shadow: 0 16px 36px rgba(15, 59, 78, .22);
  animation: customer-notification-toast-in 180ms ease-out;
}

.customer-notification-toast strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-notification-toast span {
  overflow: hidden;
  color: #486878;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-notification-toast button {
  justify-self: end;
}

@keyframes customer-notification-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.notification-item button:focus-visible,
.notification-center-head button:focus-visible,
.admin-notification-summary button:focus-visible {
  outline: 3px solid rgba(22, 127, 151, .3);
  outline-offset: 2px;
}

@media (max-width: 680px) {
  .notification-center {
    padding: 12px;
  }

  .notification-center-head,
  .notification-center-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .notification-center-head {
    gap: 10px;
  }

  .notification-item {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .notification-item-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-notification-panel,
  .notification-item {
    scroll-behavior: auto;
  }
}


.navigation-attention-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}
.navigation-attention-badge[hidden] { display: none !important; }
.navigation-attention-badge.is-bouncing { animation: navigation-attention-bounce 600ms ease-in-out var(--navigation-bounce-count, 3); }
.navigation-attention-status {
  flex: 0 0 auto;
  align-self: stretch;
  min-width: 0;
  margin: 0 8px 6px;
}
.navigation-attention-status[hidden] { display: none !important; }
#customerNavigationAttentionStatus .navigation-attention-retry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  min-height: 28px;
  height: auto;
  padding: 5px 6px;
  border: 1px solid #f1ce86;
  border-radius: 7px;
  background: #fff8e8;
  color: #79520a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  box-sizing: border-box;
}
#customerNavigationAttentionStatus .navigation-attention-retry:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
#customerNavigationAttentionStatus .navigation-attention-retry:disabled { cursor: wait; }
.navigation-attention-status-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 12px;
  text-align: center;
}
@media (min-width: 761px) {
  #customer.workbench-collapsed .navigation-attention-status-label { display: none; }
}
@keyframes navigation-attention-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .navigation-attention-badge.is-bouncing { animation: none; }
}


.login-brandbar.desktop-download-brandbar,
.customer-login-brandbar.desktop-download-brandbar { z-index: 5; }
.desktop-login-actions { display: flex; align-items: center; gap: 20px; }
.desktop-login-actions .login-online,
.desktop-login-actions .customer-login-online { margin-top: 0; }
.desktop-release-card { position: relative; flex: 0 0 auto; color: #eef2ff; }
.desktop-release-card[hidden], .desktop-release-card.hidden { display: none !important; }
.desktop-release-card > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 16px; border: 1px solid rgba(172, 187, 255, .58); border-radius: 10px;
  color: #f2f5ff; background: #1b2252; font-size: 13px; font-weight: 700;
  line-height: 1.3; cursor: pointer; list-style: none;
}
.desktop-release-card > summary::-webkit-details-marker { display: none; }
.desktop-release-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 340px;
  box-sizing: border-box; padding: 16px; border: 1px solid #626da7; border-radius: 12px;
  background: #111a3a; box-shadow: 0 12px 36px #0006;
}
.desktop-release-copy { display: grid; min-width: 0; gap: 7px; }
.desktop-release-copy strong { color: #f2f5ff; font-size: 14px; line-height: 1.45; }
.desktop-release-copy span, .desktop-release-copy small { color: #bbc5e9; font-size: 11px; line-height: 1.5; }
.desktop-release-copy [data-desktop-release-trust] { color: #c5d3ff; font-size: 12px; }
.desktop-release-card[data-release-channel="internal-test"] [data-desktop-release-trust] { color: #ffcc80; }
.desktop-release-panel [data-desktop-release-warning] { margin: 12px 0; color: #c6cee5; font-size: 12px; line-height: 1.6; }
.desktop-release-card [data-desktop-release-download] {
  display: block; padding: 11px 12px; border: 1px solid #afbdff; border-radius: 9px;
  color: #101741; background: #b6c0ff; font-size: 12px; font-weight: 800;
  line-height: 1.3; text-align: center; text-decoration: none;
}
.customer-login-brandbar .desktop-release-card > summary { border-color: #398e82; color: #e8fff9; background: #063b35; }
.customer-login-brandbar .desktop-release-panel { border-color: #398e82; background: #052e2c; }
.customer-login-brandbar .desktop-release-card [data-desktop-release-download] { border-color: #7de9d9; color: #032521; background: #4be0cb; }
@media (max-width: 720px) { .desktop-release-card { display: none !important; } }
@media (min-width: 721px) and (max-width: 1050px) {
  .desktop-login-actions .login-online, .desktop-login-actions .customer-login-online { display: none; }
}


/* r507: only the active admin dashboard owns this viewport layout. The
   existing immutable dashboard skin remains untouched. */
#dashboard.view.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}
#dashboard.view > .dashboard-command-hero,
#dashboard.view > .dashboard-secondary-metrics { flex: 0 0 auto; }
#dashboard.view > .dashboard-workbench-grid {
  flex: 1 1 0;
  min-height: 0;
  align-items: stretch;
  margin-bottom: 0;
  overflow: hidden;
}
#dashboard.view .dashboard-workbench-grid .dashboard-task-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#dashboard.view .dashboard-task-panel > .dashboard-section-head { flex: 0 0 auto; }
#dashboard.view .dashboard-task-list {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  align-content: start;
  padding-right: 3px;
}
#dashboard.view .dashboard-side-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#dashboard.view .dashboard-task-item { flex: 0 0 auto; }
#dashboard.view > .dashboard-pager {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 52px;
  margin: 0 30px;
  padding: 8px 12px;
  border: 1px solid #dce5f0;
  border-bottom: 0;
  background: #fff;
  font-size: 12px;
  color: #66768f;
}
#dashboardPager .dashboard-page-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-left: auto; }
#dashboardPager label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
#dashboardPager :is(button, select, input) { width: auto; min-width: 0; min-height: 30px; height: 30px; padding: 3px 9px; font-size: 12px; }
#dashboardPager input { width: 56px; text-align: center; }
#dashboardPager button { white-space: nowrap; }
#dashboardPager :focus-visible { outline: 2px solid #2f67c8; outline-offset: 1px; }
#dashboardQueryState:not(.hidden) { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; margin: 0 30px; padding: 5px 10px; max-height: 60px; background: #fff5e6; color: #99601d; font-size: 12px; }
#dashboardQueryState > span { min-width: 0; overflow: auto; max-height: 48px; }
#dashboardQueryState > button { flex: 0 0 auto; min-height: 28px; padding: 3px 10px; }

@media (max-width: 1100px) {
  #dashboard.view > .dashboard-workbench-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(80px, 26%); gap: 8px; }
  #dashboard.view .dashboard-side-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
  #dashboard.view > .dashboard-command-hero { gap: 8px; padding-block: 10px; margin-top: 8px; margin-bottom: 8px; }
  #dashboard.view .dashboard-core-metric { min-height: 52px; padding-block: 7px; }
  #dashboard.view > .dashboard-secondary-metrics { flex-wrap: nowrap; overflow-x: auto; min-height: 42px; padding-block: 4px; }
  #dashboard.view .dashboard-secondary-metric { flex: 0 0 auto; }
}
@media (max-height: 680px) {
  #dashboard.view:not(#customer):not(#supplierPortal) > .dashboard-command-hero { min-height: 0; margin-top: 6px; margin-bottom: 6px; padding-block: 7px; gap: 6px 12px; }
  #dashboard.view .dashboard-hero-intro p { display: none; }
  #dashboard.view .dashboard-hero-intro h1 { font-size: 20px; margin-block: 2px; line-height: 24px; }
  #dashboard.view .dashboard-core-metric { min-height: 42px; padding: 5px 8px; }
  #dashboard.view .dashboard-core-metric .dashboard-metric-icon { width: 26px; height: 26px; }
  #dashboard.view .dashboard-metric-copy strong { font-size: 23px; }
  #dashboard.view .dashboard-refresh-zone { gap: 3px; }
  #dashboard.view #refreshDashboard { min-height: 30px; padding-block: 4px; }
  #dashboard.view > .dashboard-secondary-metrics { margin-bottom: 6px; flex-wrap: nowrap; overflow-x: auto; min-height: 38px; padding-block: 3px; }
  #dashboard.view .dashboard-secondary-metric { flex: 0 0 auto; min-height: 30px; padding-block: 3px; }
  #dashboard.view .dashboard-workbench-grid .panel { padding: 8px; }
  #dashboard.view .dashboard-section-head { padding-bottom: 5px; margin-bottom: 6px; }
  #dashboard.view .dashboard-section-head small { display: none; }
  #dashboard.view > .dashboard-pager { min-height: 44px; padding-block: 5px; }
}
@media (max-width: 760px) {
  #dashboard.view > .dashboard-workbench-grid { grid-template-rows: minmax(0, 1fr) minmax(55px, 22%); }
  #dashboard.view > .dashboard-command-hero { margin-inline: 8px; padding: 6px 10px; }
  #dashboard.view .dashboard-core-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #dashboard.view .dashboard-core-metric { min-height: 42px; padding: 4px; border-radius: 0; }
  #dashboard.view .dashboard-core-metric .dashboard-metric-icon { display: none; }
  #dashboard.view .dashboard-metric-copy > span { font-size: 10px; }
  #dashboard.view .dashboard-metric-copy strong { font-size: 20px; }
  #dashboard.view > :is(.dashboard-workbench-grid, .dashboard-secondary-metrics, .dashboard-pager, .dashboard-query-state) { margin-inline: 8px; }
  #dashboard.view > .dashboard-pager { gap: 5px 8px; padding-inline: 6px; }
  #dashboardPager .dashboard-page-controls { gap: 4px; }
  #dashboardPager :is(button, select, input) { padding-inline: 5px; }
  #dashboardPager input { width: 43px; }
}


/* Compact knowledge workspace. Loaded after the shared workbench theme. */
#customerFaqs > .customer-faq-summary, #customerFaqs > .customer-faq-tabs, #customerFaqs > .customer-faq-panel { width: auto; max-width: none; margin-left: 30px; margin-right: 30px; }
#customerFaqs .customer-faq-topbar { margin-bottom: 8px; min-height: 66px; padding: 10px 16px; }
#customerFaqs .customer-faq-topbar h1 { font-size: 22px; margin-bottom: 2px; }
#customerFaqs .customer-faq-topbar p { margin: 0; font-size: 12px; }
#customerFaqs .customer-faq-top-actions { display: flex; gap: 7px; flex-shrink: 0; }
#customerFaqs .customer-faq-summary { display: flex; flex-wrap: nowrap; gap: 0; min-height: 36px; margin-top: 0; margin-bottom: 10px; padding: 5px 10px; border: 1px solid #dce5f0; border-radius: 8px; background: #f8fafd; overflow-x: auto; }
#customerFaqs .customer-faq-summary > span { display: flex; flex: 0 0 auto; align-items: baseline; justify-content: flex-start; gap: 6px; min-height: 0; padding: 0 15px; border: 0; border-right: 1px solid #dce5f0; border-radius: 0; background: transparent; box-shadow: none; white-space: nowrap; }
#customerFaqs .customer-faq-summary > span:first-child { padding-left: 0; }
#customerFaqs .customer-faq-summary > span:last-child { border-right: 0; }
#customerFaqs .customer-faq-summary small { font-size: 12px; }
#customerFaqs .customer-faq-summary strong { font-size: 17px; line-height: 1.25; }
#customerFaqs .customer-faq-summary .is-warning { border-color: #dce5f0; background: transparent; }
#customerFaqs .customer-faq-tabs { margin-bottom: 8px; padding: 3px; min-height: 0; }
#customerFaqs .customer-faq-tabs button { padding: 5px 15px; min-height: 30px; }
#customerFaqs .customer-faq-panel { width: auto; max-width: none; gap: 0; min-width: 0; padding: 10px; border-radius: 10px; }
#customerFaqs .customer-faq-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 5px; padding: 0; background: none; border: 0; }
#customerFaqs .customer-faq-query-field { flex: 1 1 240px; min-width: 140px; display: block; }
#customerFaqs .customer-faq-query-field input, #customerFaqs .customer-faq-filter select { height: 34px; min-height: 34px; padding: 5px 9px; margin: 0; font-size: 13px; }
#customerFaqs .customer-faq-filter { display: block; margin: 0; }
#customerFaqs .customer-faq-filter select { max-width: 170px; min-width: 110px; }
#customerFaqs .customer-faq-toolbar > button, #customerFaqs .customer-faq-top-actions button { min-height: 34px; padding: 5px 11px; font-size: 13px; white-space: nowrap; }
#customerFaqs .customer-faq-search-state { margin: 0 0 7px; min-height: 18px; padding: 0; border: 0; background: transparent; font-size: 11px; line-height: 1.5; }
#customerFaqs .customer-faq-query-status { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px; }
#customerFaqs #customerFaqLocalDraftsBtn { min-height: 25px; padding: 2px 6px; font-size: 11px; }
#customerFaqs .customer-faq-table-wrap { min-width: 0; min-height: 0; max-height: min(calc(100dvh - 330px), 680px); border-radius: 6px; }
#customerFaqs .customer-faq-table { min-width: 870px; }
#customerFaqs .customer-faq-table th, #customerFaqs .customer-faq-table td { padding: 7px 9px; vertical-align: middle; font-size: 12px; }
#customerFaqs .customer-faq-table th:nth-child(1) { width: 21%; }
#customerFaqs .customer-faq-table th:nth-child(2) { width: 30%; }
#customerFaqs .customer-faq-table th:nth-child(3) { width: 14%; }
#customerFaqs .customer-faq-table th:nth-child(4) { width: 12%; }
#customerFaqs .customer-faq-table th:nth-child(5) { width: 9%; }
#customerFaqs .customer-faq-table th:nth-child(6) { width: 14%; }
#customerFaqs .customer-faq-question { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
#customerFaqs .customer-faq-answer { white-space: normal; overflow: hidden; }
#customerFaqs .customer-faq-answer-trigger { display: block; width: 100%; min-width: 0; min-height: 28px; margin: 0; padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: #4a5c76; background: transparent; border: 0; border-radius: 3px; font: inherit; line-height: 22px; cursor: pointer; }
#customerFaqs .customer-faq-answer-trigger:hover, #customerFaqs .customer-faq-answer-trigger:focus-visible { color: #174fae; background: #eaf1fd; outline: 2px solid #8eafe7; outline-offset: 1px; }
#customerFaqs .customer-faq-category { max-width: 100%; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: 11px; }
#customerFaqs .customer-faq-table td:nth-child(3) { white-space: nowrap; }
#customerFaqs .customer-faq-table td > .customer-faq-alias-count { display: inline; margin: 0 0 0 4px; white-space: nowrap; font-size: 10px; }
#customerFaqs .customer-faq-metrics { white-space: nowrap; }
#customerFaqs .customer-faq-table .customer-faq-metrics > strong { display: inline; font-size: 14px; }
#customerFaqs .customer-faq-table .customer-faq-metrics > small { display: inline; margin: 0 0 0 4px; font-size: 10px; }
#customerFaqs .customer-faq-state { min-height: 25px; padding: 2px 6px; white-space: nowrap; font-size: 11px; line-height: 18px; }
#customerFaqs button.customer-faq-state:hover { box-shadow: 0 0 0 2px #cddcf0; }
#customerFaqs .customer-faq-actions { flex-wrap: nowrap; gap: 3px; }
#customerFaqs .customer-faq-actions button.ghost { min-height: 28px; padding: 3px 5px; font-size: 11px; line-height: 18px; white-space: nowrap; }
#customerFaqs .customer-faq-danger, #customerFaqCategoriesModal .customer-faq-danger { color: #a23b38; }
#customerFaqs .customer-faq-pager { margin-top: 7px; padding-top: 0; min-height: 30px; font-size: 12px; }
#customerFaqs .customer-faq-pager button { min-height: 28px; padding: 3px 10px; }
#customerFaqs .customer-faq-insight-toolbar { margin-bottom: 8px; }
#customerFaqs .customer-faq-insight-table { min-width: 960px; }
#customerFaqs .customer-faq-insight-table th:nth-child(1) { width: 6%; }
#customerFaqs .customer-faq-insight-table th:nth-child(2) { width: 30%; }
#customerFaqs .customer-faq-insight-table th:nth-child(3), #customerFaqs .customer-faq-insight-table th:nth-child(4), #customerFaqs .customer-faq-insight-table th:nth-child(5) { width: 8%; }
#customerFaqs .customer-faq-insight-table th:nth-child(6) { width: 13%; }
#customerFaqs .customer-faq-insight-table th:nth-child(7) { width: 11%; }
#customerFaqs .customer-faq-insight-table th:nth-child(8) { width: 16%; }
.customer-faq-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.customer-faq-answer-preview { position: fixed; z-index: 10020; box-sizing: border-box; max-width: calc(100vw - 24px); max-height: min(60vh, 460px); display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid #b9cce7; border-radius: 9px; color: #283b54; background: #fff; box-shadow: 0 12px 38px #1d355a38; font-size: 13px; }
.customer-faq-answer-preview-bar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 7px; color: #516a8a; font-size: 11px; }
.customer-faq-answer-preview-bar button { min-height: 25px; padding: 2px 6px; border: 0; border-radius: 4px; color: #466486; background: #edf3fb; font-size: 11px; }
.customer-faq-answer-preview-text { min-height: 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; user-select: text; }
#customerFaqModal .customer-faq-modal-panel { width: min(650px, calc(100vw - 24px)); padding: 16px; max-height: calc(100dvh - 32px); }
#customerFaqModal .modal-bar { margin-bottom: 12px; }
#customerFaqModal .customer-faq-form { gap: 10px; }
#customerFaqModal .customer-faq-form > label { gap: 5px; margin: 0; font-size: 12px; }
#customerFaqModal .customer-faq-form input:not([type="checkbox"]), #customerFaqModal .customer-faq-form select { height: 35px; min-height: 35px; }
#customerFaqModal .customer-faq-form textarea { min-height: 60px; padding: 7px 9px; font-size: 13px; line-height: 22px; }
#customerFaqModal #customerFaqAliases { min-height: 60px; }
#customerFaqModal #customerFaqAnswer { height: 36px; min-height: 36px; max-height: 220px; resize: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#customerFaqModal #customerFaqAnswer:focus, #customerFaqModal #customerFaqAnswer.is-expanded { height: 130px; overflow: auto; white-space: pre-wrap; resize: vertical; }
#customerFaqModal .customer-faq-answer-field > span { display: flex; align-items: center; gap: 8px; }
#customerFaqModal .customer-faq-answer-field small { font-weight: 400; font-size: 11px; color: #77889f; }
#customerFaqModal .customer-faq-enabled { display: flex; flex-wrap: wrap; align-items: center; padding: 7px 9px; }
#customerFaqModal .customer-faq-enabled input { width: 15px; height: 15px; }
#customerFaqModal .customer-faq-enabled small { font-size: 11px; }
#customerFaqModal .customer-faq-modal-actions { margin-top: 13px; gap: 7px; }
#customerFaqCategoriesModal .customer-faq-categories-panel { width: min(650px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 16px; overflow: auto; }
#customerFaqCategoriesModal .modal-bar { margin-bottom: 10px; }
#customerFaqCategoriesModal .customer-faq-category-help { margin: 6px 0 10px; color: #64758e; font-size: 12px; line-height: 1.6; }
#customerFaqCategoriesModal .customer-faq-category-create { display: flex; gap: 8px; margin-bottom: 12px; }
#customerFaqCategoriesModal .customer-faq-category-create input { flex: 1; min-width: 0; }
#customerFaqCategoriesModal .customer-faq-category-create button { flex-shrink: 0; }
#customerFaqCategoriesModal .customer-faq-category-list { display: grid; gap: 8px; }
#customerFaqCategoriesModal .customer-faq-category-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; padding: 9px; border: 1px solid #dfe7f2; border-radius: 7px; background: #fafcfe; }
#customerFaqCategoriesModal .customer-faq-category-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
#customerFaqCategoriesModal .customer-faq-category-main input { width: 140px; min-width: 0; }
#customerFaqCategoriesModal .customer-faq-category-main span { color: #75869c; font-size: 10px; white-space: nowrap; }
#customerFaqCategoriesModal .customer-faq-category-row input, #customerFaqCategoriesModal .customer-faq-category-row select { height: 30px; min-height: 30px; padding: 3px 7px; font-size: 12px; }
#customerFaqCategoriesModal .customer-faq-category-row-actions { display: flex; gap: 4px; }
#customerFaqCategoriesModal .customer-faq-category-row button { min-height: 29px; padding: 3px 7px; font-size: 11px; white-space: nowrap; }
#customerFaqCategoriesModal .customer-faq-category-transfer { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#customerFaqCategoriesModal .customer-faq-category-transfer label { display: flex; align-items: center; gap: 6px; margin: 0; color: #71829a; font-size: 11px; }
#customerFaqCategoriesModal .customer-faq-category-transfer select { width: 130px; }
#customerFaqCategoriesModal .customer-faq-category-default { grid-column: 1 / -1; color: #8592a3; font-size: 10px; }
#customerFaqLocalDraftsModal .customer-faq-drafts-panel { width: min(650px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 16px; overflow: auto; }
#customerFaqLocalDraftsModal .customer-faq-category-help { margin: 10px 0; color: #64758e; font-size: 12px; line-height: 1.6; }
#customerFaqLocalDraftsModal .customer-faq-local-draft { display: grid; gap: 7px; margin: 10px 0; padding: 10px; border: 1px solid #dce5f0; border-radius: 7px; }
#customerFaqLocalDraftsModal .customer-faq-local-draft small { color: #7f6950; font-size: 11px; }
#customerFaqLocalDraftsModal .customer-faq-draft-answer { max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 13px; user-select: text; }
#customerFaqLocalDraftsModal .customer-faq-draft-actions { display: flex; gap: 7px; justify-content: flex-end; }
#customerFaqLocalDraftsModal .customer-faq-draft-actions button { min-height: 29px; padding: 4px 8px; font-size: 12px; }
#customerFaqLocalDraftsModal .customer-faq-danger { color: #a23b38; }
@media (max-width: 760px) {
  #customerFaqs > .customer-faq-summary, #customerFaqs > .customer-faq-tabs, #customerFaqs > .customer-faq-panel { margin-left: 10px; margin-right: 10px; }
  #customerFaqs .customer-faq-topbar { align-items: flex-start; gap: 8px; }
  #customerFaqs .customer-faq-topbar h1 { font-size: 19px; }
  #customerFaqs .customer-faq-topbar p { display: none; }
  #customerFaqs .customer-faq-summary { margin-top: 7px; }
  #customerFaqs .customer-faq-summary > span { padding: 0 10px; }
  #customerFaqs .customer-faq-toolbar { gap: 6px; }
  #customerFaqs .customer-faq-query-field { flex-basis: 100%; }
  #customerFaqs .customer-faq-filter { flex: 1 1 100px; }
  #customerFaqs .customer-faq-filter select { width: 100%; max-width: none; }
  #customerFaqs .customer-faq-table-wrap { max-height: 60dvh; }
  #customerFaqs .customer-faq-actions button, #customerFaqs .customer-faq-answer-trigger, #customerFaqs .customer-faq-state { min-height: 36px; }
  #customerFaqModal .customer-faq-enabled small { flex-basis: 100%; }
  #customerFaqCategoriesModal .customer-faq-category-row { grid-template-columns: 1fr; }
  #customerFaqCategoriesModal .customer-faq-category-main input { flex: 1; }
  #customerFaqCategoriesModal .customer-faq-category-row-actions { justify-content: flex-end; }
  #customerFaqCategoriesModal .customer-faq-category-transfer { grid-column: 1; }
}

#customerFaqs .customer-faq-answer-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
#customerFaqs .customer-faq-answer-line .customer-faq-answer-trigger { flex: 1; }
#customerFaqs .customer-faq-image-count { flex: 0 0 auto; min-height: 25px; padding: 2px 6px; color: #2455ac; font-size: 11px; white-space: nowrap; }
#customerFaqModal .customer-faq-images { grid-column: 1 / -1; min-width: 0; }
.customer-faq-image-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.customer-faq-image-heading button { min-height: 30px; padding: 4px 10px; font-size: 12px; }
.customer-faq-image-drop { padding: 12px; margin: 8px 0; border: 1px dashed #b5c9e5; border-radius: 7px; background: #f6f9fe; color: #627593; font-size: 12px; line-height: 1.6; }
.customer-faq-image-drop.dragover { background: #e7f0ff; border-color: #3769cc; }
.customer-faq-image-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 8px; }
.customer-faq-image-item { min-width: 0; padding: 7px; border: 1px solid #dce5f2; border-radius: 7px; display: flex; flex-direction: column; gap: 5px; }
.customer-faq-image-item.has-error { border-color: #c45252; }
.customer-faq-image-thumb { display: block; padding: 0; height: 90px; width: 100%; border: 0; background: #eff4fb; color: #486a9c; cursor: zoom-in; }
.customer-faq-image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.customer-faq-image-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; }
.customer-faq-image-item small { font-size: 11px; color: #617590; overflow-wrap: anywhere; }
.customer-faq-image-item.has-error small { color: #ac3636; }
.customer-faq-image-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.customer-faq-image-actions button { padding: 2px 6px; min-height: 27px; font-size: 11px; }
.customer-faq-image-state { color: #627593; font-size: 11px; margin-top: 7px; line-height: 1.6; }
.customer-faq-image-preview { z-index: 10050; }
.customer-faq-image-preview > .modal-panel { width: min(900px,calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 15px; }
.customer-faq-image-gallery figure { margin: 16px 0; padding: 8px; background: #f3f6fb; border-radius: 8px; }
.customer-faq-image-gallery img { display: block; max-width: 100%; max-height: 70dvh; margin: auto; object-fit: contain; }
.customer-faq-image-gallery figcaption { margin-top: 8px; text-align: center; overflow-wrap: anywhere; font-size: 12px; }
.customer-faq-image-gallery a { margin-left: 12px; }
/* Keep the form above the fixed collapsed navigation on narrow admin screens. */
#customerFaqModal, #customerFaqCategoriesModal, #customerFaqLocalDraftsModal { z-index: 10000; }


#projectAnnouncements{overflow:auto}#announcementRoot{padding-bottom:22px}.announcement-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.announcement-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}.announcement-stats button{background:white;border:1px solid var(--line);border-radius:10px;text-align:left;padding:16px 20px}.announcement-stats strong{display:block;font-size:29px;margin-top:8px}.announcement-urgent{color:var(--red)!important}.announcement-panel{border:1px solid var(--line);border-radius:10px;padding:18px;background:white}.announcement-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.announcement-filters input:not([type=checkbox]),.announcement-filters select{min-width:140px;flex:1;height:36px}.announcement-filters input[data-ann-filter=q]{min-width:280px;flex:3}.announcement-panel summary{cursor:pointer;color:var(--muted);margin:14px 0}.announcement-filters.advanced{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:16px}.announcement-filters.advanced label{font-size:12px;color:var(--muted)}.announcement-filters.advanced input{width:100%}.announcement-quick{margin:16px 0}.announcement-quick button{font-size:12px;padding:6px 10px}.announcement-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;color:var(--muted);font-size:12px;margin:18px 0}.announcement-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.announcement-card{border:1px solid var(--line);border-radius:10px;padding:16px;min-width:0}.announcement-card:hover{border-color:var(--blue)}.announcement-cardhead{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted)}.announcement-tag{background:var(--blue-soft);color:var(--blue);padding:4px 7px;border-radius:4px}.announcement-title{display:block;text-align:left;background:transparent!important;border:0!important;padding:0!important;font-size:14px;font-weight:650;line-height:1.65;color:var(--ink);margin:12px 0;white-space:normal!important}.announcement-card .announcement-title{height:47px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.announcement-meta{font-size:12px;color:var(--muted);line-height:1.9;min-height:69px;overflow-wrap:anywhere}.announcement-deadline{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;background:#f6f8fb;padding:10px;border-radius:6px;margin:12px 0;font-size:11px}.announcement-cardfoot{border-top:1px solid #edf0f4;padding-top:12px;display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px}.announcement-cardfoot button{padding:5px 8px;font-size:12px}.announcement-cardfoot a{color:var(--blue)}.announcement-pager{display:flex;justify-content:center;align-items:center;gap:14px;margin-top:20px}.announcement-table-wrap{overflow:auto}.announcement-table-wrap table{width:100%;font-size:12px;border-collapse:collapse}.announcement-table-wrap th,.announcement-table-wrap td{padding:11px;border-bottom:1px solid var(--line);text-align:left;white-space:normal}.announcement-table-wrap th{background:#f7f9fc;color:var(--muted)}.announcement-table-wrap small{display:block;color:var(--muted);margin-top:5px}.announcement-table-wrap .announcement-title{max-width:450px}.announcement-dialog,.announcement-import-dialog{border:0;border-radius:12px;box-shadow:0 15px 55px #17203333;color:var(--ink);padding:24px;max-height:94vh;overflow:auto;background:white}.announcement-dialog{position:fixed;margin:0 0 0 auto;top:0;right:0;bottom:0;max-height:100vh;width:min(720px,95vw);height:100vh;border-radius:0}.announcement-import-dialog{width:min(1000px,95vw)}.announcement-dialog::backdrop,.announcement-import-dialog::backdrop{background:#17203366}.announcement-dialog-head{display:flex;justify-content:space-between;gap:20px;align-items:center;font-size:12px;color:var(--muted)}.announcement-dialog h2,.announcement-import-dialog h2{font-size:21px;line-height:1.5;margin:15px 0}.announcement-dialog p,.announcement-import-dialog p{font-size:13px;color:var(--muted);line-height:1.7}.announcement-dialog h3{font-size:15px;margin:22px 0 12px}.announcement-link-primary{padding:9px 14px;background:var(--blue);color:white;border-radius:6px;text-decoration:none}.announcement-facts{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:18px;background:#f6f8fb;border-radius:8px;margin:20px 0;font-size:13px}.announcement-facts small{display:block;color:var(--muted);margin-bottom:7px}.announcement-original{white-space:pre-wrap;overflow-wrap:anywhere;background:#f7f9fc;border-radius:8px;padding:15px;font-size:13px;line-height:1.8;max-height:320px;overflow:auto}#announcementNote{width:100%;min-height:75px;margin-top:12px}.announcement-upload{display:block;padding:30px;border:2px dashed #b6cbed;border-radius:10px;background:#f6faff}.announcement-upload input{display:block;margin-top:12px}#announcementImportStatus{margin:18px 0;line-height:1.8}.announcement-edit-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}.announcement-edit-fields label{font-size:12px;color:var(--muted)}.announcement-edit-fields textarea{display:block;width:100%;min-height:65px;margin-top:5px}.announcement-reminder{padding:15px;border:1px solid var(--line);border-radius:8px;margin:14px 0}@media(max-width:1200px){.announcement-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.announcement-filters.advanced{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:700px){.announcement-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.announcement-cards,.announcement-edit-fields{grid-template-columns:1fr}.announcement-toolbar{align-items:flex-start;flex-direction:column}.announcement-filters.advanced{grid-template-columns:1fr}.announcement-filters input[data-ann-filter=q]{min-width:180px}}

#announcementRoot .announcement-stats button{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;min-height:94px;height:auto;gap:4px} .announcement-table-wrap table:not(.doc-table){min-width:0!important;table-layout:auto!important;width:100%!important} .announcement-table-wrap th,.announcement-table-wrap td{min-width:0!important;max-width:none!important;display:table-cell!important} #announcementDrawer .announcement-table-wrap td:first-child{width:48%} #announcementDrawer .announcement-table-wrap td:nth-child(2){width:16%} #announcementDrawer .announcement-table-wrap td:nth-child(3){width:36%}

/* Four cards per desktop row; content wraps inside each card. */
#announcementRoot .announcement-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.announcement-card{display:flex;flex-direction:column}
.announcement-cardhead{align-items:center;flex-wrap:wrap}
.announcement-cardhead .announcement-tag{flex-shrink:0}
.announcement-published{flex:1;min-width:0;font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.announcement-card .announcement-title{display:block;height:auto;min-height:47px;overflow:visible;-webkit-line-clamp:unset;overflow-wrap:anywhere;word-break:normal}
.announcement-card .announcement-meta{min-height:92px}
.announcement-card .announcement-meta>div{white-space:normal;overflow-wrap:anywhere}
.announcement-card .announcement-deadline{display:block;padding:8px;overflow:visible;margin-top:auto}
.announcement-time-row{display:grid;grid-template-columns:minmax(0,1fr) max-content;grid-template-rows:auto auto;align-items:center;column-gap:8px;row-gap:5px;width:100%;min-width:0;font-size:11px;line-height:1.6}
.announcement-time-row>span,.announcement-time-row>b{min-width:0;white-space:normal;overflow-wrap:anywhere}
.announcement-time-row>span:nth-child(1){grid-column:1;grid-row:1}
.announcement-time-row>span:nth-child(2){grid-column:1;grid-row:2}
.announcement-time-row>.announcement-countdown{grid-column:2;grid-row:1 / 3;align-self:center;justify-self:end;width:max-content;white-space:nowrap;overflow-wrap:normal}
.announcement-time-row time{display:inline;white-space:normal}
@media(min-width:701px) and (max-width:1200px){.announcement-time-row{grid-template-columns:minmax(154px,1fr) max-content;overflow-x:auto}}
.announcement-cardfoot{flex-wrap:wrap}
.announcement-card-links{display:flex;align-items:center;gap:10px}
.announcement-source-tag{display:inline-flex;align-items:center;justify-content:center;gap:4px;height:28px;padding:4px 7px;border:1px solid #cddcf5;border-radius:5px;background:var(--blue-soft);text-decoration:none;color:var(--blue)}
.announcement-source-tag:hover{border-color:var(--blue);background:#dfeaff}
.announcement-source-tag svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:700px){#announcementRoot .announcement-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){#announcementRoot .announcement-cards{grid-template-columns:1fr}}

/* Inline overview beside the module title. */
#announcementRoot .announcement-topbar{align-items:flex-start;gap:16px;flex-wrap:wrap}
.announcement-heading{min-width:0;flex:1}
.announcement-heading-line{display:flex;align-items:center;gap:18px;min-width:0}
.announcement-heading-line h1{flex:0 0 auto;margin:0;white-space:nowrap}
#announcementRoot .announcement-heading-line .announcement-stats{display:flex;gap:8px;margin:0;grid-template-columns:none;flex-wrap:nowrap}
#announcementRoot .announcement-heading-line .announcement-stats button{display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;min-height:32px;height:32px;padding:5px 10px;white-space:nowrap;border-radius:7px;font-size:12px}
#announcementRoot .announcement-heading-line .announcement-stats strong{display:inline;font-size:17px;line-height:1;margin:0}
#announcementRoot .announcement-heading-line .announcement-stats button[aria-pressed=true]{background:var(--blue-soft);border-color:#aac4f3;color:var(--blue)}
.announcement-category-shortcuts{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:14px 0 8px}
.announcement-category-shortcuts>span{font-size:12px;color:var(--muted);margin-right:4px;white-space:nowrap}
.announcement-category-shortcuts button{font-size:12px;height:30px;padding:5px 10px;white-space:nowrap}
.announcement-category-count{display:inline-block;margin-left:6px;font-variant-numeric:tabular-nums;font-weight:700}
.announcement-category-count:empty{display:none}
@media(max-width:1150px){.announcement-heading{flex-basis:100%}}
@media(max-width:700px){.announcement-heading-line{flex-wrap:wrap;gap:10px}#announcementRoot .announcement-heading-line .announcement-stats{flex-wrap:wrap}}

/* Countdown urgency and ended-project cleanup. */
.announcement-card,.announcement-ended-cell{position:relative}
.announcement-ended-stamp{position:absolute;right:18px;top:78px;z-index:1;transform:rotate(-14deg);padding:6px 12px;border:3px double #b54747;border-radius:7px;color:#b54747;background:#fff9f9e8;font-size:21px;font-weight:800;letter-spacing:3px;line-height:1.25;pointer-events:none;user-select:none}
.announcement-ended-stamp[hidden]{display:none}
.announcement-card .announcement-deadline{position:relative}
.announcement-card .announcement-ended-stamp{top:auto;bottom:calc(100% + 16px);right:8px}
.announcement-card.announcement-is-ended .announcement-meta{padding-bottom:64px}
.announcement-ended-cell .announcement-ended-stamp{top:auto;bottom:8px;right:12px;font-size:17px;padding:4px 9px}
.announcement-is-ended .announcement-ended-cell{padding-bottom:56px}
.announcement-card.announcement-is-ended{background:#fafbfc;border-color:#d8dde5}
.announcement-project-table .announcement-is-ended td{background:#fafbfc}
.announcement-countdown{font-weight:700;display:block;border-radius:5px;padding:3px 5px;color:#256094;background:#eaf3ff}
.announcement-countdown[data-level=soon]{color:#98590a;background:#fff2d7}
.announcement-countdown[data-level=urgent]{color:#c32b30;background:#ffeded}
.announcement-countdown[data-level=critical]{color:#fff;background:#b91c2b}
.announcement-countdown[data-level=ended],.announcement-countdown[data-level=unknown]{color:#667085;background:#e9edf2}
.announcement-card .announcement-deadline[data-level=soon]{background:#fffbf1}
.announcement-card .announcement-deadline[data-level=urgent]{background:#fff5f4}
.announcement-card .announcement-deadline[data-level=critical]{background:#fff0ef;box-shadow:inset 0 0 0 1px #f0acae}
.announcement-bulk-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:0 0 12px;font-size:12px}
.announcement-bulk-actions label{display:inline-flex;align-items:center;gap:7px}
.announcement-bulk-actions>span{color:var(--muted)}
.announcement-bulk-actions input,.announcement-project-table input[type=checkbox]{width:16px;height:16px;accent-color:var(--blue)}
#announcementRoot .announcement-delete{color:#b4232b;background:#fff1f1;border:1px solid #f2cbce}
#announcementRoot .announcement-delete:disabled{color:#9299a5;background:#f2f4f7;border-color:#e5e7eb;opacity:.7;cursor:not-allowed}
.announcement-table-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
#announcementRoot .announcement-project-table td:nth-child(2){width:28%}
#announcementRoot .announcement-project-table td:nth-child(6){min-width:155px!important}
.announcement-project-table .announcement-countdown{margin-top:7px;font-size:12px;line-height:1.5}

/* Quick filters sit before the result count and wrap as the viewport narrows. */
#announcementFilters>details{min-width:0}
#announcementFilters>details>summary{width:max-content;max-width:100%;margin:0;font-size:12px;line-height:34px}
#announcementFilters>details>.advanced{margin-top:12px;margin-bottom:0}
#announcementRoot .announcement-toolbar{flex-direction:row;align-items:center;flex-wrap:wrap;gap:12px 18px;margin:16px 0 18px}
.announcement-toolbar-filters{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;min-width:0}
#announcementRoot .announcement-quick{gap:3px 5px;margin:0;flex-wrap:wrap;min-width:0;max-width:100%}
#announcementRoot .announcement-quick button{position:relative;isolation:isolate;height:34px;padding:6px 9px;border:0;border-radius:7px;background:transparent!important;box-shadow:none!important;color:#334155;font-size:13px;white-space:nowrap;transform:none;transition:color 160ms ease}
#announcementRoot .announcement-quick button::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:linear-gradient(110deg,#e8f4ff,#eeebff);opacity:0;transition:opacity 160ms ease}
#announcementRoot .announcement-quick button:hover::before,#announcementRoot .announcement-quick button:focus-visible::before{opacity:1}
#announcementRoot .announcement-quick button:hover,#announcementRoot .announcement-quick button[aria-pressed=true]{color:var(--blue)}
#announcementRoot .announcement-quick button[aria-pressed=true]::after{content:"";position:absolute;left:9px;right:9px;bottom:0;height:2px;border-radius:2px;background:var(--blue)}
#announcementRoot .announcement-quick button:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.announcement-total{flex:0 0 auto;padding-left:16px;border-left:1px solid var(--line);color:#475569;white-space:nowrap;font-size:12px}
.announcement-view-actions{margin-left:auto;flex-shrink:0}
.announcement-card{background:#fff;transition:border-color 180ms ease,box-shadow 180ms ease,transform 180ms ease}
.announcement-card .announcement-meta{color:#334155}
.announcement-meta-label{color:#475569;font-weight:500}
.announcement-card:hover,.announcement-card:focus-within{border-color:#667cf2;box-shadow:0 3px 8px #3b52a312,0 12px 26px #3b52a31c;transform:translateY(-2px)}
@media(prefers-reduced-motion:reduce){#announcementRoot .announcement-quick button,#announcementRoot .announcement-quick button::before,.announcement-card{transition:none}.announcement-card:hover,.announcement-card:focus-within{transform:none}}

/* Pagination stays at the viewport bottom and follows the panel's measured width. */
#projectAnnouncements.view.active{overflow:hidden;padding-bottom:0}
#projectAnnouncements>#announcementRoot{display:flex;flex:1 1 0;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:0}
#announcementRoot .announcement-topbar{flex:0 0 auto}
#announcementRoot .announcement-panel{display:flex;flex:1 1 0;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:calc(var(--announcement-pager-height,56px) + 18px)}
#announcementFilters,#announcementRoot .announcement-toolbar,#announcementRoot .announcement-refresh-status{flex:0 0 auto}
#announcementRoot .announcement-results{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;outline:none;padding:3px 6px 20px 3px}
#announcementRoot .announcement-pager{position:fixed;bottom:0;z-index:35;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 18px;min-height:56px;margin:0;padding:10px 18px calc(10px + env(safe-area-inset-bottom,0px));border:1px solid var(--line);border-bottom:0;border-radius:8px 8px 0 0;background:#fff;box-shadow:0 -4px 18px #23365609;font-size:12px;color:var(--muted)}
.announcement-pager-info,.announcement-pager-info label,.announcement-page-jump,.announcement-page-jump label{display:flex;align-items:center;gap:8px;white-space:nowrap}
.announcement-pager-info{gap:14px}
#announcementRoot .announcement-pager button,#announcementRoot .announcement-pager select,#announcementRoot .announcement-pager input{height:32px;margin:0;font-size:12px}
#announcementRoot .announcement-pager button{padding:5px 10px;flex-shrink:0;white-space:nowrap}
.announcement-pager select{width:80px;padding:4px 8px}
.announcement-page-buttons{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;max-width:100%;overflow-x:auto}
#announcementRoot .announcement-page-number{min-width:32px;padding:5px 8px}
#announcementRoot .announcement-page-number[aria-current=page]{opacity:1;cursor:default;color:#fff;background:var(--blue)}
.announcement-page-gap{padding:0 3px}
.announcement-page-jump{margin:0}
.announcement-page-jump input{width:52px;padding:4px;text-align:center}
@media(max-width:1200px){#announcementRoot .announcement-pager{gap:8px 12px}.announcement-page-buttons{order:3;flex-basis:100%}.announcement-page-jump>span{display:none}}
@media(max-width:600px){#announcementRoot .announcement-pager{padding-left:8px;padding-right:8px;gap:8px}.announcement-pager-info{gap:6px}.announcement-page-jump,.announcement-page-jump label{gap:4px}.announcement-page-buttons{justify-content:flex-start}}

.announcement-refresh-status{display:flex;align-items:center;gap:12px;padding:9px 12px;margin:12px 0;border:1px solid #f0cf9c;border-radius:8px;background:#fff8eb;color:#875116;font-size:13px}
.announcement-refresh-status button{margin-left:auto;flex-shrink:0}
.announcement-reminder-pagination{justify-content:center;margin-top:20px}
.announcement-reminder-tabs{margin-bottom:16px}
/* Import review keeps usable projects separate from conflicts without hiding source values. */
.announcement-import-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:18px 0}
.announcement-import-stats>div{border:1px solid var(--line);border-radius:8px;padding:12px;color:#475569;background:#f8fafc}
.announcement-import-stats span{display:block;font-size:12px}.announcement-import-stats strong{display:block;font-size:24px;margin-top:4px;color:#1e293b}
.announcement-import-stats .announcement-import-blocked{border-color:#f4c784;background:#fff7e8}.announcement-import-blocked strong{color:#995b05}
.announcement-import-issues,.announcement-import-eligible,.announcement-import-warnings{margin:16px 0;border:1px solid var(--line);padding:12px;border-radius:8px}
.announcement-import-issues{border-color:#f4c784}.announcement-import-issues summary{color:#995b05}.announcement-import-warnings{background:#fffaf0}
.announcement-import-issues summary,.announcement-import-eligible summary,.announcement-import-warnings summary{cursor:pointer;font-weight:600;font-size:13px;line-height:1.6}
.announcement-import-values{min-width:200px;max-width:380px;overflow-wrap:anywhere;white-space:pre-wrap!important}.announcement-import-values>div+div{margin-top:8px;padding-top:8px;border-top:1px dashed var(--line)}
.announcement-import-values b{display:block;color:#64748b;font-size:11px}.announcement-import-values span{display:block;color:#334155}
.announcement-import-actions{position:sticky;bottom:-24px;background:#fff;padding:14px 0 10px;border-top:1px solid var(--line);z-index:2}
#announcementImportHistoryResult details{padding:12px;border:1px solid var(--line);border-radius:8px;margin-top:16px}
@media(max-width:600px){.announcement-import-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.announcement-import-actions{bottom:-16px}.announcement-import-values{min-width:150px}}

/* Compact participant slots share the existing card footprint. */
.announcement-card{padding-top:12px;padding-bottom:12px}
.announcement-card .announcement-title{margin-top:8px;margin-bottom:8px}
.announcement-card .announcement-deadline{margin-bottom:4px}
.announcement-card .announcement-cardfoot{box-sizing:border-box;height:71px;min-height:71px;padding-top:0;flex-wrap:nowrap;gap:8px;align-items:center}
.announcement-participants{flex:1;min-width:0;display:grid;grid-template-rows:repeat(3,22px);gap:1px;font-size:12px;align-content:start}
.announcement-participant-row{display:flex;align-items:center;gap:3px;min-width:0;height:22px}
.announcement-participant-row>label{flex:0 0 34px;white-space:nowrap;line-height:22px;color:#64748b;font-size:12px;margin:0}
.announcement-company-field{position:relative;flex:1;min-width:0;height:22px}
#announcementRoot .announcement-company-field input{box-sizing:border-box;display:block;width:100%;min-width:0;height:22px;min-height:22px;margin:0;padding:1px 18px 1px 5px;border:1px solid #dce3ed;border-radius:4px;background:#fff;color:#334155;font-size:12px;line-height:18px;overflow:hidden;text-overflow:ellipsis}
#announcementRoot .announcement-company-field input:focus{outline:2px solid #6d85ef;outline-offset:0;border-color:transparent}
#announcementRoot .announcement-company-field>button{position:absolute;right:1px;top:1px;width:17px;min-width:0;height:20px;min-height:0;border:0;border-radius:3px;background:transparent;padding:0;font-size:11px;line-height:20px;color:#64748b}
.announcement-participant-actions{flex:0 0 34px;display:flex;justify-content:flex-end;gap:0}
#announcementRoot .announcement-participant-actions button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:17px;min-width:0;height:22px;min-height:0;padding:0;border:0;border-radius:4px;background:transparent;color:#536bcb;font-size:13px;line-height:22px}
#announcementRoot .announcement-participant-actions button:hover{background:#edf2ff}
#announcementRoot .announcement-participant-actions button:disabled{opacity:.45;cursor:wait}
.announcement-card .announcement-card-links{flex:0 0 28px;align-items:center;justify-content:center}
.announcement-card .announcement-source-tag{box-sizing:border-box;width:28px;height:26px;padding:3px 6px}
.announcement-company-menu{position:fixed;z-index:10020;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;border:1px solid #cbd6ed;border-radius:7px;padding:4px;background:#fff;box-shadow:0 8px 28px #20396626;font:12px/1.5 system-ui,sans-serif;color:#334155}
.announcement-company-menu [data-company-choice],.announcement-company-menu [data-company-retry]{box-sizing:border-box;display:block;width:100%;height:auto;min-height:32px;padding:7px 8px;border:0;border-radius:4px;background:#fff;text-align:left;white-space:normal;overflow-wrap:anywhere;font:inherit;color:inherit}
.announcement-company-menu [data-company-choice]:hover,.announcement-company-menu [aria-selected=true]{background:#edf2ff;color:#3659cc}
.announcement-company-message{padding:10px 8px;color:#64748b;line-height:1.6}
.announcement-card:focus-visible{outline:2px solid #6d85ef;outline-offset:2px}

/* The same derived registration state appears in cards, table rows and preview. */
.announcement-registration-group{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;flex:0 0 auto}
#announcementRoot .announcement-registration,#announcementDrawer .announcement-registration{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:52px;height:26px;min-height:0;padding:3px 6px;border:1px solid #e5e7eb;border-radius:5px;background:#f1f2f4;color:#475569;font-size:12px;font-weight:600;line-height:18px;white-space:nowrap}
#announcementRoot button.announcement-registration:hover{background:#e5e7eb}
#announcementRoot .announcement-registration[data-registered=true],#announcementDrawer .announcement-registration[data-registered=true]{border-color:#c92836;background:#c92836;color:#fff}
#announcementRoot button.announcement-registration[data-registered=true]:hover{border-color:#b91c2b;background:#b91c2b}
.announcement-registration-review{display:inline-block;padding:2px 5px;border-radius:4px;background:#fff3d6;color:#9b6200;font-size:11px;line-height:18px;white-space:nowrap}
.announcement-report-legacy{color:#9b6200;font-size:12px;line-height:1.6}
.announcement-preview-registration .announcement-report-summary{margin-top:8px}

/* Keep all three participant rows inside the existing footer. */
.announcement-head-actions{display:flex;align-items:center;gap:4px;flex:0 0 auto;margin-left:auto}
.announcement-card{container-type:inline-size}
@container(max-width:280px){.announcement-published-label{display:none}.announcement-cardhead{column-gap:4px}.announcement-published{min-height:33px;display:flex;align-items:center}}
#announcementRoot .announcement-product-tag{box-sizing:border-box;flex:0 0 48px;min-width:0;width:48px;height:22px;min-height:22px;padding:1px 3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid #d6dfff;border-radius:4px;background:#f0f4ff;color:#4563cf;font-size:11px;line-height:18px}
#announcementRoot .announcement-product-tag:hover{background:#e3ebff}
#announcementRoot .announcement-product-tag[data-invalid=true]{border-color:#efb5bc;background:#fff1f2;color:#b42332}
#announcementRoot .announcement-product-tag:disabled{border-color:#e2e8f0;background:#f8fafc;color:#94a3b8;cursor:default}
.announcement-card-tooltip{position:fixed;z-index:10030;box-sizing:border-box;width:max-content;max-width:min(340px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:hidden;padding:9px 12px;border:1px solid #dce3ed;border-radius:7px;background:#fff;color:#334155;box-shadow:0 5px 20px #17203326;font:12px/1.65 system-ui,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:none}
.announcement-product-dialog{box-sizing:border-box;width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:18px;border:1px solid #dce3ed;border-radius:12px;background:#fff;color:#334155;box-shadow:0 16px 60px #17203333;font-size:13px}
.announcement-product-dialog::backdrop{background:#17203344}
.announcement-product-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:15px}
.announcement-product-heading button{border:0;background:transparent;font-size:22px;padding:0 4px;line-height:24px;color:#64748b}
.announcement-product-company{margin:8px 0 16px;line-height:1.6;color:#64748b;overflow-wrap:anywhere}
.announcement-brand-policy{margin:0 0 12px;padding:8px 10px;border-radius:6px;background:#f0f4ff;color:#4563a3;font-size:12px;line-height:1.65;overflow-wrap:anywhere;max-height:96px;overflow:auto}
.announcement-product-field{display:block;font-size:12px;font-weight:500;margin-top:12px}
.announcement-product-field input{box-sizing:border-box;display:block;width:100%;min-width:0;height:34px;margin-top:5px;border:1px solid #ccd6e5;border-radius:6px;padding:6px 9px;font-size:13px;background:#fff;color:#334155}
.announcement-product-field input:focus{outline:2px solid #8aa3f4;outline-offset:1px}
.announcement-product-options{max-height:180px;overflow:auto;overscroll-behavior:contain;margin-top:4px;padding:3px;border:1px solid #dce3ed;border-radius:6px;background:#fff}
.announcement-product-options[hidden]{display:none}
.announcement-product-options button{display:block;width:100%;padding:7px;border:0;border-radius:4px;text-align:left;background:#fff;color:#334155;font-size:12px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
.announcement-product-options button:hover,.announcement-product-options button[aria-selected=true]{background:#edf2ff;color:#3659cc}
.announcement-product-options strong{font-weight:500}.announcement-product-options small{display:block;color:#64748b}
.announcement-product-message{font-size:12px;color:#64748b;padding:8px;line-height:1.6}
.announcement-product-hint{font-size:12px;line-height:1.65;color:#64748b;margin:12px 0}
.announcement-product-error{font-size:12px;line-height:1.65;color:#b42332;overflow-wrap:anywhere}
.announcement-product-error[data-tone=info]{color:#526580}
.announcement-product-footer{display:flex;align-items:center;gap:8px;margin-top:16px}
.announcement-product-footer>span{flex:1}.announcement-product-footer button{font-size:12px;padding:6px 12px}
.announcement-product-dialog button:disabled{opacity:.55;cursor:wait}

/* Confirmed customer ownership stays separate from the personal follow action. */
.announcement-card .announcement-cardfoot{height:auto;min-height:104px;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:7px;padding-top:7px}
.announcement-report-summary{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:11px;line-height:1.6;color:#355179;overflow-wrap:anywhere}
.announcement-report-summary>span{flex:1 1 170px;min-width:0}
.announcement-report-summary small{display:block;font-size:10px;color:#71829a}
.announcement-report-summary[data-review=true]{color:#ad600d}
#announcementRoot .announcement-report-summary button{flex:0 0 auto;padding:3px 7px;min-height:24px;font-size:11px;border:1px solid #d8e2f7;border-radius:5px;background:#f3f6ff;color:#4163c7}
.announcement-report-empty{color:#8491a5}
.announcement-report-dialog{box-sizing:border-box;width:min(900px,calc(100vw - 32px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #dce4ef;border-radius:15px;background:#fff;color:#334155;box-shadow:0 20px 80px #14274840;overflow:auto;font:13px/1.65 system-ui,sans-serif}
.announcement-report-dialog::backdrop{background:#14274866}
.announcement-report-heading{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;background:#fff;border-bottom:1px solid #e4eaf4}
.announcement-report-dialog h2{font-size:19px;margin:0}.announcement-report-dialog h3{font-size:14px;margin:0 0 8px}.announcement-report-dialog p{margin:7px 0;overflow-wrap:anywhere}
.announcement-report-dialog button{border:1px solid #d5e0f0;border-radius:7px;padding:6px 12px;background:#f7f9fd;color:#365783;font:inherit;cursor:pointer;white-space:normal}
.announcement-report-dialog button.primary{background:#4362d9;color:#fff;border-color:#4362d9}
.announcement-report-dialog button:disabled{opacity:.5;cursor:default}
.announcement-report-dialog input:not([type=checkbox]),.announcement-report-dialog select,.announcement-report-dialog textarea{box-sizing:border-box;width:100%;min-width:0;margin-top:4px;padding:8px 10px;border:1px solid #d2ddee;border-radius:7px;background:#fff;color:#334155;font:inherit}
.announcement-report-dialog input[type=checkbox]{margin:0 7px 0 0;accent-color:#4362d9}
.announcement-report-dialog textarea{resize:vertical;min-height:60px}
.announcement-report-body{padding:18px 22px}.announcement-report-body>section{margin-top:20px}
.announcement-report-project{padding:12px 14px;background:#f5f8fd;border-radius:9px}
.announcement-report-project p{display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:12px}
.announcement-report-muted{color:#73839a;font-size:12px}
.announcement-report-scope{display:block;margin:12px 0;max-width:100%}
.announcement-report-candidate{border:1px solid #dce5f4;border-radius:10px;padding:14px;margin-top:12px;background:#fff}
.announcement-report-candidate>header{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.announcement-report-candidate>header>strong{font-size:14px}.announcement-report-candidate>header>span{font-size:12px;color:#73839a}
.announcement-report-state{display:inline-block;border-radius:5px;padding:2px 7px;background:#eaf6f0;color:#267b58;font-size:11px;font-weight:500}
.announcement-report-state[data-review=true]{background:#fff4df;color:#ad600d}
.announcement-report-comparison{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}
.announcement-report-comparison>div{display:flex;flex-direction:column;gap:4px;padding:11px;background:#f6f8fc;border-radius:7px;overflow-wrap:anywhere}
.announcement-report-comparison small{color:#73839a;font-size:11px}.announcement-report-comparison strong{font-size:13px}
.announcement-report-reasons{margin:8px 0;padding-left:20px;color:#267b58}
.announcement-report-warning{margin:8px 0;padding:8px 10px 8px 28px;border-radius:6px;background:#fff8eb;color:#9d620d;font-size:12px}
.announcement-report-fill{display:flex;align-items:center;margin:12px 0;font-size:12px;overflow-wrap:anywhere}
.announcement-report-note{display:block;font-size:12px;color:#65778e}
.announcement-report-candidate>footer{display:flex;justify-content:flex-end;margin-top:12px}
.announcement-report-link{padding:12px;border:1px solid #d8e7df;border-radius:8px;margin:9px 0;overflow-wrap:anywhere}
.announcement-report-link .announcement-report-state{margin-left:8px}.announcement-report-link p{font-size:12px;color:#73839a}
.announcement-report-link details{font-size:12px}.announcement-report-link summary{cursor:pointer;color:#73839a}
.announcement-report-dialog .announcement-report-unlink{margin-top:8px;color:#a93a40;background:#fff5f5;border-color:#f0c9cd}
.announcement-report-message{position:sticky;bottom:0;padding:10px 22px;background:#fff;border-top:1px solid #e4eaf4;font-size:12px;color:#267b58;overflow-wrap:anywhere}
.announcement-report-message:empty{display:none}.announcement-report-message[data-error=true]{color:#b42332;background:#fff8f8}
.announcement-report-empty-state{padding:20px;background:#f8fafc;border-radius:8px;color:#73839a;text-align:center}
[data-report-unit-panel]{padding:12px;margin-top:12px;border:1px solid #dce5f4;border-radius:9px}
[data-report-unit-panel]>label{display:block;margin-top:10px;font-size:12px}
.announcement-report-unit-search{display:flex;align-items:flex-end;gap:8px}.announcement-report-unit-search label{flex:1;min-width:0}.announcement-report-unit-search button{flex:0 0 auto}
[data-report-unit-results]{max-height:160px;overflow:auto;margin:10px 0}[data-report-unit-results] button{display:block;width:100%;text-align:left;margin:4px 0}
@media(max-width:600px){.announcement-report-heading{padding:12px 14px}.announcement-report-body{padding:12px 14px}.announcement-report-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px)}.announcement-report-comparison{grid-template-columns:1fr}.announcement-report-candidate{padding:11px}.announcement-report-fill{align-items:flex-start}.announcement-report-message{padding:10px 14px}}

.announcement-report-note-preview{padding:8px 12px;background:#f6f8fc;border-left:3px solid #c8d6f1;border-radius:5px;overflow-wrap:anywhere}.announcement-report-note-preview small{color:#73839a}.announcement-report-note-preview p{white-space:pre-wrap}

.announcement-report-exclusion{margin-top:12px;padding-top:8px;border-top:1px solid #e4eaf4;font-size:12px}.announcement-report-exclusion summary{color:#65778e;cursor:pointer}.announcement-report-exclusion>button{margin-top:8px}.announcement-report-exclusion>label{display:block;color:#65778e}.announcement-report-state[data-excluded=true]{background:#eef1f5;color:#64748b}.announcement-report-candidate[data-excluded=true]{background:#fafbfd;border-style:dashed}

.announcement-report-summary .announcement-report-conflict{flex:1 1 100%;color:#a56a19;background:#fff7e9;border-radius:4px;padding:3px 6px;font-size:10px;line-height:1.5}#announcementRoot .announcement-report-summary button[data-has-matches=true]{border-color:#bed0ff;background:#eaf0ff;color:#3456c4;font-weight:600}

/* Compact ownership review: one selected report, with aligned evidence on both sides. */
.announcement-report-dialog{width:min(1120px,calc(100vw - 32px));height:min(760px,calc(100dvh - 32px));overflow:hidden}
.announcement-report-dialog[open]{display:flex;flex-direction:column}
.announcement-report-heading{flex:0 0 auto;padding:12px 18px;position:relative;min-height:56px;box-sizing:border-box}
.announcement-report-window-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.announcement-report-heading h2{font-size:18px;line-height:1.4}
.announcement-report-body{flex:1 1 auto;min-height:0;overflow:auto;padding:14px 18px}
.announcement-report-match-body{display:flex;flex-direction:column;overflow:hidden;gap:10px}
.announcement-report-match-toolbar{display:flex;align-items:flex-end;gap:12px;flex:0 0 auto}
.announcement-report-match-toolbar .announcement-report-scope{flex:1;min-width:0;margin:0;font-size:12px;color:#65778e}
.announcement-report-match-tools{display:flex;gap:6px;flex:0 0 auto;padding-bottom:1px}
.announcement-report-match-tools button{white-space:nowrap;font-size:12px}
.announcement-report-match-body [data-report-unit-panel]{flex:0 0 auto;max-height:220px;overflow:auto;margin:0;padding:10px}
.announcement-report-match-body [data-report-candidates]{display:flex;flex-direction:column;min-height:0;flex:1;gap:8px}
.announcement-report-choice{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-width:0;color:#65778e;font-size:12px}
.announcement-report-choice select{flex:1;width:auto;margin-top:0}.announcement-report-choice>span{white-space:nowrap}
.announcement-report-review{display:flex;flex-direction:column;min-height:0;flex:1;margin:0;padding:0;overflow:hidden}
.announcement-report-review>header{flex:0 0 auto;padding:8px 12px;border-bottom:1px solid #e4eaf4;background:#f8faff;gap:8px}
.announcement-report-review-content{flex:1;min-height:0;overflow:auto;padding:0 12px 12px}
.announcement-report-current-owner{margin-left:auto;color:#94600f!important}
.announcement-report-compare-table{width:100%;max-width:100%}
.announcement-report-compare-table table{width:100%;min-width:0;table-layout:fixed;border-collapse:collapse;font-size:12px;line-height:1.6}
.announcement-report-compare-table .announcement-report-field-col{width:86px}.announcement-report-compare-table .announcement-report-result-col{width:64px}
.announcement-report-compare-table th,.announcement-report-compare-table td{padding:8px 10px;text-align:left;vertical-align:top;border-bottom:1px solid #e5eaf2;white-space:pre-line;overflow-wrap:anywhere;word-break:break-word}
.announcement-report-compare-table thead th{background:#f5f8fd;color:#65778e;padding-top:12px;padding-bottom:12px}
.announcement-report-compare-table thead th:nth-child(2){background:#edf5ff}.announcement-report-compare-table thead th:nth-child(3){background:#f0f8f6}
.announcement-report-compare-table thead strong,.announcement-report-compare-table thead small,.announcement-report-compare-table thead span{display:block}
.announcement-report-compare-table thead strong{font-size:13px;line-height:1.55;color:#283e5d;margin:3px 0}.announcement-report-compare-table thead small,.announcement-report-compare-table thead span{font-size:11px;font-weight:400}
.announcement-report-compare-table tbody th{color:#6b7c92;font-weight:500;background:#fafbfd}
.announcement-report-compare-table td+td{border-left:1px solid #eef1f7}
.announcement-report-compare-state{display:inline-block;font-size:11px;color:#7a8797;border-radius:4px;background:#f0f3f7;padding:1px 5px;white-space:nowrap}
.announcement-report-compare-table tr[data-compare-state=match] .announcement-report-compare-state{background:#e6f5ed;color:#237850}
.announcement-report-compare-table tr[data-compare-state=warning] td{background:#fffbf1}.announcement-report-compare-table tr[data-compare-state=warning] .announcement-report-compare-state{background:#fff0cc;color:#9c650b}
.announcement-report-compare-table tr[data-compare-state=conflict] td{background:#fff3f2;color:#a13238}.announcement-report-compare-table tr[data-compare-state=conflict] .announcement-report-compare-state{background:#ffe0df;color:#b32832}
.announcement-report-review .announcement-report-note-preview,.announcement-report-raw,.announcement-report-evidence{margin:10px 0 0;padding:7px 10px;border:1px solid #e4eaf4;border-radius:6px;background:#f8faff;font-size:12px}
.announcement-report-review summary{cursor:pointer;color:#587093;line-height:1.7;overflow-wrap:anywhere}
.announcement-report-raw p{white-space:pre-wrap;font-size:12px;line-height:1.75;color:#52647d}.announcement-report-note-preview p{font-size:12px;white-space:pre-wrap}
.announcement-report-blocked{margin-top:10px;padding:8px 12px;background:#fff3f2;border:1px solid #f3d6d4;border-radius:6px;color:#a13238;font-size:12px}.announcement-report-blocked ul{padding-left:20px;margin:4px 0 0}
.announcement-report-review .announcement-report-warning{margin:10px 0 0}
.announcement-report-review .announcement-report-fill{margin:10px 0 7px}
.announcement-report-review .announcement-report-exclusion{margin-top:10px}
.announcement-report-review>footer{margin:0;padding:10px 12px;flex:0 0 auto;align-items:center;gap:12px;justify-content:space-between;background:#fff;border-top:1px solid #e4eaf4}
.announcement-report-review>footer>span{font-size:11px;color:#74839a;line-height:1.5}.announcement-report-review>footer>button{flex:0 0 auto}
.announcement-report-message{flex:0 0 auto;position:relative;padding:8px 18px;max-height:100px;overflow:auto}
@media(max-width:760px){
  .announcement-report-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
  .announcement-report-heading{padding:10px 12px;gap:8px}.announcement-report-heading h2{font-size:16px}.announcement-report-heading button{padding:5px 8px;font-size:12px}
  .announcement-report-body{padding:10px}.announcement-report-match-toolbar{flex-wrap:wrap;gap:6px}.announcement-report-match-toolbar .announcement-report-scope{flex-basis:100%}.announcement-report-match-tools{margin-left:auto}
  .announcement-report-review-content{padding:0 6px 8px}.announcement-report-choice{flex-wrap:wrap;gap:4px}.announcement-report-choice select{max-width:100%;font-size:11px}
  .announcement-report-compare-table .announcement-report-field-col{width:62px}.announcement-report-compare-table .announcement-report-result-col{width:46px}
  .announcement-report-compare-table th,.announcement-report-compare-table td{padding:7px 5px;font-size:11px}.announcement-report-compare-table thead strong{font-size:12px}.announcement-report-compare-state{padding:1px 3px;font-size:10px}
  .announcement-report-review>footer{padding:8px;gap:8px}.announcement-report-review>footer>button{padding:7px 9px;font-size:12px}
}

/* Four-item human review keeps the evidence visible after each acknowledgement. */
.announcement-report-summary{flex-wrap:nowrap;gap:8px;min-width:0;min-height:28px}
.announcement-report-summary>span{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
#announcementRoot .announcement-report-summary button{flex:0 0 auto;white-space:nowrap}
.announcement-report-compare-table .announcement-report-result-col{width:98px}
.announcement-report-compare-table .announcement-report-field-col{width:92px}
.announcement-report-dialog .announcement-report-field-confirm{padding:3px 13px;min-height:29px;font-size:12px;color:#405fcf;border-color:#c8d4ff;background:#f3f6ff;white-space:nowrap}
.announcement-report-human-confirmed{display:inline-block;padding:2px 5px;background:#e8f7ee;color:#208451;font-size:11px;border-radius:4px;white-space:nowrap}
.announcement-report-review-columns{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,1fr);align-items:start;gap:12px;margin-top:12px}
.announcement-report-evidence-panel,.announcement-report-confirm-panel{min-width:0;padding:11px 12px;border:1px solid #e3eaf4;border-radius:8px;background:#fbfcfe}
.announcement-report-review-columns h3{font-size:12px;color:#536884;margin:0 0 6px}
.announcement-report-review-columns .announcement-report-warning,.announcement-report-review-columns .announcement-report-blocked{margin:6px 0 0}
.announcement-report-review-columns .announcement-report-warning{padding:7px 8px 7px 24px}
.announcement-report-review-columns .announcement-report-note-preview,.announcement-report-review-columns .announcement-report-raw,.announcement-report-review-columns .announcement-report-evidence{margin-top:7px}
.announcement-report-progress{font-size:12px;line-height:1.6}.announcement-report-progress>strong{display:flex;justify-content:space-between;gap:8px;color:#334c70}.announcement-report-progress>strong span{font-size:14px;color:#4362d9}
.announcement-report-progress p{font-size:11px;color:#7a879c;margin:4px 0 7px}
.announcement-report-progress-items{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;font-size:11px;color:#8c7a52}
.announcement-report-progress-items [data-reviewed=true]{color:#27805a}
.announcement-report-confirm-panel .announcement-report-fill{margin:9px 0 7px;align-items:flex-start;line-height:1.6}.announcement-report-confirm-panel .announcement-report-fill input{flex:0 0 auto;margin-top:3px}
.announcement-report-confirm-panel textarea{min-height:52px;max-height:180px;padding:6px 8px;font-size:12px;line-height:1.5}
@media(max-width:760px){
  .announcement-report-review-columns{grid-template-columns:1fr;gap:9px;margin-top:9px}
  .announcement-report-compare-table .announcement-report-result-col{width:70px}.announcement-report-compare-table .announcement-report-field-col{width:60px}
  .announcement-report-dialog .announcement-report-field-confirm{padding:3px 9px;font-size:11px}
  .announcement-report-human-confirmed{font-size:10px;padding:2px 3px}
}

/* Keep review controls in the titlebar; container rules also follow manual resizing. */
.announcement-report-dialog{container-type:inline-size}
.announcement-report-heading{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;padding:10px 16px;min-height:56px}
.announcement-report-heading h2{white-space:nowrap;font-size:17px}
.announcement-report-heading-controls{display:flex;align-items:center;gap:6px;min-width:0}
.announcement-report-heading-controls[hidden]{display:none}
.announcement-report-heading:has(.announcement-report-heading-controls[hidden]){grid-template-columns:minmax(0,1fr) auto}
.announcement-report-heading-controls .announcement-report-scope{display:flex;align-items:center;gap:6px;flex:1 1 160px;min-width:0;margin:0;font-size:12px;color:#65778e}
.announcement-report-heading-controls .announcement-report-scope>span{flex:0 0 auto;white-space:nowrap}
.announcement-report-heading-controls select{flex:1 1 auto;width:0;min-width:90px;margin:0;padding:6px 8px;font-size:12px;height:32px;text-overflow:ellipsis}
.announcement-report-heading-controls button,.announcement-report-window-actions button{flex:0 0 auto;white-space:nowrap;padding:6px 8px;font-size:12px;min-height:32px}
.announcement-report-window-actions{gap:6px}
.announcement-report-match-body{padding:10px 16px}
.announcement-report-source-panel{flex:0 0 auto;margin:0!important;max-height:26vh;overflow:auto;padding:9px 12px;border:1px solid #dde6f4;border-radius:8px;background:#f7faff}
.announcement-report-source-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.announcement-report-source-heading h3{margin:0;font-size:12px}
.announcement-report-source-heading button{padding:3px 8px;font-size:11px}
[data-report-source-content]{font-size:12px;overflow-wrap:anywhere;word-break:break-word}
[data-report-source-content]>p{white-space:pre-wrap;line-height:1.65}
.announcement-report-customer-meta{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:10px;row-gap:2px;min-width:0;margin-left:auto}
.announcement-report-customer-meta strong{font-size:12px;color:#334c70;overflow-wrap:anywhere}
.announcement-report-customer-meta small{font-size:11px;color:#73839a;overflow-wrap:anywhere}
.announcement-report-compare-table .announcement-report-field-col{width:116px}
.announcement-report-compare-table thead th{padding-top:7px;padding-bottom:7px;font-size:12px;vertical-align:middle}
.announcement-report-compare-table tbody th{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.announcement-report-compare-table tbody th>span{display:block;white-space:normal}
.announcement-report-compare-table tbody td{white-space:pre-line;overflow-wrap:anywhere;word-break:break-word}
@container (max-width:990px){
  .announcement-report-heading{grid-template-columns:minmax(0,1fr) auto;row-gap:8px}
  .announcement-report-heading-controls{grid-column:1/-1;grid-row:2}
  .announcement-report-window-actions{grid-column:2;grid-row:1}
  .announcement-report-heading-controls .announcement-report-scope{flex-basis:200px}
}
@container (max-width:600px){
  .announcement-report-heading{padding:9px 10px;gap:6px}
  .announcement-report-heading h2{font-size:16px}
  .announcement-report-heading-controls{flex-wrap:wrap;gap:5px}
  .announcement-report-heading-controls .announcement-report-scope{flex:1 1 calc(100% - 85px)}
  .announcement-report-heading-controls select{min-width:0}
  .announcement-report-heading-controls button{padding:4px 7px;min-height:30px;font-size:11px}
  .announcement-report-heading-controls [data-report-unit-toggle]{margin-left:auto}
  .announcement-report-match-body{padding:8px}
  .announcement-report-compare-table .announcement-report-field-col{width:72px}
  .announcement-report-compare-table .announcement-report-result-col{width:70px}
  .announcement-report-compare-table thead th,.announcement-report-compare-table tbody th,.announcement-report-compare-table tbody td{padding:6px 4px;font-size:11px}
  .announcement-report-customer-meta{flex:1 1 100%;margin-left:0}
}

#announcementRoot .announcement-card-links { flex:0 0 auto; gap:4px; }
#announcementRoot .announcement-favorite { flex:0 0 auto; padding:3px 6px; min-height:26px; border:1px solid #d5dffe; border-radius:5px; color:#64748b; background:#f8faff; font-size:11px; line-height:18px; white-space:nowrap; }
#announcementRoot .announcement-favorite[aria-pressed="true"] { color:#9b650a; border-color:#ead19c; background:#fff8e8; }
#announcementRoot .announcement-favorite:disabled { opacity:.55; }

#announcementRoot .announcement-cardhead .announcement-published { order:3; flex:1 0 100%; min-height:0; display:block; white-space:nowrap; }

/* One scope entry per status; keep category shortcuts visible at every width. */
#announcementRoot .announcement-topbar{gap:10px 16px;margin-bottom:12px}
#announcementRoot .announcement-heading-line{gap:14px}
#announcementRoot .announcement-heading-line .announcement-stats{gap:6px;max-width:100%;overflow-x:auto;scrollbar-width:thin}
#announcementRoot .announcement-heading-line .announcement-stats button{flex:0 0 auto;gap:6px;height:34px;padding:5px 9px}
#announcementRoot .announcement-stats [data-ann-favorite-urgent]{font-size:10px;line-height:18px;padding:0 4px;background:#fff0df;color:#a95016;border-radius:4px}
#announcementRoot .announcement-primary-filters{display:grid;grid-template-columns:minmax(200px,1fr) minmax(140px,200px) 120px auto auto auto auto;align-items:center;gap:8px;margin:0}
#announcementRoot .announcement-primary-filters>input,#announcementRoot .announcement-primary-filters>select{width:100%;min-width:0;max-width:100%;height:36px;margin:0;font-size:12px}
#announcementRoot .announcement-primary-filters>button,#announcementRoot .announcement-filter-plan>summary{height:36px;margin:0;padding:7px 11px;white-space:nowrap;font-size:12px}
#announcementRoot .announcement-filter-plan{position:relative;min-width:0}
#announcementRoot .announcement-filter-plan>summary{display:flex;align-items:center;justify-content:center;box-sizing:border-box;border:1px solid var(--line);border-radius:7px;color:#334155;background:#fff;cursor:pointer;list-style:none}
#announcementRoot .announcement-filter-plan>summary::-webkit-details-marker{display:none}
#announcementRoot .announcement-filter-plan>summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
#announcementRoot .announcement-filter-plan>div{position:absolute;right:0;top:calc(100% + 6px);z-index:40;display:grid;gap:5px;width:155px;padding:8px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 8px 24px #23365620}
#announcementRoot .announcement-filter-plan>div button{width:100%;height:34px;margin:0;font-size:12px}
#announcementRoot .announcement-category-shortcuts{gap:6px;margin:10px 0 4px}
#announcementRoot .announcement-category-shortcuts button{height:30px;padding:4px 8px;font-size:12px}
#announcementRoot .announcement-category-count{margin-left:4px}
#announcementRoot .announcement-advanced>summary{line-height:30px}
#announcementRoot .announcement-toolbar{margin:8px 0 10px;gap:8px}
#announcementRoot .announcement-total{border:0;padding-left:0}
#announcementRoot .announcement-favorite-deadline{display:flex;flex:0 0 auto;align-items:center;gap:8px 12px;min-width:0;margin-top:8px;padding:8px 10px;border:1px solid #f1d3a3;border-radius:7px;background:#fff8eb;color:#9a5c16;font-size:12px}
#announcementRoot .announcement-favorite-deadline[hidden],#announcementRoot [data-ann-favorite-urgent][hidden]{display:none!important}
#announcementRoot .announcement-favorite-deadline strong{flex:0 0 auto;font-weight:600}
#announcementRoot .announcement-favorite-deadline button{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:auto;padding:0;border:0;background:transparent;color:inherit;text-align:left;text-decoration:underline;text-underline-offset:3px;font-size:12px}
#announcementRoot .announcement-favorite-deadline [data-ann-favorite-clock]{flex:0 0 auto;font-variant-numeric:tabular-nums;font-weight:700}
#announcementRoot .announcement-favorite-deadline[data-level=critical]{border-color:#f0b5ae;background:#fff1ef;color:#b4232b}
@media(max-width:1100px){
  #announcementRoot .announcement-primary-filters{grid-template-columns:minmax(190px,1fr) minmax(115px,160px) 110px auto auto auto auto;gap:6px}
  #announcementRoot .announcement-primary-filters>button,#announcementRoot .announcement-filter-plan>summary{padding-left:8px;padding-right:8px}
}
@media(max-width:760px){
  #projectAnnouncements.view.active{display:flex;flex-direction:column;overflow:hidden}
  #projectAnnouncements>#announcementRoot{display:block;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-bottom:12px}
  #announcementRoot .announcement-panel{display:block;overflow:visible;min-height:0;padding-bottom:12px}
  #announcementRoot .announcement-results{display:block;flex:none;overflow:visible;min-height:140px;padding-right:0;padding-left:0;scrollbar-gutter:auto}
  #announcementRoot .announcement-pager{position:static;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px 5px;min-height:0;margin-top:10px;padding:8px 4px;border:1px solid var(--line);border-radius:7px;box-shadow:none;font-size:10px}
  #announcementRoot .announcement-pager-info,#announcementRoot .announcement-pager-info label,#announcementRoot .announcement-page-jump,#announcementRoot .announcement-page-jump label{gap:3px;font-size:10px;min-width:0}
  #announcementRoot .announcement-pager-info{grid-column:1;grid-row:1}
  #announcementRoot .announcement-page-jump{grid-column:2;grid-row:1;justify-content:flex-end}
  #announcementRoot .announcement-page-buttons{grid-column:1/-1;grid-row:2;justify-content:center;gap:4px}
  #announcementRoot .announcement-pager button,#announcementRoot .announcement-pager select,#announcementRoot .announcement-pager input{height:28px;font-size:10px}
  #announcementRoot .announcement-pager button{padding:4px 6px}
  #announcementRoot .announcement-pager select{width:46px;padding:3px}
  #announcementRoot .announcement-page-jump input{width:30px;padding:3px}
  #announcementRoot .announcement-page-number{min-width:27px}
  #announcementRoot .announcement-heading-line{display:block}
  #announcementRoot .announcement-heading-line h1{margin-bottom:8px}
  #announcementRoot .announcement-heading-line .announcement-stats{flex-wrap:nowrap;width:100%;gap:5px;padding-bottom:3px}
  #announcementRoot .announcement-heading-line .announcement-stats button{font-size:11px;padding:5px 7px}
  #announcementRoot .announcement-heading-line .announcement-stats strong{font-size:15px}
  #announcementRoot .announcement-topbar>.announcement-actions{width:100%;gap:6px;flex-wrap:wrap}
  #announcementRoot .announcement-topbar>.announcement-actions button{font-size:12px;padding:6px 8px}
  #announcementRoot .announcement-primary-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #announcementRoot .announcement-primary-filters>input[data-ann-filter=q]{grid-column:1/-1}
  #announcementRoot .announcement-primary-filters>button,#announcementRoot .announcement-filter-plan>summary{width:100%;padding-left:4px;padding-right:4px}
  #announcementRoot .announcement-category-shortcuts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-top:10px}
  #announcementRoot .announcement-category-shortcuts>span{grid-column:1/-1;margin:0}
  #announcementRoot .announcement-category-shortcuts button{min-width:0;min-height:40px;height:auto;white-space:normal;padding:4px 2px;font-size:11px;line-height:15px}
  #announcementRoot .announcement-category-count{margin-left:3px}
  #announcementRoot .announcement-filter-hint{display:none}
  #announcementRoot .announcement-favorite-deadline{flex-wrap:wrap;gap:5px 8px;padding:7px 8px}
  #announcementRoot .announcement-favorite-deadline strong{flex:1 1 100%;font-size:11px}
  #announcementRoot .announcement-favorite-deadline button{flex:1 1 50%;font-size:11px}
  #announcementRoot .announcement-favorite-deadline [data-ann-favorite-clock]{font-size:11px}
}
@media(max-width:374px){#announcementRoot .announcement-category-shortcuts{grid-template-columns:repeat(4,minmax(0,1fr))}}


/* Independent, permission-gated customer announcement workspace. */
#customer #customerAnnouncementsView:not(.hidden):not([hidden]) {
  display: flex; flex: 1 1 0; flex-direction: column; overflow: hidden;
  min-width: 0; min-height: 0;
}
#customerAnnouncementsView > .customer-announcement-panel {
  position: relative; flex: 1 1 0; min-width: 0; min-height: 0; height: 100%; overflow: hidden;
  border: 1px solid #dce7ec; border-radius: 12px; background: #f6f8fc;
}
#customerAnnouncementsView [hidden] { display: none !important; }
.customer-announcement-body { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
#customerAnnouncementsView .customer-announcement-heading {
  display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  min-width: 0; padding: 14px 16px 10px; border-bottom: 1px solid #e4ebf1; background: #f5f7fc;
}
#customerAnnouncementsView .customer-announcement-heading h2 { margin: 0; color: #24364c; font-size: 23px; line-height: 1.5; }
.customer-announcement-summary { display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
#customerAnnouncementsView button { box-shadow: none; font: inherit; cursor: pointer; }
#customerAnnouncementsView .customer-announcement-stat {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: auto; min-height: 40px; margin: 0;
  padding: 6px 12px; border: 1px solid #dfe6f2; border-radius: 9px; color: #293b50; background: #fff; font-size: 14px;
}
.customer-announcement-stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }
#customerAnnouncementsView .customer-announcement-stat[data-scope="soon"] strong { color: #d52d38; }
#customerAnnouncementsView .customer-announcement-stat[aria-pressed="true"] { border-color: #8a9eea; background: #eef2ff; }
.customer-announcement-countdown { margin-left: auto; color: #cf2638; font-size: 13px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.customer-announcement-hint { flex-basis: 100%; margin: 0; color: #77869b; font-size: 12px; }
.customer-announcement-toolbar {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(130px, .3fr) 115px auto auto auto;
  flex: 0 0 auto; align-items: center; gap: 8px; padding: 12px 14px 9px; margin: 0; background: #fff;
}
#customerAnnouncementsView .customer-announcement-toolbar input,
#customerAnnouncementsView .customer-announcement-toolbar select,
#customerAnnouncementsView .customer-announcement-advanced-fields input,
.customer-announcement-filter-drawer .customer-announcement-advanced-fields input {
  width: 100%; min-width: 0; height: 38px; margin: 0; padding: 7px 10px; border: 1px solid #dce4f2;
  border-radius: 8px; color: #293e52; background: #f9fbff; font: inherit; font-size: 13px;
}
#customerAnnouncementsView .customer-announcement-toolbar button,
#customerAnnouncementsView .customer-announcement-pager button {
  width: auto; min-height: 36px; margin: 0; padding: 6px 12px; border: 1px solid #d5dfee;
  border-radius: 8px; color: #456178; background: #fff; font-size: 13px; white-space: nowrap;
}
#customerAnnouncementsView .customer-announcement-toolbar .customer-announcement-search { color: #fff; border-color: #365ed7; background: #365ed7; }
#customerAnnouncementsView .customer-announcement-pager button:disabled { color: #a3afbd; background: #f7fafc; cursor: default; }
.customer-announcement-categories {
  display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 7px; padding: 5px 14px 9px;
  overflow-x: visible; background: #fff; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.customer-announcement-category-label { color: #7c899d; font-size: 13px; white-space: nowrap; }
#customerAnnouncementsView .customer-announcement-category {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; width: auto; min-height: 34px; margin: 0;
  padding: 6px 11px; border: 1px solid transparent; border-radius: 8px; color: #34445a; background: #f0f2f6; font-size: 13px;
}
#customerAnnouncementsView .customer-announcement-category[aria-pressed="true"] { color: #fff; background: #3e5cdd; }
.customer-announcement-advanced { flex: 0 0 auto; padding: 3px 14px 8px; background: #fff; font-size: 13px; color: #728198; }
.customer-announcement-advanced > summary { padding: 5px 0; cursor: pointer; }
.customer-announcement-advanced-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 8px 0; }
.customer-announcement-advanced-fields label { display: grid; gap: 5px; min-width: 0; margin: 0; font-size: 12px; color: #63758d; }
 .customer-announcement-search-group { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; min-width: 0; }
.customer-announcement-results { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid #eef1f6; background: #fff; }
.customer-announcement-result-count { color: #52677f; font-size: 12px; white-space: nowrap; }
.customer-announcement-results .customer-announcement-hint { flex-basis: auto; margin: 0; }
#customerAnnouncementsView .customer-announcement-advanced > summary { display: none; }
#customerAnnouncementsView .customer-announcement-advanced:not([open]) { display: none; }
.customer-announcement-filter-plans { position: relative; color: #456178; font-size: 13px; }
.customer-announcement-filter-plans > summary { display: flex; align-items: center; justify-content: center; min-height: 36px; box-sizing: border-box; padding: 6px 10px; border: 1px solid #d5dfee; border-radius: 8px; background: #fff; cursor: pointer; white-space: nowrap; list-style: none; }
.customer-announcement-filter-plans > summary::after { content: "▾"; margin-left: 5px; }
.customer-announcement-filter-plans > summary::-webkit-details-marker { display: none; }
.customer-announcement-plan-actions { position: absolute; z-index: 5; top: calc(100% + 5px); right: 0; display: grid; gap: 6px; min-width: 150px; padding: 8px; border: 1px solid #dce4f2; border-radius: 9px; background: #fff; box-shadow: 0 6px 20px #20314e24; }
.customer-announcement-filter-plans:not([open]) > .customer-announcement-plan-actions { display: none; }
.customer-announcement-favorite-badge { color: #c5343c; background: #fff0f0; border-radius: 5px; padding: 2px 4px; font-size: 11px; white-space: nowrap; }
#customerAnnouncementsView .customer-announcement-favorite-deadlines {
  display: flex; flex: 0 0 auto; align-items: center; gap: 8px 16px; width: auto; margin: 6px 12px; padding: 10px 12px;
  border: 1px solid #f1cd9c; border-radius: 9px; background: #fff8ec; color: #9e5618; font-size: 13px; text-align: left;
}
.customer-announcement-favorite-deadlines strong, .customer-announcement-favorite-deadlines time { flex: 0 0 auto; white-space: nowrap; }
.customer-announcement-favorite-next { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-announcement-favorite-deadlines time { font-variant-numeric: tabular-nums; color: #bd3232; }
.customer-announcement-favorite-open { white-space: nowrap; }
dialog.customer-announcement-filter-drawer { width: min(520px, calc(100vw - 24px)); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #dce7ec; border-radius: 14px; color: #293e52; box-sizing: border-box; }
dialog.customer-announcement-filter-drawer::backdrop { background: #18324970; }
.customer-announcement-filter-drawer-body { padding: 10px 16px; }
.customer-announcement-filter-drawer .customer-announcement-advanced-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-announcement-filter-drawer .customer-announcement-filter-plans > summary { justify-content: flex-start; border: 0; padding-inline: 0; cursor: default; }
.customer-announcement-filter-drawer .customer-announcement-filter-plans > summary::after { display: none; }
.customer-announcement-filter-drawer .customer-announcement-plan-actions { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 0; box-shadow: none; }
.customer-announcement-filter-drawer button { min-width: 0; width: auto; min-height: 38px; margin: 0; padding: 7px 10px; border: 1px solid #d5dfee; border-radius: 7px; background: #fff; color: #456178; font: inherit; font-size: 13px; cursor: pointer; }
.customer-announcement-filter-drawer-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid #e4ebf1; background: #fff; }
.customer-announcement-filter-drawer-footer button:last-child { color: #fff; background: #365ed7; border-color: #365ed7; }
.customer-announcement-list {
  display: grid; flex: 1 1 0; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start;
  gap: 12px; min-height: 140px; padding: 12px; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
}
.customer-announcement-card {
  display: flex; flex-direction: column; min-width: 0; padding: 13px; border: 1px solid #d9e2f2;
  border-radius: 12px; background: #fff; touch-action: manipulation; cursor: pointer;
  container: announcement-card / inline-size;
}
.customer-announcement-card:hover, .customer-announcement-card:focus-visible { border-color: #889cf0; outline: 2px solid #e2e8ff; outline-offset: 1px; }
.customer-announcement-card-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.customer-announcement-category-tag {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; min-width: 0;
  padding: 4px 7px; border-radius: 5px; color: #4264d7; background: #eef2ff; font-size: 12px;
}
.customer-announcement-registration { flex: 0 0 auto; margin-left: auto; padding: 4px 7px; border-radius: 5px; color: #65748a; background: #f1f3f6; font-size: 12px; font-weight: 650; white-space: nowrap; }
.customer-announcement-registration.is-reported { color: #c92736; background: #fff0f1; border: 1px solid #f3ccd1; }
#customerAnnouncementsView a.customer-announcement-source,
.customer-announcement-detail a.customer-announcement-source {
  display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 29px; height: 29px;
  border: 1px solid #d5dffe; border-radius: 6px; color: #3f64df; background: #f1f4ff; text-decoration: none; font-size: 18px;
}
.customer-announcement-source > svg {
  display: block; width: 16px; height: 16px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.customer-announcement-card h3 { margin: 12px 0 6px; font-size: 15px; line-height: 1.6; color: #253449; overflow-wrap: anywhere; }
.customer-announcement-published { margin: 0 0 11px; color: #7a899e; font-size: 11px; line-height: 1.5; }
.customer-announcement-meta { display: grid; gap: 7px; color: #43536c; font-size: 12px; margin-bottom: 12px; }
.customer-announcement-meta > div { display: grid; grid-template-columns: 53px minmax(0, 1fr); gap: 5px; }
.customer-announcement-meta span { color: #7c8b9d; }
.customer-announcement-meta b { font-weight: 500; overflow-wrap: anywhere; }
.customer-announcement-timebox {
  position: relative; display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center;
  gap: 10px; margin-top: auto; padding: 10px; border: 1px solid #d6e4f7;
  border-radius: 8px; color: #293849; background: #f4f8ff; font-size: clamp(10px, 3.2cqw, 14px); line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
.customer-announcement-dates { display: grid; gap: 5px; min-width: 0; }
.customer-announcement-date { white-space: nowrap; }
.customer-announcement-time-status { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.customer-announcement-deadline {
  display: block; flex: 1 1 auto; max-width: 18em; min-width: 0; margin: 0; padding: 6px;
  border-radius: 6px; color: #256094; background: #eaf3ff; font: inherit; font-weight: 700;
  text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.customer-announcement-deadline-compact { display: none; }
.customer-announcement-ended-stamp { display: inline-block; padding: 1px 6px; margin: 0; border: 2px solid #ce3543; border-radius: 4px; color: #c72837; font-size: clamp(12px, 4cqw, 17px); font-weight: 750; letter-spacing: 1px; white-space: nowrap; transform: rotate(-8deg); }
/* Adapt to each card, including the four-column desktop layout. */
@container announcement-card (max-width: 340px) {
  .customer-announcement-time-verbose, .customer-announcement-year { display: none; }
  .customer-announcement-timebox { gap: 6px; padding: 9px 7px; }
}
@container announcement-card (max-width: 285px) {
  .customer-announcement-timebox { gap: 4px; padding: 8px 4px; }
  .customer-announcement-deadline { padding: 5px 3px; }
}
@container announcement-card (max-width: 230px) {
  .customer-announcement-timebox { gap: 3px; }
  .customer-announcement-deadline-label { display: none; }
  .customer-announcement-deadline-value { display: none; }
  .customer-announcement-deadline-compact { display: inline; }
}
@container announcement-card (max-width: 200px) {
  .customer-announcement-date-colon { display: none; }
  .customer-announcement-deadline { padding-inline: 0; }
}
.customer-announcement-empty { grid-column: 1 / -1; padding: 50px 15px; text-align: center; color: #8090a4; }
.customer-announcement-pager { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 8px; padding: 9px 12px; border-top: 1px solid #e4ebf1; background: #fff; }
.customer-announcement-pager > span { margin-right: auto; font-size: 12px; color: #77889c; }
.customer-announcement-panel.is-static .customer-announcement-list,
.customer-announcement-panel.is-static .customer-announcement-body { overflow: hidden; scrollbar-gutter: auto; }
.customer-announcement-panel.is-static .customer-announcement-body { user-select: none; -webkit-user-select: none; pointer-events: none; }
.customer-announcement-shield { position: absolute; inset: 0; z-index: 2; touch-action: none; cursor: default; }
.customer-announcement-feedback { position: absolute; left: 12px; right: 12px; bottom: 55px; z-index: 3; margin: 0; padding: 8px 12px; border-radius: 7px; background: #fff4e2; color: #a06416; font-size: 13px; pointer-events: none; }
dialog.customer-announcement-detail { width: min(850px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid #dce7ec; border-radius: 15px; color: #293e52; }
dialog.customer-announcement-detail::backdrop { background: #18324970; }
.customer-announcement-detail-heading { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 20px; border-bottom: 1px solid #e4ebf1; background: #fff; }
.customer-announcement-detail-heading h2 { margin: 0; font-size: 20px; }
.customer-announcement-detail-heading button { width: auto; min-height: 36px; margin: 0; padding: 6px 14px; border: 1px solid #cfdee7; border-radius: 8px; color: #456178; background: #fff; font: inherit; font-size: 14px; cursor: pointer; }
.customer-announcement-detail-body { padding: 18px 20px; }
.customer-announcement-detail-body > h3 { margin: 0 0 16px; font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.customer-announcement-fields { margin: 0; }
.customer-announcement-fields > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf1f6; }
.customer-announcement-fields dt { color: #7a8a9c; }
.customer-announcement-fields dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-announcement-detail-section { margin-top: 20px; }
.customer-announcement-detail-section h4 { margin: 0 0 6px; }
.customer-announcement-own-report { display: grid; gap: 6px; margin-top: 8px; padding: 12px; border: 1px solid #e2e7f0; border-radius: 8px; }
.customer-announcement-own-report strong { color: #bd2c3a; }
.customer-announcement-own-report small { color: #77869b; }
@media (min-width: 761px) { body #customer #customerAnnouncementsView > .customer-announcement-panel { min-height: 300px; } }
@media (min-width: 761px) and (max-width: 1099px) {
  .customer-announcement-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-announcement-advanced-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .customer-announcement-toolbar { grid-template-columns: minmax(0, 1fr) 120px auto auto auto; }
  .customer-announcement-search-group { grid-column: 1 / -1; }
}
/* Everything below is restricted to phones; desktop rules above stay intact. */
@media (max-width: 760px) {
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer:not(.portal-locked):has(> #customerAnnouncementsView:not(.hidden):not([hidden])) {
    padding-bottom: 8px !important; overflow-y: hidden !important; scroll-padding-bottom: 0;
  }
  /* Outrank the shared phone tab auto-height rule only in this workspace. */
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer > #customerAnnouncementsView.portal-tab-view.customer-announcements-view:not(.hidden):not([hidden]) {
    display: flex !important; flex-direction: column !important;
    height: var(--customer-announcement-available-height, calc(100dvh - 120px)) !important;
    min-height: 260px !important; flex: 0 0 auto !important; overflow: hidden !important;
  }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView > .customer-announcement-panel {
    display: flex; flex-direction: column; flex: 1 1 0; height: auto; min-height: 0; overflow: hidden;
  }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-body {
    flex: 1 1 0; height: auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
  }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-panel.is-static .customer-announcement-body { overflow: hidden; }
  body #customer#customer#customer#customer #customerAnnouncementsView::before { display: none !important; content: none !important; }
  #customerAnnouncementsView .customer-announcement-body { display: flex; overflow: auto; overscroll-behavior: contain; }
  #customerAnnouncementsView .customer-announcement-heading {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    padding: 7px 6px 6px; gap: 6px 8px; min-height: 0;
  }
  #customerAnnouncementsView .customer-announcement-heading h2 { grid-column: 1; grid-row: 1; font-size: 16px; white-space: nowrap; line-height: 1.4; }
  #customerAnnouncementsView .customer-announcement-summary {
    display: flex; flex-wrap: nowrap; grid-column: 1 / -1; grid-row: 2; min-width: 0; width: 100%; gap: 6px; overflow-x: auto; padding-bottom: 2px;
  }
  #customerAnnouncementsView .customer-announcement-countdown {
    display: flex; grid-column: 2; grid-row: 1; align-items: center; justify-content: flex-end; gap: 5px;
    margin: 0; width: auto; min-width: 0; font-size: 11px; line-height: 1.5;
    text-align: right; white-space: nowrap;
  }
  #customerAnnouncementsView .customer-announcement-countdown > span { display: block; white-space: nowrap; }
  #customerAnnouncementsView .customer-announcement-countdown-clock { font-size: 1.15em; }
  #customerAnnouncementsView .customer-announcement-stat {
    flex: 0 0 auto; flex-direction: row; gap: 6px; width: auto; border-color: #e0e6f0; border-radius: 7px; background: #fff;
  }
  #customerAnnouncementsView .customer-announcement-stat strong { max-width: 100%; font-size: 17px; line-height: 1.15; }
  #customerAnnouncementsView .customer-announcement-hint { flex: 0 0 auto; margin: 0 0 0 auto; font-size: 10px; line-height: 24px; text-align: right; }
  #customerAnnouncementsView .customer-announcement-toolbar {
    grid-template-columns: minmax(0, 1fr) 84px 105px 70px; padding: 8px 6px; gap: 6px 4px;
  }
  #customerAnnouncementsView .customer-announcement-search-group { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 48px 44px; }
  #customerAnnouncementsView #customerAnnouncementQuery { grid-column: auto; }
  #customerAnnouncementsView .customer-announcement-toolbar > .customer-announcement-filter-plans { display: none; }
  #customerAnnouncementsView .customer-announcement-categories {
    display: grid; grid-template-columns: repeat(var(--customer-announcement-category-columns, 5), minmax(0, 1fr)); gap: 4px; padding: 2px 6px 5px; overflow: visible;
  }
  #customerAnnouncementsView .customer-announcement-category-label { grid-column: 1 / -1; font-size: 11px; line-height: 17px; }
  #customerAnnouncementsView .customer-announcement-category { flex-direction: column; justify-content: center; gap: 2px; width: 100%; }
  #customerAnnouncementsView .customer-announcement-category > span { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; text-align: center; }
  #customerAnnouncementsView .customer-announcement-stat > span { max-width: 100%; min-width: 0; white-space: nowrap; font-size: 11px; line-height: 15px; }
  #customerAnnouncementsView .customer-announcement-category b { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
  #customerAnnouncementsView .customer-announcement-category b { font-size: 12px; line-height: 15px; }
  #customerAnnouncementsView .customer-announcement-advanced {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 6px;
    padding: 0 6px 3px; font-size: 11px;
  }
  #customerAnnouncementsView .customer-announcement-advanced > summary { display: flex; grid-column: 1 / -1; gap: 4px; align-items: center; padding: 3px 0; line-height: 24px; list-style: none; }
  #customerAnnouncementsView .customer-announcement-advanced > summary::-webkit-details-marker { display: none; }
  #customerAnnouncementsView .customer-announcement-advanced > summary::before { content: "▸"; }
  #customerAnnouncementsView .customer-announcement-advanced[open] > summary::before { content: "▾"; }
  #customerAnnouncementsView .customer-announcement-advanced-fields { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #customerAnnouncementsView .customer-announcement-advanced:not([open]) > .customer-announcement-advanced-fields { display: none; }
  #customerAnnouncementsView .customer-announcement-results { padding: 7px 8px; }
  #customerAnnouncementsView .customer-announcement-favorite-deadlines { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 8px; margin: 5px 6px; padding: 9px; font-size: 12px; }
  #customerAnnouncementsView .customer-announcement-favorite-deadlines strong { grid-column: 1 / -1; white-space: normal; }
  #customerAnnouncementsView .customer-announcement-favorite-deadlines time { grid-column: 1; grid-row: 3; }
  #customerAnnouncementsView .customer-announcement-favorite-next { grid-column: 1 / -1; }
  #customerAnnouncementsView .customer-announcement-favorite-open { grid-column: 2; grid-row: 3; }
  #customerAnnouncementsView .customer-announcement-list {
    flex: 1 0 auto; grid-template-columns: minmax(0, 1fr); overflow: visible; min-height: 120px; padding: 6px; gap: 6px;
  }
  #customerAnnouncementsView .customer-announcement-card { padding: 12px; border-radius: 9px; }
  #customerAnnouncementsView .customer-announcement-card-top { gap: 3px; flex-wrap: wrap; }
  #customerAnnouncementsView .customer-announcement-category-tag { padding: 3px; font-size: clamp(9px, 2.55vw, 11px); }
  #customerAnnouncementsView .customer-announcement-registration { padding: 3px; font-size: clamp(9px, 2.55vw, 11px); }
  #customerAnnouncementsView a.customer-announcement-source { width: 24px; height: 26px; }
  #customerAnnouncementsView .customer-announcement-source > svg { width: 14px; height: 14px; }
  #customerAnnouncementsView .customer-announcement-card h3 { margin: 7px 0 5px; font-size: 13px; line-height: 1.5; }
  #customerAnnouncementsView .customer-announcement-published { margin-bottom: 6px; font-size: 10px; overflow-wrap: anywhere; }
  #customerAnnouncementsView .customer-announcement-meta { gap: 4px; margin-bottom: 7px; font-size: 11px; grid-template-columns: minmax(0, 1fr); }
  #customerAnnouncementsView .customer-announcement-meta > div { grid-template-columns: 44px minmax(0, 1fr); gap: 3px; }
  #customerAnnouncementsView .customer-announcement-timebox {
    grid-template-columns: max-content minmax(0, 1fr); padding: 8px; gap: 8px; font-size: 12px; line-height: 1.3;
  }
  #customerAnnouncementsView .customer-announcement-time-verbose,
  #customerAnnouncementsView .customer-announcement-year,
  #customerAnnouncementsView .customer-announcement-date-colon,
  #customerAnnouncementsView .customer-announcement-deadline-label,
  #customerAnnouncementsView .customer-announcement-deadline-value { display: none; }
  #customerAnnouncementsView .customer-announcement-deadline-compact { display: inline; overflow-wrap: anywhere; }
  #customerAnnouncementsView .customer-announcement-date { display: flex; align-items: center; gap: 2px; white-space: normal; }
  #customerAnnouncementsView .customer-announcement-date-label { flex: 0 0 2em; }
  #customerAnnouncementsView .customer-announcement-date-value { min-width: 0; }
  #customerAnnouncementsView .customer-announcement-deadline { max-width: 100%; padding: 7px 1px; white-space: normal; }
  #customerAnnouncementsView .customer-announcement-ended-stamp { padding: 1px 2px; font-size: 11px; letter-spacing: 0; }
  #customerAnnouncementsView .customer-announcement-pager { position: sticky; bottom: 0; gap: 4px; padding: 6px; }
  #customerAnnouncementsView .customer-announcement-pager > span { font-size: 10px; }
  #customerAnnouncementsView .customer-announcement-panel.is-static .customer-announcement-body { overflow: hidden; }
  .customer-announcement-fields > div { grid-template-columns: minmax(85px, 30%) minmax(0, 1fr); gap: 10px; font-size: 14px; }
  .customer-announcement-detail-heading, .customer-announcement-detail-body { padding: 14px; }

  /* Match the existing phone layer's specificity without changing its global controls. */
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-stat {
    box-sizing: border-box; min-width: 0 !important; height: 42px !important; min-height: 42px !important; min-block-size: 42px !important;
    padding: 5px 9px !important; font-size: 12px !important; border-radius: 5px !important;
  }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-toolbar :is(input,select,button) {
    height: 36px !important; min-height: 36px !important; min-block-size: 36px !important; min-width: 0 !important;
    padding: 0 3px !important; font-size: 12px !important; border-radius: 6px !important;
  }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-toolbar input {
    font-size: 16px !important;
  }
  #customerAnnouncementsView .customer-announcement-toolbar input::placeholder { font-size: 11px; }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-category {
    box-sizing: border-box; height: auto !important; min-height: 44px !important; min-block-size: 44px !important; min-width: 0 !important;
    padding: 4px 3px !important; font-size: 12px !important; border-radius: 6px !important;
  }
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerAnnouncementsView .customer-announcement-pager button {
    min-width: 46px !important; padding: 0 6px !important; font-size: 11px !important;
    height: 36px !important; min-height: 36px !important; min-block-size: 36px !important;
  }
}

/* Only deadlines within the next 24 hours use red. */
.customer-announcement-timebox[data-level="soon"] { border-color:#eed19a; background:#fffbf2; }
.customer-announcement-deadline[data-level="soon"] { color:#98590a; background:#fff2d7; }
.customer-announcement-timebox[data-level="urgent"],.customer-announcement-timebox[data-level="critical"] { border-color:#ff9ba5; background:#fff2f3; }
.customer-announcement-deadline[data-level="urgent"] { color:#c32b30; background:#ffeded; }
.customer-announcement-deadline[data-level="critical"] { color:#fff; background:#b91c2b; }
.customer-announcement-timebox[data-level="ended"],.customer-announcement-timebox[data-level="unknown"] { border-color:#dce1e7; background:#f5f6f8; }
.customer-announcement-deadline[data-level="unknown"] { color:#667085; background:#e9edf2; }
#customerAnnouncementsView .customer-announcement-favorite { display:inline-flex; flex:0 0 auto; align-items:center; gap:2px; padding:4px 6px; border:1px solid #d5dffe; border-radius:6px; color:#64748b; background:#f8faff; font-size:11px; line-height:20px; white-space:nowrap; }
#customerAnnouncementsView .customer-announcement-favorite[aria-pressed="true"] { color:#9b650a; border-color:#ead19c; background:#fff8e8; }
#customerAnnouncementsView .customer-announcement-favorite:disabled { opacity:.55; }

@media (max-width:760px) {
  #customerAnnouncementsView .customer-announcement-favorite { box-sizing:border-box; justify-content:center; width:24px; min-width:24px; height:26px; min-height:26px; padding:2px; font-size:15px; }
  #customerAnnouncementsView .customer-announcement-favorite-text { display:none; }
  #customerAnnouncementsView .customer-announcement-card-top { flex-wrap:nowrap; }
  #customerAnnouncementsView .customer-announcement-category-tag { flex:1 1 auto; }
}

@media (max-width: 374px) {
  #customerAnnouncementsView .customer-announcement-toolbar { grid-template-columns: minmax(0, 1fr) 78px 98px; }
  #customerAnnouncementsView #customerAnnouncementMoreFilters { grid-column: 3; }
  #customerAnnouncementsView #customerAnnouncementSort { grid-column: 1 / 3; grid-row: 3; justify-self: start; }
}

#customerAnnouncementsView .customer-announcement-favorite-deadlines[data-level="critical"] { border-color: #efa3ab; color: #b42332; background: #fff1f2; }


/* The price workspace owns its scroll area; other customer pages keep their layout. */
body.customer-portal #customer#customer#customer#customer:not(.portal-locked):has(> #customerRailwayPriceView:not(.hidden):not([hidden])) { display:flex !important; flex-direction:column !important; height:100vh !important; height:100dvh !important; min-height:0 !important; padding-top:0 !important; padding-bottom:0 !important; overflow:hidden !important; }
body.customer-portal #customer#customer#customer#customer:has(> #customerRailwayPriceView:not(.hidden):not([hidden])) > .customer-unified-header { flex:0 0 auto; }
body.customer-portal #customer#customer#customer#customer > #customerRailwayPriceView#customerRailwayPriceView:not(.hidden):not([hidden]) { display:flex !important; flex:1 1 0 !important; flex-direction:column !important; align-items:stretch !important; justify-content:flex-start !important; gap:0 !important; height:auto !important; min-height:0 !important; max-height:none !important; margin-bottom:0 !important; padding:0 2px 8px !important; overflow:hidden !important; }
body.customer-portal #customer#customer#customer#customer > #customerRailwayPriceView#customerRailwayPriceView:not(.hidden):not([hidden])::before { display:none !important; content:none !important; }
#customerRailwayPriceView { box-sizing:border-box; flex:0 0 auto; height:calc(100vh - var(--crp-top,180px)); height:calc(100dvh - var(--crp-top,180px)); min-height:0; min-width:0; overflow:hidden; padding:0 2px 8px; }
#customerRailwayPriceView .crp-workspace { box-sizing:border-box; display:flex; flex:1 1 0; flex-direction:column; gap:10px; width:100%; height:auto; min-height:0; min-width:0; margin:0; padding:12px 0 0; color:#21364c; }
#customerRailwayPriceView button { appearance:none; border:1px solid #cedbe9; border-radius:7px; padding:8px 11px; background:#fff; color:#36536f; font-family:inherit; font-size:12px; line-height:1.5; cursor:pointer; box-shadow:none; }
#customerRailwayPriceView button:hover { background:#f0f6fc; }
#customerRailwayPriceView button:disabled { opacity:.48; cursor:not-allowed; }
#customerRailwayPriceView button:focus-visible,#customerRailwayPriceView a:focus-visible,#customerRailwayPriceView .crp-table-scroll:focus-visible { outline:2px solid #3e77d3; outline-offset:2px; }
#customerRailwayPriceView .crp-heading { display:grid; grid-template-columns:minmax(170px,auto) minmax(400px,1fr) auto; gap:14px; align-items:center; flex:0 0 auto; }
#customerRailwayPriceView .crp-heading-title { min-width:0; }
#customerRailwayPriceView .crp-heading h2 { margin:0; font-size:23px; }
#customerRailwayPriceView .crp-heading p,#customerRailwayPriceView .crp-muted { margin:4px 0 0; color:#6c7b8e; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
#customerRailwayPriceView .crp-stats { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; min-width:0; }
#customerRailwayPriceView .crp-stat { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:7px; min-width:0; min-height:62px; padding:8px 9px; white-space:normal; text-align:center; }
#customerRailwayPriceView .crp-stat span { font-size:12px; color:#718198; }
#customerRailwayPriceView .crp-stat strong { font-size:22px; line-height:1; font-variant-numeric:tabular-nums; }
#customerRailwayPriceView .crp-gap-stat { border:1px solid #cedbe9; border-radius:7px; background:#fff; }
#customerRailwayPriceView .crp-gap-stat strong { font-size:14px; line-height:1.4; }
#customerRailwayPriceView .crp-gap-links { display:flex; justify-content:flex-start; align-items:center; flex-wrap:wrap; gap:4px 9px; }
#customerRailwayPriceView .crp-gap-stat .crp-gap-links { justify-content:center; }
#customerRailwayPriceView .crp-stat .crp-sub { font-size:10px; font-weight:400; }
#customerRailwayPriceView .crp-stat .crp-stat-value-line { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:0 4px; max-width:100%; color:inherit; }
#customerRailwayPriceView .crp-stat-value-line > .crp-stat-note { flex:0 0 100%; margin-top:4px; }
#customerRailwayPriceView .crp-stat .crp-stat-prefix { font-size:22px; line-height:1; color:inherit; }
#customerRailwayPriceView .crp-stat-desktop-note { display:none; }
#customerRailwayPriceView .crp-summary-note { display:flex; flex:0 0 auto; align-items:center; flex-wrap:wrap; gap:4px 12px; margin:0 0 7px; color:#6c7b8e; font-size:11px; line-height:1.5; }
#customerRailwayPriceView .crp-stat[aria-pressed=true],#customerRailwayPriceView .crp-reasons button[aria-pressed=true] { border-color:#4b76d8; background:#eef4ff; color:#235bc3; }
#customerRailwayPriceView .crp-alert { color:#b44336; }
#customerRailwayPriceView .crp-stale,#customerRailwayPriceView .crp-count-link.crp-stale { color:#946019; }
#customerRailwayPriceView .crp-model-checks { display:flex; flex:0 0 auto; flex-wrap:wrap; gap:6px 16px; margin:0 0 7px; }
#customerRailwayPriceView .crp-tabs { display:flex; flex:0 0 auto; border-bottom:1px solid #dce4ed; gap:4px; }
#customerRailwayPriceView .crp-tabs button { border:0; border-radius:0; border-bottom:3px solid transparent; background:none; padding:9px 15px; color:#6c7b8e; font-weight:600; }
#customerRailwayPriceView .crp-tabs button[aria-selected=true] { color:#2166a9; border-bottom-color:#2166a9; }
#customerRailwayPriceView .crp-context { display:flex; flex:0 0 auto; justify-content:space-between; gap:8px 15px; color:#6c7b8e; font-size:12px; line-height:1.5; flex-wrap:wrap; }
#customerRailwayPriceView .crp-context>div { display:flex; align-items:center; gap:10px; min-width:0; }
#customerRailwayPriceView .crp-back { padding:3px 7px; flex:0 0 auto; }
#customerRailwayPriceView .crp-panel { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; min-width:0; overflow:hidden; border:1px solid #e0e7ef; border-radius:11px; background:#fff; padding:12px 14px 0; }
#customerRailwayPriceView .crp-filters { display:flex; flex:0 0 auto; gap:8px; align-items:center; flex-wrap:wrap; margin:0 0 9px; }
#customerRailwayPriceView .crp-filters input,#customerRailwayPriceView .crp-filters select,#customerRailwayPriceView .crp-pager select { box-sizing:border-box; min-height:36px; max-width:100%; padding:7px 10px; border:1px solid #d3dfeb; border-radius:7px; background:#fff; color:inherit; font:inherit; font-size:12px; }
#customerRailwayPriceView .crp-filters input { min-width:120px; width:180px; }
#customerRailwayPriceView .crp-filters button.primary { color:#fff; background:#276cb0; border-color:#276cb0; }
#customerRailwayPriceView .crp-count-rule { flex:0 0 auto; margin:0 0 8px; color:#738298; font-size:11px; line-height:1.5; }
#customerRailwayPriceView .crp-reasons { display:flex; flex:0 0 auto; align-items:center; flex-wrap:wrap; gap:6px; margin:0 0 8px; color:#718198; font-size:11px; }
#customerRailwayPriceView .crp-reasons button { padding:4px 7px; font-size:11px; }
#customerRailwayPriceView .crp-table-scroll { flex:1 1 auto; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable; border-top:1px solid #e4eaf1; }
#customerRailwayPriceView .crp-table { border-collapse:separate; border-spacing:0; min-width:900px; width:100%; table-layout:auto; font-size:12px; line-height:1.5; }
#customerRailwayPriceView .crp-table th,#customerRailwayPriceView .crp-table td { padding:12px 10px; text-align:left; border-bottom:1px solid #e8edf3; vertical-align:middle; }
#customerRailwayPriceView .crp-table th { position:sticky; top:0; z-index:3; color:#68768c; background:#f5f7fb; font-weight:600; white-space:nowrap; }
#customerRailwayPriceView .crp-table td { background:#fff; }
#customerRailwayPriceView .crp-table tbody tr:nth-child(even) td { background:#fbfcff; }
#customerRailwayPriceView .crp-table th:first-child,#customerRailwayPriceView .crp-table td:first-child { position:sticky; left:0; z-index:2; min-width:115px; max-width:210px; box-shadow:1px 0 #e8edf3; }
#customerRailwayPriceView .crp-table th:first-child { z-index:4; }
#customerRailwayPriceView .crp-items-table { min-width:1100px; }
#customerRailwayPriceView .crp-items-table td:first-child { min-width:170px; max-width:230px; overflow-wrap:anywhere; }
#customerRailwayPriceView .crp-items-table td:nth-child(5) { min-width:175px; max-width:270px; }
#customerRailwayPriceView .crp-models-table,#customerRailwayPriceView .crp-covered-table,#customerRailwayPriceView .crp-extra-table,#customerRailwayPriceView .crp-unified-table { min-width:700px; }
#customerRailwayPriceView .crp-missing-table { min-width:650px; }
#customerRailwayPriceView .crp-prices-table { min-width:650px; }
#customerRailwayPriceView .crp-prices-table td:nth-child(2) { min-width:180px; overflow-wrap:anywhere; }
#customerRailwayPriceView .crp-prices-table td:nth-child(3) { min-width:150px; overflow-wrap:anywhere; }
#customerRailwayPriceView .crp-price-rule { padding:5px 0; }
#customerRailwayPriceView .crp-context>span:has([data-crp-price-read]) { display:flex; flex-wrap:wrap; gap:3px 14px; }
#customerRailwayPriceView .crp-price-sync { flex:0 0 auto; margin:0 0 8px; color:#946019; font-size:12px; line-height:1.5; }
#customerRailwayPriceView .crp-price-sync[hidden] { display:none; }
#customerRailwayPriceView .crp-sub { display:block; margin-top:4px; color:#74839a; font-size:11px; overflow-wrap:anywhere; }
#customerRailwayPriceView .crp-model { color:#34475e; font-size:12px; font-weight:600; }
#customerRailwayPriceView .crp-money { font-variant-numeric:tabular-nums; white-space:nowrap; }
#customerRailwayPriceView .crp-badge { display:inline-block; padding:3px 6px; background:#f1f3f8; color:#627185; border-radius:5px; font-size:11px; white-space:nowrap; }
#customerRailwayPriceView .crp-badge.good { background:#e9f5ed; color:#27714d; }
#customerRailwayPriceView .crp-badge.bad { background:#fff0eb; color:#af4333; }
#customerRailwayPriceView .crp-count-link { border:0; background:none; padding:2px 3px; color:#2166a9; text-decoration:underline; text-underline-offset:3px; font-weight:650; }
#customerRailwayPriceView .crp-count-link.crp-alert { color:#b44336; }
#customerRailwayPriceView .crp-quantity-missing { color:#ab6410; }
#customerRailwayPriceView .crp-quantity-extra { color:#8152b2; }
#customerRailwayPriceView .crp-quantity-complete { color:#27714d; }
#customerRailwayPriceView .crp-stat .crp-quantity-complete { color:#27714d; }
#customerRailwayPriceView .crp-quantity-pending { color:#6c7b8e; }
#customerRailwayPriceView .crp-product-link { display:inline-block; color:#2468a9; text-decoration:none; border:1px solid #d1e0f3; border-radius:4px; padding:3px 7px; white-space:nowrap; }
#customerRailwayPriceView .crp-product-link:hover { background:#eef5fd; }
#customerRailwayPriceView .crp-empty { display:grid; align-content:start; text-align:center; min-height:100%; box-sizing:border-box; padding:45px 20px; color:#708098; font-size:13px; line-height:1.8; }
#customerRailwayPriceView .crp-error { flex:0 0 auto; padding:9px 12px; margin:0 0 8px; border:1px solid #eac9c1; border-radius:8px; background:#fff4f0; color:#9c4031; font-size:12px; }
#customerRailwayPriceView .crp-pager { display:flex; flex:0 0 auto; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:8px; min-height:54px; border-top:1px solid #e3e9f1; background:#fff; color:#728197; font-size:12px; }
#customerRailwayPriceView .crp-pager>span { margin-right:auto; }
#customerRailwayPriceView .crp-pager label { display:flex; align-items:center; gap:5px; }
#customerRailwayPriceView .crp-pager select { min-height:30px; padding:4px 7px; }
#customerRailwayPriceView .crp-mobile-only { display:none; }
#customerRailwayPriceView .crp-price-basis { box-sizing:border-box; width:min(580px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:20px; border:1px solid #d1deec; border-radius:12px; color:#21364c; background:#fff; }
#customerRailwayPriceView .crp-price-basis::backdrop { background:#21364c70; }
#customerRailwayPriceView .crp-price-basis h3 { margin:0 0 16px; font-size:18px; }
#customerRailwayPriceView .crp-price-basis dl { display:grid; grid-template-columns:minmax(100px,auto) minmax(0,1fr); gap:10px 14px; margin:0 0 16px; font-size:13px; line-height:1.6; }
#customerRailwayPriceView .crp-price-basis dt { color:#74839a; }
#customerRailwayPriceView .crp-price-basis dd { margin:0; overflow-wrap:anywhere; }
#customerRailwayPriceView .crp-price-basis p { font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
@media(min-width:761px) {
  #customerRailwayPriceView .crp-heading { display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center; gap:14px; }
  #customerRailwayPriceView .crp-heading-title { flex:0 1 220px; min-width:160px; }
  #customerRailwayPriceView .crp-stats { display:flex; flex:0 1 auto; flex-wrap:wrap; justify-content:flex-start; align-items:stretch; gap:8px; width:max-content; max-width:100%; }
  #customerRailwayPriceView .crp-stats .crp-stat { box-sizing:border-box; flex:0 0 auto; width:136px; height:56px; min-height:56px; padding:5px 7px; gap:3px; }
  #customerRailwayPriceView .crp-stat:first-child { width:180px; }
  #customerRailwayPriceView .crp-stat .crp-stat-label { flex:0 0 auto; font-size:12px; line-height:18px; white-space:nowrap; }
  #customerRailwayPriceView .crp-stat .crp-stat-value-line { flex:0 0 auto; display:flex; flex-wrap:nowrap; align-items:baseline; justify-content:center; gap:3px; min-width:0; white-space:nowrap; }
  #customerRailwayPriceView .crp-stat .crp-stat-value-line > strong { flex:0 0 auto; font-size:22px; line-height:22px; }
  #customerRailwayPriceView .crp-stat .crp-stat-prefix { flex:0 0 auto; font-size:12px; line-height:18px; }
  #customerRailwayPriceView .crp-stat .crp-stat-note { flex:0 0 auto; margin:0; font-size:12px; line-height:18px; white-space:nowrap; }
  #customerRailwayPriceView .crp-stat .crp-stat-note span { font-size:12px; line-height:18px; }
  #customerRailwayPriceView .crp-stat-desktop-note { display:inline; }
  #customerRailwayPriceView .crp-stat-mobile-note { display:none; }
  #customerRailwayPriceView .crp-stat[data-count-field=listed_model_count] .crp-stat-desktop-note::before { content:"· "; }
  #customerRailwayPriceView .crp-company-name,#customerRailwayPriceView .crp-context-copy { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; overflow-wrap:normal; }
  #customerRailwayPriceView .crp-heading-title .crp-company-name { max-width:220px; }
  #customerRailwayPriceView .crp-context { flex-wrap:nowrap; }
  #customerRailwayPriceView .crp-context>div { flex:1 1 0; min-width:0; }
  #customerRailwayPriceView .crp-context>span { flex:0 0 auto; white-space:nowrap; }
  #customerRailwayPriceView .crp-ellipsis { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; overflow-wrap:normal; }
  #customerRailwayPriceView .crp-brands-table { min-width:1180px; }
  #customerRailwayPriceView .crp-brands-table td { box-sizing:border-box; height:56px; padding:10px; white-space:nowrap; }
  #customerRailwayPriceView .crp-brands-table td:first-child { width:160px; min-width:160px; max-width:160px; }
  #customerRailwayPriceView .crp-brands-table td:first-child .crp-ellipsis { width:140px; }
  #customerRailwayPriceView .crp-brands-table td:nth-child(2) { min-width:180px; }
  #customerRailwayPriceView .crp-brands-table td:nth-child(3),#customerRailwayPriceView .crp-brands-table td:nth-child(5) { min-width:130px; }
  #customerRailwayPriceView .crp-brands-table td:nth-child(4) { min-width:185px; }
  #customerRailwayPriceView .crp-brands-table td:last-child { min-width:320px; }
  #customerRailwayPriceView .crp-cell-inline { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
  #customerRailwayPriceView .crp-cell-inline .crp-sub { display:inline-flex; align-items:center; margin:0; white-space:nowrap; overflow-wrap:normal; }
  #customerRailwayPriceView .crp-inline-note::before { content:"·"; margin-right:5px; }
  #customerRailwayPriceView .crp-brands-table .crp-count-link { height:auto; min-height:0; padding:0 2px; line-height:20px; white-space:nowrap; }
  #customerRailwayPriceView .crp-items-table { min-width:1200px; }
  #customerRailwayPriceView .crp-items-table td { padding:8px 10px; height:60px; box-sizing:border-box; }
  #customerRailwayPriceView .crp-items-table td:first-child { width:300px; min-width:300px; max-width:300px; }
  #customerRailwayPriceView .crp-items-table td:first-child .crp-two-lines { width:280px; }
  #customerRailwayPriceView .crp-two-lines { display:flex; flex-direction:column; justify-content:center; align-items:flex-start; gap:3px; min-width:0; max-width:100%; }
  #customerRailwayPriceView .crp-two-lines > .crp-sub { margin:0; line-height:16px; }
  #customerRailwayPriceView .crp-items-table th:nth-child(n+2):nth-child(-n+4),#customerRailwayPriceView .crp-items-table td:nth-child(n+2):nth-child(-n+4) { text-align:center; white-space:nowrap; }
  #customerRailwayPriceView .crp-items-table td:nth-child(5) { min-width:210px; max-width:260px; }
  #customerRailwayPriceView .crp-items-table td:nth-child(5) .crp-two-lines { max-width:240px; }
  #customerRailwayPriceView .crp-result-note { display:flex; align-items:center; gap:7px; max-width:100%; min-width:0; height:18px; color:#74839a; font-size:11px; white-space:nowrap; }
  #customerRailwayPriceView .crp-result-note .crp-ellipsis { flex:1 1 auto; }
  #customerRailwayPriceView .crp-info-link { flex:0 0 auto; height:auto; min-height:0; margin:0; padding:0; border:0; background:none; color:#2166a9; font-size:11px; line-height:18px; text-decoration:underline; white-space:nowrap; }
}
@media(max-width:1100px) {
  #customerRailwayPriceView .crp-heading { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:9px; }
  #customerRailwayPriceView .crp-stats { grid-column:1/-1; grid-row:2; }
  #customerRailwayPriceView .crp-stat { padding:6px; gap:3px; }
  #customerRailwayPriceView .crp-stat span { font-size:11px; }
}
@media(max-width:820px) {
  #customerRailwayPriceView .crp-heading { grid-template-columns:1fr auto; }
  #customerRailwayPriceView .crp-stats { grid-column:1/-1; grid-row:2; }
  #customerRailwayPriceView .crp-heading h2 { font-size:21px; }
}
@media(max-width:760px) {
  #customerRailwayPriceView .crp-desktop-only { display:none; }
  #customerRailwayPriceView .crp-mobile-only { display:block; }
  #customerRailwayPriceView .crp-workspace:has(.crp-items-table) .crp-stats { display:none; }
  body.customer-portal #customer#customer#customer#customer:not(.portal-locked):has(> #customerRailwayPriceView:not(.hidden):not([hidden])) { padding-left:0 !important; }
  body.customer-portal #customer#customer#customer#customer:has(> #customerRailwayPriceView:not(.hidden):not([hidden])) > .customer-portal-tabs-row { width:min(300px,86vw) !important; min-width:min(300px,86vw) !important; transform:translateX(-105%) !important; }
  body.customer-portal #customer#customer#customer#customer.workbench-mobile-open:has(> #customerRailwayPriceView:not(.hidden):not([hidden])) > .customer-portal-tabs-row { transform:translateX(0) !important; }
}
@media(max-width:520px) {
  #customerRailwayPriceView .crp-workspace { gap:7px; padding-top:8px; }
  #customerRailwayPriceView .crp-panel { padding:9px 8px 0; }
  #customerRailwayPriceView .crp-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  #customerRailwayPriceView .crp-stat:first-child { grid-column:1/-1; }
  #customerRailwayPriceView .crp-heading p { max-width:240px; font-size:11px; }
  #customerRailwayPriceView .crp-stat { min-height:56px; gap:5px; }
  #customerRailwayPriceView .crp-stat strong { font-size:20px; }
  #customerRailwayPriceView .crp-stat .crp-stat-prefix { font-size:20px; }
  #customerRailwayPriceView .crp-filters { gap:6px; }
  #customerRailwayPriceView .crp-filters input { flex:1 1 110px; min-width:0; width:120px; }
  #customerRailwayPriceView .crp-filters select { flex:1 1 110px; min-width:0; }
  #customerRailwayPriceView .crp-context { font-size:11px; }
  #customerRailwayPriceView .crp-context>div { align-items:flex-start; }
  #customerRailwayPriceView .crp-pager { min-height:50px; gap:5px; font-size:11px; }
  #customerRailwayPriceView .crp-pager label { display:none; }
  #customerRailwayPriceView .crp-pager button { padding:6px 8px; }
}
@media(max-width:760px) {
  /* Portal phone controls are fixed at 40px. Statistics contain several lines. */
  body.customer-portal.customer-phone-layout #customer#customer#customer#customer #customerRailwayPriceView#customerRailwayPriceView .crp-stat {
    height:auto !important; block-size:auto !important; min-height:62px !important; min-block-size:62px !important; max-height:none !important;
    padding:8px 9px !important; box-sizing:border-box !important; white-space:normal !important; line-height:1.4 !important;
  }
  #customerRailwayPriceView .crp-stat > span,#customerRailwayPriceView .crp-stat > strong { flex:0 0 auto; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
  #customerRailwayPriceView .crp-filters select[name=company_id] { flex:1 1 100%; width:100%; min-width:0; text-overflow:ellipsis; }
  #customerRailwayPriceView .crp-context>div { flex-wrap:wrap; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) { display:block; min-width:0; width:100%; table-layout:auto; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) tbody { display:grid; gap:10px; padding:8px 0; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0; min-width:0; border:1px solid #dce5ef; border-radius:9px; overflow:hidden; background:#fff; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) td { display:block; min-width:0; max-width:none; padding:10px; border:0; border-bottom:1px solid #edf1f6; overflow-wrap:anywhere; background:#fff; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) td::before { content:attr(data-label); display:block; margin-bottom:5px; color:#738298; font-size:11px; font-weight:400; line-height:1.45; white-space:normal; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) td:first-child { position:static; grid-column:1/-1; min-width:0; max-width:none; box-shadow:none; background:#f5f8fc; }
  #customerRailwayPriceView .crp-brands-table td:nth-child(2),#customerRailwayPriceView .crp-items-table td:nth-child(5),#customerRailwayPriceView .crp-table:not(.crp-prices-table) td:last-child { grid-column:1/-1; }
  #customerRailwayPriceView .crp-table:not(.crp-prices-table) .crp-money { white-space:normal; }
  #customerRailwayPriceView .crp-brands-table td:nth-child(5) .crp-gap-links { gap:7px; }
}


/* Project registration: the same four product fields on customer and admin. */
#customerProjectFormModal .customer-project-dialog { width: min(820px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; }
#customerProjectFormModal .customer-project-form-grid { grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr); gap: 10px 14px; }
#customerProjectFormModal .customer-project-form-grid > label { gap: 7px; font-size: 14px; }
#customerProjectFormModal .customer-project-form-grid input, #adminProjectForm .admin-project-grid input, #adminProjectForm .admin-project-grid select { min-width: 0; height: 38px; padding: 7px 10px; font-size: 14px; }
#customerProjectFormModal .customer-project-form-grid > label small, .project-form-help { display: block; margin-top: 5px; color: #7989a4; font-size: 12px; font-weight: 400; line-height: 1.6; }
#customerProjectFormModal .customer-project-note-field textarea, #adminProjectNote { height: 58px; min-height: 58px; padding: 7px 10px; font-size: 14px; resize: vertical; }
.project-products-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#adminProjectForm .admin-project-dialog { width: min(820px, calc(100vw - 32px)); }
#adminProjectForm .admin-project-products { grid-column: 1 / -1; }
#customerProjectItems, #adminProjectItems { display: grid; gap: 12px; margin: 8px 0; }
#customerProjectItems .project-item-editor, #adminProjectItems .project-item-editor { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid #dde5f0; border-radius: 10px; background: #f9fbfe; align-items: end; }
#customerProjectItems .project-item-editor > label, #adminProjectItems .project-item-editor > label { grid-column: auto; display: grid; gap: 5px; min-width: 0; margin: 0; color: #63758f; font-size: 12px; font-weight: 500; }
#customerProjectItems .project-item-editor input, #customerProjectItems .project-item-editor select, #adminProjectItems .project-item-editor input, #adminProjectItems .project-item-editor select { width: 100%; min-width: 0; height: 38px; padding: 7px 9px; border: 1px solid #ced9ec; border-radius: 7px; background: #fff; color: #30425b; font-size: 14px; }
.project-item-editor .project-product-picker { position: relative; grid-column: 1 / -1; min-width: 0; padding-right: 38px; }
.project-item-editor > button { position: absolute; top: 12px; right: 12px; width: 30px; height: 38px; padding: 0; color: #c44141; border: 1px solid #f2cece; border-radius: 7px; background: #fff5f5; }
.project-item-source { grid-column: 1 / -1; color: #8091a8; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.project-product-results { position: absolute; z-index: 65; left: 0; right: 0; top: calc(100% + 4px); max-height: 270px; overflow-y: auto; padding: 4px; color: #4c5f7a; background: #fff; border: 1px solid #cbd8ec; border-radius: 9px; box-shadow: 0 10px 28px #1f355523; }
.project-product-results > button { display: grid; width: 100%; gap: 4px; padding: 9px 10px; text-align: left; border: 0; border-bottom: 1px solid #edf1f7; border-radius: 5px; background: #fff; color: #314661; font-size: 13px; }
.project-product-results > button:hover, .project-product-results > button:focus { background: #eff5ff; }
.project-product-results small { color: #7b8da5; font-size: 11px; }
.project-product-results p { padding: 10px; font-size: 13px; }
.project-product-pages { display: flex; align-items: center; justify-content: flex-end; gap: 10px; position: sticky; bottom: -4px; padding: 8px; background: #f8faff; font-size: 12px; }
.project-product-pages button { height: 30px; padding: 4px 9px; border: 1px solid #d9e2ef; border-radius: 5px; background: #fff; color: #41699e; font-size: 12px; }
.project-product-pages button:disabled { color: #a6b0be; }
.project-report-links { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid #dfe8f4; border-radius: 8px; background: #f4f8ff; font-size: 13px; }
.project-report-links a { color: #315ccc; text-decoration: none; }
.project-report-links small { color: #7789a4; }
.project-report-product-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.project-report-product-table th, .project-report-product-table td { padding: 9px 7px; border-bottom: 1px solid #e8edf4; text-align: left; overflow-wrap: anywhere; white-space: normal; height: auto; max-width: none; }
.project-report-product-table th { color: #728198; background: #f6f8fc; font-size: 12px; }
.project-report-product-table-wrap { min-width: 0; width: 100%; overflow: visible; }
.project-report-product-table .product-attribute-col { width: 30%; }
.project-report-product-table .product-brand-col { width: 17%; }
.project-report-product-table .product-model-col { width: 35%; }
.project-report-product-table .product-quantity-col { width: 18%; }
.project-report-product-table td small { display: block; margin-top: 3px; color: #8491a4; font-size: 11px; font-weight: 400; }
.project-report-table td:nth-child(3) strong { color: #285ac2; }
@media (max-width: 760px) {
  #customerProjectFormModal .customer-project-dialog { width: calc(100vw - 20px); padding: 16px; max-height: calc(100dvh - 24px); }
  #customerProjectFormModal .customer-project-form-grid { grid-template-columns: 1fr; gap: 12px; }
  #customerProjectItems .project-item-editor, #adminProjectItems .project-item-editor { grid-template-columns: 1fr 1fr; gap: 9px; padding: 10px; }
  .project-item-editor > button { position: absolute; top: 11px; right: 10px; width: 30px; height: 34px; }
  .project-item-editor .project-product-picker { padding-right: 40px; }
  .project-product-results { right: 0; }
  #customerProjectFormModal .customer-project-dialog-actions { flex-wrap: wrap; gap: 8px; }
  #customerProjectFormModal .customer-project-dialog-actions > span { flex-basis: 100%; }
  .project-report-product-table th, .project-report-product-table td { padding: 8px 5px; }
}
.project-batch-note { grid-column: 1 / -1; color: #73849c; font-size: 12px; }
.project-batch-note summary { cursor: pointer; margin-bottom: 7px; }
.project-batch-note input { width: 100%; }
/* This modal is mounted on body: transformed/scrolling workspaces must not clip it. */
#customerProjectFormModal {
  position: fixed; inset: 0; z-index: 2600; width: 100%; height: 100dvh;
  min-width: 0; min-height: 0; margin: 0; padding: 16px; box-sizing: border-box;
  display: grid; place-items: center; overflow: hidden;
  background: rgba(24, 34, 54, .5); backdrop-filter: blur(2px);
}
#customerProjectFormModal.hidden { display: none !important; }
#customerProjectFormModal > .customer-project-dialog {
  display: flex; flex-direction: column; width: min(820px, 100%); max-width: 100%;
  min-width: 0; min-height: 0; max-height: calc(100dvh - 32px); margin: 0;
  overflow: hidden; padding: 20px; box-sizing: border-box; background: #fff;
  border: 1px solid #dce4f0; border-radius: 14px;
}
#customerProjectFormModal .customer-project-dialog-head {
  flex: 0 0 auto; min-width: 0; margin-bottom: 12px; padding-bottom: 12px;
}
#customerProjectFormModal .customer-project-dialog-head h3 { font-size: 20px; }
#customerProjectFormModal { color: #30425b; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#customerProjectFormModal .customer-project-form-grid > label input,
#customerProjectFormModal .customer-project-form-grid textarea,
#customerProjectFormModal .project-batch-note input {
  width: 100%; box-sizing: border-box; border: 1px solid #ced9ec; border-radius: 8px;
  background: #fff; color: #30425b; font: inherit; padding: 9px 11px;
}
#customerProjectFormModal input:focus, #customerProjectFormModal textarea:focus, #customerProjectFormModal select:focus {
  outline: 2px solid #a8bbff; outline-offset: 1px; border-color: #6c8ef0;
}
#customerProjectFormModal .project-products-head > button,
#customerProjectFormModal .customer-project-dialog-actions > button {
  min-height: 38px; padding: 8px 17px; border: 1px solid #d7e1f1; border-radius: 8px;
  background: #f7f9fd; color: #466083; font-size: 14px; font-weight: 600; cursor: pointer;
}
#customerProjectFormModal .customer-project-dialog-actions > .primary {
  border-color: #3d63db; background: #3d63db; color: #fff;
}
#customerProjectFormModal .customer-project-dialog-head p { overflow-wrap: anywhere; }
#customerProjectFormModal .customer-project-form-grid {
  flex: 1 1 auto; min-height: 0; min-width: 0; overflow-x: hidden; overflow-y: auto;
  overscroll-behavior: contain; padding: 3px 5px 5px 0; scrollbar-gutter: stable;
}
#customerProjectFormModal .customer-project-form-grid > * { min-width: 0; }
#customerProjectFormModal .customer-project-dialog-actions {
  flex: 0 0 auto; min-width: 0; margin-top: 12px; padding-top: 12px; background: #fff;
}
#customerProjectFormModal .customer-project-dialog-actions > span { min-width: 0; overflow-wrap: anywhere; }
.project-products-heading, .project-category-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.project-category-tags:empty { display: none; }
.project-category-tag { display: inline-flex; padding: 3px 8px; border-radius: 5px; background: #edf2ff; color: #4765c4; font-size: 12px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
.project-category-tag.pending { background: #fff5e6; color: #977032; }
.project-quantity-control { position: relative; display: flex; align-items: center; min-width: 0; }
.project-quantity-control > [data-project-unit-suffix] { position: absolute; right: 9px; color: #7d8da1; font-size: 12px; pointer-events: none; }
.project-quantity-control:has(> [data-project-unit-suffix]:not([hidden])) input { padding-right: 38px !important; }
.project-window-actions, #customerProjectFormModal .customer-project-dialog-head > .project-window-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.project-window-actions > .ghost { min-height: 32px; padding: 5px 10px; border: 1px solid #dce4f0; border-radius: 7px; color: #617594; background: #f7f9fc; font-size: 12px; cursor: pointer; white-space: nowrap; }
#customerProjectFormModal .customer-project-products-label { font-size: 14px; }
#customerProjectFormModal #addCustomerProjectItemBtn { min-height: 32px; padding: 5px 10px; border: 1px solid #dce4f0; border-radius: 7px; color: #466083; background: #f7f9fc; font-size: 12px; white-space: nowrap; }
/* Keep the existing detail IDs and event bindings while presenting a centered window. */
#projectReportDetailDrawer { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 2500; overflow: hidden; }
#projectReportDetailDrawer.hidden { display: none; }
#projectReportDetailDrawer > .project-report-drawer-mask { width: 100%; height: 100%; border-radius: 0; }
#projectReportDetailDrawer > .project-report-drawer-panel { position: relative; inset: auto; width: min(860px, calc(100vw - 40px)); max-width: 100%; height: auto; max-height: 80dvh; min-width: 0; min-height: 0; box-sizing: border-box; border: 1px solid #dce4f0; border-radius: 14px; overflow: hidden; box-shadow: 0 22px 60px #14203a40; }
#projectReportDetailDrawer .project-report-drawer-panel > header { padding: 15px 20px; align-items: flex-start; }
#projectReportDetailDrawer .project-report-drawer-panel > header > div:first-child { min-width: 0; }
#projectReportDetailDrawer .project-report-drawer-panel > header h2 { font-size: 19px; line-height: 1.5; overflow-wrap: anywhere; }
#projectReportDetailDrawer .project-report-drawer-body { min-width: 0; padding: 14px 20px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
#projectReportDetailDrawer .project-report-detail-owner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid #dfE7f3; border-radius: 8px; background: #f7f9fd; }
#projectReportDetailDrawer .project-report-detail-owner > div { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-width: 0; }
#projectReportDetailDrawer .project-report-detail-owner small, #projectReportDetailDrawer .project-report-detail-owner span { color: #7f8fa7; font-size: 12px; }
#projectReportDetailDrawer .project-report-detail-owner strong { color: #294466; font-size: 15px; overflow-wrap: anywhere; }
#projectReportDetailDrawer .project-report-detail-owner .project-status { flex: 0 0 auto; }
#projectReportDetailDrawer .project-report-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 8px; gap: 0 20px; }
#projectReportDetailDrawer .project-report-detail-grid > div { display: grid; gap: 4px; min-width: 0; padding: 9px 0; border: 0; border-bottom: 1px solid #eef1f6; border-radius: 0; background: transparent; }
#projectReportDetailDrawer .project-report-detail-grid small { color: #7c8ca3; font-size: 11px; }
#projectReportDetailDrawer .project-report-detail-grid strong { font-size: 13px; line-height: 1.5; font-weight: 500; overflow-wrap: anywhere; }
#projectReportDetailDrawer .project-report-detail-section { margin-top: 14px; }
#projectReportDetailDrawer .project-report-detail-section h4 { margin: 0; font-size: 14px; }
#projectReportDetailDrawer .project-report-detail-section > .project-products-heading { margin-bottom: 8px; }
#projectReportDetailDrawer .project-report-detail-note { padding: 8px 0 0; border: 0; background: transparent; font-size: 13px; line-height: 1.6; }
#projectReportDetailDrawer .project-report-links { margin-top: 12px; padding: 10px 12px; gap: 6px; overflow-wrap: anywhere; }
#projectReportDetailDrawer .project-report-links > button { justify-self: end; min-height: 32px; padding: 5px 12px; font-size: 12px; }
#projectReportDetailDrawer .project-report-drawer-panel > footer { padding: 10px 20px; flex-shrink: 0; }
#projectReportDetailDrawer .project-report-drawer-panel > footer input { min-width: 0; height: 34px; font-size: 12px; }
#projectReportDetailDrawer .project-report-detail-actions { flex-wrap: wrap; gap: 6px; }
#projectReportDetailDrawer .project-report-detail-actions button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
/* Natural column widths reserve room for the project and its purchase scope. */
#projectReports .project-report-table { width: 100%; min-width: 1050px; table-layout: auto; }
#projectReports .project-report-table th, #projectReports .project-report-table td { width: auto; padding-left: 6px; padding-right: 6px; box-sizing: border-box; text-align: center; vertical-align: middle; }
#projectReports .project-report-cell-stack { text-align: center; justify-items: center; }
#projectReports .project-report-table td:nth-child(2) { min-width: 158px; max-width: 260px; }
#projectReports .project-report-table td:nth-child(3) { min-width: 112px; max-width: 170px; }
#projectReports .project-report-table td:nth-child(4) { min-width: 186px; max-width: 290px; }
#projectReports .project-report-table td:nth-child(7) { max-width: 120px; }
#projectReports .project-report-table td:nth-child(7) .project-report-cell-stack { width: 100%; }
#projectReports .project-report-table td:nth-child(7) .project-report-cell-stack > span { width: 100%; }
#projectReports .project-report-table td:nth-child(1) .project-report-cell-stack { min-width: 102px; max-width: 126px; margin: auto; }
#projectReports .project-report-table td:nth-child(9) .project-report-cell-stack { min-width: 70px; max-width: 92px; margin: auto; }
#projectReports .project-report-table td:nth-child(1) .project-report-cell-stack > span,
#projectReports .project-report-table td:nth-child(9) .project-report-cell-stack > strong { white-space: normal; line-height: 1.5; }
#projectReports .project-report-table td:nth-child(2) .project-report-cell-stack > strong,
#projectReports .project-report-table td:nth-child(3) .project-report-cell-stack > strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
#projectReports .project-report-table td:nth-child(9) .project-report-cell-stack > strong { font-size: 11px; }
#projectReports .project-report-table .project-report-table-action { padding: 0 6px; font-size: 11px; white-space: nowrap; }
#projectReports .project-report-products-cell, #projectReports .project-report-quantities-cell { padding-top: 9px; padding-bottom: 9px; vertical-align: middle; }
#projectReports .project-report-line { height: auto; min-height: 46px; padding: 6px 0; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; text-align: center; }
#projectReports .project-report-line + .project-report-line { border-top: 1px solid #e9eef6; }
#projectReports .project-report-line strong, #projectReports .project-report-line small { display: block; overflow: visible; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; line-height: 16px; }
#projectReports .project-report-line strong { font-size: 12px; color: #253952; font-weight: 600; }
#projectReports .project-report-line small { font-size: 11px; color: #7d8ba1; }
#projectReports .project-report-line.quantity { text-align: center; font-variant-numeric: tabular-nums; }
#projectReports .project-report-line.quantity strong { white-space: nowrap; }
#projectReports .project-report-line .unit-pending { color: #997123; font-size: 10px; }
.project-protection-summary, .customer-project-card-summary .project-protection-summary { display: grid; align-content: start; gap: 3px; min-width: 0; line-height: 1.5; }
.project-protection-summary small { color: #7b8ba2; font-size: 11px; font-weight: 400; }
.project-protection-summary .project-protection-remaining { font-size: 12px; line-height: 1.6; font-weight: 600; color: #c83434; }
.project-protection-summary .project-protection-remaining.soon { color: #c83434; }
.project-protection-summary .project-protection-remaining.urgent,
.project-protection-summary .project-protection-remaining.today,
.project-protection-summary .project-protection-remaining.expired { color: #c04242; }
.customer-portal #customerProjectsView .customer-project-card-metrics { flex-wrap: wrap; }
.customer-portal #customerProjectsView .project-protection-summary .project-protection-remaining.normal { color: #c83434; }
.customer-portal #customerProjectsView .project-protection-summary .project-protection-remaining.soon { color: #c83434; }
.customer-portal #customerProjectsView .project-protection-summary .project-protection-remaining.urgent,
.customer-portal #customerProjectsView .project-protection-summary .project-protection-remaining.today,
.customer-portal #customerProjectsView .project-protection-summary .project-protection-remaining.expired { color: #c04242; }
#projectReports .project-report-renew-button { justify-self: center; min-height: 27px; padding: 3px 9px; border: 1px solid #cddcf7; border-radius: 6px; background: #f0f5ff; color: #3b63b1; font-size: 11px; cursor: pointer; }
#projectReports #projectReportStats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; gap: 8px; }
#projectReports #projectReportStats > button { width: 100%; min-width: 0; height: 52px; padding: 8px 12px; grid-column: auto; }
#projectReports #projectReportStats .stat-renewal_pending { color: #aa6b17; border-color: #edcf9c; background: #fff7e9; }
@media (max-width: 760px) {
  #customerProjectFormModal { padding: 10px; }
  #customerProjectFormModal > .customer-project-dialog { width: 100%; max-height: calc(100dvh - 20px); padding: 14px; }
  #customerProjectFormModal .customer-project-dialog-head h3 { font-size: 18px; }
  #customerProjectFormModal .customer-project-dialog-actions > span:empty { display: none; }
  #projectReportDetailDrawer { padding: 10px; }
  #projectReportDetailDrawer > .project-report-drawer-panel { width: 100%; max-height: calc(100dvh - 20px); }
  #projectReportDetailDrawer .project-report-drawer-panel > header, #projectReportDetailDrawer .project-report-drawer-body, #projectReportDetailDrawer .project-report-drawer-panel > footer { padding: 12px; }
  #projectReportDetailDrawer .project-report-drawer-panel > header h2 { font-size: 16px; }
  #projectReportDetailDrawer .project-report-detail-grid { gap: 0 12px; }
  #projectReportDetailDrawer .project-report-drawer-panel > footer { flex-direction: column; align-items: stretch; }
  #projectReportDetailDrawer .project-report-detail-actions { justify-content: flex-end; }
  #maximizeCustomerProjectFormBtn, #maximizeProjectReportDetailBtn { display: none; }
  #projectReports .project-report-table-wrap { border: 0; background: transparent; overflow: visible; }
  #projectReports .project-report-table { display: block; min-width: 0; width: 100%; }
  #projectReports .project-report-table thead { display: none; }
  #projectReports .project-report-table tbody { display: grid; width: 100%; gap: 12px; }
  #projectReports .project-report-table tbody tr { display: grid; width: 100%; box-sizing: border-box; grid-template-columns: minmax(0, 1fr) 100px; min-width: 0; padding: 10px; border: 1px solid #dfe7f2; border-radius: 10px; background: #fff; }
  #projectReports .project-report-table td { display: block; min-width: 0; max-width: none; height: auto; padding: 7px 5px; text-align: left; border: 0; }
  #projectReports .project-report-table td:nth-child(n) { min-width: 0; max-width: none; }
  #projectReports .project-report-table td:nth-child(1) .project-report-cell-stack,
  #projectReports .project-report-table td:nth-child(9) .project-report-cell-stack { min-width: 0; max-width: none; margin: 0; }
  #projectReports .project-report-table td::before { display: block; content: attr(data-label); margin-bottom: 5px; color: #8895a8; font-size: 10px; line-height: 1.5; }
  #projectReports .project-report-table td:nth-child(1), #projectReports .project-report-table td:nth-child(2), #projectReports .project-report-table td:nth-child(3), #projectReports .project-report-table td:nth-child(7), #projectReports .project-report-table td:nth-child(8) { grid-column: 1 / -1; }
  #projectReports .project-report-table td:nth-child(4) { grid-column: 1; }
  #projectReports .project-report-table td:nth-child(5) { grid-column: 2; }
  #projectReports .project-report-table td:nth-child(6) { grid-column: 1 / -1; }
  #projectReports .project-report-table td:nth-child(11) { align-self: end; text-align: right; }
  #projectReports .project-report-table td:nth-child(5)::before { text-align: right; }
  #projectReports .project-report-table td.empty { grid-column: 1 / -1; height: auto; min-height: 100px; }
  #projectReports .project-report-table td.empty::before { display: none; }
  #projectReports .project-report-cell-stack, #projectReports .project-report-cell-stack.project-report-center { text-align: left; justify-items: start; }
  #projectReports .project-report-line.product { text-align: left; }
  #projectReports .project-report-line.quantity { text-align: right; }
  #projectReports .project-report-table .project-status { margin: 0; }
  #projectReports .project-report-table td:nth-child(8) .project-report-cell-stack { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
  #projectReports .project-report-table td:nth-child(8) .project-report-renew-button { margin-left: auto; min-height: 32px; }
  #projectReports .project-report-cell-stack strong, #projectReports .project-report-cell-stack span { white-space: normal; overflow-wrap: anywhere; }
  #projectReports #projectReportStats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  #projectReports #projectReportStats > button:last-child { grid-column: 1 / -1; }
}
/* Customer cards use their content width; expanding one card never stretches its siblings. */
.customer-portal #customerProjectsView .customer-project-results-card { container-name: customer-project-cards; container-type: inline-size; }
.customer-portal #customerProjectsView #customerProjectList.project-report-list { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 12px; min-width: 0; }
.customer-portal #customerProjectsView #customerProjectList.project-report-list.empty { grid-template-columns: minmax(0, 1fr); }
@container customer-project-cards (min-width: 768px) {
  .customer-portal #customerProjectsView #customerProjectList.project-report-list:not(.empty) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container customer-project-cards (min-width: 1280px) {
  .customer-portal #customerProjectsView #customerProjectList.project-report-list:not(.empty) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@supports not (container-type: inline-size) {
  @media (min-width: 768px) {
    .customer-portal #customerProjectsView #customerProjectList.project-report-list:not(.empty) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (min-width: 1280px) {
    .customer-portal #customerProjectsView #customerProjectList.project-report-list:not(.empty) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
}
.customer-portal #customerProjectsView .customer-project-card-compact {
  position: relative; display: flex; flex-direction: column; align-self: start; gap: 0; min-width: 0;
  min-height: 0; height: auto; margin: 0; padding: 13px; box-sizing: border-box;
  border: 1px solid #dce5f1; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #24385707;
}
.customer-portal #customerProjectsView .customer-project-card-compact > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact > header > div { display: grid; gap: 4px; min-width: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-unit-label { color: #8190a5; font-size: 10px; font-weight: 500; line-height: 1.5; }
.customer-portal #customerProjectsView .customer-project-card-compact .project-card-name { display: block; overflow: visible; max-width: 100%; color: #273a56; font-size: 14px; line-height: 1.6; font-weight: 700; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.customer-portal #customerProjectsView .customer-project-card-compact > header .project-status { flex: 0 0 auto; margin: 0; padding: 4px 7px; border-radius: 6px; font-size: 10px; line-height: 1.4; }
.customer-portal #customerProjectsView .customer-project-card-compact > header > .customer-project-card-status { flex: 0 0 auto; justify-items: end; gap: 7px; padding: 2px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-expiry-stamp { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 92px; height: 40px; border: 4px double #d83232; border-radius: 5px; color: #d83232; background: #fffafa; font-size: 20px; font-weight: 800; letter-spacing: 3px; line-height: 1; white-space: nowrap; transform: rotate(-7deg); pointer-events: none; }
.customer-portal #customerProjectsView .customer-project-card-compact [data-project-expiry-stamp][hidden],
.customer-portal #customerProjectsView .customer-project-card-compact [data-project-protection-status][hidden],
.customer-portal #customerProjectsView .customer-project-card-compact [data-project-countdown][hidden] { display: none !important; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-facts { display: grid; min-width: 0; gap: 7px; margin: 11px 0; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-fact { display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: start; gap: 7px; min-width: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-fact > small { padding-top: 2px; color: #8190a5; font-size: 11px; line-height: 1.5; white-space: nowrap; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-fact > b,
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-fact > span { display: block; min-width: 0; max-width: 100%; color: #34465f; font-size: 12px; font-weight: 500; line-height: 1.65; white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-fact > .customer-project-brand-tags { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-brand-tag { display: inline-block; max-width: 100%; padding: 2px 7px; border: 1px solid #dce7fc; border-radius: 5px; background: #f1f5ff; color: #4269b8; font-size: 11px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models { min-width: 0; margin: 1px 0; border: 1px solid #e1e8f3; border-radius: 8px; background: #f8faff; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models > summary { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 6px 9px; box-sizing: border-box; color: #61738f; font-size: 11px; line-height: 1.5; list-style: none; cursor: pointer; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models > summary::-webkit-details-marker,
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcements > summary::-webkit-details-marker { display: none; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-label { color: #8190a5; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models > summary > b { font-size: 11px; font-weight: 600; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-toggle { margin-left: auto; color: #4973ba; font-size: 10px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models[open] .when-closed,
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models:not([open]) .when-open { display: none; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-list { padding: 0 9px; min-width: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-row { display: grid; grid-template-columns: minmax(0, 62px) minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; padding: 8px 0; border-top: 1px solid #e3eaf5; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-brand { padding: 2px 0; color: #5173a8; font-size: 11px; font-weight: 600; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-info { display: grid; min-width: 0; gap: 3px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-info > strong { display: block; min-width: 0; color: #30445f; font-size: 12px; font-weight: 600; line-height: 1.55; white-space: normal; overflow: visible; overflow-wrap: anywhere; word-break: normal; text-overflow: clip; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-model-info > small { min-width: 0; color: #8390a3; font-size: 10px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; min-width: 0; margin-top: 2px; padding: 7px 9px; border: 1px solid #f2dddd; border-radius: 8px; background: #fff8f7; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection > span { display: grid; gap: 3px; min-width: 0; color: #7f8b9d; font-size: 10px; line-height: 1.5; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection time { color: #596980; font-size: 12px; font-variant-numeric: tabular-nums; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-countdown { color: #df3735; font-size: 14px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-countdown > strong { color: inherit; font-size: 16px; font-weight: 750; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection.normal > span:first-child { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-countdown[data-project-countdown] { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; width: 100%; color: #df3735; font-size: 14px; font-variant-numeric: tabular-nums; }
.customer-portal #customerProjectsView .customer-project-card-compact [data-project-countdown-days],
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-countdown > [data-project-countdown-clock] { color: inherit; font-size: 18px; font-weight: 750; line-height: 1.4; }
.customer-portal #customerProjectsView .customer-project-card-compact [data-project-countdown-clock] { display: inline-block; min-width: 8ch; white-space: nowrap; letter-spacing: .4px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection.expired { border-color: #efcccc; background: #fff5f4; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection.inactive { border-color: #e3e7ed; background: #f7f9fc; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection.inactive .customer-project-countdown { color: #8994a4; font-size: 14px; }
.customer-portal #customerProjectsView .customer-project-card-compact [data-customer-project-renew] { min-height: 27px; padding: 4px 8px; border: 1px solid #c9d9f7; border-radius: 6px; background: #f4f7ff; color: #4169b0; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; cursor: pointer; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-protection > .customer-project-renewal-pending { display: inline-block; max-width: 100%; padding: 3px 7px; border-radius: 5px; background: #fff0d7; color: #a16a20; font-size: 11px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcements { min-width: 0; margin-top: 10px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcements > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: #577198; font-size: 11px; line-height: 1.6; list-style: none; cursor: pointer; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcements > summary::before { content: "›"; flex: 0 0 auto; color: #6483b2; font-size: 16px; line-height: 1; transition: transform .15s; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcements[open] > summary::before { transform: rotate(90deg); }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-review-badge { padding: 1px 5px; border-radius: 4px; color: #ae741e; background: #fff2d9; font-size: 10px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-list { display: grid; gap: 7px; margin-top: 6px; padding: 8px; border: 1px solid #e3eaf5; border-radius: 7px; background: #f8faff; font-size: 11px; line-height: 1.7; white-space: normal; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-list > div { min-width: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-list a { color: #456ab2; text-decoration: none; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-list small { display: block; color: #8693a6; font-size: 10px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-no-announcements { margin: 9px 0 0; color: #8b97a8; font-size: 11px; line-height: 1.5; }
.customer-portal #customerProjectsView .customer-project-card-compact > footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e9eef5; }
.customer-portal #customerProjectsView .customer-project-card-compact > .customer-project-card-footer-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-width: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-toggle { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-start; gap: 3px; min-width: 0; min-height: 28px; padding: 0; border: 0; background: transparent; color: #5274a5; font: inherit; font-size: 11px; line-height: 1.6; text-align: left; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-toggle::before { content: "›"; flex: 0 0 auto; color: #6483b2; font-size: 15px; line-height: 1; transition: transform .15s; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-toggle[aria-expanded="true"]::before { transform: rotate(90deg); }
.customer-portal #customerProjectsView .customer-project-card-compact > .customer-project-card-footer-row .customer-project-no-announcements { margin: 0; }
.customer-portal #customerProjectsView .customer-project-card-compact > .customer-project-card-footer-row > [data-customer-project-edit] { justify-self: end; white-space: nowrap; }
.customer-portal #customerProjectsView .customer-project-card-compact > .customer-project-card-footer-row > .project-report-actions { margin: 0; flex: 0 0 auto; justify-self: end; }
.customer-portal #customerProjectsView .customer-project-card-compact > .customer-project-card-footer-row > .project-report-actions > button { white-space: nowrap; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-panel { min-width: 0; margin-top: 8px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-panel[hidden] { display: none; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-panel > small { display: block; color: #8290a4; font-size: 10px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-note { min-width: 0; margin-top: 8px; color: #7b8b9f; font-size: 11px; line-height: 1.7; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-note > summary { cursor: pointer; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-note > p { margin: 5px 0 0; padding: 7px 9px; border: 1px solid #e2e9f3; border-radius: 6px; background: #f8faff; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-renewal-feedback { flex: 1 1 100%; color: #a26937; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.customer-portal #customerProjectsView .customer-project-card-compact > footer .customer-project-card-tools { margin-left: auto; flex-wrap: wrap; gap: 7px; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-card-detail { position: static; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-card-detail > div { position: absolute; inset: auto 12px 46px; width: auto; max-width: none; max-height: min(320px, calc(100% - 60px)); overflow: auto; box-sizing: border-box; }
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-models > summary:focus-visible,
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcements > summary:focus-visible,
.customer-portal #customerProjectsView .customer-project-card-compact .customer-project-announcement-toggle:focus-visible,
.customer-portal #customerProjectsView .customer-project-card-compact [data-customer-project-renew]:focus-visible { outline: 2px solid #93ace7; outline-offset: 2px; border-radius: 4px; }
/* The renewal dialog is shared by customer requests and administrator review. */
#projectRenewalModal.project-renewal-dialog { width: min(620px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; box-sizing: border-box; overflow: hidden; color: #30425b; border: 1px solid #dce5f1; border-radius: 12px; background: #fff; box-shadow: 0 20px 70px #14213b38; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#projectRenewalModal.project-renewal-dialog[open] { display: flex; flex-direction: column; }
#projectRenewalModal::backdrop { background: rgba(24, 34, 54, .5); backdrop-filter: blur(2px); }
#projectRenewalModal .project-renewal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 0 0 auto; min-width: 0; padding: 14px 18px; border-bottom: 1px solid #e5ebf4; }
#projectRenewalModal .project-renewal-heading h3 { margin: 0; color: #2d4261; font-size: 18px; line-height: 1.5; }
#projectRenewalModal .project-renewal-heading > div { display: flex; flex: 0 0 auto; gap: 7px; }
#projectRenewalModal .project-renewal-dialog-body { display: grid; gap: 12px; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 15px 18px; overscroll-behavior: contain; }
#projectRenewalModal .project-renewal-summary { padding: 10px 12px; border: 1px solid #e1e8f3; border-radius: 8px; background: #f7f9fd; color: #65758e; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#projectRenewalModal .project-renewal-summary > strong { display: block; color: #304661; font-size: 13px; }
#projectRenewalModal .project-renewal-summary > p { margin: 5px 0 0; }
#projectRenewalModal .project-renewal-dialog-body > label { display: grid; gap: 7px; min-width: 0; color: #576b86; font-size: 13px; line-height: 1.5; }
#projectRenewalModal textarea { display: block; width: 100%; min-height: 84px; max-height: 240px; box-sizing: border-box; padding: 9px 11px; border: 1px solid #ccd9ec; border-radius: 7px; background: #fff; color: #30425b; font: inherit; font-size: 13px; line-height: 1.6; resize: vertical; }
#projectRenewalModal textarea:focus { outline: 2px solid #a8baff; outline-offset: 1px; border-color: #6b88dc; }
#projectRenewalModal .project-renewal-result { color: #af5047; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#projectRenewalModal .project-renewal-result:empty { display: none; }
#projectRenewalModal .project-renewal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; margin: 0; padding: 11px 18px; border-top: 1px solid #e5ebf4; background: #fff; }
#projectRenewalModal button { min-height: 32px; padding: 6px 11px; border: 1px solid #d4dff0; border-radius: 7px; color: #587195; background: #f7f9fd; font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; }
#projectRenewalModal #submitProjectRenewalBtn { padding-left: 16px; padding-right: 16px; color: #fff; background: #4166d8; border-color: #4166d8; }
#projectRenewalModal #rejectProjectRenewalBtn { color: #b64f48; background: #fff4f2; border-color: #f0d3d0; }
#projectRenewalModal button:disabled { opacity: .55; cursor: default; }
#projectRenewalModal [hidden] { display: none !important; }
@media (max-width: 760px) {
  #projectRenewalModal.project-renewal-dialog { width: calc(100vw - 20px); max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  #projectRenewalModal .project-renewal-heading, #projectRenewalModal .project-renewal-dialog-body, #projectRenewalModal .project-renewal-actions { padding: 12px; }
  #projectRenewalModal .project-renewal-heading h3 { font-size: 16px; }
  #projectRenewalModal #maximizeProjectRenewalBtn { display: none; }
}

/* Project status colors are shared across cards, the table, and detached dialogs. */
.project-status.protected, .project-report-detail-owner .project-status.protected { color: #2855c6; background: #e9efff; }
.project-status.done, .project-report-detail-owner .project-status.done { color: #137a47; background: #e4f7ed; }
.project-status.expired { color: #bb3636; background: #fff0ef; }
#projectReports #projectReportStats .stat-protected, .customer-project-stats .stat-protected { color: #2855c6; border-color: #bfd0ff; background: #edf3ff; }
#projectReports #projectReportStats .stat-done, .customer-project-stats .stat-done { color: #137a47; border-color: #bce4cc; background: #edf9f1; }
#projectReports #projectReportStats .stat-expiring_7 { color: #bb3636; border-color: #efc6c6; background: #fff3f2; }
#projectReportDetailDrawer .project-report-drawer-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
#projectReportDetailDrawer .project-report-drawer-body { min-height: 0; }
#projectReportDetailDrawer .project-report-detail-grid .wide { grid-column: 1 / -1; }
#adminProjectForm .admin-project-dialog { box-sizing: border-box; }
#adminProjectForm .admin-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
#adminProjectForm .admin-project-dialog > label { margin-top: 10px; }
#adminProjectForm #adminProjectNote { box-sizing: border-box; }
#customerProjectFormModal .customer-project-dialog-head { margin-bottom: 10px; padding-bottom: 10px; }
#customerProjectFormModal .customer-project-dialog-actions { margin-top: 10px; padding-top: 10px; }
#customerProjectFormModal .customer-project-form-grid { align-content: start; }
/* Single-name creation shares the library's list, so duplicate names remain visible. */
#projectNameLibraryModal .project-name-library-tools { grid-template-columns: minmax(180px, 1fr) auto 160px 72px; align-items: center; }
#projectNameLibraryModal .project-name-library-tools > button { white-space: nowrap; }
#projectNameLibraryModal .project-name-library-create { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 12px 0 0; padding: 14px; border: 1px solid #dce6f5; border-radius: 9px; background: #f7faff; }
#projectNameLibraryModal .project-name-library-create[hidden] { display: none; }
#projectNameLibraryModal .project-name-library-create > label { display: block; min-width: 0; color: #617491; font-size: 12px; font-weight: 500; }
#projectNameLibraryModal .project-name-library-create input { display: block; width: 100%; height: 36px; min-width: 0; box-sizing: border-box; margin-top: 6px; padding: 7px 9px; font-size: 13px; }
#projectNameLibraryModal .project-name-library-create-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
#projectNameLibraryModal .project-name-library-create-actions button { min-height: 32px; padding: 6px 12px; font-size: 12px; }
#projectNameLibraryModal #projectNameLibraryCreateStatus { grid-column: 1 / -1; margin: 0; color: #687b98; font-size: 12px; overflow-wrap: anywhere; }
#projectNameLibraryModal #projectNameLibraryCreateStatus:empty { display: none; }
#projectNameLibraryModal #projectNameLibraryCreateStatus.success { color: #24754b; }
#projectNameLibraryModal #projectNameLibraryCreateStatus.error { color: #bf3838; }
#projectNameLibraryModal .project-name-library-row.is-highlighted { background: #edf4ff; box-shadow: inset 3px 0 #426cd4; }
#projectNameLibraryModal .project-name-library-row strong { white-space: normal; overflow-wrap: anywhere; }
#projectNameLibraryModal .project-name-library-row { grid-template-columns: minmax(170px,1.2fr) minmax(120px,1fr) 76px 64px 132px; gap: 10px; }
#projectNameLibraryModal .project-name-library-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
#projectNameLibraryModal .project-name-library-row-actions button { min-width: 60px; padding: 7px 10px; }
#projectNameLibraryModal .project-name-library-row-actions .project-name-library-delete { border-color: #edc7cc; color: #bc3447; background: #fff7f8; }
#projectNameLibraryModal .project-name-library-row-actions .project-name-library-delete:hover:not(:disabled) { border-color: #d47380; background: #ffedef; }
#projectNameLibraryModal .project-name-library-form-title { grid-column: 1 / -1; color: #2a4268; font-size: 14px; }
@media (max-width: 760px) {
  #projectNameLibraryModal .project-name-library-tools { grid-template-columns: minmax(0, 1fr) auto; }
  #projectNameLibraryModal .project-name-library-tools > input { grid-column: 1 / -1; }
  #projectNameLibraryModal .project-name-import { min-width: 0; }
  #projectNameLibraryModal .project-name-library-create { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  #projectNameLibraryModal .project-name-library-row { grid-template-columns: minmax(0,1fr) 64px; gap: 8px; }
  #projectNameLibraryModal .project-name-library-row > span { grid-column: 1 / -1; grid-row: 2; white-space: normal; overflow-wrap: anywhere; }
  #projectNameLibraryModal .project-name-library-row > small { display: none; }
  #projectNameLibraryModal .project-name-library-row > [data-use-project-name] { grid-column: 2; grid-row: 1; }
  #projectNameLibraryModal .project-name-library-row-actions { grid-column: 1 / -1; grid-row: 3; }
  #adminProjectForm .admin-project-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Scoped procurement comparison: current record stays left, one candidate right. */
.project-comparison-badge { display: grid; gap: 3px; max-width: 260px; margin-top: 7px; padding: 7px 9px; border: 1px solid #efd2a6; border-radius: 7px; background: #fff8ed; color: #945b13; text-align: left; white-space: normal; cursor: pointer; font: inherit; font-size: 12px; line-height: 1.5; }
.project-comparison-badge span { overflow-wrap: anywhere; }
.project-comparison-badge small { color: #315eb9; text-decoration: underline; }
.project-comparison-badge.reviewed { color: #287052; border-color: #c4dfd0; background: #f0faf5; }
#projectComparisonModal { width: min(1220px, calc(100vw - 36px)); max-width: calc(100vw - 36px); max-height: calc(100dvh - 36px); padding: 0; box-sizing: border-box; border: 1px solid #dce4ef; border-radius: 14px; background: #fff; color: #293e59; box-shadow: 0 22px 80px #18283b38; font: 13px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; overflow: hidden; }
#projectComparisonModal[open] { display: flex; flex-direction: column; }
#projectComparisonModal::backdrop { background: #14223888; backdrop-filter: blur(2px); }
#projectComparisonModal .project-comparison-heading { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 15px 20px; border-bottom: 1px solid #e3eaf3; }
#projectComparisonModal h3 { margin: 0; font-size: 19px; }
#projectComparisonModal .project-comparison-heading p { margin: 5px 0 0; color: #697d98; font-size: 12px; }
#projectComparisonModal .project-comparison-body { min-height: 0; padding: 14px 20px; overflow: auto; overscroll-behavior: contain; }
#projectComparisonModal #projectComparisonStatus { margin: 0 0 12px; padding: 9px 12px; border: 1px solid #e9d7b9; border-radius: 7px; background: #fff9ef; color: #8a5d20; overflow-wrap: anywhere; }
#projectComparisonModal .project-comparison-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 600; }
#projectComparisonModal select { flex: 1; min-width: 0; max-width: 100%; height: 36px; padding: 6px 9px; border: 1px solid #ccd9ea; border-radius: 6px; background: #fff; color: #304969; font: inherit; }
#projectComparisonModal .project-comparison-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
#projectComparisonModal .project-comparison-report { min-width: 0; border: 1px solid #dce5ef; border-radius: 9px; overflow: hidden; }
#projectComparisonModal .project-comparison-report h4 { margin: 0; padding: 10px 13px; color: #275baf; background: #eef4ff; border-bottom: 1px solid #dce5ef; font-size: 15px; }
#projectComparisonModal .project-comparison-report.original h4 { color: #566c8a; background: #f5f7fb; }
#projectComparisonModal .project-comparison-report h4 small { display: block; margin-top: 3px; font-size: 11px; color: #6d819e; font-weight: 400; }
#projectComparisonModal dl { margin: 0; padding: 3px 13px; }
#projectComparisonModal dl > div { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 9px; padding: 9px 0; border-bottom: 1px solid #ecf0f6; }
#projectComparisonModal dt { color: #70839d; }
#projectComparisonModal dd { margin: 0; min-width: 0; color: #293f5b; overflow-wrap: anywhere; white-space: pre-wrap; }
#projectComparisonModal h5 { margin: 0; padding: 10px 13px 6px; color: #536d91; font-size: 12px; }
#projectComparisonModal .project-comparison-products { display: grid; gap: 8px; padding: 0 12px 12px; }
#projectComparisonModal .project-comparison-product { display: grid; gap: 3px; min-width: 0; padding: 10px 11px; border: 1px solid #e1e8f1; border-radius: 7px; background: #fbfcfe; overflow-wrap: anywhere; }
#projectComparisonModal .project-comparison-product.matched { border-color: #eccb8f; background: #fff8e9; box-shadow: inset 3px 0 #e0a339; }
#projectComparisonModal .project-comparison-product strong { font-size: 13px; }
#projectComparisonModal .project-comparison-model { color: #4d6585; font-weight: 500; }
#projectComparisonModal .project-comparison-product small { color: #7c6b43; }
#projectComparisonModal .project-comparison-product .quantity-different { color: #a66316; font-weight: 600; }
#projectComparisonModal .project-comparison-check { display: flex; align-items: center; gap: 8px; margin: 12px 0 5px; color: #325a95; font-weight: 600; }
#projectComparisonModal input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 auto; margin: 0; }
#projectComparisonModal #projectComparisonDecision { margin-top: 14px; padding-top: 12px; border-top: 1px solid #e4eaf2; }
#projectComparisonModal #projectComparisonDecision > label { display: block; margin-bottom: 6px; font-weight: 600; }
#projectComparisonModal textarea { width: 100%; min-height: 78px; max-height: 180px; padding: 9px 11px; box-sizing: border-box; border: 1px solid #cbd8e9; border-radius: 7px; color: #2d4565; font: inherit; resize: vertical; }
#projectComparisonModal #projectComparisonProgress, #projectComparisonModal .project-comparison-reviewed, #projectComparisonModal .project-comparison-audit { margin: 7px 0 0; color: #657b99; font-size: 12px; overflow-wrap: anywhere; }
#projectComparisonModal .project-comparison-audit { padding: 0 13px 12px; }
#projectComparisonModal .project-comparison-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #e0e8f2; background: #fff; }
#projectComparisonModal button { min-height: 34px; padding: 7px 11px; border: 1px solid #d3deee; border-radius: 7px; background: #f7f9fd; color: #4b6487; font: inherit; cursor: pointer; }
#projectComparisonModal button.primary { color: #fff; background: #3d63d8; border-color: #3d63d8; }
#projectComparisonModal button.danger { color: #b44942; background: #fff4f2; border-color: #edcecb; }
#projectComparisonModal button:disabled { opacity: .5; cursor: default; }
#projectComparisonModal button:focus-visible, #projectComparisonModal select:focus, #projectComparisonModal textarea:focus { outline: 2px solid #a5baff; outline-offset: 2px; }
#projectComparisonModal [hidden] { display: none !important; }
.customer-project-review-feedback { margin: 8px 0 0; padding: 8px 10px; border-radius: 6px; color: #935e27; background: #fff7e9; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #projectComparisonModal { width: calc(100vw - 18px); max-width: calc(100vw - 18px); max-height: calc(100dvh - 18px); }
  #projectComparisonModal .project-comparison-heading, #projectComparisonModal .project-comparison-body, #projectComparisonModal .project-comparison-actions { padding: 12px; }
  #projectComparisonModal h3 { font-size: 17px; }
  #projectComparisonModal .project-comparison-columns { grid-template-columns: minmax(0, 1fr); }
  #projectComparisonModal .project-comparison-selector { display: grid; gap: 5px; }
  #projectComparisonModal select { width: 100%; }
  #projectComparisonModal dl > div { grid-template-columns: 100px minmax(0, 1fr); }
  #projectComparisonModal .project-comparison-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #projectComparisonModal .project-comparison-actions button { padding: 8px 6px; font-size: 12px; }
}
#projectReports .project-report-products-cell .project-comparison-badge { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
#projectComparisonModal .project-comparison-history-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 7px; background: #f1f5fb; color: #617591; }


.admin-attachment-dialog {
  box-sizing: border-box;
  width: min(940px, calc(100vw - 28px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid #d7e0ed;
  border-radius: 14px;
  color: #203653;
  background: white;
  padding: 20px;
  box-shadow: 0 20px 70px #182d5550;
}
.admin-attachment-dialog::backdrop { background: #1a29426b; }
.admin-attachment-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-attachment-dialog h2 { margin: 0; font-size: 20px; }
.admin-attachment-dialog p { margin: 6px 0 12px; }
.admin-attachment-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 8px 0; }
.admin-attachment-toolbar label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-attachment-picker input { max-width: min(220px, 60vw); }
.admin-attachment-status { color: #385374; overflow-wrap: anywhere; }
.admin-attachment-table { max-height: 42dvh; overflow: auto; border: 1px solid #e1e8f2; border-radius: 8px; }
.admin-attachment-table table { width: 100%; border-collapse: collapse; min-width: 580px; }
.admin-attachment-table th { position: sticky; top: 0; background: #f3f6fa; z-index: 1; }
.admin-attachment-table th, .admin-attachment-table td { padding: 8px; border-bottom: 1px solid #e7ecf5; text-align: left; }
.admin-attachment-table td:nth-child(2) { width: 25%; overflow-wrap: anywhere; }
.admin-attachment-table td:nth-child(3) { width: 40%; }
.admin-attachment-table select { width: 100%; max-width: 340px; }
.admin-attachment-table small { display: block; margin: 4px 0; color: #596e89; }
.admin-attachment-search { display: flex; gap: 6px; margin-top: 4px; }
.admin-attachment-search input { min-width: 70px; width: 65%; }
.admin-attachment-preview { display: grid; place-items: center; min-height: 90px; padding: 8px; background: #f7f9fc; border-radius: 8px; }
.admin-attachment-preview[hidden] { display: none; }
.admin-attachment-preview img { max-width: 100%; max-height: 62dvh; object-fit: contain; }
.admin-attachment-preview iframe { width: 100%; height: 52dvh; border: 0; }
.product-table .product-certificate-column { text-align: center; }
.product-certificate-column .product-document-cell { justify-content: center; }
#projectReports .project-evidence-cell { min-width: 112px; }
.project-evidence-thumbnails { display: grid; grid-template-columns: repeat(3, 29px); justify-content: center; gap: 3px; margin: 0 auto 4px; }
.project-evidence-thumbnails:empty { display: none; }
.project-evidence-empty { display: block; margin-bottom: 4px; color: #65758a; font-size: 11px; }
.project-evidence-thumbnails button { padding: 0; min-width: 0; width: 29px; height: 29px; overflow: hidden; border: 1px solid #d8e4f6; border-radius: 4px; }
.project-evidence-thumbnails img { display: block; object-fit: cover; }
.project-evidence-hover { position: fixed; z-index: 3000; pointer-events: none; max-width: min(520px, 50vw); max-height: 70dvh; object-fit: contain; background: white; border: 1px solid #d8e4f6; border-radius: 8px; box-shadow: 0 8px 32px #182d5550; }
@media (max-width: 760px) {
  #projectReports .project-report-table td.project-evidence-cell { grid-column: 1 / -1; text-align: left; }
  .project-evidence-thumbnails { justify-content: start; }
}

.admin-attachment-row-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:7px}
.admin-attachment-row-actions label,.product-attachment-replace{position:relative;display:inline-flex;align-items:center;padding:5px 8px;border:1px solid #b9cdec;border-radius:6px;color:#315d94;font-size:12px;cursor:pointer;background:#fff;overflow:hidden}
.admin-attachment-row-actions input[type=file],.product-attachment-replace input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.admin-attachment-row-actions label:has(input:disabled),.product-attachment-replace:has(input:disabled){opacity:.5;cursor:default}
.product-attachment-foot{gap:8px;flex-wrap:wrap}


/* Keep contact fields aligned without changing the project name/month layout. */
#customerProjectFormModal .customer-project-contact-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 7px 14px;
  min-width: 0;
}
#customerProjectFormModal .customer-project-contact-fields > label {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  font-size: 14px;
}
#customerProjectFormModal .customer-project-contact-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  line-height: 1.5;
}
#customerProjectFormModal .customer-project-contact-label > [hidden] { display: none; }
#customerProjectFormModal .customer-project-contact-fields input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ced9ec;
  border-radius: 8px;
  background: #fff;
  color: #30425b;
  font: inherit;
}
#customerProjectFormModal #customerProjectContactHelp {
  grid-column: 1 / -1;
  margin: 0;
  color: #7989a4;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
}
@media (max-width: 760px) {
  #customerProjectFormModal .customer-project-contact-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}


/* Administrator-only project report customer autocomplete. */
#adminProjectForm .admin-project-customer-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
#adminProjectForm .admin-project-customer-picker { position: relative; min-width: 0; }
#adminProjectForm #adminProjectCustomerSearch { box-sizing: border-box; }
#adminProjectForm .admin-project-customer-results { position: absolute; z-index: 80; top: calc(100% + 5px); right: 0; left: 0; max-height: 236px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid #cbd7ee; border-radius: 8px; background: #fff; box-shadow: 0 14px 35px rgba(24, 40, 72, .18); }
#adminProjectForm .admin-project-customer-results button { display: block; width: 100%; min-height: 0; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; line-height: 1.35; text-align: left; cursor: pointer; }
#adminProjectForm .admin-project-customer-results button:hover, #adminProjectForm .admin-project-customer-results button[aria-selected="true"] { background: #edf3ff; }
#adminProjectForm .admin-project-customer-results strong { display: block; overflow: hidden; color: #263954; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
#adminProjectForm .admin-project-customer-results span { display: block; margin-top: 2px; color: #7b879b; font-size: 11px; overflow-wrap: anywhere; }
#adminProjectForm .admin-project-customer-empty { padding: 9px; color: #7b879b; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #adminProjectForm .admin-project-customer-results { position: static; margin-top: 5px; max-height: 220px; }
}


/* Review counts stay independent of the filtered report list. */
.project-report-attention-badge { margin-left: auto; cursor: pointer; }
.project-report-attention-badge.has-unseen-attention { animation: project-report-attention-hop 20s ease-in-out infinite; }
@keyframes project-report-attention-hop { 0%, 2%, 4%, 100% { transform: translateY(0); } 1%, 3% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .project-report-attention-badge { animation: none !important; } }
#projectReportCopyFallback { display: block; width: 100%; min-height: 200px; margin-bottom: 12px; padding: 10px; border: 1px solid #8ca6d3; border-radius: 8px; background: #f5f8ff; color: #17355e; }
@media (max-width: 600px) { #projectReportDetailDrawer .project-report-drawer-panel > header { flex-wrap: wrap; gap: 8px; } }


.project-modal-window { isolation: isolate; }
.project-modal-window-titlebar { cursor: move; touch-action: none; }
.project-modal-window-titlebar :is(button, a, input, select) { cursor: pointer; touch-action: manipulation; }
.project-modal-interacting, .project-modal-interacting * { user-select: none !important; }
.project-modal-resize { position: absolute; z-index: 10; touch-action: none; user-select: none; }
.project-modal-resize[data-project-window-resize=n], .project-modal-resize[data-project-window-resize=s] { left: 14px; right: 14px; height: 7px; cursor: ns-resize; }
.project-modal-resize[data-project-window-resize=n] { top: 0; }
.project-modal-resize[data-project-window-resize=s] { bottom: 0; }
.project-modal-resize[data-project-window-resize=e], .project-modal-resize[data-project-window-resize=w] { top: 14px; bottom: 14px; width: 7px; cursor: ew-resize; }
.project-modal-resize[data-project-window-resize=e] { right: 0; }
.project-modal-resize[data-project-window-resize=w] { left: 0; }
.project-modal-resize[data-project-window-resize=ne], .project-modal-resize[data-project-window-resize=nw], .project-modal-resize[data-project-window-resize=se], .project-modal-resize[data-project-window-resize=sw] { width: 15px; height: 15px; }
.project-modal-resize[data-project-window-resize=ne] { right: 0; top: 0; cursor: nesw-resize; }
.project-modal-resize[data-project-window-resize=nw] { left: 0; top: 0; cursor: nwse-resize; }
.project-modal-resize[data-project-window-resize=se] { right: 0; bottom: 0; cursor: nwse-resize; }
.project-modal-resize[data-project-window-resize=sw] { left: 0; bottom: 0; cursor: nesw-resize; }
.project-modal-resize[data-project-window-resize=se]::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 9px; height: 9px; background: repeating-linear-gradient(135deg, transparent 0 2px, #92a2bb 2px 3px, transparent 3px 5px); clip-path: polygon(100% 0,100% 100%,0 100%); }
.project-modal-maximized .project-modal-resize { display: none; }
@media (max-width: 760px) {
  .project-modal-resize, .project-modal-window [data-project-window-maximize] { display: none !important; }
  .project-modal-window-titlebar { cursor: default; touch-action: auto; }
}


.shipping-portal-tabs,.shipping-link-actions,.shipping-review-tools,#shippingReviewDialog header,#shippingReviewDialog footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.shipping-portal-tabs{margin:0 0 14px;border-bottom:1px solid #dce4ef}
.shipping-portal-tabs button{background:transparent;color:#536883;border:0;border-bottom:2px solid transparent;border-radius:0;padding:8px 13px}
.shipping-portal-tabs [aria-pressed="true"]{color:#304dc5;border-color:#405ad7;font-weight:700}
#orderH5InviteModal[data-portal-mode="supplier"] .order-h5-invite-dialog > :not(.project-invite-head):not(.shipping-portal-tabs):not(#shippingLinkPanel){display:none}
#shippingLinkPanel{padding:12px 0}
#shippingLinkPanel label,#shippingReviewDialog label{display:grid;gap:5px;color:#455978}
#shippingLinkPanel .shipping-link-actions{margin:12px 0}
#shippingLinkResult:not([hidden]){display:grid;grid-template-columns:auto minmax(0,1fr);gap:16px;align-items:center}
#shippingUrl,#shippingSupplier{width:100%}
#shippingReviewDialog{border:1px solid #dbe2ef;border-radius:14px;padding:20px;color:#172e4c;width:min(760px,96vw);max-height:86vh;overflow:auto}
#shippingReviewDialog::backdrop{background:#1b2b4770}
#shippingReviewDialog header,#shippingReviewDialog footer{justify-content:space-between}
#shippingReviewDialog h2{font-size:20px;margin:0}
.shipping-review-tools{margin-top:12px}
.shipping-review-row{display:grid;gap:6px;padding:12px 0;border-top:1px solid #dce4ef;overflow-wrap:anywhere}
.shipping-review-row small,#shippingReviewStatus,#shippingLinkStatus{color:#546681}
.shipping-review-row input{min-height:34px}
@media(max-width:590px){#shippingLinkResult:not([hidden]){grid-template-columns:1fr}}
#shippingLinkPanel [hidden]{display:none!important}
.shipping-link-fields{display:grid;grid-template-columns:minmax(160px,2fr) minmax(100px,1fr) auto;gap:10px;align-items:end}
.shipping-link-fields input,.shipping-link-fields select{width:100%;box-sizing:border-box}
#shippingSupplierMatches button{display:flex;justify-content:space-between;text-align:left;gap:12px;width:100%;padding:8px;border:0;background:white;color:inherit;font:inherit}
#shippingSupplierMatches button[aria-selected="true"],#shippingSupplierMatches button:hover{background:#edf2ff}
#shippingSupplierMatches small,#shippingDeadline,#shippingGeneratedRows small,#shippingRecent small{color:#516984}
#shippingDeadline{display:block;margin:8px 0}
.shipping-generated-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding-top:14px;border-top:1px solid #dce4ef}
.shipping-generated-head strong{margin-right:auto}
#shippingGeneratedRows article{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:10px 2px;border-bottom:1px solid #e0e7f2}
#shippingGeneratedRows article small{grid-column:1}
#shippingGeneratedRows .shipping-row-actions{grid-column:2;grid-row:1/3;display:flex;align-items:center;gap:6px}
#shippingGeneratedRows .shipping-row-actions button{white-space:nowrap}
@media(max-width:480px){#shippingGeneratedRows article{grid-template-columns:minmax(0,1fr)}#shippingGeneratedRows .shipping-row-actions{grid-column:1;grid-row:auto;justify-self:end}}
#shippingRecent{max-height:180px;overflow:auto;margin:10px 0 14px}
#shippingRecent p{margin:4px 0;overflow-wrap:anywhere}
@media(max-width:590px){.shipping-link-fields{grid-template-columns:minmax(0,1fr) 110px}.shipping-link-fields label:last-child{grid-column:1/-1}.shipping-generated-head strong{width:100%}}


/* Floating project preview: the document scrolls inside fixed window chrome. */
#announcementDrawer.announcement-preview-window{position:fixed;inset:auto;box-sizing:border-box;margin:0;padding:0;max-width:none;max-height:none;min-width:0;min-height:0;overflow:hidden;border:1px solid #d6dfef;border-radius:14px;background:#fff;color:#1f2937;box-shadow:0 8px 28px #14244824,0 30px 90px #1424483d}
#announcementDrawer.announcement-preview-window[open]{display:flex;flex-direction:column}
#announcementDrawer.announcement-preview-window::backdrop{background:#17203355;backdrop-filter:blur(2px)}
.announcement-preview-titlebar{display:flex;flex:0 0 54px;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box;min-width:0;padding:0 16px 0 22px;border-bottom:1px solid #e5eaf2;background:#f9fbff;cursor:move;touch-action:none;user-select:none;font-size:13px;font-weight:650;color:#334155}
.announcement-preview-titlebar>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.announcement-preview-number{font-size:12px;font-weight:400;color:#64748b}
.announcement-window-controls{display:flex;align-items:center;gap:4px;flex-shrink:0}
#announcementDrawer .announcement-window-controls button{display:grid;place-items:center;width:32px;height:32px;padding:6px;border:0;border-radius:6px;background:transparent;box-shadow:none;color:#475569;cursor:pointer}
#announcementDrawer .announcement-window-controls button:hover{background:#e9eef9;color:#315bd8}
#announcementDrawer .announcement-window-controls [data-ann-close]:hover{background:#fee7e7;color:#b4232b}
.announcement-window-controls svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.announcement-restore-icon{display:none}
.announcement-window-maximized .announcement-restore-icon{display:block}
.announcement-preview-body{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px 28px 28px;scrollbar-gutter:stable;outline:none}
.announcement-preview-heading{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:12px;color:#596779}
.announcement-preview-heading>[data-ann-preview-status]{margin-left:auto}
#announcementDrawer.announcement-preview-window h2{margin:16px 0 10px;font-size:22px;line-height:1.55;font-weight:700;overflow-wrap:anywhere}
#announcementDrawer.announcement-preview-window p{color:#475569}
#announcementDrawer .announcement-preview-category{margin:0 0 18px;line-height:1.7;overflow-wrap:anywhere}
#announcementDrawer .announcement-preview-deadline{margin:0;padding:12px 16px;background:#f3f6fb}
#announcementDrawer .announcement-preview-deadline .announcement-time-row{grid-template-columns:minmax(0,1fr) max-content;font-size:13px;overflow:visible}
#announcementDrawer .announcement-preview-deadline .announcement-countdown{font-size:13px;padding:6px 10px}
#announcementDrawer .announcement-preview-deadline[data-level=soon]{background:#fffbf1}
#announcementDrawer .announcement-preview-deadline[data-level=urgent]{background:#fff5f4}
#announcementDrawer .announcement-preview-deadline[data-level=critical]{background:#fff0ef;box-shadow:inset 0 0 0 1px #f0acae}
#announcementDrawer.announcement-preview-window .announcement-facts{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 22px;margin:18px 0 22px;padding:18px 20px;border:1px solid #e9edf4;background:#fff;font-size:13px}
#announcementDrawer.announcement-preview-window .announcement-facts small{color:#536175;font-size:12px}
#announcementDrawer.announcement-preview-window .announcement-facts strong{display:block;color:#253347;font-weight:550;line-height:1.55;overflow-wrap:anywhere}
#announcementDrawer.announcement-preview-window h3{margin:22px 0 12px;font-size:15px;color:#253347}
#announcementDrawer.announcement-preview-window .announcement-original{max-height:none;overflow:visible;background:#f7f9fc;color:#334155}
#announcementDrawer.announcement-preview-window .announcement-table-wrap{border:1px solid #e5eaf2;border-radius:8px}
#announcementDrawer.announcement-preview-window .announcement-table-wrap th{color:#475569;background:#f4f7fb}
#announcementDrawer.announcement-preview-window .announcement-table-wrap td{color:#334155;line-height:1.7}
#announcementDrawer.announcement-preview-window .announcement-table-wrap small{color:#596779}
#announcementDrawer .announcement-table-wrap table.announcement-delivery-details{table-layout:fixed!important;min-width:640px!important}
#announcementDrawer .announcement-delivery-details th,#announcementDrawer .announcement-delivery-details td{vertical-align:top;overflow-wrap:anywhere}
#announcementDrawer .announcement-delivery-details td:first-child,#announcementDrawer .announcement-delivery-details th:first-child{width:22%}
#announcementDrawer .announcement-delivery-details td:nth-child(2),#announcementDrawer .announcement-delivery-details th:nth-child(2){width:17%}
#announcementDrawer .announcement-delivery-details td:nth-child(3),#announcementDrawer .announcement-delivery-details th:nth-child(3){width:24%}
#announcementDrawer .announcement-delivery-details td:nth-child(4),#announcementDrawer .announcement-delivery-details th:nth-child(4){width:37%;white-space:pre-wrap}
.announcement-preview-original{margin:20px 0;color:#475569;font-size:13px}
.announcement-preview-original>summary{width:max-content;max-width:100%;cursor:pointer;padding:4px 0}
.announcement-preview-original .announcement-original{margin-top:10px}
#announcementDrawer #announcementFollow{margin-top:22px;padding-top:2px;border-top:1px solid #e5eaf2}
.announcement-preview-follow-controls{display:grid;grid-template-columns:max-content minmax(130px,1fr) minmax(240px,1.4fr);gap:16px;align-items:end;color:#475569;font-size:12px}
.announcement-preview-follow-controls label{display:flex;flex-direction:column;gap:7px}
.announcement-preview-follow-controls .announcement-preview-star{flex-direction:row;align-items:center;gap:7px;min-height:36px;font-size:13px;white-space:nowrap}
.announcement-preview-follow-controls .announcement-preview-star input{width:16px;height:16px;margin:0;accent-color:var(--blue)}
.announcement-preview-follow-controls select,.announcement-preview-follow-controls input[type=datetime-local]{box-sizing:border-box;width:100%;min-width:0;height:36px;font-size:13px}
.announcement-preview-note{display:block;margin-top:16px;color:#475569;font-size:12px}
#announcementDrawer #announcementNote{box-sizing:border-box;margin-top:7px;min-height:84px;resize:vertical;font-size:13px;line-height:1.7}
.announcement-preview-footer{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:16px;box-sizing:border-box;min-height:66px;padding:12px 24px;border-top:1px solid #e5eaf2;background:#fff}
#announcementDrawer .announcement-preview-footer button{height:36px;font-size:13px;white-space:nowrap}
#announcementDrawer .announcement-preview-footer .announcement-source-tag{box-sizing:border-box;height:32px;padding:5px 9px}
.announcement-resize-handle{position:absolute;z-index:5;touch-action:none;user-select:none}
.announcement-resize-handle[data-ann-resize=n],.announcement-resize-handle[data-ann-resize=s]{left:12px;right:12px;height:7px;cursor:ns-resize}
.announcement-resize-handle[data-ann-resize=n]{top:0}.announcement-resize-handle[data-ann-resize=s]{bottom:0}
.announcement-resize-handle[data-ann-resize=e],.announcement-resize-handle[data-ann-resize=w]{top:12px;bottom:12px;width:7px;cursor:ew-resize}
.announcement-resize-handle[data-ann-resize=e]{right:0}.announcement-resize-handle[data-ann-resize=w]{left:0}
.announcement-resize-handle[data-ann-resize=ne],.announcement-resize-handle[data-ann-resize=nw],.announcement-resize-handle[data-ann-resize=se],.announcement-resize-handle[data-ann-resize=sw]{width:13px;height:13px}
.announcement-resize-handle[data-ann-resize=ne]{top:0;right:0;cursor:nesw-resize}.announcement-resize-handle[data-ann-resize=nw]{top:0;left:0;cursor:nwse-resize}
.announcement-resize-handle[data-ann-resize=se]{bottom:0;right:0;cursor:nwse-resize}.announcement-resize-handle[data-ann-resize=sw]{bottom:0;left:0;cursor:nesw-resize}
.announcement-resize-handle[data-ann-resize=se]::after{content:"";position:absolute;right:4px;bottom:4px;width:7px;height:7px;background:repeating-linear-gradient(135deg,transparent 0 2px,#a3b1c8 2px 3px,transparent 3px 5px);clip-path:polygon(100% 0,100% 100%,0 100%)}
.announcement-window-maximized .announcement-resize-handle{display:none}
.announcement-window-maximized .announcement-preview-titlebar{cursor:default}
.announcement-window-moving,.announcement-window-moving *{user-select:none!important}
@media(max-width:760px){.announcement-preview-body{padding:18px 18px 22px}.announcement-preview-titlebar{padding-left:18px}.announcement-preview-footer{padding:12px 18px}#announcementDrawer.announcement-preview-window .announcement-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.announcement-preview-follow-controls{grid-template-columns:1fr 1fr}.announcement-preview-follow-controls>label:last-child{grid-column:1/-1}}
@media(max-width:480px){.announcement-preview-body{padding:16px 12px 20px}.announcement-preview-number{display:none}#announcementDrawer.announcement-preview-window h2{font-size:18px}#announcementDrawer .announcement-preview-deadline{padding:10px 8px}#announcementDrawer .announcement-preview-deadline .announcement-time-row,#announcementDrawer .announcement-preview-deadline .announcement-countdown{font-size:11px}.announcement-preview-footer{padding:10px 14px}}


/* r508: one status strip replaces duplicate KPI cards and tabs. */
/* Match the shared admin header selector before adding this view's ID so its
 * larger min-height/padding cannot override this compact workspace. */
body:not(.customer-portal):not(.supplier-portal) .view#railwayPending:not(#customer):not(#supplierPortal) > .railway-pending-topbar { box-sizing: border-box; min-height: 64px; padding: 8px 18px; margin-bottom: 8px; gap: 12px; }
#railwayPending .railway-pending-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
#railwayPending .railway-pending-heading h1 { margin: 0; font-size: 22px; line-height: 1.35; white-space: nowrap; }
#railwayPending .railway-pending-help { color: #7287a2; font-size: 15px; cursor: help; }
#railwayPending .railway-pending-auto-status { max-width: 490px; margin-top: 2px; font-size: 11px; }
#railwayPending .railway-pending-actions { gap: 6px; }
#railwayPending .railway-pending-actions button { min-height: 34px; height: 34px; padding: 5px 12px; font-size: 13px; white-space: nowrap; }
#railwayPending > .railway-pending-kpis { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 0; margin-bottom: 8px; padding: 0; overflow-x: auto; }
#railwayPending .railway-pending-kpis button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; min-height: 34px; height: 34px; padding: 5px 12px; border-radius: 7px; box-shadow: none; transform: none; }
#railwayPending .railway-pending-kpis small { font-size: 13px; color: #5e718e; }
#railwayPending .railway-pending-kpis strong { font-size: 15px; line-height: 1.2; }
#railwayPending .railway-pending-kpis button.active { background: #eaf0ff; border-color: #92abf1; }
#railwayPending .railway-pending-kpis button.active small { color: #2754c3; }
#railwayPending .railway-pending-kpis button[data-pending-status="已提交"] { margin-left: 5px; }
#railwayPending .railway-pending-toolbar { grid-template-columns: minmax(160px,1fr) 180px 130px 160px 100px auto auto; padding: 8px 10px; gap: 7px; }
#railwayPending .railway-pending-toolbar input, #railwayPending .railway-pending-toolbar select { height: 34px; min-height: 34px; font-size: 13px; }
#railwayPending .railway-pending-toolbar button { height: 34px; min-height: 34px; padding: 5px 11px; font-size: 13px; }
#railwayPending .railway-pending-feedback { padding: 4px 10px; min-height: 26px; font-size: 11px; }
#railwayPending .railway-pending-ready-feedback { min-height: 18px; }
#railwayPending .railway-pending-notice { margin-top: 3px; }
@media(max-width:1280px) {
  #railwayPending .railway-pending-toolbar { grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) minmax(0,1fr) 100px auto auto; gap: 5px; }
  #railwayPending .railway-pending-toolbar > #railwayPendingKeyword { grid-column: 1 / -1; }
}
@media(min-width:1024px) and (max-width:1280px) {
  #railwayPending .railway-pending-actions button { padding-inline: 8px; }
  #railwayPending .railway-pending-toolbar { grid-template-columns: minmax(110px,1fr) minmax(100px,.8fr) 100px minmax(100px,.9fr) 76px auto auto; gap: 5px; }
  #railwayPending .railway-pending-toolbar > #railwayPendingKeyword { grid-column: auto; }
}
@media(max-width:760px) {
  body:not(.customer-portal):not(.supplier-portal) .view#railwayPending:not(#customer):not(#supplierPortal) > .railway-pending-topbar { align-items: flex-start; flex-direction: column; padding: 9px 10px; gap: 7px; }
  #railwayPending .railway-pending-actions { justify-content: flex-start; }
  #railwayPending .railway-pending-actions button { padding: 5px 8px; font-size: 12px; }
  #railwayPending .railway-pending-toolbar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  #railwayPending .railway-pending-kpis button { padding: 5px 9px; }
}


#funds .funds-view-tabs { flex-wrap: wrap; overflow-x: visible; }
#funds .funds-tab-entry { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 3px; }
#funds .funds-tab-entry .funds-view-tab { margin: 0; transition: none; }
#funds .funds-pending-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; min-height: 20px; height: 20px; padding: 1px 5px; margin: 0 5px 0 -3px; border: 0; border-radius: 10px; color: #fff; background: #d4473e; box-shadow: none; font-size: 11px; line-height: 18px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
#funds .funds-pending-badge:hover { background: #b72e27; }
#funds .funds-pending-badge:focus-visible { outline: 2px solid #315ee7; outline-offset: 3px; }
#funds .funds-pending-badge.is-stale { background: #917444; }
#funds .funds-pending-count-status { margin: 5px 12px; color: #916323; font-size: 12px; }
#funds .funds-pending-panel { padding: 12px; min-width: 0; }
#funds .funds-pending-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
#funds .funds-pending-heading > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
#funds .funds-pending-heading strong { font-size: 16px; color: #253c60; }
#funds .funds-pending-heading span { font-size: 12px; color: #64748b; }
#funds .funds-pending-scope { margin: 8px 0; color: #64748b; font-size: 12px; line-height: 1.6; }
#funds .funds-pending-load-status { min-height: 18px; margin-bottom: 7px; color: #64748b; font-size: 12px; }
#funds .funds-pending-load-status.is-error { color: #a25b21; }
#funds .funds-pending-items { display: grid; gap: 8px; }
#funds .funds-pending-item { display: grid; grid-template-columns: minmax(150px,1.1fr) minmax(150px,1.5fr) minmax(80px,.7fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #dfe7f1; border-radius: 8px; background: #fff; }
#funds .funds-pending-item > div { display: grid; gap: 4px; min-width: 0; }
#funds .funds-pending-item strong { color: #263b5a; font-size: 13px; overflow-wrap: anywhere; }
#funds .funds-pending-item small { color: #75859a; font-size: 11px; overflow-wrap: anywhere; }
#funds .funds-pending-status { color: #a16b20; font-size: 12px; }
#funds .funds-pending-item button { white-space: nowrap; min-height: 32px; padding: 4px 9px; font-size: 12px; }
#funds .funds-pending-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12px; color: #64748b; }
#funds .funds-pending-pager > div { display: flex; gap: 7px; }
#funds.view.active.funds-pending-mode { display: flex; flex-direction: column; height: 100%; min-height: 0; padding-bottom: 0; overflow: hidden !important; }
#funds.funds-pending-mode > .topbar { flex: 0 0 auto; }
#funds.funds-pending-mode .funds-finance-panel { display: flex; flex-direction: column; flex: 1 1 0 !important; min-height: 0; margin-bottom: 0; overflow: hidden !important; }
#funds.funds-pending-mode .funds-view-tabs { flex: 0 0 auto; margin-bottom: 0; }
#funds.funds-pending-mode .funds-pending-panel:not([hidden]) { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; overflow: hidden; padding-bottom: 0; }
#funds.funds-pending-mode .funds-pending-heading, #funds.funds-pending-mode .funds-pending-scope, #funds.funds-pending-mode .funds-pending-load-status, #funds.funds-pending-mode .funds-pending-pager { flex: 0 0 auto; }
#funds.funds-pending-mode .funds-pending-items { flex: 1 1 0; min-height: 0; overflow: auto; align-content: start; grid-auto-rows: max-content; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 3px; }
#funds.funds-pending-mode .funds-pending-pager { margin-top: 8px; padding: 8px 0; border-top: 1px solid #e5ebf3; }
.funds-pending-input-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; margin-bottom: 12px; background: #fff7e7; border-radius: 8px; font-size: 12px; }
.funds-bank-pending-dialog { width: min(700px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto; padding: 20px; border: 1px solid #dfe7f1; border-radius: 12px; color: #263b5a; box-shadow: 0 16px 70px #14254440; }
.funds-bank-pending-dialog::backdrop { background: #13213b66; }
.funds-bank-pending-dialog header, .funds-bank-pending-dialog footer, .funds-bank-pending-search, .funds-bank-pending-pager { display: flex; align-items: center; gap: 8px; }
.funds-bank-pending-dialog header { justify-content: space-between; font-size: 16px; }
.funds-bank-pending-dialog footer { justify-content: flex-end; }
.funds-bank-pending-dialog label { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; }
.funds-bank-pending-dialog input, .funds-bank-pending-dialog select { width: 100%; min-width: 0; box-sizing: border-box; padding: 8px; border: 1px solid #d4deeb; border-radius: 6px; }
.funds-bank-pending-dialog p { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.funds-bank-pending-note { background: #f1f6fc; padding: 10px; border-radius: 6px; }
.funds-bank-pending-pager { justify-content: flex-end; font-size: 12px; }
.funds-bank-pending-pager span { margin-right: auto; }
.funds-bank-pending-search input { flex: 1; }
.funds-bank-pending-search button { flex-shrink: 0; }
@media (max-width: 900px) {
  #funds .funds-pending-item { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  #funds .funds-pending-item > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  #funds .funds-pending-item > div:nth-child(3) { grid-column: 1; }
  #funds .funds-pending-item > button { grid-column: 2; grid-row: 1 / span 3; }
}


#logisticsNumbersModal .logistics-numbers-modal-panel { display: flex; flex-direction: column; }
#logisticsNumbersModal .modal-bar { flex: 0 0 auto; }
#logisticsNumbersModal .logistics-numbers-list { flex: 1 1 150px; min-height: 96px; }
.logistics-issue-panel { flex: 0 1 auto; min-height: 0; max-height: 48vh; overflow: auto; overscroll-behavior: contain; margin: 12px 0; padding: 14px; border: 1px solid #d9e2ef; border-radius: 12px; background: #f8faff; }
.logistics-issue-head,.logistics-issue-item,.logistics-issue-batch,.logistics-issue-pager { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.logistics-issue-head { justify-content: space-between; margin-bottom: 6px; }
.logistics-issue-panel small { color: #607087; }
.logistics-issue-reason { display: grid; gap: 6px; margin: 12px 0; }
.logistics-issue-reason textarea { width: 100%; resize: vertical; min-height: 64px; box-sizing: border-box; }
.logistics-issue-item { border-top: 1px solid #e2e8f1; padding: 10px 0; }
.logistics-issue-item label { flex: 1; display: flex; gap: 8px; align-items: center; min-width: 180px; overflow-wrap: anywhere; }
.logistics-issue-item input { width: 18px; height: 18px; }
.logistics-issue-batch { margin-top: 8px; }
.logistics-issue-history { margin-top: 14px; }
.logistics-issue-history summary { cursor: pointer; font-weight: 600; }
.logistics-issue-history article { border-top: 1px solid #e2e8f1; margin-top: 10px; padding-top: 10px; overflow-wrap: anywhere; }
.logistics-issue-history p { margin: 6px 0; white-space: pre-wrap; }
.logistics-issue-pager { justify-content: flex-end; padding-top: 12px; }
.logistics-issue-panel[aria-busy="true"] { opacity: .75; }
@media (max-width: 600px) { .logistics-issue-panel { padding: 10px; } .logistics-issue-item label { flex-basis: 100%; } }


/* Only the order logistics window owns these geometry and scrolling rules. */
#logisticsNumbersModal .logistics-numbers-modal-panel {
  position: fixed;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  overflow: hidden;
  transform: none;
}
#logisticsNumbersModal .logistics-window-titlebar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  background: #f8faff;
  border-bottom: 1px solid #e0e7f1;
}
#logisticsNumbersModal .logistics-window-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#logisticsNumbersModal .logistics-window-drag-hint {
  flex-basis: 100%;
  color: #738198;
  font-size: 11px;
  font-weight: 400;
}
#logisticsNumbersModal .logistics-window-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
#logisticsNumbersModal .logistics-window-actions button { white-space: nowrap; }
#logisticsNumbersModal #logisticsWindowBody {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
#logisticsNumbersModal #logisticsNumbersList {
  flex: none;
  min-height: 0;
  max-height: none;
  overflow: visible;
}
#logisticsNumbersModal .logistics-issue-panel {
  flex: none;
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin: 12px 14px 0;
}
#logisticsNumbersModal .logistics-issue-head-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
#logisticsNumbersModal .logistics-issue-head-actions button { white-space: nowrap; }
#logisticsNumbersModal #logisticsIssueBody[hidden] { display: none; }
#logisticsNumbersModal .logistics-window-resize { display: none; }
@media (min-width: 761px) {
  #logisticsNumbersModal .logistics-numbers-modal-panel { width: min(1000px, calc(100vw - 24px)); height: min(700px, calc(100vh - 24px)); }
  #logisticsNumbersModal .logistics-window-titlebar { cursor: move; touch-action: none; }
  #logisticsNumbersModal .logistics-window-titlebar button { cursor: pointer; touch-action: manipulation; }
  #logisticsNumbersModal .logistics-numbers-modal-panel[data-logistics-window-interacting] { user-select: none; }
  #logisticsNumbersModal .logistics-window-resize { display: block; position: absolute; z-index: 6; touch-action: none; }
  #logisticsNumbersModal [data-logistics-window-resize="n"] { top: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="s"] { bottom: 0; left: 10px; right: 10px; height: 6px; cursor: ns-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="e"] { right: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="w"] { left: 0; top: 10px; bottom: 10px; width: 6px; cursor: ew-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="ne"] { right: 0; top: 0; width: 12px; height: 12px; cursor: nesw-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="nw"] { left: 0; top: 0; width: 12px; height: 12px; cursor: nwse-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="sw"] { left: 0; bottom: 0; width: 12px; height: 12px; cursor: nesw-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="se"] { right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; }
  #logisticsNumbersModal [data-logistics-window-resize="se"]::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-right: 2px solid #8d9db5; border-bottom: 2px solid #8d9db5; }
  #logisticsNumbersModal[data-logistics-window-maximized="true"] .logistics-window-resize { display: none; }
  #logisticsNumbersModal[data-logistics-window-maximized="true"] .logistics-window-titlebar { cursor: default; }
}
@media (max-width: 760px) {
  #logisticsNumbersModal { padding: 0; }
  #logisticsNumbersModal .logistics-numbers-modal-panel {
    left: var(--logistics-window-viewport-left, 0px);
    top: var(--logistics-window-viewport-top, 0px);
    width: var(--logistics-window-viewport-width, 100vw);
    height: var(--logistics-window-viewport-height, 100dvh);
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
  #logisticsNumbersModal .logistics-window-titlebar { padding: 10px; gap: 6px; cursor: default; }
  #logisticsNumbersModal .logistics-window-heading { gap: 3px; }
  #logisticsNumbersModal #logisticsNumbersSummary { flex-basis: 100%; font-size: 11px; }
  #logisticsNumbersModal .logistics-window-actions { gap: 4px; }
  #logisticsNumbersModal .logistics-window-actions button { min-height: 40px; padding: 6px 9px; font-size: 12px; }
  #logisticsNumbersModal #toggleLogisticsWindowSize,
  #logisticsNumbersModal #resetLogisticsWindow,
  #logisticsNumbersModal .logistics-window-drag-hint { display: none; }
  #logisticsNumbersModal .logistics-issue-panel { margin: 10px 10px 0; }
  #logisticsNumbersModal .logistics-issue-head { flex-wrap: wrap; gap: 6px; }
  #logisticsNumbersModal .logistics-issue-head-actions { margin-left: auto; gap: 4px; }
  #logisticsNumbersModal .logistics-issue-head-actions button { min-height: 40px; padding: 6px 8px; font-size: 12px; }
  #logisticsNumbersModal #logisticsNumbersList { padding: 10px; }
}


/* Scoped to the order logistics dialog: no shared input, select, or modal rules. */
#logisticsNumbersModal .lcp-field { display: flex; flex: 1 1 auto; min-width: 0; position: relative; }
#logisticsNumbersModal .lcp-field > input[data-tracking-carrier] { width: 100%; min-width: 0; padding-right: 46px; box-sizing: border-box; }
#logisticsNumbersModal .lcp-trigger { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 42px; min-width: 40px; min-height: 38px; padding: 0; display: grid; place-items: center; border: 0; border-left: 1px solid #e1e8f3; border-radius: 0 10px 10px 0; background: #f4f7fc; color: #3f5684; font-size: 20px; cursor: pointer; box-shadow: none; }
#logisticsNumbersModal .lcp-trigger:focus-visible { outline: 2px solid #3c60df; outline-offset: -3px; }
#logisticsNumbersModal .lcp-panel { position: fixed; z-index: 12; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; border: 1px solid #bfcee7; border-radius: 12px; color: #20334f; background: #fff; box-shadow: 0 12px 32px #18385c38; font-size: 13px; }
#logisticsNumbersModal .lcp-count { flex: 0 0 auto; padding: 9px 12px; font-size: 12px; line-height: 18px; color: #647897; border-bottom: 1px solid #e7edf7; background: #f5f8ff; }
#logisticsNumbersModal .lcp-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y; }
#logisticsNumbersModal .lcp-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 7px 12px; border-bottom: 1px solid #f0f3f8; box-sizing: border-box; cursor: pointer; }
#logisticsNumbersModal .lcp-option:hover, #logisticsNumbersModal .lcp-option[aria-selected="true"] { background: #eaf1ff; color: #244bbb; }
#logisticsNumbersModal .lcp-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
#logisticsNumbersModal .lcp-code { flex: 0 1 auto; max-width: 46%; color: #687b97; font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; text-align: right; }
#logisticsNumbersModal .lcp-candidate { margin-left: 7px; padding: 2px 5px; border-radius: 5px; background: #fff1d6; color: #966306; font-size: 10px; white-space: nowrap; }
#logisticsNumbersModal .lcp-message { padding: 18px 12px; color: #687b97; text-align: center; }
#logisticsNumbersModal .lcp-retry, #logisticsNumbersModal .lcp-close { min-height: 40px; padding: 6px 12px; border: 1px solid #ced9ed; border-radius: 8px; background: #fff; color: #3058bf; font-size: 13px; cursor: pointer; box-shadow: none; }
#logisticsNumbersModal .lcp-retry { display: block; margin: 12px auto 0; }
#logisticsNumbersModal .lcp-mobile-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
#logisticsNumbersModal .lcp-mobile-search { flex: 0 0 auto; box-sizing: border-box; min-width: 0; min-height: 42px; width: calc(100% - 24px); margin: 0 12px 8px; border: 1px solid #bdcce7; border-radius: 8px; padding: 8px 10px; font-size: 16px; }
@media (max-width: 760px) {
  #logisticsNumbersModal .lcp-mobile { border-radius: 14px; padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 40px #1636634d; }
  #logisticsNumbersModal .lcp-option { min-height: 44px; }
  #logisticsNumbersModal .lcp-trigger { min-height: 40px; }
}


/* Admin node task window only. Customer/mobile portal rules live separately. */
#railwayPassStepModal.is-node-focused { background: transparent; backdrop-filter: none; pointer-events: none; z-index: 1200; }
#railwayPassStepModal.is-node-focused[hidden], #railwayPassStepModal.is-node-focused.hidden { display: none !important; }
#railwayPassStepModal.is-node-focused [hidden] { display: none !important; }
#railwayPassStepModal.is-node-focused .railway-pass-step-panel {
  position: fixed; margin: 0; transform: none; inset: auto; width: min(490px, calc(100vw - 24px)) !important; max-width: calc(100vw - 24px) !important;
  min-width: 0; height: auto; max-height: var(--node-dialog-height, calc(100dvh - 32px));
  display: flex; flex-direction: column; pointer-events: auto; overflow: hidden;
  border: 1px solid var(--step-color, #2563eb); border-top: 4px solid var(--step-color, #2563eb);
  border-radius: 14px; box-shadow: 0 14px 42px #18345335; background: #fff;
}
#railwayPassStepModal.is-node-focused .modal-bar { flex: 0 0 auto; gap: 12px; padding: 12px 16px; min-height: 0; background: color-mix(in srgb, var(--step-color) 8%, #fff); }
#railwayPassStepModal.is-node-focused .modal-bar > div { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 0; }
#railwayPassStepModal.is-node-focused .modal-bar strong { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; color: #182e46; }
#railwayPassStepModal.is-node-focused .pass-node-title-number { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: white; background: var(--step-color); flex: none; }
#railwayPassStepModal.is-node-focused .pass-node-owner-badge { padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 500; color: var(--step-color); background: color-mix(in srgb, var(--step-color) 9%, #fff); }
#railwayPassStepModal.is-node-focused .modal-bar small { display: block; margin-top: 5px; font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#railwayPassStepModal.is-node-focused .railway-pass-form { display: flex; flex-direction: column; gap: 12px; min-height: 0; max-height: none; padding: 14px 16px; overflow-y: auto; overscroll-behavior: contain; }
#railwayPassStepModal.is-node-focused .railway-pass-form > * { flex-shrink: 0; }
#railwayPassStepModal.is-node-focused #railwayPassStepFlow { padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; font-size: 14px; }
#railwayPassStepModal.is-node-focused .pass-node-responsibility { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; font-size: 12px; color: #64748b; }
#railwayPassStepModal.is-node-focused .pass-node-responsibility strong { color: #243b53; }
#railwayPassStepModal.is-node-focused .pass-node-local-flow { display: flex; align-items: center; gap: 8px; padding-top: 12px; }
#railwayPassStepModal.is-node-focused .pass-node-local-flow span { padding: 5px 10px; background: color-mix(in srgb, var(--step-color) 10%, #fff); border: 1px solid color-mix(in srgb, var(--step-color) 30%, #fff); color: var(--step-color); border-radius: 8px; font-weight: 650; font-size: 13px; }
#railwayPassStepModal.is-node-focused #railwayPassStepFlow p { font-size: 13px; margin: 10px 0 6px; color: #3c5069; }
#railwayPassStepModal.is-node-focused #railwayPassStepFlow > small { color: #708198; font-size: 12px; }
#railwayPassStepModal.is-node-focused .pass-node-proof-pending { margin-top: 9px; padding: 7px 9px; font-size: 12px; color: #966012; background: #fff7e5; border-radius: 7px; }
#railwayPassStepModal.is-node-focused .customer-railway-step-workspace { display: flex !important; flex-direction: column; gap: 12px; overflow: visible; min-width: 0; }
#railwayPassStepModal.is-node-focused .railway-pass-step-entry { order: 0; padding: 0; margin: 0; border: 0; width: 100%; min-height: 0; background: transparent; }
#railwayPassStepModal.is-node-focused .customer-railway-step-evidence { order: 1; border: 1px solid #e4eaf1; border-radius: 10px; padding: 12px; min-width: 0; }
#railwayPassStepModal.is-node-focused .customer-railway-step-history { order: 2; padding: 10px 0; border: 0; min-width: 0; }
#railwayPassStepModal.is-node-focused .customer-railway-step-history, #railwayPassStepModal.is-node-focused .customer-railway-step-evidence { min-height: 0; max-height: none; overflow: visible; scrollbar-gutter: auto; }
#railwayPassStepModal.is-node-focused .customer-railway-step-history ol { max-height: none; overflow: visible; }
#railwayPassStepModal.is-node-focused .pass-history-head, #railwayPassStepModal.is-node-focused .customer-railway-step-evidence-head { position: static; padding: 0 0 8px; }
#railwayPassStepModal.is-node-focused .customer-railway-step-history li { margin: 0 0 9px; }
#railwayPassStepModal.is-node-focused .customer-railway-step-evidence-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; max-height: none; overflow: visible; }
#railwayPassStepModal.is-node-focused .customer-railway-evidence-empty { grid-column: 1/-1; min-height: 0; padding: 10px; font-size: 12px; }
#railwayPassStepModal.is-node-focused .customer-railway-evidence-card { min-width: 0; min-height: 72px; padding: 8px; }
#railwayPassStepModal.is-node-focused .customer-railway-evidence-card small { overflow-wrap: anywhere; }
#railwayPassStepModal.is-node-focused .customer-railway-step-upload { display: flex; flex-direction: column; min-height: 0; gap: 7px; padding: 10px; margin-top: 8px; background: #f8faff; border: 1px dashed #b8cbe1; }
#railwayPassStepModal.is-node-focused .customer-railway-step-upload input { display: block; position: static; width: 100%; opacity: 1; min-width: 0; height: auto; padding: 7px; font-size: 12px; }
#railwayPassStepModal.is-node-focused .customer-railway-step-upload b, #railwayPassStepModal.is-node-focused .customer-railway-step-upload strong { display: none; }
#railwayPassStepModal.is-node-focused .pass-node-selected-files > div { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 7px; border: 1px solid #dce6ee; border-radius: 8px; }
#railwayPassStepModal.is-node-focused .pass-node-selected-files span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
#railwayPassStepModal.is-node-focused .pass-node-selected-files small { display: block; color: #7c8ba0; font-size: 11px; }
#railwayPassStepModal.is-node-focused .pass-node-selected-files button { min-height: 34px; font-size: 12px; padding: 4px 8px; white-space: nowrap; }
#railwayPassStepModal.is-node-focused #railwayPassStepFields, #railwayPassStepModal.is-node-focused .railway-pass-node-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
#railwayPassStepModal.is-node-focused label { min-width: 0; font-size: 12px; color: #53657d; }
#railwayPassStepModal.is-node-focused input, #railwayPassStepModal.is-node-focused select, #railwayPassStepModal.is-node-focused textarea { width: 100%; min-width: 0; box-sizing: border-box; font-size: 14px; border-radius: 8px; }
#railwayPassStepModal.is-node-focused input[type=checkbox] { width: auto; }
#railwayPassStepModal.is-node-focused .railway-pass-step-note { display: block; margin-top: 10px; }
#railwayPassStepModal.is-node-focused .railway-pass-step-note textarea { height: 58px; min-height: 0; }
#railwayPassStepModal.is-node-focused .railway-pass-tracking-list { grid-column: 1/-1; }
#railwayPassStepModal.is-node-focused .railway-pass-tracking-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr) auto; align-items: start; gap: 8px; margin-bottom: 9px; padding: 9px; background: #f7faff; border: 1px solid #dce6ef; border-radius: 10px; }
#railwayPassStepModal.is-node-focused .railway-pass-tracking-row label { display: grid; gap: 5px; }
#railwayPassStepModal.is-node-focused .railway-pass-tracking-row small { color: #78889e; font-size: 10px; }
#railwayPassStepModal.is-node-focused .railway-pass-tracking-row > button { margin-top: 20px; padding: 7px; min-height: 36px; }
#railwayPassStepModal.is-node-focused .pass-node-carrier-field { position: relative; }
#railwayPassStepModal.is-node-focused .pass-node-carrier-options { position: relative; z-index: 3; max-height: 180px; overflow-y: auto; border: 1px solid #bfd0e2; border-radius: 8px; background: white; }
#railwayPassStepModal.is-node-focused .pass-node-carrier-options button { display: block; width: 100%; min-height: 36px; text-align: left; padding: 7px; border: 0; border-bottom: 1px solid #edf1f5; background: white; color: #213c57; font-size: 12px; }
#railwayPassStepModal.is-node-focused .pass-node-carrier-options button:hover, #railwayPassStepModal.is-node-focused .pass-node-carrier-options button:focus { background: #e9f2ff; }
#railwayPassStepModal.is-node-focused .pass-node-carrier-options small { display: block; padding: 3px 5px; }
#railwayPassStepModal.is-node-focused .pass-node-extras { border-top: 1px solid #e4eaf1; padding-top: 12px; }
#railwayPassStepModal.is-node-focused .pass-node-extras > summary { cursor: pointer; color: #60748b; font-size: 12px; }
#railwayPassStepModal.is-node-focused .railway-pass-fact-panel { padding: 0; margin: 12px 0 0; border: 0; }
#railwayPassStepModal.is-node-focused .railway-pass-fact-head { display: none; }
#railwayPassStepModal.is-node-focused .railway-pass-fact-grid { grid-template-columns: minmax(0,1fr); }
#railwayPassStepModal.is-node-focused .pass-node-primary-actions { margin: 0; padding: 10px 0 0; position: sticky; bottom: -14px; background: #fff; }
#railwayPassStepModal.is-node-focused #railwayPassStepSubmit { background: var(--step-color); min-height: 40px; width: 100%; }
#railwayPassStepModal.is-node-focused .railway-pass-history-data dd { overflow-wrap: anywhere; }
#railwayPassSelectedFlow .shared-pass-progress-node.is-locked { cursor: default; }
#railwayPassSelectedFlow .shared-pass-progress-node { padding-top: 28px; }
#railwayPassSelectedFlow .shared-pass-progress-node::before { top: 44px; }
#railwayPassSelectedFlow .shared-pass-progress-node .pass-node-task-reminder { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 180px; padding: 4px 7px; border-radius: 20px; background: var(--node-color); color: white; font-size: 11px; white-space: nowrap; box-shadow: 0 3px 9px #244a7c20; }
#railwayPassSelectedFlow .pass-node-task-reminder i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: railway-pass-task-pulse 1.8s ease-in-out infinite; }
@keyframes railway-pass-task-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { #railwayPassSelectedFlow .pass-node-task-reminder i { animation: none; } }
@media (max-width:760px) {
  #railwayPassStepModal.is-node-focused .railway-pass-step-panel { width: calc(100vw - 16px) !important; max-width: calc(100vw - 16px) !important; }
  #railwayPassStepModal.is-node-focused.is-inline-node { position: relative; inset: auto; grid-column: 1/-1; width: calc(100% - 24px); max-width: calc(100vw - 24px); display: block; min-width: 0; padding: 8px 0; margin: 0 12px; }
  #railwayPassStepModal.is-node-focused.is-inline-node .railway-pass-step-panel { position: relative; width: 100% !important; max-width: 100% !important; max-height: none; }
  #railwayPassStepModal.is-node-focused.is-inline-node .railway-pass-form { overflow: visible; }
  #railwayPassStepModal.is-node-focused .railway-pass-form { padding: 12px; }
  #railwayPassStepModal.is-node-focused #railwayPassStepFields { grid-template-columns: minmax(0,1fr); }
  #railwayPassStepModal.is-node-focused .railway-pass-tracking-row { grid-template-columns: minmax(0,1fr) auto; }
  #railwayPassStepModal.is-node-focused .railway-pass-tracking-row label { grid-column: 1; }
  #railwayPassStepModal.is-node-focused .railway-pass-tracking-row > button { grid-column: 2; grid-row: 1/3; }
  #railwayPassStepModal.is-node-focused input, #railwayPassStepModal.is-node-focused select, #railwayPassStepModal.is-node-focused textarea { font-size: 16px; }
  #railwayPassStepModal.is-node-focused .customer-railway-step-evidence-grid { grid-template-columns: minmax(0,1fr); }
  #railwayPassStepModal.is-node-focused .modal-bar strong { font-size: 15px; }
}


.collector-dialog{width:min(1060px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:0;border:1px solid #d3e1eb;border-radius:16px;background:#fff;color:#243950;box-shadow:0 18px 70px #16334430;overflow:hidden;font:14px/1.5 system-ui,sans-serif}.collector-dialog[open]{display:flex;flex-direction:column}
#customerRailwayReportDialog .customer-report-modes,.collector-admin-mode-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.collector-admin-mode-cards{grid-column:1/-1}.collector-admin-mode-cards button{display:grid;gap:3px;min-height:60px}.collector-admin-mode-cards button[aria-pressed=true]{background:#eaf7f4;border-color:#087c79;color:#087c79}.collector-admin-mode-cards button:disabled{color:#8a99a8;background:#f2f6f9}.collector-admin-mode-cards small{color:inherit}.collector-admin-mode-cards [hidden],#railwayPassModal .railway-pass-form label[hidden]{display:none!important}
.collector-dialog::backdrop{background:#1b304e66}.collector-dialog *{box-sizing:border-box}.collector-dialog [hidden]{display:none!important}
.collector-dialog-head,.collector-dialog-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 18px;background:#f5f8fb;flex:none}.collector-dialog-head{z-index:2;border-bottom:1px solid #dbe5ee}.collector-dialog-head>strong{font-size:19px}.collector-dialog-footer{border-top:1px solid #dbe5ee}.collector-dialog-footer>.collector-error{flex-basis:100%;width:100%;margin:0}.collector-dialog-body{padding:18px;display:grid;gap:14px;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;flex:1 1 auto}
.collector-dialog button,.collector-dialog input,.collector-dialog select,.collector-dialog textarea{font:inherit}.collector-dialog button{min-height:36px;padding:6px 12px;border:1px solid #cfdee8;border-radius:8px;background:#fff;color:#27435b}.collector-dialog button.primary{background:#087c79;border-color:#087c79;color:#fff}.collector-dialog button:disabled{color:#8797a6;background:#f1f5f8;cursor:not-allowed}.collector-dialog button:focus-visible,.collector-dialog input:focus-visible,.collector-dialog textarea:focus-visible,.collector-dialog select:focus-visible{outline:2px solid #208bba;outline-offset:2px}
.collector-dialog input,.collector-dialog select,.collector-dialog textarea{width:100%;min-width:0;border:1px solid #cadbe8;background:#fff;border-radius:8px;padding:8px 10px;color:#243950;min-height:38px}.collector-dialog input[readonly]{background:#f4f7fb}.collector-dialog em{font-style:normal;color:#a24427}.collector-dialog h3,.collector-dialog p{margin:0}.collector-dialog small,.collector-muted{color:#5f7489}.collector-error{padding:10px;border-radius:8px;background:#fff1e9;color:#a13e1e;overflow-wrap:anywhere}
.collector-mode-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.collector-mode-cards button{display:grid;gap:3px;min-height:64px}.collector-mode-cards button[aria-pressed=true]{border-color:#087c79;background:#eaf7f4;color:#087c79}.collector-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.collector-fields label,.collector-note,.collector-proof label{display:grid;gap:5px;min-width:0}.collector-fields label>span{overflow-wrap:anywhere}.collector-wide{grid-column:1/-1}.collector-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 0;border-top:1px solid #dbe5ee}.collector-summary>div{display:grid;gap:3px;min-width:0}.collector-summary strong{overflow-wrap:anywhere}
.collector-list-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.collector-list-tools input{flex:1 1 260px}.collector-list-tools select{width:auto}.collector-list-item{position:relative;display:grid;gap:6px;padding:14px 130px 14px 14px;margin-bottom:10px;border:1px solid #dbe5ee;border-radius:10px;min-width:0}.collector-list-item>div{display:flex;gap:12px;flex-wrap:wrap;justify-content:space-between}.collector-list-item>div>span{color:#087c79}.collector-list-item p,.collector-list-item small{overflow-wrap:anywhere}.collector-list-item>button{position:absolute;right:14px;top:calc(50% - 18px)}.collector-empty{padding:40px 12px;text-align:center;color:#667a8d}
.collector-order-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.collector-tag{background:#eaf7f4;color:#087c79;border-radius:20px;padding:4px 10px;font-size:12px}.collector-progress-meta{display:flex;gap:12px;flex-wrap:wrap;padding-top:15px;color:#5f7489}.collector-progress-meta strong{color:#243950}.collector-flow{list-style:none;display:grid;grid-template-columns:repeat(var(--collector-node-count,9),minmax(0,1fr));gap:0;padding:16px 0;margin:0}.collector-flow li{position:relative;min-width:0}.collector-flow li:not(:last-child):after{content:"";position:absolute;height:2px;background:#dbe5ee;top:18px;left:50%;width:100%;pointer-events:none}.collector-flow li[data-status=completed]:after{background:#178f87}.collector-flow button{position:relative;display:grid;justify-items:center;gap:6px;width:100%;height:100%;padding:0 3px;border:0;background:transparent;z-index:1}.collector-flow button:disabled{background:transparent}.collector-flow-number{display:grid;place-items:center;width:34px;height:34px;border:2px solid #d5e2ed;border-radius:50%;background:#fff;color:#5f7489}.collector-flow [data-status=completed] .collector-flow-number{border-color:#178f87;background:#eaf7f4;color:#087c79}.collector-flow [aria-current=step] .collector-flow-number{border-color:#087c79;background:#087c79;color:#fff}.collector-flow strong{font-size:12px;font-weight:600;word-break:keep-all}.collector-flow small{font-size:11px}.collector-todo{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#eaf7f4;border-radius:10px;padding:12px;margin-bottom:14px}.collector-todo>div{display:grid;gap:3px}.collector-todo span{color:#5f7489}.collector-report-product{display:flex;gap:14px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #dbe5ee;color:#5f7489}
.collector-node-access{padding:8px 10px;border-radius:8px;background:#eef5fd;color:#285f92}.collector-proof{display:grid;gap:8px;padding:12px;border:1px dashed #cadae7;border-radius:10px}.collector-proof>button{justify-self:start;max-width:100%;overflow-wrap:anywhere;text-align:left}.collector-proof input[type=file]{border:0;padding:0;max-width:100%}#collectorNodeContent{display:grid;gap:14px}#collectorNodeActions{display:flex;flex-wrap:wrap;gap:8px}#collectorNodeSelectedFiles>div{display:flex;align-items:center;gap:8px;justify-content:space-between}#collectorNodeSelectedFiles span{overflow-wrap:anywhere;min-width:0}.collector-node-records article{padding:8px 0;border-bottom:1px solid #e3ebf1;display:flex;gap:8px;flex-wrap:wrap}.collector-node-records article p{flex-basis:100%;overflow-wrap:anywhere}#railwayCollectorNodeDialog,#railwayCollectorCreateDialog{width:min(760px,calc(100vw - 32px))}#collectorProofContent img{max-width:100%;height:auto;display:block;margin:auto}#collectorProofContent iframe{width:100%;height:65dvh;border:0}
@media(max-width:760px){.collector-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:12px}.collector-dialog-head,.collector-dialog-footer{padding:12px}.collector-dialog-body{padding:12px}.collector-dialog button{min-height:44px}.collector-dialog input,.collector-dialog select,.collector-dialog textarea{font-size:16px;min-height:44px}.collector-fields{grid-template-columns:minmax(0,1fr)}.collector-mode-cards{gap:6px}.collector-mode-cards button{padding:7px 3px}.collector-mode-cards small{font-size:11px}.collector-flow{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:16px}.collector-flow li:nth-child(3n):after{display:none}.collector-flow strong{font-size:13px}.collector-summary{grid-template-columns:minmax(0,1fr)}.collector-list-item{padding:12px}.collector-list-item>button{position:static;justify-self:end}.collector-todo{align-items:flex-start;flex-wrap:wrap}.collector-list-tools input{flex-basis:100%}#railwayCollectorNodeDialog,#railwayCollectorCreateDialog{width:calc(100vw - 16px)}}
/* Compact collector creation: five independent facts, without changing node forms. */
#railwayCollectorCreateDialog .collector-dialog-body{gap:10px;padding:12px 16px}
#railwayCollectorCreateDialog .collector-mode-cards{gap:8px}
#railwayCollectorCreateDialog .collector-mode-cards button{min-height:36px;padding:5px 4px}
.collector-create-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0}
.collector-create-fields label,.collector-create-fields .collector-picker{display:grid;gap:3px;min-width:0;align-content:start}
.collector-create-fields label>span,.collector-create-fields .collector-picker>label,.collector-fact-field>span{font-size:12px;color:#5f7489}
.collector-create-fields .collector-picker>label{display:block}
.collector-create-fields small{font-size:12px;margin-left:5px}
.collector-create-pair,.collector-create-product,.collector-create-references{display:grid;gap:8px;min-width:0}
.collector-create-pair{grid-template-columns:repeat(2,minmax(0,1fr))}
.collector-create-product{grid-template-columns:minmax(44px,.58fr) minmax(0,1.65fr) minmax(0,.88fr) minmax(0,1.06fr) minmax(0,1.06fr)}
.collector-catalog-facts,.collector-amount-facts{display:contents}
.collector-fact-field{display:grid;grid-template-rows:auto 1fr;gap:3px;min-width:0}
.collector-fact{display:flex;align-items:center;min-width:0;min-height:38px;padding:7px 8px;border:1px solid #cadbe8;border-radius:8px;background:#f4f7fb;overflow-wrap:anywhere;line-height:1.4;font-size:14px;color:#243950}
.collector-money{font-variant-numeric:tabular-nums}
.collector-total{color:#087c79;background:#eaf7f4;font-weight:650}
.collector-create-references{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(65px,.44fr)}
.collector-create-note textarea{resize:vertical}
.collector-picker{position:relative}
.collector-with-picker{display:grid;grid-template-columns:minmax(0,1fr) 38px;min-width:0}
.collector-dialog .collector-with-picker input{border-radius:8px 0 0 8px}
.collector-dialog .collector-with-picker button{padding:0;border-left:0;border-radius:0 8px 8px 0;color:#087c79}
.collector-picker-menu{position:absolute;inset:calc(100% + 4px) 0 auto;z-index:8;display:grid;gap:4px;max-height:190px;overflow:auto;overscroll-behavior:contain;padding:5px;border:1px solid #cadbe8;border-radius:8px;background:#fff;box-shadow:0 8px 20px #24395018}
.collector-picker-menu button{width:100%;text-align:left;overflow-wrap:anywhere;white-space:normal}
.collector-picker-menu button:hover,.collector-picker-menu button:focus-visible{background:#eaf7f4}
.collector-picker-menu>span{padding:4px 7px;color:#5f7489;font-size:12px}
#collectorCreateBindingStatus{font-size:12px}
@media(max-width:760px){#railwayCollectorCreateDialog .collector-dialog-body{padding:12px}#railwayCollectorCreateDialog .collector-mode-cards button{min-height:44px}.collector-with-picker{grid-template-columns:minmax(0,1fr) 44px}.collector-create-references input[readonly]{font-size:13px;padding-inline:6px}.collector-fact{min-height:44px}.collector-picker-menu{max-height:176px}}
@media(max-width:560px){.collector-create-product{grid-template-columns:minmax(0,1fr)}.collector-catalog-facts,.collector-amount-facts{display:grid;gap:8px}.collector-catalog-facts{grid-template-columns:minmax(44px,.58fr) minmax(0,1.42fr) minmax(65px,1fr)}.collector-amount-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.collector-create-references{grid-template-columns:minmax(0,1fr) minmax(104px,1.25fr) minmax(44px,.46fr)}}
@media(max-width:380px){.collector-report-context{grid-template-columns:minmax(0,1fr)}.collector-catalog-facts .collector-fact{padding-inline:5px}.collector-create-references input{padding-inline:5px}.collector-create-references label>span{font-size:11px}.collector-create-fields .collector-create-pair select{padding-inline:5px}}

.collector-create-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;min-width:0}

/* Let long node labels and exact large amounts wrap inside the detail viewport. */
#collectorDetailContent{min-width:0}
.collector-flow strong{min-width:0;max-width:100%;word-break:normal;overflow-wrap:anywhere}
.collector-report-product>span{min-width:0;max-width:100%;overflow-wrap:anywhere}

.collector-ledger-flow{min-width:0}.collector-ledger-flow .collector-order-head h3{margin:0;font-size:14px}.collector-ledger-flow .collector-progress-meta{padding-top:5px;font-size:12px}.collector-ledger-flow .collector-flow{padding-block:10px}.collector-ledger-info{font-size:12px}.collector-ledger-info>summary{cursor:pointer;color:#087c79}.collector-ledger-kind{display:block;color:#087c79;font-size:12px}.collector-ledger-flow .collector-error{margin:0}.collector-ledger-flow .collector-summary{font-size:13px}.collector-ledger-flow .collector-order-head>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){.collector-ledger-flow .collector-flow{grid-template-columns:repeat(var(--collector-node-count,9),minmax(90px,1fr));overflow-x:auto}.collector-ledger-flow .collector-flow li:nth-child(3n):after{display:block}.collector-ledger-flow .collector-flow li:last-child:after{display:none}#customerRailwayReportType{display:block!important;max-width:100%;min-width:0}.collector-ledger-flow .collector-tag{font-size:11px}.collector-ledger-flow .collector-order-head{gap:4px}}

#railwayPassLedgerStats{display:flex;flex-wrap:wrap;gap:6px}#railwayPassLedgerStats button{font-size:12px;padding:3px 7px;min-height:28px}

.collector-rejection{margin:0;padding:8px 10px;border-radius:8px;background:#fff1e9;color:#a13e1e;overflow-wrap:anywhere}.collector-flow [data-status=cancelled] .collector-flow-number{border-color:#bf7768;background:#fff1e9;color:#a13e1e}

/* Compact permitted-node form; guidance occupies its own inline space. */
#railwayCollectorNodeDialog{box-sizing:border-box;width:min(590px,calc(100vw - 32px))}
#railwayCollectorNodeDialog .collector-dialog-head{gap:6px 10px}
#railwayCollectorNodeDialog .collector-dialog-head>strong{font-size:16px;min-width:0;overflow-wrap:anywhere;flex:1 1 240px}
.collector-dialog-ref{font-size:11px;color:#7a8b99;overflow-wrap:anywhere}
#railwayCollectorNodeDialog .collector-dialog-body{gap:10px;padding:14px 16px}
#collectorNodeContent{gap:10px}
.collector-node-task{font-size:13px;color:#536c80;overflow-wrap:anywhere}
.collector-optional,.collector-node-history{min-width:0;border:1px solid #dbe5ee;border-radius:8px;padding:8px 10px}
.collector-optional>summary,.collector-node-history>summary{cursor:pointer;color:#536c80;font-size:13px;min-height:24px;line-height:24px;overflow-wrap:anywhere}
.collector-optional-body{display:grid;gap:10px;margin-top:8px;min-width:0}
.collector-node-history>.collector-proof{margin-top:8px;border:0;padding:0}
.collector-optional[data-reject-selected]>summary{color:#a13e1e}
.collector-readonly-result{display:grid;gap:8px;margin:0;padding:10px 12px;background:#f5f8fb;border-radius:8px}
.collector-readonly-result>div{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px}
.collector-readonly-result dt{color:#6a7e8e}.collector-readonly-result dd{margin:0;overflow-wrap:anywhere}
.collector-action-guide{display:inline-block;flex:none;margin-inline-end:6px;color:#087c79;font-size:14px;line-height:1;pointer-events:none;animation:collector-guide-nudge 1.6s ease-in-out infinite}
.collector-dialog button.primary .collector-action-guide{color:inherit}
.collector-flow .collector-node-guide{position:absolute;left:calc(50% + 22px);top:7px;line-height:18px;font-size:16px;color:#087c79;pointer-events:none;animation:collector-guide-nudge 1.6s ease-in-out infinite}
.collector-node-guide[hidden]{display:none!important}
@keyframes collector-guide-nudge{0%,100%{transform:translateX(0)}50%{transform:translateX(2px)}}
@media(prefers-reduced-motion:reduce){.collector-action-guide,.collector-node-guide{animation:none!important;transition:none!important}}
@media(max-width:760px){#railwayCollectorNodeDialog{width:calc(100vw - 16px)}#railwayCollectorNodeDialog .collector-dialog-body{padding:12px}#railwayCollectorNodeDialog .collector-dialog-head>strong{flex-basis:calc(100% - 72px)}#railwayCollectorNodeDialog .collector-dialog-ref{order:3;flex-basis:100%}.collector-optional>summary,.collector-node-history>summary{min-height:32px;line-height:32px}.collector-readonly-result>div{grid-template-columns:minmax(0,1fr);gap:2px}}

/* Use the same role-colored dot, connector and check vocabulary as small-shop orders. */
.collector-flow li:after,.collector-flow li:not(:last-child):after,.collector-ledger-flow .collector-flow li:nth-child(3n):after{display:none}
.collector-flow li:before{content:"";position:absolute;z-index:0;top:17px;left:-50%;right:50%;height:3px;background:#d9e1ec;pointer-events:none}
.collector-flow li:first-child:before{display:none}
.collector-flow li[data-status=completed]:before,.collector-flow li[data-status=current]:before{background:var(--node-color,#64748b)}
.collector-flow-number{position:relative;z-index:1;box-sizing:border-box;border-width:3px;font-size:12px;font-weight:800}
.collector-flow [data-status=completed] .collector-flow-number,.collector-flow [data-status=current] .collector-flow-number{border-color:var(--node-color,#64748b);background:var(--node-color,#64748b);color:#fff;box-shadow:0 0 0 5px color-mix(in srgb,var(--node-color,#64748b) 12%,transparent)}
.collector-flow strong{color:#65748a}
.collector-flow [data-status=current] strong{color:var(--node-color,#64748b);font-weight:800}
.collector-flow small{padding:2px 7px;border:1px solid #e0e6ef;border-radius:999px;color:#8996a8;font-size:10px;white-space:nowrap}
.collector-flow [data-status=current] small{border-color:var(--node-color,#64748b);color:var(--node-color,#64748b)}
.collector-flow .collector-node-guide{color:var(--node-color,#087c79)}
.collector-platform{min-width:0;padding:10px 12px;border:1px solid #dbe5ee;border-radius:8px;background:#f5f8fb}
.collector-platform>a{display:inline-flex;align-items:center;min-height:36px;color:#2563eb;font-weight:600;text-decoration:none;overflow-wrap:anywhere}
.collector-platform>a:hover{text-decoration:underline}
.collector-platform-unavailable{color:#946022;font-size:13px}
.collector-shipping{display:grid;gap:8px;min-width:0;padding:10px 12px;border:1px solid #dbe5ee;border-radius:8px}
.collector-shipping>label{display:flex;align-items:flex-start;gap:8px;min-width:0}
.collector-dialog .collector-shipping input[type=checkbox]{width:18px;height:18px;min-height:18px;padding:0;margin:2px 0 0;flex:none;accent-color:#087c79}
.collector-shipping span{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){.collector-ledger-flow .collector-flow{padding-top:15px;padding-bottom:10px}.collector-platform>a{min-height:44px}.collector-shipping>label{min-height:32px;align-items:center}.collector-dialog .collector-shipping input[type=checkbox]{width:20px;height:20px;min-height:20px}}

.collector-platform-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}

/* Owner-only reminder stays inside the scroll area above the node. */
.collector-flow button{padding-top:38px;box-sizing:border-box}
.collector-flow li:before{top:55px}
.collector-flow .collector-node-guide{top:0;left:50%;display:inline-flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:180px;box-sizing:border-box;padding:4px 8px;border-radius:999px;background:var(--collector-reminder-color,#1d4ed8);color:#fff;font-size:11px;font-weight:600;line-height:1.4;white-space:nowrap;box-shadow:0 3px 8px #244a7c20;transform:translateX(calc(-50% + var(--collector-reminder-shift,0px)));animation:none;pointer-events:auto;cursor:pointer}
.collector-flow .collector-node-guide:after{content:"";position:absolute;bottom:-5px;left:calc(50% - var(--collector-reminder-shift,0px));width:0;height:0;transform:translateX(-50%);border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid var(--collector-reminder-color,#1d4ed8);pointer-events:none}
.collector-reminder-dot{display:block;width:5px;height:5px;flex:none;border-radius:50%;background:currentColor;animation:collector-reminder-pulse 1.8s ease-in-out infinite}
.collector-node-guide[data-reminder-state=waiting] .collector-reminder-dot{animation:none}
.collector-reminder-text{min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:center}
@keyframes collector-reminder-pulse{0%,100%{opacity:1}50%{opacity:.4}}
@media(prefers-reduced-motion:reduce){.collector-reminder-dot{animation:none!important}}
@media(max-width:760px){.collector-flow .collector-node-guide{max-width:min(180px,calc(100vw - 40px))}.collector-ledger-flow .collector-flow{padding-top:10px}}

.collector-reminder-dot,.collector-reminder-text{pointer-events:none}

.collector-flow li:has(.collector-node-guide)>button{z-index:3}
.collector-flow .collector-node-guide{z-index:3}

/* Keep the report identity and current responsibility on one scrollable line. */
.collector-order-head.collector-header-line{display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:12px;min-width:0;max-width:100%;overflow-x:auto;white-space:nowrap;color:#5f7489;font-size:12px;scrollbar-width:thin}
.collector-header-line>.collector-header-number,.collector-header-line>.collector-tag,.collector-header-line>.collector-header-stage,.collector-header-line>.collector-header-party,.collector-header-line>.collector-viewer-role{flex:0 0 auto;white-space:nowrap}
.collector-header-line>.collector-header-number{font-variant-numeric:tabular-nums;color:#536579}
.collector-header-line>h3.collector-header-project{flex:1 1 220px;min-width:80px;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;color:#243950}
.collector-header-line>.collector-header-stage{color:#243950}
@media(max-width:760px){.collector-order-head.collector-header-line{gap:10px;padding-bottom:5px}.collector-header-line>h3.collector-header-project{flex:0 0 auto;min-width:0;overflow:visible;text-overflow:clip;font-size:13px}}
/* Refund records are separate from the explicit close-out action. */
.collector-refund-forms{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:7px;min-width:0}
.collector-refund-forms>button{min-width:0;white-space:normal;overflow-wrap:anywhere}
.collector-refund-forms>button[aria-pressed=true]{border-color:#d89b52;background:#fff4e5;color:#9a520c;font-weight:650}
.collector-refund-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:10px 12px;border:1px solid #eadbc6;border-radius:8px;background:#fffbf5}
.collector-refund-summary>div{display:grid;gap:4px;min-width:0}
.collector-refund-summary dt{font-size:12px;color:#786953;overflow-wrap:anywhere}
.collector-refund-summary dd{margin:0;color:#67441e;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.collector-proof-download{display:inline-flex;align-items:center;justify-content:center;align-self:flex-start;min-height:36px;padding:7px 12px;border:1px solid #cadbe8;border-radius:8px;background:#f4f8fc;color:#285f92;text-decoration:none}
@media(max-width:380px){.collector-refund-forms{grid-template-columns:repeat(auto-fit,minmax(104px,1fr))}.collector-refund-summary{grid-template-columns:1fr 1fr}.collector-refund-summary>div:last-child{grid-column:1/-1}}
.collector-header-line>.shared-pass-completed-stamp{flex:0 0 auto;margin:0 2px;white-space:nowrap}
.collector-header-line>.pass-report-cancel{flex:0 0 auto;min-height:28px;padding:3px 8px;font-size:12px}
#railwayCollectorCancelDialog{width:min(460px,calc(100vw - 24px));box-sizing:border-box}
#railwayCollectorCancelDialog .collector-note{display:grid;gap:6px}
#railwayCollectorCancelDialog textarea{resize:vertical}
#railwayCollectorCancelDialog .collector-dialog-footer{flex-wrap:wrap}
#railwayCollectorCancelDialog .collector-dialog-footer>.collector-error{flex-basis:100%}
/* Collector identity and final states remain readable in compact ledgers. */
.collector-ledger-kind{display:inline-flex;align-items:center;max-width:100%;box-sizing:border-box;margin-top:4px;padding:2px 7px;border:1px solid #c9d9f5;border-radius:5px;background:#edf3ff;color:#254e99!important;font-size:12px!important;font-weight:700;line-height:1.5;overflow-wrap:anywhere}
.collector-header-line>.collector-ledger-kind{flex:0 0 auto;margin:0;white-space:nowrap}
.collector-status{display:inline-block;max-width:100%;padding:3px 8px;border-radius:6px;background:#eef5fb;color:#285a83;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.collector-status.is-cancelled{background:#fff4df;color:#985600;border:1px solid #f1d6a4}
.collector-header-line>.collector-status{flex:0 0 auto;white-space:nowrap}
.collector-void-action{color:#b43737!important;border:1px solid #edc0c0!important;background:#fff6f5!important;white-space:nowrap}
.collector-void-action:hover{background:#ffebe8!important;border-color:#dc9393!important}
.collector-header-line>.collector-void-action{flex:0 0 auto;min-height:28px;padding:3px 8px;font-size:12px}
#railwayCollectorVoidDialog{width:min(460px,calc(100vw - 24px));box-sizing:border-box}
#railwayCollectorVoidDialog .collector-note{display:grid;gap:6px}
.collector-void-summary{display:grid;gap:7px;padding:10px;border:1px solid #e2e8f0;border-radius:7px;background:#f7f9fc;overflow-wrap:anywhere;font-size:13px}
.collector-void-details{display:grid;gap:5px;margin:8px 0;padding:8px 10px;border-left:3px solid #bc4b4b;border-radius:4px;background:#fff5f4;color:#943b3b;font-size:12px;overflow-wrap:anywhere;white-space:pre-wrap}
.collector-void-details small{color:#916161}
#railwayCollectorHistoryDialog{width:min(640px,calc(100vw - 24px));box-sizing:border-box}
.collector-history-heading{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:12px}
.collector-history-heading>strong{overflow-wrap:anywhere}
.collector-header-line>.railway-pass-void-stamp{flex:0 0 auto;margin:0 2px;white-space:nowrap}
:is(.railway-pass-table,.customer-railway-management-table,.customer-railway-report-card,.collector-dialog,.collector-ledger-flow,#railwayPassSelectedFlow,.railway-pass-review-dialog) .shared-pass-completed-stamp{display:inline-flex;flex:none;align-items:center;border:2px double #278260;border-radius:4px;padding:2px 7px;margin:3px 4px;color:#217350!important;background:#f2fbf6;font-size:12px;font-weight:800;line-height:1.35;transform:rotate(-6deg);white-space:nowrap;vertical-align:middle}
:is(.railway-pass-table,.customer-railway-management-table,.customer-railway-report-card,.collector-dialog,.collector-ledger-flow,#railwayPassSelectedFlow,.railway-pass-review-dialog) .railway-pass-void-stamp{display:inline-flex;flex:none;align-items:center;border:2px double #b44545;border-radius:4px;padding:2px 7px;margin:3px 4px;color:#aa3535!important;background:#fff7f6;font-size:12px;font-weight:800;line-height:1.35;transform:rotate(-8deg);white-space:nowrap;vertical-align:middle}
.customer-railway-report-card[data-report-type="collector"]::after{content:none!important}
.customer-railway-report-card[data-report-type="collector"]{filter:none}


/* Node-focused customer pass dialogs. All rules stay inside this dialog; the
   desktop and phone layouts have separate boundaries. */
#customerRailwayStepDialog.is-node-task { box-sizing:border-box; padding:0; border:1px solid var(--step-color,#2563eb); border-radius:16px; overflow:hidden; }
#customerRailwayStepDialog.is-node-task *, #customerRailwayStepDialog.is-node-task *::before, #customerRailwayStepDialog.is-node-task *::after { box-sizing:border-box; }
#customerRailwayStepDialog.is-node-task::backdrop { background:rgba(15,23,42,.16); backdrop-filter:none; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-form,
body.customer-portal #customer > #customerRailwayStepDialog.customer-railway-step-dialog.is-node-task > .customer-railway-step-form { display:flex; flex-direction:column; min-width:0; min-height:0; height:auto !important; max-height:calc(var(--customer-pass-task-height) - 2px) !important; overflow:hidden; margin:0; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-form>header { flex:none; display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border-top:4px solid var(--step-color,#2563eb); background:#f5f8fc; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-form>header>div { min-width:0; flex:1; }
#customerRailwayStepDialog.is-node-task #customerRailwayStepTitle { display:block; font-size:17px; line-height:1.5; overflow-wrap:anywhere; }
#customerRailwayStepDialog.is-node-task #customerRailwayStepSummary { display:block; margin-top:4px; font-size:12px; color:#64748b; overflow-wrap:anywhere; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-form>header>button { flex:none; min-height:36px; padding:6px 12px; white-space:nowrap; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-body { display:flex; flex-direction:column; gap:12px; padding:14px 16px; min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; max-height:none; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-context { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; padding:10px 12px; border-radius:10px; background:#f0f5fb; color:#334155; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-context strong { color:var(--step-color,#2563eb); }
#customerRailwayStepDialog.is-node-task .customer-pass-node-subflow { margin-top:7px; color:#64748b; font-size:12px; }
#customerRailwayStepDialog.is-node-task .customer-pass-receipt-check { display:grid; gap:6px; padding:10px 12px; margin-top:10px; border:1px solid #dbe5f1; border-radius:10px; background:#f8fbff; overflow-wrap:anywhere; }
#customerRailwayStepDialog.is-node-task .customer-pass-receipt-check>div { display:grid; gap:3px; }
#customerRailwayStepDialog.is-node-task .customer-pass-receipt-check>strong { color:var(--step-color,#2563eb); }
#customerRailwayStepDialog.is-node-task .customer-pass-receipt-check small { color:#64748b; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-hint { padding:10px 12px; margin:0; border-radius:10px; line-height:1.6; font-size:13px; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-workspace { display:flex; flex-direction:column; gap:12px; min-width:0; min-height:0; height:auto; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-workspace.is-shop-confirm-hidden { display:none; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-evidence { order:0; padding:12px; min-width:0; min-height:0; height:auto; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-history { order:1; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-history { padding:10px 0 0; border:0; min-height:0; height:auto; max-height:none; overflow:visible; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-history li>div span { white-space:normal; overflow-wrap:anywhere; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-history article, #customerRailwayStepDialog.is-node-task .customer-railway-step-history li { overflow-wrap:anywhere; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; min-width:0; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-fields label { min-width:0; }
#customerRailwayStepDialog.is-node-task input:not([type=checkbox]):not([type=file]), #customerRailwayStepDialog.is-node-task select, #customerRailwayStepDialog.is-node-task textarea { width:100%; min-width:0; max-width:100%; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-evidence-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; min-width:0; }
#customerRailwayStepDialog.is-node-task .customer-railway-evidence-card { width:100%; min-width:0; padding:8px; overflow:hidden; }
#customerRailwayStepDialog.is-node-task .customer-railway-evidence-card>span { height:54px; }
#customerRailwayStepDialog.is-node-task .customer-railway-evidence-card strong, #customerRailwayStepDialog.is-node-task .customer-railway-evidence-card small { overflow-wrap:anywhere; white-space:normal; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-upload { margin-top:10px; padding:12px; min-height:72px; }
#customerRailwayStepDialog.is-node-task .customer-pass-selected-files>div { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:8px; }
#customerRailwayStepDialog.is-node-task .customer-pass-selected-files>div>span { flex:1 1 160px; min-width:0; overflow-wrap:anywhere; }
#customerRailwayStepDialog.is-node-task .customer-pass-selected-files button { min-height:36px; padding:5px 10px; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-fold { border:1px solid #e0e7f0; border-radius:10px; padding:9px 11px; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-fold>summary, #customerRailwayStepDialog.is-node-task .customer-pass-node-supplement>summary { cursor:pointer; font-weight:600; color:#52647d; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-fold>div, #customerRailwayStepDialog.is-node-task .customer-pass-node-fold>label, #customerRailwayStepDialog.is-node-task .customer-pass-node-fold>section { margin-top:10px; }
#customerRailwayStepDialog.is-node-task .customer-pass-document-status { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-supplement { flex:1 1 180px; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-supplement button { margin:8px 6px 4px 0; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-supplement small { display:block; line-height:1.5; }
#customerRailwayStepDialog.is-node-task .customer-pass-node-picker { display:none !important; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-actions { display:flex; gap:8px; flex-wrap:wrap; }
#customerRailwayStepDialog.is-node-task .customer-railway-step-actions button { min-height:42px; flex:1; white-space:normal; }
#customerRailwayStepDialog.is-node-task [hidden], #customerRailwayStepDialog.is-node-task .is-step-upload-hidden { display:none !important; }
/* Ten-node tasks are separate from the legacy preflight contract form. */
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-node-terms,
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-node-note,
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-node-followup,
#customerRailwayStepDialog.is-minimal-node-task #customerRailwayDocumentStatus,
#customerRailwayStepDialog.is-minimal-node-task #customerRailwayAttachmentEntry,
#customerRailwayStepDialog.is-minimal-node-task #customerRailwayFollowUp,
#customerRailwayStepDialog.is-minimal-node-task #customerRailwayTermsReject,
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-node-history>summary { display:none !important; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-node-history { padding:0; border:0; order:0; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-node-history>div { margin:0; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-history { padding:0; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-form>header { padding:14px 18px; background:color-mix(in srgb,var(--step-color,#2563eb) 7%,white); }
#customerRailwayStepDialog.is-minimal-node-task #customerRailwayStepTitle { display:flex; align-items:center; gap:8px; font-size:17px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-number { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; flex:none; border-radius:50%; background:var(--step-color,#2563eb); color:white; font-size:14px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-role { margin-left:auto; border-radius:6px; padding:3px 7px; font-size:12px; font-weight:600; white-space:nowrap; color:var(--step-color,#2563eb); background:color-mix(in srgb,var(--step-color,#2563eb) 10%,white); }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-body { padding:16px 18px; gap:12px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-evidence { padding:0; border:0; box-shadow:none; background:transparent; order:1; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-evidence-head { margin-bottom:6px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-evidence-grid { display:flex; flex-direction:column; gap:6px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-file { display:flex; align-items:center; gap:8px; min-width:0; padding:7px 9px; border:1px solid #e2e8f0; border-radius:8px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-file>span { flex:1; min-width:0; overflow-wrap:anywhere; font-size:13px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-file>button { flex:none; min-height:36px; padding:4px 9px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-result { display:grid; gap:6px; padding:12px; border:1px solid #e2e8f0; border-radius:9px; overflow-wrap:anywhere; font-size:13px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-result+article { margin-top:8px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-pass-minimal-result small { color:#64748b; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-actions { padding-top:2px; }
#customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-actions:not(:has(button:not([hidden]))) { display:none; }
#customerRailwayStepDialog.is-minimal-node-task #customerRailwayStepSubmit { background:var(--step-color,#2563eb); border-color:var(--step-color,#2563eb); }
#customerRailwaySelectedFlow .shared-pass-progress-node.is-locked,
#customerRailwayReportCards .shared-pass-progress-node.is-locked { cursor:default; }
#customerRailwaySelectedFlow .shared-pass-node-action>.shared-pass-pending-button,
#customerRailwayReportCards .shared-pass-node-action>.shared-pass-pending-button { display:block; cursor:inherit; width:max-content; min-width:0; height:auto; min-height:0; border-radius:6px; font-size:11px; line-height:1.3; padding:4px 7px; max-width:180px; white-space:nowrap; animation:none; }
#customerRailwaySelectedFlow .shared-pass-node-action,
#customerRailwayReportCards .shared-pass-node-action { width:max-content; max-width:180px; }
#customerRailwaySelectedFlow .shared-pass-progress-node:first-child .shared-pass-node-action,
#customerRailwayReportCards .shared-pass-progress-node:first-child .shared-pass-node-action { left:0; transform:none; }
#customerRailwaySelectedFlow .shared-pass-progress-node:last-child .shared-pass-node-action,
#customerRailwayReportCards .shared-pass-progress-node:last-child .shared-pass-node-action { left:auto; right:0; transform:none; }
@media (min-width:761px) {
  #customerRailwayStepDialog.is-node-task { --customer-pass-task-height:min(780px,calc(100dvh - 32px)); }
  #customerRailwayStepDialog.is-node-task .customer-railway-step-body>*,
  #customerRailwayStepDialog.is-node-task .customer-railway-step-workspace>* { flex-shrink:0; }
  /* Match the legacy portal sizing selector plus the explicit task opt-in.
     Reset logical inline-size too; otherwise the old 50vw wins over width. */
  #customerRailwayStepDialog.is-node-task,
  body.customer-portal #customer > #customerRailwayStepDialog.customer-railway-step-dialog.is-node-task { inline-size:min(580px,calc(100vw - 32px)) !important; width:min(580px,calc(100vw - 32px)) !important; min-width:0 !important; max-width:calc(100vw - 32px) !important; height:auto !important; max-height:min(780px,calc(100dvh - 32px)) !important; }
  #customerRailwayStepDialog.is-node-task.is-minimal-node-task,
  body.customer-portal #customer > #customerRailwayStepDialog.customer-railway-step-dialog.is-node-task.is-minimal-node-task { inline-size:min(490px,calc(100vw - 32px)) !important; width:min(490px,calc(100vw - 32px)) !important; }
}
@media (max-width:760px) {
  #customerRailwayStepDialog.is-node-task { --customer-pass-task-height:calc(100dvh - 16px - env(safe-area-inset-bottom)); }
  #customerRailwayStepDialog.is-node-task,
  body.customer-portal #customer > #customerRailwayStepDialog.customer-railway-step-dialog.is-node-task { inline-size:calc(100vw - 16px) !important; width:calc(100vw - 16px) !important; min-width:0 !important; max-width:calc(100vw - 16px) !important; height:auto !important; max-height:calc(100dvh - 16px - env(safe-area-inset-bottom)) !important; border-radius:12px; }
  #customerRailwayStepDialog.is-node-task .customer-railway-step-form>header { padding:10px 12px; gap:8px; }
  #customerRailwayStepDialog.is-node-task .customer-railway-step-body { padding:12px; gap:10px; }
  #customerRailwayStepDialog.is-node-task .customer-railway-step-body>*,
  #customerRailwayStepDialog.is-node-task .customer-railway-step-workspace>* { flex-shrink:0; }
  #customerRailwayStepDialog.is-node-task .customer-railway-step-fields { grid-template-columns:minmax(0,1fr); }
  /* Keep the native, label-triggered file picker visually hidden. The portal's
     generic mobile input width must not expand it beyond its upload label. */
  #customerRailwayStepDialog.is-node-task .customer-railway-step-upload { position:relative; grid-template-columns:34px minmax(0,1fr); }
  #customerRailwayStepDialog.is-node-task #customerRailwayStepFile { width:1px; inline-size:1px; max-width:1px; height:1px; min-height:0; padding:0; inset:0 auto auto 0; clip-path:inset(50%); }
  #customerRailwayStepDialog.is-node-task input, #customerRailwayStepDialog.is-node-task textarea, #customerRailwayStepDialog.is-node-task select { font-size:16px; }
  #customerRailwayStepDialog.is-node-task button { min-height:40px; }
  #customerRailwayStepDialog.is-node-task #customerRailwayStepTitle { font-size:16px; }
  #customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-form>header { padding:10px 12px; }
  #customerRailwayStepDialog.is-minimal-node-task .customer-railway-step-body { padding:12px; }
  #customerRailwayStepDialog.is-node-task .customer-partial-allocation { display:grid; grid-template-columns:minmax(0,1fr) 72px; gap:6px; }
}

/* Compact pass review: scoped to the pass cards and their review dialog. */
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass {
  display:flex !important; flex-direction:column !important; gap:5px !important; padding:9px !important;
  border:1px solid #d9e3f3 !important; border-radius:9px !important; box-shadow:none !important;
  background:#fff !important; min-width:0 !important; min-height:0 !important; height:auto !important;
  font-size:12px !important; line-height:1.35 !important;
}
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass.is-flow-selected { border-color:#789bf7 !important; background:#fafcff !important; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass::before,
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass::after { display:none !important; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass>header { display:flex; flex-wrap:wrap; align-items:center; gap:4px; min-height:0; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass>header>strong { font-size:12px; overflow-wrap:anywhere; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-report-stage { padding:2px 4px; font-size:10px; line-height:1.3; margin-left:auto; white-space:normal; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass h3 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; white-space:normal; text-overflow:clip; font-size:13px; line-height:1.4; margin:1px 0; min-height:36px; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-related { gap:4px; padding:0; min-height:16px; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-related strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; font-weight:400; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-related small { font-size:11px; color:#7b8ca6; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-summary { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:5px 7px !important; margin:0 0 5px !important; align-content:start; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-summary>div { display:block; min-width:0; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-summary dt { font-size:11px; color:#7b8ca6; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-summary dd { font-size:12px !important; margin:2px 0 0; line-height:1.4; overflow:visible; overflow-wrap:anywhere; white-space:normal; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-card-summary dd.is-money { color:#087c68; font-weight:650; font-variant-numeric:tabular-nums; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .pass-card-reason { background:#fff7ed; color:#8d4e15; border:0; border-radius:4px; padding:4px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; text-align:left; min-width:0; min-height:0; font-size:11px; font-weight:400; white-space:normal; line-height:1.4; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .is-compact-pass>footer { margin-top:auto !important; display:flex; align-items:center; justify-content:space-between; gap:4px; padding:6px 0 0; border-top:1px solid #e8edf5; min-height:34px; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five footer time { display:block; font-size:10px; line-height:1.4; color:#7587a3; min-width:0; white-space:normal; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five footer time small { display:block; font-size:10px; }
#customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five .customer-railway-step-button { min-width:0; min-height:28px; padding:4px 7px; font-size:11px; white-space:nowrap; flex:none; }
@media(min-width:761px) {
  body.customer-portal #customer#customer#customer#customer #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards.is-compact-five,
  #customerRailwayManagementView#customerRailwayManagementView.is-card-view #customerRailwayReportCards.customer-railway-report-cards.is-compact-five { display:grid !important; grid-template-columns:repeat(auto-fill,minmax(min(100%,max(230px,calc((100% - 40px)/5))),1fr)) !important; gap:10px !important; overflow-x:hidden !important; overflow-y:auto !important; align-items:stretch !important; align-content:start !important; }
}
@media(max-width:760px) {
  #customerRailwayManagementView#customerRailwayManagementView #customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards#customerRailwayReportCards.is-compact-five { gap:10px !important; }
}
#customerRailwayReviewDialog { box-sizing:border-box; position:fixed !important; inset:0 !important; margin:auto !important; width:min(560px,calc(100vw - 24px)) !important; inline-size:min(560px,calc(100vw - 24px)) !important; min-width:0 !important; height:fit-content !important; max-height:calc(100dvh - 24px) !important; padding:0 !important; overflow:auto !important; border:1px solid #c8d8f3 !important; border-top:3px solid #3563eb !important; border-radius:10px !important; background:white !important; color:#243b5b; font:13px/1.4 -apple-system,BlinkMacSystemFont,"Microsoft YaHei",sans-serif; box-shadow:0 16px 50px #102c5229 !important; }
#customerRailwayReviewDialog::backdrop { background:rgb(25 43 70 / 32%); }
#customerRailwayReviewDialog [hidden] { display:none !important; }
#customerRailwayReviewDialog * { box-sizing:border-box; }
#customerRailwayReviewDialog header { display:flex; align-items:center; gap:8px; padding:10px 12px; background:#f5f8ff; border-bottom:1px solid #e2eaf7; }
#customerRailwayReviewDialog header>div { flex:1; min-width:0; }
#customerRailwayReviewDialog header strong { font-size:16px; }
#customerRailwayReviewDialog header small { display:block; color:#7385a0; margin-top:3px; }
#customerRailwayReviewDialog header button { font-size:20px; padding:1px 8px; min-width:0; }
#customerRailwayReviewDialog .pass-review-state { font-size:11px; background:#e9efff; color:#345bce; padding:3px 6px; border-radius:4px; }
#customerRailwayReviewDialog .pass-review-body { padding:12px; display:grid; gap:10px; }
#customerRailwayReviewDialog .pass-review-project { display:block; font-size:13px; }
#customerRailwayReviewDialog .pass-review-product { margin:6px 0 10px; font-size:12px; color:#60738f; }
#customerRailwayReviewDialog .pass-review-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; margin:0; }
#customerRailwayReviewDialog .pass-review-fields>div { min-width:0; }
#customerRailwayReviewDialog dt { color:#7a8aa1; font-size:11px; }
#customerRailwayReviewDialog dd { margin:2px 0 0; overflow-wrap:anywhere; font-size:13px; }
#customerRailwayReviewDialog dd.is-money { color:#087d69; font-weight:650; font-variant-numeric:tabular-nums; }
#customerRailwayReviewDialog .pass-review-reason { padding:8px; background:#fff8ee; border:1px solid #f5dfbd; border-radius:6px; margin-top:10px; }
#customerRailwayReviewDialog .pass-review-reason strong { color:#9c5a18; font-size:12px; }
#customerRailwayReviewDialog p { overflow-wrap:anywhere; }
#customerRailwayReviewDialog .pass-review-reason p { margin:3px 0 0; white-space:pre-wrap; }
#customerRailwayReviewDialog .pass-review-history { border-top:1px solid #e5ecf5; padding-top:8px; }
#customerRailwayReviewDialog summary { cursor:pointer; color:#547095; font-size:12px; }
#customerRailwayReviewDialog .pass-review-history article { display:grid; gap:3px; padding:8px 0; border-bottom:1px solid #edf1f7; }
#customerRailwayReviewDialog .pass-review-history article strong { font-size:12px; }
#customerRailwayReviewDialog .pass-review-history article small { font-size:11px; color:#7b8da5; }
#customerRailwayReviewDialog .pass-review-history article p { margin:2px 0; white-space:pre-wrap; }
#customerRailwayReviewDialog input,#customerRailwayReviewDialog select,#customerRailwayReviewDialog textarea { width:100%; min-width:0; font:inherit; color:inherit; background:#fff; border:1px solid #cdd9eb; border-radius:5px; padding:6px 8px; }
#customerRailwayReviewDialog textarea { margin-top:6px; resize:vertical; min-height:66px; }
#customerRailwayReviewDialog button { font:inherit; cursor:pointer; border:1px solid #d7e1f1; border-radius:5px; padding:6px 9px; min-height:30px; background:#fff; color:#38567d; box-shadow:none; }
#customerRailwayReviewDialog button:disabled { opacity:.55; cursor:wait; }
#customerRailwayReviewDialog button:focus-visible,#customerRailwayReviewDialog input:focus-visible,#customerRailwayReviewDialog select:focus-visible,#customerRailwayReviewDialog textarea:focus-visible { outline:2px solid #5084f5; outline-offset:2px; }
#customerRailwayReviewDialog button.primary { background:#2861eb; color:#fff; border-color:#2861eb; }
#customerRailwayReviewDialog button.pass-review-refuse { color:#c1473f; border-color:transparent; }
#customerRailwayReviewDialog button.pass-review-return { color:#b57022; border-color:#edc898; }
#customerRailwayReviewDialog .pass-review-decision { padding:9px; border:1px solid #e6d8c7; border-radius:6px; background:#fffdf9; }
#customerRailwayReviewDialog .pass-review-decision small { display:block; font-size:11px; color:#7b8ca5; }
#customerRailwayReviewDialog .pass-review-decision>div { display:flex; justify-content:flex-end; gap:6px; margin-top:8px; }
#customerRailwayReviewDialog footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:10px 12px; border-top:1px solid #e2eaf7; }
#customerRailwayReviewDialog footer time { color:#7a8ca5; font-size:11px; }
#customerRailwayReviewDialog .pass-review-main-actions { display:flex; flex-wrap:wrap; gap:6px; margin-left:auto; }
#customerRailwayReviewDialog .pass-review-main-actions>span { font-size:11px; color:#7c8ba0; }
#customerRailwayReviewDialog [data-review-error] { color:#bb3936; background:#fff4f3; padding:8px; border-radius:5px; }
#customerRailwayReviewDialog .pass-review-recovery { display:flex; justify-content:flex-end; gap:6px; }
#customerRailwayReviewDialog .pass-review-recovery button { padding:2px 5px; min-height:24px; font-size:11px; border:0; color:#7489a4; }
#customerRailwayReviewDialog .pass-review-edit { display:grid; gap:7px; border-top:1px solid #e5ecf5; padding-top:9px; }
#customerRailwayReviewDialog .pass-review-edit>small { color:#7184a0; font-size:11px; }
#customerRailwayReviewDialog .pass-review-edit-item { border:1px solid #e2eaf5; padding:8px; border-radius:6px; display:grid; gap:6px; }
#customerRailwayReviewDialog .pass-review-edit-item>strong { font-size:12px; }
#customerRailwayReviewDialog .pass-review-edit-line { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; align-items:end; }
#customerRailwayReviewDialog label { display:block; font-size:12px; }
#customerRailwayReviewDialog .pass-review-edit-line>span { padding-bottom:7px; font-size:12px; color:#7184a0; }
#customerRailwayReviewDialog .pass-review-edit-line input,#customerRailwayReviewDialog .pass-review-edit-line select { display:block; margin-top:4px; }
#customerRailwayReviewDialog .pass-review-search { display:flex; gap:6px; margin-top:6px; }
#customerRailwayReviewDialog .pass-review-search button { flex:none; }
#customerRailwayReviewDialog [data-review-product-results] { display:grid; gap:4px; max-height:180px; overflow:auto; }
#customerRailwayReviewDialog [data-review-product-results] button { font-size:12px; text-align:left; }
#customerRailwayReviewDialog .pass-review-totals { background:#edf8f4; padding:7px; border-radius:5px; font-size:12px; color:#17765e; }
@media(max-width:760px) {
  #customerRailwayReviewDialog { width:calc(100vw - 16px) !important; inline-size:calc(100vw - 16px) !important; max-height:calc(100dvh - 16px) !important; }
  #customerRailwayReviewDialog .pass-review-body { padding:10px; }
  #customerRailwayReviewDialog .pass-review-fields { gap:8px 10px; }
  #customerRailwayReviewDialog input,#customerRailwayReviewDialog select,#customerRailwayReviewDialog textarea { font-size:16px; }
  #customerRailwayReviewDialog button { min-height:36px; }
}

#customerRailwayReviewDialog .pass-review-original>summary { margin-bottom:8px; }

#customerRailwayStepDialog [data-pass-short-progress] { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border: 1px solid #dce7ef; border-radius: 8px; background: #f3f8fc; line-height: 1.5; }


/* Admin customer directory and account drawer only. */
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-cell {
  font-variant-numeric: tabular-nums;
}
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  min-width: 0;
  max-width: 100%;
  min-height: 26px;
  height: auto;
  margin: 0;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #edf2f7;
  color: #667085;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
  cursor: pointer;
}
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open.is-normal { background: #e8f6ef; color: #13744a; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open.is-warning { background: #fff3dc; color: #985a0b; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open.is-urgent { background: #fff0ee; color: #c43228; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open.is-expired { background: #ffe5eb; color: #9f233c; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open.is-disabled,
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open.is-unknown { background: #eef1f5; color: #667085; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open:hover { border-color: currentColor; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-open:focus-visible { outline: 2px solid #315de8; outline-offset: 2px; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-date { white-space: nowrap; font-size: 10px; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-search-box > .customer-validity-sort-tools { display: flex; grid-column: 1 / -1; align-items: center; gap: 6px; width: fit-content; max-width: 100%; min-width: 0; }
body:not(.customer-portal):not(.supplier-portal) #customers .customer-validity-sort-tools > button { flex: 0 0 auto; min-width: 58px; padding-inline: 10px; }
body:not(.customer-portal):not(.supplier-portal) #customers #customerValiditySortBtn { white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customers #customerValiditySortBtn[aria-pressed="true"] { background: #edf3ff; border-color: #a6bcf5; color: #315de8; }

body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity {
  min-width: 0;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #dbe5f4;
  border-radius: 12px;
  background: #f7faff;
  color: #263d60;
  box-sizing: border-box;
  font-size: 13px;
  container: account-validity / inline-size;
}
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity * { box-sizing: border-box; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity [hidden] { display: none !important; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-heading > strong { font-size: 14px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-remaining { border-radius: 12px; background: #eaf1ff; color: #315de8; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-state { margin-left: auto; border-radius: 12px; background: #e5f5ed; color: #167348; padding: 3px 8px; font-size: 12px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-state.is-warning { background: #fff3db; color: #96621a; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-state.is-expired { background: #ffebeb; color: #b52336; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-current { position: relative; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 10px 0; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-current strong { font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-current small { color: #697f9e; font-size: 11px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-current-meta { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-options { min-width: 0; display: grid; gap: 8px; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content; align-items: center; gap: 6px; min-width: 0; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-select,
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-date { display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 13px; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-select select,
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-date input { min-width: 0; max-width: 100%; width: 100%; height: 36px; margin: 0; padding: 6px 10px; border: 1px solid #d5e0f2; border-radius: 8px; background-color: #fff; color: #263d60; font-size: 13px; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-select select { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-preview { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 10px; padding: 7px 8px; border-radius: 8px; background: #edf3ff; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-pending { color: #315de8; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-preview strong { font-variant-numeric: tabular-nums; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-status { margin-top: 7px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-status:empty { display: none; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-status.is-error { color: #b42335; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rules { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rules summary { display: inline-flex; align-items: baseline; gap: 3px; width: max-content; padding: 0; color: #607796; font-size: 11px; font-weight: 400; cursor: pointer; list-style: none; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rules summary::-webkit-details-marker { display: none; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rule-content { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; right: 0; max-height: min(240px, 45vh); overflow: auto; padding: 10px; border: 1px solid #dbe5f4; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px #263d6026; color: #697f9e; font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rule-content p { margin: 0 0 6px; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-toolbar button,
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rule-content button { min-width: 0; min-height: 36px; margin: 0; padding: 6px 8px; font-size: 12px; white-space: nowrap; }
body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity :is(button,select,input,summary):focus-visible { outline: 2px solid #315de8; outline-offset: 2px; }
@media (max-width: 760px) {
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity { padding: 12px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-heading { gap: 5px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-remaining,
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-state { padding-inline: 6px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-select select,
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-date input,
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-toolbar button,
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-rule-content button { min-height: 40px; }
}
/* The admin sidebar can leave a much narrower drawer than the viewport. */
@container account-validity (max-width: 280px) {
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-heading { flex-wrap: wrap; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-heading > strong { font-size: 13px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-remaining { font-size: 11px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-toolbar { gap: 4px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-select { gap: 4px; font-size: 12px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-toolbar button { padding-inline: 5px; font-size: 11px; }
  body:not(.customer-portal):not(.supplier-portal) #customerDetailsDrawer .customer-account-validity-select select { padding-inline: 5px; font-size: 12px; }
}


#customers .customer-announcement-access {
  min-width: 0;
  margin: 16px 0 2px;
  padding: 14px;
  border: 1px solid #dbe5f8;
  border-radius: 12px;
  background: #f8faff;
  color: #344b70;
}
#customers .customer-announcement-access-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#customers .customer-announcement-access-heading > strong { font-size: 14px; }
#customers .customer-announcement-access-heading > button { margin-left: auto; padding: 5px 10px; min-height: 30px; }
#customers .customer-announcement-access-state { padding: 4px 9px; border-radius: 20px; font-size: 12px; background: #edf0f6; color: #66748a; }
#customers .customer-announcement-access-state.is-open { color: #137b55; background: #e6f6ee; }
#customers .customer-announcement-access-expiry { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; font-size: 12px; }
#customers .customer-announcement-access-expiry strong { font-size: 13px; font-variant-numeric: tabular-nums; }
#customers .customer-announcement-access-expiry small { color: #8090aa; }
#customers .customer-announcement-access-scope { margin: 8px 0 12px; font-size: 12px; color: #71839d; }
#customers .customer-announcement-metrics { overflow-x: auto; border: 1px solid #e1e8f5; border-radius: 8px; background: white; }
#customers .customer-announcement-metrics table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
#customers .customer-announcement-metrics th, #customers .customer-announcement-metrics td { padding: 9px 6px; text-align: center; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid #edf1f7; }
#customers .customer-announcement-metrics thead th { background: #f0f4fc; color: #667891; }
#customers .customer-announcement-metrics tbody th { font-weight: 500; }
#customers .customer-announcement-metrics small { display: block; color: #8090aa; }
#customers .customer-announcement-metrics td { font-variant-numeric: tabular-nums; font-weight: 600; }
#customers .customer-announcement-access details { margin-top: 10px; font-size: 12px; }
#customers .customer-announcement-access summary { cursor: pointer; color: #4b6b9a; }
#customers .customer-announcement-access details p { margin: 8px 0 0; line-height: 1.6; }
#customers .customer-announcement-access-diagnostics { color: #9b5d16; }
#customers .customer-announcement-access-diagnostics summary { color: inherit; }
#customers .customer-announcement-access ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
#customers .customer-announcement-access-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#customers .customer-announcement-access-actions > span { font-size: 11px; color: #7b8ba2; }
#customers .customer-announcement-access-actions > button { min-height: 34px; padding: 7px 12px; font-size: 12px; }
#customers .customer-announcement-access-message { margin: 8px 0 0; font-size: 12px; color: #137b55; overflow-wrap: anywhere; }
#customers .customer-announcement-access-message:empty { display: none; }
#customers .customer-announcement-access-message.is-error { color: #c54436; }
#customers .customer-announcement-access-audits ul { list-style: none; padding-left: 0; }
#customers .customer-announcement-access-audits li { padding: 7px 0; border-top: 1px solid #e1e8f5; }
#customers .customer-announcement-access-audits strong, #customers .customer-announcement-access-audits span, #customers .customer-announcement-access-audits small { display: block; overflow-wrap: anywhere; }
#customers .customer-announcement-access-audits small { color: #7b8ba2; }

#customers .customer-announcement-access-deposit-scope { margin: 8px 0 0; font-size: 11px; line-height: 1.6; color: #9b5d16; }


.customer-activity-dialog { width:min(1320px,calc(100vw - 40px)); max-width:calc(100vw - 40px); max-height:92vh; padding:0; border:1px solid #dce4f2; border-radius:18px; color:#26344d; background:#fff; box-shadow:0 24px 80px rgba(15,30,60,.24); }
.customer-activity-dialog::backdrop { background:rgba(19,31,53,.46); }
.customer-activity-dialog[open] { display:flex; flex-direction:column; }
.customer-activity-dialog [hidden] { display:none !important; }
.customer-activity-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; flex-shrink:0; padding:22px 26px 18px; border-bottom:1px solid #e7ecf4; }
.customer-activity-heading h2 { margin:0 0 6px; font-size:22px; }
.customer-activity-heading p { margin:0; font-size:13px; color:#718198; }
.customer-activity-tabs { display:flex; gap:10px; padding:12px 26px 0; flex-shrink:0; }
.customer-activity-tabs [aria-current] { background:#edf2ff; color:#365bdd; border-color:#aebfff; }
.customer-activity-content { overflow:auto; overscroll-behavior:contain; min-height:0; padding:20px 26px 22px; }
.customer-activity-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; }
.customer-activity-filters label,.customer-activity-section-heading label { display:flex; flex-direction:column; gap:6px; color:#64748b; font-size:12px; }
.customer-activity-filters input,.customer-activity-filters select,.customer-activity-section-heading select { min-height:38px; height:38px; padding:7px 10px; border:1px solid #d8e1f0; border-radius:8px; font:inherit; font-size:14px; color:#26344d; background:#fff; }
.customer-activity-filters input[type=date] { min-width:145px; }
.customer-activity-search { flex:1; min-width:200px; }
.customer-activity-dialog button { font-size:13px; white-space:nowrap; }
.customer-activity-context { display:flex; align-items:center; gap:12px; min-height:39px; margin:7px 0; }
#customerActivityFreshness { color:#7a889d; font-size:12px; }
.customer-activity-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.customer-activity-summary>div { padding:16px 18px; border:1px solid #e3eaf5; border-radius:12px; background:#f7f9fd; }
.customer-activity-summary span { display:block; color:#6b7b92; font-size:12px; margin-bottom:8px; }
.customer-activity-summary strong { display:block; font-size:24px; color:#24457e; line-height:1.35; font-variant-numeric:tabular-nums; }
.customer-activity-table-wrap { overflow:auto; border:1px solid #e4eaf3; border-radius:10px; }
.customer-activity-table-wrap table { width:100%; min-width:880px; border-collapse:collapse; font-size:13px; text-align:left; }
.customer-activity-table-wrap th { padding:12px; background:#f4f7fb; font-size:12px; color:#697b96; font-weight:600; white-space:nowrap; }
.customer-activity-table-wrap td { padding:12px; border-top:1px solid #edf1f7; line-height:1.6; vertical-align:top; max-width:280px; overflow-wrap:anywhere; }
.customer-activity-table-wrap td strong { font-weight:600; }
.customer-activity-table-wrap td small { display:block; margin-top:3px; font-size:11px; color:#8390a4; }
.customer-activity-table-wrap tbody tr:hover { background:#fafcff; }
.customer-activity-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0 4px; color:#74849a; font-size:12px; }
.customer-activity-pager>div { display:flex; gap:8px; }
.customer-activity-note,.customer-activity-section-note { font-size:12px; color:#7a889c; line-height:1.75; }
.customer-activity-note { margin:20px 0 0; padding:13px 15px; background:#f7f9fc; border-radius:9px; }
.customer-activity-section-note { margin:9px 0 18px; }
.customer-activity-empty { display:flex; flex-direction:column; align-items:center; gap:10px; padding:36px 15px; font-size:14px; color:#8591a5; border:1px dashed #dfe6f1; border-radius:10px; text-align:center; }
.customer-activity-empty p { margin:0; }
.customer-activity-error { color:#bb354b; font-size:13px; }
.customer-activity-customer { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px; margin:0 0 16px; }
.customer-activity-customer h3 { margin:0; font-size:18px; overflow-wrap:anywhere; }
.customer-activity-customer>span { font-size:13px; color:#7a889c; }
.customer-activity-online { display:inline-block; margin-left:6px; color:#16876b !important; font-size:11px !important; background:#edf9f4; border-radius:5px; padding:1px 5px; white-space:nowrap; }
.customer-activity-section-title { font-size:15px; margin:20px 0 12px; }
.customer-activity-section-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:24px 0 12px; }
.customer-activity-section-heading .customer-activity-section-title { margin:0; }
.customer-activity-section-heading label { flex-direction:row; align-items:center; }
@media(max-width:760px) {
  .customer-activity-dialog { width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:96vh; border-radius:12px; }
  .customer-activity-heading { padding:16px; }
  .customer-activity-tabs { padding:12px 16px 0; }
  .customer-activity-content { padding:14px 16px; }
  .customer-activity-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-activity-summary>div { padding:13px; }
  .customer-activity-summary strong { font-size:19px; }
  .customer-activity-filters { gap:9px; }
  .customer-activity-filters label { flex:1; }
  .customer-activity-search { flex-basis:100% !important; }
  .customer-activity-filters input[type=date] { min-width:0; width:100%; }
}


.registration-review-dialog { padding:0; width:min(1200px,calc(100vw - 40px)); max-width:calc(100vw - 40px); max-height:92vh; border:1px solid #dce5f1; border-radius:16px; background:#fff; color:#293c54; box-shadow:0 24px 80px #18345440; }
.registration-review-dialog::backdrop,.registration-phone-dialog::backdrop { background:#182d4b80; }
.registration-review-dialog[open] { display:flex; flex-direction:column; }
.registration-review-dialog [hidden],.registration-phone-dialog [hidden] { display:none!important; }
.registration-review-header { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; padding:22px 24px; border-bottom:1px solid #e3eaf4; flex-shrink:0; }
.registration-review-header h2 { font-size:22px; margin:0 0 7px; }
.registration-review-header p { color:#7a899f; font-size:13px; margin:0; line-height:1.6; }
.registration-review-scroll { padding:20px 24px; overflow:auto; min-height:0; overscroll-behavior:contain; }
.registration-review-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin-bottom:18px; }
.registration-review-filters label,.registration-review-decision-fields>label,.registration-review-reason-field { display:flex; flex-direction:column; gap:7px; color:#53677f; font-size:13px; }
.registration-review-search { flex:1; min-width:200px; }
.registration-review-dialog input:not([type=checkbox]),.registration-review-dialog select,.registration-review-dialog textarea,.registration-phone-dialog input:not([type=checkbox]),.registration-phone-dialog textarea { box-sizing:border-box; padding:9px 11px; border:1px solid #d1ddea; border-radius:8px; min-height:38px; color:#2a4058; background:#fff; font:inherit; font-size:14px; width:100%; }
.registration-review-dialog textarea,.registration-phone-dialog textarea { resize:vertical; }
.registration-review-dialog button,.registration-phone-dialog button { padding:8px 13px; font-size:13px; border:1px solid #d6e0ed; border-radius:8px; background:#f6f8fc; color:#385879; white-space:nowrap; }
.registration-review-dialog button.primary,.registration-phone-dialog button.primary { color:#fff; background:#426add; border-color:#426add; }
.registration-review-dialog button.danger { color:#b24653; border-color:#edd1d5; background:#fff5f6; }
.registration-review-dialog button:disabled,.registration-phone-dialog button:disabled { opacity:.5; cursor:not-allowed; }
.registration-review-error { padding:11px 14px; font-size:13px; line-height:1.7; color:#a95727; border-radius:8px; background:#fff7ed; }
.registration-review-empty { padding:38px 16px; color:#8291a6; border:1px dashed #dce4ef; border-radius:10px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:12px; }
.registration-review-table { overflow:auto; border:1px solid #e2e9f2; border-radius:10px; }
.registration-review-table table { min-width:720px; width:100%; border-collapse:collapse; font-size:13px; text-align:left; }
.registration-review-table th { background:#f3f6fb; padding:12px; color:#667f99; font-size:12px; }
.registration-review-table td { padding:13px 12px; border-top:1px solid #e7edf5; max-width:380px; overflow-wrap:anywhere; vertical-align:top; }
.registration-review-table small { display:block; margin-top:6px; color:#8a97aa; font-size:11px; }
.registration-review-status { display:inline-flex; padding:4px 9px; border-radius:6px; color:#6e7d90; background:#eff2f7; font-size:12px; }
.registration-review-status.is-pending { color:#3c60be; background:#edf2ff; }
.registration-review-status.is-approved { color:#188567; background:#e9f8f1; }
.registration-review-status.is-returned,.registration-review-status.is-rejected { color:#b2702a; background:#fff4e6; }
.registration-review-pager { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:14px; color:#7b8ca3; font-size:12px; }
.registration-review-pager>div { display:flex; gap:9px; }
.registration-review-back { margin:0 0 14px; }
.registration-review-detail-head { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-bottom:18px; }
.registration-review-detail-head h3 { font-size:19px; margin:0; overflow-wrap:anywhere; }
.registration-review-detail-head>span { font-size:13px; color:#667d94; }
.registration-review-detail-grid { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); gap:24px; }
.registration-review-detail-grid>section { padding:18px; border:1px solid #e1e8f2; border-radius:12px; min-width:0; }
.registration-review-detail-grid h3,.registration-review-history h3 { margin:0 0 16px; font-size:15px; }
.registration-review-image-button { display:block; width:100%; padding:10px!important; background:#f4f7fa!important; margin-bottom:14px; }
#customerRegistrationReviewImage { width:100%; max-height:290px; object-fit:contain; }
#customerRegistrationReviewImage.is-enlarged { max-height:none; }
#customerRegistrationReviewImageState { color:#8796a8; font-size:12px; }
.registration-review-compare { display:flex; flex-direction:column; gap:7px; padding:12px 0; border-bottom:1px solid #e7edf5; font-size:13px; overflow-wrap:anywhere; }
.registration-review-compare small { color:#7d8fa7; line-height:1.6; }
.registration-review-compare.is-changed { background:#fffaf0; padding:12px; border-radius:7px; }
.registration-review-compare.is-changed small { color:#ac752d; }
.registration-review-meta { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin:17px 0; font-size:13px; }
.registration-review-meta dt { color:#8492a5; font-size:12px; margin-bottom:6px; }
.registration-review-meta dd { margin:0; color:#435c78; overflow-wrap:anywhere; }
.registration-review-check { display:flex!important; flex-direction:row!important; gap:9px!important; align-items:flex-start; font-size:13px; line-height:1.7; padding:10px 0; color:#426580; }
.registration-review-check input { flex-shrink:0; margin-top:4px; width:16px; height:16px; }
.registration-review-decision-fields { display:grid; gap:14px; margin:12px 0 18px; }
.registration-review-decision-fields small,.registration-review-note { color:#8492a6; font-size:12px; line-height:1.7; }
.registration-review-existing { padding:14px; border:1px solid #d8e5f3; border-radius:9px; background:#f6f9fd; margin:12px 0; }
.registration-review-existing .registration-review-meta { margin:0 0 12px; }
.registration-review-existing .registration-review-note { margin:0; }
.registration-review-identity { padding:12px 14px; color:#356d61; background:#eef8f4; border-radius:8px; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.registration-review-identity.is-blocked,.registration-review-phone-warning { background:#fff5e8; color:#985c25; }
.registration-review-conflicts { margin:12px 0 18px; padding:14px; border:1px solid #ecd7af; border-radius:10px; background:#fffaf1; }
.registration-review-conflicts h3 { margin:0 0 8px; font-size:15px; }
.registration-review-conflicts p { margin:6px 0 12px; color:#8b642e; font-size:12px; line-height:1.7; }
.registration-review-conflict-list { display:grid; gap:8px; max-height:260px; overflow:auto; margin-bottom:12px; }
.registration-review-conflict-list article { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px; border:1px solid #e7dfd2; border-radius:8px; background:#fff; }
.registration-review-conflict-list label { display:flex; align-items:flex-start; gap:8px; min-width:0; font-size:13px; }
.registration-review-conflict-list input { flex:none; width:16px; height:16px; margin-top:3px; }
.registration-review-conflict-list label>span { display:grid; gap:4px; min-width:0; overflow-wrap:anywhere; }
.registration-review-conflict-list small { color:#7e8a9a; font-size:12px; }
.registration-review-conflict-list button { flex:none; }
.registration-review-check.registration-review-phone-warning { padding:10px; border:1px solid #efd5b2; border-radius:8px; }
.registration-review-retained { display:flex; flex-direction:column; gap:4px; padding:10px 12px; color:#536d88; background:#f3f6fa; border:1px solid #e1e7ef; border-radius:8px; overflow-wrap:anywhere; }
.registration-review-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.registration-review-reason { padding:11px 13px; background:#fff5e8; color:#a56d2a; font-size:13px; border-radius:8px; line-height:1.7; overflow-wrap:anywhere; white-space:pre-wrap; }
.registration-review-history { margin-top:25px; }
.registration-review-history article { padding:14px; border:1px solid #e4eaf2; border-radius:9px; margin-bottom:10px; font-size:13px; }
.registration-review-history article>span { color:#8a96a8; font-size:12px; margin-left:14px; }
.registration-review-history p { color:#63768e; white-space:pre-wrap; overflow-wrap:anywhere; }
.registration-review-history small { color:#8393a8; }
.registration-phone-dialog { width:min(520px,calc(100vw - 32px)); max-height:90vh; padding:0; border:1px solid #dce5f1; border-radius:15px; background:#fff; color:#2b4056; }
.registration-phone-dialog>header { display:flex; justify-content:space-between; align-items:center; gap:15px; padding:18px 22px; border-bottom:1px solid #e4ebf4; }
.registration-phone-dialog h2 { margin:0; font-size:19px; }
.registration-phone-body { padding:18px 22px; }
#customerPhoneBindingName { color:#536f8b; font-weight:600; overflow-wrap:anywhere; }
@media(max-width:760px) { .registration-review-dialog { width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:96dvh; }.registration-review-header,.registration-review-scroll { padding:16px; }.registration-review-detail-grid { grid-template-columns:1fr; }.registration-review-filters label { flex:1; }.registration-review-actions button { flex:1; }.registration-review-dialog input:not([type=checkbox]),.registration-review-dialog select,.registration-review-dialog textarea,.registration-phone-dialog input:not([type=checkbox]),.registration-phone-dialog textarea { font-size:16px; } }
/* The base admin theme fixes normal button height; document previews must grow. */
.registration-review-dialog .registration-review-image-button { display:block; height:auto!important; block-size:auto!important; max-height:none!important; min-height:80px; box-sizing:border-box; overflow:hidden; }
.registration-review-dialog #customerRegistrationReviewImage { display:block; height:auto; margin:0 auto; }

/* Geometry is confined to the registration review window. */
#customerRegistrationReviewDialog { box-sizing:border-box; overflow:hidden; }
#customerRegistrationReviewDialog.registration-review-positioned { position:fixed; inset:auto; margin:0; max-width:none; max-height:none; transform:none; }
#customerRegistrationReviewDialog .registration-review-scroll { flex:1 1 auto; min-width:0; container-type:inline-size; }
.registration-review-window-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.registration-review-resize { display:none; }
@media(min-width:761px) {
  #customerRegistrationReviewDialog .registration-review-header { cursor:move; touch-action:none; user-select:none; }
  #customerRegistrationReviewDialog .registration-review-header button { cursor:pointer; touch-action:manipulation; }
  #customerRegistrationReviewDialog.registration-review-interacting { user-select:none; }
  #customerRegistrationReviewDialog .registration-review-resize { display:block; position:absolute; z-index:5; touch-action:none; }
  #customerRegistrationReviewDialog [data-registration-resize="n"] { top:0; left:14px; right:14px; height:6px; cursor:ns-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="s"] { bottom:0; left:14px; right:14px; height:6px; cursor:ns-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="e"] { right:0; top:14px; bottom:14px; width:6px; cursor:ew-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="w"] { left:0; top:14px; bottom:14px; width:6px; cursor:ew-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="ne"] { right:0; top:0; width:14px; height:14px; cursor:nesw-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="nw"] { left:0; top:0; width:14px; height:14px; cursor:nwse-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="sw"] { left:0; bottom:0; width:14px; height:14px; cursor:nesw-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="se"] { right:0; bottom:0; width:18px; height:18px; cursor:nwse-resize; }
  #customerRegistrationReviewDialog [data-registration-resize="se"]::after { content:""; position:absolute; right:5px; bottom:5px; width:7px; height:7px; border-right:2px solid #8c9bb3; border-bottom:2px solid #8c9bb3; }
}
@container(max-width:700px) { .registration-review-detail-grid { grid-template-columns:1fr; } }
@media(max-width:760px) {
  #customerRegistrationReviewDialog [data-registration-window-reset] { display:none; }
  #customerRegistrationReviewDialog .registration-review-header>div:first-child { min-width:0; }
  #customerRegistrationReviewDialog .registration-review-search { min-width:0; flex-basis:100%; }
}

/* Business notifications retain delivery state independently of OTP audits. */
.registration-sms-notifications { margin-bottom:24px; }
.registration-sms-config { padding:10px 13px; border:1px solid #dce5f4; border-radius:8px; background:#f4f7fd; font-size:13px; line-height:1.6; }
.registration-sms-state { display:inline-flex; white-space:nowrap; padding:4px 8px; border-radius:6px; font-size:12px; color:#61748d; background:#eff3f8; }
.registration-sms-state.is-delivered { color:#167251; background:#e7f6ee; }
.registration-sms-state.is-failed { color:#b83737; background:#fff0f0; }
.registration-sms-state.is-unknown,.registration-sms-state.is-unconfigured { color:#9b621a; background:#fff4df; }
.registration-sms-state.is-pending,.registration-sms-state.is-sending,.registration-sms-state.is-accepted,.registration-sms-state.is-sent { color:#315dbe; background:#ecf2ff; }
.registration-sms-receipt-note { color:#8a601c; line-height:1.6; }
.registration-sms-table td { vertical-align:middle; }
.registration-review-manual-warning { padding:12px 14px; background:#fff4df; color:#93571a; border:1px solid #f0d6a4; border-radius:8px; font-size:13px; line-height:1.7; }
.registration-review-manual-fields { border:1px solid #efd6a7; border-radius:8px; padding:12px; margin:14px 0; background:#fffbf3; min-width:0; }
.registration-review-manual-fields legend { color:#93571a; padding:0 5px; font-weight:600; }
.registration-review-manual-fields textarea { width:100%; box-sizing:border-box; margin-top:8px; }
.registration-review-correction { margin:14px 0; padding:12px; border:1px solid #d8e3f1; border-radius:9px; background:#f8faff; }
.registration-review-correction summary { cursor:pointer; color:#345878; font-weight:600; font-size:14px; }
.registration-review-correction>label { display:flex; flex-direction:column; gap:7px; margin:12px 0; font-size:13px; color:#53677f; }
.registration-review-correction>button { margin-top:4px; max-width:100%; white-space:normal; }
.registration-review-subject ul { list-style:none; margin:12px 0; padding:0; display:grid; gap:8px; }
.registration-review-subject li { display:grid; gap:4px; padding:8px; background:#fff; border-radius:6px; overflow-wrap:anywhere; }
.registration-review-subject li span,.registration-review-subject li small { color:#53677f; font-size:12px; }
.registration-review-subject select { margin:6px 0; }
.registration-review-subject button { max-width:100%; white-space:normal; }


.akd-ai-root{--ai-ink:#182229;--ai-muted:#7a838b;--ai-line:#e9ecef;--ai-accent:#157c7a;background:#fff!important;color:var(--ai-ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;min-width:0;overflow:auto!important}.akd-ai-root [hidden]{display:none!important}.akd-ai-root button,.akd-ai-root input,.akd-ai-root textarea,.akd-ai-root select{font:inherit}.akd-ai-root button{cursor:pointer}.akd-ai-root button:disabled{opacity:.45;cursor:not-allowed}.akd-ai-workspace{max-width:1080px;margin:0 auto;padding:36px 32px 80px}.akd-ai-hero{width:min(100%,740px);margin:clamp(65px,17vh,180px) auto 0;transition:margin .2s ease}.akd-ai-wordmark{text-align:center;font-size:42px;letter-spacing:-1.7px;font-weight:650;line-height:1.35}.akd-ai-wordmark b{font-size:39px;font-weight:500;letter-spacing:-2px;margin-left:8px}.akd-ai-tagline{text-align:center;font-size:14px;color:var(--ai-muted);margin:14px 0 34px}.akd-ai-composer{border:1px solid #dfe4e8;border-radius:22px;background:#fff;box-shadow:0 5px 25px rgba(26,44,55,.045);padding:17px 16px 12px;position:relative}.akd-ai-composer:focus-within{border-color:#99b9b7;box-shadow:0 0 0 3px #edf6f5}.akd-ai-composer textarea{display:block!important;width:100%;resize:vertical;max-height:200px;min-height:64px;border:0!important;box-shadow:none!important;outline:none!important;padding:4px 6px;background:#fff;line-height:1.6;font-size:16px;color:var(--ai-ink)}.akd-ai-composer textarea::placeholder{color:#a0a8ae}.akd-ai-composer-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:4px}.akd-ai-composer-actions{display:flex;gap:10px;align-items:center}.akd-ai-root .akd-ai-icon{display:grid;place-items:center;width:38px;height:38px;border:0!important;border-radius:50%;padding:8px;background:transparent;color:#77838b;box-shadow:none}.akd-ai-icon svg{width:21px;height:21px}.akd-ai-root .akd-ai-icon:hover{background:#f3f6f7}.akd-ai-root .akd-ai-submit{display:flex;align-items:center;gap:8px;background:#243d3e;color:#fff;border:0;border-radius:13px;padding:10px 18px;min-height:41px;box-shadow:none;font-weight:550;font-size:14px}.akd-ai-submit svg{width:17px;height:17px}.akd-ai-add-wrap{position:relative}.akd-ai-add-menu{position:absolute;top:46px;left:0;z-index:5;background:white;border:1px solid var(--ai-line);box-shadow:0 8px 28px #17232a12;border-radius:14px;padding:8px;min-width:230px}.akd-ai-add-menu button{display:block;width:100%;padding:12px!important;background:#fff!important;border:0!important;text-align:left;border-radius:8px;color:var(--ai-ink)}.akd-ai-add-menu button:hover{background:#f5f7f8!important}.akd-ai-add-menu small{display:block;font-size:11px;color:var(--ai-muted);padding:3px 12px 8px}.akd-ai-scope{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:15px;font-size:12px;color:#a1a8ae}.akd-ai-scope>span{margin-right:4px}.akd-ai-root .akd-ai-scope button{background:transparent;border:0;color:#879099;border-radius:7px;padding:5px 9px;box-shadow:none;font-size:12px}.akd-ai-root .akd-ai-scope button.active{background:#f1f5f4;color:#426766}.akd-ai-message{text-align:center;min-height:22px;line-height:1.6;color:var(--ai-muted);font-size:12px;margin:12px 0 0}.akd-ai-root .is-error{color:#a44432}.akd-ai-root.has-results .akd-ai-hero{margin-top:10px}.akd-ai-root.has-results .akd-ai-wordmark{font-size:26px;letter-spacing:-.6px}.akd-ai-root.has-results .akd-ai-wordmark b{font-size:25px;letter-spacing:-1px}.akd-ai-root.has-results .akd-ai-tagline{margin:8px 0 22px}.akd-ai-results,.akd-ai-upload,.akd-ai-draft{margin-top:32px}.akd-ai-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.akd-ai-section-head h2{font-size:17px;letter-spacing:-.3px;margin:0;font-weight:600}.akd-ai-section-head>span{font-size:12px;color:var(--ai-muted)}.akd-ai-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.akd-ai-product{border:1px solid var(--ai-line);border-radius:15px;padding:18px;min-width:0;display:flex;flex-direction:column}.akd-ai-product-top{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--ai-muted)}.akd-ai-product h3{font-size:15px;line-height:1.6;margin:17px 0 7px;overflow-wrap:anywhere;font-weight:600}.akd-ai-product-spec{font-size:12px;color:var(--ai-muted);line-height:1.7;margin:0 0 17px;overflow-wrap:anywhere;flex:1}.akd-ai-price{display:flex;align-items:baseline;gap:8px}.akd-ai-price strong{font-size:23px;font-weight:600;letter-spacing:-.5px}.akd-ai-price small{font-size:11px;color:var(--ai-muted)}.akd-ai-reference{display:flex;flex-wrap:wrap;gap:5px 12px;font-size:11px;color:#8a9299;margin-top:8px}.akd-ai-product-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:18px;border-top:1px solid #f1f3f5;padding-top:13px}.akd-ai-product-bottom small{font-size:10px;color:var(--ai-muted)}.akd-ai-product-bottom button,.akd-ai-quote-actions button{border:1px solid #dce5e3;border-radius:8px;color:#39726e;background:#f8fbfa;padding:6px 10px;font-size:12px;white-space:nowrap}.akd-ai-empty{color:var(--ai-muted);font-size:13px;padding:25px 0;line-height:1.8}.akd-ai-upload,.akd-ai-draft{border:1px solid var(--ai-line);padding:22px;border-radius:16px}.akd-ai-upload>p,.akd-ai-footnote{font-size:12px;color:var(--ai-muted);line-height:1.6}.akd-ai-upload-rows{display:grid;gap:12px}.akd-ai-upload-row{display:grid;grid-template-columns:18px 1fr 85px 24px;gap:10px;align-items:center}.akd-ai-upload-row>span{font-size:12px;color:var(--ai-muted)}.akd-ai-root input,.akd-ai-root select{min-width:0;width:100%;border:1px solid #e1e6e9;border-radius:8px;background:#fff;padding:9px;color:var(--ai-ink);font-size:13px}.akd-ai-upload-row small{grid-column:2/-1;color:#916e46;font-size:11px}.akd-ai-root label{display:block;font-size:11px;color:var(--ai-muted)}.akd-ai-qty{display:flex!important;align-items:center;gap:5px}.akd-ai-upload-row>button,.akd-ai-draft-row>button{border:0;background:none;color:#8a959c;font-size:20px;padding:3px}.akd-ai-upload-candidates{grid-column:2/-1;font-size:12px;color:var(--ai-muted)}.akd-ai-root .akd-ai-action{border:0;background:#253f40;color:#fff;border-radius:10px;padding:11px 17px;font-size:13px;margin-top:16px}.akd-ai-draft-row{display:grid;grid-template-columns:minmax(150px,1fr) 72px 110px 100px 24px;align-items:center;gap:15px;padding:13px 0;border-bottom:1px solid #edf0f2}.akd-ai-draft-row strong{display:block;font-size:13px;font-weight:550}.akd-ai-draft-row small{display:block;font-size:11px;line-height:1.6;color:var(--ai-muted);margin-top:5px}.akd-ai-draft-row>span{font-size:14px;text-align:right}.akd-ai-draft-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:13px;padding-top:18px}.akd-ai-draft-footer strong{font-size:23px;margin-left:8px}.akd-ai-draft-footer button{margin-top:0!important}.akd-ai-footnote{margin-bottom:0}.akd-ai-context:empty{display:none}.akd-ai-context{position:relative;max-width:400px;margin:0 auto 22px}.akd-ai-customer-label{display:flex!important;align-items:center;gap:10px;white-space:nowrap}.akd-ai-customer-label input{font-size:13px!important}.akd-ai-context>small{display:block;font-size:10px;color:var(--ai-muted);margin:7px 0 0 57px}.akd-ai-customer-options{position:absolute;top:43px;left:55px;right:0;z-index:10;border:1px solid var(--ai-line);border-radius:10px;padding:6px;background:#fff;max-height:220px;overflow:auto;box-shadow:0 8px 28px #17232a12}.akd-ai-customer-options button{display:block;width:100%;text-align:left;border:0!important;background:white!important;color:#34434b!important;font-size:12px;padding:10px}.akd-ai-quote-dialog{width:min(900px,94vw);max-height:90vh;border:1px solid #dce4e9;border-radius:16px;padding:0;box-shadow:0 25px 90px #10202c35;color:var(--ai-ink)}.akd-ai-quote-dialog::backdrop{background:#20303c55}.akd-ai-quote-dialog>header{display:flex;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--ai-line);align-items:center;font-size:15px}.akd-ai-quote-dialog>header button{border:0;background:none;font-size:24px;color:#7d888f}.akd-ai-quote-actions{display:flex;gap:10px;padding:14px 22px}.akd-ai-paper{padding:25px;overflow:auto}.akd-ai-paper h1{font-size:23px}.akd-ai-paper p{font-size:12px;color:#7b868c}.akd-ai-paper table{width:100%;border-collapse:collapse;min-width:580px;font-size:12px}.akd-ai-paper th,.akd-ai-paper td{text-align:left;padding:12px 8px;border-bottom:1px solid #e7ecef}.akd-ai-paper th{background:#f7f9fa}.akd-ai-paper .akd-ai-paper-total{text-align:right;font-size:20px;font-weight:600;color:var(--ai-ink)}.akd-ai-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.akd-ai-print-frame{position:fixed;bottom:0;right:0;width:1px;height:1px;border:0}.akd-ai-root .akd-ai-icon.is-recording{background:#fff0ed;color:#cf563b}#customer.customer-ai-search-active{background:#fff!important}#customerAiSearchView:not(.hidden){display:block!important;min-height:calc(100vh - 180px)}#aiSearch.active{min-height:calc(100vh - 40px)}@media(max-width:1000px){.akd-ai-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){#customerAiSearchView:not(.hidden){min-height:calc(100dvh - 150px);padding:0!important}.akd-ai-workspace{padding:20px 16px 90px}.akd-ai-hero{margin-top:clamp(65px,17vh,130px)}.akd-ai-wordmark{font-size:35px}.akd-ai-wordmark b{font-size:33px}.akd-ai-tagline{font-size:12px;margin:12px 0 27px}.akd-ai-composer{border-radius:19px;padding:12px}.akd-ai-composer textarea{min-height:65px;resize:none;font-size:15px;line-height:1.6}.akd-ai-submit{padding:10px 14px!important}.akd-ai-scope{gap:2px;font-size:11px;margin-top:12px}.akd-ai-root .akd-ai-scope button{font-size:11px;padding:5px 8px}.akd-ai-root.has-results .akd-ai-hero{margin-top:0}.akd-ai-result-grid{grid-template-columns:1fr}.akd-ai-section-head{align-items:flex-start;margin-bottom:14px}.akd-ai-section-head h2{font-size:16px}.akd-ai-section-head>span{font-size:10px}.akd-ai-product{padding:17px}.akd-ai-product h3{margin-top:12px}.akd-ai-upload,.akd-ai-draft{padding:15px}.akd-ai-upload-row{grid-template-columns:16px 1fr 64px 18px;gap:7px}.akd-ai-qty{display:block!important}.akd-ai-draft-row{grid-template-columns:1fr 1fr 1fr 20px;gap:10px}.akd-ai-draft-row>div{grid-column:1/-1}.akd-ai-draft-row>span{font-size:13px}.akd-ai-draft-footer{flex-wrap:wrap}.akd-ai-draft-footer button{width:100%}.akd-ai-message{font-size:11px}.akd-ai-quote-dialog{width:96vw;max-height:90dvh}.akd-ai-paper{padding:16px}.akd-ai-customer-label input{font-size:16px!important}}@media(prefers-reduced-motion:reduce){.akd-ai-hero{transition:none}}
/* Keep this isolated workspace above the older portal compatibility layers. */
body.customer-portal #customer#customer#customer#customer.customer-ai-search-active,
body.customer-portal #customer#customer#customer#customer > #customerAiSearchView,
#customerAiSearchView .akd-ai-workspace,
#customerAiSearchView .akd-ai-product{background:#fff!important}
#customerAiSearchView .akd-ai-composer textarea,
#aiSearch .akd-ai-composer textarea{border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important;background:#fff!important;resize:none!important;font-weight:400!important}
#customerAiSearchView .akd-ai-scope{white-space:nowrap}
body.customer-portal #customer#customer#customer#customer #customerAiSearchView::before{display:none!important;content:none!important}
@media(max-width:760px){
  body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-workspace{padding:20px 4px 80px!important}
  body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-scope button{min-width:0!important;min-height:30px!important;min-block-size:30px!important;height:30px!important;padding:4px 7px!important;font-size:11px!important}
  body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-icon{min-width:38px!important;width:38px!important;border-radius:50%!important}
  body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-submit{border-radius:12px!important;padding:0 14px!important}
  body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-draft-row{grid-template-columns:1fr 1fr 1fr 40px}
  body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-upload-row{grid-template-columns:12px 1fr 65px 40px}
}
.akd-ai-wordmark{margin-bottom:32px}.akd-ai-root.has-results .akd-ai-wordmark{margin-bottom:24px}.akd-ai-upload-extras{grid-column:2/-1;display:grid;grid-template-columns:90px 1fr;gap:12px}.akd-ai-upload-extras label{font-size:11px}.akd-ai-upload-extras input{margin-top:5px}
.akd-ai-product-image{height:135px;display:flex;align-items:center;justify-content:center;margin-top:14px}.akd-ai-product-image img{display:block;max-width:100%;max-height:135px;object-fit:contain}

/* Hide account chrome only inside the customer AI workspace; tab changes restore it. */
body.customer-portal #customer#customer#customer#customer.customer-ai-search-active > .customer-unified-header,
body.customer-portal #customer#customer#customer#customer.customer-ai-search-active #customerAccountValidityRow{display:none!important}

/* AI selection: consistent cards across the available workspace width. */
.akd-ai-results{container-type:inline-size;container-name:ai-selection}
.akd-ai-workspace{max-width:1540px;padding:28px 24px 100px}
.akd-ai-root.has-results .akd-ai-hero{width:min(100%,760px);margin-top:0}
.akd-ai-root.has-results .akd-ai-wordmark{font-size:25px;margin-bottom:16px}
.akd-ai-root.has-results .akd-ai-context{margin-bottom:14px}
.akd-ai-root.has-results .akd-ai-composer textarea{min-height:44px;max-height:120px}
.akd-ai-composer textarea{padding-right:32px!important}
.akd-ai-root .akd-ai-clear{position:absolute;right:12px;top:10px;display:grid;place-items:center;border:0!important;background:#f4f6f6!important;color:#6e7b80!important;border-radius:50%!important;width:32px;min-width:32px!important;height:32px;min-height:32px!important;padding:0!important;font-size:23px;box-shadow:none}
.akd-ai-scope{gap:4px;margin-top:12px}
.akd-ai-root .akd-ai-scope button{font-size:13px;padding:8px 18px;min-height:36px}
.akd-ai-root .akd-ai-scope button.active{background:#eaf4f2;color:#216864;font-weight:600}
.akd-ai-undo{display:block;margin:8px auto 0;border:0;background:none;color:#277772;font-size:12px;text-decoration:underline}
.akd-ai-message:empty{display:none}
.akd-ai-root .akd-ai-icon.is-transcribing{background:#edf4f4;color:#237672}
.akd-ai-results{margin-top:24px}
.akd-ai-section-head{margin-bottom:12px;align-items:center}
.akd-ai-result-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@container ai-selection (min-width:700px){.akd-ai-result-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container ai-selection (min-width:940px){.akd-ai-result-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@container ai-selection (min-width:1080px){.akd-ai-result-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
.akd-ai-product{padding:13px;border-radius:13px;overflow:hidden;border-color:#d7dfe3;box-shadow:0 2px 4px #182e3b0a,0 6px 16px #182e3b0c;transition:box-shadow .18s ease,transform .18s ease,border-color .18s ease}
.akd-ai-product.is-selected{border-color:#488e81;box-shadow:0 0 0 1px #488e81,0 5px 16px #276b6020}
@media(min-width:761px) and (hover:hover) and (pointer:fine){
 .akd-ai-product:hover{transform:translateY(-2px);box-shadow:0 4px 8px #182e3b12,0 10px 22px #182e3b14}
 .akd-ai-product.is-selected:hover{box-shadow:0 0 0 1px #488e81,0 8px 22px #276b6028}
}
@media(prefers-reduced-motion:reduce){.akd-ai-product{transition:none}.akd-ai-product:hover{transform:none}}
.akd-ai-stock{position:absolute;right:0;top:0;z-index:1;display:inline-flex;align-items:center;padding:4px 7px;border-radius:5px;font-size:11px;font-weight:550;line-height:1.4;pointer-events:none}
.akd-ai-stock.is-shortage{background:#fff1df;color:#a45c11}
.akd-ai-stock.is-stopped{background:#fcebea;color:#ad3936}
.akd-ai-stock.is-clearance{background:#eaf4f1;color:#246b60}
.akd-ai-product-image{height:auto;aspect-ratio:1/1;max-height:200px;margin:0;position:relative;flex-shrink:0;background:#fff}
.akd-ai-product-image img{width:100%;height:100%;max-height:200px;object-fit:contain}
.akd-ai-image-placeholder{display:grid;place-items:center;width:100%;height:100%;color:#9aa5a9;background:#f7f9f9;border-radius:8px;font-size:12px}
.akd-ai-product-info{min-width:0;margin:10px 0 12px}
.akd-ai-product-info>summary{display:block;list-style:none;cursor:pointer;border-radius:4px}
.akd-ai-product-info>summary::-webkit-details-marker{display:none}
.akd-ai-product-info>summary:focus-visible{outline:2px solid #76aaa2;outline-offset:3px}
.akd-ai-product h3{display:block;white-space:normal;overflow:visible;overflow-wrap:anywhere;word-break:normal;line-height:1.5;font-size:14px;min-height:0;margin:0}
.akd-ai-product-full{font-size:11px;line-height:1.6;color:#65757b;overflow-wrap:anywhere;padding-top:6px}
.akd-ai-product-full p{margin:3px 0}
.akd-ai-supplier{margin:0 0 10px;line-height:1.5;color:#5b696d;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.akd-ai-root .akd-ai-price{--price-ink:#475569;--price-wash:#f1f5f9;display:flex;flex-wrap:wrap;align-items:center;gap:4px 7px;margin-top:auto}
.akd-ai-root .akd-ai-price[data-price-tone=supply]{--price-ink:#2563eb;--price-wash:#eff6ff}
.akd-ai-root .akd-ai-price[data-price-tone=core]{--price-ink:#7c3aed;--price-wash:#f5f3ff}
.akd-ai-root .akd-ai-price[data-price-tone=agent]{--price-ink:#0f766e;--price-wash:#f0fdfa}
.akd-ai-root .akd-ai-price strong{font-size:22px;line-height:1.3;color:var(--price-ink)}
.akd-ai-root .akd-ai-price small{display:inline-flex;align-items:center;font-size:10px;line-height:1.5;color:var(--price-ink);background:var(--price-wash);border-radius:5px;padding:2px 6px;margin:0;white-space:nowrap}
.akd-ai-reference{display:block;font-size:11px;line-height:1.5;min-height:17px;margin-top:8px;color:#69787e;overflow-wrap:normal;min-width:0}
.akd-ai-reference>summary{display:flex;align-items:baseline;justify-content:space-between;gap:5px;list-style:none;cursor:pointer;white-space:nowrap;max-width:100%;overflow-x:auto;scrollbar-width:thin;font-variant-numeric:tabular-nums}
.akd-ai-reference>summary::-webkit-details-marker{display:none}
.akd-ai-reference>summary:focus-visible{outline:2px solid #76aaa2;outline-offset:2px;border-radius:3px}
.akd-ai-reference-price,.akd-ai-reference-rate{flex:none;white-space:nowrap}
.akd-ai-reference-rate{text-align:right}
.akd-ai-reference:not(.is-railway) .is-compact .akd-ai-rate-label,.akd-ai-reference:not(.is-railway) .is-tight .akd-ai-reference-currency,.akd-ai-reference:not(.is-railway) .is-minimal .akd-ai-reference-label{display:none}
.akd-ai-reference.is-railway>summary{flex-wrap:wrap;overflow:visible;white-space:normal;gap:2px 8px}
.akd-ai-reference.is-railway .akd-ai-reference-rate{margin-left:auto}
.akd-ai-reference.is-negative .akd-ai-reference-rate{color:#b34827;font-weight:600}
.akd-ai-reference>p{margin:7px 0 0;padding:7px 8px;background:#f7f9fa;border-radius:6px;white-space:normal;overflow-wrap:anywhere;font-size:11px;line-height:1.6}
.akd-ai-product-bottom{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin-top:10px;padding-top:9px}
.akd-ai-product-bottom small{font-size:10px}
.akd-ai-product-bottom button{width:100%;min-height:36px;font-size:12px;padding:7px 8px;border-radius:8px}
.akd-ai-product-bottom button[aria-pressed=true]{opacity:1;background:#eaf4f1;color:#246b60;border-color:#b7d8d0}
.akd-ai-criteria{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:11px;color:#536b6c;margin-bottom:8px}
.akd-ai-criteria>span{background:#f1f6f5;border-radius:5px;padding:5px 8px}
.akd-ai-criteria details{margin-left:auto;max-width:100%;color:#75848a}
.akd-ai-criteria summary{cursor:pointer;padding:5px}
.akd-ai-criteria details[open]{flex-basis:100%}
.akd-ai-criteria p{line-height:1.7;margin:4px 0 8px}
.akd-ai-result-query{font-size:12px;line-height:1.6;color:#65757b;margin:0 0 14px;overflow-wrap:anywhere}
.akd-ai-result-query.is-stale{color:#9b692d}
.akd-ai-demand-group{margin-top:24px;padding-top:20px;border-top:1px solid #e3ebe9;min-width:0}
.akd-ai-demand-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.akd-ai-demand-head h3{font-size:16px;line-height:1.6;font-weight:600;margin:0;min-width:0;overflow-wrap:anywhere}
.akd-ai-demand-head>span{flex-shrink:0;font-size:12px;color:#7a838b}
.akd-ai-demand-head>span.is-selected{color:#246b60}
.akd-ai-demand-summary,.akd-ai-demand-warning{font-size:12px;line-height:1.7;color:#65757b;margin:8px 0 12px;overflow-wrap:anywhere}
.akd-ai-demand-warning{color:#916e46}
.akd-ai-draft-row .akd-ai-draft-demand{color:#277772;margin:0 0 5px;overflow-wrap:anywhere}
@media(max-width:760px){.akd-ai-demand-head{gap:8px;align-items:flex-start}.akd-ai-demand-head h3{font-size:14px}.akd-ai-demand-head>span{font-size:11px}.akd-ai-demand-summary,.akd-ai-demand-warning{font-size:11px}}
.akd-ai-draft{scroll-margin-top:20px;margin-bottom:24px}
.akd-ai-selection-bar{position:sticky;bottom:12px;z-index:12;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px auto 0;padding:12px 16px;max-width:760px;border:1px solid #cbded9;border-radius:14px;background:#fff;box-shadow:0 3px 18px #213c3820;font-size:13px;color:#254c47}
.akd-ai-selection-bar button{border:0;background:#243d3e;color:#fff;border-radius:9px;padding:10px 18px;min-height:40px;font-size:13px}
@media(max-width:760px){
 .akd-ai-workspace{padding:16px 10px calc(90px + env(safe-area-inset-bottom))!important}
 body.customer-portal #customer#customer#customer#customer #customerAiSearchView .akd-ai-workspace{padding:16px 10px calc(90px + env(safe-area-inset-bottom))!important}
 .akd-ai-root.has-results .akd-ai-wordmark{font-size:23px;margin-bottom:13px}
 .akd-ai-root.has-results .akd-ai-composer textarea{min-height:40px;font-size:15px!important}
 .akd-ai-result-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .akd-ai-product{padding:10px;border-radius:12px}
 .akd-ai-product h3{font-size:13px;min-height:0}
 .akd-ai-product-image{max-height:170px;margin-top:0}
 .akd-ai-product-image img{max-height:170px}
 .akd-ai-root .akd-ai-price strong{font-size:20px}
 .akd-ai-product-bottom button{min-height:42px!important;font-size:12px!important;padding:7px 3px!important}
 .akd-ai-reference{font-size:10px;min-height:15px;letter-spacing:-.1px}
 .akd-ai-section-head h2{font-size:15px}
 .akd-ai-section-head>span{font-size:10px;text-align:right}
 .akd-ai-criteria{font-size:10px;gap:5px}
 .akd-ai-criteria>span{padding:4px 6px}
 .akd-ai-selection-bar{position:fixed;left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));width:auto;margin:0;padding:9px 12px;z-index:1100;font-size:12px;max-width:none}
 .akd-ai-selection-bar button{min-height:42px;font-size:13px;white-space:nowrap}
 .akd-ai-root .akd-ai-clear{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important}
 .akd-ai-results{margin-top:20px}
 .akd-ai-context>small{margin-left:0;text-align:center}
 .akd-ai-draft-row{grid-template-columns:1fr 1fr 1fr 24px}
}

.akd-ai-selection-bar>span[data-ai=selectionCount]{flex:1;min-width:0}
@media(max-width:760px){
 /* Keep the original floating workbench independent of the AI selection bar.
    Dragged inline coordinates still win; only its safe bottom bound changes. */
 body.customer-portal #customer#customer#customer#customer:has(> #customerAiSearchView:not(.hidden):not([hidden])) > #customerWorkbenchMobileOpen#customerWorkbenchMobileOpen.customer-workbench-mobile-open{--customer-workbench-safe-bottom:var(--customer-ai-workbench-safe-bottom,8px);bottom:max(calc(12px + env(safe-area-inset-bottom,0px)),var(--customer-ai-workbench-safe-bottom,8px))!important}
}

/* Shared search refinement: the opaque conversation handle stays in memory. */
.akd-ai-conversation{display:flex;align-items:center;justify-content:center;gap:12px;margin:9px 0 0;color:#78858a;font-size:11px;line-height:1.5}
.akd-ai-root .akd-ai-conversation button{border:0;background:transparent;color:#277772;font-size:12px;padding:5px 7px;border-radius:5px;box-shadow:none;min-height:30px}
.akd-ai-root .akd-ai-conversation button:hover{background:#f1f6f5}
.akd-ai-pagination{text-align:center;margin:20px 0 8px}
.akd-ai-root .akd-ai-pagination button{border:1px solid #d5e3e0;background:#fff;color:#277772;border-radius:9px;padding:10px 22px;font-size:12px;min-height:40px;box-shadow:none}
.akd-ai-settlement{display:flex;flex-wrap:wrap;gap:3px 8px;color:#69787e;font-size:10px;line-height:1.6;margin-top:5px;overflow-wrap:anywhere}
.akd-ai-previous-results{border:1px solid #e0e7e8;border-radius:10px;padding:11px 14px;background:#fafcfc;color:#64777b;font-size:12px}
.akd-ai-previous-results>summary{cursor:pointer;line-height:1.6}
.akd-ai-previous-content{margin-top:14px}
.akd-ai-previous-content .akd-ai-section-head h2{font-size:14px}
@supports(grid-template-rows:subgrid){
 .akd-ai-product{display:grid;grid-template-rows:subgrid;grid-row:span 7;row-gap:0}
 .akd-ai-product-image{grid-row:1;align-self:start;width:100%}
 .akd-ai-product-info{grid-row:2}
 .akd-ai-supplier{grid-row:3}
 .akd-ai-product>.akd-ai-price{grid-row:4;margin-top:0}
 .akd-ai-product>.akd-ai-reference{grid-row:5}
 .akd-ai-product>.akd-ai-settlement{grid-row:6}
 .akd-ai-product-bottom{grid-row:7;align-self:end}
}
.akd-ai-criteria>span{max-width:100%;overflow-wrap:anywhere}
@media(max-width:760px){.akd-ai-conversation{font-size:10px;gap:7px}.akd-ai-root .akd-ai-conversation button{font-size:11px;min-height:34px}.akd-ai-settlement{font-size:10px}}

/* A desktop can temporarily use a phone microphone without exposing its login. */
.akd-ai-voice-wrap{position:relative;display:flex;align-items:center;gap:0}
.akd-ai-root .akd-ai-voice-arrow{border:0;background:transparent;color:#77838b;box-shadow:none;border-radius:6px;padding:0 3px;width:20px;min-width:20px;height:32px;min-height:32px;font-size:18px;line-height:1}
.akd-ai-root .akd-ai-voice-arrow:hover{background:#f3f6f7}
.akd-ai-voice-menu{position:absolute;right:0;bottom:46px;z-index:15;min-width:150px;border:1px solid #e0e7e8;border-radius:10px;background:#fff;padding:5px;box-shadow:0 7px 22px #213c3818}
.akd-ai-root .akd-ai-voice-menu button{display:block;width:100%;border:0;border-radius:6px;box-shadow:none;background:#fff;color:#34474c;padding:10px 12px;text-align:left;font-size:13px;white-space:nowrap}
.akd-ai-root .akd-ai-voice-menu button:hover{background:#f1f6f5}
.akd-ai-voice-bridge-dialog{width:min(360px,92vw);max-height:90dvh;overflow:auto;border:1px solid #dbe4e6;border-radius:17px;padding:0;background:#fff;color:#182229;box-shadow:0 20px 65px #10202c30}
.akd-ai-voice-bridge-dialog::backdrop{background:#20303c55}
.akd-ai-voice-bridge-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:17px 20px;border-bottom:1px solid #edf0f1;font-size:16px}
.akd-ai-root .akd-ai-voice-bridge-dialog>header button{border:0;background:none;color:#758389;font-size:24px;line-height:1;padding:3px 5px;box-shadow:none}
.akd-ai-bridge-body{padding:17px 24px 21px;text-align:center}
.akd-ai-bridge-body>p:first-child{margin:0 0 12px;font-size:13px;line-height:1.6;min-height:21px;color:#365452}
.akd-ai-bridge-qr{display:block;width:220px;height:220px;max-width:100%;object-fit:contain;margin:0 auto 14px;background:#fff}
.akd-ai-bridge-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:12px;color:#718087}
.akd-ai-bridge-meta strong{font-size:17px;color:#253f40;font-variant-numeric:tabular-nums;letter-spacing:2px;margin-left:5px}
.akd-ai-bridge-hint{font-size:11px;color:#7a878c;line-height:1.6;margin:15px 0}
.akd-ai-root .akd-ai-bridge-body>button{border:1px solid #dae5e2;border-radius:8px;background:#fff;color:#3c6d67;padding:8px 22px;min-height:36px;font-size:13px;box-shadow:none}
@media(max-width:760px){.akd-ai-voice-wrap>.akd-ai-voice-arrow,.akd-ai-voice-menu{display:none!important}}

.akd-ai-bridge-connection{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:12px auto 0;font-size:12px;color:#3d6963}
.akd-ai-root .akd-ai-bridge-connection button{padding:4px 8px;min-height:30px;border:0;border-radius:6px;background:#f2f7f5;color:#456b65;box-shadow:none;font-size:12px}
.akd-ai-root .akd-ai-bridge-connection [data-ai=disconnectBridge]{background:transparent;color:#87928e}

/* Customer-facing proposals use the same composer on every portal surface. */
.akd-ai-draft-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.akd-ai-share-history-entry{text-align:right;margin:12px 0 4px}
.akd-ai-root .akd-ai-share-history-entry>button{border:0;background:transparent;box-shadow:none;color:#54716e;font-size:12px;padding:7px 10px}
.akd-ai-share-dialog{box-sizing:border-box;width:min(780px,94vw);max-height:91dvh;overflow:auto;border:1px solid #dce5e5;border-radius:18px;padding:0;background:#fff;color:#1c2b30;box-shadow:0 20px 70px #16342e30}
.akd-ai-share-dialog::backdrop{background:#172f3855}
.akd-ai-share-dialog>header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:18px 22px;border-bottom:1px solid #edf1f1;background:#fff}
.akd-ai-root .akd-ai-share-dialog>header>button{border:0;background:transparent;box-shadow:none;color:#738187;font-size:25px;min-width:36px;padding:0;line-height:1}
.akd-ai-share-body{padding:22px}
.akd-ai-share-fields{display:grid;grid-template-columns:1fr 1.5fr .7fr;gap:14px}
.akd-ai-share-fields label{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#637879;min-width:0}
.akd-ai-root .akd-ai-share-fields input,.akd-ai-root .akd-ai-share-fields select,.akd-ai-root .akd-ai-share-link input{box-sizing:border-box;display:block;width:100%;min-width:0;min-height:42px;border:1px solid #dbe4e5;border-radius:8px;padding:10px;background:#fff;color:#253c3d;font-size:14px;box-shadow:none}
.akd-ai-share-hint{font-size:12px;line-height:1.8;color:#7a878b;margin:13px 0}
.akd-ai-share-actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}
.akd-ai-root .akd-ai-share-actions button,.akd-ai-root .akd-ai-share-link button,.akd-ai-root [data-ai=shareNew],.akd-ai-root [data-revoke-share]{border:1px solid #d7e4e1;border-radius:8px;padding:10px 16px;background:#f7faf9;color:#3b7169;box-shadow:none;font-size:13px;min-height:42px}
.akd-ai-root .akd-ai-share-actions .akd-ai-action{background:#243e3d;color:#fff;border-color:#243e3d}
.akd-ai-share-message{font-size:13px;line-height:1.7;color:#50756b;overflow-wrap:anywhere}
.akd-ai-share-message.is-error{color:#b65a32}
.akd-ai-share-preview{border-top:1px solid #e5edeb;margin-top:22px;padding-top:20px}
.akd-ai-share-preview h2{font-size:21px;margin:0 0 6px;overflow-wrap:anywhere}
.akd-ai-share-preview>p{font-size:12px;color:#758684;line-height:1.7}
.akd-ai-share-preview-rows{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.akd-ai-share-preview-rows>section{min-width:0;border:1px solid #e3eae9;border-radius:11px;padding:16px;display:flex;flex-direction:column;gap:8px}
.akd-ai-share-preview-rows strong{font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.akd-ai-share-preview-rows small{font-size:11px;color:#83908e;overflow-wrap:anywhere;line-height:1.6}
.akd-ai-share-preview-rows b{font-size:21px;color:#254b46;margin-top:7px}
.akd-ai-share-preview-rows span{font-size:12px;color:#6c817c}
.akd-ai-share-success-title{font-size:21px;font-weight:600;color:#2b5148;margin:0 0 10px}
.akd-ai-share-body [data-ai=shareExpiry]{font-size:13px;color:#7a8b86}
.akd-ai-share-link{display:flex;gap:10px;align-items:center;margin:20px 0}
.akd-ai-share-link>button{flex-shrink:0}
.akd-ai-share-delivery{display:flex;align-items:center;gap:25px;flex-wrap:wrap;margin:20px 0}
.akd-ai-share-delivery img{width:180px;height:180px;object-fit:contain}
.akd-ai-share-delivery a{color:#356d62;text-decoration:underline;text-underline-offset:4px;font-size:14px}
.akd-ai-share-record{display:flex;justify-content:space-between;gap:18px;align-items:center;border-bottom:1px solid #e8efed;padding:16px 0}
.akd-ai-share-record>div{display:flex;flex-direction:column;gap:7px;min-width:0}
.akd-ai-share-record strong{overflow-wrap:anywhere;line-height:1.7;font-size:14px}
.akd-ai-share-record small{font-size:12px;color:#83908c}
.akd-ai-share-record span{font-size:12px;color:#5d8071}
.akd-ai-share-record>button{flex-shrink:0}
.akd-ai-share-body [data-ai=shareHistoryMessage]{font-size:12px;color:#6e807a;line-height:1.7}
@media(max-width:760px){
 .akd-ai-draft-actions{width:100%;display:grid;grid-template-columns:1fr;gap:8px}
 .akd-ai-draft-actions button{width:100%}
 .akd-ai-share-dialog{width:calc(100vw - 20px);max-height:94dvh;border-radius:14px}
 .akd-ai-share-dialog>header{padding:14px 16px}
 .akd-ai-share-body{padding:16px}
 .akd-ai-share-fields{grid-template-columns:1fr 1fr;gap:12px}
 .akd-ai-share-fields>label:nth-child(2){grid-row:1;grid-column:1/-1}
 .akd-ai-root .akd-ai-share-fields input,.akd-ai-root .akd-ai-share-fields select{font-size:16px}
 .akd-ai-share-actions>button{flex:1}
 .akd-ai-share-preview-rows{grid-template-columns:1fr}
 .akd-ai-share-link{flex-wrap:wrap}
 .akd-ai-share-link>button{width:100%}
 .akd-ai-share-record{gap:10px}
 .akd-ai-share-delivery{justify-content:center}
}

/* The landing composer stays unchanged; an active workspace fills the available viewport. */
.akd-ai-workspace{position:relative}
.akd-ai-workspace-history-entry{position:absolute;right:24px;top:10px;margin:0;z-index:5}
.akd-ai-root.has-stage{height:var(--ai-workspace-height)!important;min-height:0!important;max-height:var(--ai-workspace-height);overflow:hidden!important}
.akd-ai-root.has-stage .akd-ai-workspace{box-sizing:border-box;display:flex;flex-direction:column;gap:0;width:100%;height:100%;max-width:none;margin:0;padding:12px 18px 0!important;min-height:0;overflow:hidden}
.akd-ai-root.has-stage .akd-ai-workspace-history-entry{top:4px;right:18px}
.akd-ai-root.has-stage .akd-ai-workspace-history-entry>button{font-size:11px;padding:3px 6px;min-height:23px}
.akd-ai-root.has-stage .akd-ai-hero{display:flex;flex:0 0 auto;align-items:center;flex-wrap:wrap;gap:8px;width:100%;margin:14px 0 0;padding:0;transition:none}
.akd-ai-root.has-stage .akd-ai-wordmark{flex:0 0 auto;text-align:left;font-size:20px;margin:0;letter-spacing:-.6px}
.akd-ai-root.has-stage .akd-ai-context{flex:0 1 210px;margin:0;max-width:210px}
.akd-ai-root.has-stage .akd-ai-context>small{display:none}
.akd-ai-root.has-stage .akd-ai-customer-label{font-size:11px;gap:6px}
.akd-ai-root.has-stage .akd-ai-context select{height:36px;min-height:36px;font-size:12px;padding:6px}
.akd-ai-root.has-stage .akd-ai-composer{display:flex;flex:1 1 320px;align-items:center;gap:4px;min-width:0;padding:4px 6px;border-radius:11px;box-shadow:none}
.akd-ai-root.has-stage .akd-ai-composer textarea{box-sizing:border-box;flex:1;min-width:0;width:auto;min-height:34px;max-height:34px;height:34px;line-height:24px;font-size:13px!important;padding:5px 3px!important;overflow:auto}
.akd-ai-root.has-stage .akd-ai-composer-bottom{flex:0 0 auto;gap:3px;margin:0}
.akd-ai-root.has-stage .akd-ai-composer-actions{gap:3px}
.akd-ai-root.has-stage .akd-ai-icon{width:30px;height:30px;min-width:30px!important;min-height:30px!important;padding:6px}
.akd-ai-root.has-stage .akd-ai-submit{min-height:32px;height:32px;padding:5px 9px!important;font-size:12px;border-radius:8px;gap:5px;white-space:nowrap}
.akd-ai-root.has-stage .akd-ai-composer .akd-ai-clear{position:static;flex:0 0 auto;width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;font-size:18px}
.akd-ai-root.has-stage .akd-ai-scope{flex:0 0 auto;margin:0;gap:2px}
.akd-ai-root.has-stage .akd-ai-scope button{padding:6px 9px;min-height:32px;font-size:12px}
.akd-ai-root.has-stage .akd-ai-conversation,.akd-ai-root.has-stage .akd-ai-message,.akd-ai-root.has-stage .akd-ai-bridge-connection{justify-content:flex-start;flex-basis:100%;width:100%;margin:0;text-align:left;font-size:11px;min-height:0}
.akd-ai-root.has-stage .akd-ai-conversation:not([hidden]){display:flex}
.akd-ai-root.has-stage .akd-ai-message{max-height:34px;overflow:auto;margin-top:3px}
.akd-ai-root.has-stage .akd-ai-voice-menu{bottom:auto;top:38px}
.akd-ai-stage-tabs{display:flex;align-items:center;flex:0 0 auto;gap:6px;height:40px;border-bottom:1px solid #e2eae8}
.akd-ai-root .akd-ai-stage-tabs>button{border:0;border-radius:7px 7px 0 0;background:transparent;color:#728481;padding:8px 14px;min-height:34px;box-shadow:none;font-size:12px}
.akd-ai-root .akd-ai-stage-tabs>button.active{background:#eef6f3;color:#226b5d;font-weight:600}
.akd-ai-stage-tabs [data-ai=draftSaveStatus]{margin-left:auto;color:#82908a;font-size:11px;min-width:0}
.akd-ai-stage{display:flex;flex:1 1 auto;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.akd-ai-root.has-stage .akd-ai-results{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;min-width:0;margin:0;overflow:hidden}
.akd-ai-results-summary{flex:0 0 auto;padding:8px 0 0;min-width:0}
.akd-ai-root.has-stage .akd-ai-section-head{gap:8px;margin:0 0 5px;min-width:0}
.akd-ai-root.has-stage .akd-ai-section-head h2{font-size:13px}
.akd-ai-root.has-stage .akd-ai-section-head>span{font-size:10px}
.akd-ai-root.has-stage .akd-ai-criteria{flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;margin:0 0 4px;gap:4px;scrollbar-width:thin}
.akd-ai-root.has-stage .akd-ai-criteria>span{flex:none;padding:3px 6px;font-size:10px}
.akd-ai-root.has-stage .akd-ai-result-query{font-size:10px;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.akd-ai-result-scroll{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:8px 2px 12px;scrollbar-gutter:stable}
.akd-ai-root.has-stage .akd-ai-result-grid,.akd-ai-root.has-stage .akd-ai-draft-rows,.akd-ai-root.has-stage .akd-ai-share-preview-rows{display:grid;grid-template-columns:repeat(var(--ai-cols,5),minmax(0,1fr));gap:10px;align-items:stretch}
.akd-ai-root.has-stage .akd-ai-product{display:flex;grid-row:auto;flex-direction:column;padding:10px;border-radius:10px;row-gap:0;min-width:0}
.akd-ai-root.has-stage .akd-ai-product-image{grid-row:auto;max-height:none;aspect-ratio:1;width:100%;height:auto;flex:none}
.akd-ai-root.has-stage .akd-ai-product-image img{max-height:100%;height:100%;width:100%}
.akd-ai-root.has-stage .akd-ai-product-info{grid-row:auto;margin:8px 0}
.akd-ai-root.has-stage .akd-ai-product h3{font-size:12px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px;max-height:36px}
.akd-ai-root.has-stage .akd-ai-product-info[open] h3{display:block;max-height:none}
.akd-ai-root.has-stage .akd-ai-price strong{font-size:19px}
.akd-ai-root.has-stage .akd-ai-price{margin-top:auto}
.akd-ai-root.has-stage .akd-ai-price small{font-size:9px;padding:1px 4px}
.akd-ai-root.has-stage .akd-ai-reference{font-size:10px;margin-top:5px}
.akd-ai-root.has-stage .akd-ai-product-bottom{grid-row:auto;margin-top:6px;padding-top:6px;gap:4px}
.akd-ai-root.has-stage .akd-ai-product-bottom button{height:30px;min-height:30px;font-size:11px;padding:4px 6px}
.akd-ai-root.has-stage .akd-ai-supplier{font-size:10px;margin-bottom:6px}
.akd-ai-root.has-stage .akd-ai-demand-group{margin:0 0 12px;padding:0;border:0}
.akd-ai-root.has-stage .akd-ai-demand-head{margin-bottom:5px}
.akd-ai-root.has-stage .akd-ai-demand-head h3{font-size:12px}
.akd-ai-root .akd-ai-result-pager{display:flex;flex:0 0 auto;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #e1eae7;padding:8px 0;min-height:46px;color:#71817a;font-size:11px;background:#fff}
.akd-ai-result-pager>div{display:flex;align-items:center;gap:7px}
.akd-ai-root .akd-ai-result-pager button,.akd-ai-root .akd-ai-workspace-history button,.akd-ai-root [data-ai=draftSaveStatus] button{min-height:28px;padding:4px 8px;border:1px solid #dce6e1;background:#fff;border-radius:6px;color:#3f7466;box-shadow:none;font-size:11px;white-space:nowrap}
.akd-ai-result-pager label{display:flex;align-items:center;gap:4px;white-space:nowrap}
.akd-ai-root .akd-ai-result-pager input{width:48px;min-width:0;min-height:28px;height:28px;padding:4px;font-size:11px}
.akd-ai-proposal{display:flex;flex:1;flex-direction:column;min-height:0;overflow:hidden}
.akd-ai-proposal-controls{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid #edf1ee;flex:0 0 auto;flex-wrap:wrap}
.akd-ai-proposal-controls .akd-ai-share-fields{display:flex;gap:8px;min-width:0;flex:1}
.akd-ai-proposal-controls .akd-ai-share-fields label{font-size:10px;gap:3px;min-width:0}
.akd-ai-proposal-controls .akd-ai-share-fields label:nth-child(2){flex:1}
.akd-ai-root .akd-ai-proposal-controls input,.akd-ai-root .akd-ai-proposal-controls select{height:32px;min-height:32px;padding:5px 7px;font-size:12px}
.akd-ai-proposal-controls .akd-ai-share-actions{margin:0;gap:5px;align-items:center}
.akd-ai-root .akd-ai-proposal-controls button{height:32px;min-height:32px;padding:5px 9px;font-size:11px;border-radius:7px;white-space:nowrap}
.akd-ai-proposal>[data-ai=shareHint],.akd-ai-proposal>[data-ai=shareMessage]{font-size:11px;line-height:1.5;margin:5px 0;flex:0 0 auto}
.akd-ai-proposal-scroll{flex:1;min-height:0;overflow:auto;padding:8px 2px 18px;overscroll-behavior:contain}
.akd-ai-root.has-stage .akd-ai-draft{margin:0;border:0;padding:0;min-width:0}
.akd-ai-root.has-stage .akd-ai-draft-row{display:flex;gap:8px;padding:10px;align-items:stretch;border:1px solid #e1eae5}
.akd-ai-root.has-stage .akd-ai-draft-row strong{font-size:12px;line-height:1.5}
.akd-ai-root.has-stage .akd-ai-draft-row small{font-size:10px;margin-top:3px}
.akd-ai-draft-fields{display:grid;grid-template-columns:1fr .7fr 1.2fr;gap:5px;margin-top:auto}
.akd-ai-draft-fields label{font-size:10px}
.akd-ai-root .akd-ai-draft-fields input{height:30px;min-height:30px;font-size:11px;padding:4px}
.akd-ai-draft-card-footer{display:flex;gap:5px;align-items:center;border-top:1px solid #edf1ee;padding-top:7px}
.akd-ai-draft-card-footer>span{flex:1;font-size:12px;color:#216b58}
.akd-ai-root .akd-ai-draft-card-footer button{min-width:0;min-height:24px;border:0;border-radius:4px;padding:3px 5px;background:#f3f7f4;color:#6e8278;box-shadow:none;font-size:11px}
.akd-ai-root.has-stage .akd-ai-share-preview{margin:0;border:0;padding:0}
.akd-ai-root.has-stage .akd-ai-share-preview-rows>section{padding:10px;gap:6px}
.akd-ai-root.has-stage .akd-ai-share-preview-rows strong{font-size:12px;line-height:1.5}
.akd-ai-root.has-stage .akd-ai-share-preview-rows b{font-size:19px}
.akd-ai-workspace-history{display:flex;flex:1;flex-direction:column;min-height:0;padding:8px 0}
.akd-ai-workspace-history>header{display:flex;justify-content:space-between;align-items:center;font-size:14px;padding:4px 0 10px}
.akd-ai-history-tools{display:flex;gap:6px;align-items:center;flex-wrap:wrap;padding-bottom:9px}
.akd-ai-history-tools input{max-width:320px;flex:1;min-width:120px!important;height:32px;min-height:32px;font-size:12px}
.akd-ai-root .akd-ai-history-tools button.active{background:#eaf5ee;border-color:#aed3bd;color:#2a7251}
.akd-ai-history-rows,.akd-ai-workspace-history>[data-ai=shareRecords]{flex:1;min-height:0;overflow:auto}
.akd-ai-history-record{display:flex;align-items:center;gap:10px;border-bottom:1px solid #e8eeea;padding:9px 0}
.akd-ai-root .akd-ai-history-record>button:first-child{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;align-items:flex-start;white-space:normal;text-align:left;border:0;background:#f7faf8;padding:10px;font-size:13px}
.akd-ai-history-record strong{font-weight:550;overflow-wrap:anywhere}
.akd-ai-history-record small{font-size:11px;color:#8a968d}
.akd-ai-workspace-history>footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;border-top:1px solid #e5ece7;padding-top:8px;color:#819080;font-size:11px}
.akd-ai-image-placeholder button{border:0;background:transparent;box-shadow:none;color:#9c715c;font-size:11px;padding:8px}
@media(min-width:761px){.akd-ai-root.has-stage .akd-ai-selection-bar{display:none!important}}
@media(max-width:760px){
 .akd-ai-root.has-stage .akd-ai-workspace,body.customer-portal #customer#customer#customer#customer #customerAiSearchView.has-stage .akd-ai-workspace{padding:12px 8px calc(68px + env(safe-area-inset-bottom))!important}
 .akd-ai-root.has-stage .akd-ai-hero{gap:5px;margin-top:15px}
 .akd-ai-root.has-stage .akd-ai-wordmark{font-size:17px}
 .akd-ai-root.has-stage .akd-ai-context{flex-basis:160px;max-width:none;flex:1}
 .akd-ai-root.has-stage .akd-ai-composer{flex:1 1 100%;order:2}
 .akd-ai-root.has-stage .akd-ai-scope{margin-left:auto}
 .akd-ai-root.has-stage .akd-ai-message{order:3}
 .akd-ai-root.has-stage .akd-ai-section-head h2{font-size:11px}
 .akd-ai-root.has-stage .akd-ai-stage-tabs>button{padding:7px 10px;font-size:11px}
 .akd-ai-stage-tabs [data-ai=draftSaveStatus]{font-size:10px}
 .akd-ai-root .akd-ai-result-pager{align-items:stretch;flex-direction:column;gap:5px;font-size:10px;padding:5px 0}
 .akd-ai-result-pager>div{justify-content:flex-end;gap:5px}
 .akd-ai-root .akd-ai-result-pager button{padding:3px 6px;font-size:10px}
 .akd-ai-root .akd-ai-result-pager input{width:40px}
 .akd-ai-proposal-controls{gap:7px;padding:6px 0}
 .akd-ai-proposal-controls .akd-ai-share-fields{width:100%;flex:1 1 100%;gap:5px}
 .akd-ai-proposal-controls .akd-ai-share-fields label:nth-child(1){max-width:115px}
 .akd-ai-root .akd-ai-proposal-controls input,.akd-ai-root .akd-ai-proposal-controls select{font-size:11px!important}
 .akd-ai-proposal-controls .akd-ai-share-actions{width:100%;flex-wrap:wrap;gap:5px}
 .akd-ai-root .akd-ai-proposal-controls button{padding:4px 8px;min-height:30px;height:30px}
 .akd-ai-root.has-stage .akd-ai-product{padding:8px}
 .akd-ai-root.has-stage .akd-ai-product h3{font-size:11px;min-height:33px;max-height:33px}
 .akd-ai-root.has-stage .akd-ai-product-bottom button{min-height:34px!important;height:34px;font-size:10px!important}
 .akd-ai-root.has-stage .akd-ai-draft-row{padding:7px;gap:6px}
 .akd-ai-root .akd-ai-draft-fields input{padding:3px;font-size:10px}
 .akd-ai-root.has-stage .akd-ai-product-image img{max-height:100%}
 .akd-ai-workspace-history-entry{top:5px;right:8px}
}
.akd-ai-root.has-stage .akd-ai-upload{display:flex;flex:1;flex-direction:column;max-height:100%;min-height:0;overflow:hidden;margin:8px 0;padding:12px;border-radius:10px}
.akd-ai-root.has-stage .akd-ai-upload-rows{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:4px}
.akd-ai-root.has-stage .akd-ai-upload>[data-search-upload]{flex:0 0 auto;margin-top:10px}
@media(min-width:761px){.akd-ai-root.has-stage .akd-ai-context{flex-basis:170px;max-width:170px}.akd-ai-root.has-stage .akd-ai-composer{flex-basis:260px}}
.akd-ai-history-variants{display:flex;gap:5px;align-items:center;padding:0 0 8px}
.akd-ai-root .akd-ai-history-variants button.active{background:#e9f4ed;border-color:#b3d3bf;color:#276b4d}
.akd-ai-history-record>span{flex:none;color:#819084;font-size:11px}

/* Answers use typed public analytics; the existing product/proposal stage remains intact. */
.akd-ai-answer{box-sizing:border-box;min-width:0;margin:0 0 14px;padding:16px 18px;border:1px solid #dce8e3;border-radius:12px;background:#f8fbf9;color:#253b34;overflow-wrap:anywhere}
.akd-ai-answer h2{margin:0 0 10px;font-size:17px;line-height:1.5}
.akd-ai-answer>p{margin:8px 0;color:#667970;font-size:12px;line-height:1.7}
.akd-ai-answer-summary{margin:0 0 12px;padding-left:20px;font-size:14px;line-height:1.8}
.akd-ai-answer table{width:100%;min-width:0;max-width:100%;table-layout:fixed;border-collapse:collapse;background:#fff;font-size:12px}
.akd-ai-answer th,.akd-ai-answer td{padding:10px;text-align:left;vertical-align:top;border-bottom:1px solid #e1eae4;overflow-wrap:anywhere}
.akd-ai-answer th{color:#5b7266;font-weight:550;background:#eef5f1}

/* Phone AI owns its viewport and input rows. Keep all desktop rules unchanged. */
@media(max-width:760px){
 body.customer-portal.customer-phone-layout #customer#customer#customer#customer.customer-ai-search-active:not(.portal-locked){padding:0!important;overflow:hidden!important}
 body.customer-portal.customer-phone-layout #customer#customer#customer#customer.customer-ai-search-active>#customerAiSearchView:not(.hidden),
 .akd-ai-root,.akd-ai-root.has-stage,#aiSearch.akd-ai-root{box-sizing:border-box;padding:0!important;height:var(--ai-workspace-height,100dvh)!important;min-height:0!important;max-height:var(--ai-workspace-height,100dvh)!important;overflow:hidden!important}
 .akd-ai-root .akd-ai-workspace,.akd-ai-root.has-stage .akd-ai-workspace,
 body.customer-portal #customer#customer#customer#customer #customerAiSearchView.akd-ai-root .akd-ai-workspace,
 body.customer-portal #customer#customer#customer#customer #customerAiSearchView.akd-ai-root.has-stage .akd-ai-workspace{box-sizing:border-box;display:flex;flex-direction:column;height:100%;min-height:0;margin:0;padding:12px 10px calc(var(--ai-mobile-dock-height,0px) + 12px + env(safe-area-inset-bottom,0px))!important;overflow:hidden}
 .akd-ai-root .akd-ai-hero,.akd-ai-root.has-stage .akd-ai-hero{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;gap:6px;width:100%;margin:18px 0 0;padding:0;min-width:0}
 .akd-ai-root .akd-ai-wordmark,.akd-ai-root.has-stage .akd-ai-wordmark{font-size:22px;line-height:30px;margin:0;text-align:left;letter-spacing:-.5px;flex:0 0 auto}
 .akd-ai-root .akd-ai-context,.akd-ai-root.has-stage .akd-ai-context{flex:1 1 145px;min-width:0;max-width:none;margin:0 0 0 auto}
 .akd-ai-root .akd-ai-context>small{display:none}
 .akd-ai-root .akd-ai-context select{height:38px;min-height:38px;padding:5px 7px;font-size:14px}
 .akd-ai-root .akd-ai-composer,.akd-ai-root.has-stage .akd-ai-composer{box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;flex:1 1 100%;order:2;gap:6px;width:100%;min-width:0;margin:2px 0 0;padding:10px!important;border-radius:14px;box-shadow:0 0 0 2px #edf5f2}
 .akd-ai-root .akd-ai-composer textarea,.akd-ai-root.has-stage .akd-ai-composer textarea{box-sizing:border-box;display:block;flex:none;width:100%;min-width:0;min-height:52px;max-height:100px;line-height:24px;font-size:16px!important;padding:2px 0!important;overflow-y:auto;overflow-x:hidden;white-space:pre-wrap;overflow-wrap:anywhere;scrollbar-width:thin}
 .akd-ai-root .akd-ai-composer-bottom,.akd-ai-root.has-stage .akd-ai-composer-bottom{display:flex;flex-wrap:wrap;align-items:center;flex:none;gap:4px;width:100%;min-width:0;margin:0}
 .akd-ai-root .akd-ai-composer-actions,.akd-ai-root.has-stage .akd-ai-composer-actions{display:flex;align-items:center;gap:5px;margin-left:auto;min-width:0}
 .akd-ai-root .akd-ai-composer .akd-ai-clear,.akd-ai-root.has-stage .akd-ai-composer .akd-ai-clear{position:static;inset:auto;flex:0 0 44px;width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;min-block-size:44px!important;padding:0!important;border-radius:10px!important;font-size:23px;line-height:1;transform:none}
 .akd-ai-root .akd-ai-icon,.akd-ai-root.has-stage .akd-ai-icon{box-sizing:border-box;flex:none;width:44px;min-width:44px!important;height:44px;min-height:44px!important;min-block-size:44px!important;padding:10px;border-radius:10px}
 .akd-ai-root .akd-ai-submit,.akd-ai-root.has-stage .akd-ai-submit{box-sizing:border-box;flex:none;height:44px;min-height:44px;min-block-size:44px;padding:9px 13px!important;font-size:14px;border-radius:10px;gap:6px;white-space:nowrap}
 .akd-ai-root .akd-ai-scope,.akd-ai-root.has-stage .akd-ai-scope{flex:1 1 100%;order:3;display:flex;justify-content:flex-start;gap:6px;margin:3px 0 0;font-size:12px}
 .akd-ai-root .akd-ai-scope button{min-height:36px;padding:7px 12px;font-size:12px}
 .akd-ai-root .akd-ai-conversation,.akd-ai-root .akd-ai-bridge-connection,.akd-ai-root .akd-ai-message,
 .akd-ai-root.has-stage .akd-ai-conversation,.akd-ai-root.has-stage .akd-ai-bridge-connection,.akd-ai-root.has-stage .akd-ai-message{flex-basis:100%;order:4;width:100%;min-width:0;margin:0;text-align:left;justify-content:flex-start;font-size:11px;line-height:1.6;overflow-wrap:anywhere}
 .akd-ai-root .akd-ai-message{max-height:64px;overflow:auto}
 .akd-ai-root .akd-ai-message:empty{display:none}
 .akd-ai-root .akd-ai-undo{order:4;margin:0}
 .akd-ai-root .akd-ai-stage-tabs{height:39px;min-height:39px;margin-top:6px;gap:3px}
 .akd-ai-root .akd-ai-stage-tabs>button{min-height:36px;padding:7px 10px;font-size:12px}
 .akd-ai-root .akd-ai-results-summary{padding-top:7px}
 .akd-ai-root .akd-ai-result-query{white-space:normal;font-size:11px;line-height:1.5;margin-bottom:4px;overflow-wrap:anywhere}
 .akd-ai-root .akd-ai-result-scroll{padding:8px 0 12px;scrollbar-gutter:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y}
 .akd-ai-root .akd-ai-result-pager{gap:4px;padding:5px 0 0;min-height:0}
 .akd-ai-root .akd-ai-result-pager>div{flex-wrap:wrap;justify-content:flex-start;gap:4px}
 .akd-ai-root .akd-ai-result-pager button{min-height:34px;padding:4px 7px;font-size:11px}
 .akd-ai-root .akd-ai-result-pager input{height:34px;min-height:34px;font-size:13px}
 .akd-ai-root .akd-ai-selection-bar{box-sizing:border-box;left:10px;right:10px;bottom:calc(6px + env(safe-area-inset-bottom,0px));width:auto;min-height:48px;padding:5px 8px;gap:8px;font-size:12px;border-radius:12px}
 .akd-ai-root:not(.has-selection) .akd-ai-selection-bar{right:auto;min-height:0;width:auto;padding:0;border:0;background:transparent;box-shadow:none}
 .akd-ai-root:not(.has-selection) .akd-ai-selection-bar>[data-ai=selectionCount],.akd-ai-root:not(.has-selection) .akd-ai-selection-bar>[data-ai=viewDraft]{display:none}
 .akd-ai-root .akd-ai-selection-bar>[data-ai=viewDraft]{min-height:40px;padding:7px 10px;font-size:12px}
 .akd-ai-root.is-keyboard-open .akd-ai-workspace{padding-bottom:6px!important}
 .akd-ai-root.is-keyboard-open .akd-ai-selection-bar,.akd-ai-root.is-keyboard-open .akd-ai-context,.akd-ai-root.is-keyboard-open .akd-ai-wordmark,.akd-ai-root.is-keyboard-open .akd-ai-workspace-history-entry{display:none!important}
 .akd-ai-root.is-keyboard-open .akd-ai-hero{margin-top:0}
 .akd-ai-root .akd-ai-answer{padding:12px;border-radius:11px;margin-bottom:10px}
 .akd-ai-root .akd-ai-answer h2{font-size:16px;margin-bottom:8px}
 .akd-ai-root .akd-ai-answer-summary{font-size:13px;line-height:1.7;padding-left:18px}
 .akd-ai-root .akd-ai-answer table,.akd-ai-root .akd-ai-answer tbody{display:block;width:100%}
 .akd-ai-root .akd-ai-answer thead{display:none}
 .akd-ai-root .akd-ai-answer tr{display:block;padding:8px 0;border-bottom:1px solid #e1eae4}
 .akd-ai-root .akd-ai-answer tr:last-child{border-bottom:0}
 .akd-ai-root .akd-ai-answer td{display:flex;justify-content:space-between;gap:12px;padding:3px 0;border:0;font-size:12px;line-height:1.6;text-align:right}
 .akd-ai-root .akd-ai-answer td::before{content:attr(data-label);flex:0 0 36%;color:#6c8175;text-align:left}
}

/* Conversation results share one scroll surface; every turn owns its cards and pager. */
.akd-ai-root.has-chat .akd-ai-results{margin:0;min-height:0}
.akd-ai-chat-scroll{width:100%;min-width:0;overflow-x:hidden;overflow-y:auto;overflow-anchor:none}
.akd-ai-chat-turn{min-width:0;max-width:1080px;margin:0 auto 24px;scroll-margin-top:12px}
.akd-ai-chat-question{display:flex;flex-direction:column;align-items:flex-end;gap:5px;margin:10px 0 14px;padding-left:min(12%,100px)}
.akd-ai-chat-question>span{font-size:11px;color:#7b8983}
.akd-ai-chat-question>p{max-width:100%;margin:0;padding:12px 16px;border-radius:15px 15px 3px 15px;background:#edf5f1;color:#203c33;font-size:14px;line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere}
.akd-ai-chat-answer{min-width:0;padding:0 0 14px;border-bottom:1px solid #e8efeb}
.akd-ai-chat-answer>header{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px}
.akd-ai-chat-answer>header strong{font-size:13px;color:#286956}
.akd-ai-chat-answer>header small{font-size:10px;color:#819087}
.akd-ai-turn-conclusion,.akd-ai-turn-status,.akd-ai-answer-section>p{margin:0 0 12px;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.akd-ai-turn-status{color:#74827a}
.akd-ai-turn-status.is-error{color:#a44432}
.akd-ai-answer-section{margin:10px 0;min-width:0}
.akd-ai-answer-section>h3{font-size:13px;margin:0 0 5px;color:#3f6252}
.akd-ai-history-preview-note{margin:8px 0 12px;padding:8px 10px;border-radius:8px;background:#fff8e9;color:#8b6a32;font-size:12px;line-height:1.7}
.akd-ai-root .akd-ai-turn-pager,.akd-ai-chat-answer>.akd-ai-result-pager{display:flex;flex-wrap:wrap;position:static;width:100%;margin-top:10px;padding:10px 0 0;min-height:0;border-top:1px solid #e4ece6;background:transparent}
.akd-ai-root .akd-ai-turn-pager>div,.akd-ai-chat-answer>.akd-ai-result-pager>div{flex-wrap:wrap}
.akd-ai-turn-tools{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 6px}
.akd-ai-root .akd-ai-turn-tools>button{border:1px solid #dbe7df;border-radius:8px;padding:6px 10px;background:#fff;color:#39715a;font-size:11px;min-height:30px;box-shadow:none}
.akd-ai-root .akd-ai-chat-tail{position:absolute;right:28px;bottom:64px;z-index:8;padding:8px 13px;border:1px solid #c9ded1;border-radius:18px;background:#fff;box-shadow:0 3px 14px #243d3e16;color:#2c6c54;font-size:12px}
.akd-ai-chat-composer{min-width:0;flex:0 0 auto}
@media(max-width:760px){
 .akd-ai-root.has-chat .akd-ai-workspace,.akd-ai-root.has-chat.has-stage .akd-ai-workspace,
 body.customer-portal #customer#customer#customer#customer #customerAiSearchView.akd-ai-root.has-chat .akd-ai-workspace{padding:8px 10px calc(6px + env(safe-area-inset-bottom,0px))!important}
 .akd-ai-root.has-chat .akd-ai-hero{order:0;margin:12px 0 0;gap:4px}
 .akd-ai-root.has-chat .akd-ai-stage-tabs{order:1;margin-top:4px}
 .akd-ai-root.has-chat .akd-ai-stage{order:2;flex:1;min-height:0}
 .akd-ai-root.has-chat .akd-ai-selection-bar{position:static!important;order:3;flex:0 0 auto;align-self:flex-start;max-width:100%;margin:3px 0 0;min-height:0;padding:3px 6px;gap:7px;border-radius:8px;font-size:11px}
 .akd-ai-root.has-chat .akd-ai-selection-bar>[data-ai=viewDraft]{min-height:32px;padding:4px 8px;font-size:11px}
 .akd-ai-chat-composer{order:4;padding-top:5px;background:#fff}
 .akd-ai-root.has-chat .akd-ai-chat-composer .akd-ai-composer{margin:0;box-shadow:none;padding:8px!important}
 .akd-ai-root.has-chat .akd-ai-chat-composer textarea{min-height:48px;max-height:100px}
 .akd-ai-chat-turn{margin-bottom:18px}
 .akd-ai-chat-question{padding-left:20px;margin:8px 0 12px}
 .akd-ai-chat-question>p{padding:10px 12px;font-size:14px;line-height:1.7}
 .akd-ai-turn-conclusion,.akd-ai-turn-status,.akd-ai-answer-section>p{font-size:13px;line-height:1.75;margin-bottom:10px}
 .akd-ai-chat-answer>header{gap:7px;margin-bottom:8px}
 .akd-ai-root .akd-ai-chat-tail{right:18px;bottom:calc(var(--ai-chat-dock-height,150px) + 16px + env(safe-area-inset-bottom,0px));max-width:calc(100% - 36px);font-size:11px;padding:7px 11px}
 .akd-ai-root .akd-ai-turn-tools>button{min-height:36px;padding:7px 10px}
 .akd-ai-root.has-chat .akd-ai-result-scroll{padding-top:2px}
 .akd-ai-root.has-chat .akd-ai-message{max-height:36px;line-height:1.5}
}


/* Admin authorization records only. Column widths follow the content pane, not the viewport. */
#authorizations #authorizationListView { container-type:inline-size; container-name:authorization-records; }
#authorizations .authorization-table {
  --authorization-document-width:52px; --authorization-number-width:138px;
  --authorization-brand-width:56px; --authorization-level-width:68px;
  --authorization-period-width:102px; --authorization-status-width:96px;
  --authorization-created-width:94px; --authorization-actions-width:66px;
  --authorization-note-width:160px; --authorization-fixed-width:832px;
  width:100%; min-width:0; table-layout:fixed;
}
#authorizations .authorization-table:has(.authorization-inline-row) {
  --authorization-document-width:56px; --authorization-level-width:78px;
  --authorization-period-width:128px; --authorization-actions-width:76px;
  --authorization-fixed-width:882px;
}
#authorizations .authorization-table col.authorization-col-document { width:var(--authorization-document-width); }
#authorizations .authorization-table col.authorization-col-number { width:var(--authorization-number-width); }
#authorizations .authorization-table col.authorization-col-brand { width:var(--authorization-brand-width); }
#authorizations .authorization-table col.authorization-col-level { width:var(--authorization-level-width); }
#authorizations .authorization-table col.authorization-col-period { width:var(--authorization-period-width); }
#authorizations .authorization-table col.authorization-col-status { width:var(--authorization-status-width); }
#authorizations .authorization-table col.authorization-col-created { width:var(--authorization-created-width); }
#authorizations .authorization-table col.authorization-col-note { width:var(--authorization-note-width); }
#authorizations .authorization-table col.authorization-col-actions { width:var(--authorization-actions-width); }
#authorizations .authorization-table col.authorization-col-project { width:calc((100% - var(--authorization-fixed-width)) * .25); }
#authorizations .authorization-table col.authorization-col-customer,
#authorizations .authorization-table col.authorization-col-issuer { width:calc((100% - var(--authorization-fixed-width)) * .375); }
#authorizations .authorization-table th { white-space:nowrap; overflow-wrap:normal; padding:8px 5px; }
#authorizations .authorization-table td { padding:8px 5px; }
#authorizations .authorization-table .authorization-record-number,
#authorizations .authorization-table .authorization-record-brand { display:block; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; overflow-wrap:normal; }
#authorizations .authorization-table .authorization-level { white-space:nowrap; overflow-wrap:normal; }
#authorizations .authorization-table .authorization-actual-period { white-space:nowrap; overflow-wrap:normal; font-variant-numeric:tabular-nums; }
#authorizations .authorization-period-full { display:none; }
#authorizations .authorization-period-deadline { display:inline; }
#authorizations .authorization-table .authorization-created-at > span { white-space:nowrap; overflow-wrap:normal; }
#authorizations .authorization-table .authorization-status { width:max-content; max-width:100%; white-space:nowrap; }
#authorizations .authorization-table td.authorization-actions { min-width:0; }
#authorizations .authorization-table .authorization-operation-trigger { min-width:0; padding:6px 5px; white-space:nowrap; }
#authorizations .authorization-table .authorization-inline-row input,
#authorizations .authorization-table .authorization-inline-row select { box-sizing:border-box; min-width:0; width:100%; }
#authorizations .authorization-table .authorization-inline-row input[type="date"] { padding:0 5px; }
#authorizations .authorization-table .authorization-inline-row select { padding-left:5px; padding-right:3px; }
#authorizations .authorization-document-cell { display:grid; justify-items:center; gap:3px; min-width:0; }
#authorizations .authorization-table .authorization-document-button { width:38px; height:42px; overflow:visible; }
#authorizations .authorization-table .authorization-document-button img { display:block; max-width:100%; max-height:100%; object-fit:contain; border-radius:4px; }
#authorizations .authorization-table .authorization-thumbnail-retry { width:max-content; min-width:0; min-height:18px; height:auto; padding:0 3px; border:0; border-radius:3px; background:#eef3ff; color:#365cb4; font-size:10px; line-height:1.5; box-shadow:none; }
#authorizations .authorization-record-void-status { display:inline-flex; width:max-content; max-width:100%; align-items:center; gap:5px; white-space:nowrap; }
#authorizations .authorization-record-void-status .authorization-void-stamp { margin:0; padding:1px 5px; font-size:12px; line-height:1.4; }
#authorizations .authorization-void-info-trigger { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; width:max-content; min-width:0; min-height:22px; height:auto; padding:2px 5px; border:1px solid #ead8d8; border-radius:4px; color:#a54949; background:#fff7f7; font-size:11px; line-height:1.4; white-space:nowrap; box-shadow:none; }
#authorizations #authorizationCustomerView { container-type:inline-size; container-name:authorization-customers; }
#authorizations .authorization-customer-record { display:grid; grid-template-columns:minmax(0,1fr) max-content 112px 66px; gap:12px; align-items:center; padding:7px 10px; }
#authorizations .authorization-customer-record-main { display:grid; grid-template-columns:66px minmax(0,1fr) 138px; width:100%; min-width:0; min-height:42px; gap:12px; padding:0; background:transparent; }
#authorizations .authorization-customer-record-main:disabled { opacity:1; cursor:default; }
#authorizations .authorization-customer-record-brand,
#authorizations .authorization-customer-record-main > em { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
#authorizations .authorization-customer-record-company { display:grid; gap:4px; min-width:0; max-width:660px; }
#authorizations .authorization-customer-record-company > strong,
#authorizations .authorization-customer-record-company > .authorization-customer-issuer { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; line-height:1.5; }
#authorizations .authorization-customer-record-company > strong { font-weight:500; }
#authorizations .authorization-customer-record-status { display:grid; justify-items:start; gap:3px; width:max-content; max-width:125px; }
#authorizations .authorization-customer-record-status .authorization-status { width:max-content; white-space:nowrap; }
#authorizations .authorization-customer-record-status .authorization-status-detail { display:none; }
#authorizations .authorization-customer-record-period { white-space:nowrap; font-variant-numeric:tabular-nums; }
#authorizations .authorization-customer-record-period > small { display:block; margin-top:3px; color:#8a94a7; font-size:11px; white-space:normal; overflow-wrap:anywhere; line-height:1.4; }
#authorizations .authorization-customer-record > .authorization-operation-trigger { width:max-content; max-width:100%; min-width:0; padding:6px 7px; justify-self:end; white-space:nowrap; }
#authorizations .authorization-record-void-dialog { box-sizing:border-box; width:min(560px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:calc(100dvh - 40px); margin:auto; padding:20px; overflow:auto; border:1px solid #e4d2d2; border-radius:14px; color:#344158; background:#fff; box-shadow:0 20px 70px #18253e35; }
#authorizations .authorization-record-void-dialog::backdrop { background:#17243b66; }
#authorizations .authorization-record-void-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
#authorizations .authorization-record-void-dialog h3 { margin:0; color:#9f4141; font-size:18px; }
#authorizations .authorization-record-void-close { flex:none; width:max-content; min-height:32px; padding:5px 12px; border:1px solid #d8e0ed; border-radius:6px; color:#4f617e; background:#f8faff; box-shadow:none; }
#authorizations .authorization-record-void-dialog p { min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
#authorizations .authorization-record-void-number,
#authorizations .authorization-record-void-time { color:#8090a7; font-size:12px; }
#authorizations .authorization-record-void-reason { padding:12px; border:1px solid #f0dddd; border-radius:8px; background:#fff8f8; }
@container authorization-records (min-width:1320px) {
  #authorizations .authorization-table:not(:has(.authorization-inline-row)) { --authorization-period-width:196px; --authorization-note-width:180px; --authorization-fixed-width:946px; }
  #authorizations .authorization-period-full { display:inline; }
  #authorizations .authorization-period-deadline { display:none; }
}
@container authorization-records (max-width:1119px) {
  #authorizations .authorization-table { width:1120px; min-width:1120px; }
}
@container authorization-customers (max-width:1099px) {
  #authorizations .authorization-customer-record { grid-template-columns:minmax(0,1fr) max-content 102px 62px; gap:8px; }
  #authorizations .authorization-customer-record-main { grid-template-columns:54px minmax(0,1fr) 130px; gap:8px; }
}
@container authorization-customers (max-width:759px) {
  #authorizations .authorization-customer-record { grid-template-columns:minmax(0,1fr) max-content; gap:8px 12px; }
  #authorizations .authorization-customer-record-main { grid-column:1/-1; grid-template-columns:54px minmax(0,1fr); }
  #authorizations .authorization-customer-record-main > em { grid-column:2; }
  #authorizations .authorization-customer-record-period { grid-column:1; grid-row:3; }
  #authorizations .authorization-customer-record > .authorization-operation-trigger,
  #authorizations .authorization-customer-record > .authorization-inline-hint { grid-column:2; grid-row:3; justify-self:end; }
}

/* Customer-visible notes: readable previews and a guarded, scoped editor. */
#authorizations .authorization-note-content { display:flex; align-items:flex-start; gap:6px; min-width:0; }
#authorizations .authorization-note-text { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; min-width:0; max-width:100%; width:auto; min-height:0; padding:0; overflow:hidden; color:#526685; background:transparent; border:0; border-radius:0; box-shadow:none; font:inherit; line-height:1.55; text-align:left; white-space:pre-wrap; overflow-wrap:anywhere; }
#authorizations .authorization-note-empty { color:#94a1b4; }
#authorizations .authorization-note-edit { flex:none; width:24px; min-width:24px; min-height:24px; padding:1px; margin-left:auto; border:1px solid #dfe6f2; border-radius:5px; background:#f7f9ff; color:#4966bf; line-height:1; box-shadow:none; }
#authorizations .authorization-note-text:focus-visible, #authorizations .authorization-note-edit:focus-visible { outline:2px solid #4264cf; outline-offset:2px; }
#authorizations .authorization-note-cell textarea { box-sizing:border-box; width:100%; min-width:0; min-height:56px; max-height:150px; resize:vertical; padding:6px; font:inherit; }
#authorizations .authorization-note-dialog { box-sizing:border-box; width:min(560px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); margin:auto; padding:20px; overflow:auto; border:1px solid #dce4f1; border-radius:14px; color:#344158; background:#fff; box-shadow:0 20px 70px #18253e35; }
#authorizations .authorization-note-dialog::backdrop { background:#17243b66; }
#authorizations .authorization-note-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
#authorizations .authorization-note-dialog h3 { margin:0; font-size:18px; }
#authorizations .authorization-note-dialog > header button { min-width:32px; min-height:32px; padding:4px 10px; border:1px solid #dce4f1; background:#f8faff; color:#526685; box-shadow:none; }
#authorizations .authorization-note-dialog textarea { box-sizing:border-box; display:block; width:100%; min-height:140px; max-height:45dvh; margin-top:8px; resize:vertical; padding:10px; font:inherit; line-height:1.6; }
#authorizations .authorization-note-dialog > label { display:block; font-size:13px; }
#authorizations .authorization-note-subject, #authorizations .authorization-note-help { color:#7e8da5; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
#authorizations .authorization-note-body { min-height:50px; padding:12px; background:#f7f9fd; border-radius:8px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
#authorizations .authorization-note-dialog [data-authorization-note-error] { color:#b54444; font-size:13px; white-space:pre-wrap; }
#authorizations .authorization-note-dialog > footer { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
#authorizations .authorization-note-dialog > footer > span { flex:1; }


/* Only the admin authorization application pane; widths follow its scroll container. */
#authorizations .authorization-applications-toolbar {
  grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) minmax(150px,190px) 150px auto;
}
#authorizations .authorization-applications-toolbar > label { min-width:0; }
#authorizations .authorization-applications-toolbar select { width:100%; min-width:0; }
#authorizations .authorization-workflow-tabs { flex-wrap:wrap; min-width:0; max-width:100%; }
#authorizations #authorizationApplicationsList .authorization-company-copy {
  flex:none; min-height:24px; height:auto; padding:2px 5px; margin-left:4px;
  border:1px solid #d8e3ff; border-radius:5px; color:#365ad2; background:#f5f8ff;
  font-size:11px; line-height:1.4; white-space:nowrap;
}
@media (max-width:1360px) {
  #authorizations .authorization-records-controls { grid-template-columns:minmax(0,1fr); }
  #authorizations .authorization-applications-toolbar { grid-template-columns:minmax(0,1fr) minmax(150px,190px) 150px auto; }
  #authorizations .authorization-applications-toolbar > div { grid-column:1 / -1; }
}
@media (max-width:760px) {
  /* The heading/metrics can exceed a phone height. Allow the workspace itself
     to scroll instead of squeezing its list and hiding the new filters. */
  #authorizations.active { overflow-y:auto; }
  #authorizations .authorization-applications-panel,
  #authorizations .authorization-list-panel { flex:0 0 auto; min-height:380px; }
  #authorizations .authorization-application-list,
  #authorizations .authorization-table-wrap,
  #authorizations .authorization-customer-view { flex:0 0 auto; max-height:65dvh; }
  #authorizations .authorization-applications-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #authorizations .authorization-applications-toolbar > label:first-of-type { grid-column:1 / -1; }
  #authorizations .authorization-applications-toolbar > button { grid-column:1 / -1; justify-self:end; }
}
@media (max-width:420px) {
  #authorizations .authorization-applications-toolbar { grid-template-columns:minmax(0,1fr); }
}
#authorizations #authorizationApplicationsList {
  container-type: inline-size;
  container-name: authorization-applications;
  min-width: 0;
}
#authorizations #authorizationApplicationsList .authorization-application-card.authorization-compact-row {
  display: grid;
  grid-template-areas: "document brand company contact submitted attachments period actions" "document project company contact submitted attachments period actions" "document level company contact submitted attachments period actions";
  grid-template-columns: 64px minmax(100px,.7fr) minmax(210px,1.4fr) 132px 108px minmax(190px,1.35fr) 110px max-content;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
  min-height: 124px;
  padding: 12px;
  overflow: hidden;
}
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-document-box { grid-area: document; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-brand { grid-area: brand; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-project { grid-area: project; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-level { grid-area: level; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-company { grid-area: company; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-contact { grid-area: contact; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-submitted { grid-area: submitted; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-attachments { grid-area: attachments; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-period { grid-area: period; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-application-actions { grid-area: actions; }
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-row-field {
  min-width: 0;
  min-height: 0;
  align-self: center;
  justify-self: stretch;
  gap: 6px;
  border-left: 1px solid #e4eaf4;
  padding: 0 0 0 10px;
}
#authorizations #authorizationApplicationsList .authorization-compact-row > :is(.authorization-row-brand,.authorization-row-project,.authorization-row-level) {
  display: grid;
  grid-template-columns: 2.5em minmax(0,1fr);
  align-items: center;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  gap: 4px;
}
#authorizations #authorizationApplicationsList :is(.authorization-row-brand > strong,.authorization-row-project > span) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
}
#authorizations #authorizationApplicationsList .authorization-row-company { gap: 8px; }
#authorizations #authorizationApplicationsList .authorization-company-line {
  display: flex;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  gap: 3px;
  white-space: nowrap;
  line-height: 1.5;
}
#authorizations #authorizationApplicationsList .authorization-company-line > b { flex: none; font-weight: 500; color: #8492a8; }
#authorizations #authorizationApplicationsList .authorization-company-line > strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
#authorizations #authorizationApplicationsList .authorization-row-contact > span {
  display: grid;
  grid-template-columns: 4em minmax(0,1fr);
  width: 100%;
  max-width: 100%;
  gap: 3px;
  white-space: nowrap;
  line-height: 1.5;
}
#authorizations #authorizationApplicationsList .authorization-row-contact b { font-weight: 500; color: #8492a8; }
#authorizations #authorizationApplicationsList .authorization-row-contact > span > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
#authorizations #authorizationApplicationsList .authorization-submitted-at {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 5px;
  width: 100%;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
#authorizations #authorizationApplicationsList .authorization-submitted-at > span { white-space: nowrap; }
#authorizations #authorizationApplicationsList .authorization-file-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
}
#authorizations #authorizationApplicationsList .authorization-file-actions > .authorization-attachment-link { flex: 0 1 auto; width: auto; }
#authorizations #authorizationApplicationsList .authorization-file-actions > .authorization-attachment-download { flex: none; }
#authorizations #authorizationApplicationsList .authorization-attachment-download[data-download-state="downloaded"] { color: #31815b; border-color: #c9e2d4; background: #f3fbf6; }
#authorizations #authorizationApplicationsList .authorization-attachment-download[data-download-state="loading"] { color: #71809a; }
#authorizations #authorizationApplicationsList :is(.authorization-attachment-link,.authorization-file-label,.authorization-application-file-row summary) {
  display: flex;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  align-items: center;
  gap: 3px;
  text-align: left;
  white-space: nowrap;
}
#authorizations #authorizationApplicationsList .authorization-file-name { display: flex; min-width: 0; flex: 1 1 auto; overflow: hidden; }
#authorizations #authorizationApplicationsList .authorization-file-stem { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#authorizations #authorizationApplicationsList :is(.authorization-file-purpose,.authorization-file-suffix,.authorization-file-extra) { flex: none; white-space: nowrap; }
#authorizations #authorizationApplicationsList .authorization-application-file-list { min-width: 0; padding-top: 6px; }
#authorizations #authorizationApplicationsList .authorization-document-box {
  width: 64px;
  max-width: 100%;
  justify-self: start;
  align-self: center;
}
#authorizations #authorizationApplicationsList .authorization-document-frame-wrap { gap: 4px; justify-content: center; }
#authorizations #authorizationApplicationsList .authorization-document-frame {
  flex: 0 0 34px;
  width: 34px;
  height: 46px;
  min-height: 46px;
  padding: 2px;
  overflow: hidden;
  font-size: inherit;
}
#authorizations #authorizationApplicationsList .authorization-document-frame.is-empty { flex-basis:48px; width:48px; height:62px; min-height:62px; }
#authorizations #authorizationApplicationsList .authorization-document-frame:not(.is-empty) .authorization-thumbnail-fallback > span:last-child { display:none; }
#authorizations #authorizationApplicationsList .authorization-thumbnail-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
}
#authorizations #authorizationApplicationsList .authorization-stamped-thumbnail { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
#authorizations #authorizationApplicationsList :is(.authorization-stamped-thumbnail,.authorization-thumbnail-fallback,.authorization-thumbnail-retry)[hidden] { display: none; }
#authorizations #authorizationApplicationsList .authorization-thumbnail-retry {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #4265ca;
  min-height: 24px;
  height: auto;
  padding: 2px 0;
  max-width: 100%;
  font: inherit;
}
#authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-application-actions {
  justify-self: start;
  align-items: center;
  justify-content: flex-start;
  max-width: 240px;
  padding: 0;
  margin: 0;
}
#authorizations #authorizationApplicationsList .authorization-controls-stack { flex: 0 1 auto; width: max-content; max-width: 190px; justify-items: start; grid-template-columns: minmax(0,max-content); }
#authorizations #authorizationApplicationsList .authorization-progress-control { width: max-content; max-width: 100%; }
#authorizations #authorizationApplicationsList :is(.authorization-progress-button,.authorization-result-button) { width: max-content; max-width: 100%; min-width: 0; white-space: normal; }
#authorizations #authorizationApplicationsList .authorization-application-note {
  grid-column: 1 / -1;
  min-width: 0;
  max-width: 100%;
  color: #8492a8;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#authorizations #authorizationApplicationsList .authorization-application-void-status {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  flex-wrap: nowrap;
}
#authorizations #authorizationApplicationsList .authorization-application-void-status > .authorization-void-stamp { position: static; flex: none; transform: rotate(-8deg); font-size: 13px; padding: 2px 5px; white-space: nowrap; }
#authorizations #authorizationApplicationsList .authorization-application-void-info { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; min-height: 26px; padding: 0; flex: none; border: 0; background: transparent; box-shadow: none; color: #5c70a8; font-size: 18px; cursor: pointer; }
#authorizations #authorizationApplicationsList .authorization-application-void-info:hover { background: #edf2ff; }
#authorizations #authorizationApplicationsList .authorization-application-void-info:focus-visible { outline: 2px solid #4265ca; outline-offset: 2px; }
.authorization-application-void-dialog { width: min(480px,calc(100vw - 32px)); max-height: min(600px,calc(100dvh - 40px)); box-sizing: border-box; overflow: auto; padding: 20px; border: 1px solid #e0e6f1; border-radius: 14px; box-shadow: 0 20px 70px #23365c33; background: #fff; color: #28364a; }
.authorization-application-void-dialog::backdrop { background: #15243a66; }
.authorization-application-void-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.authorization-application-void-dialog h3 { margin: 0; font-size: 18px; }
.authorization-application-void-dialog h4 { margin: 18px 0 8px; font-size: 13px; color: #76839a; }
.authorization-application-void-dialog p { margin: 8px 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.authorization-application-void-dialog .authorization-application-void-subject { color: #76839a; font-size: 13px; }
.authorization-application-void-dialog [data-auth-void-close] { padding: 5px 10px; min-height: 30px; border: 1px solid #dbe3ef; border-radius: 7px; background: #fff; color: #4b5d78; cursor: pointer; }
@container authorization-applications (max-width: 1299px) {
  #authorizations #authorizationApplicationsList .authorization-application-card.authorization-compact-row {
    grid-template-areas: "document brand company attachments period actions" "document project company attachments period actions" "document level company attachments period actions" "document contact contact submitted submitted actions";
    grid-template-columns: 64px 132px minmax(210px,1.4fr) minmax(190px,1.2fr) 110px max-content;
  }
}
@container authorization-applications (max-width: 1049px) {
  #authorizations #authorizationApplicationsList .authorization-application-card.authorization-compact-row {
    grid-template-areas: "document brand company attachments" "document project company attachments" "document level company attachments" "document contact period actions" "document submitted period actions";
    grid-template-columns: 64px 132px minmax(210px,1.2fr) minmax(190px,1fr);
  }
}
@container authorization-applications (max-width: 679px) {
  #authorizations #authorizationApplicationsList .authorization-application-card.authorization-compact-row {
    grid-template-areas: "document brand company" "document project company" "document level company" "document contact submitted" "period period actions" "attachments attachments attachments";
    grid-template-columns: 64px minmax(132px,1fr) minmax(160px,1.2fr);
    gap: 8px 10px;
  }
  #authorizations #authorizationApplicationsList .authorization-compact-row > .authorization-application-actions { flex-wrap: wrap; max-width: 100%; }
  #authorizations #authorizationApplicationsList .authorization-controls-stack { max-width: 100%; }
}
@container authorization-applications (max-width: 479px) {
  #authorizations #authorizationApplicationsList .authorization-application-card.authorization-compact-row {
    grid-template-areas: "document brand" "project project" "level level" "company company" "contact contact" "submitted submitted" "attachments attachments" "period period" "actions actions";
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

/* These dictionaries belong to authorization management only. */
#authorizations .authorization-library-actions { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
#authorizations .authorization-library-actions > button { min-height:32px; padding:6px 9px; white-space:nowrap; font-size:12px; }
#authorizations .authorization-library-actions > button[hidden] { display:none; }
#authorizations .authorization-options-dialog { box-sizing:border-box; width:min(760px,calc(100vw - 32px)); max-width:calc(100vw - 32px); max-height:calc(100dvh - 40px); margin:auto; padding:22px; overflow:auto; border:1px solid #dce5f2; border-radius:16px; color:#344158; background:#fff; box-shadow:0 20px 70px #18253e35; }
#authorizations .authorization-options-dialog::backdrop { background:#17243b66; }
#authorizations .authorization-options-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
#authorizations .authorization-options-dialog h3 { margin:0; font-size:20px; color:#263c60; }
#authorizations .authorization-options-dialog button { min-height:32px; height:auto; padding:6px 11px; border-radius:7px; white-space:nowrap; }
#authorizations .authorization-options-dialog button[hidden],
#authorizations .authorization-options-dialog form[hidden] { display:none; }
#authorizations .authorization-options-help { margin:12px 0 16px; color:#7789a5; font-size:13px; line-height:1.6; }
#authorizations .authorization-options-tabs { display:flex; gap:8px; margin-bottom:16px; padding:4px; border:1px solid #e3e9f3; border-radius:10px; background:#f6f8fc; }
#authorizations .authorization-options-tabs > button { flex:1 1 0; border:0; background:transparent; color:#607390; box-shadow:none; transition:none; }
#authorizations .authorization-options-tabs > button[aria-pressed="true"] { background:#fff; color:#365ad2; box-shadow:0 2px 8px #1a315515; font-weight:650; }
#authorizations .authorization-options-editor { display:flex; align-items:flex-end; flex-wrap:wrap; gap:8px; padding:14px; border:1px solid #dce6f8; border-radius:10px; background:#f8faff; }
#authorizations .authorization-options-editor label { flex:1 1 240px; min-width:0; display:grid; gap:7px; color:#4b5f7e; font-size:13px; }
#authorizations .authorization-options-dialog :is(input,select) { box-sizing:border-box; width:100%; min-width:0; height:36px; border:1px solid #dce4f1; border-radius:7px; padding:6px 10px; background:#fff; color:#344158; font:inherit; font-size:13px; }
#authorizations .authorization-options-filter { display:flex; gap:8px; margin-top:16px; align-items:center; }
#authorizations .authorization-options-filter input { flex:1 1 auto; }
#authorizations .authorization-options-filter select { flex:0 0 100px; width:100px; }
#authorizations .authorization-options-filter button { flex:none; }
#authorizations [data-auth-options-message] { min-height:20px; margin:10px 0; color:#23855e; font-size:13px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; }
#authorizations [data-auth-options-message].is-error { color:#bf4c4c; }
#authorizations .authorization-options-table-wrap { box-sizing:border-box; min-width:0; max-width:100%; max-height:340px; overflow:auto; border:1px solid #e2e9f3; border-radius:9px; font-size:13px; }
#authorizations .authorization-option-row { box-sizing:border-box; display:flex; align-items:center; gap:8px; width:100%; min-width:0; padding:10px; border-bottom:1px solid #edf1f7; }
#authorizations .authorization-option-row:last-child { border-bottom:0; }
#authorizations .authorization-option-name { flex:0 1 auto; min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
#authorizations .authorization-option-actions { display:inline-flex; flex:none; align-items:center; gap:6px; white-space:nowrap; color:#7789a5; }
#authorizations .authorization-option-actions > button { flex:none; margin:0; }
#authorizations .authorization-option-empty { color:#8b99af; text-align:center; padding:28px 10px; }
#authorizations .authorization-options-dialog > footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin-top:12px; color:#8b99af; font-size:12px; line-height:1.6; }
@media (max-width:600px) {
  #authorizations .authorization-options-dialog { padding:14px; }
  #authorizations .authorization-options-dialog h3 { font-size:18px; }
  #authorizations .authorization-option-row { padding:8px 6px; }
  #authorizations .authorization-options-table-wrap button { padding:4px 7px; }
}


/* Compact authorization workspace: one set of workflow counts and local record filters. */
#authorizations > .authorization-topbar {
  display:flex!important;
  align-items:center;
  justify-content:space-between;
  gap:8px 16px;
  min-height:54px!important;
  padding:9px 14px!important;
  margin:10px 30px 8px!important;
  border:1px solid #e0e6ef!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:none!important;
  overflow:visible;
}
#authorizations > .authorization-topbar::before,
#authorizations > .authorization-topbar::after { display:none!important; }
#authorizations .authorization-heading h1 { margin:0; font-size:21px!important; line-height:1.3; white-space:nowrap; }
#authorizations > .authorization-topbar .authorization-top-actions {
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  width:auto;
  gap:6px;
}
#authorizations .authorization-top-actions > button,
#authorizations .authorization-library-menu > summary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  height:34px;
  padding:0 10px;
  border:1px solid #dbe3ef;
  border-radius:6px;
  color:#405373;
  background:#fff;
  box-shadow:none;
  font-size:13px;
  line-height:1.3;
  white-space:nowrap;
}
#authorizations .authorization-top-actions > .authorization-h5-button { color:#3158d8; background:#f2f5ff; border-color:#d3ddfa; }
#authorizations .authorization-library-menu { position:relative; flex:none; }
#authorizations .authorization-library-menu > summary { cursor:pointer; list-style:none; }
#authorizations .authorization-library-menu > summary::-webkit-details-marker { display:none; }
#authorizations .authorization-library-menu > summary::after { content:"▾"; margin-left:7px; font-size:11px; }
#authorizations .authorization-library-menu > .authorization-library-actions {
  position:absolute;
  z-index:25;
  top:calc(100% + 5px);
  right:0;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  min-width:156px;
  padding:5px;
  gap:2px;
  border:1px solid #dbe3ef;
  border-radius:7px;
  background:#fff;
  box-shadow:0 5px 18px rgb(32 49 80 / 12%);
}
#authorizations .authorization-library-menu:not([open]) > .authorization-library-actions { display:none; }
#authorizations .authorization-library-actions > button { border:0; border-radius:4px; text-align:left; box-shadow:none; }
#authorizations > .authorization-records-controls {
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:8px;
  min-width:0;
}
#authorizations .authorization-records-controls .authorization-workflow-tabs {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  width:100%;
  min-width:0;
  margin:0;
  padding:0;
  border:0;
  border-bottom:1px solid #dfe5ef;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
#authorizations .authorization-records-controls .authorization-workflow-tabs button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  flex:0 0 auto;
  height:36px;
  min-height:36px;
  padding:0 12px;
  border:0;
  border-bottom:2px solid transparent;
  border-radius:0;
  background:transparent;
  color:#68788f;
  box-shadow:none;
  font-size:13px;
  font-weight:600;
  white-space:nowrap;
}
#authorizations .authorization-records-controls .authorization-workflow-tabs button.active { color:#3158d8; border-bottom-color:#3158d8; background:transparent; box-shadow:none; }
#authorizations .authorization-workflow-tabs b {
  display:inline-block;
  height:auto;
  min-width:19px;
  margin:0;
  padding:1px 5px;
  border-radius:4px;
  color:#66758b;
  background:#eef1f6;
  font-size:12px;
  line-height:18px;
  text-align:center;
  font-variant-numeric:tabular-nums;
}
#authorizations .authorization-workflow-tabs button.active b { color:#3158d8; background:#eaf0ff; }
#authorizations .authorization-workflow-tabs small { margin:0; font-size:12px; font-weight:400; }
#authorizations .authorization-records-controls .authorization-filter-panel {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  margin:0;
  border:1px solid #e0e6ef;
  border-radius:7px;
  background:#fff;
  box-shadow:none;
}
#authorizations .authorization-records-controls .authorization-filter-panel.hidden { display:none; }
#authorizations .authorization-record-status-controls { display:flex; align-items:center; flex-wrap:wrap; gap:5px; min-width:0; }
#authorizations .authorization-records-controls .authorization-filter-panel :is(input:not([type="hidden"]),select,button) {
  height:34px;
  min-height:34px;
  padding:0 9px;
  border-radius:5px;
  font-size:12px;
  line-height:1.35;
  box-shadow:none;
}
#authorizations .authorization-record-status-controls button { display:inline-flex; gap:5px; align-items:center; border:1px solid transparent; color:#65748b; background:#f2f4f7; white-space:nowrap; }
#authorizations .authorization-record-status-controls button b { font-variant-numeric:tabular-nums; font-size:13px; }
#authorizations .authorization-record-status-controls button[data-authorization-status="soon"].has-attention { color:#9c650c; background:#fff6e8; }
#authorizations .authorization-record-status-controls button[data-authorization-status="expired"].has-attention { color:#be4542; background:#fff0ef; }
#authorizations .authorization-record-status-controls button.active { border-color:#abc0f9; color:#3158d8; background:#edf2ff; }
#authorizations .authorization-record-status-controls select { width:174px; max-width:100%; }
#authorizations .authorization-filter-panel .authorization-search-field { display:block; flex:1 1 180px; min-width:140px; }
#authorizations .authorization-filter-panel .authorization-search-field input { width:100%; }
#authorizations .authorization-toolbar { min-height:44px; padding:5px 10px; gap:8px; }
#authorizations .authorization-toolbar button { min-height:30px; height:30px; padding:0 9px; font-size:12px; box-shadow:none; }
#authorizations .authorization-view-tools { gap:8px; flex-wrap:wrap; }
#authorizations .authorization-view-tools > span { font-size:12px; }
#authorizations .authorization-view-switch { padding:2px; }
#authorizations .authorization-applications-panel { padding:10px 12px 0; }
#authorizations .authorization-applications-toolbar {
  grid-template-columns:minmax(180px,.9fr) minmax(220px,1.4fr) minmax(145px,185px) 145px;
  gap:8px;
  padding-bottom:8px;
  margin-bottom:8px;
  align-items:end;
}
#authorizations .authorization-applications-toolbar > div { grid-column:auto; }
#authorizations .authorization-applications-toolbar > div > strong { font-size:16px; }
#authorizations .authorization-applications-toolbar > div > span { font-size:12px; line-height:1.5; margin-top:3px; }
#authorizations .authorization-applications-toolbar > label { font-size:12px; gap:4px; }
#authorizations .authorization-applications-toolbar :is(input,select) { height:34px; min-height:34px; padding:0 9px; font-size:13px; border-radius:6px; }
@media (max-width:1360px) {
  #authorizations .authorization-applications-toolbar { grid-template-columns:minmax(0,1fr) minmax(145px,185px) 145px; }
  #authorizations .authorization-applications-toolbar > div { grid-column:1/-1; }
}
@media (max-width:980px) {
  #authorizations > .authorization-topbar { margin-right:16px!important; margin-left:16px!important; }
}
@media (max-width:760px) {
  #authorizations > .authorization-topbar { flex-wrap:wrap; padding:8px 10px!important; }
  #authorizations .authorization-heading h1 { font-size:19px!important; }
  #authorizations > .authorization-topbar .authorization-top-actions { justify-content:flex-start; }
  #authorizations .authorization-toolbar { flex-direction:row; align-items:center; flex-wrap:wrap; }
  #authorizations .authorization-records-controls .authorization-filter-panel { padding:8px; }
  #authorizations .authorization-record-status-controls { flex:1 1 100%; }
  #authorizations .authorization-record-status-controls select { flex:0 1 174px; }
  #authorizations .authorization-records-controls .authorization-workflow-tabs button { padding:0 8px; font-size:12px; }
  #authorizations .authorization-workflow-tabs small { font-size:11px; }
  #authorizations .authorization-applications-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #authorizations .authorization-applications-toolbar > label:first-of-type { grid-column:1/-1; }
}
@media (max-width:680px) {
  #authorizations > .authorization-topbar { margin-right:10px!important; margin-left:10px!important; }
}
@media (pointer:coarse) {
  #authorizations .authorization-top-actions > button,
  #authorizations .authorization-library-menu > summary,
  #authorizations .authorization-records-controls .authorization-workflow-tabs button,
  #authorizations .authorization-records-controls .authorization-filter-panel :is(input:not([type="hidden"]),select,button),
  #authorizations .authorization-applications-toolbar :is(input,select) { min-height:42px; height:42px; }
}


/* Two compact rows: actions first, complete statistic labels second. */
#railwayPassReports > .railway-pass-topbar {
  grid-template-columns: minmax(100px, 1fr) auto;
  align-items: center;
  min-height: 0 !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  padding: 10px 12px !important;
  gap: 8px 12px;
  border: 1px solid #dce4ef !important;
  border-radius: 9px !important;
  background: #fff !important;
  box-shadow: none !important;
}
#railwayPassReports > .railway-pass-topbar::before,
#railwayPassReports > .railway-pass-topbar::after { display: none; }
#railwayPassReports .railway-pass-topbar h1 {
  margin: 0;
  font-size: 20px !important;
  line-height: 1.3;
  white-space: nowrap;
}
#railwayPassReports .railway-pass-topbar .top-actions {
  grid-column: 2;
  display: flex;
  align-self: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}
#railwayPassReports .railway-pass-topbar .top-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  height: 34px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 22px;
  white-space: nowrap;
  box-shadow: none !important;
}
#railwayPassReports .railway-pass-topbar .railway-pass-stats {
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}
#railwayPassReports .railway-pass-stats button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  height: auto;
  min-height: 40px;
  padding: 6px 10px;
  overflow: visible;
  border: 1px solid #e1e7f0;
  border-radius: 6px;
  background: #f8fafc;
  box-shadow: none;
  transform: none;
}
#railwayPassReports .railway-pass-stats button::before { display: none; }
#railwayPassReports .railway-pass-stats button:hover { border-color: #b8c9eb; background: #f2f6ff; }
#railwayPassReports .railway-pass-stats button.is-active { border-color: #7899ef; background: #eef3ff; box-shadow: none; }
#railwayPassReports .railway-pass-stats button > span {
  flex: 0 0 auto;
  overflow: visible;
  color: #41536e;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: clip;
  white-space: nowrap;
}
#railwayPassReports .railway-pass-stats strong { line-height: 22px; white-space: nowrap; }
#railwayPassReports .railway-pass-stats strong b { font-size: 21px; font-variant-numeric: tabular-nums; }
#railwayPassReports .railway-pass-stats strong small { font-size: 11px; }
#railwayPassReports #railwayPassFilteredAmount { white-space: nowrap; }
#railwayPassReports .railway-pass-ledger-head > div:first-child { flex-wrap: wrap; white-space: normal; }

@media (max-width: 1100px) {
  #railwayPassReports .railway-pass-topbar .top-actions button { padding-right: 7px; padding-left: 7px; }
  #railwayPassReports .railway-pass-stats button { gap: 2px 5px; padding-right: 8px; padding-left: 8px; }
}
@media (max-width: 760px) {
  #railwayPassReports > .railway-pass-topbar { grid-template-columns: minmax(0, 1fr); }
  #railwayPassReports .railway-pass-topbar .top-actions { grid-column: 1; justify-content: flex-start; flex-wrap: wrap; }
  #railwayPassReports .railway-pass-topbar .railway-pass-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  #railwayPassReports .railway-pass-topbar .railway-pass-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep the ledger itself on a single line; secondary controls live in menus. */
#railwayPassReports .railway-pass-ledger-head {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 50px;
  height: auto;
  padding: 7px 12px;
  overflow: visible;
}
#railwayPassReports .railway-pass-ledger-head > .railway-pass-ledger-overview {
  display: flex;
  flex: none;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
}
#railwayPassReports .railway-pass-ledger-overview h2 { font-size: 15px; white-space: nowrap; }
#railwayPassReports .railway-pass-ledger-overview p { margin: 0; font-size: 12px; white-space: nowrap; }
#railwayPassReports #railwayPassAmountSummary { margin: 0; color: #718098; font-size: 12px; line-height: 1.6; }
#railwayPassReports .railway-pass-ledger-overview #railwayPassAmountSummary { padding-left: 4px; }
#railwayPassReports .railway-pass-ledger-head > .railway-pass-toolbar {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
}
#railwayPassReports .railway-pass-toolbar > #railwayPassKeyword {
  flex: 1 1 140px;
  width: auto;
  min-width: 70px;
  max-width: none;
}
#railwayPassReports .railway-pass-toolbar :is(input,select,button),
#railwayPassReports .railway-pass-ledger-menu > summary {
  min-height: 34px;
  height: 34px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 22px;
  box-sizing: border-box;
  white-space: nowrap;
}
#railwayPassReports .railway-pass-toolbar > button { flex: none; width: auto; }
#railwayPassReports .railway-pass-inline-filters { display: flex; gap: 6px; flex: none; }
#railwayPassReports .railway-pass-inline-filters select { width: 96px; min-width: 0; max-width: 100%; padding-right: 22px; }
#railwayPassReports .railway-pass-inline-filters #railwayPassStage { width: 116px; }
#railwayPassReports .railway-pass-ledger-menu { position: relative; flex: none; min-width: 0; }
#railwayPassReports .railway-pass-ledger-menu > summary {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
  border: 1px solid #dce4ef;
  color: #405575;
  background: #fff;
}
#railwayPassReports .railway-pass-ledger-menu > summary::-webkit-details-marker { display: none; }
#railwayPassReports .railway-pass-ledger-menu > summary::after { content: "▾"; font-size: 10px; }
#railwayPassReports .railway-pass-ledger-menu[open] > summary { border-color: #9bb4f5; color: #3158d8; background: #f2f6ff; }
#railwayPassReports .railway-pass-ledger-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 40;
  width: min(330px, calc(100vw - 48px));
  max-height: min(380px, calc(100dvh - 160px));
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px #253b6524;
  color: #66758d;
  font-size: 12px;
  white-space: normal;
}
#railwayPassReports .railway-pass-ledger-menu:not([open]) > .railway-pass-ledger-popover { display: none; }
#railwayPassReports #railwayPassAmountSlot:empty { display: none; }
#railwayPassReports .railway-pass-summary-group { display: grid; gap: 6px; }
#railwayPassReports #railwayPassLedgerStats { display: flex; gap: 5px; flex-wrap: wrap; }
#railwayPassReports #railwayPassLedgerStats button { flex: 1 0 auto; padding-right: 6px; padding-left: 6px; }
#railwayPassReports .railway-pass-ledger-popover .railway-pass-month-summary { display: grid; gap: 5px; padding: 0; border: 0; }
#railwayPassReports .railway-pass-month-summary strong { color: #3158d8; white-space: nowrap; }
#railwayPassReports .railway-pass-menu-actions { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid #e7edf5; padding-top: 10px; }
#railwayPassReports #railwayPassFilterSlot { width: 220px; }
#railwayPassReports #railwayPassFilterSlot .railway-pass-inline-filters { display: grid; width: 100%; }
#railwayPassReports #railwayPassFilterSlot select { width: 100%; }
#railwayPassReports .railway-pass-ledger-head.is-narrow { flex-wrap: wrap; }
#railwayPassReports .railway-pass-ledger-head.is-narrow > .railway-pass-toolbar { flex-basis: 100%; }
#railwayPassReports .railway-pass-ledger-head.is-narrow .railway-pass-ledger-menu { position: static; }
#railwayPassReports .railway-pass-ledger-head.is-narrow .railway-pass-ledger-popover {
  top: calc(100% + 2px);
  left: 8px;
  right: 8px;
  width: auto;
}
@media(max-width:480px) {
  #railwayPassReports .railway-pass-ledger-head { gap: 6px; padding: 7px 8px; }
  #railwayPassReports .railway-pass-ledger-overview h2 { font-size: 13px; }
  #railwayPassReports .railway-pass-ledger-overview { gap: 4px; }
  #railwayPassReports .railway-pass-toolbar > #railwayPassKeyword { min-width: 35px; }
  #railwayPassReports .railway-pass-toolbar { gap: 4px; }
  #railwayPassReports .railway-pass-toolbar :is(input,select,button),#railwayPassReports .railway-pass-ledger-menu > summary { padding-left: 6px; padding-right: 6px; }
}

/* Selected report: keep its identity, actions and status on the same row. */
#railwayPassSelectedFlow > .railway-pass-selection-header-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 2px 0;
  margin-bottom: 6px;
}
#railwayPassSelectedFlow .railway-pass-selection-header-scroll > .shared-pass-selection-title {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 640px;
  margin: 0;
  box-sizing: border-box;
}
#railwayPassSelectedFlow .railway-pass-selection-header-scroll strong { font-size: 14px; }
#railwayPassSelectedFlow .railway-pass-selection-header-scroll .shared-pass-project-name {
  flex: 1 1 240px;
  min-width: 0;
  max-width: none;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#railwayPassSelectedFlow .railway-pass-selection-header-scroll button {
  flex: none;
  width: auto;
  min-height: 30px;
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
#railwayPassSelectedFlow .railway-pass-selection-header-scroll em {
  flex: none;
  width: auto;
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
}

