:root {
  --zg-navy-950: #06142b;
  --zg-navy-900: #0b2d49;
  --zg-navy-800: #123b68;
  --zg-blue-700: #2357d7;
  --zg-blue-600: #2f6cff;
  --zg-blue-500: #4385ff;
  --zg-blue-100: #eaf1ff;
  --zg-blue-50: #f5f8ff;
  --zg-cyan-500: #19bdd8;
  --zg-cyan-100: #e8faff;
  --ink: #142b47;
  --muted: #64758b;
  --line: #d7e2ef;
  --canvas: #f3f7fc;
  --panel: #ffffff;
  --brand: var(--zg-navy-900);
  --brand-2: var(--zg-navy-800);
  --accent: var(--zg-blue-600);
  --accent-strong: var(--zg-blue-700);
  --accent-2: var(--zg-blue-100);
  --danger: #d94b55;
  --warning: #d38b27;
  --shadow: 0 12px 32px rgba(18, 59, 104, .09);
  --radius: 10px;
}

/* Purchase order price supplement keeps posted inbound accounting immutable. */
.drawer-backdrop.modal-layer {
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 16px;
  z-index: 120;
}

.purchase-price-dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(6, 20, 43, .22);
}
.purchase-price-dialog-head,
.purchase-price-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.purchase-price-dialog-head > div {
  display: grid;
  gap: 4px;
}
.purchase-price-dialog-head strong { font-size: 17px; }
.purchase-price-dialog-head span { color: var(--muted); font-size: 12px; }
.purchase-price-dialog-body {
  display: grid;
  flex: 1 1 auto;
  gap: 16px;
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
}
.purchase-price-scope-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 6%, var(--panel));
}
.purchase-price-scope-note > div { display: grid; gap: 4px; }
.purchase-price-scope-note strong { font-size: 13px; }
.purchase-price-scope-note span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.purchase-price-table { min-width: 820px; width: 100%; }
.purchase-price-table td strong,
.purchase-price-table td small { display: block; }
.purchase-price-table td small { margin-top: 3px; color: var(--muted); }
.purchase-price-table input {
  width: 130px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: right;
}
.purchase-price-table input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12);
  outline: 0;
}
.delivery-date-table { min-width: 930px; }
.delivery-date-table tbody tr { transition: background .16s ease; }
.delivery-date-table tbody tr.is-selected {
  background: color-mix(in srgb, var(--accent) 7%, #fff);
}
.delivery-date-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
  box-shadow: none;
}
.delivery-date-table input[type="date"] {
  width: 154px;
  text-align: left;
}
.purchase-price-table tfoot td { background: var(--canvas); font-weight: 600; }
.purchase-price-reason textarea { resize: vertical; }
.purchase-price-dialog-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

@media (max-width: 760px) {
  .purchase-price-dialog { width: calc(100vw - 16px); max-height: calc(100vh - 16px); }
  .purchase-price-dialog-head,
  .purchase-price-dialog-actions,
  .purchase-price-dialog-body { padding-left: 14px; padding-right: 14px; }
}

/* Customer and supplier master data */
.party-list-hero,
.supplier-account-hero {
  align-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(74,169,255,.23), transparent 31%),
    linear-gradient(135deg,#071b31 0%,#0c3558 55%,#12637b 100%);
  border-radius: 18px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 170px;
  overflow: hidden;
  padding: 28px 32px;
}
.party-list-hero.supplier {
  background:
    radial-gradient(circle at 86% 15%,rgba(87,217,185,.22),transparent 32%),
    linear-gradient(135deg,#071d2b,#0e3d50 58%,#137766);
}
.party-list-hero > div:first-child,
.supplier-account-hero > div:first-child { max-width: 720px; }
.party-list-hero > div:last-child,
.supplier-account-hero > div:last-child { display: flex; gap: 10px; }
.party-list-hero > div > span,
.supplier-account-hero > div > span {
  color: #86d9ef;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.party-list-hero h2,
.supplier-account-hero h2 { font-size: 29px; margin: 7px 0 8px; }
.party-list-hero p,
.supplier-account-hero p { color: rgba(255,255,255,.76); line-height: 1.75; margin: 0; }
.party-list-hero .btn:not(.btn-primary),
.supplier-account-hero .btn:not(.btn-primary) {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.24);
  color: #fff;
}
.party-list-kpis,
.supplier-account-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin-bottom: 14px;
}
.party-list-kpis article,
.supplier-account-kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 18px 19px;
  position: relative;
}
.party-list-kpis article::before,
.supplier-account-kpis article::before {
  background: #6f8ca3;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.party-list-kpis .priority::before { background: #f2a525; }
.party-list-kpis .finance::before { background: #0d9b75; }
.party-list-kpis .portal::before,
.supplier-account-kpis .bound::before { background: #1976d2; }
.party-list-kpis .contact::before,
.supplier-account-kpis .active::before { background: #14a47e; }
.supplier-account-kpis .unbound::before { background: #e19a31; }
.party-list-kpis span,.party-list-kpis small,
.supplier-account-kpis span,.supplier-account-kpis small {
  color: var(--muted);
  display: block;
}
.party-list-kpis span,.supplier-account-kpis span { font-size: 12px; font-weight: 700; }
.party-list-kpis strong,.supplier-account-kpis strong { display: block; font-size: 24px; margin: 7px 0 4px; }
.party-list-kpis small,.supplier-account-kpis small { font-size: 11px; }
.party-list-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.2fr 2fr 1fr 1.35fr auto auto;
  margin-bottom: 14px;
  padding: 17px 18px;
}
.party-list-filter.supplier { grid-template-columns: 1.15fr 1.8fr .9fr 1.2fr 1fr auto auto; }
.party-list-filter > div strong,.party-list-filter > div span { display: block; }
.party-list-filter > div span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.party-list-filter label > span,
.supplier-account-filter label > span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.party-list-filter input,.party-list-filter select,
.supplier-account-filter input,.supplier-account-filter select { height: 40px; min-width: 0; width: 100%; }
.party-master-table table { min-width: 1380px; }
.party-master-table td { vertical-align: middle; }
.party-master-table tr[data-party-row] { cursor: pointer; }
.party-master-table tr[data-party-row]:hover { background: #f6faff; }
.supplier-account-status {
  background: #eef1f4;
  border: 1px solid #dce2e8;
  border-radius: 999px;
  color: #65717b;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 9px;
  white-space: nowrap;
}
.supplier-account-status.active { background: #e7f7f1; border-color: #bee7d9; color: #08785e; }
.supplier-account-status.disabled { background: #fff0ed; border-color: #f0cec7; color: #a34336; }
.supplier-account-status.unbound { background: #f3f4f6; color: #75808b; }

/* Supplier account administration */
.supplier-account-hero {
  background:
    radial-gradient(circle at 86% 15%,rgba(77,173,255,.22),transparent 32%),
    linear-gradient(135deg,#071a30,#123855 58%,#0c6171);
}
.supplier-account-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 2fr 1fr auto;
  margin-bottom: 14px;
  padding: 17px 18px;
}
.supplier-account-list table { min-width: 1320px; }
.supplier-account-backdrop { padding: 18px; }
.supplier-account-dialog { width: min(760px,calc(100vw - 30px)); }
.supplier-account-security {
  align-items: flex-start;
  background: #edf6ff;
  border: 1px solid #d0e4f7;
  border-radius: 12px;
  color: #1765a0;
  display: flex;
  gap: 11px;
  margin-bottom: 18px;
  padding: 14px 15px;
}
.supplier-account-security strong,.supplier-account-security span { display: block; }
.supplier-account-security span { color: #557387; font-size: 12px; line-height: 1.6; margin-top: 3px; }
.supplier-account-form-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.supplier-account-form-grid label > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}
.supplier-account-form-grid label.wide { grid-column: 1 / -1; }
.supplier-account-form-grid input,.supplier-account-form-grid select { height: 42px; width: 100%; }
.supplier-account-form-grid small { color: var(--muted); display: block; font-size: 11px; margin-top: 6px; }
.supplier-account-toggle {
  align-items: center;
  background: #f7fafc;
  border: 1px solid #e1e7ed;
  border-radius: 10px;
  display: flex !important;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px 14px;
}
.supplier-account-toggle input { height: 18px; width: 18px; }
.supplier-account-toggle > span { margin: 0 !important; }
.supplier-account-toggle strong,.supplier-account-toggle em { display: block; }
.supplier-account-toggle em { color: var(--muted); font-size: 11px; font-style: normal; margin-top: 3px; }

/* Login mode selector */
.login-mode-tabs {
  background: #eef3f7;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2,minmax(0,1fr));
  margin-bottom: 18px;
  padding: 3px;
}
.login-mode-tabs button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #67778a;
  cursor: pointer;
  font-weight: 700;
  min-height: 38px;
}
.login-mode-tabs button.active {
  background: #fff;
  box-shadow: 0 3px 9px rgba(11,31,51,.1);
  color: #0b4f80;
}
.login-mode-badge {
  align-items: center;
  color: #267399;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  gap: 6px;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

/* Supplier portal */
.supplier-portal-shell {
  background: #f2f6f8;
  color: var(--ink);
  display: grid;
  grid-template-columns: 250px minmax(0,1fr);
  min-height: 100vh;
}
.supplier-portal-sidebar {
  background: linear-gradient(180deg,#071c2d,#0b2b3b 62%,#0c3d47);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px 15px 16px;
}
.supplier-portal-brand { align-items: center; display: flex; gap: 11px; padding: 0 7px 20px; }
.supplier-portal-logo {
  align-items: center;
  background: #fff;
  border-radius: 9px;
  display: flex;
  flex: 0 0 42px;
  height: 42px;
  justify-content: center;
  overflow: hidden;
}
.supplier-portal-logo img { height: 100%; object-fit: contain; width: 100%; }
.supplier-portal-brand strong,.supplier-portal-brand span { display: block; }
.supplier-portal-brand strong { font-size: 15px; }
.supplier-portal-brand span { color: #7fc9d1; font-size: 8px; letter-spacing: .14em; margin-top: 4px; }
.supplier-portal-company {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  margin-bottom: 18px;
  padding: 14px;
}
.supplier-portal-company span,.supplier-portal-company strong,.supplier-portal-company em { display: block; }
.supplier-portal-company span { color: #83b4bd; font-size: 10px; }
.supplier-portal-company strong { font-size: 13px; line-height: 1.5; margin: 5px 0; }
.supplier-portal-company em { color: #a7c7cc; font-size: 10px; font-style: normal; }
.supplier-portal-sidebar nav { display: grid; gap: 5px; }
.supplier-portal-sidebar nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #a9c1c7;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 11px;
  min-height: 45px;
  padding: 0 13px;
  text-align: left;
}
.supplier-portal-sidebar nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.supplier-portal-sidebar nav button.active {
  background: linear-gradient(90deg,#0a74a5,#0d8e93);
  box-shadow: 0 8px 18px rgba(3,112,135,.25);
  color: #fff;
}
.supplier-portal-side-foot {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: auto;
  padding: 15px 8px 0;
}
.supplier-portal-side-foot span,.supplier-portal-side-foot strong { display: block; }
.supplier-portal-side-foot span { color: #7198a1; font-size: 9px; }
.supplier-portal-side-foot strong { color: #aac7cc; font-size: 10px; line-height: 1.5; margin-top: 4px; }
.supplier-portal-main { min-width: 0; }
.supplier-portal-topbar {
  align-items: center;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #dce4e8;
  display: flex;
  height: 76px;
  justify-content: space-between;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 30;
}
#supplier-portal-breadcrumb { color: var(--muted); display: block; font-size: 10px; }
.supplier-portal-topbar h1 { font-size: 19px; margin: 4px 0 0; }
.supplier-portal-account { align-items: center; display: flex; gap: 9px; }
.supplier-portal-account > div { margin-right: 5px; text-align: right; }
.supplier-portal-account strong,.supplier-portal-account span { display: block; }
.supplier-portal-account strong { font-size: 12px; }
.supplier-portal-account span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.supplier-portal-content { margin: 0 auto; max-width: 1660px; padding: 22px 24px 34px; }
.supplier-portal-loading {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 420px;
}
.supplier-portal-hero,
.supplier-portal-page-intro {
  align-items: center;
  background:
    radial-gradient(circle at 84% 15%,rgba(87,215,206,.22),transparent 31%),
    linear-gradient(135deg,#071e31,#0b4654 62%,#0e796e);
  border-radius: 18px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 172px;
  overflow: hidden;
  padding: 28px 32px;
}
.supplier-portal-hero > div:first-child,
.supplier-portal-page-intro > div:first-child { max-width: 760px; }
.supplier-portal-hero > div:first-child > span,
.supplier-portal-page-intro > div:first-child > span {
  color: #83e0d3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}
.supplier-portal-hero h2,.supplier-portal-page-intro h2 { font-size: 27px; margin: 7px 0 9px; }
.supplier-portal-hero p,.supplier-portal-page-intro p { color: rgba(255,255,255,.75); line-height: 1.7; margin: 0; }
.supplier-portal-hero > div:last-child,
.supplier-portal-page-intro > div:last-child {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  min-width: 235px;
  padding: 18px 20px;
  text-align: right;
}
.supplier-portal-hero > div:last-child span,.supplier-portal-hero > div:last-child strong,.supplier-portal-hero > div:last-child small,
.supplier-portal-page-intro > div:last-child span,.supplier-portal-page-intro > div:last-child strong { display: block; }
.supplier-portal-hero > div:last-child span,.supplier-portal-page-intro > div:last-child span { color: #a7d8d4; font-size: 10px; }
.supplier-portal-hero > div:last-child strong,.supplier-portal-page-intro > div:last-child strong { font-size: 29px; margin: 5px 0; }
.supplier-portal-hero > div:last-child small { color: #b6d6d4; font-size: 9px; }
.supplier-portal-page-intro.reconciliation {
  background: radial-gradient(circle at 84% 15%,rgba(96,170,255,.22),transparent 31%),linear-gradient(135deg,#071e37,#123b63 62%,#155e78);
}
.supplier-portal-page-intro.delivery {
  background: radial-gradient(circle at 84% 15%,rgba(250,193,85,.2),transparent 31%),linear-gradient(135deg,#151d34,#253957 62%,#4c5a59);
}
.supplier-portal-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin-bottom: 14px;
}
.supplier-portal-kpis article,
.supplier-portal-kpis button {
  background: #fff;
  border: 1px solid #dbe4e8;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(12,39,50,.06);
  overflow: hidden;
  padding: 17px 18px;
  position: relative;
  text-align: left;
}
.supplier-portal-kpis button { cursor: pointer; }
.supplier-portal-kpis button.active { border-color: #3188ab; box-shadow: 0 0 0 2px rgba(49,136,171,.12); }
.supplier-portal-kpis article::before,.supplier-portal-kpis button::before {
  background: #6c8795;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.supplier-portal-kpis .pending::before,[data-fulfillment-scope="unshipped"]::before { background: #287fb3 !important; }
.supplier-portal-kpis .partial::before,[data-fulfillment-scope="partial"]::before { background: #e7a132 !important; }
.supplier-portal-kpis .overdue::before,[data-fulfillment-scope="overdue"]::before { background: #dc5d55 !important; }
.supplier-portal-kpis .statement::before { background: #705fc4 !important; }
.supplier-portal-kpis .done::before,[data-fulfillment-scope="shipped"]::before { background: #12a17c !important; }
.supplier-portal-kpis span,.supplier-portal-kpis small { color: var(--muted); display: block; }
.supplier-portal-kpis span { font-size: 11px; font-weight: 700; }
.supplier-portal-kpis strong { display: block; font-size: 25px; margin: 6px 0 3px; }
.supplier-portal-kpis small { font-size: 10px; }
.supplier-portal-overview-grid,.supplier-portal-delivery-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0,1.55fr) minmax(340px,.75fr);
}
.supplier-portal-card { overflow: hidden; }
.supplier-portal-section-head {
  align-items: center;
  border-bottom: 1px solid #e2e9ed;
  display: flex;
  justify-content: space-between;
  min-height: 66px;
  padding: 13px 17px;
}
.supplier-portal-section-head strong,.supplier-portal-section-head span { display: block; }
.supplier-portal-section-head strong { font-size: 14px; }
.supplier-portal-section-head span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.supplier-portal-compact-table { min-width: 760px; }
.supplier-portal-statement-card { overflow: hidden; }
.supplier-portal-statement-list { display: grid; padding: 7px 14px 14px; }
.supplier-portal-statement-list > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e6ecef;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  padding: 13px 3px;
  text-align: left;
}
.supplier-portal-statement-list > button:hover { background: #f7fafb; }
.supplier-portal-statement-list > button > span:last-child { text-align: right; }
.supplier-portal-statement-list strong,.supplier-portal-statement-list em { display: block; }
.supplier-portal-statement-list em { color: var(--muted); font-size: 10px; font-style: normal; margin-top: 5px; }
.supplier-portal-empty-compact {
  align-items: center;
  color: #7e929b;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 190px;
  text-align: center;
}
.supplier-portal-empty-compact span { font-size: 10px; }
.supplier-portal-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 2.2fr auto;
  margin-bottom: 14px;
  padding: 16px 18px;
}
.supplier-portal-filter.statement-filter,.supplier-portal-filter.delivery-filter { grid-template-columns: minmax(220px,.35fr) auto 1fr; }
.supplier-portal-filter label > span { color: var(--muted); display: block; font-size: 11px; font-weight: 700; margin-bottom: 6px; }
.supplier-portal-filter input,.supplier-portal-filter select { height: 40px; width: 100%; }
.supplier-portal-table table { min-width: 1500px; }
.supplier-portal-table.statement-table table { min-width: 1450px; }
.supplier-portal-status,.supplier-delivery-result {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
}
.supplier-portal-status.pending { background: #e8f2fb; border-color: #c8dfef; color: #176b9c; }
.supplier-portal-status.partial { background: #fff3df; border-color: #efdbb4; color: #94620b; }
.supplier-portal-status.done,.supplier-delivery-result.ontime { background: #e6f7f1; border-color: #c0e6d8; color: #08785e; }
.supplier-portal-status.overdue,.supplier-delivery-result.late { background: #fff0ed; border-color: #efcbc5; color: #aa4038; }
.supplier-delivery-result.progress { background: #eef2f5; border-color: #dce3e8; color: #647681; }
.supplier-portal-progress { align-items: center; display: flex; gap: 7px; min-width: 110px; }
.supplier-portal-progress > span { background: #e8eef1; border-radius: 999px; display: block; height: 6px; overflow: hidden; width: 74px; }
.supplier-portal-progress i { background: linear-gradient(90deg,#1688aa,#13a47d); display: block; height: 100%; }
.supplier-portal-progress em { color: var(--muted); font-size: 9px; font-style: normal; }
.supplier-portal-statement-drawer { width: min(1120px,100vw); }
.supplier-portal-statement-note { background: #f6f9fa; border: 1px solid #e2e9ed; border-radius: 10px; line-height: 1.7; margin: 0; padding: 13px 14px; white-space: pre-wrap; }
.supplier-portal-feedback { background: #fff7e7; border: 1px solid #eddcb7; border-radius: 10px; margin-top: 10px; padding: 12px 14px; }
.supplier-portal-feedback span,.supplier-portal-feedback strong,.supplier-portal-feedback em { display: block; }
.supplier-portal-feedback span { color: #9b6b14; font-size: 10px; font-weight: 750; }
.supplier-portal-feedback strong { margin: 5px 0; }
.supplier-portal-feedback em { color: var(--muted); font-size: 9px; font-style: normal; }
.supplier-portal-confirm-section { background: #f5fafb; }
.supplier-portal-confirm-section p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.supplier-portal-confirm-section textarea { min-height: 92px; resize: vertical; width: 100%; }
.supplier-portal-confirm-section > div { display: flex; gap: 9px; justify-content: flex-end; margin-top: 10px; }
.supplier-portal-evaluation-history { overflow: hidden; }
.supplier-portal-evaluation-history article { border-bottom: 1px solid #e4eaed; padding: 15px 17px; }
.supplier-portal-evaluation-history article > div { align-items: center; display: flex; justify-content: space-between; }
.supplier-portal-evaluation-history article > div + div { margin-top: 12px; }
.supplier-portal-evaluation-history article span,.supplier-portal-evaluation-history article em { color: var(--muted); font-size: 10px; font-style: normal; }
.supplier-portal-evaluation-history article p { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 10px 0 0; }

@media (max-width: 1180px) {
  .procurement-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sales-purchase-filter { grid-template-columns: repeat(3,minmax(150px,1fr)); }
  .party-list-filter,.party-list-filter.supplier { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .party-list-filter > div { grid-column: 1 / -1; }
  .supplier-portal-overview-grid,.supplier-portal-delivery-grid { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .party-list-hero,.supplier-account-hero,.supplier-portal-hero,.supplier-portal-page-intro { align-items: flex-start; flex-direction: column; gap: 18px; }
  .party-list-hero > div:last-child,.supplier-account-hero > div:last-child { width: 100%; }
  .party-list-hero .btn,.supplier-account-hero .btn { flex: 1; }
  .party-list-kpis,.supplier-account-kpis,.supplier-portal-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .supplier-portal-shell { display: block; }
  .supplier-portal-sidebar { min-height: auto; padding: 12px; }
  .supplier-portal-brand,.supplier-portal-company,.supplier-portal-side-foot { display: none; }
  .supplier-portal-sidebar nav { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .supplier-portal-sidebar nav button { flex-direction: column; font-size: 10px; gap: 3px; justify-content: center; padding: 6px; }
  .supplier-portal-topbar { height: 68px; padding: 0 14px; }
  .supplier-portal-account > div,.supplier-portal-account .btn { display: none; }
  .supplier-portal-content { padding: 14px; }
  .supplier-portal-filter,.supplier-portal-filter.statement-filter,.supplier-portal-filter.delivery-filter { grid-template-columns: 1fr; }
  .supplier-portal-hero > div:last-child,.supplier-portal-page-intro > div:last-child { text-align: left; width: 100%; }
}
@media (max-width: 620px) {
  .party-list-kpis,.supplier-account-kpis,.supplier-portal-kpis { grid-template-columns: 1fr; }
  .party-list-filter,.party-list-filter.supplier,.supplier-account-filter,.supplier-account-form-grid { grid-template-columns: 1fr; }
  .party-list-filter > div,.supplier-account-form-grid label.wide,.supplier-account-toggle { grid-column: auto; }
  .party-list-hero,.supplier-account-hero,.supplier-portal-hero,.supplier-portal-page-intro { padding: 22px 19px; }
  .party-list-hero > div:last-child,.supplier-account-hero > div:last-child { flex-direction: column; }
  .supplier-account-dialog { width: 100%; }
  .supplier-portal-confirm-section > div { flex-direction: column; }
  .supplier-portal-confirm-section .btn { width: 100%; }
}

.partial-query-busy {
  opacity: .56;
  pointer-events: none;
  transition: opacity .14s ease;
}

/* Website inquiry inbox */
.website-inquiry-hero {
  align-items: center;
  background:
    radial-gradient(circle at 84% 18%, rgba(53, 177, 255, .25), transparent 32%),
    linear-gradient(135deg, #071b31 0%, #0b3557 54%, #0b6d82 100%);
  border-radius: 18px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 176px;
  overflow: hidden;
  padding: 30px 34px;
  position: relative;
}
.website-inquiry-hero > div:first-child { max-width: 720px; position: relative; z-index: 1; }
.website-inquiry-hero > div:first-child > span {
  color: #7edbf1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.website-inquiry-hero h2 { font-size: 28px; margin: 8px 0 10px; }
.website-inquiry-hero p { color: rgba(255,255,255,.76); line-height: 1.75; margin: 0; }
.website-inquiry-source-summary {
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  display: grid;
  flex: 0 0 260px;
  grid-template-columns: repeat(2,minmax(0,1fr));
  overflow: hidden;
}
.website-inquiry-source-summary > div { padding: 20px 18px; text-align: center; }
.website-inquiry-source-summary > div + div { border-left: 1px solid rgba(255,255,255,.16); }
.website-inquiry-source-summary strong { display: block; font-size: 27px; }
.website-inquiry-source-summary span { color: rgba(255,255,255,.7); display: block; font-size: 12px; margin-top: 5px; }
.website-inquiry-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.15fr 1.15fr 1.15fr 1.15fr 1.4fr 1.7fr auto auto;
  margin-bottom: 14px;
  padding: 18px;
}
.website-inquiry-filter-copy { grid-column: 1 / -1; }
.website-inquiry-filter-copy strong,
.website-inquiry-filter-copy span { display: block; }
.website-inquiry-filter-copy span { color: var(--muted); font-size: 12px; margin-top: 4px; }
.website-inquiry-filter label { min-width: 0; }
.website-inquiry-filter label > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 6px;
}
.website-inquiry-filter input,
.website-inquiry-filter select { height: 40px; min-width: 0; width: 100%; }
.website-inquiry-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin-bottom: 14px;
}
.website-inquiry-kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 18px 19px;
  position: relative;
}
.website-inquiry-kpis article::before {
  background: #7892a6;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.website-inquiry-kpis article.new::before { background: #0b7de5; }
.website-inquiry-kpis article.following::before { background: #f5a623; }
.website-inquiry-kpis article.quoted::before { background: #16a77c; }
.website-inquiry-kpis span,
.website-inquiry-kpis small { color: var(--muted); display: block; }
.website-inquiry-kpis span { font-size: 12px; font-weight: 700; }
.website-inquiry-kpis strong { display: block; font-size: 26px; margin: 7px 0 4px; }
.website-inquiry-kpis small { font-size: 11px; }
.website-inquiry-list table { min-width: 1510px; }
.website-inquiry-list td { max-width: 220px; vertical-align: middle; }
.website-inquiry-list td > small { color: var(--muted); display: block; margin-top: 4px; }
.inquiry-contact-cell a { color: #1769a9; font-size: 12px; text-decoration: none; }
.inquiry-contact-cell a:hover { text-decoration: underline; }
.inquiry-source {
  background: #e6f3ff;
  border: 1px solid #c6e1f7;
  border-radius: 999px;
  color: #1769a9;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 9px;
  white-space: nowrap;
}
.inquiry-source.en { background: #e8f8f4; border-color: #c4e9df; color: #08785e; }
.inquiry-status {
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 9px;
  white-space: nowrap;
}
.inquiry-status.new { background: #e7f2ff; border-color: #c8def8; color: #0b67b4; }
.inquiry-status.waiting { background: #f3f0ff; border-color: #ddd4ff; color: #6447b9; }
.inquiry-status.following { background: #fff4dd; border-color: #f4dfb4; color: #93610a; }
.inquiry-status.quoted { background: #e9f7ee; border-color: #cbe9d5; color: #247141; }
.inquiry-status.done { background: #e4f7f1; border-color: #bee8dc; color: #08785e; }
.inquiry-status.closed { background: #f0f2f4; border-color: #dce1e5; color: #65717b; }
.inquiry-duplicate {
  background: #fff0ef;
  border: 1px solid #f1cac7;
  border-radius: 999px;
  color: #aa3d36;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  white-space: nowrap;
}
.website-inquiry-drawer { width: min(760px,100vw); }
.website-inquiry-drawer .detail-section h3 { align-items: center; display: flex; gap: 8px; }
.inquiry-message { line-height: 1.8; white-space: pre-wrap; }
.website-inquiry-dialog { width: min(720px,calc(100vw - 30px)); }
.website-inquiry-editor-summary {
  background: #f5f9fc;
  border: 1px solid #dfeaf1;
  border-radius: 12px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-bottom: 18px;
}
.website-inquiry-editor-summary > div { min-width: 0; padding: 13px 15px; }
.website-inquiry-editor-summary > div + div { border-left: 1px solid #dfeaf1; }
.website-inquiry-editor-summary span,
.website-inquiry-editor-summary strong { display: block; }
.website-inquiry-editor-summary span { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.website-inquiry-editor-summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.website-inquiry-editor-grid .wide { grid-column: 1 / -1; }
.website-inquiry-editor-grid textarea { min-height: 120px; }
.website-inquiry-list-head { gap: 16px; }
.website-inquiry-batch-actions { align-items: center; display: flex; gap: 10px; }
.website-inquiry-batch-actions > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.inquiry-select-column { width: 46px; min-width: 46px; text-align: center !important; }
.inquiry-select-column input { accent-color: var(--accent); cursor: pointer; height: 16px; width: 16px; }
.website-inquiry-list tbody tr.selected { background: #edf6ff; box-shadow: inset 3px 0 #1176df; }
.website-inquiry-list tbody tr.selected:hover { background: #e4f1ff; }

/* System users */
.system-users-hero {
  align-items: center;
  background:
    radial-gradient(circle at 84% 18%, rgba(89, 197, 204, .22), transparent 31%),
    linear-gradient(135deg, #102d3b 0%, #1b4d57 58%, #176f70 100%);
  border-radius: 16px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  min-height: 166px;
  overflow: hidden;
  padding: 28px 32px;
  position: relative;
}
.system-users-hero > div:first-child { max-width: 720px; position: relative; z-index: 1; }
.system-users-hero > div:first-child > span {
  color: #81d8d2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
}
.system-users-hero h2 { font-size: 27px; margin: 8px 0 8px; }
.system-users-hero p { color: rgba(255,255,255,.72); line-height: 1.75; margin: 0; }
.system-users-hero-rule {
  align-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  display: flex;
  flex: 0 0 260px;
  gap: 13px;
  padding: 18px;
  position: relative;
  z-index: 1;
}
.system-users-hero-rule svg { color: #78d5ce; flex: 0 0 auto; }
.system-users-hero-rule strong,
.system-users-hero-rule span { display: block; }
.system-users-hero-rule strong { font-size: 13px; }
.system-users-hero-rule span { color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.6; margin-top: 4px; }
.system-users-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin-bottom: 14px;
}
.system-users-kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 17px 19px;
  position: relative;
}
.system-users-kpis article:before {
  background: #768d9e;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.system-users-kpis article.active:before { background: #15957d; }
.system-users-kpis article.admin:before { background: #1676dc; }
.system-users-kpis article.waiting:before { background: #d99a32; }
.system-users-kpis span,
.system-users-kpis small { color: var(--muted); display: block; }
.system-users-kpis span { font-size: 12px; font-weight: 700; }
.system-users-kpis strong { display: block; font-size: 25px; margin: 6px 0 3px; }
.system-users-kpis small { font-size: 11px; }
.system-users-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px,1.5fr) minmax(150px,.75fr) minmax(150px,.75fr) auto auto;
  margin-bottom: 14px;
  padding: 17px 18px;
}
.system-users-filter > div { grid-column: 1 / -1; }
.system-users-filter > div strong,
.system-users-filter > div span { display: block; }
.system-users-filter > div span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.system-users-filter label { min-width: 0; }
.system-users-filter label > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 6px;
}
.system-users-filter input,
.system-users-filter select { height: 40px; min-width: 0; width: 100%; }
.system-users-section-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 68px;
  padding: 14px 18px;
}
.system-users-section-head strong,
.system-users-section-head span { display: block; }
.system-users-section-head span { color: var(--muted); font-size: 11px; margin-top: 3px; }
.system-users-list table { min-width: 1120px; }
.system-users-list td { vertical-align: middle; }
.system-users-list td > small { color: var(--muted); display: block; font-size: 10px; margin-top: 3px; }
.system-users-list tr.current-user-row { background: #f4f9ff; }
.system-user-identity { align-items: center; display: flex; gap: 10px; min-width: 150px; }
.system-user-identity strong,
.system-user-identity small { display: block; }
.system-user-identity small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.system-user-avatar {
  background: linear-gradient(135deg,#d9eef0,#c8e4e5);
  border: 1px solid #bddcdf;
  border-radius: 10px;
  color: #187570;
  display: grid;
  flex: 0 0 38px;
  font-size: 14px;
  font-weight: 800;
  height: 38px;
  place-items: center;
  width: 38px;
}
.system-user-avatar.large { border-radius: 14px; flex-basis: 54px; font-size: 20px; height: 54px; width: 54px; }
.system-user-role {
  background: #eaf2fb;
  border: 1px solid #d3e2f3;
  border-radius: 999px;
  color: #23659c;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 9px;
  white-space: nowrap;
}
.system-user-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  gap: 6px;
  padding: 4px 9px;
  white-space: nowrap;
}
.system-user-status i { border-radius: 50%; height: 6px; width: 6px; }
.system-user-status.active { background: #e6f7f1; color: #16765f; }
.system-user-status.active i { background: #19a17f; box-shadow: 0 0 0 3px rgba(25,161,127,.12); }
.system-user-status.inactive { background: #f1f3f5; color: #697680; }
.system-user-status.inactive i { background: #8b969e; }
.system-user-detail-drawer { width: min(700px,100vw); }
.system-user-detail-body { background: #f6f8fa; }
.system-user-detail-hero {
  align-items: center;
  background: #fff;
  border: 1px solid #dfe8eb;
  border-radius: 12px;
  display: grid;
  gap: 13px;
  grid-template-columns: auto minmax(0,1fr) auto;
  margin-bottom: 14px;
  padding: 18px;
}
.system-user-detail-hero h3 { color: #294f5a; font-size: 18px; margin: 0; }
.system-user-detail-hero p { color: var(--muted); margin: 3px 0 0; }
.system-user-security-note {
  align-items: center;
  background: #edf8f6;
  border: 1px solid #cfe7e3;
  border-radius: 10px;
  color: #18766d;
  display: flex;
  gap: 11px;
  margin-top: 14px;
  padding: 14px 16px;
}
.system-user-security-note strong,
.system-user-security-note span { display: block; }
.system-user-security-note span { color: #708d8a; font-size: 11px; margin-top: 2px; }
.system-user-form-drawer { width: min(760px,100vw); }
.system-user-form-drawer .drawer-body { background: #f6f9fa; }
.system-user-bind-note {
  align-items: center;
  background: linear-gradient(135deg,#eaf7f5,#f5fbfa);
  border: 1px solid #cde7e2;
  border-radius: 12px;
  color: #177268;
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
}
.system-user-bind-note svg { flex: 0 0 auto; }
.system-user-bind-note strong,
.system-user-bind-note span { display: block; }
.system-user-bind-note span { color: #6b8783; font-size: 11px; margin-top: 3px; }
.system-user-form-drawer .form-grid { align-items: end; grid-template-columns: repeat(2,minmax(0,1fr)); }
.system-user-form-drawer .field:first-child { grid-column: 1 / -1; }

/* Human resources */
.hr-page-hero {
  align-items: center;
  background:
    radial-gradient(circle at 82% 12%,rgba(90,193,186,.25),transparent 32%),
    linear-gradient(135deg,#102c3b 0%,#17495a 56%,#1b726e 100%);
  border-radius: 17px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  min-height: 158px;
  overflow: hidden;
  padding: 28px 32px;
  position: relative;
}
.hr-page-hero > div { max-width: 760px; position: relative; z-index: 1; }
.hr-page-hero > div > span {
  color: #80ddd2;
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
}
.hr-page-hero h2 { font-size: 27px; margin: 8px 0; }
.hr-page-hero p { color: rgba(255,255,255,.72); line-height: 1.75; margin: 0; }
.hr-page-hero > .btn {
  background: rgba(255,255,255,.96);
  border-color: rgba(255,255,255,.9);
  color: #165c60;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.hr-page-hero > .btn.btn-primary { background: #fff; color: #126566; }
.hr-hero-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  position: relative;
  z-index: 1;
}
.hr-hero-actions .btn {
  background: rgba(255,255,255,.96);
  border-color: rgba(255,255,255,.9);
  color: #195f76;
}
.hr-hero-actions .btn-primary { background: #fff; color: #126566; }
.hr-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4,minmax(0,1fr));
  margin-bottom: 14px;
}
.hr-kpi-grid article,
.income-period-grid article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 17px 19px;
  position: relative;
}
.hr-kpi-grid article::before {
  background: #7890a2;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.hr-kpi-grid article.active::before { background: #159779; }
.hr-kpi-grid article.probation::before { background: #d79b31; }
.hr-kpi-grid article.contract::before { background: #287ed1; }
.hr-kpi-grid span,
.hr-kpi-grid small,
.income-period-grid span,
.income-period-grid small { color: var(--muted); display: block; }
.hr-kpi-grid span,
.income-period-grid span { font-size: 12px; font-weight: 720; }
.hr-kpi-grid strong {
  display: block;
  font-size: clamp(19px,2vw,26px);
  margin: 6px 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-kpi-grid small,
.income-period-grid small { font-size: 11px; }
.hr-filter-panel {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px,1.5fr) minmax(160px,.75fr) minmax(160px,.75fr) auto auto;
  margin-bottom: 14px;
  padding: 17px 18px;
}
.hr-filter-copy { grid-column: 1 / -1; }
.hr-filter-copy strong,
.hr-filter-copy span { display: block; }
.hr-filter-copy span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.hr-filter-panel label { min-width: 0; }
.hr-filter-panel label > span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-bottom: 6px;
}
.hr-filter-panel input,
.hr-filter-panel select { height: 40px; min-width: 0; width: 100%; }
.employee-table tbody tr,
.salary-list-table tbody tr { cursor: pointer; }
.employee-table td > small,
.bonus-list-panel td > small { color: var(--muted); display: block; font-size: 10px; margin-top: 3px; }
.salary-kpis article strong { font-size: clamp(17px,1.7vw,23px); }
.salary-overview-filter { grid-template-columns: minmax(280px,1.5fr) minmax(160px,.75fr) minmax(160px,.75fr) auto auto; }
.bonus-form-hero { min-height: 146px; }
.bonus-form-page .form-card { margin-bottom: 14px; }
.bonus-money-grid { align-items: end; }
.bonus-net-cell { color: #14745e; }
.bonus-list-panel table { min-width: 1420px; }
.bonus-detail-drawer { width: min(760px,100vw); }
.income-year-filter {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  display: block;
  flex: 0 0 170px;
  padding: 12px 14px;
  position: relative;
  z-index: 1;
}
.income-year-filter span {
  color: rgba(255,255,255,.7);
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
.income-year-filter select {
  background: #fff;
  border: 0;
  color: #194e59;
  height: 36px;
  width: 100%;
}
.income-period-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-bottom: 14px;
}
.income-period-grid article::before {
  background: #1a8d7d;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.income-period-grid article.annual::before { background: #247bc7; }
.income-period-grid strong { display: block; font-size: 25px; margin: 6px 0 4px; }
.income-history-panel table { min-width: 1120px; }
.income-history-panel tbody tr[data-income-type="工资"] { cursor: pointer; }
.income-detail-action { color: #176f78; }
.my-income-salary-detail-drawer { width: min(940px,98vw) !important; }
.income-detail-notice {
  align-items: center;
  background: #edf7f7;
  border: 1px solid #d0e8e7;
  border-radius: 12px;
  color: #236a70;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
}
.income-detail-notice svg { flex: 0 0 auto; }
.income-detail-notice strong,
.income-detail-notice span { display: block; }
.income-detail-notice strong { font-size: 13px; }
.income-detail-notice span { color: #617a83; font-size: 11px; margin-top: 3px; }
.income-type {
  background: #e8f2ff;
  border: 1px solid #d2e3f7;
  border-radius: 999px;
  color: #236ca7;
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  padding: 4px 9px;
}
.income-type.bonus { background: #ebf8f2; border-color: #cfeadb; color: #1c7756; }
.income-net { color: #15745d; }
.income-unlinked {
  margin: 0 auto;
  max-width: 720px;
  padding: 48px 34px;
  text-align: center;
}
.income-unlinked-mark {
  background: #eaf5f3;
  border: 1px solid #cee7e2;
  border-radius: 18px;
  color: #23776f;
  display: grid;
  height: 68px;
  margin: 0 auto 18px;
  place-items: center;
  width: 68px;
}
.income-unlinked h3 { color: #244957; font-size: 20px; margin: 0 0 10px; }
.income-unlinked p { color: var(--muted); line-height: 1.8; margin: 0 auto; max-width: 580px; }
.income-hero-actions {
  align-items: stretch;
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  position: relative;
  z-index: 1;
}
.income-hero-actions .page-excel-export {
  align-self: stretch;
  background: rgba(255,255,255,.96);
  border-color: rgba(255,255,255,.9);
  color: #195f76;
}
.income-security-badge {
  align-items: center;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  display: grid;
  flex: 0 0 218px;
  grid-template-columns: 36px minmax(0,1fr);
  padding: 14px 16px;
}
.income-security-badge svg { color: #8fdff0; grid-row: span 2; }
.income-security-badge strong { font-size: 13px; }
.income-security-badge span { color: rgba(255,255,255,.64); font-size: 10px; }
.income-unlock-card {
  display: grid;
  gap: 14px;
  margin: 28px auto 0;
  max-width: 520px;
  padding: 28px 30px;
}
.income-unlock-icon {
  align-items: center;
  background: #edf5ff;
  border: 1px solid #d1e2f5;
  border-radius: 15px;
  color: var(--zg-blue-700);
  display: flex;
  height: 58px;
  justify-content: center;
  width: 58px;
}
.income-unlock-copy > span {
  color: var(--zg-blue-600);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .14em;
}
.income-unlock-copy h3 { color: var(--zg-navy-800); font-size: 21px; margin: 5px 0 6px; }
.income-unlock-copy p { color: var(--muted); line-height: 1.65; margin: 0; }
.income-unlock-card label > span {
  color: #526d7d;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.income-password-field {
  align-items: center;
  border: 1px solid #cddbeb;
  border-radius: 8px;
  display: flex;
  gap: 9px;
  height: 44px;
  padding: 0 12px;
}
.income-password-field:focus-within {
  border-color: var(--zg-blue-600);
  box-shadow: 0 0 0 3px rgba(47,108,255,.12);
}
.income-password-field svg { color: #7991a4; flex: 0 0 auto; }
.income-password-field input { border: 0; height: 100%; min-width: 0; outline: 0; padding: 0; width: 100%; }
.income-unlock-error {
  align-items: center;
  background: #fff3f3;
  border: 1px solid #f1d0d0;
  border-radius: 7px;
  color: #b8424b;
  display: flex;
  font-size: 12px;
  gap: 7px;
  padding: 9px 11px;
}
.income-unlock-actions { display: flex; gap: 9px; justify-content: flex-end; padding-top: 3px; }
.page-excel-export { white-space: nowrap; }
.business-list-hero-side .page-excel-export,
.product-list-hero-side .page-excel-export {
  background: rgba(255,255,255,.96);
  border-color: rgba(255,255,255,.9);
  color: var(--zg-blue-700);
}

@media (max-width: 1180px) {
  .permission-workspace { grid-template-columns: 220px minmax(0,1fr); }
  .approval-filter { grid-template-columns: repeat(3,minmax(140px,1fr)); }
  .approval-keyword { grid-column: span 2; }
  .operation-filter { grid-template-columns: repeat(3,minmax(150px,1fr)); }
  .operation-keyword { grid-column: span 2; }
  .website-inquiry-filter { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .website-inquiry-keyword { grid-column: span 2; }
  .system-users-filter { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .system-user-keyword { grid-column: span 2; }
  .hr-filter-panel,
  .salary-overview-filter { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .hr-filter-keyword { grid-column: span 2; }
}
@media (max-width: 760px) {
  .website-inquiry-hero { align-items: flex-start; flex-direction: column; gap: 20px; padding: 24px; }
  .website-inquiry-source-summary { flex-basis: auto; width: 100%; }
  .website-inquiry-filter,
  .website-inquiry-kpis { grid-template-columns: 1fr; }
  .website-inquiry-keyword { grid-column: auto; }
  .website-inquiry-filter .btn { width: 100%; }
  .website-inquiry-editor-summary,
  .website-inquiry-editor-grid { grid-template-columns: 1fr; }
  .website-inquiry-editor-summary > div + div { border-left: 0; border-top: 1px solid #dfeaf1; }
  .website-inquiry-editor-grid .wide { grid-column: auto; }
  .website-inquiry-list-head { align-items: flex-start; flex-direction: column; }
  .website-inquiry-batch-actions,
  .website-inquiry-batch-actions .btn { width: 100%; }
  .website-inquiry-batch-actions { justify-content: space-between; }
  .system-users-hero { align-items: flex-start; flex-direction: column; gap: 18px; padding: 24px; }
  .system-users-hero-rule { flex-basis: auto; width: 100%; }
  .system-users-kpis,
  .system-users-filter { grid-template-columns: 1fr; }
  .system-user-keyword { grid-column: auto; }
  .system-users-filter .btn { width: 100%; }
  .system-user-detail-hero { align-items: start; grid-template-columns: auto 1fr; }
  .system-user-detail-hero .system-user-status { grid-column: 1 / -1; }
  .system-user-form-drawer .form-grid,
  .hr-kpi-grid,
  .hr-filter-panel,
  .salary-overview-filter,
  .income-period-grid { grid-template-columns: 1fr; }
  .system-user-form-drawer .field:first-child,
  .hr-filter-keyword { grid-column: auto; }
  .hr-page-hero { align-items: flex-start; flex-direction: column; gap: 18px; padding: 24px; }
  .hr-page-hero > .btn,
  .income-year-filter { flex-basis: auto; width: 100%; }
  .hr-filter-panel .btn { width: 100%; }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { font: 14px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
input[type="date"], input[type="datetime-local"], input[type="month"], input[type="time"] {
  min-width: 0;
  max-width: 100%;
  line-height: normal;
  vertical-align: middle;
}
input[type="date"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value {
  min-width: 0;
  text-align: left;
}
input.zg-localized-temporal-input { position: relative; }
input.zg-localized-temporal-input.is-temporal-empty:not(:focus)::-webkit-datetime-edit,
input.zg-localized-temporal-input.is-temporal-empty:not(:focus)::-webkit-datetime-edit-fields-wrapper {
  color: transparent;
}
input.zg-localized-temporal-input.is-temporal-empty:not(:focus)::before {
  content: attr(data-temporal-placeholder);
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 30px;
  left: 10px;
  overflow: hidden;
  color: #728398;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
  text-align: left;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}
input.zg-localized-temporal-input::-webkit-calendar-picker-indicator {
  position: relative;
  z-index: 2;
}

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; background: radial-gradient(circle at 50% 30%, #edf4ff, #f7f9fc 48%, #eef2f7); }
.boot-mark { width: 60px; height: 60px; border-radius: 8px; display: grid; place-items: center; color: white; background: linear-gradient(145deg, var(--brand), var(--brand-2)); font: 900 26px/1 Arial, sans-serif; box-shadow: 0 16px 34px rgba(11,31,51,.2); }
.boot-copy { display: grid; text-align: center; gap: 2px; }
.boot-copy strong { font-size: 17px; }
.boot-copy span { color: var(--muted); font-size: 12px; }
.boot-spinner { width: 24px; height: 24px; border: 2px solid #d8e5f5; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 520px); background: #f1f4f8; }
.login-hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 90px); display: flex; flex-direction: column; justify-content: space-between; color: white; background: linear-gradient(145deg, #081a2d 0%, #0b1f33 58%, #173654 100%); }
.login-hero::before, .login-hero::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(87,143,236,.19); }
.login-hero::before { width: 620px; height: 620px; right: -180px; bottom: -310px; box-shadow: 0 0 0 80px rgba(5,110,225,.04), 0 0 0 160px rgba(5,110,225,.025); }
.login-hero::after { width: 260px; height: 260px; right: 8%; top: 10%; background: radial-gradient(circle, rgba(5,110,225,.18), transparent 68%); }
.brand-lockup { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.brand-logo-slot { display: grid; place-items: center; overflow: hidden; }
.brand-logo-slot img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.brand-logo-fallback { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 7px; color: white; background: linear-gradient(145deg,var(--accent),#2f8bf0); font: 900 22px/1 Arial,sans-serif; }
.brand-copy { min-width: 0; display: grid; gap: 3px; }
.login-brand-logo,
.password-change-logo { width: 56px; height: 56px; flex: 0 0 56px; }
.login-brand-copy { max-width: 330px; }
.brand-lockup strong { display: block; font-size: 18px; letter-spacing: .5px; }
.brand-lockup span { color: rgba(255,255,255,.6); font-size: 11px; letter-spacing: 2px; }
.hero-copy { position: relative; z-index: 1; max-width: 650px; }
.hero-copy .eyebrow { color: #87b9ff; text-transform: uppercase; letter-spacing: 3px; font-size: 11px; font-weight: 800; }
.hero-copy h1 { margin: 12px 0 20px; font-size: clamp(38px, 5vw, 70px); line-height: 1.08; letter-spacing: -2px; }
.hero-copy p { max-width: 560px; margin: 0; color: rgba(255,255,255,.66); font-size: 16px; }
.hero-stats { position: relative; z-index: 1; display: flex; gap: 38px; }
.hero-stat strong { display: block; color: #8cbdff; font-size: 22px; }
.hero-stat span { color: rgba(255,255,255,.52); font-size: 12px; }
.login-panel { display: grid; place-items: center; padding: 44px; background: rgba(255,255,255,.9); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.5px; }
.login-card > p { margin: 0 0 34px; color: var(--muted); }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-weight: 650; font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; color: var(--ink); outline: 0; transition: .18s; }
.field input, .field select { height: 44px; padding: 0 13px; }
.field textarea { min-height: 92px; padding: 12px 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px rgba(5,110,225,.1); }
.field small { color: var(--muted); }
.searchable-select { position: relative; width: 100%; min-width: 0; }
.searchable-native-select { position: absolute !important; left: 0; bottom: 0; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.searchable-select-input { width: 100%; padding-right: 30px !important; background-image: linear-gradient(45deg,transparent 50%,#71859a 50%),linear-gradient(135deg,#71859a 50%,transparent 50%) !important; background-position: calc(100% - 15px) 50%,calc(100% - 10px) 50% !important; background-size: 5px 5px,5px 5px !important; background-repeat: no-repeat !important; }
.searchable-select-input::placeholder { color: #97a6b5; font-size: 10px; }
.searchable-select.open .searchable-select-input { border-color: var(--accent) !important; background-color: white !important; box-shadow: 0 0 0 3px rgba(5,110,225,.1) !important; }
.searchable-select-menu { position: fixed; z-index: 160; display: none; overflow-y: auto; padding: 5px; border: 1px solid #cbd8e5; border-radius: 7px; background: white; box-shadow: 0 16px 38px rgba(7,28,49,.18); }
.searchable-select.open .searchable-select-menu { display: block; }
.searchable-select-menu button { width: 100%; min-height: 42px; padding: 7px 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; border-radius: 5px; color: #243b52; background: transparent; text-align: left; cursor: pointer; }
.searchable-select-menu button:hover, .searchable-select-menu button.active { color: #075ebc; background: #edf5ff; }
.searchable-select-menu button strong { overflow: hidden; font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.searchable-select-menu button span { flex: 0 0 auto; color: #91a0ae; font-size: 9px; letter-spacing: .4px; }
.searchable-select-menu[data-searchable-kind="product"] button strong {
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}
.searchable-select-menu button[data-searchable-kind="customer"] strong,
.searchable-select-menu button[data-searchable-kind="product"] strong {
  color: #203d5b;
}
.searchable-select-empty, .searchable-select-more { padding: 11px 9px; color: #7e8f9f; text-align: center; font-size: 10px; }
.searchable-select-more { border-top: 1px solid #edf1f5; }
.login-submit { width: 100%; height: 46px; margin-top: 8px; border: 0; border-radius: 4px; cursor: pointer; color: white; background: var(--accent); font-weight: 750; box-shadow: 0 10px 22px rgba(5,110,225,.2); }
.login-submit:disabled { opacity: .65; cursor: wait; }
.login-foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.secure-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }

.app-shell { width: 100%; min-width: 0; min-height: 100vh; display: grid; grid-template-columns: 156px minmax(0, 1fr); transition: grid-template-columns .2s ease; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 156px; display: flex; flex-direction: column; color: #d8e2ef; background: linear-gradient(180deg, #0b1f33 0%, #102741 58%, #0a1c2e 100%); z-index: 30; box-shadow: 9px 0 30px rgba(8,25,43,.14); transition: width .2s ease, transform .2s ease; }
.side-head { position: relative; height: 66px; flex: 0 0 66px; display: flex; align-items: center; gap: 7px; padding: 0 9px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-brand-logo { width: 36px; height: 36px; flex: 0 0 36px; }
.side-title { min-width: 0; overflow: hidden; }
.side-title strong { display: block; overflow: hidden; color: white; font-size: 11px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.side-title span { display: block; margin-top: 3px; overflow: hidden; color: rgba(255,255,255,.47); font-size: 7px; letter-spacing: .5px; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-collapse { position: absolute; right: -12px; top: 50%; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(117,158,203,.38); border-radius: 50%; color: #dbe9f8; background: #163452; box-shadow: 0 5px 14px rgba(3,15,28,.28); cursor: pointer; transform: translateY(-50%); z-index: 2; }
.sidebar-collapse:hover { color: white; background: #1d4770; }
.sidebar-collapse svg { transition: transform .2s ease; }
.tenant-pill { margin: 11px 9px 7px; padding: 9px 9px; border: 1px solid rgba(102,158,238,.16); border-radius: 7px; background: rgba(3,15,28,.34); }
.tenant-pill label { display: block; min-width: 0; }
.tenant-pill span { display: block; color: #82b4f8; font-size: 10px; letter-spacing: .8px; }
.tenant-pill strong { display: block; margin-top: 3px; overflow: hidden; color: #f1f6fc; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.tenant-pill .side-tenant-select {
  width: 100%;
  max-width: none;
  height: 32px;
  margin-top: 5px;
  padding: 0 25px 0 7px;
  border-color: rgba(126, 174, 231, .26);
  border-radius: 6px;
  color: #f1f6fc;
  background-color: rgba(9, 30, 55, .86);
  font-size: 11px;
  font-weight: 650;
}
.tenant-pill .side-tenant-select:hover,
.tenant-pill .side-tenant-select:focus {
  border-color: rgba(126, 183, 255, .58);
  outline: 2px solid rgba(47, 108, 255, .16);
}
.tenant-pill .side-tenant-select option { color: var(--ink); background: #fff; }
.nav-scroll { flex: 1; overflow-y: auto; padding: 6px 7px 22px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-home, .module-button { width: 100%; min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; color: #bcd0cf; text-align: left; cursor: pointer; }
.nav-home:hover, .module-button:hover { background: rgba(255,255,255,.055); color: white; }
.nav-home.active { color: white; background: linear-gradient(90deg, rgba(5,110,225,.38), rgba(5,110,225,.08)); box-shadow: inset 3px 0 #5c9dff; }
.nav-icon { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.module { margin-top: 3px; }
.module-button { justify-content: flex-start; }
.module-button .chevron { margin-left: auto; transition: transform .18s; }
.module.open .module-button { color: white; }
.module.open .chevron { transform: rotate(90deg); }
.submenu { display: none; padding: 1px 0 6px 30px; }
.module.open .submenu { display: grid; }
.submenu button, .submenu a { position: relative; min-height: 32px; padding: 5px 6px; border: 0; border-radius: 7px; background: transparent; color: #89a7a7; text-align: left; cursor: pointer; font-size: 11px; }
.submenu a { display: flex; align-items: center; gap: 7px; text-decoration: none; }
.submenu button::before, .submenu a::before { content: ""; position: absolute; left: -12px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: #527477; }
.submenu button:hover, .submenu a:hover { color: white; background: rgba(255,255,255,.045); }
.submenu button.active { color: #8cbdff; background: rgba(5,110,225,.16); }
.submenu button.active::before { width: 5px; height: 5px; background: var(--accent); }
.side-footer { flex: 0 0 auto; padding: 10px 9px; border-top: 1px solid rgba(255,255,255,.07); }
.user-tile { display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 5px; color: white; background: #3179db; font-weight: 800; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong, .user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { color: white; font-size: 12px; }
.user-copy span { color: rgba(255,255,255,.45); font-size: 10px; }
.icon-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; cursor: pointer; color: var(--muted); }
.icon-button:hover { color: var(--ink); background: #edf4f3; border-color: var(--line); }
.sidebar .icon-button { color: rgba(255,255,255,.5); }
.sidebar .icon-button:hover { color: white; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.06); }

@media (min-width: 881px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 56px minmax(0, 1fr); }
  .sidebar.collapsed { width: 56px; }
  .sidebar.collapsed .side-head { justify-content: center; padding: 0; }
  .sidebar.collapsed .side-brand-logo { width: 36px; height: 36px; flex-basis: 36px; }
  .sidebar.collapsed .side-title,
  .sidebar.collapsed .tenant-pill,
  .sidebar.collapsed .nav-home > span:not(.nav-icon),
  .sidebar.collapsed .module-button > span:not(.nav-icon),
  .sidebar.collapsed .submenu,
  .sidebar.collapsed .user-copy,
  .sidebar.collapsed #logout { display: none; }
  .sidebar.collapsed .sidebar-collapse svg { transform: rotate(180deg); }
  .sidebar.collapsed .nav-scroll { padding: 9px; }
  .sidebar.collapsed .nav-home,
  .sidebar.collapsed .module-button { justify-content: center; gap: 0; padding: 9px; }
  .sidebar.collapsed .side-footer { padding: 10px; }
  .sidebar.collapsed .user-tile { justify-content: center; }
}

.app-main { grid-column: 2; width: 100%; min-width: 0; max-width: 100%; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid rgba(219,226,235,.9); background: rgba(249,251,253,.93); backdrop-filter: blur(16px); }
.page-heading { min-width: 0; }
.breadcrumbs { margin-bottom: 2px; color: #91a2a3; font-size: 10px; letter-spacing: .5px; }
.page-heading h1 { margin: 0; overflow: hidden; font-size: 20px; white-space: nowrap; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.tenant-select { height: 38px; max-width: 230px; padding: 0 32px 0 11px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); outline: 0; }
.mobile-menu { display: none; }
.content { width: 100%; min-width: 0; max-width: 100%; padding: 14px 16px 18px; }
/*
 * The workspace consumes every pixel left by the navigation column. Page-level
 * form and print classes keep their own readable/fixed widths below; only the
 * shared list, dashboard and analysis canvas is released from the old 1500px cap.
 */
.content-inner { width: 100%; min-width: 0; max-width: none; margin: 0; }

.dashboard-welcome { position: relative; overflow: hidden; min-height: 154px; padding: 27px 30px; display: flex; align-items: center; justify-content: space-between; border-radius: 10px; color: white; background: linear-gradient(120deg, #0b1f33, #142b47 64%, #1c4777); box-shadow: var(--shadow); }
.dashboard-welcome::after { content: ""; position: absolute; width: 380px; height: 380px; right: -80px; top: -205px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 0 0 45px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.018); }
.welcome-copy { position: relative; z-index: 1; }
.welcome-copy span { color: #8bbcff; font-size: 11px; letter-spacing: 1.2px; font-weight: 700; }
.welcome-copy h2 { margin: 6px 0 5px; font-size: 25px; }
.welcome-copy p { margin: 0; color: rgba(255,255,255,.62); }
.welcome-date { position: relative; z-index: 1; text-align: right; }
.welcome-date strong { display: block; color: #8bbcff; font-size: 30px; }
.welcome-date span { color: rgba(255,255,255,.6); font-size: 11px; }
.kpi-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-card { padding: 19px; display: flex; align-items: center; gap: 14px; border: 1px solid rgba(220,227,235,.9); border-radius: 9px; background: white; box-shadow: 0 8px 24px rgba(11,31,51,.045); }
.kpi-icon { width: 43px; height: 43px; flex: 0 0 43px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-2); color: var(--accent); }
.kpi-icon.orange { background: #fff1dc; color: #c17a1b; }
.kpi-icon.blue { background: #e4effc; color: #477bc2; }
.kpi-icon.purple { background: #eee8fb; color: #7454b7; }
.kpi-copy span { display: block; color: var(--muted); font-size: 11px; }
.kpi-copy strong { display: block; margin-top: 2px; font-size: 24px; letter-spacing: -.5px; }
.dash-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 18px; }
.panel { border: 1px solid rgba(220,227,235,.92); border-radius: var(--radius); background: white; box-shadow: 0 9px 28px rgba(11,31,51,.045); }
.panel-head { min-height: 61px; padding: 15px 19px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e8edf3; }
.panel-title strong { display: block; font-size: 14px; }
.panel-title span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.panel-body { padding: 18px 19px; }
.module-progress { display: grid; gap: 14px; }
.progress-row { display: grid; grid-template-columns: 92px 1fr 42px; align-items: center; gap: 10px; font-size: 12px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 9px; background: #edf1f6; }
.progress-bar { height: 100%; min-width: 3px; border-radius: 9px; background: linear-gradient(90deg, #056ee1, #5f9df0); }
.progress-row em { color: var(--muted); text-align: right; font-style: normal; }
.activity-list { display: grid; }
.activity { padding: 10px 0; display: grid; grid-template-columns: 9px 1fr auto; gap: 10px; align-items: start; border-bottom: 1px solid #eef3f2; }
.activity:last-child { border: 0; }
.activity-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-2); }
.activity strong { display: block; font-size: 12px; }
.activity span { color: var(--muted); font-size: 10px; }
.activity time { color: #98a8a8; font-size: 9px; }
.empty-state { min-height: 180px; padding: 32px; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state .empty-icon { width: 52px; height: 52px; margin-bottom: 10px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-2); font-size: 22px; }
.empty-state strong { color: var(--ink); }
.empty-state p { max-width: 340px; margin: 5px 0 15px; font-size: 12px; }

.page-toolbar { margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar-copy strong { display: block; font-size: 15px; }
.toolbar-copy span { color: var(--muted); font-size: 11px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.search-box { position: relative; }
.search-box input { width: 250px; height: 39px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 5px; background: white; outline: 0; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.search-box svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; fill: none; stroke: #8ba0a0; stroke-width: 2; }
.btn { min-height: 39px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 4px; background: white; cursor: pointer; font-weight: 650; font-size: 12px; }
.btn:hover { border-color: #b8c7d8; background: #f8faff; }
.btn-primary { border-color: var(--accent); color: white; background: var(--accent); box-shadow: 0 6px 14px rgba(5,110,225,.16); }
.btn-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.btn-danger { color: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { min-height: 31px; padding: 5px 9px; font-size: 11px; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 43px; padding: 0 15px; color: #65768a; background: #f6f8fb; text-align: left; font-size: 10px; font-weight: 750; white-space: nowrap; letter-spacing: .2px; }
td { height: 54px; max-width: 280px; padding: 8px 15px; border-top: 1px solid #e8edf3; color: #26394f; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
tbody tr:hover { background: #f8faff; }
.code-cell { color: var(--accent); font-weight: 700; }
.status { padding: 4px 8px; display: inline-flex; align-items: center; border-radius: 999px; color: #075ebc; background: #e5f0ff; font-size: 10px; }
.status.draft { color: #8e6b2a; background: #fff1d7; }
.status.pending { color: #9b5b18; background: #fff3e6; }
.status.complete { color: #157256; background: #eaf8f2; }
.status.off { color: #8c6060; background: #f8e6e6; }
.row-actions { display: flex; gap: 3px; }
.row-action { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 7px; color: #708687; background: transparent; cursor: pointer; }
.row-action:hover { color: var(--accent); background: var(--accent-2); }
.table-foot { min-height: 49px; padding: 10px 15px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

/* Data-table column resizing. Standard lists and the four order-entry grids opt in;
   print/design/detail editors keep their own layout. */
.table-scroll,
.consistency-table-scroll { max-width: 100%; overscroll-behavior: contain; }
table.resizable-list-table > thead > tr > th.resizable-static-header { position: relative; }
table.resizable-list-table.has-custom-column-widths {
  border-collapse: separate;
  border-spacing: 0;
}
table.resizable-list-table.has-auto-column-widths {
  border-collapse: separate;
  border-spacing: 0;
}
table.resizable-list-table.has-custom-column-widths > :is(thead,tbody,tfoot) > tr > :is(th,td) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
table.resizable-list-table.has-auto-column-widths > :is(thead,tbody,tfoot) > tr > :is(th,td) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
table.resizable-list-table.has-custom-column-widths > tbody > tr > td:not(.resizable-actions-column) {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
table.resizable-list-table.has-auto-column-widths > tbody > tr > td:not(.resizable-actions-column) {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
table.resizable-list-table.has-custom-column-widths :is(.table-subline,.cell-sub) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.resizable-list-table.has-auto-column-widths :is(.table-subline,.cell-sub) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
table.resizable-list-table.has-custom-column-widths td :is(
  .cell-primary > strong,
  .cell-primary > span,
  .cell-primary > small,
  .product-list-name > strong,
  .product-list-name > span,
  .product-material-codes,
  .inventory-material-codes,
  .reimbursement-description,
  .shipment-report-module-tags
) {
  max-width: 100% !important;
}
table.resizable-list-table.has-custom-column-widths td :is(
  .product-material-codes > span,
  .product-material-codes > a,
  .product-material-codes > em,
  .inventory-material-codes > span,
  .inventory-material-codes > em
) {
  max-width: 100% !important;
}
table.resizable-list-table.has-custom-column-widths:is(.approval-table,.operation-table,.complaint-list) td small {
  max-width: 100% !important;
}
table.resizable-list-table.has-custom-column-widths th > .table-sort-button {
  max-width: calc(100% - 8px);
  overflow: hidden;
  white-space: nowrap;
}
table.resizable-list-table.has-auto-column-widths th > .table-sort-button {
  max-width: calc(100% - 8px);
  overflow: hidden;
  white-space: nowrap;
}
table.resizable-list-table.has-custom-column-widths :is(td.resizable-actions-column,td:has(> .row-actions)) {
  overflow: hidden !important;
  white-space: nowrap !important;
}
table.resizable-entry-table.has-custom-column-widths > tbody > tr > td {
  vertical-align: middle;
}
table.resizable-entry-table.has-custom-column-widths :is(input,select,.searchable-select) {
  max-width: 100%;
  min-width: 0;
}
.list-column-resizer {
  position: absolute;
  z-index: 18;
  top: 0;
  right: -4px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  opacity: .28;
  outline: 0;
}
.list-column-resizer.left-edge { right: auto; left: -4px; }
.list-column-resizer::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 4px;
  width: 1px;
  border-radius: 2px;
  background: #b9c7d6;
  transition: width .12s ease, background .12s ease, opacity .12s ease;
}
table.resizable-list-table th:hover > .list-column-resizer,
.list-column-resizer:focus-visible,
.list-column-resizer.is-resizing { opacity: 1; }
.list-column-resizer:hover::after,
.list-column-resizer:focus-visible::after,
.list-column-resizer.is-resizing::after { width: 2px; background: var(--accent); }
.list-column-resizer:focus-visible { box-shadow: inset 0 0 0 1px rgba(5,110,225,.24); }
html.is-table-column-resizing,
html.is-table-column-resizing * { cursor: col-resize !important; user-select: none !important; }

@media (pointer: coarse), (max-width: 760px) {
  .list-column-resizer { display: none; }
}

@media print {
  .list-column-resizer { display: none !important; }
}

.form-page { width: 100%; display: grid; gap: 16px; }
.singleton-page { max-width: 1080px; margin: 0 auto; }
.form-page-intro, .product-page-hero { min-height: 118px; padding: 24px 27px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 9px; color: white; background: linear-gradient(120deg, #0b1f33, #142b47 65%, #1b4574); box-shadow: var(--shadow); }
.form-page-intro span, .product-page-hero > div > span { color: #8bbcff; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.form-page-intro h2, .product-page-hero h2 { margin: 5px 0 4px; font-size: 23px; }
.form-page-intro p, .product-page-hero p { margin: 0; color: rgba(255,255,255,.66); font-size: 12px; }
.record-badge { padding: 8px 12px; border: 1px solid rgba(139,188,255,.25); border-radius: 999px; color: #d4e6ff; background: rgba(3,19,35,.34); font-size: 11px; white-space: nowrap; }
.product-page-hero .btn { border-color: rgba(255,255,255,.18); color: white; background: rgba(255,255,255,.08); }
.product-page-hero .btn:hover { background: rgba(255,255,255,.15); }
.form-card { overflow: hidden; border: 1px solid rgba(218,226,235,.96); border-radius: 9px; background: white; box-shadow: 0 8px 26px rgba(11,31,51,.045); }
.form-section-head { min-height: 68px; padding: 15px 21px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #e8edf3; background: linear-gradient(180deg, #fff, #fafbfe); }
.form-section-head strong { display: block; font-size: 14px; }
.form-section-head span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.section-index { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 5px; color: var(--accent); background: var(--accent-2); font-size: 11px; font-weight: 800; }
.form-section-body { padding: 22px 22px 5px; }
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
.form-page-actions { position: sticky; bottom: 14px; z-index: 12; min-height: 66px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #d7e0ea; border-radius: 8px; background: rgba(255,255,255,.96); box-shadow: 0 14px 34px rgba(11,31,51,.12); backdrop-filter: blur(14px); }
.form-page-actions > span { color: var(--muted); font-size: 11px; }
.product-actions > div { display: flex; gap: 8px; }
.customer-form-page { width: 100%; max-width: none; margin: 0; }
.customer-page-hero { background: linear-gradient(120deg, #0b1f33, #15365b 67%, #075fbd); }
.customer-contact-section-head .customer-contact-add { margin-left: auto; }
.customer-contact-body { padding: 0; overflow-x: auto; }
.customer-contact-editor { min-width: 1080px; }
.customer-contact-head, .customer-contact-main { display: grid; grid-template-columns: 1.05fr .68fr .88fr 1fr 1.35fr 104px 54px; gap: 10px; align-items: center; }
.customer-contact-head { min-height: 43px; padding: 0 18px; color: #65768a; background: #f6f8fb; font-size: 10px; font-weight: 750; }
.customer-contact-row { border-top: 1px solid #e8edf3; background: white; }
.customer-contact-row:nth-child(even) { background: #fbfcfe; }
.customer-contact-main { padding: 15px 18px 11px; }
.customer-contact-main label { min-width: 0; display: grid; gap: 5px; }
.customer-contact-main label > span { display: none; color: var(--muted); font-size: 10px; font-weight: 700; }
.customer-contact-main input:not([type=checkbox]), .customer-contact-main select,
.customer-contact-address input, .customer-contact-address select { width: 100%; height: 39px; min-width: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); outline: 0; }
.customer-contact-main input:focus, .customer-contact-main select:focus,
.customer-contact-address input:focus, .customer-contact-address select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.customer-default-cell { height: 39px; display: flex !important; align-items: center; gap: 7px !important; padding: 0 9px; border: 1px solid #d7e4f4; border-radius: 5px; color: #54708e; background: #f3f8ff; cursor: pointer; }
.customer-default-cell input { accent-color: var(--accent); }
.customer-default-cell em { font-size: 10px; font-style: normal; white-space: nowrap; }
.customer-contact-action { place-items: center; }
.customer-contact-address { padding: 0 18px 15px; display: grid; grid-template-columns: minmax(210px,.85fr) 145px 155px 155px minmax(230px,1.25fr); gap: 10px; align-items: center; }
.contact-address-title { min-width: 0; display: grid; gap: 2px; }
.contact-address-title strong { font-size: 11px; }
.contact-address-title span { overflow: hidden; color: var(--muted); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.customer-table { min-width: 1260px; }
.customer-level { width: 27px; height: 27px; display: inline-grid; place-items: center; border-radius: 6px; color: #075ebc; background: #e5f0ff; font-size: 11px; font-weight: 850; }
.customer-level.level-a { color: #087343; background: #e0f5e9; }
.customer-level.level-b { color: #075ebc; background: #e5f0ff; }
.customer-level.level-c { color: #906615; background: #fff1d7; }
.customer-level.level-d { color: #78558e; background: #f1eafa; }
.customer-contact-cell { display: grid; gap: 1px; }
.customer-contact-cell strong { font-size: 12px; }
.customer-contact-cell span { color: var(--muted); font-size: 9px; }
.customer-detail-drawer { width: min(760px, 94vw); }
.customer-detail-contacts { display: grid; gap: 10px; }
.customer-detail-contact { padding: 14px; border: 1px solid #dfe6ef; border-radius: 7px; background: #fbfcfe; }
.customer-detail-contact-head { margin-bottom: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.customer-detail-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
.customer-detail-contact-grid > span { min-width: 0; color: #26394f; font-size: 11px; word-break: break-word; }
.customer-detail-contact-grid > span.wide { grid-column: 1 / -1; }
.customer-detail-contact-grid em { display: block; margin-bottom: 2px; color: var(--muted); font-size: 9px; font-style: normal; }
.employee-form-page { width: 100%; max-width: none; margin: 0; }
.employee-page-hero { background: linear-gradient(120deg, #0b1f33, #14385a 66%, #17636d); }
.employee-section .field textarea { min-height: 92px; }
.employee-aligned-grid { align-items: start; }
.employee-aligned-grid .field { min-width: 0; }
.employee-aligned-grid .field:has(input[name="social_benefits"]) { grid-column: span 2; }
.employee-id-feedback { margin: -4px 0 17px; padding: 10px 12px; border: 1px solid #dce5ef; border-radius: 6px; color: #66798e; background: #f7f9fc; font-size: 10px; }
.employee-id-feedback.valid { border-color: #b8dfcf; color: #087343; background: #edf9f3; }
.employee-id-feedback.invalid { border-color: #ecc7cb; color: #a33c46; background: #fff4f5; }
.employee-address-block { overflow: hidden; margin-top: 2px; border: 1px solid #dfe6ef; border-radius: 8px; background: #fbfcfe; }
.employee-address-heading { min-height: 48px; padding: 9px 14px; display: flex; align-items: center; border-bottom: 1px solid #e5ebf1; background: #f5f8fb; }
.employee-address-heading strong, .employee-address-heading span { display: block; }
.employee-address-heading strong { font-size: 12px; }
.employee-address-heading span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.employee-address-grid { padding: 13px 14px 15px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) minmax(250px,1.35fr); gap: 12px; align-items: end; }
.employee-address-grid label { min-width: 0; display: grid; gap: 6px; }
.employee-address-grid label > span { color: #43566c; font-size: 11px; font-weight: 650; }
.employee-address-grid select, .employee-address-grid input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: white; outline: 0; }
.employee-address-grid select:focus, .employee-address-grid input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.employee-contract-title { align-items: center; }
.employee-contract-title .contract-template-link { margin-left: auto; }
.contract-template-link.disabled { color: #8796a7; border-color: #dbe2ea; background: #f5f7fa; }
.employee-contract-editor { overflow: hidden; margin-top: 2px; border: 1px solid #dfe6ef; border-radius: 8px; background: #fbfcfe; }
.employee-contract-head, .employee-contract-row { display: grid; grid-template-columns: 56px minmax(250px,1.4fr) 145px 145px 150px 106px; gap: 10px; align-items: center; }
.employee-contract-head { min-height: 42px; padding: 0 12px; color: #66788c; background: #f3f6fa; font-size: 10px; font-weight: 750; }
.employee-contract-row { min-height: 66px; padding: 10px 12px; border-top: 1px solid #e6ebf1; background: white; }
.employee-contract-row input[type="file"] { display: none; }
.employee-contract-row input[type="date"] { width: 100%; height: 40px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: white; outline: 0; }
.employee-contract-row input[type="date"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.contract-sequence { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 5px; color: #075ebc; background: #e8f1ff; font-size: 11px; font-weight: 800; }
.contract-file-cell { min-width: 0; display: flex; align-items: center; gap: 8px; }
.contract-file-cell > span { min-width: 0; overflow: hidden; color: #53677e; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.contract-upload-time { color: #63758a; font-size: 10px; }
.employee-contract-add { margin: 11px 12px 13px; }
.employee-contract-detail { margin-top: 16px; border: 1px solid #e3e9ef; border-radius: 7px; }
.employee-contract-detail table { min-width: 690px; }
.employee-table { min-width: 1370px; }
.employee-table th:nth-child(1) { width: 105px; }
.employee-table th:nth-child(2) { width: 100px; }
.employee-table th:nth-child(3), .employee-table th:nth-child(4) { width: 120px; }
.employee-table th:nth-child(5) { width: 120px; }
.employee-table th:nth-child(6) { width: 100px; }
.employee-table th:nth-child(7) { width: 90px; }
.employee-table th:nth-child(8) { width: 105px; }
.employee-table th:nth-child(9) { width: 140px; }
.employee-table th:nth-child(10) { width: 125px; }
.employee-table th:nth-child(11) { width: 100px; }
.employee-salary { color: #193e63; font-weight: 750; }
.employee-detail-drawer { width: min(900px, 96vw); }
.employee-history { display: grid; gap: 11px; }
.employee-history-entry { overflow: hidden; border: 1px solid #dfe6ee; border-radius: 8px; background: #fbfcfe; }
.employee-history-head { min-height: 54px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e7ecf2; background: white; }
.employee-history-head strong, .employee-history-head span { display: block; }
.employee-history-head strong { color: #21364d; font-size: 11px; }
.employee-history-head span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.employee-history-head em { padding: 4px 8px; border-radius: 999px; color: #126173; background: #e4f4f6; font-size: 9px; font-style: normal; white-space: nowrap; }
.employee-history-changes { display: grid; }
.employee-history-changes > div { min-height: 43px; padding: 8px 14px; display: grid; grid-template-columns: 110px minmax(0,1fr) 20px minmax(0,1fr); gap: 9px; align-items: center; border-top: 1px solid #edf1f5; font-size: 10px; }
.employee-history-changes > div:first-child { border-top: 0; }
.employee-history-changes span { color: #50657b; font-weight: 700; }
.employee-history-changes del { color: #9a6870; text-decoration-color: #d7a9af; overflow-wrap: anywhere; }
.employee-history-changes b { color: #94a2b1; text-align: center; }
.employee-history-changes ins { color: #126b52; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.field input[readonly] { color: #65768a; background: #eef2f6; cursor: not-allowed; }
.file-center-table { min-width: 980px; table-layout: fixed; }
.file-center-table th:nth-child(1) { width: 115px; }
.file-center-table th:nth-child(2) { width: 180px; }
.file-center-table th:nth-child(3) { width: 310px; }
.file-center-table th:nth-child(4) { width: 120px; }
.file-center-table th:nth-child(5) { width: 155px; }
.file-center-table th:nth-child(6) { width: 110px; }
.product-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
.product-material-head > div:nth-child(2) { min-width: 0; }
.product-material-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.product-material-actions > span { margin: 0; padding: 5px 9px; border-radius: 999px; color: #51708c; background: #edf3f8; font-size: 9px; font-weight: 760; white-space: nowrap; }
.product-material-body { padding-top: 18px; }
.product-material-table { min-width: 900px; table-layout: fixed; }
.product-material-table th:nth-child(1) { width: 29%; }
.product-material-table th:nth-child(2) { width: 26%; }
.product-material-table th:nth-child(3) { width: 39%; }
.product-material-table th:nth-child(4) { width: 64px; text-align: center; }
.product-material-table th em { color: #d4414f; font-style: normal; }
.product-material-table td { height: 60px; max-width: none; padding: 9px 10px; }
.product-material-table input, .product-material-table select { width: 100%; height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; color: var(--ink); background: white; outline: 0; }
.product-material-table input:focus, .product-material-table select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.product-material-table .row-action { margin: auto; }
.paired-field-row { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr); gap: 18px; }
.paired-field-row .field.full { grid-column: auto; }
.product-images-card { align-self: start; padding: 17px; border: 1px solid #dce4ed; border-radius: 8px; background: #f8faff; }
.product-images-card .field { margin: 0; }
.product-images-card > p { margin: 10px 2px 0; color: var(--muted); font-size: 10px; }
.image-preview { min-height: 190px; margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.image-preview-empty { grid-column: 1 / -1; min-height: 190px; display: grid; place-content: center; justify-items: center; gap: 7px; border: 1px dashed #cbdedb; border-radius: 12px; color: #8aa09f; background: white; }
.image-thumb { overflow: hidden; min-height: 88px; border: 1px solid #dce9e7; border-radius: 10px; background: white; }
.image-thumb img { width: 100%; height: 100%; min-height: 88px; display: block; object-fit: cover; }
.inline-input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.inline-input-action .btn { min-height: 44px; }
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pill { cursor: pointer; }
.choice-pill input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-pill span { min-height: 36px; padding: 7px 13px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 5px; color: #536579; background: #fbfcfe; font-size: 12px; transition: .16s; }
.choice-pill input:checked + span { border-color: var(--accent); color: #075ebc; background: #e8f1ff; box-shadow: inset 0 0 0 1px rgba(5,110,225,.08); }
.opening-stock-table { overflow: hidden; margin-bottom: 17px; border: 1px solid var(--line); border-radius: 13px; }
.opening-stock-row { min-height: 62px; padding: 9px 15px; display: grid; grid-template-columns: minmax(260px, 1.5fr) minmax(170px, .8fr) minmax(170px, .7fr); align-items: center; gap: 15px; border-top: 1px solid #eaf0ef; }
.opening-stock-row:first-child { border-top: 0; }
.opening-stock-row strong, .opening-stock-row small { display: block; }
.opening-stock-row small { color: var(--muted); font-size: 10px; font-weight: 400; }
.opening-stock-head { min-height: 43px; color: #718687; background: #f7faf9; font-size: 10px; font-weight: 750; }
.opening-stock-row input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; outline: 0; }
.opening-stock-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.1); }
.opening-unit { color: #465b73; font-size: 12px; }
.locked-stock-note { min-height: 58px; margin-bottom: 17px; padding: 14px 16px; display: flex; align-items: center; gap: 10px; border: 1px solid #cddff5; border-radius: 7px; color: #205f9f; background: #eff6ff; }
.locked-stock-note.warning { color: #92661f; border-color: #efdcb9; background: #fff8e9; }
.component-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.component-head, .component-row { display: grid; grid-template-columns: minmax(210px, 1.3fr) 76px 120px minmax(180px, 1fr) 38px; gap: 9px; align-items: center; }
.component-stock-editor .component-head, .component-stock-editor .component-row { grid-template-columns: minmax(185px,1.25fr) 70px minmax(165px,1fr) 92px 110px 38px; }
.transfer-line-editor .component-head, .transfer-line-editor .component-row { grid-template-columns: minmax(240px,1.55fr) 78px 120px minmax(140px,.75fr) 38px; }
.component-head { min-height: 38px; padding: 0 11px; color: var(--muted); background: #f5f9f8; font-size: 10px; font-weight: 750; }
.component-row { padding: 8px 10px; border-top: 1px solid #e7efee; }
.component-row select, .component-row input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; outline: 0; }
.component-add, .product-line-add, .transfer-line-add { margin: 8px 10px 11px; }
.line-unit { min-height: 39px; padding: 0 8px; display: flex; align-items: center; color: #41566e; border: 1px solid #e1e8f0; border-radius: 7px; background: #f5f8fb; font-size: 11px; }
.component-stock-value { justify-content: flex-end; color: #087343; background: #eff9f3; border-color: #d4ebdd; font-weight: 750; }
.component-stock-value.empty { color: #a65353; background: #fff4f4; border-color: #efd8d8; }
.computed-input.invalid { color: #b44545 !important; border-color: #e3a9a9 !important; background: #fff3f3 !important; }
.defect-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfe; }
.defect-head, .defect-row { display: grid; grid-template-columns: minmax(210px, 1fr) 90px 140px 38px; align-items: center; gap: 9px; }
.defect-head { min-height: 38px; padding: 0 11px; color: var(--muted); background: #f5f9f8; font-size: 10px; font-weight: 750; }
.defect-row { padding: 8px 10px; border-top: 1px solid #e7efee; }
.defect-row select, .defect-row input { width: 100%; height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; outline: 0; }
.defect-add { margin: 8px 10px 11px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(6,21,37,.46); backdrop-filter: blur(3px); animation: fadeIn .16s ease-out; }
.success-dialog { width: min(430px, 100%); padding: 30px; border-radius: 10px; background: white; box-shadow: 0 24px 70px rgba(6,21,37,.22); text-align: center; }
.success-mark { width: 54px; height: 54px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 7px; color: var(--accent); background: var(--accent-2); font-size: 25px; font-weight: 800; }
.success-dialog h3 { margin: 0 0 7px; font-size: 20px; }
.success-dialog p { margin: 0 0 22px; color: var(--muted); }
.success-dialog > div:last-child { display: flex; justify-content: center; gap: 9px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(6,21,37,.38); backdrop-filter: blur(2px); animation: fadeIn .16s ease-out; }
.drawer { position: absolute; inset: 0 0 0 auto; width: min(650px, 94vw); display: flex; flex-direction: column; background: white; box-shadow: -24px 0 50px rgba(6,21,37,.18); animation: slideIn .2s ease-out; }
.drawer.wide-drawer { width: min(920px, 97vw); }
.inspection-drawer { width: min(980px, 98vw) !important; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: .65; } }
.drawer-head { min-height: 72px; padding: 17px 21px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-head strong { display: block; font-size: 17px; }
.drawer-head span { color: var(--muted); font-size: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px; }
.form-grid { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0 16px; }
.form-grid > *, .form-grid-2 > *, .form-grid-3 > *, .form-grid-4 > * { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.required::after { content: " *"; color: var(--danger); }
.toggle-wrap { height: 44px; display: flex; align-items: center; gap: 9px; }
.toggle-wrap input { width: 18px; height: 18px; accent-color: var(--accent); }
.file-control { min-height: 50px; padding: 7px; display: flex; align-items: center; gap: 8px; border: 1px dashed #b9c9dc; border-radius: 6px; background: #f8faff; }
.file-control input { display: none; }
.file-control.files { align-items: flex-start; flex-wrap: wrap; }
.file-control.files .file-name { flex-basis: 100%; padding: 2px 3px 0; white-space: normal; }
.file-name { min-width: 0; flex: 1; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.attachment-grid .field.full { grid-column: auto; }
.product-form-page .attachment-grid .file-control {
  align-content: center;
  flex-wrap: wrap;
  min-height: 72px;
}
.existing-file-actions { display: inline-flex; align-items: center; gap: 4px; }
.existing-file-actions[hidden] { display: none; }
.file-link, .file-remove { min-height: 28px; padding: 4px 8px; border: 0; border-radius: 3px; background: transparent; color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 650; }
.file-link:hover, .file-remove:hover { background: var(--accent-2); }
.file-remove { color: var(--danger); }
.file-upload-time { margin: -10px 2px 18px; color: #7a8999; font-size: 10px; }
.computed-input { color: #29445f; background: #f3f7fb !important; font-weight: 700; }
.inspection-drawer .image-upload-field { grid-column: auto; }
.inspection-drawer .image-file-control { min-height: 145px; flex-wrap: wrap; align-content: flex-start; }
.inspection-image-preview { width: 100%; height: 75px; overflow: hidden; display: grid; place-items: center; border: 1px solid #e2e9f1; border-radius: 5px; color: #93a1b0; background: white; font-size: 10px; }
.inspection-image-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.inspection-table { min-width: 1430px; table-layout: fixed; }
.inspection-table th:nth-child(1) { width: 145px; }
.inspection-table th:nth-child(2), .inspection-table th:nth-child(3) { width: 120px; }
.inspection-table th:nth-child(4) { width: 105px; }
.inspection-table th:nth-child(5), .inspection-table th:nth-child(6), .inspection-table th:nth-child(7), .inspection-table th:nth-child(8) { width: 92px; }
.inspection-table th:nth-child(9), .inspection-table th:nth-child(10) { width: 80px; }
.inspection-table th:nth-child(11) { width: 105px; }
.inspection-table th:nth-child(12) { width: 110px; }
.product-table { min-width: 900px; table-layout: fixed; }
.product-table th:nth-child(1) { width: 105px; }
.product-table th:nth-child(2) { width: 125px; }
.product-table th:nth-child(3) { width: 155px; }
.product-table th:nth-child(4) { width: 72px; }
.product-table th:nth-child(5) { width: 115px; }
.product-table th:nth-child(6) { width: 76px; }
.product-table th:nth-child(7), .product-table th:nth-child(8) { width: 68px; }
.product-table th:nth-child(9) { width: 96px; }
.product-table td { height: 68px; }
.product-table-thumb { width: 54px; height: 44px; display: block; border: 1px solid #d8e1eb; border-radius: 4px; background: #f3f6fa; object-fit: cover; }
.product-thumb-empty { width: 54px; height: 44px; display: grid; place-items: center; border: 1px dashed #c9d3df; border-radius: 4px; color: #94a1b0; background: #f8fafd; font-size: 9px; }
.table-attachment { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 11px; font-weight: 700; }
.table-attachment:hover { color: var(--accent-strong); text-decoration: underline; }
.table-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 650; text-decoration: none; }
.table-link:hover { color: var(--accent-strong); text-decoration: underline; }
.table-file-empty { color: #a2adba; }
.detail-drawer { width: min(780px, 96vw); }
.detail-body { padding: 22px 24px 32px; background: #f7f9fc; }
.detail-section { margin-bottom: 16px; padding: 20px; border: 1px solid #dde5ee; border-radius: 9px; background: white; }
.detail-section:last-child { margin-bottom: 0; }
.detail-section h3 { margin: 0 0 15px; font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.detail-item { min-width: 0; padding: 11px 12px; border-radius: 6px; background: #f7f9fc; }
.detail-item.wide { grid-column: 1 / -1; }
.detail-item span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 10px; }
.detail-item strong { display: block; overflow-wrap: anywhere; color: #1e3043; font-size: 12px; font-weight: 650; }
.detail-lines-table td { height: 42px; }
.image-detail-item { min-height: 155px; }
.record-image-preview { height: 88px; margin-bottom: 8px; overflow: hidden; display: block; border: 1px solid #dce4ed; border-radius: 5px; background: white; }
.record-image-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-images { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.detail-images a { overflow: hidden; height: 105px; border: 1px solid #dce4ed; border-radius: 7px; background: #f7f9fc; }
.detail-images img { width: 100%; height: 100%; display: block; object-fit: cover; }
.detail-empty { grid-column: 1 / -1; min-height: 86px; display: grid; place-items: center; border: 1px dashed #cad4df; border-radius: 7px; color: var(--muted); background: #fafbfd; font-size: 11px; }
.detail-attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.detail-attachment { min-width: 0; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e1e7ee; border-radius: 7px; }
.detail-attachment strong, .detail-attachment span { display: block; }
.detail-attachment span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.detail-attachment em { color: #9aa6b3; font-size: 10px; font-style: normal; }
.drawer-foot { min-height: 70px; padding: 14px 21px; display: flex; align-items: center; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--line); background: #fbfdfd; }

.reserved { min-height: calc(100vh - 150px); display: grid; place-content: center; justify-items: center; text-align: center; }
.reserved-mark { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-2); font-size: 28px; }
.reserved h2 { margin: 17px 0 7px; }
.reserved p { max-width: 440px; margin: 0; color: var(--muted); }

.platform-settings-page { max-width: 1160px; margin: 0 auto; }
.platform-settings-intro { background: linear-gradient(120deg, #0b1f33, #15375c 68%, #1c5b8f); }
.platform-text-grid { max-width: 900px; padding-bottom: 18px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.platform-text-field { min-width: 0; display: grid; gap: 8px; }
.platform-text-field label { font-size: 13px; font-weight: 700; }
.platform-text-field input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; color: var(--ink); outline: 0; }
.platform-text-field input:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px rgba(5,110,225,.1); }
.platform-text-field small { color: var(--muted); font-size: 10px; }
.platform-asset-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding-bottom: 18px; }
.platform-asset-card { min-width: 0; padding: 20px; border: 1px solid #dfe6ef; border-radius: 9px; background: #fbfcfe; }
.platform-asset-copy strong, .platform-asset-copy span { display: block; }
.platform-asset-copy strong { font-size: 14px; }
.platform-asset-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.platform-asset-preview { margin: 16px 0; display: grid; place-items: center; overflow: hidden; border: 1px solid #d8e2ed; border-radius: 8px; background-color: white; background-image: linear-gradient(45deg,#f5f7fa 25%,transparent 25%),linear-gradient(-45deg,#f5f7fa 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#f5f7fa 75%),linear-gradient(-45deg,transparent 75%,#f5f7fa 75%); background-position: 0 0,0 8px,8px -8px,-8px 0; background-size: 16px 16px; }
.platform-asset-preview.mark-preview { width: 132px; height: 132px; }
.platform-asset-preview.logo-preview { width: 132px; height: 132px; padding: 18px; }
.platform-asset-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.platform-mark-fallback { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 18px; color: white; background: linear-gradient(145deg,var(--brand),var(--accent)); font-size: 38px; font-weight: 900; }
.platform-logo-fallback { color: #1b3c60; font-size: clamp(17px,2vw,27px); font-weight: 800; text-align: center; }
.platform-asset-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.platform-asset-actions input { display: none; }
.platform-asset-actions em { min-width: 110px; flex: 1; overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.platform-asset-delete { color: #b74250; border-color: #ecd4d7; }
.platform-asset-delete:hover { color: #9d2f3d; border-color: #dcaeb4; background: #fff6f7; }
.platform-asset-delete:disabled { color: #a9b2bc; border-color: #e3e8ee; background: #f5f7f9; cursor: not-allowed; }
.platform-asset-card > small { display: block; margin-top: 12px; color: #788898; font-size: 10px; line-height: 1.55; }
.platform-live-card { padding: 19px 20px; display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 22px; align-items: center; border: 1px solid #dbe4ee; border-radius: 9px; background: white; box-shadow: 0 8px 24px rgba(11,31,51,.04); }
.platform-live-copy strong, .platform-live-copy span { display: block; }
.platform-live-copy strong { font-size: 14px; }
.platform-live-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.platform-live-preview { overflow: hidden; border-radius: 8px; background: #0b1f33; }
.platform-preview-sidebar { min-height: 82px; padding: 16px 18px; display: flex; align-items: center; gap: 13px; color: white; background: linear-gradient(110deg,#0b1f33,#153552); }
.platform-preview-logo { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; overflow: hidden; }
.platform-preview-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.platform-preview-logo span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--accent); font-size: 21px; font-weight: 900; }
.platform-preview-identity { min-width: 0; display: grid; gap: 2px; }
.platform-preview-identity strong { max-width: 310px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.platform-preview-identity span { color: rgba(255,255,255,.48); font-size: 8px; letter-spacing: 1.5px; }

.account-password-page { width: min(940px,100%); margin: 0 auto; display: grid; gap: 16px; }
.account-password-hero { min-height: 154px; padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; border: 1px solid rgba(116,169,255,.18); border-radius: 10px; color: white; background: radial-gradient(circle at 88% 8%,rgba(25,189,216,.22),transparent 28%),linear-gradient(124deg,#071f35 0%,#103e6c 62%,#056ee1 122%); box-shadow: 0 14px 34px rgba(11,45,73,.16); }
.account-password-hero-copy { min-width: 0; }
.account-password-hero-copy > span { color: #8fdff0; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.account-password-hero-copy h2 { margin: 7px 0 6px; color: white; font-size: 25px; }
.account-password-hero-copy p { max-width: 540px; margin: 0; color: rgba(255,255,255,.68); font-size: 12px; line-height: 1.75; }
.account-password-identity { width: min(330px,42%); min-width: 250px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.account-password-avatar { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 9px; color: #0b3b65; background: #fff; font-size: 17px; font-weight: 850; box-shadow: 0 8px 22px rgba(2,18,34,.14); }
.account-password-identity > div:last-child { min-width: 0; display: grid; gap: 2px; }
.account-password-identity small { color: rgba(255,255,255,.54); font-size: 9px; }
.account-password-identity strong { overflow: hidden; color: white; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.account-password-identity em { overflow: hidden; color: rgba(255,255,255,.62); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.account-password-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.account-password-card { padding: 24px 26px 26px; }
.account-password-card-head { margin-bottom: 22px; padding-bottom: 17px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.account-password-card-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 9px; color: #056ee1; background: #eef6ff; }
.account-password-card-head > div:last-child { display: grid; gap: 3px; }
.account-password-card-head strong { font-size: 15px; }
.account-password-card-head span { color: var(--muted); font-size: 10px; }
.account-password-card label { display: grid; gap: 7px; margin-bottom: 15px; }
.account-password-card label > span { color: #2c445e; font-size: 12px; font-weight: 700; }
.account-password-card input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #d6e0eb; border-radius: 7px; color: var(--ink); background: #fbfcfe; outline: 0; }
.account-password-card input:focus { border-color: #287ce5; background: #fff; box-shadow: 0 0 0 3px rgba(5,110,225,.1); }
.account-password-message { min-height: 38px; margin: 2px 0 14px; padding: 9px 11px; display: flex; align-items: center; gap: 7px; border-radius: 7px; font-size: 11px; }
.account-password-message[hidden] { display: none; }
.account-password-message.error { border: 1px solid #f0c9ce; color: #ad3545; background: #fff5f6; }
.account-password-message.success { border: 1px solid #b8dfd0; color: #137155; background: #effaf6; }
.account-password-submit { width: 100%; height: 44px; justify-content: center; }
.account-password-guide { padding: 22px; }
.account-password-guide-head { padding-bottom: 14px; display: grid; gap: 3px; border-bottom: 1px solid var(--line); }
.account-password-guide-head strong { font-size: 14px; }
.account-password-guide-head span { color: var(--muted); font-size: 10px; }
.account-password-rules { padding: 16px 0; display: grid; gap: 10px; border-bottom: 1px solid var(--line); }
.account-password-rules > span { display: flex; align-items: center; gap: 8px; color: #7d8e9f; font-size: 11px; }
.account-password-rules i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #cbd4de; }
.account-password-rules > span.valid { color: #147255; }
.account-password-rules > span.valid i { background: #1d9c72; box-shadow: 0 0 0 3px rgba(29,156,114,.1); }
.account-password-notes { padding-top: 16px; display: grid; gap: 14px; }
.account-password-notes > div { display: flex; align-items: flex-start; gap: 9px; color: #4d6d8c; }
.account-password-notes svg { margin-top: 1px; flex: 0 0 auto; color: #287ce5; }
.account-password-notes span { display: grid; gap: 3px; }
.account-password-notes strong { color: #314b65; font-size: 11px; }
.account-password-notes small { color: #7d8e9f; font-size: 10px; line-height: 1.55; }
@media (max-width: 760px) {
  .account-password-hero { align-items: flex-start; flex-direction: column; padding: 22px; }
  .account-password-identity { width: 100%; min-width: 0; }
  .account-password-layout { grid-template-columns: 1fr; }
  .account-password-card, .account-password-guide { padding: 20px; }
}

.clear-data-page { width: min(980px,100%); margin: 0 auto; display: grid; gap: 16px; }
.danger-hero { min-height: 138px; padding: 26px 28px; display: flex; align-items: center; gap: 18px; border: 1px solid #f0d3d3; border-radius: 10px; color: #4e1d25; background: linear-gradient(120deg,#fff8f8,#fff0f1); box-shadow: 0 12px 34px rgba(133,41,53,.07); }
.danger-icon { width: 54px; height: 54px; flex: 0 0 54px; display: grid; place-items: center; border-radius: 10px; color: white; background: #b74250; box-shadow: 0 10px 24px rgba(183,66,80,.2); }
.danger-hero span { color: #b74250; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; }
.danger-hero h2 { margin: 5px 0; font-size: 24px; }
.danger-hero p { margin: 0; color: #80535a; font-size: 12px; }
.clear-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.clear-summary-grid > div { padding: 17px 18px; border: 1px solid #e1e6ed; border-radius: 8px; background: white; }
.clear-summary-grid span, .clear-summary-grid strong { display: block; }
.clear-summary-grid span { color: var(--muted); font-size: 10px; }
.clear-summary-grid strong { margin-top: 5px; color: #8f303c; font-size: 23px; }
.clear-data-card { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; border: 1px solid #dde5ed; border-radius: 9px; background: white; }
.clear-data-card > div { padding: 21px 23px; }
.clear-data-card > div + div { border-left: 1px solid #e4e9ef; background: #f8fafc; }
.clear-data-card strong { font-size: 13px; }
.clear-data-card ul { margin: 12px 0 0; padding-left: 18px; color: #667789; font-size: 11px; line-height: 2; }
.clear-data-preserved strong { color: #29704d; }
.clear-confirm-card { padding: 23px; border: 1px solid #e7c9cd; border-radius: 9px; background: white; box-shadow: 0 12px 30px rgba(118,38,48,.06); }
.clear-confirm-head strong, .clear-confirm-head span { display: block; }
.clear-confirm-head strong { font-size: 15px; }
.clear-confirm-head span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.clear-password-field { max-width: 520px; margin-top: 18px; display: grid; gap: 7px; }
.clear-password-field span { font-size: 12px; font-weight: 700; }
.clear-password-field input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #ddc5c8; border-radius: 6px; outline: 0; }
.clear-password-field input:focus { border-color: #b74250; box-shadow: 0 0 0 3px rgba(183,66,80,.1); }
.clear-aware { margin: 16px 0; display: flex; align-items: center; gap: 9px; color: #6d5559; font-size: 11px; }
.clear-aware input { width: 17px; height: 17px; accent-color: #b74250; }
.clear-submit { min-height: 43px; border-color: #a93443; color: white; background: #b74250; box-shadow: 0 9px 20px rgba(183,66,80,.18); }
.clear-submit:hover { color: white; background: #a93443; }
.clear-submit:disabled { opacity: .62; cursor: wait; }

.salary-form-page { width: 100%; min-width: 0; display: grid; gap: 16px; }
.salary-page-hero { background: linear-gradient(120deg, #0b1f33, #15365b 63%, #075fbd); }
.salary-header-card { min-width: 0; }
.salary-header-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; padding-bottom: 18px; }
.salary-header-grid label { min-width: 0; display: grid; gap: 7px; color: #33485f; font-size: 12px; font-weight: 700; }
.salary-header-grid label > span { min-height: 18px; }
.salary-header-grid input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fbfcfe; outline: 0; }
.salary-header-grid input:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px rgba(5,110,225,.09); }
.salary-header-grid input[readonly] { color: #62768b; background: #f2f5f8; }
.salary-detail-card { min-width: 0; overflow: hidden; }
.salary-sheet-heading { border-radius: 9px 9px 0 0; }
.salary-quickbar { min-height: 72px; padding: 13px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #e4eaf1; background: #fbfcfe; }
.salary-quick-copy { flex: 0 0 auto; }
.salary-quick-copy strong, .salary-quick-copy span { display: block; }
.salary-quick-copy strong { font-size: 12px; }
.salary-quick-copy span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.salary-quick-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.btn-primary-soft { border-color: #c9ddf8; color: var(--accent); background: #edf5ff; }
.btn-primary-soft:hover { border-color: #9ec5f5; background: #e2efff; }
.salary-edit-notice { padding: 12px 20px; border-bottom: 1px solid #d9e4f2; color: #466682; background: #f0f6fd; font-size: 11px; }
.salary-table-wrap { max-height: min(66vh,720px); overflow: auto; border-bottom: 1px solid #dfe6ee; background: white; scrollbar-width: thin; scrollbar-color: #b7c5d4 #eef2f6; }
.salary-entry-table { width: 4271px; min-width: 4271px; max-width: 4271px; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.salary-entry-table th, .salary-entry-table td { max-width: none; border-right: 1px solid #e6ebf1; border-bottom: 1px solid #e6ebf1; overflow: visible; text-overflow: clip; }
.salary-entry-table th:last-child, .salary-entry-table td:last-child { border-right: 0; }
.salary-entry-table th { height: 39px; padding: 0 9px; text-align: center; }
.salary-entry-table td { height: 56px; padding: 7px; background: white; text-align: center; }
.salary-entry-table tbody tr:hover td { background: #f8fbff; }
.salary-entry-table .salary-group-row th { position: sticky; top: 0; z-index: 7; height: 35px; border-top: 0; color: #3b536d; background: #eff3f8; font-size: 10px; letter-spacing: .5px; }
.salary-entry-table .salary-label-row th { position: sticky; top: 35px; z-index: 6; height: 42px; color: #5e7186; background: #f8fafc; }
.salary-entry-table .salary-group.identity { color: #155b9e; background: #e9f3ff; }
.salary-entry-table .salary-group.income { color: #2f6d51; background: #eaf6f0; }
.salary-entry-table .salary-group.insurance { color: #735d2f; background: #f8f2e7; }
.salary-entry-table .salary-group.employer-insurance { color: #315b75; background: #eaf2f7; }
.salary-entry-table .salary-group.special { color: #6d4d85; background: #f3edf8; }
.salary-entry-table .salary-group.settlement { color: #8a514f; background: #faeeee; }
.salary-entry-table col:nth-child(1) { width: 40px; }
.salary-entry-table col:nth-child(2) { width: 146px; }
.salary-entry-table col:nth-child(3) { width: 88px; }
.salary-entry-table col:nth-child(4) { width: 98px; }
.salary-entry-table col:nth-child(5), .salary-entry-table col:nth-child(6) { width: 112px; }
.salary-entry-table col:nth-child(7) { width: 166px; }
.salary-entry-table col:nth-child(n+8):nth-child(-n+35) { width: 105px; }
.salary-entry-table col:nth-child(15):nth-child(15) { width: 136px; }
.salary-entry-table col:nth-child(36) { width: 116px; }
.salary-entry-table col:nth-child(37) { width: 118px; }
.salary-entry-table col:nth-child(38) { width: 126px; }
.salary-entry-table col:nth-child(39) { width: 116px; }
.salary-entry-table col:nth-child(40) { width: 62px; }
.salary-entry-table th.salary-sticky-one, .salary-entry-table td.salary-sticky-one { padding-right: 4px; padding-left: 4px; }
.salary-entry-table .salary-sticky-one { position: sticky !important; left: 0; z-index: 10 !important; }
.salary-entry-table td.salary-sticky-one { background: #fbfcfe; box-shadow: 1px 0 0 #dfe6ee; }
.salary-entry-table .salary-sticky-two { position: sticky !important; left: 40px; z-index: 9 !important; }
.salary-entry-table td.salary-sticky-two { background: #fbfcfe; box-shadow: 4px 0 8px rgba(11,31,51,.055); }
.salary-entry-table tbody tr:hover td.salary-sticky-one,
.salary-entry-table tbody tr:hover td.salary-sticky-two { background: #f3f8ff; }
.salary-entry-table input, .salary-entry-table select { width: 100%; height: 34px; padding: 0 7px; border: 1px solid #d8e1eb; border-radius: 4px; color: #20364d; background: white; outline: 0; font-size: 11px; }
.salary-entry-table input:focus, .salary-entry-table select:focus { position: relative; z-index: 2; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(5,110,225,.1); }
.salary-entry-table input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.salary-entry-table .row-action { margin: auto; color: #a84750; }
.salary-row-index { width: 23px; height: 23px; margin: auto; display: grid; place-items: center; border-radius: 50%; color: #315171; background: #eaf1f8; font-size: 9px; font-weight: 800; }
.salary-auto-value, .salary-auto-name, .salary-id-value { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.salary-auto-value { color: #536a80; font-size: 11px; }
.salary-auto-name { color: #213a53; font-size: 11px; }
.salary-id-value { color: #61758a; font-size: 10px; }
.salary-computed { width: 100%; min-width: 0; min-height: 34px; padding: 0 8px; display: flex; align-items: center; justify-content: flex-end; overflow: hidden; border: 1px solid #cfe1d7; border-radius: 4px; color: #246245; background: #eff8f3; font-weight: 800; font-size: 10.5px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.salary-computed.salary-net { border-color: #c9ddf8; color: #075ebc; background: #edf5ff; }
.salary-computed.negative { border-color: #efced2; color: #b33947; background: #fff1f2; }
.salary-tax-control { display: grid; grid-template-columns: minmax(0,1fr) 34px; gap: 4px; }
.salary-tax-control button { height: 34px; padding: 0; border: 1px solid #d2deec; border-radius: 4px; color: #58718b; background: #f3f7fb; cursor: pointer; font-size: 9px; }
.salary-tax-control button:hover { color: var(--accent); border-color: #a9c9ef; background: #eaf3ff; }
.salary-empty { min-height: 150px; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); }
.salary-empty strong { color: #334c65; font-size: 13px; }
.salary-empty span { font-size: 10px; }
.salary-sheet-foot { min-height: 78px; padding: 13px 20px; display: grid; grid-template-columns: repeat(7,minmax(88px,122px)) minmax(260px,1fr); align-items: center; gap: 10px; background: #fafbfd; }
.salary-sheet-foot > div { min-width: 0; padding-left: 13px; border-left: 2px solid #d6e3f3; }
.salary-sheet-foot strong, .salary-sheet-foot span { display: block; }
.salary-sheet-foot strong { overflow: hidden; color: #183a5d; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.salary-sheet-foot span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.salary-sheet-foot p { margin: 0; color: #6b7c8d; font-size: 10px; line-height: 1.65; }
.salary-sheet-foot a { color: var(--accent); font-weight: 700; }
.salary-sheet-foot a:hover { text-decoration: underline; }
.salary-submit-bar > div { display: flex; gap: 8px; }
.salary-list-toolbar { align-items: flex-end; }
.salary-list-toolbar .toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
.toolbar-month, .toolbar-select { height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; outline: 0; }
.toolbar-month { width: 154px; min-width: 154px; }
.toolbar-month:focus, .toolbar-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.salary-list-table { min-width: 1700px; table-layout: fixed; }
.salary-list-table th:nth-child(1) { width: 104px; }
.salary-list-table th:nth-child(2) { width: 94px; }
.salary-list-table th:nth-child(3) { width: 104px; }
.salary-list-table th:nth-child(4) { width: 105px; }
.salary-list-table th:nth-child(5) { width: 112px; }
.salary-list-table th:nth-child(n+6):nth-child(-n+11) { width: 108px; }
.salary-list-table th:nth-child(12), .salary-list-table th:nth-child(13) { width: 92px; }
.salary-list-table th:nth-child(14) { width: 146px; }
.salary-list-table th:nth-child(15) { width: 116px; }
.salary-list-cost { color: #1d5d78; font-weight: 750; }
.salary-unrecorded { color: #9a7a35; font-size: 10px; white-space: nowrap; }
.salary-employer-missing { padding: 14px 16px; border: 1px dashed #d9c99e; border-radius: 8px; color: #8e7134; background: #fffaf0; }
.salary-list-net { color: #075ebc; font-weight: 800; font-variant-numeric: tabular-nums; }
.salary-status { padding: 4px 9px; display: inline-flex; align-items: center; border-radius: 999px; color: #4a6783; background: #edf2f7; font-size: 10px; font-weight: 750; }
.salary-status.draft { color: #24634a; background: #e7f5ed; }
.salary-status.warning { color: #995c17; background: #fff0d6; }
.salary-status.pending { color: #7752a0; background: #f1eafa; }
.salary-status.approved { color: #0b63ae; background: #e4f1ff; }
.salary-locked { min-width: 48px; padding: 4px 7px; display: inline-flex; justify-content: center; color: #7e8c9c; border-radius: 4px; background: #eef1f4; font-size: 9px; }
.salary-detail-drawer { width: min(1020px,98vw) !important; }
.salary-detail-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.salary-detail-summary > div { padding: 14px 16px; border: 1px solid #dce5ef; border-radius: 7px; background: white; }
.salary-detail-summary span, .salary-detail-summary strong { display: block; }
.salary-detail-summary span { color: var(--muted); font-size: 10px; }
.salary-detail-summary strong { margin-top: 3px; color: #1d4267; font-size: 17px; }

.reimbursement-toolbar { align-items: flex-end; }
.reimbursement-search-actions { flex-wrap: wrap; }
.toolbar-select { height: 40px; min-width: 126px; padding: 0 32px 0 11px; border: 1px solid var(--line); border-radius: 5px; color: #294057; background: white; outline: none; }
.reimbursement-panel { margin-bottom: 18px; }
.reimbursement-table { min-width: 1180px; table-layout: fixed; }
.reimbursement-table th:nth-child(1) { width: 105px; }
.reimbursement-table th:nth-child(2) { width: 120px; }
.reimbursement-table th:nth-child(3) { width: 220px; }
.reimbursement-table th:nth-child(4) { width: 72px; }
.reimbursement-table th:nth-child(5) { width: 118px; }
.reimbursement-table th:nth-child(6) { width: 95px; }
.reimbursement-table th:nth-child(7) { width: 145px; }
.reimbursement-table th:nth-child(8) { width: 92px; }
.reimbursement-table th:nth-child(9) { width: 105px; }
.reimbursement-description { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.money-cell { color: #153b61; font-variant-numeric: tabular-nums; font-weight: 760; white-space: nowrap; }
.invoice-count { min-width: 40px; padding: 4px 7px; display: inline-flex; justify-content: center; border-radius: 4px; color: #4e6174; background: #eff3f7; font-size: 10px; font-weight: 720; }
.reimbursement-status { min-width: 62px; padding: 5px 8px; display: inline-flex; justify-content: center; border-radius: 999px; font-size: 10px; font-weight: 760; white-space: nowrap; }
.reimbursement-status.pending { color: #875411; background: #fff2d8; }
.reimbursement-status.returned { color: #a13a3a; background: #fde8e8; }
.reimbursement-status.approved { color: #087343; background: #e4f6eb; }
.reimbursement-status.paying { color: #155fa0; background: #e7f2fd; }
.reimbursement-summary-grid { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.reimbursement-summary-grid article { padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #dce5ee; border-radius: 7px; background: white; box-shadow: 0 3px 10px rgba(13,41,65,.03); }
.reimbursement-summary-grid span { color: var(--muted); font-size: 11px; }
.reimbursement-summary-grid strong { color: #16426d; font-size: 22px; font-variant-numeric: tabular-nums; }
.reimbursement-category-panel { overflow: hidden; }
.reimbursement-category-panel .panel-head { padding: 17px 19px; }
.reimbursement-category-grid { padding: 0 19px 19px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.reimbursement-category-grid article { min-width: 0; padding: 14px 15px; border: 1px solid #dfe6ed; border-radius: 7px; background: #fbfcfe; }
.reimbursement-category-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.reimbursement-category-grid article strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.reimbursement-category-grid article span { flex: 0 0 auto; color: #7590aa; font-size: 9px; }
.reimbursement-category-grid article p { min-height: 30px; margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.reimbursement-category-empty { grid-column: 1 / -1; min-height: 100px; display: grid; place-items: center; border: 1px dashed #ccd7e2; border-radius: 7px; color: var(--muted); background: #fafcfd; font-size: 11px; }
.reimbursement-modal-backdrop { overflow-y: auto; align-items: start; }
.reimbursement-dialog { width: min(960px,calc(100vw - 36px)); max-height: calc(100vh - 40px); margin: 0 auto; overflow: hidden; display: flex; flex-direction: column; border-radius: 10px; background: white; box-shadow: 0 28px 78px rgba(6,21,37,.24); }
.reimbursement-dialog-head { min-height: 87px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #dfe6ed; background: linear-gradient(135deg,#f8fbff,#f5faf8); }
.reimbursement-dialog-head > div { min-width: 0; }
.reimbursement-dialog-head span { display: block; margin-bottom: 3px; color: #5481aa; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.reimbursement-dialog-head h3 { margin: 0; color: #15324f; font-size: 20px; }
.reimbursement-dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.reimbursement-dialog-body { padding: 20px 22px; overflow-y: auto; background: #f8fafc; }
.reimbursement-base-grid { padding: 18px 18px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; border: 1px solid #dee6ee; border-radius: 8px; background: white; }
.reimbursement-invoice-section { margin-top: 16px; overflow: hidden; border: 1px solid #dee6ee; border-radius: 8px; background: white; }
.reimbursement-section-head { min-height: 61px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e1e8ef; }
.reimbursement-section-head strong, .reimbursement-section-head span { display: block; }
.reimbursement-section-head strong { color: #1d3b59; font-size: 13px; }
.reimbursement-section-head span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.reimbursement-invoice-head, .reimbursement-invoice-row { display: grid; grid-template-columns: 52px minmax(340px,1fr) 170px 45px; align-items: center; gap: 10px; }
.reimbursement-invoice-head { min-height: 36px; padding: 0 12px; color: #6c7f91; background: #f2f6f9; font-size: 9px; font-weight: 760; }
.reimbursement-invoice-head span:first-child, .reimbursement-invoice-head span:last-child { text-align: center; }
.reimbursement-invoice-row { min-height: 75px; padding: 10px 12px; border-top: 1px solid #e7edf2; }
.invoice-sequence { width: 30px; height: 30px; margin: auto; display: grid; place-items: center; border-radius: 5px; color: #58738c; background: #edf3f7; font-size: 10px; font-weight: 800; }
.invoice-file-cell { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.invoice-file-main { min-width: 0; }
.invoice-file-main strong, .invoice-file-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invoice-file-main strong { color: #253f58; font-size: 11px; }
.invoice-file-main span { margin-top: 4px; color: #8291a0; font-size: 9px; }
.invoice-file-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }
.invoice-file-actions a { padding: 6px; color: var(--accent); font-size: 10px; font-weight: 700; }
.invoice-amount-cell > span { display: block; margin-bottom: 4px; color: #8391a0; font-size: 9px; }
.invoice-amount-cell > div { height: 38px; display: flex; align-items: center; overflow: hidden; border: 1px solid #ccd7e2; border-radius: 6px; background: white; }
.invoice-amount-cell b { padding-left: 9px; color: #6f8295; font-size: 11px; }
.invoice-amount-cell input { width: 100%; height: 100%; padding: 0 9px 0 5px; border: 0; outline: 0; background: transparent; font-variant-numeric: tabular-nums; }
.invoice-remove { justify-self: center; color: var(--danger); }
.reimbursement-total { margin-top: 15px; min-height: 74px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #cfe2dc; border-radius: 8px; background: #f1faf7; }
.reimbursement-total span, .reimbursement-total small { display: block; }
.reimbursement-total span { color: #27483f; font-size: 12px; font-weight: 760; }
.reimbursement-total small { margin-top: 3px; color: #719087; font-size: 9px; }
.reimbursement-total output { color: #087343; font-size: 25px; font-weight: 820; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reimbursement-dialog-foot { min-height: 68px; padding: 13px 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #dfe6ed; background: white; }
.reimbursement-dialog-foot > span { color: var(--muted); font-size: 10px; }
.reimbursement-dialog-foot > div { display: flex; align-items: center; gap: 8px; }
.reimbursement-status-dialog { width: min(520px,calc(100vw - 36px)); overflow: hidden; border-radius: 10px; background: white; box-shadow: 0 28px 78px rgba(6,21,37,.24); }
.reimbursement-status-body, .reimbursement-category-form { padding: 22px; }
.reimbursement-status-body label, .reimbursement-status-body small { display: block; }
.reimbursement-status-body label { margin-bottom: 7px; color: #294057; font-size: 11px; font-weight: 700; }
.reimbursement-status-body select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.reimbursement-status-body small { margin-top: 8px; color: var(--muted); font-size: 9px; }
.reimbursement-detail-drawer { width: min(880px,96vw); }
.reimbursement-detail-table { min-width: 690px; }

#toast-root { position: fixed; right: 22px; top: 22px; z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 380px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #cbdcf1; border-radius: 7px; background: rgba(255,255,255,.97); box-shadow: 0 15px 35px rgba(6,21,37,.15); animation: toastIn .2s ease-out; }
.toast-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--accent); }
.toast.error { border-color: #efd0d0; }
.toast.error .toast-dot { background: var(--danger); }
.toast span { font-size: 12px; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } }

.loading-row td { text-align: center; color: var(--muted); }
.skeleton { border-radius: 7px; background: linear-gradient(90deg, #eef3f2, #f8fbfa, #eef3f2); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.form-grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0 18px; }
.sales-order-form-page { width: 100%; max-width: none; margin: 0; }
.sales-order-page-hero { background: linear-gradient(120deg,#0b1f33,#173b62 66%,#0869c5); }
.sales-order-section { width: 100%; min-width: 0; max-width: 100%; }
.sales-order-basic-grid { align-items: start; }
.sales-customer-preview { margin-bottom: 18px; overflow: hidden; border: 1px solid #dce6ef; border-radius: 7px; background: #f8fbfe; }
.sales-customer-empty { min-height: 78px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #8294a6; font-size: 11px; }
.sales-customer-empty svg { color: #5286bd; }
.sales-customer-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.sales-customer-grid > div { min-height: 68px; padding: 13px 15px; border-right: 1px solid #e1e9f0; border-bottom: 1px solid #e1e9f0; }
.sales-customer-grid > div:nth-child(4n) { border-right: 0; }
.sales-customer-grid > div.wide { grid-column: span 2; }
.sales-customer-grid span, .sales-customer-grid strong { display: block; }
.sales-customer-grid span { color: #7a8c9d; font-size: 9px; }
.sales-customer-grid strong { margin-top: 5px; overflow: hidden; color: #253f59; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sales-order-lines-head .btn { margin-left: auto; }
.sales-order-lines-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; }
.sales-order-lines-table { min-width: 1780px; }
.order-entry-lines-table {
  width: max(100%, 1780px);
  table-layout: fixed;
}
.order-entry-lines-table [data-sales-name],
.order-entry-lines-table [data-sales-spec],
.order-entry-lines-table [data-purchase-name],
.order-entry-lines-table [data-purchase-spec] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sales-order-lines-table th { padding: 0 10px; }
.sales-order-lines-table td { height: 60px; max-width: none; padding: 9px 10px; }
.sales-order-lines-table th:nth-child(1), .sales-order-lines-table td:nth-child(1) { width: 48px; text-align: center; }
.sales-order-lines-table th:nth-child(2), .sales-order-lines-table td:nth-child(2) { width: 205px; }
.sales-order-lines-table th:nth-child(3), .sales-order-lines-table td:nth-child(3) { width: 155px; }
.sales-order-lines-table th:nth-child(4), .sales-order-lines-table td:nth-child(4) { width: 150px; }
.sales-order-lines-table th:nth-child(5), .sales-order-lines-table td:nth-child(5) { width: 140px; }
.sales-order-lines-table th:nth-child(6), .sales-order-lines-table td:nth-child(6) { width: 72px; }
.sales-order-lines-table th:nth-child(7), .sales-order-lines-table td:nth-child(7) { width: 105px; }
.sales-order-lines-table th:nth-child(8), .sales-order-lines-table td:nth-child(8) { width: 120px; }
.sales-order-lines-table th:nth-child(9), .sales-order-lines-table td:nth-child(9) { width: 75px; text-align: center; }
.sales-order-lines-table th:nth-child(10), .sales-order-lines-table td:nth-child(10) { width: 115px; }
.sales-order-lines-table th:nth-child(11), .sales-order-lines-table td:nth-child(11) { width: 140px; }
.sales-order-lines-table th:nth-child(12), .sales-order-lines-table td:nth-child(12) { width: 180px; }
.sales-order-lines-table th:nth-child(13), .sales-order-lines-table td:nth-child(13) { width: 55px; text-align: center; }
.sales-order-lines-table [data-sales-material],
.sales-order-lines-table [data-stock-material],
.sales-order-lines-table [data-purchase-material],
.sales-order-lines-table [data-inbound-material],
.sales-order-lines-table [data-return-material] { overflow: hidden; color: #49677f; font-size: 10px; text-overflow: ellipsis; word-break: break-all; }
.sales-order-lines-table select, .sales-order-lines-table input { width: 100%; height: 38px; min-width: 0; padding: 0 9px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: var(--ink); outline: 0; }
.sales-order-lines-table select:focus, .sales-order-lines-table input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.sales-line-sequence { color: #698096; font-weight: 760; }
.sales-line-money { color: #174672; font-variant-numeric: tabular-nums; font-weight: 760; }
.sales-tax-badge { min-width: 42px; padding: 4px 7px; display: inline-flex; justify-content: center; border-radius: 999px; color: #075ebc; background: #e5f0ff; font-size: 10px; font-weight: 760; }
.sales-order-lines-table tfoot td, .sales-order-detail-lines tfoot td { height: 50px; border-top: 1px solid #dce5ee; background: #f5f8fb; }
.sales-order-grand-total { color: #075ebc; font-size: 14px; }
.sales-order-code-cell { display: grid; justify-items: start; gap: 5px; }
.status.progress { color: #674ca2; background: #eee9fb; }
.business-page-toolbar { margin-bottom: 12px; }
.business-filter-bar { margin-bottom: 16px; padding: 14px 15px; display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); align-items: end; gap: 10px; border: 1px solid #dce5ed; border-radius: 8px; background: #f8fafc; box-shadow: 0 4px 14px rgba(10,31,51,.035); }
.business-filter-bar label { min-width: 0; display: grid; grid-template-rows: auto 38px; align-items: end; }
.business-filter-bar label > span { margin-bottom: 5px; display: block; color: #61758a; font-size: 9px; font-weight: 720; }
.business-filter-bar input, .business-filter-bar select { width: 100%; min-width: 0; max-width: 100%; height: 38px; margin: 0; padding: 0 9px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: var(--ink); outline: 0; vertical-align: middle; }
.business-filter-bar input:focus, .business-filter-bar select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.business-keyword { grid-column: span 2; }
.business-query-button { min-width: 84px; height: 38px; }
.inventory-page-toolbar { margin-bottom: 12px; }
.inventory-filter-bar { margin-bottom: 16px; padding: 15px; display: grid; grid-template-columns: minmax(230px,1fr) minmax(280px,1.3fr) minmax(220px,.9fr) auto; align-items: end; gap: 12px; border: 1px solid #dce5ed; border-radius: 8px; background: #f8fafc; box-shadow: 0 4px 14px rgba(10,31,51,.035); }
.inventory-filter-field { min-width: 0; }
.inventory-filter-field > span { margin-bottom: 5px; display: block; color: #61758a; font-size: 9px; font-weight: 720; }
.inventory-warehouse-filter { position: relative; }
.inventory-warehouse-filter summary { height: 38px; padding: 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: #2f465d; cursor: pointer; list-style: none; }
.inventory-warehouse-filter summary::-webkit-details-marker { display: none; }
.inventory-warehouse-filter[open] summary { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.inventory-warehouse-filter summary strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.inventory-warehouse-filter summary > span { color: #71859a; font-size: 13px; }
.inventory-warehouse-options { position: absolute; z-index: 150; top: calc(100% + 5px); left: 0; right: 0; max-height: 260px; overflow-y: auto; padding: 6px; border: 1px solid #cbd8e5; border-radius: 7px; background: white; box-shadow: 0 16px 38px rgba(7,28,49,.18); }
.inventory-warehouse-options label { min-height: 42px; padding: 7px 9px; display: flex; align-items: center; gap: 9px; border-radius: 5px; cursor: pointer; }
.inventory-warehouse-options label:hover { background: #edf5ff; }
.inventory-warehouse-options input { width: 15px; height: 15px; accent-color: var(--accent); }
.inventory-warehouse-options label > span { min-width: 0; display: grid; gap: 2px; color: #52687e; font-size: 9px; }
.inventory-warehouse-options label > span strong { color: #233c55; font-size: 11px; }
.inventory-filter-empty { padding: 14px; color: #8192a2; text-align: center; font-size: 10px; }
.inventory-product-filter select { width: 100%; height: 38px; padding: 0 9px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: var(--ink); outline: 0; }
.inventory-product-filter .searchable-select-input { height: 38px; padding: 0 30px 0 11px !important; border: 1px solid #ccd7e2; border-radius: 5px; background-color: white; color: var(--ink); outline: 0; }
.inventory-keyword-filter input { width: 100%; height: 38px; padding: 0 11px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: var(--ink); outline: 0; }
.inventory-keyword-filter input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.inventory-query-button { min-width: 100px; height: 38px; }
.inventory-result-table { min-width: 1120px; }
.inventory-result-table td:nth-child(4) { min-width: 180px; }
.inventory-result-table td:nth-child(5) { min-width: 135px; }
.table-sort-button { padding: 0; display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; white-space: nowrap; }
.table-sort-button span { color: #0b6cc4; font-size: 12px; }
.business-detail-row { cursor: zoom-in; }
.purchase-tracking-table { min-width: 2450px; }
.purchase-tracking-table th, .purchase-tracking-table td { white-space: nowrap; }
.purchase-tracking-table td:nth-child(8),
.purchase-tracking-table td:nth-child(9),
.purchase-tracking-table td:nth-child(22) { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.purchase-received-quantity { color: #087343; font-weight: 760; }
.purchase-unreceived-quantity { color: #a15c16; font-weight: 760; }
.purchase-receipt-state { display: inline; font-weight: 760; white-space: nowrap; }
.purchase-receipt-state.complete { color: #08785e; }
.purchase-receipt-state.progress { color: #2f6c97; }
.purchase-receipt-state.pending { color: #95661c; }
.purchase-receipt-state.overdue { color: #b33c48; }
.purchase-progress-cell { width: 100%; min-width: 0; display: grid; grid-template-rows: 10px 7px; align-content: center; gap: 3px; }
.purchase-progress-summary { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.purchase-progress-summary .purchase-receipt-state { min-width: 0; overflow: hidden; font-size: 9px; font-style: normal; line-height: 10px; text-overflow: ellipsis; }
.purchase-progress-cell > .purchase-progress-track { width: 100%; height: 7px; overflow: hidden; border-radius: 999px; background: #e8eef4; }
.purchase-progress-cell > .purchase-progress-track i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#2f6cff,#19aebd); transition: width .18s ease; }
.purchase-progress-cell strong { flex: 0 0 auto; color: #466077; font-size: 9px; font-variant-numeric: tabular-nums; line-height: 10px; text-align: right; }
.purchase-progress-cell.complete > .purchase-progress-track i { background: linear-gradient(90deg,#14835f,#42ae82); }
.purchase-progress-cell.complete strong { color: #08785e; }
.purchase-progress-cell.pending > .purchase-progress-track i { background: #a8b4c2; }
.purchase-progress-cell.pending strong { color: #73818e; }
.purchase-progress-cell.overdue > .purchase-progress-track i { background: linear-gradient(90deg,#d94b55,#e28b45); }
.purchase-progress-cell.overdue strong { color: #b33c48; }
.purchase-progress-cell.cancelled > .purchase-progress-track i { background: #b9c1c8; }
.purchase-progress-cell.cancelled strong,
.purchase-receipt-state.cancelled { color: #7c878f; }
.status.overdue { color: #a63843; background: #fde8ea; }
.purchase-line-overdue td:first-child { box-shadow: inset 3px 0 #d94b55; }
.business-detail-row:hover td { background: #f2f7fd; }
.unapprove-action { width: auto; min-width: 30px; padding: 0 7px; color: #9a5a09; background: #fff7e8; font-size: 10px; font-weight: 800; }
.sales-order-list-table { min-width: 1480px; }
.sales-order-detail-drawer { width: min(1180px,97vw); }
.sales-order-detail-lines { padding: 0; overflow: hidden; }
.sales-order-detail-lines h3 { padding: 15px 17px; }
.sales-order-detail-lines table { min-width: 1350px; }
.sales-tracking-table { min-width: 2500px; }
.sales-tracking-table th, .sales-tracking-table td { padding-left: 11px; padding-right: 11px; }
.sales-tracking-table td:nth-child(7) { max-width: 200px; }
.sales-tracking-table th:nth-child(10),
.sales-tracking-table td:nth-child(10) { min-width: 230px; }
.sales-tracking-table th:nth-child(12),
.sales-tracking-table td:nth-child(12) { min-width: 190px; }
.sales-supply-progress { display: grid; gap: 3px; min-width: 215px; }
.sales-supply-progress-head { align-items: center; display: flex; gap: 6px; min-width: 0; }
.supply-progress-badge { align-items: center; background: #fff6e7; border: 1px solid #ead1a5; border-radius: 99px; color: #956018; display: inline-flex; flex: 0 0 auto; font-size: 9px; font-weight: 780; min-height: 21px; padding: 4px 7px; white-space: nowrap; }
.supply-progress-badge.active { background: #eaf4fb; border-color: #bdd6e4; color: #306d81; }
.supply-progress-badge.complete { background: #eaf8f2; border-color: #bce0d2; color: #147157; }
.sales-supply-progress-facts { display: flex; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; }
.sales-supply-progress-facts > span { align-items: baseline; background: #f5f8fa; border: 1px solid #e0e8ec; border-radius: 5px; color: #526b72; display: inline-flex; flex: 0 1 auto; gap: 3px; min-height: 20px; min-width: 0; padding: 2px 5px; white-space: nowrap; }
.sales-supply-progress-facts > span.subcontract { background: #edf9f7; border-color: #c7e4df; color: #08756e; }
.sales-supply-progress-facts em { font-size: 9px; font-style: normal; }
.sales-supply-progress-facts strong { color: inherit; font-size: 10px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.sales-supply-shortage { background: #fff5ec; border: 1px solid #efd5bd; border-radius: 99px; color: #ad5c22; font-size: 9px; font-weight: 760; margin-left: auto; padding: 3px 6px; white-space: nowrap; }
.sales-supply-documents { display: grid; gap: 5px; min-width: 170px; }
.sales-supply-documents > span { color: #315d70; display: grid; gap: 2px; min-width: 0; }
.sales-supply-documents > span.subcontract { color: #08756e; }
.sales-supply-documents em { background: #edf4f8; border-radius: 4px; color: inherit; font-family: inherit; font-size: 8px; font-style: normal; justify-self: start; padding: 2px 4px; }
.sales-supply-documents span.subcontract em { background: #e9f8f5; }
.purchase-order-page-hero { background: linear-gradient(120deg,#102821,#145443 66%,#0a8d68); }
.purchase-order-lines-table { min-width: 1980px; }
.purchase-order-lines-table.order-entry-lines-table {
  width: max(100%, 1980px);
}
.purchase-order-lines-table th:nth-child(13), .purchase-order-lines-table td:nth-child(13) { width: 180px; }
.purchase-order-lines-table th:nth-child(14), .purchase-order-lines-table td:nth-child(14) { width: 55px; text-align: center; }
.purchase-order-list-table { min-width: 1480px; }
.purchase-tracking-table { min-width: 2450px; }
.sales-to-purchase-panel table { min-width: 1600px; }
.sales-to-purchase-panel input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.procurement-workbench-hero { margin-bottom: 14px; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden; border: 1px solid #cfdfea; border-radius: 9px; background: linear-gradient(120deg,#f7fbfe 0%,#edf6fa 58%,#f8fbfd 100%); box-shadow: 0 10px 30px rgba(20,67,91,.07); }
.procurement-workbench-hero > div > span { color: #1e8290; font-size: 8px; font-weight: 850; letter-spacing: .16em; }
.procurement-workbench-hero h2 { margin: 5px 0 6px; color: #173b4a; font-size: 21px; }
.procurement-workbench-hero p { margin: 0; color: #627986; font-size: 10px; }
.procurement-kpis { margin-bottom: 14px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.procurement-kpis article { min-width: 0; padding: 14px 15px; display: grid; gap: 3px; border: 1px solid #dce7ec; border-radius: 8px; background: white; box-shadow: 0 5px 17px rgba(16,52,69,.045); }
.procurement-kpis article > span { color: #69808c; font-size: 8px; font-weight: 730; }
.procurement-kpis article > strong { color: #173f50; font-size: 18px; line-height: 1.2; }
.procurement-kpis article > small { overflow: hidden; color: #81939c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.procurement-kpis article.risk { border-color: #f0d6d1; background: #fff9f7; }
.procurement-kpis article.risk > strong { color: #b34d42; }
.procurement-kpis article.profit { border-color: #cfe7dd; background: #f7fcfa; }
.procurement-kpis article.profit > strong { color: #08765c; }
.sales-purchase-filter { grid-template-columns: repeat(4,minmax(145px,1fr)) minmax(210px,1.35fr) auto; }
.procurement-selection-bar { margin: 0 0 10px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #dbe6eb; border-radius: 7px; background: #f8fbfc; }
.procurement-selection-bar span { color: #27536a; font-size: 9px; font-weight: 760; }
.procurement-selection-bar small { color: #718792; font-size: 8px; }
.sales-purchase-workbench-table { min-width: 2780px; }
.sales-purchase-workbench-table th,.sales-purchase-workbench-table td { padding-left: 10px; padding-right: 10px; white-space: nowrap; }
.sales-purchase-workbench-table td:nth-child(8) { max-width: 230px; }
.sales-purchase-workbench-table .cell-sub { margin-top: 3px; display: block; overflow: hidden; color: #87969d; font-size: 7px; text-overflow: ellipsis; }
.procurement-risk-row { background: #fffaf8; }
.procurement-status,.procurement-risk { min-width: 58px; padding: 4px 7px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; font-size: 8px; font-weight: 760; white-space: nowrap; }
.procurement-status { color: #55707e; background: #edf2f4; }
.procurement-status.pending { color: #94601b; background: #fff0d6; }
.procurement-status.partial { color: #176aa0; background: #e6f1f8; }
.procurement-status.ordered { color: #5a52a1; background: #eeebfa; }
.procurement-status.done { color: #08745a; background: #e4f6ef; }
.procurement-risk { color: #56717d; background: #edf3f5; }
.procurement-risk i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.procurement-risk.warning { color: #9b681a; background: #fff2dc; }
.procurement-risk.danger,.procurement-risk.overdue { color: #b34146; background: #fde9e9; }
.procurement-risk.done { color: #08745a; background: #e4f6ef; }
.sales-purchase-chain-drawer { width: min(940px,calc(100vw - 30px)); }
.procurement-chain-hero { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.procurement-chain-hero > div { padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid #dce6eb; border-radius: 7px; background: #f8fbfc; }
.procurement-chain-hero > div > span { color: #6b808b; font-size: 8px; font-weight: 700; }
.procurement-chain-hero > div > strong { color: #17485b; font-size: 13px; }
.procurement-document-chain > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.procurement-document-chain span { min-width: 0; padding: 9px 10px; display: grid; grid-template-columns: 85px 1fr; gap: 8px; border: 1px solid #e1e8ec; border-radius: 6px; background: #fbfcfd; color: #526c79; font-size: 8px; }
.procurement-document-chain b { color: #274e61; }
.procurement-change-list article { margin-top: 8px; padding: 10px 11px; border: 1px solid #e0e7eb; border-radius: 7px; background: #fbfcfd; }
.procurement-change-list article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.procurement-change-list article p { margin: 7px 0 5px; color: #355668; font-size: 9px; }
.procurement-change-list article small { color: #7b8f99; font-size: 7px; line-height: 1.5; }
.procurement-change-dialog { width: min(620px,calc(100vw - 30px)); }
.purchase-overbuy-switch { height: 38px; padding: 0 10px; display: flex !important; grid-template-rows: none !important; align-items: center !important; gap: 7px; border: 1px solid #ccd7e2; border-radius: 5px; background: #fbfcfd; }
.purchase-overbuy-switch input { width: 15px; height: 15px; accent-color: var(--accent); }
.purchase-overbuy-switch span { color: #425f6e; font-size: 9px; }
.quote-page-hero { background: linear-gradient(120deg,#30204c,#6849a0 62%,#8a65cb); }
.order-attachment-grid { align-items: start; }
.order-attachment-grid .field { min-width: 0; }
.order-attachment-grid .file-control { min-height: 92px; align-content: center; align-items: center; flex-wrap: wrap; }
.order-attachment-grid .file-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-attachment-grid .file-upload-time { margin-top: 6px; color: #71859a; font-size: 9px; }
.order-detail-attachments { margin-top: 14px; padding-top: 13px; display: flex; flex-wrap: wrap; gap: 9px; border-top: 1px solid #e3eaf0; }
.inbound-lines-table { min-width: 2070px; }
.inbound-lines-table th:nth-child(7), .inbound-lines-table td:nth-child(7),
.inbound-lines-table th:nth-child(8), .inbound-lines-table td:nth-child(8) { width: 95px; }
.inbound-lines-table th:nth-child(9), .inbound-lines-table td:nth-child(9) { width: 120px; }
.inbound-lines-table th:nth-child(10), .inbound-lines-table td:nth-child(10) { width: 75px; text-align: center; }
.inbound-lines-table th:nth-child(11), .inbound-lines-table td:nth-child(11) { width: 115px; }
.inbound-lines-table th:nth-child(12), .inbound-lines-table td:nth-child(12) { width: 185px; }
.inbound-lines-table th:nth-child(13), .inbound-lines-table td:nth-child(13) { width: 180px; }
.inbound-lines-table th:nth-child(14), .inbound-lines-table td:nth-child(14) { width: 55px; text-align: center; }
.inbound-order-actions { margin-bottom: 18px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border: 1px solid #dbe8e2; border-radius: 6px; background: #f5fbf8; }
.inbound-order-actions span { color: #577268; font-size: 10px; }
.purchase-inbound-form-page [data-inbound-total-amount] { color: #0a7f60; font-size: 14px; }
.drawer-foot [data-generate-inbound]:disabled { color: #8a98a8; border-color: #dce3ea; background: #edf1f5; box-shadow: none; cursor: not-allowed; }
.quote-list-panel table { min-width: 1760px; }
.purchase-return-page-hero { background: linear-gradient(120deg,#2a1820,#633038 64%,#a6454f); }
.purchase-return-lines-table { min-width: 2040px; }
.purchase-return-lines-table th:nth-child(1), .purchase-return-lines-table td:nth-child(1) { width: 52px; text-align: center; }
.purchase-return-lines-table th:nth-child(2), .purchase-return-lines-table td:nth-child(2) { width: 225px; }
.purchase-return-lines-table th:nth-child(3), .purchase-return-lines-table td:nth-child(3) { width: 155px; }
.purchase-return-lines-table th:nth-child(4), .purchase-return-lines-table td:nth-child(4) { width: 155px; }
.purchase-return-lines-table th:nth-child(5), .purchase-return-lines-table td:nth-child(5) { width: 145px; }
.purchase-return-lines-table th:nth-child(6), .purchase-return-lines-table td:nth-child(6) { width: 82px; }
.purchase-return-lines-table th:nth-child(7), .purchase-return-lines-table td:nth-child(7) { width: 200px; }
.purchase-return-lines-table th:nth-child(8), .purchase-return-lines-table td:nth-child(8) { width: 105px; text-align: right; }
.purchase-return-lines-table th:nth-child(9), .purchase-return-lines-table td:nth-child(9) { width: 115px; }
.purchase-return-lines-table th:nth-child(10), .purchase-return-lines-table td:nth-child(10) { width: 115px; }
.purchase-return-lines-table th:nth-child(11), .purchase-return-lines-table td:nth-child(11) { width: 85px; text-align: center; }
.purchase-return-lines-table th:nth-child(12), .purchase-return-lines-table td:nth-child(12) { width: 120px; }
.purchase-return-lines-table th:nth-child(13), .purchase-return-lines-table td:nth-child(13) { width: 190px; }
.purchase-return-lines-table th:nth-child(14), .purchase-return-lines-table td:nth-child(14) { width: 55px; text-align: center; }
.sales-stock-lines-table { min-width: 2070px; }
.sales-shipment-lines-table { min-width: 2180px; }
.sales-stock-lines-table th:nth-child(1), .sales-stock-lines-table td:nth-child(1) { width: 52px; text-align: center; }
.sales-stock-lines-table th:nth-child(2), .sales-stock-lines-table td:nth-child(2) { width: 235px; }
.sales-stock-lines-table th:nth-child(3), .sales-stock-lines-table td:nth-child(3) { width: 155px; }
.sales-stock-lines-table th:nth-child(4), .sales-stock-lines-table td:nth-child(4),
.sales-stock-lines-table th:nth-child(5), .sales-stock-lines-table td:nth-child(5) { width: 150px; }
.sales-stock-lines-table th:nth-child(6), .sales-stock-lines-table td:nth-child(6) { width: 80px; }
.sales-stock-lines-table th:nth-child(7), .sales-stock-lines-table td:nth-child(7) { width: 210px; }
.sales-stock-lines-table th:nth-child(8), .sales-stock-lines-table td:nth-child(8) { width: 105px; text-align: right; }
.sales-stock-lines-table th:nth-child(9), .sales-stock-lines-table td:nth-child(9),
.sales-stock-lines-table th:nth-child(10), .sales-stock-lines-table td:nth-child(10),
.sales-stock-lines-table th:nth-child(11), .sales-stock-lines-table td:nth-child(11),
.sales-stock-lines-table th:nth-child(13), .sales-stock-lines-table td:nth-child(13) { width: 120px; }
.sales-stock-lines-table th:nth-child(12), .sales-stock-lines-table td:nth-child(12) { width: 85px; text-align: center; }
.sales-stock-lines-table th:nth-child(14), .sales-stock-lines-table td:nth-child(14) { width: 175px; }
.sales-stock-lines-table th:nth-child(15), .sales-stock-lines-table td:nth-child(15) { width: 55px; text-align: center; }
.sales-return-lines-table th:nth-child(10), .sales-return-lines-table td:nth-child(10) { width: 120px; }
.sales-return-lines-table th:nth-child(11), .sales-return-lines-table td:nth-child(11) { width: 85px; text-align: center; }
.sales-return-lines-table th:nth-child(12), .sales-return-lines-table td:nth-child(12) { width: 120px; }
.sales-return-lines-table th:nth-child(13), .sales-return-lines-table td:nth-child(13) { width: 175px; }
.sales-return-lines-table th:nth-child(14), .sales-return-lines-table td:nth-child(14) { width: 55px; text-align: center; }
.sales-shipment-detail-table { min-width: 2480px; }
.sales-shipment-detail-table th,
.sales-shipment-detail-table td { white-space: nowrap; }
.finance-document-section .computed-input { color: var(--navy); font-weight: 700; }
.finance-document-section .searchable-select { width: 100%; }
.sales-stock-page-hero { background: linear-gradient(135deg,#102a43,#0c6f73 60%,#138a86); }
.return-stock-value { min-width: 74px; padding: 6px 9px; display: inline-flex; justify-content: flex-end; border-radius: 5px; color: #176744; background: #eaf7f0; font-variant-numeric: tabular-nums; }
.return-stock-value.empty { color: #a33c47; background: #fdebed; }
.purchase-return-filter-bar { grid-template-columns: minmax(150px,.7fr) minmax(150px,.7fr) minmax(230px,1fr) minmax(280px,1.35fr) auto; }
.purchase-return-filter-bar .business-keyword { grid-column: auto; }
.purchase-return-list-panel table { min-width: 1520px; }
.purchase-return-list-panel td:nth-child(6),
.purchase-return-list-panel td:nth-child(10) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 今日计划看板 */
.today-plan-page { display: grid; gap: 16px; }
.today-plan-hero {
  position: relative;
  min-height: 158px;
  overflow: hidden;
  padding: 25px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-radius: 10px;
  color: white;
  background:
    linear-gradient(115deg, rgba(8,26,45,.98), rgba(16,52,86,.96) 61%, rgba(5,110,225,.92)),
    radial-gradient(circle at 85% 20%, rgba(109,176,255,.45), transparent 32%);
  box-shadow: 0 14px 34px rgba(9,35,61,.14);
}
.today-plan-hero::before {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -70px;
  top: -205px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 84px rgba(255,255,255,.025);
}
.today-plan-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, #43a1ff, #38d1a0 52%, rgba(255,255,255,0));
}
.today-plan-hero-copy { position: relative; z-index: 1; min-width: 0; }
.today-plan-hero-copy > span {
  color: #8fc2ff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.7px;
}
.today-plan-hero-copy h2 { margin: 5px 0 3px; font-size: 25px; letter-spacing: -.4px; }
.today-plan-hero-copy > p { max-width: 680px; margin: 0; color: rgba(255,255,255,.64); font-size: 11px; }
.today-plan-hero-note {
  min-height: 28px;
  width: fit-content;
  margin-top: 15px;
  padding: 5px 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(143,194,255,.18);
  border-radius: 999px;
  background: rgba(3,19,36,.28);
}
.today-plan-hero-note i { width: 7px; height: 7px; border-radius: 50%; background: #54d7a5; box-shadow: 0 0 0 4px rgba(84,215,165,.12); }
.today-plan-hero-note strong { font-size: 10px; }
.today-plan-hero-note span { color: rgba(255,255,255,.58); font-size: 9px; }
.today-plan-date-card {
  position: relative;
  z-index: 1;
  width: 150px;
  min-height: 110px;
  flex: 0 0 150px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  column-gap: 12px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 8px;
  background: rgba(4,21,38,.32);
  backdrop-filter: blur(7px);
}
.today-plan-date-card > span { grid-column: 1 / -1; color: #91bff1; font-size: 8px; letter-spacing: 1px; }
.today-plan-date-card strong { grid-row: span 2; color: white; font-size: 42px; line-height: 1; letter-spacing: -2px; }
.today-plan-date-card em { align-self: end; color: #d9e9f9; font-size: 10px; font-style: normal; white-space: nowrap; }
.today-plan-date-card small { align-self: start; color: rgba(255,255,255,.43); font-size: 7px; white-space: nowrap; }
.today-plan-scope-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.plan-scope-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  overflow: hidden;
  padding: 13px 15px 12px;
  display: grid;
  gap: 5px;
  border: 1px solid #dce5ee;
  border-radius: 9px;
  background: white;
  text-align: left;
  box-shadow: 0 5px 16px rgba(12,35,57,.045);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.plan-scope-card::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #4e94dc; opacity: 0; }
.plan-scope-card:hover { transform: translateY(-1px); border-color: #b9cce0; box-shadow: 0 10px 23px rgba(10,38,67,.09); }
.plan-scope-card.active { border-color: #9abfe7; background: linear-gradient(145deg,#fff,#f5f9fe); box-shadow: 0 10px 25px rgba(5,91,178,.11); }
.plan-scope-card.active::after { opacity: 1; }
.plan-scope-card.overdue::after { background: #d94b55; }
.plan-scope-card.tomorrow::after { background: #2d9b77; }
.plan-scope-card.day-after::after { background: #6f68bb; }
.plan-scope-card-head, .plan-scope-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.plan-scope-card-head > span { color: #a8b6c4; font: 750 8px/1 Arial,sans-serif; letter-spacing: 1px; }
.plan-scope-card-head > em { overflow: hidden; color: #6f8296; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.plan-scope-card-value { display: flex; align-items: baseline; gap: 7px; }
.plan-scope-card-value strong { color: #203c59; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-scope-card-value span { color: #7a8da0; font-size: 9px; }
.plan-scope-card-foot { padding-top: 5px; border-top: 1px solid #edf1f5; color: #8191a1; font-size: 8px; }
.plan-scope-card-foot b { overflow: hidden; color: #45637f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.plan-scope-card.overdue .plan-scope-card-value strong,
.plan-scope-card.overdue .plan-scope-card-foot b { color: #b43d47; }
.today-plan-filter {
  padding: 14px 15px;
  display: grid;
  grid-template-columns: minmax(180px,.75fr) minmax(210px,1fr) minmax(280px,1.25fr) auto auto;
  align-items: end;
  gap: 11px;
}
.inbound-plan-filter {
  grid-template-columns:
    minmax(160px,.65fr)
    minmax(190px,.9fr)
    minmax(105px,.48fr)
    minmax(240px,1.15fr)
    auto auto;
}
.today-plan-filter-copy { align-self: center; min-width: 0; display: grid; gap: 3px; }
.today-plan-filter-copy strong { color: #25435f; font-size: 12px; }
.today-plan-filter-copy span { overflow: hidden; color: #8090a0; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.today-plan-filter label { min-width: 0; display: grid; grid-template-rows: auto 38px; }
.today-plan-filter label > span { margin-bottom: 5px; color: #62768a; font-size: 9px; font-weight: 720; }
.today-plan-filter input, .today-plan-filter select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ccd7e2;
  border-radius: 5px;
  background: white;
  color: var(--ink);
  outline: 0;
}
.today-plan-filter input:focus, .today-plan-filter select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.today-plan-filter .btn { min-width: 86px; height: 38px; }
.today-plan-table-panel { overflow: hidden; }
.today-plan-table-heading {
  min-height: 63px;
  padding: 13px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e2e9f0;
}
.today-plan-table-heading > div:first-child { min-width: 0; display: grid; gap: 2px; }
.today-plan-table-heading > div:first-child strong { color: #213d58; font-size: 13px; }
.today-plan-table-heading > div:first-child span { color: #8191a1; font-size: 9px; }
.today-plan-table-heading > div:last-child { flex: 0 0 auto; display: grid; justify-items: end; }
.today-plan-table-heading > div:last-child strong { color: #075ebc; font-size: 19px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.today-plan-table-heading > div:last-child span { color: #8293a4; font-size: 8px; }
.today-plan-table { min-width: 2450px; }
.today-plan-table th, .today-plan-table td { padding-left: 11px; padding-right: 11px; white-space: nowrap; }
.today-plan-table td:nth-child(6), .today-plan-table td:nth-child(8), .today-plan-table td:nth-child(9), .today-plan-table td:nth-child(18) { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.today-plan-row { cursor: zoom-in; }
.today-plan-row:hover td { background: #f3f8fd; }
.today-plan-row.is-overdue td:first-child { box-shadow: inset 3px 0 #d94b55; }
.today-plan-row.is-overdue:hover td { background: #fff6f6; }
.plan-urgency { min-width: 68px; padding: 5px 8px; display: inline-flex; justify-content: center; border-radius: 999px; font-size: 9px; font-weight: 780; }
.plan-urgency.today { color: #075ebc; background: #e6f1ff; }
.plan-urgency.tomorrow { color: #087451; background: #e5f7f0; }
.plan-urgency.day-after { color: #5f51a7; background: #eeebfa; }
.plan-urgency.overdue { color: #b23c46; background: #fde8ea; }
.plan-date-cell, .plan-main-cell { min-width: 0; display: grid; gap: 2px; }
.plan-date-cell strong, .plan-main-cell strong { color: #28465f; font-size: 10px; font-weight: 700; }
.plan-date-cell span, .plan-main-cell span { overflow: hidden; color: #8a9aa9; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.plan-pending-quantity { color: #b26117; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.today-plan-progress { min-width: 110px; display: grid; grid-template-columns: minmax(64px,1fr) 38px; align-items: center; gap: 7px; }
.today-plan-progress > span { height: 6px; overflow: hidden; border-radius: 999px; background: #e5ebf1; }
.today-plan-progress > span i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#2784e8,#25a878); }
.today-plan-progress strong { color: #52697e; font-size: 9px; text-align: right; }

/* 交期 / 采购绩效看板 */
.delivery-evaluation-page, .code-settings-page { display: grid; gap: 16px; }
.delivery-evaluation-hero {
  min-height: 176px;
  padding: 25px 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border-radius: 10px;
  color: white;
  background: linear-gradient(118deg,#071e31 0%,#123c54 60%,#16765f 100%);
  box-shadow: 0 14px 34px rgba(8,35,48,.14);
}
.delivery-evaluation-copy { min-width: 0; }
.delivery-evaluation-copy > span, .code-settings-hero > div:first-child > span { color: #7dd9c1; font-size: 9px; font-weight: 800; letter-spacing: 1.7px; }
.delivery-evaluation-copy h2, .code-settings-hero h2 { margin: 5px 0 4px; font-size: 25px; letter-spacing: -.4px; }
.delivery-evaluation-copy > p, .code-settings-hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.66); font-size: 11px; }
.delivery-evaluation-period { width: fit-content; min-height: 29px; margin-top: 17px; padding: 5px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(125,217,193,.22); border-radius: 999px; background: rgba(4,24,33,.28); font-size: 9px; }
.delivery-evaluation-period svg { color: #68d2b5; }
.delivery-evaluation-period span { color: rgba(255,255,255,.57); }
.delivery-rate-orbit {
  width: 128px;
  height: 128px;
  flex: 0 0 128px;
  padding: 7px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#5ae0b7 var(--rate),rgba(255,255,255,.14) 0);
  box-shadow: 0 0 0 8px rgba(255,255,255,.035);
}
.delivery-rate-orbit > div { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; border-radius: 50%; background: #103d4a; text-align: center; }
.delivery-rate-orbit strong { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.delivery-rate-orbit span { margin-top: 3px; color: #93e8d1; font-size: 8px; font-weight: 750; }
.delivery-rate-orbit small { max-width: 88px; margin-top: 4px; color: rgba(255,255,255,.47); font-size: 7px; line-height: 1.35; }
.delivery-filter {
  padding: 14px 15px;
  display: grid;
  grid-template-columns: minmax(145px,.62fr) repeat(2,minmax(122px,.52fr)) minmax(205px,1fr) auto auto;
  align-items: end;
  gap: 11px;
}
.delivery-filter-copy { align-self: center; display: grid; gap: 3px; }
.delivery-filter-copy strong { color: #25435f; font-size: 12px; }
.delivery-filter-copy span { color: #8090a0; font-size: 8px; }
.delivery-filter label { min-width: 0; display: grid; grid-template-rows: auto 38px; }
.delivery-filter label > span { margin-bottom: 5px; color: #62768a; font-size: 9px; font-weight: 720; }
.delivery-filter input, .delivery-filter select { width: 100%; min-width: 0; max-width: 100%; height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: var(--ink); outline: 0; }
.delivery-filter input:focus, .delivery-filter select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.delivery-filter .btn { min-width: 88px; height: 38px; }
.delivery-summary-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.delivery-summary-grid article { min-height: 104px; padding: 16px 17px; display: grid; align-content: center; gap: 1px; border: 1px solid #dce5ed; border-radius: 9px; background: white; box-shadow: 0 5px 16px rgba(12,35,57,.045); }
.delivery-summary-grid article span { color: #6b7f92; font-size: 9px; font-weight: 720; }
.delivery-summary-grid article strong { color: #25425d; font-size: 28px; line-height: 1.2; }
.delivery-summary-grid article small { color: #92a0ad; font-size: 8px; }
.delivery-summary-grid article.success { border-bottom: 3px solid #2ca77e; }
.delivery-summary-grid article.warning { border-bottom: 3px solid #d18a2e; }
.delivery-summary-grid article.danger { border-bottom: 3px solid #d94b55; }
.delivery-summary-grid article.pending { border-bottom: 3px solid #7e8fa0; }
.delivery-customer-panel, .delivery-attention-panel { overflow: hidden; }
.delivery-customer-table { min-width: 1030px; }
.delivery-customer-table th, .delivery-customer-table td { white-space: nowrap; }
.delivery-rate-cell { min-width: 160px; display: grid; grid-template-columns: minmax(85px,1fr) 48px; align-items: center; gap: 8px; }
.delivery-rate-cell > div { height: 6px; overflow: hidden; border-radius: 999px; background: #e7ecf1; }
.delivery-rate-cell i { height: 100%; display: block; border-radius: inherit; background: #d35a62; }
.delivery-rate-cell.good i { background: #d19a36; }
.delivery-rate-cell.excellent i { background: #2da67d; }
.delivery-rate-cell strong { color: #4e6579; font-size: 9px; text-align: right; }
.delivery-status { min-width: 66px; padding: 5px 8px; display: inline-flex; justify-content: center; border-radius: 999px; font-size: 9px; font-weight: 760; }
.delivery-status.success { color: #087451; background: #e5f7f0; }
.delivery-status.pending { color: #536c82; background: #eaf0f5; }
.delivery-status.danger { color: #b23c46; background: #fde8ea; }
.success-number { color: #13815d; font-weight: 750; }
.danger-number { color: #ba414b; font-weight: 750; }
.delivery-attention-panel table { min-width: 1220px; }
.delivery-evaluation-hero.purchase-performance-hero {
  background:
    radial-gradient(circle at 87% 9%,rgba(44,192,218,.22),transparent 29%),
    linear-gradient(118deg,#071e31 0%,#123d59 62%,#146aa5 112%);
}
.purchase-rate-orbit { background: conic-gradient(#56d7de var(--rate),rgba(255,255,255,.14) 0); }
.purchase-rate-orbit > div { background: #103b55; }
.purchase-rate-orbit span { color: #94e7ee; }
.purchase-performance-filter {
  grid-template-columns: minmax(145px,.62fr) repeat(2,minmax(122px,.52fr)) minmax(205px,1fr) auto auto;
}
.performance-insights, .purchase-performance-insights { display: grid; grid-template-columns: minmax(300px,.78fr) minmax(440px,1.22fr); gap: 12px; }
.performance-status-panel, .performance-trend-panel, .purchase-status-panel, .purchase-trend-panel { min-width: 0; min-height: 250px; padding: 17px 18px; overflow: hidden; }
.performance-insight-head, .purchase-insight-head { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e5ebf1; }
.performance-insight-head > div, .purchase-insight-head > div { min-width: 0; display: grid; gap: 3px; }
.performance-insight-head strong, .purchase-insight-head strong { color: #213d58; font-size: 12px; }
.performance-insight-head span, .purchase-insight-head span { color: #8191a1; font-size: 8px; }
.performance-insight-head em, .purchase-insight-head em { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #276595; background: #edf6fd; font-size: 8px; font-style: normal; font-weight: 750; }
.performance-distribution, .purchase-distribution { margin-top: 15px; display: grid; gap: 12px; }
.performance-distribution-row, .purchase-distribution-row { display: grid; grid-template-columns: 92px minmax(80px,1fr) 42px; align-items: center; gap: 10px; }
.performance-distribution-row > div:first-child, .purchase-distribution-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; }
.performance-distribution-row span, .performance-distribution-row small, .purchase-distribution-row span, .purchase-distribution-row small { color: #65798c; font-size: 8px; }
.performance-distribution-row strong, .purchase-distribution-row strong { color: #28465f; font-size: 12px; font-variant-numeric: tabular-nums; }
.performance-distribution-row small, .purchase-distribution-row small { text-align: right; font-variant-numeric: tabular-nums; }
.performance-distribution-track, .purchase-distribution-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e7edf3; }
.performance-distribution-track i, .purchase-distribution-track i { height: 100%; display: block; border-radius: inherit; background: #7f91a4; }
.performance-distribution-row.success i, .purchase-distribution-row.success i { background: #2ca77e; }
.performance-distribution-row.warning i, .purchase-distribution-row.warning i { background: #d18a2e; }
.performance-distribution-row.danger i, .purchase-distribution-row.danger i { background: #d94b55; }
.performance-trend-chart, .purchase-trend-chart {
  height: 174px;
  padding: 22px 4px 2px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(46px,1fr);
  align-items: end;
  gap: 9px;
  overflow-x: auto;
}
.performance-trend-point, .purchase-trend-point { min-width: 46px; height: 100%; display: grid; grid-template-rows: 16px minmax(70px,1fr) 15px 12px; align-items: end; justify-items: center; gap: 3px; }
.performance-trend-point strong, .purchase-trend-point strong { color: #41617d; font-size: 8px; font-variant-numeric: tabular-nums; }
.performance-trend-point > div, .purchase-trend-point > div { width: 16px; height: 100%; display: flex; align-items: end; overflow: hidden; border-radius: 5px 5px 2px 2px; background: #edf2f7; }
.performance-trend-point i, .purchase-trend-point i { width: 100%; display: block; border-radius: inherit; background: linear-gradient(180deg,#31b6ce,#2b76bf); }
.performance-trend-point span, .purchase-trend-point span { max-width: 70px; overflow: hidden; color: #7e90a1; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.performance-trend-point small, .purchase-trend-point small { min-height: 10px; color: #9aa7b4; font-size: 7px; white-space: nowrap; }
.performance-trend-point.is-empty > div, .purchase-trend-point.is-empty > div { background: repeating-linear-gradient(135deg,#f2f5f8,#f2f5f8 4px,#e7edf2 4px,#e7edf2 8px); }
.performance-trend-point.is-empty strong, .purchase-trend-point.is-empty strong { color: #93a1ad; }
.performance-trend-empty, .purchase-trend-empty { min-height: 170px; display: grid; place-content: center; justify-items: center; gap: 4px; color: #8da0b1; text-align: center; }
.performance-trend-empty svg, .purchase-trend-empty svg { margin-bottom: 4px; color: #75a7cc; }
.performance-trend-empty strong, .purchase-trend-empty strong { color: #496780; font-size: 10px; }
.performance-trend-empty span, .purchase-trend-empty span { font-size: 8px; }
.purchase-supplier-panel .delivery-customer-table { min-width: 1030px; }
.purchase-attention-panel table { min-width: 1300px; }

/* 编码设置 */
.code-settings-hero {
  min-height: 146px;
  padding: 25px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border-radius: 10px;
  color: white;
  background: linear-gradient(118deg,#081d31,#163a5d 64%,#0768c5);
  box-shadow: 0 14px 34px rgba(9,35,61,.14);
}
.code-settings-hero > div:first-child > span { color: #8fc2ff; }
.code-settings-lock { width: 210px; flex: 0 0 210px; padding: 16px; display: grid; grid-template-columns: 32px 1fr; align-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(4,21,38,.3); }
.code-settings-lock svg { grid-row: 1 / 3; color: #86c4ff; }
.code-settings-lock strong { font-size: 11px; }
.code-settings-lock span { color: rgba(255,255,255,.52); font-size: 8px; }
.code-settings-notice { padding: 13px 16px; display: flex; align-items: center; gap: 12px; border: 1px solid #cfe0f2; border-radius: 8px; color: #315879; background: #f4f9ff; }
.code-settings-notice svg { flex: 0 0 auto; color: #0872da; }
.code-settings-notice div { display: grid; gap: 2px; }
.code-settings-notice strong { font-size: 11px; }
.code-settings-notice span { color: #71869a; font-size: 9px; }
.code-settings-notice b { color: #075ebc; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.code-settings-groups { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 14px; }
.code-settings-group { overflow: hidden; }
.code-settings-group-head { min-height: 56px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e1e8ef; background: #fbfcfe; }
.code-settings-group-head > div { display: flex; align-items: center; gap: 10px; }
.code-settings-group-head span { color: #92a4b5; font: 800 8px/1 Arial,sans-serif; letter-spacing: 1px; }
.code-settings-group-head strong { color: #26445f; font-size: 12px; }
.code-settings-group-head small { color: #8899a8; font-size: 8px; }
.code-settings-table { min-width: 680px; }
.code-settings-table th { padding-top: 9px; padding-bottom: 9px; font-size: 8px; }
.code-settings-table td { padding-top: 9px; padding-bottom: 9px; }
.code-settings-table td:first-child { min-width: 135px; }
.code-settings-table td:first-child strong, .code-settings-table td:first-child span { display: block; }
.code-settings-table td:first-child strong { color: #314e68; font-size: 10px; }
.code-settings-table td:first-child span { margin-top: 2px; color: #9aa7b4; font-size: 7px; }
.code-settings-table code { padding: 5px 8px; border-radius: 4px; color: #075ebc; background: #edf5ff; font: 700 9px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; white-space: nowrap; }
.code-rule { color: #6c8195; font-size: 8px; white-space: nowrap; }
.code-settings-table input { width: 100%; min-width: 160px; height: 34px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; outline: 0; color: #24435f; background: #fbfcfd; font: 700 9px/1 ui-monospace,SFMono-Regular,Consolas,monospace; text-transform: uppercase; }
.code-settings-table input:focus { border-color: #1478dd; background: white; box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.code-settings-table input.changed { border-color: #d28a2f; background: #fffaf1; box-shadow: inset 3px 0 #d28a2f; }
.code-settings-actions { position: sticky; bottom: 14px; z-index: 5; box-shadow: 0 12px 32px rgba(11,31,51,.14); }
.configured-code-field .computed-input, input.computed-input[title*="编码"] { color: #075ebc; font-family: ui-monospace,SFMono-Regular,Consolas,monospace; font-weight: 720; letter-spacing: .25px; }
.business-document-code-input {
  color: #173f68 !important;
  background: #fff !important;
  font-family: ui-monospace,SFMono-Regular,Consolas,monospace;
  font-weight: 720;
  letter-spacing: .25px;
  text-transform: uppercase;
}
.business-document-code-input:not(.invalid) { border-color: #b9cadb; }
.business-document-code-input.invalid {
  color: #a33c46 !important;
  border-color: #d98e97 !important;
  background: #fff7f7 !important;
}
.business-document-code-field small { display: block; margin-top: 5px; line-height: 1.45; }
.business-document-code-field small.invalid { color: #a33c46; font-weight: 650; }
.code-rule-table { min-width: 980px; }
.code-rule-table th:nth-child(1) { width: 150px; }
.code-rule-table th:nth-child(2) { width: 105px; }
.code-rule-table th:nth-child(3) { width: 150px; }
.code-rule-table th:nth-child(4) { width: 105px; }
.code-rule-table th:nth-child(5) { width: 110px; }
.code-rule-table th:nth-child(6) { width: 175px; }
.code-rule-table input, .code-rule-table select { width: 100%; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid #ccd7e2; border-radius: 5px; outline: 0; color: #24435f; background: #fbfcfd; font-size: 9px; }
.code-rule-table input { text-transform: uppercase; }
.code-rule-table input[type=number] { text-transform: none; font-variant-numeric: tabular-nums; }
.code-rule-table tr.changed td { background: #fffcf5; }
.code-rule-table tr.changed td:first-child { box-shadow: inset 3px 0 #db9739; }
.code-rule-table tr.changed code { color: #9a5b09; background: #fff0d5; }

/* 供应商年度考核 */
.supplier-evaluation-page, .realtime-funds-page { display: grid; gap: 16px; }
.supplier-evaluation-hero, .realtime-funds-hero { min-height: 148px; padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 25px; border-radius: 10px; color: white; background: linear-gradient(118deg,#081d31,#123b55 62%,#087b65); box-shadow: 0 14px 34px rgba(9,35,61,.14); }
.supplier-evaluation-hero > div > span, .realtime-funds-hero > div:first-child > span { color: #7fe1ca; font: 800 9px/1 Arial,sans-serif; letter-spacing: 1.7px; }
.supplier-evaluation-hero h2, .realtime-funds-hero h2 { margin: 7px 0 5px; font-size: 24px; letter-spacing: -.35px; }
.supplier-evaluation-hero p, .realtime-funds-hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.64); font-size: 10px; line-height: 1.7; }
.supplier-evaluation-hero .btn { flex: 0 0 auto; }
.supplier-evaluation-filter { padding: 15px 17px; display: grid; grid-template-columns: 145px minmax(230px,1.4fr) 165px auto auto; align-items: end; gap: 11px; }
.supplier-evaluation-filter label, .realtime-funds-filter label { min-width: 0; display: grid; gap: 6px; }
.supplier-evaluation-filter label > span, .realtime-funds-filter label > span { color: #5f7487; font-size: 9px; font-weight: 720; }
.supplier-evaluation-filter input, .supplier-evaluation-filter select, .supplier-evaluation-filter .searchable-select-input, .realtime-funds-filter select, .realtime-funds-filter input { box-sizing: border-box; width: 100%; min-width: 0; height: 38px; min-height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 6px; color: var(--ink); outline: 0; background-color: white; box-shadow: none; }
.supplier-evaluation-filter .searchable-select, .supplier-evaluation-filter .searchable-select-input { max-width: 100%; min-width: 0; }
.supplier-evaluation-filter .searchable-select-input { padding: 0 30px 0 10px !important; }
.supplier-evaluation-filter input:focus, .supplier-evaluation-filter select:focus, .supplier-evaluation-filter .searchable-select.open .searchable-select-input { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(5,110,225,.1) !important; }
.supplier-evaluation-filter .btn { height: 38px; min-height: 38px; }
.supplier-evaluation-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.supplier-evaluation-summary article { min-height: 96px; padding: 16px 18px; display: grid; align-content: center; gap: 4px; border: 1px solid #dce5ed; border-top: 3px solid #7193b1; border-radius: 8px; background: white; box-shadow: 0 4px 13px rgba(13,41,65,.04); }
.supplier-evaluation-summary article.self { border-top-color: #d19a43; }
.supplier-evaluation-summary article.review { border-top-color: #3183c9; }
.supplier-evaluation-summary article.confirmed { border-top-color: #159371; }
.supplier-evaluation-summary span { color: #687f93; font-size: 9px; }
.supplier-evaluation-summary strong { color: #153d61; font-size: 24px; font-variant-numeric: tabular-nums; }
.supplier-evaluation-summary small { color: #9aa8b5; font-size: 8px; }
.supplier-evaluation-list table { min-width: 1270px; }
.supplier-evaluation-history table { min-width: 930px; }
.supplier-evaluation-status { min-width: 74px; padding: 5px 8px; display: inline-flex; justify-content: center; border-radius: 999px; font-size: 9px; font-weight: 760; white-space: nowrap; }
.supplier-evaluation-status.self { color: #8b5c14; background: #fff1d8; }
.supplier-evaluation-status.reviewing { color: #1767a8; background: #e6f2fd; }
.supplier-evaluation-status.confirmed { color: #0a7656; background: #e4f7ef; }
.supplier-score-cell { color: #087858; font-weight: 800; font-variant-numeric: tabular-nums; }
.supplier-grade { width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%; color: white; background: #667f96; font-size: 10px; font-weight: 850; }
.supplier-grade.grade-A { background: #078260; }
.supplier-grade.grade-B { background: #2479ba; }
.supplier-grade.grade-C { background: #c48625; }
.supplier-grade.grade-D { background: #b74952; }
.table-subline { display: block; margin-top: 2px; color: #91a0ae; font-size: 8px; }
.supplier-evaluation-dialog { width: min(1060px,calc(100vw - 36px)); max-height: calc(100vh - 40px); overflow: hidden; display: flex; flex-direction: column; border-radius: 10px; background: white; box-shadow: 0 28px 78px rgba(6,21,37,.24); }
.supplier-evaluation-dialog-body { padding: 18px 21px; overflow-y: auto; background: #f7f9fb; }
.supplier-evaluation-base { padding: 16px 17px 0; display: grid; grid-template-columns: 150px minmax(260px,1fr) 180px; gap: 0 16px; border: 1px solid #dfe7ee; border-radius: 8px; background: white; }
.supplier-score-section { margin-top: 15px; overflow: hidden; border: 1px solid #dfe7ee; border-radius: 8px; background: white; }
.supplier-score-head { min-height: 64px; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e1e8ee; }
.supplier-score-head > div:first-child strong, .supplier-score-head > div:first-child span { display: block; }
.supplier-score-head > div:first-child strong { color: #1d3c59; font-size: 12px; }
.supplier-score-head > div:first-child span { margin-top: 3px; color: #8595a4; font-size: 8px; }
.supplier-score-head > div:last-child { display: grid; grid-template-columns: auto 68px auto 68px; align-items: center; gap: 7px; color: #788a9a; font-size: 8px; }
.supplier-score-head output { color: #087858; font-size: 14px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.supplier-score-table { min-width: 850px; }
.supplier-score-table th:nth-child(1) { width: 115px; }
.supplier-score-table th:nth-child(2) { width: 75px; }
.supplier-score-table th:nth-child(4), .supplier-score-table th:nth-child(5) { width: 135px; }
.supplier-score-table input { width: 100%; height: 34px; padding: 0 9px; border: 1px solid #ccd7e2; border-radius: 5px; outline: 0; text-align: right; font-variant-numeric: tabular-nums; }
.supplier-score-table .review-required { background: #f3f9ff; }
.supplier-score-table .review-required input { border-color: #8ab8df; }
.supplier-weight { padding: 4px 7px; border-radius: 4px; color: #27617e; background: #eaf5f7; font-size: 9px; font-weight: 800; }
.supplier-evaluation-comments { margin-top: 15px; padding: 16px 17px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 17px; border: 1px solid #dfe7ee; border-radius: 8px; background: white; }
.supplier-evaluation-confirmed { margin-top: 15px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.supplier-evaluation-confirmed > div { padding: 13px 14px; border: 1px solid #cfe2dd; border-radius: 7px; background: #f2faf7; }
.supplier-evaluation-confirmed span, .supplier-evaluation-confirmed strong { display: block; }
.supplier-evaluation-confirmed span { color: #6d8b82; font-size: 8px; }
.supplier-evaluation-confirmed strong { margin-top: 5px; color: #14684f; font-size: 13px; }

/* 报销管理统计 */
.reimbursement-management-filter { padding: 16px 17px; display: grid; grid-template-columns: repeat(6,minmax(125px,1fr)) auto auto; align-items: end; gap: 10px; margin-bottom: 14px; }
.reimbursement-filter-copy { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
.reimbursement-filter-copy strong { color: #233f5a; font-size: 13px; }
.reimbursement-filter-copy span { color: #8595a4; font-size: 9px; }
.reimbursement-management-filter label { min-width: 0; display: grid; gap: 6px; }
.reimbursement-management-filter label > span { color: #5f7487; font-size: 9px; font-weight: 720; }
.reimbursement-management-filter input, .reimbursement-management-filter select { width: 100%; min-width: 0; height: 38px; padding: 0 9px; border: 1px solid #ccd7e2; border-radius: 5px; outline: 0; background: white; }
.reimbursement-management-filter .search-box { height: 38px; }
.reimbursement-management-filter .search-box input { height: 36px; border: 0; }
.reimbursement-amount-summary { grid-template-columns: repeat(5,minmax(0,1fr)); }
.reimbursement-amount-summary article { min-height: 82px; align-items: flex-start; }
.reimbursement-amount-summary article > div { display: grid; gap: 4px; }
.reimbursement-amount-summary article small { color: #9aa8b5; font-size: 8px; }
.reimbursement-amount-summary article strong { font-size: 17px; }
.reimbursement-amount-summary .total { border-top: 3px solid #246eab; }
.reimbursement-amount-summary .pending { border-top: 3px solid #d09132; }
.reimbursement-amount-summary .payable { border-top: 3px solid #8a67bd; }
.reimbursement-amount-summary .paid { border-top: 3px solid #15916f; }
.reimbursement-status-distribution { margin: -5px 0 14px; padding: 8px 11px; display: flex; flex-wrap: wrap; gap: 7px; border: 1px solid #e1e7ed; border-radius: 7px; background: #fafcfd; }
.reimbursement-status-distribution span { padding: 5px 8px; display: inline-flex; align-items: center; gap: 7px; border-radius: 5px; color: #657a8d; background: white; font-size: 8px; }
.reimbursement-status-distribution strong { color: #214765; font-size: 10px; }
.reimbursement-payment-fields { margin-top: 15px; padding-top: 15px; display: grid; grid-template-columns: 1fr 150px; gap: 8px 12px; border-top: 1px solid #e2e8ee; }
.reimbursement-payment-fields[hidden] { display: none; }
.reimbursement-payment-fields label { align-self: center; margin: 0; }
.reimbursement-payment-fields select, .reimbursement-payment-fields input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; }

/* 实时资金 */
.realtime-funds-hero { background: linear-gradient(118deg,#071b2d,#113b4b 60%,#078e76); }
.realtime-funds-total { width: 295px; flex: 0 0 295px; padding: 17px 19px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.17); border-radius: 8px; background: rgba(3,25,34,.28); }
.realtime-funds-total span { color: rgba(255,255,255,.63); font-size: 9px; }
.realtime-funds-total strong { color: #a8f2df; font-size: 23px; font-variant-numeric: tabular-nums; }
.realtime-funds-total small { color: rgba(255,255,255,.48); font-size: 8px; }
.realtime-funds-filter { padding: 15px 17px; display: grid; grid-template-columns: minmax(250px,1fr) 150px 150px minmax(230px,.9fr) auto auto; align-items: end; gap: 11px; }
.realtime-funds-filter > div { align-self: center; display: grid; gap: 3px; }
.realtime-funds-filter > div strong { color: #233f5a; font-size: 11px; }
.realtime-funds-filter > div span { color: #8595a4; font-size: 8px; line-height: 1.5; }
.realtime-funds-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.realtime-funds-kpis article { min-height: 102px; padding: 17px 18px; display: grid; align-content: center; gap: 5px; border: 1px solid #dce5ed; border-top: 3px solid #2d6f9e; border-radius: 8px; background: white; box-shadow: 0 4px 13px rgba(13,41,65,.04); }
.realtime-funds-kpis article.inflow, .realtime-funds-kpis article.net-positive { border-top-color: #159170; }
.realtime-funds-kpis article.outflow, .realtime-funds-kpis article.net-negative { border-top-color: #bf5960; }
.realtime-funds-kpis span { color: #697e91; font-size: 9px; }
.realtime-funds-kpis strong { color: #173d5d; font-size: 20px; font-variant-numeric: tabular-nums; }
.realtime-funds-kpis small { color: #9aa8b5; font-size: 8px; }
.foreign-funds-strip { padding: 11px 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border: 1px solid #dde5ec; border-radius: 7px; background: white; }
.foreign-funds-strip strong { margin-right: auto; color: #37566e; font-size: 9px; }
.foreign-funds-strip span { padding: 5px 8px; border-radius: 4px; color: #6e8090; background: #f1f5f8; font-size: 8px; }
.foreign-funds-strip b { color: #1f4c6d; font-size: 9px; }
.realtime-account-section { display: grid; gap: 11px; }
.realtime-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.realtime-section-heading > div { display: grid; gap: 3px; }
.realtime-section-heading strong { color: #203f5a; font-size: 13px; }
.realtime-section-heading span { color: #8999a7; font-size: 8px; }
.realtime-account-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.realtime-account-card { min-width: 0; padding: 17px 18px; overflow: hidden; border: 1px solid #d8e3e9; border-radius: 9px; color: white; background: linear-gradient(135deg,#10344c,#0b6f68); box-shadow: 0 8px 22px rgba(12,53,70,.1); }
.realtime-account-card.inactive { opacity: .62; filter: grayscale(.45); }
.realtime-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.realtime-account-head > div { min-width: 0; display: grid; gap: 3px; }
.realtime-account-head span { color: rgba(255,255,255,.52); font-size: 8px; }
.realtime-account-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.realtime-account-head i { padding: 4px 7px; border-radius: 99px; color: #c2f8e8; background: rgba(255,255,255,.1); font-size: 7px; font-style: normal; }
.realtime-account-balance { margin: 22px 0 18px; display: grid; gap: 4px; }
.realtime-account-balance span { color: rgba(255,255,255,.55); font-size: 8px; }
.realtime-account-balance strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.realtime-account-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.realtime-account-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.5); font-size: 7px; }
.realtime-account-meta b { color: rgba(255,255,255,.84); font-size: 8px; }
.realtime-account-flow { margin-top: 14px; padding-top: 12px; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(255,255,255,.14); }
.realtime-account-flow span { color: rgba(255,255,255,.53); font-size: 7px; }
.realtime-account-flow b { display: block; margin-top: 3px; color: #aff4e0; font-size: 9px; }
.realtime-account-flow span:last-child b { color: #ffd1d1; }
.realtime-funds-empty { grid-column: 1 / -1; }
.realtime-funds-ledger table { min-width: 1120px; }
.panel-count { color: #6e8293; font-size: 9px; }
.fund-direction { min-width: 42px; padding: 4px 7px; display: inline-flex; justify-content: center; border-radius: 999px; font-size: 8px; font-weight: 760; }
.fund-direction.in { color: #087354; background: #e4f6ee; }
.fund-direction.out { color: #a33e45; background: #fce9ea; }
.fund-in { color: #087657; font-weight: 780; font-variant-numeric: tabular-nums; }
.fund-out { color: #b0444c; font-weight: 780; font-variant-numeric: tabular-nums; }

/* 客户对账台 */
.finance-receipt-guidance { min-height: 42px; padding: 10px 12px; display: flex; align-items: center; border: 1px solid #d8e6f2; border-radius: 6px; color: #3c6789; background: #f5faff; font-size: 9px; line-height: 1.6; }
.customer-receipt-hero { min-height: 148px; padding: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 26px; border-radius: 10px; color: white; background: linear-gradient(118deg,#071c30,#123e55 62%,#0b806a); box-shadow: 0 14px 34px rgba(9,35,61,.14); }
.customer-receipt-hero > div:first-child > span { color: #8de8d2; font: 800 9px/1 Arial,sans-serif; letter-spacing: 1.7px; }
.customer-receipt-hero h2 { margin: 7px 0 5px; font-size: 24px; letter-spacing: -.35px; }
.customer-receipt-hero p { max-width: 730px; margin: 0; color: rgba(255,255,255,.64); font-size: 10px; line-height: 1.7; }
.supplier-payment-hero { background: linear-gradient(118deg,#231739,#4b2c61 60%,#8b5b28); }
.supplier-payment-hero > div:first-child > span { color: #f1c782; }
.supplier-payment-hero .customer-receipt-rule strong { color: #f5d59d; }
.cash-voucher-hero.income { background: linear-gradient(118deg,#071f2c,#0b5960 62%,#119264); }
.cash-voucher-hero.expense { background: linear-gradient(118deg,#27162e,#6b3143 62%,#a35e2e); }
.cash-voucher-hero.income > div:first-child > span { color: #89efd0; }
.cash-voucher-hero.expense > div:first-child > span { color: #ffc58d; }
.customer-receipt-rule { width: 250px; flex: 0 0 250px; padding: 16px 18px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(3,25,34,.28); }
.customer-receipt-rule strong { color: #adf2df; font-size: 10px; }
.customer-receipt-rule span { color: rgba(255,255,255,.52); font-size: 8px; }
.customer-receipt-filter { margin-top: 14px; padding: 15px 17px; display: grid; grid-template-columns: minmax(210px,.9fr) 145px 145px minmax(230px,1fr) minmax(210px,.85fr) auto auto; align-items: end; gap: 10px; }
.customer-receipt-filter > div { align-self: center; display: grid; gap: 3px; }
.customer-receipt-filter > div strong { color: #233f5a; font-size: 11px; }
.customer-receipt-filter > div span { color: #8595a4; font-size: 8px; line-height: 1.5; }
.customer-receipt-filter label { min-width: 0; display: grid; gap: 5px; }
.customer-receipt-filter label > span { color: #61768a; font-size: 9px; font-weight: 720; }
.customer-receipt-filter input, .customer-receipt-filter select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; outline: 0; }
.customer-receipt-filter .btn { height: 38px; white-space: nowrap; }
.customer-receipt-kpis { margin-top: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.customer-receipt-kpis article { min-height: 102px; padding: 17px 18px; display: grid; align-content: center; gap: 4px; border: 1px solid #dce5ed; border-top: 3px solid #477b9f; border-radius: 8px; background: white; box-shadow: 0 4px 13px rgba(13,41,65,.04); }
.customer-receipt-kpis article.received { border-top-color: #159170; }
.customer-receipt-kpis article.outstanding { border-top-color: #c25760; }
.customer-receipt-kpis span { color: #697e91; font-size: 9px; }
.customer-receipt-kpis strong { overflow: hidden; color: #173d5d; font-size: 20px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.customer-receipt-kpis small { color: #9aa8b5; font-size: 8px; }
.customer-receipt-list { margin-top: 14px; overflow: hidden; }
.customer-receipt-list table { min-width: 1460px; }
.customer-receipt-section-head { min-height: 60px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e5ebf1; background: #fbfcfe; }
.customer-receipt-section-head > div { display: grid; gap: 2px; }
.customer-receipt-section-head strong { color: #284661; font-size: 12px; }
.customer-receipt-section-head span { color: #8797a6; font-size: 8px; }
.customer-receipt-section-head > span { padding: 5px 9px; border-radius: 999px; color: #0872d5; background: #e9f3ff; font-weight: 750; }
.receipt-unallocated { margin-left: 6px; color: #b35e22; }
.customer-receipt-modal { padding: 20px; }
.customer-receipt-dialog { width: min(1500px,98vw); max-height: calc(100vh - 40px); }
.receipt-dialog-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.receipt-dialog-fields label, .receipt-note-field { min-width: 0; display: grid; gap: 5px; }
.receipt-dialog-fields label > span, .receipt-note-field > span { color: #62768a; font-size: 9px; font-weight: 720; }
.receipt-dialog-fields input, .receipt-dialog-fields select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; outline: 0; }
.receipt-total-input { color: #087756 !important; font-size: 13px; font-weight: 800; }
.receipt-line-picker { margin-top: 14px; overflow: hidden; border: 1px solid #dce5ed; border-radius: 8px; }
.receipt-line-picker-head { min-height: 56px; padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f8fbfd; border-bottom: 1px solid #e4eaf0; }
.receipt-line-picker-head > div:first-child { display: grid; gap: 2px; }
.receipt-line-picker-head strong { color: #294860; font-size: 11px; }
.receipt-line-picker-head span { color: #8595a3; font-size: 8px; }
.receipt-line-picker-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.receipt-line-search { width: min(330px,32vw); min-width: 240px; display: grid; grid-template-columns: minmax(0,1fr) auto; }
.receipt-line-search input { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid #ccd7e2; border-right: 0; border-radius: 5px 0 0 5px; outline: 0; background: white; }
.receipt-line-search .btn { height: 34px; border-radius: 0 5px 5px 0; white-space: nowrap; }
.receipt-line-scroll { max-height: 310px; }
.receipt-line-scroll table { min-width: 1780px; }
.receipt-line-scroll th, .receipt-line-scroll td { white-space: nowrap; }
.receipt-line-scroll td:first-child, .receipt-line-scroll th:first-child { width: 48px; text-align: center; }
.receipt-line-scroll input[type=checkbox] { width: 14px; height: 14px; accent-color: var(--accent); }
.receipt-allocation-input { width: 118px; height: 34px; padding: 0 9px; border: 1px solid #cbd7e2; border-radius: 5px; color: #075fbd; font-weight: 750; text-align: right; }
.receipt-allocation-input:disabled { color: #a3afb9; background: #f3f5f7; }
.receipt-line-summary { min-height: 45px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; color: #687c8e; background: #fbfcfd; border-top: 1px solid #e6ebf0; font-size: 9px; }
.receipt-line-summary > div { display: flex; align-items: center; gap: 16px; }
.receipt-line-summary strong { color: #087455; font-size: 13px; font-variant-numeric: tabular-nums; }
.receipt-line-summary > div:last-child span { color: #a15428; font-weight: 720; font-variant-numeric: tabular-nums; }
.receipt-attachment-section { margin-top: 14px; padding: 13px 14px; border: 1px solid #e0e7ed; border-radius: 8px; background: #fbfcfd; }
.receipt-attachment-section > div:first-child { display: grid; gap: 2px; }
.receipt-attachment-section > div:first-child strong { color: #2b485f; font-size: 10px; }
.receipt-attachment-section > div:first-child span { color: #8999a7; font-size: 8px; }
.receipt-attachment-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.receipt-attachment-item { min-width: 0; min-height: 70px; padding: 9px 10px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 5px 8px; border: 1px solid #dce5ec; border-radius: 6px; background: white; }
.receipt-attachment-item > span { grid-column: 1 / -1; color: #657a8d; font-size: 8px; font-weight: 720; }
.receipt-attachment-item input { min-width: 0; font-size: 8px; }
.receipt-attachment-item em { overflow: hidden; color: #8a99a6; font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.receipt-attachment-item a, .receipt-attachment-item button { padding: 0; border: 0; color: #0767c5; background: none; font-size: 8px; cursor: pointer; }
.receipt-attachment-item button { color: #bd4c54; }
.receipt-note-field { margin-top: 13px; }
.receipt-note-field textarea { min-height: 70px; padding: 9px 10px; border: 1px solid #ccd7e2; border-radius: 5px; resize: vertical; }
.customer-receipt-detail { width: min(1160px,95vw); }
.customer-receipt-detail table { min-width: 1650px; }
.receipt-detail-attachments { margin-top: 10px; color: #3375ae; font-size: 9px; }
.cash-voucher-filter { margin-top: 14px; max-width: 100%; min-width: 0; padding: 13px 14px; display: grid; grid-template-columns: minmax(0,.72fr) 112px 112px minmax(118px,.58fr) minmax(145px,.72fr) minmax(145px,.76fr) max-content max-content; align-items: end; gap: 8px; }
.cash-voucher-filter > div { align-self: center; display: grid; gap: 3px; }
.cash-voucher-filter > div strong { color: #233f5a; font-size: 11px; }
.cash-voucher-filter > div span { color: #8595a4; font-size: 8px; line-height: 1.5; }
.cash-voucher-filter > *, .cash-voucher-filter label, .cash-voucher-filter .searchable-select { max-width: 100%; min-width: 0; }
.cash-voucher-filter label { display: grid; gap: 5px; }
.cash-voucher-filter label > span { color: #61768a; font-size: 9px; font-weight: 720; }
.cash-voucher-filter input, .cash-voucher-filter select, .cash-voucher-filter .searchable-select-input { box-sizing: border-box; width: 100%; min-width: 0; height: 38px; min-height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 6px; color: var(--ink); background-color: white; outline: 0; box-shadow: none; }
.cash-voucher-filter .searchable-select-input { padding: 0 30px 0 10px !important; }
.cash-voucher-filter input:focus, .cash-voucher-filter select:focus, .cash-voucher-filter .searchable-select.open .searchable-select-input { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(5,110,225,.1) !important; }
.cash-voucher-filter .btn { height: 38px; white-space: nowrap; }
.cash-voucher-kpis { margin-top: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.cash-voucher-kpis article { min-height: 102px; padding: 17px 18px; display: grid; align-content: center; gap: 4px; border: 1px solid #dce5ed; border-top: 3px solid #477b9f; border-radius: 8px; background: white; box-shadow: 0 4px 13px rgba(13,41,65,.04); }
.cash-voucher-kpis article.income { border-top-color: #159170; }
.cash-voucher-kpis article.expense { border-top-color: #c25760; }
.cash-voucher-kpis span { color: #697e91; font-size: 9px; }
.cash-voucher-kpis strong { overflow: hidden; color: #173d5d; font-size: 20px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.cash-voucher-kpis small { color: #9aa8b5; font-size: 8px; }
.cash-voucher-list { margin-top: 14px; overflow: hidden; }
.cash-voucher-list table { min-width: 1380px; }
.cash-voucher-dialog { width: min(1050px,96vw); max-height: calc(100vh - 40px); }
.cash-voucher-form-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.cash-voucher-form-grid label { min-width: 0; display: grid; gap: 5px; }
.cash-voucher-form-grid label > span { color: #62768a; font-size: 9px; font-weight: 720; }
.cash-voucher-form-grid input, .cash-voucher-form-grid select { width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; outline: 0; }
.cash-voucher-amount { color: #0b765a; font-size: 13px; font-weight: 800; text-align: right; }

.reconciliation-hero {
  min-height: 142px;
  padding: 25px 29px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border-radius: 10px;
  color: white;
  background: linear-gradient(118deg,#081d31 0%,#123654 65%,#0874d5 100%);
  box-shadow: 0 14px 34px rgba(9,35,61,.14);
}
.reconciliation-hero > div:first-child > span { color: #90c7ff; font: 800 9px/1 Arial,sans-serif; letter-spacing: 1.7px; }
.reconciliation-hero h2 { margin: 7px 0 5px; font-size: 23px; letter-spacing: -.3px; }
.reconciliation-hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.64); font-size: 10px; }
.reconciliation-hero-note { width: 224px; flex: 0 0 224px; padding: 15px 17px; display: grid; gap: 3px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; background: rgba(3,20,36,.3); }
.reconciliation-hero-note strong { color: #b5d9ff; font-size: 10px; }
.reconciliation-hero-note span { color: rgba(255,255,255,.55); font-size: 8px; }
.reconciliation-filter-card {
  margin-top: 14px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: minmax(170px,.75fr) repeat(2,minmax(142px,.56fr)) minmax(260px,1fr) auto;
  align-items: end;
  gap: 11px;
}
.reconciliation-filter-copy { align-self: center; display: grid; gap: 3px; }
.reconciliation-filter-copy strong { color: #25435f; font-size: 12px; }
.reconciliation-filter-copy span { color: #8090a0; font-size: 8px; }
.reconciliation-filter-card label { min-width: 0; display: grid; grid-template-rows: auto 38px; }
.reconciliation-filter-card label > span { margin-bottom: 5px; color: #62768a; font-size: 9px; font-weight: 720; }
.reconciliation-filter-card input, .reconciliation-filter-card select { width: 100%; min-width: 0; max-width: 100%; height: 38px; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; background: white; color: var(--ink); outline: 0; }
.reconciliation-filter-card input:focus, .reconciliation-filter-card select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(5,110,225,.08); }
.reconciliation-filter-card .btn { min-width: 96px; height: 38px; }
.reconciliation-summary-grid { margin-top: 14px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.reconciliation-summary-card { min-width: 0; min-height: 106px; padding: 16px 17px; display: grid; align-content: center; gap: 2px; border: 1px solid #dce5ed; border-bottom: 3px solid #8395a7; border-radius: 9px; background: white; box-shadow: 0 5px 16px rgba(12,35,57,.045); }
.reconciliation-summary-card > span { color: #6b7f92; font-size: 9px; font-weight: 720; }
.reconciliation-summary-card > strong { overflow: hidden; color: #25425d; font-size: 23px; line-height: 1.25; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.reconciliation-summary-card > small { overflow: hidden; color: #92a0ad; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.reconciliation-summary-card.sales { border-bottom-color: #0875dc; }
.reconciliation-summary-card.return { border-bottom-color: #d18a2e; }
.reconciliation-summary-card.received { border-bottom-color: #2ca77e; }
.reconciliation-summary-card.closing { border-bottom-color: #6c58b5; background: linear-gradient(145deg,#fff,#f8f6ff); }
.reconciliation-pending-panel, .reconciliation-history-panel { margin-top: 14px; overflow: hidden; }
.reconciliation-section-head { min-height: 62px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid #e5ebf1; background: #fbfcfe; }
.reconciliation-section-head > div:first-child { display: grid; gap: 2px; }
.reconciliation-section-head > div:first-child strong { color: #284661; font-size: 12px; }
.reconciliation-section-head > div:first-child span { color: #8797a6; font-size: 8px; }
.reconciliation-selection-actions { display: flex; align-items: center; justify-content: flex-end; gap: 11px; color: #6b7e90; font-size: 9px; }
.reconciliation-select-all { height: 32px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dde5ed; border-radius: 5px; background: white; cursor: pointer; }
.reconciliation-select-all input { margin: 0; accent-color: var(--accent); }
.reconciliation-check-cell { width: 52px; text-align: center !important; }
.reconciliation-check-cell input { width: 14px; height: 14px; accent-color: var(--accent); }
.reconciliation-detail-table { min-width: 1900px; }
.reconciliation-history-table { min-width: 1650px; }
.reconciliation-detail-table th, .reconciliation-detail-table td,
.reconciliation-history-table th, .reconciliation-history-table td { white-space: nowrap; }
.reconciliation-doc-type { min-width: 62px; padding: 4px 7px; display: inline-flex; justify-content: center; border-radius: 999px; color: #0961b4; background: #e9f3ff; font-size: 8px; font-weight: 750; }
.reconciliation-doc-type.receipt { color: #087451; background: #e5f7f0; }
.reconciliation-doc-type.return { color: #a96613; background: #fff0db; }
.reconciliation-balance { color: #b2434b; font-weight: 750; }
.reconciliation-balance.credit { color: #13815d; }
.reconciliation-history-count { padding: 5px 9px; border-radius: 999px; color: #0872d5; background: #e9f3ff; font-size: 9px; font-weight: 750; }
.reconciliation-modal-backdrop { padding: 24px; }
.reconciliation-generate-dialog { width: min(1120px,96vw); max-height: calc(100vh - 48px); }
.reconciliation-dialog-intro { padding: 13px 15px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid #d3e3f3; border-radius: 7px; background: #f5faff; }
.reconciliation-dialog-intro > div { display: grid; gap: 2px; }
.reconciliation-dialog-intro span { color: #788c9f; font-size: 8px; }
.reconciliation-dialog-intro strong { color: #075ebc; font: 750 13px/1.3 ui-monospace,SFMono-Regular,Consolas,monospace; }
.reconciliation-dialog-intro p { margin: 0; color: #647b90; font-size: 9px; text-align: right; }
.reconciliation-dialog-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.reconciliation-title-field { margin-top: 13px; }
.reconciliation-title-field, .reconciliation-dialog-grid label, .reconciliation-note-field { min-width: 0; display: grid; gap: 5px; }
.reconciliation-title-field > span, .reconciliation-dialog-grid label > span, .reconciliation-note-field > span { color: #62768a; font-size: 9px; font-weight: 720; }
.reconciliation-title-field input, .reconciliation-dialog-grid input, .reconciliation-dialog-grid select, .reconciliation-note-field textarea { width: 100%; min-width: 0; border: 1px solid #ccd7e2; border-radius: 5px; background: white; outline: 0; }
.reconciliation-title-field input { height: 40px; padding: 0 11px; color: #23415d; font-weight: 700; }
.reconciliation-dialog-grid input, .reconciliation-dialog-grid select { height: 38px; padding: 0 10px; }
.reconciliation-dialog-grid input[readonly] { color: #6d8092; background: #f5f7f9; }
.reconciliation-dialog-summary { margin-top: 13px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.reconciliation-dialog-summary .reconciliation-summary-card { min-height: 88px; padding: 12px 13px; }
.reconciliation-dialog-summary .reconciliation-summary-card > strong { font-size: 18px; }
.reconciliation-dialog-documents { max-height: 240px; margin-top: 13px; border: 1px solid #e0e7ee; border-radius: 7px; }
.reconciliation-dialog-documents table { min-width: 980px; }
.reconciliation-note-field { margin-top: 13px; }
.reconciliation-note-field textarea { min-height: 72px; padding: 10px 11px; resize: vertical; }
.reconciliation-detail-drawer { width: min(920px,94vw); }
.reconciliation-statement-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; background: linear-gradient(145deg,#f7fbff,#fff); }
.reconciliation-statement-title > div > span { color: #1975cf; font: 800 8px/1 Arial,sans-serif; letter-spacing: 1.3px; }
.reconciliation-statement-title h3 { margin: 7px 0 2px; color: #243f58; font-size: 18px; }
.reconciliation-statement-title p { margin: 0; color: #7a8c9e; font-size: 9px; }
.reconciliation-drawer-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.reconciliation-drawer-summary .reconciliation-summary-card { min-height: 86px; padding: 11px 12px; box-shadow: none; }
.reconciliation-drawer-summary .reconciliation-summary-card > strong { font-size: 16px; }
.reconciliation-status-editor > div { display: grid; grid-template-columns: 150px minmax(240px,1fr) auto; gap: 9px; }
.reconciliation-status-editor select, .reconciliation-status-editor input { width: 100%; height: 38px; min-width: 0; padding: 0 10px; border: 1px solid #ccd7e2; border-radius: 5px; outline: 0; background: white; }

/* EQ management */
.eq-hero, .eq-form-hero {
  min-height: 140px;
  padding: 25px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid #123c58;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 87% 22%,rgba(50,185,190,.28),transparent 26%),
    linear-gradient(128deg,#082738 0%,#0a4050 57%,#09616a 100%);
  box-shadow: 0 9px 25px rgba(8,39,56,.13);
}
.eq-hero::after, .eq-form-hero::after {
  width: 170px;
  height: 170px;
  position: absolute;
  right: 18%;
  bottom: -130px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  content: "";
}
.eq-hero > div:first-child, .eq-form-hero > div:first-child { min-width: 0; position: relative; z-index: 1; }
.eq-hero > div:first-child > span, .eq-form-hero > div:first-child > span {
  color: #82e3dd;
  font: 800 9px/1 Arial,sans-serif;
  letter-spacing: 1.8px;
}
.eq-hero h2, .eq-form-hero h2 { margin: 8px 0 6px; font-size: 23px; letter-spacing: -.35px; }
.eq-hero p, .eq-form-hero p { max-width: 730px; margin: 0; color: rgba(255,255,255,.67); font-size: 10px; line-height: 1.75; }
.eq-hero-rule {
  width: 310px;
  min-height: 70px;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 5px;
  flex: 0 0 310px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 8px;
  background: rgba(3,23,33,.27);
}
.eq-hero-rule strong { color: #8ee4df; font-size: 9px; letter-spacing: .4px; }
.eq-hero-rule span { color: rgba(255,255,255,.76); font-size: 9px; line-height: 1.6; }
.eq-filter {
  margin-top: 14px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: minmax(165px,.72fr) repeat(2,minmax(132px,.48fr)) minmax(220px,.8fr) minmax(145px,.52fr) minmax(210px,.76fr) auto auto;
  align-items: end;
  gap: 10px;
}
.eq-filter > div:first-child { align-self: center; display: grid; gap: 3px; }
.eq-filter > div:first-child strong { color: #24465c; font-size: 12px; }
.eq-filter > div:first-child span { color: #8192a0; font-size: 8px; line-height: 1.45; }
.eq-filter label { min-width: 0; display: grid; grid-template-rows: auto 38px; }
.eq-filter label > span { margin-bottom: 5px; color: #5f7587; font-size: 9px; font-weight: 720; }
.eq-filter input, .eq-filter select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ccd8e1;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.eq-filter input:focus, .eq-filter select:focus { border-color: #0b8b8a; box-shadow: 0 0 0 3px rgba(11,139,138,.09); }
.eq-filter .btn { height: 38px; white-space: nowrap; }
.eq-kpis { margin-top: 14px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.eq-kpis article {
  min-width: 0;
  min-height: 100px;
  padding: 15px 17px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid #dce6ec;
  border-bottom: 3px solid #678699;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(13,48,61,.04);
}
.eq-kpis article > span { color: #637e8d; font-size: 9px; font-weight: 720; }
.eq-kpis article > strong { color: #214559; font-size: 23px; font-variant-numeric: tabular-nums; }
.eq-kpis article > small { overflow: hidden; color: #93a2aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.eq-kpis article.active { border-bottom-color: #168f91; }
.eq-kpis article.waiting { border-bottom-color: #b77d25; }
.eq-kpis article.urgent { border-bottom-color: #cb5360; }
.eq-list { margin-top: 14px; overflow: hidden; }
.eq-list table { min-width: 1720px; }
.eq-list th, .eq-list td { white-space: nowrap; }
.eq-list td[title] { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.eq-section-head {
  min-height: 60px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e5ecef;
  background: #fbfdfd;
}
.eq-section-head > div { display: grid; gap: 2px; }
.eq-section-head strong { color: #26495c; font-size: 12px; }
.eq-section-head > div span { color: #8798a1; font-size: 8px; }
.eq-section-head > span { padding: 5px 9px; border-radius: 999px; color: #087676; background: #e6f6f4; font-size: 9px; font-weight: 750; }
.eq-status, .eq-priority {
  min-width: 58px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #4c6573;
  background: #eef2f4;
  font-size: 8px;
  font-weight: 760;
  white-space: nowrap;
}
.eq-status.processing { color: #087878; background: #e3f7f5; }
.eq-status.waiting { color: #986116; background: #fff1d9; }
.eq-status.confirmed { color: #3169a1; background: #e7f1fb; }
.eq-status.closed { color: #477062; background: #e8f4ef; }
.eq-status.cancelled { color: #879098; background: #f0f1f2; }
.eq-priority.important { color: #8d641f; background: #fff2dc; }
.eq-priority.urgent { color: #b14852; background: #fde9eb; }
.eq-priority.critical { color: #fff; background: #b93d4a; }
.eq-form-hero { min-height: 132px; }
.eq-form-hero > div:last-child {
  min-width: 255px;
  padding: 15px 17px;
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(2,24,33,.28);
}
.eq-form-hero > div:last-child span { color: #8be3df; font-size: 8px; font-weight: 760; }
.eq-form-hero > div:last-child strong { color: #fff; font: 760 16px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace; }
.eq-form-hero > div:last-child small { color: rgba(255,255,255,.55); font-size: 8px; }
.eq-form-page { margin-top: 14px; }
.eq-source-selectors { align-items: end; }
.eq-source-selectors .field, .eq-subject-grid .field { min-width: 0; }
.eq-source-selectors .field > small { min-height: 15px; margin-top: 5px; display: block; color: #7d929c; font-size: 8px; line-height: 1.45; }
.eq-linked-preview {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  overflow: hidden;
  border: 1px solid #dce7e8;
  border-radius: 8px;
  background: #f8fbfb;
}
.eq-linked-preview > div {
  min-width: 0;
  min-height: 72px;
  padding: 12px 13px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid #e1e9ea;
  border-bottom: 1px solid #e1e9ea;
}
.eq-linked-preview > div:nth-child(5n) { border-right: 0; }
.eq-linked-preview > div:nth-last-child(-n+5) { border-bottom: 0; }
.eq-linked-preview span { color: #78909b; font-size: 8px; }
.eq-linked-preview strong { overflow: hidden; color: #274b5b; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.eq-subject-grid .field.span-2 { grid-column: span 2; }
.eq-line-loading, .eq-line-error {
  min-height: 38px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d4dfe4;
  border-radius: 5px;
  color: #66808c;
  background: #f7fafb;
  font-size: 9px;
}
.eq-line-loading .boot-spinner { width: 14px; height: 14px; border-width: 2px; }
.eq-line-error { color: #af4750; border-color: #efd3d6; background: #fff7f8; }
.eq-creator-section input.computed-input { color: #4b6977; background: #f5f8f9; }
.eq-detail-drawer { width: min(910px,94vw); }
.eq-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(145deg,#f4fbfb,#fff); }
.eq-detail-summary > div:first-child > span { color: #0b8584; font: 800 8px/1 Arial,sans-serif; letter-spacing: 1.2px; }
.eq-detail-summary h3 { margin: 6px 0 2px; color: #254958; font-size: 18px; }
.eq-detail-summary p { margin: 0; color: #7b9099; font-size: 9px; }
.eq-detail-summary > div:last-child { display: flex; align-items: center; gap: 7px; }
.order-detail-attachments .table-attachment { margin-right: 9px; }

/* Professional 8D corrective action reports */
.report8d-hero, .report8d-form-hero {
  min-height: 150px; padding: 27px 29px; display: flex; align-items: center;
  justify-content: space-between; gap: 28px; overflow: hidden; position: relative;
  border: 1px solid #153b4c; border-radius: 10px; color: white;
  background: radial-gradient(circle at 84% 18%,rgba(43,202,166,.21),transparent 27%),linear-gradient(124deg,#071f30 0%,#103a49 58%,#126656 100%);
  box-shadow: 0 11px 28px rgba(7,31,48,.14);
}
.report8d-hero::before, .report8d-form-hero::before {
  width: 245px; height: 245px; position: absolute; right: 12%; bottom: -194px;
  border: 1px solid rgba(255,255,255,.08); border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(255,255,255,.025),0 0 0 92px rgba(255,255,255,.018); content: "";
}
.report8d-hero > div:first-child, .report8d-form-hero > div:first-child { min-width: 0; position: relative; z-index: 1; }
.report8d-hero > div:first-child > span, .report8d-form-hero > div:first-child > span { color: #78dfc5; font: 800 9px/1 Arial,sans-serif; letter-spacing: 1.8px; }
.report8d-hero h2, .report8d-form-hero h2 { margin: 8px 0 6px; font-size: 24px; letter-spacing: -.4px; }
.report8d-hero p, .report8d-form-hero p { max-width: 760px; margin: 0; color: rgba(255,255,255,.66); font-size: 10px; line-height: 1.7; }
.report8d-hero-cycle {
  width: 350px; flex: 0 0 350px; padding: 15px 17px; display: grid; gap: 8px;
  position: relative; z-index: 1; border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px; background: rgba(3,22,31,.28);
}
.report8d-hero-cycle > strong { color: #85e1c9; font-size: 8px; letter-spacing: 1.2px; }
.report8d-hero-cycle > div { display: grid; grid-template-columns: repeat(9,1fr); gap: 4px; }
.report8d-hero-cycle > div span { height: 27px; display: grid; place-items: center; border: 1px solid rgba(126,226,200,.25); border-radius: 5px; color: rgba(255,255,255,.85); background: rgba(20,117,96,.25); font-size: 8px; font-weight: 760; }
.report8d-hero-cycle > small { color: rgba(255,255,255,.48); font-size: 8px; }
.report8d-filter {
  margin-top: 14px; padding: 14px 15px; display: grid;
  grid-template-columns: minmax(160px,.65fr) repeat(2,minmax(128px,.45fr)) minmax(210px,.75fr) minmax(230px,.82fr) minmax(160px,.56fr) minmax(205px,.72fr) auto auto;
  align-items: end; gap: 10px;
}
.report8d-filter > div:first-child { align-self: center; display: grid; gap: 3px; }
.report8d-filter > div:first-child strong { color: #234656; font-size: 12px; }
.report8d-filter > div:first-child span { color: #80919a; font-size: 8px; line-height: 1.45; }
.report8d-filter label { min-width: 0; display: grid; grid-template-rows: auto 38px; }
.report8d-filter label > span { margin-bottom: 5px; color: #607885; font-size: 9px; font-weight: 720; }
.report8d-filter input, .report8d-filter select { width: 100%; min-width: 0; max-width: 100%; height: 38px; padding: 0 10px; border: 1px solid #ccd9de; border-radius: 5px; outline: 0; background: white; }
.report8d-filter input:focus, .report8d-filter select:focus { border-color: #118274; box-shadow: 0 0 0 3px rgba(17,130,116,.09); }
.report8d-filter .btn { height: 38px; white-space: nowrap; }
.report8d-kpis { margin-top: 14px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.report8d-kpis article { min-width: 0; min-height: 100px; padding: 15px 17px; display: grid; align-content: center; gap: 2px; border: 1px solid #dce6ea; border-bottom: 3px solid #6a8795; border-radius: 9px; background: white; box-shadow: 0 5px 16px rgba(9,43,55,.04); }
.report8d-kpis article > span { color: #637c88; font-size: 9px; font-weight: 720; }
.report8d-kpis article > strong { color: #204758; font-size: 23px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.report8d-kpis article > small { overflow: hidden; color: #94a2a9; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.report8d-kpis article.active { border-bottom-color: #128578; }
.report8d-kpis article.overdue { border-bottom-color: #d08a28; }
.report8d-kpis article.severe { border-bottom-color: #c34b58; }
.report8d-kpis article.closed { border-bottom-color: #3775a4; }
.report8d-list { margin-top: 14px; overflow: hidden; }
.report8d-list table { min-width: 1920px; }
.report8d-list th, .report8d-list td { white-space: nowrap; }
.report8d-list td[title] { max-width: 205px; overflow: hidden; text-overflow: ellipsis; }
.report8d-section-head { min-height: 61px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e4ecee; background: #fbfdfd; }
.report8d-section-head > div { display: grid; gap: 2px; }
.report8d-section-head strong { color: #254a59; font-size: 12px; }
.report8d-section-head > div span { color: #8698a0; font-size: 8px; }
.report8d-section-head > span { padding: 5px 9px; border-radius: 999px; color: #08786b; background: #e5f6f1; font-size: 9px; font-weight: 750; }
.report8d-status, .report8d-severity { min-width: 66px; padding: 4px 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: #4d6671; background: #eef2f3; font-size: 8px; font-weight: 760; white-space: nowrap; }
.report8d-status.active { color: #08796b; background: #e4f6f1; }
.report8d-status.waiting { color: #986317; background: #fff1d8; }
.report8d-status.closed { color: #276c58; background: #e4f4ed; }
.report8d-status.cancelled { color: #858d93; background: #f0f1f2; }
.report8d-severity.major { color: #8b641d; background: #fff1d8; }
.report8d-severity.severe { color: #b04450; background: #fde8ea; }
.report8d-severity.critical { color: white; background: #ad3240; }
.report8d-progress-cell { min-width: 115px; display: flex; align-items: center; gap: 7px; }
.report8d-progress-cell > span { width: 72px; height: 5px; overflow: hidden; border-radius: 999px; background: #e6ecee; }
.report8d-progress-cell > span i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#168c7b,#42b69a); }
.report8d-progress-cell > strong { color: #47707a; font-size: 8px; font-variant-numeric: tabular-nums; }
.report8d-overdue-row td:first-child { box-shadow: inset 3px 0 #d58c2d; }
.report8d-overdue-row td { background: #fffdf8; }
.report8d-form-hero { min-height: 135px; }
.report8d-form-hero > div:last-child { min-width: 270px; padding: 15px 17px; display: grid; gap: 4px; position: relative; z-index: 1; border: 1px solid rgba(255,255,255,.17); border-radius: 8px; background: rgba(2,22,30,.28); }
.report8d-form-hero > div:last-child span { color: #86dfc7; font-size: 8px; font-weight: 760; }
.report8d-form-hero > div:last-child strong { color: #fff; font: 760 16px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace; }
.report8d-form-hero > div:last-child small { color: rgba(255,255,255,.53); font-size: 8px; }
.report8d-stage-strip { min-height: 55px; margin-top: 12px; padding: 7px; display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); gap: 5px; border: 1px solid #dae5e7; border-radius: 8px; background: white; }
.report8d-stage-strip span { min-width: 0; display: grid; grid-template-columns: 31px minmax(0,1fr); align-items: center; gap: 6px; padding: 5px 7px; border-radius: 5px; color: #617a84; background: #f6f9f9; font-size: 8px; font-weight: 700; }
.report8d-stage-strip b { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 5px; color: #087969; background: #e2f5ef; font-size: 9px; }
.report8d-form-page { width: 100%; max-width: none; margin: 14px 0 0; }
.report8d-form-section .form-section-head { background: linear-gradient(90deg,#fbfdfd,#f7fbfa); }
.report8d-form-section .section-index { color: #087969; background: #e4f5f0; }
.report8d-form-section .field.span-2 { grid-column: span 2; }
.report8d-form-section textarea { line-height: 1.65; resize: vertical; }
.report8d-product-preview { margin-top: 15px; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); overflow: hidden; border: 1px solid #dce7e7; border-radius: 8px; background: #f8fbfb; }
.report8d-product-preview > div { min-width: 0; min-height: 74px; padding: 12px 13px; display: grid; align-content: center; gap: 4px; border-right: 1px solid #e1e9e9; }
.report8d-product-preview > div:last-child { border-right: 0; }
.report8d-product-preview span { color: #789099; font-size: 8px; }
.report8d-product-preview strong { overflow: hidden; color: #274c58; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.report8d-editor-card { margin-top: 15px; overflow: hidden; border: 1px solid #dce6e8; border-radius: 8px; background: #fbfcfd; }
.report8d-editor-head { min-height: 57px; padding: 11px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e2eaec; background: #f5f9f8; }
.report8d-editor-head > div { display: grid; gap: 2px; }
.report8d-editor-head strong { color: #315561; font-size: 10px; }
.report8d-editor-head span { color: #85979f; font-size: 8px; }
.report8d-team-table { min-width: 1060px; table-layout: fixed; }
.report8d-team-table th:nth-child(1) { width: 235px; }
.report8d-team-table th:nth-child(2) { width: 160px; }
.report8d-team-table th:nth-child(3) { width: 170px; }
.report8d-team-table th:last-child { width: 52px; }
.report8d-action-table { min-width: 1390px; table-layout: fixed; }
.report8d-action-table th:nth-child(1) { width: 370px; }
.report8d-action-table th:nth-child(2) { width: 220px; }
.report8d-action-table th:nth-child(3) { width: 155px; }
.report8d-action-table th:nth-child(4) { width: 145px; }
.report8d-action-table th:nth-child(5) { width: 390px; }
.report8d-action-table th:last-child { width: 52px; }
.report8d-team-table td, .report8d-action-table td { padding: 8px 7px; vertical-align: middle; }
.report8d-team-table input, .report8d-team-table select, .report8d-action-table input, .report8d-action-table select, .report8d-action-table textarea { width: 100%; min-width: 0; border: 1px solid #ccd9de; border-radius: 5px; outline: 0; background: white; }
.report8d-team-table input, .report8d-team-table select, .report8d-action-table input, .report8d-action-table select { height: 38px; padding: 0 9px; }
.report8d-action-table textarea { min-height: 58px; padding: 8px 9px; resize: vertical; }
.report8d-team-table input[readonly] { color: #5e7680; background: #f3f6f7; }
.report8d-team-table input:focus, .report8d-team-table select:focus, .report8d-action-table input:focus, .report8d-action-table select:focus, .report8d-action-table textarea:focus { border-color: #128577; box-shadow: 0 0 0 3px rgba(18,133,119,.08); }
.report8d-verification-grid { margin-top: 15px; }
.report8d-effectiveness-note { min-height: 60px; margin-top: 10px; padding: 11px 12px; border: 1px solid #d7e5df; border-radius: 6px; color: #617b72; background: #f3faf7; font-size: 8px; line-height: 1.65; }
.report8d-submit-grid { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(300px,1.25fr) minmax(220px,.8fr); align-items: end; gap: 18px; }
.report8d-progress-preview { min-height: 66px; padding: 11px 13px; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 6px 10px; border: 1px solid #dce6e7; border-radius: 7px; background: #f7fbfa; }
.report8d-progress-preview > span { color: #68808a; font-size: 8px; font-weight: 700; }
.report8d-progress-preview > strong { color: #087969; font-size: 16px; font-variant-numeric: tabular-nums; }
.report8d-progress-preview > div { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: #e0e9e8; }
.report8d-progress-preview > div i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#148b79,#4cc09f); transition: width .2s ease; }
.report8d-detail-drawer { width: min(1020px,95vw); }
.report8d-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: linear-gradient(145deg,#f4fbf9,#fff); }
.report8d-detail-summary > div:first-child > span { color: #0b8373; font: 800 8px/1 Arial,sans-serif; letter-spacing: 1.2px; }
.report8d-detail-summary h3 { margin: 6px 0 2px; color: #254b58; font-size: 18px; }
.report8d-detail-summary p { margin: 0; color: #7c9098; font-size: 9px; }
.report8d-detail-summary > div:last-child { display: flex; align-items: center; gap: 7px; }
.report8d-detail-summary > div:last-child > strong { color: #08796a; font-size: 18px; }
.report8d-team-detail { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.report8d-team-detail > div { min-width: 0; padding: 10px 11px; display: grid; gap: 2px; border: 1px solid #e0e8e9; border-radius: 6px; background: #fafcfc; }
.report8d-team-detail strong { color: #315360; font-size: 9px; }
.report8d-team-detail span { overflow: hidden; color: #809198; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.report8d-detail-actions { margin-top: 11px; border: 1px solid #e1e8ea; border-radius: 7px; }
.report8d-detail-actions table { min-width: 880px; }
.report8d-detail-actions th, .report8d-detail-actions td { white-space: nowrap; }
.report8d-detail-actions td:first-child, .report8d-detail-actions td:last-child { max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.report8d-verification-detail { margin-top: 11px; }
.detail-empty-line { min-height: 56px; display: grid; place-items: center; color: #8b9aa0; border: 1px dashed #d8e1e3; border-radius: 6px; background: #fbfcfc; font-size: 9px; }

/* Professional inspection records */
.inspection-list-hero, .inspection-form-hero {
  min-height: 145px;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  overflow: hidden;
  position: relative;
  border: 1px solid #173d54;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 20%,rgba(42,173,194,.24),transparent 28%),
    linear-gradient(125deg,#071e32 0%,#103b54 58%,#12656b 100%);
  box-shadow: 0 10px 27px rgba(7,30,50,.14);
}
.inspection-list-hero::before, .inspection-form-hero::before {
  width: 235px;
  height: 235px;
  position: absolute;
  right: 13%;
  bottom: -185px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(255,255,255,.024),0 0 0 90px rgba(255,255,255,.017);
  content: "";
}
.inspection-list-hero > div:first-child, .inspection-form-hero > div:first-child {
  min-width: 0;
  position: relative;
  z-index: 1;
}
.inspection-list-hero > div:first-child > span, .inspection-form-hero > div:first-child > span {
  color: #79dfe2;
  font: 800 9px/1 Arial,sans-serif;
  letter-spacing: 1.8px;
}
.inspection-list-hero h2, .inspection-form-hero h2 {
  margin: 8px 0 6px;
  font-size: 24px;
  letter-spacing: -.4px;
}
.inspection-list-hero p, .inspection-form-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.66);
  font-size: 10px;
  line-height: 1.72;
}
.inspection-list-hero .btn { position: relative; z-index: 1; }
.inspection-filter {
  margin-top: 14px;
  padding: 14px 15px;
  display: grid;
  grid-template-columns: repeat(2,minmax(135px,.5fr)) minmax(215px,.8fr) minmax(230px,.86fr) minmax(145px,.56fr) minmax(220px,.82fr) auto auto;
  align-items: end;
  gap: 10px;
}
.inspection-filter label {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 38px;
}
.inspection-filter label > span {
  margin-bottom: 5px;
  color: #607886;
  font-size: 9px;
  font-weight: 720;
}
.inspection-filter input, .inspection-filter select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #ccd9df;
  border-radius: 5px;
  outline: 0;
  background: #fff;
  color: var(--ink);
}
.inspection-filter input:focus, .inspection-filter select:focus {
  border-color: #12828a;
  box-shadow: 0 0 0 3px rgba(18,130,138,.09);
}
.inspection-filter .btn { height: 38px; white-space: nowrap; }
.inspection-kpis {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 12px;
}
.inspection-kpis article {
  min-width: 0;
  min-height: 101px;
  padding: 15px 17px;
  display: grid;
  align-content: center;
  gap: 2px;
  border: 1px solid #dce6eb;
  border-bottom: 3px solid #66869a;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(9,42,58,.04);
}
.inspection-kpis article > span { color: #647e8d; font-size: 9px; font-weight: 720; }
.inspection-kpis article > strong { color: #21485b; font-size: 23px; line-height: 1.25; font-variant-numeric: tabular-nums; }
.inspection-kpis article > small { overflow: hidden; color: #94a2aa; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.inspection-kpis article.quality { border-bottom-color: #18856f; }
.inspection-kpis article.defect { border-bottom-color: #c47a2c; }
.inspection-kpis article.attention { border-bottom-color: #c34755; }
.inspection-register-panel { margin-top: 14px; overflow: hidden; }
.inspection-register-panel .panel-head {
  min-height: 61px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e4ebef;
  background: #fbfcfd;
}
.inspection-register-panel .panel-title { display: grid; gap: 2px; }
.inspection-register-panel .panel-title strong { color: #264b5f; font-size: 12px; }
.inspection-register-panel .panel-title span { color: #8798a2; font-size: 8px; }
.inspection-record-count {
  padding: 5px 9px;
  border-radius: 999px;
  color: #08777b;
  background: #e5f5f5;
  font-size: 9px;
  font-weight: 750;
}
.inspection-register-table { min-width: 2260px; table-layout: fixed; }
.inspection-register-table th, .inspection-register-table td { white-space: nowrap; }
.inspection-register-table th:nth-child(1) { width: 142px; }
.inspection-register-table th:nth-child(2) { width: 92px; }
.inspection-register-table th:nth-child(3), .inspection-register-table th:nth-child(4) { width: 125px; }
.inspection-register-table th:nth-child(5) { width: 215px; }
.inspection-register-table th:nth-child(6), .inspection-register-table th:nth-child(7) { width: 128px; }
.inspection-register-table th:nth-child(8) { width: 270px; }
.inspection-register-table th:nth-child(9), .inspection-register-table th:nth-child(10) { width: 126px; }
.inspection-register-table th:nth-child(11), .inspection-register-table th:nth-child(12), .inspection-register-table th:nth-child(13), .inspection-register-table th:nth-child(14) { width: 94px; }
.inspection-register-table th:nth-child(15) { width: 155px; }
.inspection-register-table th:nth-child(16) { width: 105px; }
.inspection-register-table th:nth-child(17) { width: 112px; }
.inspection-register-table td:nth-child(5), .inspection-register-table td:nth-child(8) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.inspection-result-badge {
  min-width: 64px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #596e7a;
  background: #edf1f3;
  font-size: 8px;
  font-weight: 760;
}
.inspection-result-badge.pass { color: #197253; background: #e3f5ec; }
.inspection-result-badge.concession { color: #96621b; background: #fff1d9; }
.inspection-result-badge.fail { color: #b23f4d; background: #fde7ea; }
.inspection-result-badge.pending { color: #53708a; background: #eaf0f6; }
.inspection-rate {
  min-width: 62px;
  padding: 4px 7px;
  display: inline-flex;
  justify-content: center;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}
.inspection-rate.excellent { color: #177252; background: #e5f5ed; }
.inspection-rate.normal { color: #81601f; background: #fff2dc; }
.inspection-rate.attention { color: #ad3f4b; background: #fde8ea; }
.inspection-failed-cell { color: #b03e4c; font-weight: 760; }
.inspection-evidence-links { display: flex; gap: 5px; }
.inspection-evidence-link {
  min-height: 26px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #d5e4e7;
  border-radius: 4px;
  color: #14747a;
  background: #f3f9f9;
  font-size: 8px;
  font-weight: 720;
}
.inspection-form-shell { width: 100%; max-width: none; margin: 0; }
.inspection-form-hero { min-height: 135px; }
.inspection-form-hero > div:last-child {
  min-width: 270px;
  padding: 15px 17px;
  display: grid;
  gap: 4px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 8px;
  background: rgba(2,22,32,.28);
}
.inspection-form-hero > div:last-child span { color: #83dfe1; font-size: 8px; font-weight: 760; }
.inspection-form-hero > div:last-child strong { color: #fff; font: 760 16px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace; }
.inspection-form-hero > div:last-child small { color: rgba(255,255,255,.53); font-size: 8px; }
.inspection-process-strip {
  min-height: 54px;
  margin-top: 12px;
  padding: 7px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 9px;
  border: 1px solid #dae5e9;
  border-radius: 8px;
  background: #fff;
}
.inspection-process-strip span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5f7985;
  font-size: 9px;
  font-weight: 720;
  white-space: nowrap;
}
.inspection-process-strip b {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #08777c;
  background: #e4f4f5;
  font-size: 9px;
}
.inspection-process-strip i { height: 1px; background: linear-gradient(90deg,#cee1e3,#edf2f3); }
.inspection-form-page { margin-top: 14px; }
.inspection-form-section .form-section-head { background: linear-gradient(90deg,#fbfdfd,#f7fafb); }
.inspection-form-section .section-index { color: #08777c; background: #e4f4f5; }
.inspection-form-section .field.span-2 { grid-column: span 2; }
.inspection-form-section textarea { line-height: 1.65; resize: vertical; }
.inspection-product-preview {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  overflow: hidden;
  border: 1px solid #dce7e9;
  border-radius: 8px;
  background: #f8fbfc;
}
.inspection-product-preview > div {
  min-width: 0;
  min-height: 72px;
  padding: 12px 13px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid #e1eaeb;
  border-bottom: 1px solid #e1eaeb;
}
.inspection-product-preview > div.wide { grid-column: span 2; }
.inspection-product-preview > div:nth-child(5) { border-right: 0; }
.inspection-product-preview > div:nth-last-child(-n+3) { border-bottom: 0; }
.inspection-product-preview span { color: #78909b; font-size: 8px; }
.inspection-product-preview strong {
  overflow: hidden;
  color: #274c5b;
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inspection-defect-section-head { justify-content: flex-start; }
.inspection-defect-section-head > .btn { margin-left: auto; }
.inspection-defect-table-wrap { overflow-x: auto; }
.inspection-defect-table { min-width: 1050px; table-layout: fixed; }
.inspection-defect-table th:nth-child(1) { width: 490px; }
.inspection-defect-table th:nth-child(2) { width: 115px; }
.inspection-defect-table th:nth-child(3) { width: 160px; }
.inspection-defect-table th:nth-child(4) { width: 145px; }
.inspection-defect-table th:nth-child(5) { width: 70px; }
.inspection-defect-table td { padding: 8px 7px; vertical-align: middle; }
.inspection-defect-table input, .inspection-defect-table select {
  width: 100%;
  height: 39px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid #ccd9df;
  border-radius: 5px;
  outline: 0;
  background: #fff;
}
.inspection-defect-table input:focus, .inspection-defect-table select:focus {
  border-color: #12828a;
  box-shadow: 0 0 0 3px rgba(18,130,138,.08);
}
.inspection-defect-table [data-inspection-defect-unit],
.inspection-defect-table [data-inspection-defect-rate] {
  min-height: 39px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  border: 1px solid #e0e8eb;
  border-radius: 5px;
  color: #536d79;
  background: #f5f8f9;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.inspection-result-summary {
  padding: 14px 15px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
  border-top: 1px solid #e5ecef;
  background: #f8fbfb;
}
.inspection-result-summary article {
  min-height: 70px;
  padding: 11px 13px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #dfe8ea;
  border-radius: 7px;
  background: #fff;
}
.inspection-result-summary span { color: #728995; font-size: 8px; }
.inspection-result-summary strong { color: #2a4c5d; font-size: 17px; font-variant-numeric: tabular-nums; }
.inspection-result-summary article.pass strong, .inspection-result-summary article.rate strong { color: #147353; }
.inspection-result-summary article.fail strong { color: #b3434e; }
.inspection-attachment-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 11px; }
.inspection-image-field { min-width: 0; }
.inspection-image-field > .field { margin: 0; }
.inspection-image-field .image-file-control {
  min-height: 165px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
}
.inspection-image-field .inspection-image-preview { height: 90px; }
.inspection-image-field .file-upload-time { margin: 6px 2px 0; line-height: 1.45; }
.inspection-professional-drawer { width: min(1040px,96vw); }
.inspection-detail-hero {
  min-height: 115px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d9e8e9;
  border-radius: 9px;
  background: linear-gradient(145deg,#f1fafb,#fff);
}
.inspection-detail-hero > div:first-child > span { color: #0b7d82; font: 800 8px/1 Arial,sans-serif; letter-spacing: 1.2px; }
.inspection-detail-hero h3 { margin: 7px 0 3px; color: #254b5c; font-size: 19px; }
.inspection-detail-hero p { margin: 0; color: #7b909a; font-size: 9px; }
.inspection-detail-hero > div:last-child { display: grid; justify-items: end; gap: 4px; }
.inspection-detail-hero > div:last-child > strong { color: #12745b; font-size: 23px; }
.inspection-detail-hero > div:last-child > span:last-child { color: #7c9099; font-size: 8px; }
.inspection-detail-defects { min-width: 760px; }
.inspection-detail-gallery { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 9px; }
.inspection-detail-image {
  min-width: 0;
  overflow: hidden;
  display: grid;
  border: 1px solid #dce6e9;
  border-radius: 7px;
  background: #f7fafa;
}
.inspection-detail-image img { width: 100%; height: 105px; display: block; object-fit: cover; }
.inspection-detail-image span { padding: 7px 8px; overflow: hidden; color: #647c87; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.permission-hero, .approval-hero, .operation-hero {
  min-height: 164px; margin-bottom: 16px; padding: 28px 31px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; overflow: hidden; position: relative; border-radius: 10px; color: #fff;
  background: radial-gradient(circle at 82% 18%,rgba(41,184,177,.22),transparent 30%),linear-gradient(135deg,#0b2731 0%,#123e47 68%,#0b6f72 125%);
  box-shadow: 0 12px 32px rgba(12,43,50,.12);
}
.permission-hero:after, .approval-hero:after, .operation-hero:after { content: ""; width: 210px; height: 210px; position: absolute; right: -78px; bottom: -120px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.permission-hero > div:first-child, .approval-hero > div:first-child, .operation-hero > div:first-child { max-width: 720px; position: relative; z-index: 1; }
.permission-hero .eyebrow, .approval-hero .eyebrow, .operation-hero .eyebrow { color: #7fd5cf; font: 800 8px/1 Arial,sans-serif; letter-spacing: 1.7px; }
.permission-hero h2, .approval-hero h2, .operation-hero h2 { margin: 10px 0 7px; font-size: 24px; line-height: 1.2; }
.permission-hero p, .approval-hero p, .operation-hero p { max-width: 670px; margin: 0; color: rgba(255,255,255,.68); font-size: 10px; line-height: 1.8; }
.permission-hero-seal, .operation-hero-lock { width: 166px; min-height: 92px; padding: 16px; display: grid; grid-template-columns: auto 1fr; align-content: center; gap: 4px 10px; position: relative; z-index: 1; border: 1px solid rgba(255,255,255,.16); border-radius: 9px; background: rgba(255,255,255,.07); }
.permission-hero-seal svg, .operation-hero-lock svg { grid-row: 1 / 3; color: #6dd2c9; }
.permission-hero-seal strong, .operation-hero-lock strong { font-size: 11px; }
.permission-hero-seal span, .operation-hero-lock span { color: rgba(255,255,255,.56); font-size: 8px; }
.permission-kpis, .approval-kpis, .operation-kpis { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.permission-workspace { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 16px; align-items: start; }
.permission-role-panel { padding: 0; overflow: hidden; position: sticky; top: 12px; }
.permission-role-head, .permission-editor-head { min-height: 68px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e4ecee; }
.permission-role-head strong, .permission-editor-head strong { display: block; color: #284d59; font-size: 12px; }
.permission-role-head span, .permission-editor-head span { display: block; margin-top: 3px; color: #82959c; font-size: 8px; }
.permission-role-list { padding: 9px; display: grid; gap: 6px; }
.permission-role-card { width: 100%; min-height: 62px; padding: 10px; display: grid; grid-template-columns: 35px minmax(0,1fr) auto; align-items: center; gap: 9px; text-align: left; border: 1px solid transparent; border-radius: 7px; color: #607984; background: transparent; cursor: pointer; }
.permission-role-card:hover { background: #f4f8f8; }
.permission-role-card.active { border-color: #b8d9d7; background: #eef8f7; box-shadow: inset 3px 0 #168c87; }
.permission-role-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 7px; color: #177a77; background: #dcefee; font-weight: 800; font-size: 11px; }
.permission-role-card strong, .permission-role-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permission-role-card strong { color: #31545e; font-size: 10px; }
.permission-role-card small { max-width: 138px; margin-top: 3px; color: #8a9ba1; font-size: 7px; }
.permission-role-card em { padding: 3px 6px; border-radius: 10px; color: #59727b; background: #e7edef; font-style: normal; font-size: 7px; white-space: nowrap; }
.permission-editor { min-width: 0; padding-bottom: 18px; overflow: hidden; }
.permission-editor-head { padding-left: 21px; padding-right: 21px; background: #fbfdfd; }
.permission-role-fields { padding: 18px 21px; display: grid; grid-template-columns: minmax(180px,.7fr) minmax(280px,1.3fr); gap: 14px; border-bottom: 1px solid #e6edef; }
.permission-role-fields label, .approval-filter label, .operation-filter label, .approval-decision-body label { display: grid; gap: 6px; }
.permission-role-fields label span, .approval-filter label span, .operation-filter label span, .approval-decision-body label > span { color: #627a84; font-size: 8px; font-weight: 700; }
.permission-role-fields em { color: #d34d5c; font-style: normal; }
.permission-role-fields input { width: 100%; }
.permission-legend { margin: 15px 21px 0; padding: 10px 12px; display: flex; justify-content: space-between; gap: 12px; border: 1px solid #dbe9e9; border-radius: 7px; color: #789097; background: #f5fafa; font-size: 8px; }
.permission-legend-dot { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; background: #188d88; }
.permission-tools { margin: 12px 21px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.permission-tools .search-box { width: min(360px,100%); }
.permission-tools > div:last-child, .permission-module-actions { display: flex; align-items: center; gap: 6px; }
.permission-modules { padding: 15px 21px 0; display: grid; gap: 12px; }
.permission-module-card { overflow: hidden; border: 1px solid #e0e9eb; border-radius: 8px; }
.permission-module-card[hidden], .permission-matrix-row[hidden] { display: none !important; }
.permission-module-card.collapsed .permission-matrix-table { display: none; }
.permission-module-head { min-height: 51px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; background: #f8fbfb; border-bottom: 1px solid #e5edef; }
.permission-module-head strong, .permission-module-head span { display: block; }
.permission-module-head strong { color: #315762; font-size: 10px; }
.permission-module-head span { margin-top: 2px; color: #91a0a5; font-size: 7px; }
.permission-module-toggle { padding: 5px 9px; border: 1px solid #cddede; border-radius: 5px; color: #267a78; background: #fff; font-size: 8px; cursor: pointer; }
.permission-module-collapse { min-width: 42px; padding: 5px 8px; border: 0; color: #6d858d; background: transparent; font-size: 8px; cursor: pointer; }
.permission-matrix-table { overflow-x: auto; }
.permission-matrix-row { min-width: var(--permission-matrix-min-width,658px); min-height: 43px; display: grid; grid-template-columns: minmax(210px,1fr) repeat(var(--permission-action-count,7),minmax(54px,64px)); align-items: center; border-top: 1px solid #edf1f2; }
.permission-matrix-row:first-child { border-top: 0; }
.permission-matrix-row > span { min-width: 0; padding: 8px 12px; text-align: center; }
.permission-matrix-row > span:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; box-shadow: 1px 0 #edf1f2; }
.permission-matrix-row > span:not(:first-child) { height: 100%; display: grid; place-items: center; border-left: 1px solid #edf1f2; }
.permission-matrix-header { min-height: 35px; color: #789099; background: #fbfcfc; font-size: 7px; font-weight: 800; }
.permission-matrix-header > span:first-child { z-index: 2; background: #fbfcfc; }
.permission-matrix-row strong, .permission-matrix-row small { display: block; }
.permission-matrix-row strong { color: #45636c; font-size: 9px; }
.permission-matrix-row small { margin-top: 2px; color: #9aa8ad; font: 6px/1.2 monospace; }
.permission-node-badge { margin-left: 6px; padding: 2px 5px; display: inline-block; vertical-align: 1px; border-radius: 8px; font-size: 6px; font-style: normal; font-weight: 800; }
.permission-node-badge.admin { color: #9d4f32; background: #fff0e8; }
.permission-node-badge.readonly { color: #52747d; background: #e9f0f2; }
.permission-na { color: #c6d0d3; }
.permission-check { width: 100%; height: 100%; display: grid; place-items: center; cursor: pointer; }
.permission-check input { position: absolute; opacity: 0; pointer-events: none; }
.permission-check i { width: 16px; height: 16px; display: block; border: 1px solid #cad8da; border-radius: 4px; background: #fff; }
.permission-check input:checked + i { border-color: #178b86; background: #178b86; }
.permission-check input:checked + i:after { content: ""; width: 7px; height: 4px; margin: 3px 0 0 3px; display: block; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.permission-check input:disabled + i { opacity: .58; }
.permission-check.admin-locked { cursor: not-allowed; background: #fffaf7; }
.permission-check.admin-locked i { border-style: dashed; }
.btn-danger-soft { color: #b23f4d; border-color: #e8c7cb; background: #fff7f8; }
.approval-hero-rule { min-width: 175px; padding: 16px 18px; position: relative; z-index: 1; border-left: 1px solid rgba(255,255,255,.18); display: grid; justify-items: end; }
.approval-hero-rule strong { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.approval-hero-rule span { margin-top: 5px; font-size: 9px; font-weight: 800; }
.approval-hero-rule small { margin-top: 7px; color: rgba(255,255,255,.55); font-size: 7px; }
.approval-filter-panel { margin-bottom: 16px; padding: 0; overflow: hidden; }
.approval-tabs { min-height: 49px; padding: 0 17px; display: flex; align-items: end; gap: 4px; border-bottom: 1px solid #e3ebed; background: #fbfdfd; }
.approval-tabs button { height: 42px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; color: #788f98; background: transparent; font-size: 9px; cursor: pointer; }
.approval-tabs button.active { color: #147d79; border-bottom-color: #168c87; font-weight: 800; }
.approval-filter { padding: 15px 17px; display: grid; grid-template-columns: repeat(3,minmax(140px,.65fr)) minmax(230px,1fr) auto; gap: 11px; align-items: end; }
.approval-filter input, .approval-filter select, .operation-filter input, .operation-filter select { width: 100%; min-width: 0; }
.approval-table { min-width: 1050px; }
.approval-table td strong, .approval-table td small, .operation-table td strong, .operation-table td small { display: block; }
.approval-table td small, .operation-table td small { max-width: 250px; margin-top: 3px; overflow: hidden; color: #91a0a6; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.approval-type { padding: 4px 7px; border-radius: 4px; color: #29716f; background: #e9f5f4; font-size: 8px; font-weight: 800; white-space: nowrap; }
.approval-status { display: inline-flex; padding: 4px 7px; border-radius: 10px; font-size: 7px; font-weight: 800; white-space: nowrap; }
.approval-status.pending { color: #966823; background: #fff1d7; }
.approval-status.approved { color: #167454; background: #e1f5eb; }
.approval-status.rejected { color: #ad4050; background: #fae6e9; }
.approval-status.withdrawn { color: #667d86; background: #e9eff1; }
.approval-quick-pass { color: #168467; }
.approval-detail-drawer { width: min(680px,94vw); }
.approval-detail-body { display: grid; gap: 14px; background: #f7f9fa; }
.approval-detail-hero { padding: 20px; display: flex; justify-content: space-between; gap: 20px; border: 1px solid #dce7e9; border-radius: 8px; background: #fff; }
.approval-detail-hero > div { min-width: 0; }
.approval-detail-hero > div > span { color: #16827e; font-size: 7px; font-weight: 800; letter-spacing: .7px; }
.approval-detail-hero h3 { margin: 7px 0 5px; color: #2c505b; font-size: 17px; }
.approval-detail-hero p { margin: 0; color: #7d9098; font-size: 9px; line-height: 1.6; }
.approval-detail-section, .approval-timeline, .approval-review-note { padding: 17px 19px; border: 1px solid #e0e8ea; border-radius: 8px; background: #fff; }
.approval-detail-section h4, .operation-detail-section h4 { margin: 0 0 12px; color: #355964; font-size: 10px; }
.approval-snapshot { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid #e6edef; border-radius: 6px; overflow: hidden; }
.approval-snapshot > div { min-height: 58px; padding: 11px 13px; display: grid; align-content: center; border-right: 1px solid #edf1f2; border-bottom: 1px solid #edf1f2; }
.approval-snapshot > div:nth-child(2n) { border-right: 0; }
.approval-snapshot span, .approval-review-note span { color: #8a9ca2; font-size: 7px; }
.approval-snapshot strong { margin-top: 4px; color: #385b65; font-size: 10px; }
.approval-timeline { display: grid; gap: 0; }
.approval-timeline > div { min-height: 58px; display: grid; grid-template-columns: 22px 1fr; gap: 10px; position: relative; }
.approval-timeline > div:not(:last-child):after { content: ""; width: 1px; position: absolute; left: 7px; top: 17px; bottom: -2px; background: #d5e2e3; }
.approval-timeline i { width: 15px; height: 15px; z-index: 1; border: 3px solid #d6e3e4; border-radius: 50%; background: #fff; }
.approval-timeline .done i { border-color: #62b9a4; background: #178d77; }
.approval-timeline .current i { border-color: #f1d59b; background: #d99b2a; }
.approval-timeline strong, .approval-timeline small { display: block; }
.approval-timeline strong { color: #3e5f68; font-size: 9px; }
.approval-timeline small { margin-top: 4px; color: #8a9ba1; font-size: 7px; }
.approval-review-note p { margin: 7px 0 0; color: #4e6972; font-size: 9px; line-height: 1.7; }
.approval-decision-dialog { width: min(560px,94vw); overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 24px 70px rgba(7,32,37,.24); }
.approval-decision-body { padding: 20px; display: grid; gap: 16px; }
.approval-decision-banner { padding: 14px; display: flex; align-items: center; gap: 11px; border: 1px solid #cae6df; border-radius: 7px; color: #18775f; background: #eff9f5; }
.approval-decision-banner.reject { color: #ad4050; border-color: #eccfd3; background: #fff6f7; }
.approval-decision-banner strong, .approval-decision-banner span { display: block; }
.approval-decision-banner strong { font-size: 10px; }
.approval-decision-banner span { margin-top: 3px; color: #799097; font-size: 8px; }
.approval-decision-body textarea { min-height: 100px; resize: vertical; }
.operation-filter { margin-bottom: 16px; padding: 15px 17px; display: grid; grid-template-columns: repeat(5,minmax(125px,.65fr)) minmax(230px,1fr) auto; gap: 11px; align-items: end; }
.operation-table { min-width: 1060px; }
.operation-action { display: inline-flex; padding: 4px 7px; border-radius: 4px; color: #28716f; background: #e8f5f4; font-size: 7px; font-weight: 800; white-space: nowrap; }
.operation-action.risk { color: #ac414e; background: #f9e8ea; }
.operation-detail-drawer { width: min(720px,94vw); }
.operation-detail-body { background: #f7f9fa; }
.operation-detail-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); overflow: hidden; border: 1px solid #dce6e8; border-radius: 8px; background: #fff; }
.operation-detail-summary > div { min-height: 80px; padding: 14px; display: grid; align-content: center; border-right: 1px solid #edf1f2; border-bottom: 1px solid #edf1f2; }
.operation-detail-summary > div:nth-child(3n) { border-right: 0; }
.operation-detail-summary span, .operation-detail-summary small { color: #8a9ba1; font-size: 7px; }
.operation-detail-summary strong { margin: 5px 0 2px; color: #395a64; font-size: 10px; word-break: break-all; }
.operation-detail-section { margin-top: 14px; padding: 17px; border: 1px solid #e0e8ea; border-radius: 8px; background: #fff; }
.operation-detail-grid { display: grid; gap: 7px; }
.operation-detail-grid > div { min-height: 40px; padding: 9px 11px; display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 10px; border: 1px solid #e9eff0; border-radius: 5px; background: #fbfcfc; }
.operation-detail-grid span { color: #82969d; font: 7px/1.4 monospace; }
.operation-detail-grid strong { color: #45636c; font-size: 8px; font-weight: 600; word-break: break-all; }
.operation-detail-empty { padding: 20px; color: #889ba2; text-align: center; font-size: 8px; }
.operation-integrity-note { margin-top: 14px; padding: 13px 15px; display: flex; align-items: center; gap: 10px; border: 1px solid #d8e8e6; border-radius: 7px; color: #1b7771; background: #eef8f7; }
.operation-integrity-note strong, .operation-integrity-note span { display: block; }
.operation-integrity-note strong { font-size: 9px; }
.operation-integrity-note span { margin-top: 2px; color: #789096; font-size: 7px; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .product-images-card { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .product-images-card > p { grid-column: 1 / -1; }
  .platform-live-card { grid-template-columns: 150px minmax(0,1fr); }
  .form-grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sales-customer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sales-customer-grid > div:nth-child(4n) { border-right: 1px solid #e1e9f0; }
  .sales-customer-grid > div:nth-child(2n) { border-right: 0; }
  .today-plan-scope-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .today-plan-filter { grid-template-columns: repeat(2,minmax(220px,1fr)); }
  .today-plan-filter-copy { grid-column: 1 / -1; }
  .today-plan-filter .btn { width: 100%; }
  .delivery-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .delivery-filter-copy { grid-column: 1 / -1; }
  .delivery-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .code-settings-groups { grid-template-columns: 1fr; }
  .supplier-evaluation-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .supplier-evaluation-filter .btn { width: 100%; }
  .reimbursement-management-filter { grid-template-columns: repeat(4,minmax(150px,1fr)); }
  .reimbursement-amount-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .realtime-funds-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .realtime-funds-filter > div { grid-column: 1 / -1; }
  .realtime-account-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-receipt-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .customer-receipt-filter > div { grid-column: 1 / -1; }
  .receipt-dialog-fields, .receipt-attachment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cash-voucher-filter { grid-template-columns: repeat(4,minmax(170px,1fr)); }
  .cash-voucher-filter > div { grid-column: 1 / -1; }
  .cash-voucher-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reconciliation-filter-card { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .reconciliation-filter-copy { grid-column: 1 / -1; }
  .reconciliation-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .eq-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .eq-filter > div:first-child { grid-column: 1 / -1; }
  .eq-filter .btn { width: 100%; }
  .eq-linked-preview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .eq-linked-preview > div, .eq-linked-preview > div:nth-child(5n), .eq-linked-preview > div:nth-last-child(-n+5) { border-right: 1px solid #e1e9ea; border-bottom: 1px solid #e1e9ea; }
  .eq-linked-preview > div:nth-child(3n) { border-right: 0; }
  .eq-linked-preview > div:nth-last-child(-n+1) { border-bottom: 0; }
  .report8d-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .report8d-filter > div:first-child { grid-column: 1 / -1; }
  .report8d-filter .btn { width: 100%; }
  .report8d-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .report8d-stage-strip { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .report8d-product-preview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .report8d-product-preview > div { border-bottom: 1px solid #e1e9e9; }
  .report8d-product-preview > div:nth-child(3n) { border-right: 0; }
  .report8d-product-preview > div:nth-last-child(-n+3) { border-bottom: 0; }
  .inspection-filter { grid-template-columns: repeat(3,minmax(180px,1fr)); }
  .inspection-filter .btn { width: 100%; }
  .inspection-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .inspection-product-preview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .inspection-product-preview > div, .inspection-product-preview > div:nth-child(5), .inspection-product-preview > div:nth-last-child(-n+3) { border-right: 1px solid #e1eaeb; border-bottom: 1px solid #e1eaeb; }
  .inspection-product-preview > div:nth-child(3n) { border-right: 0; }
  .inspection-product-preview > div:nth-last-child(-n+2) { border-bottom: 0; }
  .inspection-attachment-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 880px) {
  .permission-kpis, .approval-kpis, .operation-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .permission-workspace { grid-template-columns: 1fr; }
  .permission-role-panel { position: static; }
  .permission-role-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .permission-matrix-table { overflow-x: auto; }
  .permission-tools { align-items: stretch; flex-direction: column; }
  .permission-tools .search-box { width: 100%; }
  .permission-matrix-row { min-width: var(--permission-matrix-min-width,658px); }
  .approval-filter, .operation-filter { grid-template-columns: repeat(2,minmax(170px,1fr)); }
  .approval-keyword, .operation-keyword { grid-column: auto; }
  .permission-hero, .approval-hero, .operation-hero { padding: 23px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; padding: 28px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { width: min(268px, 86vw); transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-collapse { display: none; }
  .app-main { grid-column: 1; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 16px; }
  .topbar-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .tenant-select { max-width: 155px; }
  .content { padding: 18px 15px 32px; }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opening-stock-row { grid-template-columns: minmax(220px, 1.2fr) 140px 150px; }
  .customer-contact-editor { min-width: 0; }
  .customer-contact-head { display: none; }
  .customer-contact-main { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-contact-main label > span { display: block; }
  .customer-contact-action { place-items: stretch; }
  .customer-contact-action .row-action { align-self: end; }
  .customer-contact-address { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-address-title { grid-column: 1 / -1; }
  .employee-address-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .employee-contract-editor { overflow-x: auto; }
  .employee-contract-head, .employee-contract-row { min-width: 930px; }
  .platform-asset-grid { grid-template-columns: 1fr; }
  .platform-text-grid { grid-template-columns: 1fr; }
  .clear-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .salary-header-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .salary-quickbar { align-items: flex-start; flex-direction: column; }
  .salary-quick-actions { justify-content: flex-start; }
  .salary-sheet-foot { grid-template-columns: repeat(4,minmax(100px,1fr)); }
  .salary-sheet-foot p { grid-column: 1 / -1; }
  .salary-list-toolbar { align-items: flex-start; flex-direction: column; }
  .salary-list-toolbar .toolbar-actions { width: 100%; justify-content: flex-start; }
  .reimbursement-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reimbursement-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reimbursement-invoice-section { overflow-x: auto; }
  .reimbursement-invoice-head, .reimbursement-invoice-row { min-width: 780px; }
  .sales-order-form-page .form-section-body { padding-left: 16px; padding-right: 16px; }
  .business-filter-bar { grid-template-columns: repeat(3,minmax(150px,1fr)); }
  .inventory-filter-bar { grid-template-columns: repeat(2,minmax(220px,1fr)); }
  .inventory-query-button { width: 100%; }
  .order-attachment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .business-query-button { width: 100%; }
  .today-plan-hero { padding: 23px; }
  .delivery-evaluation-hero, .code-settings-hero { padding: 23px; }
  .supplier-evaluation-hero, .realtime-funds-hero { padding: 23px; }
  .supplier-evaluation-summary, .realtime-funds-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .supplier-evaluation-base { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .supplier-evaluation-base .field:last-child { grid-column: 1 / -1; }
  .supplier-evaluation-confirmed { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reimbursement-management-filter { grid-template-columns: repeat(2,minmax(170px,1fr)); }
  .reimbursement-filter-copy { align-items: flex-start; flex-direction: column; }
  .reimbursement-management-filter .btn { width: 100%; }
  .realtime-funds-hero { align-items: flex-start; flex-direction: column; }
  .realtime-funds-total { width: 100%; flex-basis: auto; }
  .realtime-funds-filter { grid-template-columns: repeat(2,minmax(180px,1fr)); }
  .customer-receipt-hero { align-items: flex-start; flex-direction: column; padding: 23px; }
  .customer-receipt-rule { width: 100%; flex-basis: auto; }
  .customer-receipt-filter { grid-template-columns: repeat(2,minmax(190px,1fr)); }
  .customer-receipt-filter .btn { width: 100%; }
  .customer-receipt-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .receipt-line-picker-head { align-items: flex-start; flex-direction: column; }
  .receipt-line-picker-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .receipt-line-search { width: min(100%,420px); flex: 1 1 280px; }
  .cash-voucher-filter { grid-template-columns: repeat(2,minmax(190px,1fr)); }
  .cash-voucher-filter .btn { width: 100%; }
  .cash-voucher-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .delivery-filter { grid-template-columns: repeat(2,minmax(210px,1fr)); }
  .delivery-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .performance-insights, .purchase-performance-insights { grid-template-columns: 1fr; }
  .reconciliation-hero { padding: 23px; }
  .reconciliation-filter-card { grid-template-columns: repeat(2,minmax(210px,1fr)); }
  .reconciliation-filter-card .btn { width: 100%; }
  .reconciliation-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reconciliation-section-head { align-items: flex-start; flex-direction: column; }
  .reconciliation-selection-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .reconciliation-dialog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reconciliation-dialog-summary, .reconciliation-drawer-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .eq-hero, .eq-form-hero { padding: 23px; align-items: flex-start; flex-direction: column; }
  .eq-hero-rule, .eq-form-hero > div:last-child { width: 100%; min-width: 0; flex-basis: auto; }
  .eq-filter { grid-template-columns: repeat(2,minmax(170px,1fr)); }
  .eq-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .eq-linked-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .eq-linked-preview > div, .eq-linked-preview > div:nth-child(3n), .eq-linked-preview > div:nth-last-child(-n+1) { border-right: 1px solid #e1e9ea; border-bottom: 1px solid #e1e9ea; }
  .eq-linked-preview > div:nth-child(2n) { border-right: 0; }
  .eq-linked-preview > div:nth-last-child(-n+2) { border-bottom: 0; }
  .report8d-hero, .report8d-form-hero { padding: 23px; align-items: flex-start; flex-direction: column; }
  .report8d-hero-cycle, .report8d-form-hero > div:last-child { width: 100%; min-width: 0; flex-basis: auto; }
  .report8d-filter { grid-template-columns: repeat(2,minmax(170px,1fr)); }
  .report8d-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report8d-stage-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .report8d-product-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report8d-product-preview > div, .report8d-product-preview > div:nth-child(3n), .report8d-product-preview > div:nth-last-child(-n+3) { border-right: 1px solid #e1e9e9; border-bottom: 1px solid #e1e9e9; }
  .report8d-product-preview > div:nth-child(2n) { border-right: 0; }
  .report8d-product-preview > div:nth-last-child(-n+2) { border-bottom: 0; }
  .report8d-submit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report8d-progress-preview { grid-row: 2; grid-column: 1 / -1; }
  .report8d-team-detail { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inspection-list-hero, .inspection-form-hero { padding: 23px; align-items: flex-start; flex-direction: column; }
  .inspection-form-hero > div:last-child { width: 100%; min-width: 0; }
  .inspection-filter { grid-template-columns: repeat(2,minmax(170px,1fr)); }
  .inspection-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inspection-process-strip { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .inspection-process-strip i { display: none; }
  .inspection-product-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inspection-product-preview > div, .inspection-product-preview > div:nth-child(3n), .inspection-product-preview > div:nth-last-child(-n+2) { border-right: 1px solid #e1eaeb; border-bottom: 1px solid #e1eaeb; }
  .inspection-product-preview > div:nth-child(2n) { border-right: 0; }
  .inspection-product-preview > div:nth-last-child(-n+2) { border-bottom: 0; }
  .inspection-result-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .inspection-attachment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inspection-detail-gallery { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; background: rgba(5,25,27,.36); }
}
@media (max-width: 650px) {
  .procurement-workbench-hero { align-items: flex-start; flex-direction: column; }
  .procurement-workbench-hero .btn { width: 100%; }
  .procurement-kpis,.procurement-chain-hero,.procurement-document-chain > div { grid-template-columns: 1fr; }
  .procurement-selection-bar { align-items: flex-start; flex-direction: column; }
  .procurement-document-chain span { grid-template-columns: 1fr; }
  .permission-hero, .approval-hero, .operation-hero { align-items: flex-start; flex-direction: column; }
  .permission-hero-seal, .operation-hero-lock, .approval-hero-rule { width: 100%; min-width: 0; justify-items: start; border-left: 0; }
  .permission-kpis, .approval-kpis, .operation-kpis, .permission-role-list,
  .permission-role-fields, .approval-filter, .operation-filter,
  .approval-snapshot, .operation-detail-summary { grid-template-columns: 1fr; }
  .permission-editor-head { align-items: flex-start; flex-direction: column; }
  .permission-editor-head .toolbar-actions, .permission-editor-head .btn { width: 100%; }
  .permission-legend { align-items: flex-start; flex-direction: column; }
  .approval-keyword, .operation-keyword { grid-column: auto; }
  .approval-filter .btn, .operation-filter .btn { width: 100%; }
  .operation-detail-summary > div { border-right: 0; }
  .operation-detail-grid > div { grid-template-columns: 1fr; }
  .welcome-date { display: none; }
  .dashboard-welcome { min-height: 142px; padding: 23px; }
  .welcome-copy h2 { font-size: 20px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .page-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .paired-field-row { grid-template-columns: 1fr; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .form-grid-4, .sales-customer-grid { grid-template-columns: 1fr; }
  .receipt-line-summary { align-items: flex-start; flex-direction: column; gap: 7px; }
  .receipt-line-summary > div { width: 100%; justify-content: space-between; gap: 8px; }
  .sales-customer-grid > div, .sales-customer-grid > div:nth-child(2n), .sales-customer-grid > div:nth-child(4n) { border-right: 0; }
  .sales-customer-grid > div.wide { grid-column: auto; }
  .sales-order-lines-head { align-items: flex-start; flex-wrap: wrap; }
  .sales-order-lines-head .btn { width: 100%; margin: 7px 0 0 47px; }
  .reconciliation-hero { align-items: flex-start; flex-direction: column; }
  .reconciliation-hero-note { width: 100%; flex-basis: auto; }
  .reconciliation-filter-card { grid-template-columns: 1fr; }
  .reconciliation-summary-grid { grid-template-columns: 1fr; }
  .reconciliation-dialog-grid, .reconciliation-dialog-summary, .reconciliation-drawer-summary { grid-template-columns: 1fr; }
  .reconciliation-status-editor > div { grid-template-columns: 1fr; }
  .business-filter-bar { grid-template-columns: 1fr; }
  .inventory-filter-bar { grid-template-columns: 1fr; }
  .order-attachment-grid { grid-template-columns: 1fr; }
  .inbound-order-actions { align-items: stretch; flex-direction: column; }
  .business-keyword { grid-column: auto; }
  .today-plan-hero { min-height: 0; align-items: flex-start; flex-direction: column; }
  .today-plan-date-card { width: 100%; min-height: 88px; grid-template-columns: auto minmax(0,1fr); }
  .today-plan-scope-grid, .today-plan-filter { grid-template-columns: 1fr; }
  .today-plan-filter-copy { grid-column: auto; }
  .today-plan-table-heading { align-items: flex-start; }
  .delivery-evaluation-hero, .code-settings-hero { align-items: flex-start; flex-direction: column; }
  .delivery-rate-orbit { align-self: center; }
  .delivery-filter, .delivery-summary-grid { grid-template-columns: 1fr; }
  .delivery-filter-copy { grid-column: auto; }
  .delivery-filter .btn { width: 100%; }
  .performance-status-panel, .performance-trend-panel,
  .purchase-status-panel, .purchase-trend-panel { min-height: 0; padding: 15px; }
  .performance-distribution-row, .purchase-distribution-row { grid-template-columns: 82px minmax(70px,1fr) 38px; gap: 7px; }
  .code-settings-lock { width: 100%; flex-basis: auto; }
  .supplier-evaluation-hero { align-items: flex-start; flex-direction: column; }
  .supplier-evaluation-filter, .supplier-evaluation-summary { grid-template-columns: 1fr; }
  .supplier-evaluation-base, .supplier-evaluation-comments, .supplier-evaluation-confirmed { grid-template-columns: 1fr; }
  .supplier-evaluation-base .field:last-child { grid-column: auto; }
  .supplier-score-head { align-items: flex-start; flex-direction: column; }
  .reimbursement-management-filter, .reimbursement-amount-summary { grid-template-columns: 1fr; }
  .reimbursement-keyword { grid-column: auto; }
  .reimbursement-payment-fields { grid-template-columns: 1fr; }
  .realtime-funds-filter, .realtime-funds-kpis, .realtime-account-grid { grid-template-columns: 1fr; }
  .customer-receipt-filter, .customer-receipt-kpis,
  .receipt-dialog-fields, .receipt-attachment-grid,
  .cash-voucher-filter, .cash-voucher-kpis, .cash-voucher-form-grid { grid-template-columns: 1fr; }
  .receipt-line-picker-head { align-items: flex-start; flex-direction: column; }
  .receipt-line-picker-head > div:last-child, .receipt-line-picker-head .btn { width: 100%; }
  .customer-receipt-modal { padding: 10px; }
  .realtime-section-heading { align-items: flex-start; flex-direction: column; }
  .realtime-section-heading .btn { width: 100%; }
  .form-page-intro, .product-page-hero { align-items: flex-start; flex-direction: column; }
  .customer-contact-section-head { align-items: flex-start; flex-wrap: wrap; }
  .customer-contact-section-head .customer-contact-add { width: 100%; margin-left: 47px; }
  .customer-contact-main, .customer-contact-address { grid-template-columns: 1fr; }
  .contact-address-title { grid-column: auto; }
  .employee-address-grid { grid-template-columns: 1fr; }
  .employee-aligned-grid .field:has(input[name="social_benefits"]) { grid-column: auto; }
  .employee-contract-title { align-items: flex-start; flex-wrap: wrap; }
  .employee-contract-title .contract-template-link { width: 100%; margin: 8px 0 0 47px; }
  .customer-default-cell { align-self: end; }
  .product-images-card { grid-template-columns: 1fr; }
  .opening-stock-head { display: none; }
  .opening-stock-row { padding: 13px; grid-template-columns: 1fr; gap: 7px; }
  .form-page-actions { align-items: stretch; flex-direction: column; }
  .product-actions > div, .product-actions .btn { width: 100%; }
  .component-head { display: none; }
  .component-row, .defect-row { grid-template-columns: 1fr; padding: 12px; }
  .component-row .row-action, .defect-row .row-action { justify-self: end; }
  .top-actions .icon-button { display: none; }
  .tenant-select { width: 125px; }
  .drawer { width: 100vw; }
  .detail-grid, .detail-attachment-grid { grid-template-columns: 1fr; }
  .detail-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-live-card { grid-template-columns: 1fr; }
  .clear-summary-grid, .clear-data-card { grid-template-columns: 1fr; }
  .clear-data-card > div + div { border-top: 1px solid #e4e9ef; border-left: 0; }
  .danger-hero { align-items: flex-start; padding: 22px; }
  .employee-history-changes > div { grid-template-columns: 1fr; gap: 4px; }
  .employee-history-changes b { display: none; }
  .salary-header-grid { grid-template-columns: 1fr; }
  .salary-quickbar { padding: 13px 15px; }
  .salary-quick-actions, .salary-quick-actions .btn { width: 100%; }
  .salary-sheet-foot { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .salary-list-toolbar .toolbar-actions { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .salary-list-toolbar .search-box { grid-column: 1 / -1; }
  .salary-list-toolbar .btn-primary { grid-column: 1 / -1; }
  .salary-detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reimbursement-search-actions { align-items: stretch; display: grid; grid-template-columns: 1fr 1fr; }
  .reimbursement-search-actions .search-box, .reimbursement-search-actions .btn-primary { grid-column: 1 / -1; }
  .reimbursement-summary-grid, .reimbursement-category-grid { grid-template-columns: 1fr; }
  .reimbursement-dialog { width: 100%; max-height: calc(100vh - 20px); }
  .reimbursement-modal-backdrop { padding: 10px; }
  .reimbursement-dialog-head, .reimbursement-dialog-foot { padding-left: 16px; padding-right: 16px; }
  .reimbursement-dialog-body { padding: 14px; }
  .reimbursement-base-grid { grid-template-columns: 1fr; }
  .reimbursement-dialog-foot { align-items: stretch; flex-direction: column; }
  .reimbursement-dialog-foot > div, .reimbursement-dialog-foot .btn { width: 100%; }
  .eq-filter, .eq-kpis, .eq-linked-preview { grid-template-columns: 1fr; }
  .eq-filter > div:first-child { grid-column: auto; }
  .eq-linked-preview > div, .eq-linked-preview > div:nth-child(2n), .eq-linked-preview > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #e1e9ea; }
  .eq-linked-preview > div:last-child { border-bottom: 0; }
  .eq-subject-grid .field.span-2 { grid-column: auto; }
  .eq-section-head, .eq-detail-summary { align-items: flex-start; flex-direction: column; }
  .eq-detail-summary > div:last-child { flex-wrap: wrap; }
  .report8d-filter, .report8d-kpis, .report8d-stage-strip, .report8d-product-preview, .report8d-submit-grid, .report8d-team-detail { grid-template-columns: 1fr; }
  .report8d-filter > div:first-child { grid-column: auto; }
  .report8d-product-preview > div, .report8d-product-preview > div:nth-child(2n), .report8d-product-preview > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #e1e9e9; }
  .report8d-product-preview > div:last-child { border-bottom: 0; }
  .report8d-form-section .field.span-2 { grid-column: auto; }
  .report8d-editor-head, .report8d-section-head, .report8d-detail-summary { align-items: flex-start; flex-direction: column; }
  .report8d-editor-head .btn { width: 100%; }
  .report8d-progress-preview { grid-row: auto; grid-column: auto; }
  .report8d-detail-summary > div:last-child { flex-wrap: wrap; }
  .inspection-filter, .inspection-kpis, .inspection-process-strip,
  .inspection-product-preview, .inspection-result-summary,
  .inspection-attachment-grid, .inspection-detail-gallery { grid-template-columns: 1fr; }
  .inspection-form-section .field.span-2, .inspection-product-preview > div.wide { grid-column: auto; }
  .inspection-product-preview > div, .inspection-product-preview > div:nth-child(2n), .inspection-product-preview > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #e1eaeb; }
  .inspection-product-preview > div:last-child { border-bottom: 0; }
  .inspection-defect-section-head, .inspection-detail-hero { align-items: flex-start; flex-direction: column; }
  .inspection-defect-section-head .btn { width: 100%; margin-left: 47px; }
  .inspection-detail-hero > div:last-child { justify-items: start; }
}

/* Print designer WYSIWYG geometry and multi-control alignment tools. */
.print-center-page .print-paper-slot {
  flex: 0 0 auto;
  position: relative;
}

.print-center-page .print-paper-slot > .print-paper.is-designer {
  height: var(--print-paper-height);
  min-height: 0;
  min-width: 0;
  transform: scale(var(--print-canvas-zoom, 1));
  transform-origin: left top;
}

.print-center-page .print-paper.is-designer .print-free-element {
  border: 0;
  font-weight: var(--print-control-font-weight, normal);
  min-height: 0;
  min-width: 0;
  outline: 1px solid transparent;
}

.print-center-page .print-paper.is-designer .print-free-element:hover {
  border: 0;
  outline-color: #8fb2f7;
}

.print-center-page .print-paper.is-designer .print-free-element.is-selected,
.print-center-page .print-paper.is-designer .print-free-element[aria-selected="true"] {
  border: 0;
  outline: 2px solid var(--zg-blue-600, #2f6cff);
  outline-offset: 0;
}

.print-center-page .print-paper.is-designer .print-free-image {
  background: transparent;
  min-height: 0;
}

.print-center-page .print-paper.is-designer .print-free-image-frame {
  background:
    linear-gradient(45deg, #f2f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f2f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f2f5f9 75%),
    #fff;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  cursor: move;
  min-height: 0;
}

.print-center-page .print-paper.is-designer .print-free-text {
  padding: 0;
}

.print-center-page .print-paper.is-designer [data-control-type="text"] > textarea,
.print-center-page .print-paper.is-designer [data-control-type="title"] > textarea {
  font-weight: inherit;
  padding: 5px 7px;
}

.print-center-page .print-free-field-content strong,
.print-center-page .print-grid-child textarea,
.print-center-page .print-grid-cell-editor {
  font-weight: inherit;
}

.print-center-page .print-alignment-toolbar {
  align-items: center;
  background: #f4f7fc;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 680px;
  padding: 5px 7px;
}

.print-center-page .print-selection-count {
  color: #536a84;
  font-size: 11px;
  margin-right: 2px;
  white-space: nowrap;
}

.print-center-page .print-selection-count strong { color: #2454d7; }

.print-center-page .print-alignment-group {
  display: inline-flex;
  gap: 2px;
}

.print-center-page .print-alignment-group button {
  background: #fff;
  border: 1px solid #cbd9eb;
  border-radius: 5px;
  color: #294967;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  min-height: 27px;
  padding: 3px 6px;
  white-space: nowrap;
}

.print-center-page .print-alignment-group button:hover:not(:disabled) {
  background: #eaf1ff;
  border-color: #8eaff1;
  color: #2454d7;
}

.print-center-page .print-alignment-group button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.print-center-page .print-alignment-toolbar > small {
  color: #788ca3;
  flex-basis: 100%;
  font-size: 9px;
}
.analysis-page{display:grid;gap:18px}.analysis-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:28px 30px;border-radius:18px;color:#fff;background:linear-gradient(125deg,#123c36,#1d6a59 68%,#c8973f);box-shadow:0 14px 34px rgba(18,60,54,.16)}.analysis-hero span{font-size:11px;letter-spacing:.18em;opacity:.75}.analysis-hero h2{margin:6px 0 8px;font-size:28px}.analysis-hero p{margin:0;max-width:760px;color:rgba(255,255,255,.78)}.analysis-stamp{text-align:right;font-size:12px;color:rgba(255,255,255,.7)}.analysis-stamp strong{color:#fff}.analysis-filter{display:flex;align-items:flex-end;gap:12px;padding:16px 18px;flex-wrap:wrap}.analysis-filter label{display:grid;gap:6px;min-width:180px;font-size:12px;color:var(--text-muted)}.analysis-filter input,.analysis-filter select{height:38px;min-width:180px}.analysis-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px}.analysis-kpis article{padding:18px 20px;border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:0 8px 20px rgba(32,57,53,.05)}.analysis-kpis span{display:block;margin-bottom:8px;font-size:12px;color:var(--text-muted)}.analysis-kpis strong{font-size:21px;color:var(--text)}.analysis-negative{color:#c74343!important;font-weight:700}.analysis-positive{color:#188465!important;font-weight:700}.analysis-progress{width:84px;height:5px;margin-bottom:5px;border-radius:10px;background:#e9eeec;overflow:hidden}.analysis-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2a8a72,#d29b3f)}@media(max-width:800px){.analysis-hero{align-items:flex-start;flex-direction:column}.analysis-stamp{text-align:left}.analysis-filter label,.analysis-filter input,.analysis-filter select{width:100%;min-width:0}}
.analysis-page{gap:16px}.analysis-hero{position:relative;overflow:hidden;align-items:center;padding:30px 32px;background:linear-gradient(122deg,#103e36 0%,#176554 68%,#bd8a35 120%)}.analysis-hero:after{position:absolute;right:-70px;top:-110px;width:260px;height:260px;border:1px solid rgba(255,255,255,.16);border-radius:50%;content:""}.analysis-hero h2{font-size:30px;letter-spacing:.02em}.analysis-hero p{max-width:850px;line-height:1.75}.analysis-stamp{position:relative;z-index:1;display:grid;gap:5px;min-width:150px;padding:15px 18px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.08);backdrop-filter:blur(8px)}.analysis-stamp span,.analysis-stamp small{letter-spacing:0;opacity:.72}.analysis-stamp strong{font-size:15px}.analysis-filter{position:relative;z-index:5;display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));align-items:end;padding:18px 20px}.analysis-filter label{min-width:0}.analysis-filter label>span{font-weight:600;color:var(--text)}.analysis-filter input,.analysis-filter select,.analysis-filter .searchable-select-input{width:100%;min-width:0;height:40px}.analysis-filter-actions{display:flex;gap:8px;align-items:center;min-width:max-content}.analysis-filter-actions .btn{height:40px}.analysis-kpis{grid-template-columns:repeat(6,minmax(0,1fr))}.analysis-kpis article{position:relative;overflow:hidden;min-height:112px;padding:18px}.analysis-kpis article:before{position:absolute;top:0;left:0;width:100%;height:3px;background:linear-gradient(90deg,#1e7965,#d4a24d);content:""}.analysis-kpis strong{display:block;font-size:20px;font-variant-numeric:tabular-nums}.analysis-kpis small{display:block;margin-top:8px;color:var(--text-muted)}.analysis-section-title{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:18px 20px 13px;border-bottom:1px solid var(--border)}.analysis-section-title strong{font-size:16px}.analysis-section-title span{font-size:12px;color:var(--text-muted)}.analysis-main-panel,.analysis-history-panel{overflow:hidden}.analysis-table th{white-space:nowrap;background:#f4f8f6;color:#3c5751;font-size:12px}.analysis-table td{vertical-align:middle}.analysis-profit-table tbody tr[data-analysis-chain],.analysis-table tbody tr[data-price-product]{cursor:pointer}.analysis-profit-table tbody tr[data-analysis-chain]:hover,.analysis-table tbody tr[data-price-product]:hover{background:#f2f9f6}.analysis-basis,.analysis-status{display:inline-flex;padding:3px 8px;border:1px solid #d6e6df;border-radius:999px;background:#f5faf8;color:#2f6b5f;font-size:11px;white-space:nowrap}.analysis-status.success{border-color:#bfe3d5;background:#edf8f3;color:#157457}.analysis-status.warning{border-color:#ead8ad;background:#fff9eb;color:#946a17}.analysis-status.danger{border-color:#efc7c7;background:#fff2f2;color:#bd3d3d}.analysis-status.muted{border-color:#dae1df;background:#f5f7f6;color:#667772}.analysis-insight-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:16px}.analysis-insight{overflow:hidden}.analysis-rank-row{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:10px;padding:10px 20px;border-bottom:1px dashed var(--border)}.analysis-rank-row:last-child{border-bottom:0}.analysis-rank-row b{display:grid;place-items:center;width:22px;height:22px;border-radius:7px;background:#e9f3ef;color:#176554;font-size:11px}.analysis-rank-row i{display:flex;gap:10px;align-items:center;font-style:normal;font-weight:700}.analysis-rank-row small{color:var(--text-muted);font-weight:400}.analysis-notes{display:grid;gap:10px;margin:0;padding:17px 24px 20px 38px;color:var(--text-muted);line-height:1.55}.analysis-notes b{color:var(--text)}.analysis-risk-strip{display:grid;grid-template-columns:repeat(5,1fr);overflow:hidden}.analysis-risk-strip article{display:grid;grid-template-columns:1fr auto;align-items:center;gap:2px;padding:16px 20px;border-right:1px solid var(--border)}.analysis-risk-strip article:last-child{border:0}.analysis-risk-strip strong{grid-row:1/3;grid-column:2;font-size:26px;color:#184d42}.analysis-risk-strip small{color:var(--text-muted)}.analysis-progress{width:100%;min-width:90px}.analysis-progress i.warning{background:#d2a044}.analysis-progress i.danger{background:#cf4f4f}.sales-credit-placeholder{margin-top:12px;padding:14px 16px;border:1px dashed #cedcd7;border-radius:10px;background:#f8fbfa;color:var(--text-muted)}.sales-credit-card{margin-top:12px;padding:14px 16px;border:1px solid #d5e5df;border-radius:12px;background:#f5faf8}.sales-credit-card.is-warning{border-color:#ead6a8;background:#fffaf0}.sales-credit-card.is-blocked{border-color:#efc6c6;background:#fff6f6}.sales-credit-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;font-weight:700}.sales-credit-heading>span{display:flex;align-items:center;gap:7px}.sales-credit-values{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px}.sales-credit-values div{padding-right:10px;border-right:1px solid rgba(81,113,105,.14)}.sales-credit-values div:last-child{border:0}.sales-credit-values span{display:block;margin-bottom:4px;font-size:11px;color:var(--text-muted)}.sales-credit-values strong{font-size:14px}.sales-credit-card p{margin:11px 0 0;padding-top:9px;border-top:1px dashed rgba(81,113,105,.2);font-size:12px;color:var(--text-muted)}
.analysis-filter input,.analysis-filter select,.analysis-filter .searchable-select-input{box-sizing:border-box;max-width:100%;min-height:40px;padding:0 10px;border:1px solid #ccd7e2;border-radius:6px;color:var(--ink);outline:0;background-color:#fff;box-shadow:none}.analysis-filter .searchable-select{width:100%;max-width:100%;min-width:0}.analysis-filter .searchable-select-input{padding:0 30px 0 10px!important}.analysis-filter input:focus,.analysis-filter select:focus,.analysis-filter .searchable-select.open .searchable-select-input{border-color:var(--accent)!important;box-shadow:0 0 0 3px rgba(5,110,225,.1)!important}
@media(max-width:1180px){.analysis-kpis{grid-template-columns:repeat(3,1fr)}.analysis-filter{grid-template-columns:repeat(3,1fr)}.sales-credit-values{grid-template-columns:repeat(3,1fr)}.analysis-insight-grid{grid-template-columns:1fr}}
@media(max-width:760px){.analysis-kpis,.analysis-filter,.analysis-risk-strip{grid-template-columns:1fr}.analysis-risk-strip article{border-right:0;border-bottom:1px solid var(--border)}.analysis-section-title{align-items:flex-start;flex-direction:column}.sales-credit-values{grid-template-columns:repeat(2,1fr)}}

/* Engineering management */
.engineering-hero,.engineering-form-hero{position:relative;display:flex;justify-content:space-between;align-items:center;gap:28px;overflow:hidden;margin-bottom:16px;padding:29px 32px;border-radius:18px;color:#fff;background:linear-gradient(122deg,#102f3c 0%,#155d60 64%,#b9863c 120%);box-shadow:0 14px 34px rgba(16,47,60,.16)}
.engineering-hero:after,.engineering-form-hero:after{position:absolute;right:-80px;top:-130px;width:310px;height:310px;border:1px solid rgba(255,255,255,.15);border-radius:50%;content:""}
.engineering-hero>div,.engineering-form-hero>div{position:relative;z-index:1}.engineering-hero>div:first-child,.engineering-form-hero>div:first-child{max-width:820px}
.engineering-hero span,.engineering-form-hero span{font-size:11px;letter-spacing:.17em;color:rgba(255,255,255,.7)}
.engineering-hero h2,.engineering-form-hero h2{margin:7px 0 8px;font-size:29px;letter-spacing:.02em}.engineering-hero p,.engineering-form-hero p{margin:0;line-height:1.7;color:rgba(255,255,255,.76)}
.engineering-hero-flow{display:flex;align-items:center;gap:7px;min-width:max-content;padding:14px 16px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.08);backdrop-filter:blur(8px)}
.engineering-hero-flow span,.engineering-hero-flow strong{letter-spacing:0;font-size:12px;color:#fff}.engineering-hero-flow i{font-style:normal;color:rgba(255,255,255,.45)}
.engineering-form-hero>div:last-child{display:grid;gap:5px;min-width:220px;padding:14px 18px;border:1px solid rgba(255,255,255,.18);border-radius:12px;background:rgba(255,255,255,.08)}
.engineering-form-hero>div:last-child span,.engineering-form-hero>div:last-child small{letter-spacing:0;color:rgba(255,255,255,.7)}.engineering-form-hero>div:last-child strong{font-size:19px}
.engineering-filter{display:grid;grid-template-columns:repeat(4,minmax(165px,1fr));gap:12px;align-items:end;padding:18px 20px;margin-bottom:14px}
.engineering-filter-title{grid-column:1/-1;display:flex;justify-content:space-between;gap:18px;padding-bottom:7px;border-bottom:1px solid var(--border)}
.engineering-filter-title span{font-size:12px;color:var(--text-muted)}.engineering-filter label{display:grid;gap:6px;min-width:0}.engineering-filter label>span{font-size:12px;font-weight:600;color:var(--text)}
.engineering-filter input,.engineering-filter select,.engineering-filter .searchable-select-input{box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:40px;min-height:40px;padding:0 10px;border:1px solid #ccd7e2;border-radius:6px;color:var(--ink);outline:0;background-color:#fff;box-shadow:none}.engineering-filter .searchable-select{width:100%;max-width:100%;min-width:0}.engineering-filter .searchable-select-input{padding:0 30px 0 10px!important}.engineering-filter input:focus,.engineering-filter select:focus,.engineering-filter .searchable-select.open .searchable-select-input{border-color:var(--accent)!important;box-shadow:0 0 0 3px rgba(5,110,225,.1)!important}.engineering-keyword{grid-column:span 2}
.engineering-filter-actions{display:flex;gap:8px}.engineering-filter-actions .btn{height:40px;white-space:nowrap}
.engineering-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin-bottom:16px}
.engineering-kpis article{position:relative;overflow:hidden;min-height:106px;padding:17px 18px;border:1px solid var(--border);border-radius:14px;background:var(--panel);box-shadow:0 8px 20px rgba(32,57,53,.05)}
.engineering-kpis article:before{position:absolute;inset:0 auto 0 0;width:4px;background:#8aa39d;content:""}.engineering-kpis article.processing:before{background:#367c87}.engineering-kpis article.missing:before{background:#d29342}.engineering-kpis article.confirming:before{background:#6b6ab1}.engineering-kpis article.released:before{background:#1f8a67}.engineering-kpis article.risk:before{background:#c84c4c}
.engineering-kpis span{display:block;margin-bottom:7px;font-size:12px;color:var(--text-muted)}.engineering-kpis strong{display:block;font-size:25px;color:var(--text)}.engineering-kpis small{display:block;margin-top:7px;color:var(--text-muted)}
.engineering-list-panel{overflow:hidden}.engineering-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:18px 20px 13px;border-bottom:1px solid var(--border)}.engineering-section-head>div{display:grid;gap:4px}.engineering-section-head strong{font-size:16px}.engineering-section-head span{font-size:12px;color:var(--text-muted)}
.engineering-review-table th{white-space:nowrap;background:#f2f7f6;color:#395b59;font-size:12px}.engineering-review-table td{vertical-align:middle}.engineering-review-table tbody tr{cursor:pointer}.engineering-review-table tbody tr:hover{background:#f2f9f7}
.engineering-status,.engineering-risk,.engineering-material{display:inline-flex;align-items:center;padding:3px 8px;border:1px solid #d7e2df;border-radius:999px;background:#f5f8f7;color:#5a6e69;font-size:11px;white-space:nowrap}
.engineering-status.released,.engineering-material.ready{border-color:#bfe4d5;background:#edf9f4;color:#177657}.engineering-status.processing{border-color:#c4dcdf;background:#f0f8f9;color:#27717a}.engineering-status.waiting{border-color:#d9d3ef;background:#f7f5ff;color:#665da0}.engineering-status.missing,.engineering-material.missing{border-color:#ecd6a9;background:#fff9eb;color:#956b19}.engineering-status.cancelled,.engineering-status.closed{border-color:#d9dfdd;background:#f3f5f4;color:#737f7b}
.engineering-risk.low{border-color:#c8e5d8;background:#f1faf6;color:#207657}.engineering-risk.medium{border-color:#ead9af;background:#fff9ec;color:#916a1e}.engineering-risk.high,.engineering-risk.critical{border-color:#efc4c4;background:#fff1f1;color:#bd3b3b}.engineering-risk.critical{font-weight:800}.engineering-material.pending{border-color:#cfdddd;background:#f4f8f7;color:#607975}
.engineering-progress{display:flex;align-items:center;gap:7px;min-width:112px}.engineering-progress>span{display:block;width:64px;height:5px;overflow:hidden;border-radius:99px;background:#e6edeb}.engineering-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#267b69,#d29c42)}.engineering-progress strong{font-size:11px;white-space:nowrap}
.engineering-linked-preview{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));overflow:hidden;margin-top:15px;border:1px solid #dce7e5;border-radius:12px;background:#f7faf9}.engineering-linked-preview>div{min-width:0;padding:12px 14px;border-right:1px solid #e2eae8;border-bottom:1px solid #e2eae8}.engineering-linked-preview>div:nth-child(6n){border-right:0}.engineering-linked-preview>div:nth-last-child(-n+6){border-bottom:0}.engineering-linked-preview span{display:block;margin-bottom:5px;font-size:11px;color:var(--text-muted)}.engineering-linked-preview strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.engineering-product-selector{grid-column:span 1}.engineering-line-loading,.engineering-line-error{display:flex;align-items:center;gap:8px;min-height:40px;padding:0 12px;border:1px solid var(--border);border-radius:8px;background:#f7faf9;color:var(--text-muted)}.engineering-line-loading .boot-spinner{width:17px;height:17px}
.engineering-check-card .form-section-body{padding-top:14px}.engineering-check-editor{min-width:860px}.engineering-check-editor th{background:#f2f7f6;color:#355b58}.engineering-check-editor th:first-child,.engineering-check-editor td:first-child{width:58px;text-align:center}.engineering-check-editor th:nth-child(2){width:210px}.engineering-check-editor th:nth-child(3){width:150px}.engineering-check-editor select,.engineering-check-editor input{width:100%;min-width:0}.engineering-check-editor td{vertical-align:middle}.engineering-check-editor strong{color:#244d49}
.engineering-detail-drawer{max-width:1040px}.engineering-detail-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:22px 24px;color:#fff;background:linear-gradient(120deg,#123943,#176a64)}.engineering-detail-hero h3{margin:5px 0;font-size:24px}.engineering-detail-hero p{margin:0;color:rgba(255,255,255,.7)}.engineering-detail-hero>div:last-child{display:flex;gap:8px}.engineering-detail-hero .engineering-risk,.engineering-detail-hero .engineering-status{border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.12);color:#fff}
.engineering-check-detail th{background:#f2f7f6}.engineering-check-detail th:nth-child(1){width:230px}.engineering-check-detail th:nth-child(2){width:150px}.engineering-check-detail td{vertical-align:middle}
.engineering-check-status{display:inline-flex;align-items:center;padding:3px 8px;border:1px solid #cfdddd;border-radius:999px;background:#f4f8f7;color:#607975;font-size:11px;white-space:nowrap}.engineering-check-status.ready{border-color:#bfe4d5;background:#edf9f4;color:#177657}.engineering-check-status.missing{border-color:#ecd6a9;background:#fff9eb;color:#956b19}.engineering-check-status.na{border-color:#d9dfdd;background:#f3f5f4;color:#737f7b}
.engineering-creator-section{margin-bottom:0}
@media(max-width:1280px){.engineering-filter{grid-template-columns:repeat(3,minmax(165px,1fr))}.engineering-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.engineering-linked-preview{grid-template-columns:repeat(4,minmax(0,1fr))}.engineering-linked-preview>div:nth-child(6n){border-right:1px solid #e2eae8}.engineering-linked-preview>div:nth-child(4n){border-right:0}.engineering-linked-preview>div:nth-last-child(-n+6){border-bottom:1px solid #e2eae8}.engineering-linked-preview>div:nth-last-child(-n+3){border-bottom:0}}
@media(max-width:800px){.engineering-hero,.engineering-form-hero{align-items:flex-start;flex-direction:column;padding:24px}.engineering-hero-flow{width:100%;overflow-x:auto}.engineering-form-hero>div:last-child{width:100%}.engineering-filter{grid-template-columns:1fr}.engineering-filter-title{align-items:flex-start;flex-direction:column}.engineering-keyword{grid-column:auto}.engineering-filter-actions{display:grid;grid-template-columns:1fr 1fr}.engineering-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.engineering-linked-preview{grid-template-columns:repeat(2,minmax(0,1fr))}.engineering-linked-preview>div:nth-child(4n){border-right:1px solid #e2eae8}.engineering-linked-preview>div:nth-child(2n){border-right:0}.engineering-linked-preview>div:nth-last-child(-n+3){border-bottom:1px solid #e2eae8}.engineering-linked-preview>div:nth-last-child(-n+1){border-bottom:0}.engineering-detail-hero{align-items:flex-start;flex-direction:column}}

/* First-login password change */
.password-change-shell{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(480px,.92fr);min-height:100vh;background:#f4f7f8}
.password-change-brand{position:relative;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;padding:48px 56px;color:#fff;background:radial-gradient(circle at 84% 16%,rgba(208,162,78,.25),transparent 28%),linear-gradient(145deg,#0b3035 0%,#15594f 58%,#1b6f60 100%)}
.password-change-brand:after{position:absolute;right:-165px;bottom:-185px;width:520px;height:520px;border:1px solid rgba(255,255,255,.12);border-radius:50%;content:""}.password-change-brand .brand-lockup{position:relative;z-index:1}.password-change-brand .brand-lockup img{width:100%;height:100%;object-fit:contain}.password-change-brand .brand-copy strong,.password-change-brand .brand-copy span{color:#fff}
.password-change-brand-copy{position:relative;z-index:1;max-width:620px}.password-change-brand-copy>span{font-size:11px;font-weight:800;letter-spacing:.22em;color:#8cd8ca}.password-change-brand-copy h1{margin:15px 0 19px;font-size:44px;line-height:1.23;letter-spacing:.01em}.password-change-brand-copy p{max-width:570px;margin:0;font-size:15px;line-height:1.9;color:rgba(255,255,255,.72)}
.password-change-security-note{position:relative;z-index:1;display:flex;align-items:center;gap:13px;width:max-content;max-width:100%;padding:13px 17px;border:1px solid rgba(255,255,255,.17);border-radius:13px;background:rgba(255,255,255,.08);backdrop-filter:blur(10px)}.password-change-security-note svg{flex:0 0 auto;color:#9de2d5}.password-change-security-note strong,.password-change-security-note span{display:block}.password-change-security-note strong{font-size:12px}.password-change-security-note span{margin-top:3px;font-size:10px;color:rgba(255,255,255,.62)}
.password-change-panel{display:grid;place-items:center;padding:40px}.password-change-card{position:relative;width:min(100%,470px);padding:34px 38px;border:1px solid #dde6e4;border-radius:20px;background:#fff;box-shadow:0 24px 60px rgba(16,54,50,.12)}.password-change-account{display:flex;align-items:center;gap:12px;margin-bottom:25px;padding-bottom:18px;border-bottom:1px solid #e5ecea}.password-change-avatar{display:grid;place-items:center;width:43px;height:43px;border-radius:13px;background:linear-gradient(135deg,#17685c,#c59645);color:#fff;font-size:17px;font-weight:800}.password-change-account div{display:grid;min-width:0}.password-change-account small{font-size:10px;color:#78908b}.password-change-account strong{margin:2px 0;font-size:14px;color:#234b45}.password-change-account em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px;font-style:normal;color:#8a9e9a}.password-change-lock{position:absolute;right:38px;top:40px;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#edf7f4;color:#18705f}.password-change-card h2{margin:0 0 7px;font-size:24px;color:#173d38}.password-change-card>p{margin:0 0 22px;font-size:12px;color:#728580}.password-change-card label{display:grid;gap:7px;margin-bottom:15px}.password-change-card label span{font-size:12px;font-weight:700;color:#345650}.password-change-card input{width:100%;height:45px;padding:0 13px;border:1px solid #d5e0dd;border-radius:10px;background:#fbfdfc;font-size:13px;outline:0}.password-change-card input:focus{border-color:#2a8b76;box-shadow:0 0 0 3px rgba(42,139,118,.1)}
.password-change-rules{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;margin:5px 0 20px;padding:13px 14px;border-radius:11px;background:#f5f8f7}.password-change-rules span{display:flex;align-items:center;gap:7px;font-size:10px;color:#82938f}.password-change-rules i{width:7px;height:7px;border-radius:50%;background:#c6d0cd}.password-change-rules span.valid{color:#17745d}.password-change-rules span.valid i{background:#1b9a75;box-shadow:0 0 0 3px rgba(27,154,117,.1)}
.password-change-submit{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:46px;border:0;border-radius:10px;background:linear-gradient(135deg,#166b5d,#1e8a73);color:#fff;font-weight:750;cursor:pointer;box-shadow:0 9px 22px rgba(24,116,96,.2)}.password-change-submit:disabled{opacity:.65;cursor:wait}.password-change-logout{display:block;margin:14px auto 0;border:0;background:transparent;color:#728580;font-size:11px;cursor:pointer}.password-change-logout:hover{color:#1d6558}
.system-users-kpis,.supplier-account-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}.system-user-status.password,.supplier-account-status.password{background:#fff5df;border-color:#ecd8ae;color:#91651a}.system-user-status.password i{background:#d99a32}.supplier-account-kpis .pending-password::before{background:#d99a32}
@media(max-width:1100px){.password-change-shell{grid-template-columns:1fr}.password-change-brand{min-height:330px;padding:35px 40px}.password-change-brand-copy h1{font-size:34px}.password-change-panel{padding:32px}.system-users-kpis,.supplier-account-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.password-change-brand{min-height:270px;padding:26px 24px}.password-change-brand-copy h1{font-size:27px}.password-change-brand-copy p{font-size:13px}.password-change-security-note{display:none}.password-change-panel{padding:18px}.password-change-card{padding:28px 22px;border-radius:16px}.password-change-lock{right:22px;top:33px}.password-change-rules{grid-template-columns:1fr}.system-users-kpis,.supplier-account-kpis{grid-template-columns:1fr}}

/* Print template center — scoped professional document-design workspace */
.print-template-page,
.print-center-page {
  --print-green-950: #092f2c;
  --print-green-900: #103f39;
  --print-green-800: #15584d;
  --print-green-700: #1d725f;
  --print-green-100: #e8f3ef;
  --print-green-50: #f4f9f7;
  --print-gold-600: #aa762e;
  --print-gold-500: #c69347;
  --print-gold-100: #f8ecd8;
  --print-ink: #19312d;
  --print-muted: #6d817d;
  --print-line: #dbe5e2;
  --print-soft-line: #e9efed;
  --print-workspace: #e9efed;
  --print-panel: #ffffff;
  --print-danger: #b84b51;
  --print-radius: 14px;
  color: var(--print-ink);
  display: grid;
  gap: 15px;
  isolation: isolate;
  min-width: 0;
}

.print-template-page *,
.print-center-page * {
  box-sizing: border-box;
}

.print-template-hero {
  align-items: center;
  background:
    radial-gradient(circle at 86% 12%, rgba(219, 174, 98, .24), transparent 28%),
    linear-gradient(124deg, var(--print-green-950) 0%, var(--print-green-800) 67%, #8d682f 135%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(17, 65, 58, .16);
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 154px;
  overflow: hidden;
  padding: 26px 30px;
  position: relative;
}

.print-template-hero::before,
.print-template-hero::after {
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.print-template-hero::before {
  height: 260px;
  right: -96px;
  top: -159px;
  width: 260px;
}

.print-template-hero::after {
  bottom: -132px;
  height: 205px;
  right: 128px;
  width: 205px;
}

.print-template-hero > * {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.print-template-hero > div:first-child {
  max-width: 820px;
}

.print-template-hero h1,
.print-template-hero h2 {
  color: #fff;
  font-size: clamp(23px, 2vw, 30px);
  letter-spacing: .02em;
  margin: 6px 0 8px;
}

.print-template-hero p {
  color: rgba(255, 255, 255, .72);
  line-height: 1.75;
  margin: 0;
}

.print-template-hero small,
.print-template-hero .eyebrow,
.print-template-hero > div:first-child > span {
  color: #e6c58c;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.print-template-hero > div:last-child,
.print-template-hero .print-designer-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.print-template-hero .btn {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .24);
  color: #fff;
}

.print-template-hero .btn:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .36);
}

.print-template-hero .btn-primary {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 8px 22px rgba(3, 26, 23, .2);
  color: var(--print-green-800);
}

.print-designer-shell {
  background: var(--print-panel);
  border: 1px solid var(--print-line);
  border-radius: 16px;
  box-shadow: 0 15px 38px rgba(27, 62, 56, .09);
  display: grid;
  grid-template-areas: "templates canvas properties";
  grid-template-columns: minmax(205px, 240px) minmax(0, 1fr) minmax(260px, 300px);
  min-height: 690px;
  overflow: hidden;
}

.print-template-sidebar {
  background: #fbfdfc;
  border-right: 1px solid var(--print-line);
  display: flex;
  flex-direction: column;
  grid-area: templates;
  min-width: 0;
  overflow: hidden;
}

.print-template-sidebar > header,
.print-template-sidebar > .print-sidebar-head,
.print-properties > header,
.print-properties > .print-properties-head {
  border-bottom: 1px solid var(--print-soft-line);
  display: grid;
  gap: 3px;
  min-height: 65px;
  padding: 14px 16px 12px;
}

.print-template-sidebar > header strong,
.print-template-sidebar > .print-sidebar-head strong,
.print-properties > header strong,
.print-properties > .print-properties-head strong {
  font-size: 13px;
}

.print-template-sidebar > header span,
.print-template-sidebar > .print-sidebar-head span,
.print-properties > header span,
.print-properties > .print-properties-head span {
  color: var(--print-muted);
  font-size: 10px;
}

.print-document-types {
  border-bottom: 1px solid var(--print-soft-line);
  display: grid;
  gap: 4px;
  max-height: 314px;
  overflow: auto;
  padding: 10px;
  scrollbar-color: #c5d3cf transparent;
  scrollbar-width: thin;
}

.print-document-type {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #4d6560;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  min-height: 43px;
  padding: 6px 9px;
  text-align: left;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
  width: 100%;
}

.print-document-type:hover {
  background: var(--print-green-50);
  border-color: #dce8e4;
  color: var(--print-green-800);
  transform: translateX(2px);
}

.print-document-type.active,
.print-document-type.selected,
.print-document-type.is-selected,
.print-document-type[aria-selected="true"] {
  background: var(--print-green-100);
  border-color: #c8ddd6;
  color: var(--print-green-800);
  font-weight: 750;
}

.print-document-type > svg,
.print-document-type > i,
.print-document-type > .icon {
  align-items: center;
  background: #eef4f2;
  border-radius: 8px;
  color: #57746e;
  display: flex;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.print-document-type.active > svg,
.print-document-type.active > i,
.print-document-type.active > .icon,
.print-document-type[aria-selected="true"] > svg,
.print-document-type[aria-selected="true"] > i,
.print-document-type[aria-selected="true"] > .icon {
  background: var(--print-green-800);
  color: #fff;
}

.print-document-type span,
.print-document-type strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-document-type small {
  background: #eef3f1;
  border-radius: 99px;
  color: var(--print-muted);
  font-size: 9px;
  min-width: 21px;
  padding: 2px 6px;
  text-align: center;
}

.print-template-list {
  align-content: start;
  display: grid;
  flex: 1;
  gap: 7px;
  min-height: 130px;
  overflow: auto;
  padding: 10px;
  scrollbar-color: #c5d3cf transparent;
  scrollbar-width: thin;
}

.print-template-card {
  background: #fff;
  border: 1px solid var(--print-soft-line);
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 11px;
  position: relative;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.print-template-card:hover {
  border-color: #bfd5cd;
  box-shadow: 0 7px 18px rgba(24, 79, 67, .08);
  transform: translateY(-1px);
}

.print-template-card.active,
.print-template-card.selected,
.print-template-card.is-selected,
.print-template-card[aria-selected="true"] {
  background: #f4faf7;
  border-color: #89b4a7;
  box-shadow: inset 3px 0 var(--print-green-700);
}

.print-template-card > div {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.print-template-card strong,
.print-template-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-template-card strong {
  font-size: 12px;
}

.print-template-card small {
  color: var(--print-muted);
  font-size: 10px;
}

.print-default-badge {
  align-items: center;
  background: var(--print-gold-100);
  border: 1px solid #edd5ae;
  border-radius: 99px;
  color: #91611d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  gap: 3px;
  line-height: 1;
  max-width: 100%;
  min-height: 20px;
  padding: 4px 7px;
  white-space: nowrap;
}

.print-template-sidebar > footer,
.print-template-sidebar > .print-template-sidebar-actions {
  border-top: 1px solid var(--print-soft-line);
  display: grid;
  gap: 7px;
  padding: 10px;
}

.print-designer-main {
  background: var(--print-workspace);
  display: flex;
  flex-direction: column;
  grid-area: canvas;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.print-designer-toolbar {
  align-items: center;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--print-line);
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 65px;
  overflow-x: auto;
  padding: 10px 13px;
  scrollbar-width: thin;
  position: relative;
  z-index: 4;
}

.print-designer-toolbar > * {
  flex: 0 0 auto;
}

.print-designer-toolbar .toolbar-divider,
.print-designer-toolbar > hr {
  background: var(--print-line);
  border: 0;
  height: 26px;
  margin: 0 2px;
  width: 1px;
}

.print-designer-toolbar label {
  align-items: center;
  color: var(--print-muted);
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  white-space: nowrap;
}

.print-designer-toolbar select,
.print-designer-toolbar input {
  background: #fff;
  border: 1px solid var(--print-line);
  border-radius: 7px;
  color: var(--print-ink);
  font: inherit;
  height: 36px;
  min-width: 74px;
  outline: none;
  padding: 0 9px;
}

.print-save-state {
  align-items: center;
  color: var(--print-muted);
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  margin-left: auto;
  white-space: nowrap;
}

.print-save-state::before {
  background: #80a097;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.print-save-state.saved::before,
.print-save-state.is-saved::before {
  background: #1a9874;
  box-shadow: 0 0 0 3px rgba(26, 152, 116, .1);
}

.print-save-state.dirty::before,
.print-save-state.is-dirty::before,
.print-template-page.dirty .print-save-state::before,
.print-center-page.dirty .print-save-state::before {
  background: var(--print-gold-500);
  box-shadow: 0 0 0 3px rgba(198, 147, 71, .13);
}

.print-canvas-stage {
  align-items: flex-start;
  background-color: var(--print-workspace);
  background-image:
    linear-gradient(rgba(47, 91, 82, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 91, 82, .045) 1px, transparent 1px);
  background-size: 20px 20px;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 610px;
  overflow: auto;
  padding: 32px;
  position: relative;
  scrollbar-color: #adbfba transparent;
  scrollbar-width: thin;
}

.print-canvas-stage::before {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(170, 192, 186, .72);
  border-radius: 99px;
  color: #637c76;
  content: "拖拽字段或控件到纸张中 · 所有内容均可自由定位";
  font-size: 10px;
  left: 14px;
  padding: 5px 9px;
  pointer-events: none;
  position: absolute;
  top: 11px;
  z-index: 2;
}

.print-paper {
  aspect-ratio: var(--print-paper-ratio, 210 / 297);
  background: #fff;
  border: 0;
  box-shadow:
    0 1px 1px rgba(7, 34, 30, .08),
    0 18px 45px rgba(15, 48, 43, .19);
  color: #1d2927;
  flex: 0 0 auto;
  min-height: 320px;
  min-width: 360px;
  outline: 1px solid #cdd8d5;
  position: relative;
  transform-origin: top center;
  transition: box-shadow .18s ease, border-color .18s ease;
  width: var(--print-paper-width, 680px);
}

.print-paper[data-orientation="landscape"],
.print-paper.landscape {
  --print-paper-ratio: 297 / 210;
}

.print-paper[data-paper-size="A5"],
.print-paper.a5 {
  --print-paper-ratio: 148 / 210;
}

.print-paper[data-paper-size="label"],
.print-paper[data-paper-size="100x70"],
.print-paper.label {
  --print-paper-ratio: 100 / 70;
  min-height: 250px;
}

.print-paper:hover {
  outline-color: #abc2bb;
  box-shadow:
    0 1px 1px rgba(7, 34, 30, .08),
    0 20px 50px rgba(15, 48, 43, .23);
}

.print-paper::before {
  border: 1px dashed rgba(91, 117, 110, .22);
  content: "";
  inset: var(--print-paper-margin, 18px);
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.print-paper-inner {
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: var(--print-paper-padding, 28px);
  position: relative;
  z-index: 1;
}

.print-paper.is-empty .print-paper-inner,
.print-paper.empty .print-paper-inner {
  align-content: center;
  justify-items: center;
}

.print-block {
  background: rgba(255, 255, 255, .98);
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: default;
  min-height: 38px;
  min-width: 0;
  padding: 6px;
  position: relative;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.print-block:hover {
  background: #fbfdfc;
  border-color: #cfe0db;
}

.print-block.selected,
.print-block.is-selected,
.print-block[aria-selected="true"] {
  background: #f7fbf9;
  border-color: var(--print-green-700);
  box-shadow: 0 0 0 2px rgba(29, 114, 95, .1);
}

.print-block.drag-over,
.print-block.is-drag-over,
.print-block[data-drag-over="true"],
.print-paper.drag-over,
.print-paper.is-drag-over,
.print-paper[data-drag-over="true"] {
  background: #f1faf6;
  border-color: var(--print-gold-500);
  box-shadow: inset 0 0 0 2px rgba(198, 147, 71, .23);
}

.print-block.dragging,
.print-block.is-dragging,
.print-block[aria-grabbed="true"] {
  cursor: grabbing;
  opacity: .5;
  transform: scale(.99);
}

.print-block-head {
  align-items: center;
  border-bottom: 1px dashed #dce5e2;
  cursor: grab;
  display: flex;
  gap: 7px;
  justify-content: space-between;
  margin: -2px -1px 7px;
  min-height: 29px;
  padding: 0 4px 5px;
}

.print-block-head:active {
  cursor: grabbing;
}

.print-block-head strong {
  font-size: 11px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-block-head small {
  color: #82938f;
  font-size: 9px;
  white-space: nowrap;
}

.print-block-head button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #71847f;
  cursor: pointer;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  width: 26px;
}

.print-block-head button:hover {
  background: #eef4f2;
  color: var(--print-danger);
}

.print-field-grid {
  display: grid;
  gap: 5px 9px;
  grid-template-columns: repeat(var(--print-field-columns, 2), minmax(0, 1fr));
  min-width: 0;
}

.print-field-token {
  align-items: baseline;
  border-bottom: 1px dotted #cdd8d5;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(56px, .42fr) minmax(0, 1fr);
  min-height: 28px;
  min-width: 0;
  padding: 5px 2px 4px;
}

.print-field-token > span:first-child,
.print-field-token > label {
  color: #667a75;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-field-token > strong,
.print-field-token > span:last-child {
  color: #1d2e2a;
  font-size: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-field-token.selected,
.print-field-token.is-selected {
  background: #edf7f3;
  border-bottom-color: var(--print-green-700);
  border-radius: 4px;
  outline: 1px solid #c7ded6;
}

.print-field-token.dragging,
.print-field-token.is-dragging {
  cursor: grabbing;
  opacity: .48;
}

.print-line-table {
  border-collapse: collapse;
  font-size: 9px;
  table-layout: fixed;
  width: 100%;
}

.print-line-table th,
.print-line-table td {
  border: 1px solid #7e8b88;
  min-width: 0;
  overflow: hidden;
  padding: 5px 4px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.print-line-table th {
  background: #eef3f1;
  color: #334b46;
  font-weight: 750;
  text-align: center;
}

.print-line-table td.numeric,
.print-line-table th.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.print-logo {
  align-items: center;
  display: flex;
  min-height: 34px;
  min-width: 72px;
}

.print-logo img {
  display: block;
  height: auto;
  max-height: var(--print-logo-height, 46px);
  max-width: var(--print-logo-width, 160px);
  object-fit: contain;
}

.print-logo.is-placeholder,
.print-logo:empty {
  background: repeating-linear-gradient(135deg, #f4f7f6, #f4f7f6 7px, #edf2f0 7px, #edf2f0 14px);
  border: 1px dashed #b9c8c4;
  border-radius: 5px;
  min-height: 39px;
}

.print-logo:empty::after {
  color: #899a95;
  content: "公司 Logo";
  font-size: 9px;
  margin: auto;
}

.print-properties {
  background: #fbfdfc;
  border-left: 1px solid var(--print-line);
  display: flex;
  flex-direction: column;
  grid-area: properties;
  min-width: 0;
  overflow: hidden;
}

.print-property-tabs {
  background: #edf3f1;
  border-bottom: 1px solid var(--print-line);
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
}

.print-property-tabs button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #677b76;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  min-height: 36px;
  padding: 6px;
}

.print-property-tabs button:hover {
  color: var(--print-green-800);
}

.print-property-tabs button.active,
.print-property-tabs button.is-active,
.print-property-tabs button[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 2px 7px rgba(25, 70, 62, .1);
  color: var(--print-green-800);
  font-weight: 750;
}

.print-field-search {
  border-bottom: 1px solid var(--print-soft-line);
  padding: 10px;
  position: relative;
}

.print-field-search input {
  background: #fff;
  border: 1px solid var(--print-line);
  border-radius: 8px;
  color: var(--print-ink);
  font: inherit;
  height: 38px;
  outline: none;
  padding: 0 11px 0 34px;
  width: 100%;
}

.print-field-search > svg,
.print-field-search > i {
  color: #849691;
  left: 20px;
  pointer-events: none;
  position: absolute;
  top: 21px;
}

.print-field-groups {
  align-content: start;
  display: grid;
  flex: 1;
  gap: 9px;
  overflow: auto;
  padding: 10px;
  scrollbar-color: #c5d3cf transparent;
  scrollbar-width: thin;
}

.print-field-groups > section,
.print-field-groups > details,
.print-field-group {
  background: #fff;
  border: 1px solid var(--print-soft-line);
  border-radius: 9px;
  min-width: 0;
  overflow: hidden;
}

.print-field-groups h4,
.print-field-groups summary,
.print-field-group > header {
  align-items: center;
  color: #405c56;
  cursor: pointer;
  display: flex;
  font-size: 10px;
  font-weight: 800;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  min-height: 35px;
  padding: 8px 10px;
}

.print-field-groups summary::-webkit-details-marker {
  display: none;
}

.print-field-groups summary::after {
  color: #8a9b97;
  content: "⌄";
  font-size: 12px;
}

.print-field-groups details[open] summary::after {
  transform: rotate(180deg);
}

.print-field-group-body,
.print-field-groups section > div,
.print-field-groups details > div {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 7px 8px;
}

.print-field-chip {
  align-items: center;
  background: #f7faf9;
  border: 1px solid #dce6e3;
  border-radius: 7px;
  color: #4c6761;
  cursor: grab;
  display: flex;
  font: inherit;
  font-size: 10px;
  gap: 5px;
  justify-content: flex-start;
  min-height: 34px;
  min-width: 0;
  padding: 6px 7px;
  text-align: left;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
  width: 100%;
}

.print-field-chip:hover {
  background: var(--print-green-100);
  border-color: #aecbc2;
  color: var(--print-green-800);
  transform: translateY(-1px);
}

.print-field-chip:active {
  cursor: grabbing;
}

.print-field-chip > span,
.print-field-chip > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-field-chip::before {
  color: #91a39e;
  content: "⠿";
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: -3px;
  margin-right: 2px;
}

.print-field-chip.dragging,
.print-field-chip.is-dragging,
.print-field-chip[aria-grabbed="true"] {
  background: var(--print-gold-100);
  border-color: #d9b77f;
  cursor: grabbing;
  opacity: .56;
}

.print-settings-form {
  align-content: start;
  display: grid;
  flex: 1;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: auto;
  padding: 13px;
  scrollbar-width: thin;
}

.print-settings-form > h3,
.print-settings-form > h4,
.print-settings-form > .full,
.print-settings-form > .wide {
  grid-column: 1 / -1;
}

.print-settings-form > h3,
.print-settings-form > h4 {
  border-bottom: 1px solid var(--print-soft-line);
  font-size: 11px;
  margin: 3px 0 -2px;
  padding-bottom: 7px;
}

.print-settings-form label {
  color: #536d67;
  display: grid;
  font-size: 10px;
  gap: 6px;
  min-width: 0;
}

.print-settings-form input,
.print-settings-form select,
.print-settings-form textarea,
.print-document-picker input,
.print-document-picker select {
  background: #fff;
  border: 1px solid var(--print-line);
  border-radius: 7px;
  color: var(--print-ink);
  font: inherit;
  font-size: 11px;
  min-width: 0;
  outline: none;
  width: 100%;
}

.print-settings-form input,
.print-settings-form select,
.print-document-picker input,
.print-document-picker select {
  height: 38px;
  padding: 0 9px;
}

.print-settings-form textarea {
  min-height: 76px;
  padding: 9px;
  resize: vertical;
}

.print-settings-form input[type="color"] {
  cursor: pointer;
  padding: 4px;
}

.print-settings-form input[type="checkbox"],
.print-settings-form input[type="radio"] {
  accent-color: var(--print-green-700);
  height: 18px;
  width: 18px;
}

.print-settings-form .print-switch,
.print-settings-form label:has(input[type="checkbox"]) {
  align-items: center;
  background: #f5f8f7;
  border: 1px solid var(--print-soft-line);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  min-height: 38px;
  padding: 8px 9px;
}

.print-designer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.print-designer-actions .btn,
.print-template-page .btn,
.print-center-page .btn {
  border-radius: 8px;
  min-height: 38px;
}

.print-template-page .btn-primary,
.print-center-page .btn-primary {
  background: linear-gradient(135deg, var(--print-green-800), var(--print-green-700));
  border-color: var(--print-green-800);
  box-shadow: 0 7px 16px rgba(21, 88, 77, .16);
}

.print-template-page .btn-primary:hover,
.print-center-page .btn-primary:hover {
  background: var(--print-green-900);
  border-color: var(--print-green-900);
}

.print-template-page .btn-gold,
.print-center-page .btn-gold {
  background: linear-gradient(135deg, #ad7930, #ca9a50);
  border-color: #ad7930;
  color: #fff;
}

.print-template-page .btn:disabled,
.print-center-page .btn:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: .48;
}

.print-template-page button:focus-visible,
.print-template-page input:focus-visible,
.print-template-page select:focus-visible,
.print-template-page textarea:focus-visible,
.print-template-page [tabindex]:focus-visible,
.print-center-page button:focus-visible,
.print-center-page input:focus-visible,
.print-center-page select:focus-visible,
.print-center-page textarea:focus-visible,
.print-center-page [tabindex]:focus-visible {
  border-color: var(--print-green-700);
  box-shadow: 0 0 0 3px rgba(29, 114, 95, .14);
  outline: none;
}

.print-preview-modal {
  background: #fff;
  border: 1px solid var(--print-line);
  border-radius: 16px;
  box-shadow: 0 26px 72px rgba(12, 49, 43, .25);
  display: flex;
  flex-direction: column;
  max-height: min(880px, calc(100vh - 36px));
  max-width: calc(100vw - 36px);
  overflow: hidden;
  width: min(1120px, calc(100vw - 36px));
}

.print-preview-modal > header,
.print-preview-modal > footer,
.print-preview-modal .print-preview-head,
.print-preview-modal .print-preview-actions {
  align-items: center;
  background: #fff;
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 18px;
}

.print-preview-modal > header,
.print-preview-modal .print-preview-head {
  border-bottom: 1px solid var(--print-line);
}

.print-preview-modal > footer,
.print-preview-modal .print-preview-actions {
  border-top: 1px solid var(--print-line);
  justify-content: flex-end;
}

.print-preview-modal > header strong,
.print-preview-modal .print-preview-head strong {
  color: var(--print-green-900);
  display: block;
  font-size: 15px;
}

.print-preview-modal > header span,
.print-preview-modal .print-preview-head span {
  color: var(--print-muted);
  display: block;
  font-size: 10px;
  margin-top: 3px;
}

.print-preview-modal .print-preview-body,
.print-preview-modal > main {
  background:
    linear-gradient(rgba(47, 91, 82, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 91, 82, .04) 1px, transparent 1px),
    #e9efed;
  background-size: 20px 20px;
  flex: 1;
  overflow: auto;
  padding: 28px;
}

.print-document-picker {
  background: #fff;
  border: 1px solid var(--print-line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.4fr) auto;
  margin-bottom: 14px;
  padding: 15px;
}

.print-document-picker label {
  color: #536d67;
  display: grid;
  font-size: 10px;
  gap: 6px;
  min-width: 0;
}

.print-document-picker .btn {
  align-self: end;
  min-height: 38px;
}

.print-empty,
.print-loading {
  align-items: center;
  color: var(--print-muted);
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  min-height: 150px;
  padding: 24px 18px;
  text-align: center;
}

.print-empty strong,
.print-loading strong {
  color: #48635d;
  font-size: 13px;
}

.print-empty span,
.print-loading span {
  font-size: 10px;
  line-height: 1.65;
  max-width: 230px;
}

.print-loading::before {
  animation: print-template-spin .75s linear infinite;
  border: 2px solid #d6e2de;
  border-radius: 50%;
  border-top-color: var(--print-green-700);
  content: "";
  height: 25px;
  width: 25px;
}

@keyframes print-template-spin {
  to { transform: rotate(360deg); }
}

.print-template-page.dragging,
.print-template-page.is-dragging,
.print-center-page.dragging,
.print-center-page.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.print-template-page.dragging .print-canvas-stage::after,
.print-template-page.is-dragging .print-canvas-stage::after,
.print-center-page.dragging .print-canvas-stage::after,
.print-center-page.is-dragging .print-canvas-stage::after {
  align-items: center;
  border: 2px dashed rgba(198, 147, 71, .72);
  border-radius: 12px;
  color: #866023;
  content: "松开即可添加到模板";
  display: flex;
  font-size: 11px;
  font-weight: 750;
  inset: 14px;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
  .print-template-page *,
  .print-center-page * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }

  .print-loading::before {
    animation-duration: 1.4s;
  }
}

/* A quiet spreadsheet-like grid for every enhanced ERP result list. */
table.resizable-list-table > :is(thead,tbody,tfoot) > tr > :is(th,td) {
  border-right: 1px solid rgba(112, 132, 151, .22);
}
table.resizable-list-table > :is(thead,tbody,tfoot) > tr > :is(th,td):last-child {
  border-right: 0;
}
table.resizable-list-table > thead > tr > th {
  border-bottom: 1px solid rgba(101, 123, 144, .28);
}
table.resizable-list-table > tbody > tr > td {
  border-top-color: rgba(128, 146, 164, .18);
}

/* CRM · intelligent FPC panelization calculator */
.panel-calculator-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.panel-calc-hero {
  align-items: center;
  background:
    radial-gradient(circle at 87% 18%, rgba(67, 133, 255, .28), transparent 28%),
    linear-gradient(132deg, #081c35 0%, #0d3559 57%, #205bd0 100%);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(11, 45, 73, .16);
  color: #fff;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(340px, 1fr) auto;
  min-height: 128px;
  overflow: hidden;
  padding: 22px 26px;
  position: relative;
}

.panel-calc-hero::after {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
  height: 240px;
  position: absolute;
  right: -58px;
  top: -130px;
  width: 240px;
}

.panel-calc-hero-mark {
  align-items: center;
  background: rgba(255, 255, 255, .11);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 13px;
  display: flex;
  height: 70px;
  justify-content: center;
  position: relative;
  width: 70px;
}

.panel-calc-hero-mark::before,
.panel-calc-hero-mark::after {
  border: 1px solid rgba(117, 196, 255, .42);
  content: "";
  position: absolute;
}

.panel-calc-hero-mark::before { height: 42px; width: 54px; }
.panel-calc-hero-mark::after { height: 54px; width: 42px; }
.panel-calc-hero-mark span { font-size: 16px; font-weight: 900; letter-spacing: .08em; z-index: 1; }
.panel-calc-hero-copy { min-width: 0; }
.panel-calc-hero-copy > span { color: #87c9ff; font-size: 10px; font-weight: 850; letter-spacing: .18em; }
.panel-calc-hero-copy h2 { font-size: 27px; margin: 5px 0 6px; }
.panel-calc-hero-copy p { color: rgba(255, 255, 255, .7); font-size: 12px; line-height: 1.65; margin: 0; }
.panel-calc-rule-badges { display: grid; gap: 6px; grid-template-columns: repeat(2, auto); position: relative; z-index: 1; }
.panel-calc-rule-badges span {
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  color: rgba(255, 255, 255, .84);
  font-size: 10px;
  font-weight: 700;
  padding: 7px 10px;
  text-align: center;
  white-space: nowrap;
}

.panel-calc-workspace {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(390px, .75fr) minmax(560px, 1.25fr);
  min-width: 0;
}

.panel-calc-control-card,
.panel-calc-preview-card,
.panel-calc-price-card { min-width: 0; overflow: hidden; }
.panel-calc-control-card .panel-body { padding-bottom: 14px; }

.panel-calc-param-grid {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-calc-param-grid label,
.panel-calc-price-fields label {
  display: block;
  min-width: 0;
}

.panel-calc-param-grid label > span,
.panel-calc-price-fields label > span {
  color: var(--muted);
  display: flex;
  font-size: 11px;
  font-weight: 750;
  justify-content: space-between;
  margin-bottom: 6px;
}

.panel-calc-param-grid label > span em,
.panel-calc-price-fields label > span em {
  color: #9aabc0;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
}

.panel-calc-param-grid input,
.panel-calc-price-fields input,
.panel-calc-price-fields select {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  height: 39px;
  min-width: 0;
  outline: 0;
  padding: 0 10px;
  width: 100%;
}

.panel-calc-param-grid input:focus,
.panel-calc-price-fields input:focus,
.panel-calc-price-fields select:focus,
.panel-calc-board-editor input:focus,
.panel-calc-discount input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .09);
}

.panel-calc-param-grid input.invalid { border-color: var(--danger); }
.panel-calc-param-grid small {
  color: var(--danger);
  display: block;
  font-size: 9px;
  line-height: 1.2;
  min-height: 11px;
  padding-top: 3px;
}

.panel-calc-run { margin-top: 4px; width: 100%; }
.panel-calc-section-head {
  align-items: center;
  border-top: 1px solid #e8edf3;
  display: flex;
  justify-content: space-between;
  padding: 13px 19px 10px;
}
.panel-calc-section-head strong,
.panel-calc-section-head span { display: block; }
.panel-calc-section-head strong { font-size: 12px; }
.panel-calc-section-head span { color: var(--muted); font-size: 9px; margin-top: 2px; }
.panel-calc-section-head > em {
  background: var(--zg-blue-50);
  border: 1px solid #dce8ff;
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  padding: 5px 8px;
}

.panel-calc-metrics {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 19px 14px;
}

.panel-calc-metrics article {
  background: #f7faff;
  border: 1px solid #e3eaf4;
  border-radius: 8px;
  min-width: 0;
  padding: 10px;
}
.panel-calc-metrics strong,
.panel-calc-metrics span { display: block; }
.panel-calc-metrics strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-calc-metrics span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.panel-calc-option-head { padding-bottom: 9px; }

.panel-calc-options {
  display: grid;
  gap: 8px;
  padding: 0 19px 18px;
}

.panel-calc-option {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 9px;
  cursor: pointer;
  padding: 11px 12px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.panel-calc-option:hover { border-color: #b9cbee; }
.panel-calc-option.active { background: #f3f7ff; border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.panel-calc-option > div:first-child { align-items: center; display: flex; justify-content: space-between; }
.panel-calc-option > div:first-child span { color: var(--accent-strong); font-size: 10px; font-weight: 850; }
.panel-calc-option button {
  background: #fff;
  border: 1px solid #bfd1f3;
  border-radius: 999px;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 8px;
}
.panel-calc-option.active button { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel-calc-option > strong { display: block; font-size: 12px; margin-top: 5px; }
.panel-calc-option > p { color: var(--muted); font-size: 9px; margin: 3px 0 8px; }
.panel-calc-option dl { display: grid; gap: 5px 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.panel-calc-option dl div { display: flex; gap: 5px; min-width: 0; }
.panel-calc-option dt { color: #8b9bb0; flex: 0 0 auto; font-size: 9px; }
.panel-calc-option dd { font-size: 9px; font-weight: 750; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-calc-no-plan { background: #f8fafc; border: 1px dashed var(--line); border-radius: 9px; padding: 22px; text-align: center; }
.panel-calc-no-plan strong,
.panel-calc-no-plan span { display: block; }
.panel-calc-no-plan span { color: var(--muted); font-size: 10px; margin-top: 4px; }

.panel-calc-preview-card { display: flex; flex-direction: column; }
.panel-calc-preview-head { flex: 0 0 auto; }
.panel-calc-preview-head .panel-title { min-width: 0; }
.panel-calc-preview-head .panel-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-calc-canvas {
  background:
    linear-gradient(rgba(47, 108, 255, .026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 108, 255, .026) 1px, transparent 1px),
    linear-gradient(180deg, #fff, #f7faff);
  background-size: 24px 24px, 24px 24px, auto;
  flex: 1 1 auto;
  min-height: 570px;
  overflow: hidden;
  padding: 16px 20px 8px;
  position: relative;
}
.panel-calc-canvas::before {
  color: rgba(35, 87, 215, .035);
  content: "ZHAOGOO";
  font-size: 62px;
  font-weight: 900;
  left: 50%;
  letter-spacing: .12em;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-25deg);
}
.panel-calc-svg { display: block; height: 100%; max-height: 650px; position: relative; width: 100%; z-index: 1; }
.panel-calc-svg-board { fill: #fff; stroke: #142b47; stroke-width: 2; }
.panel-calc-svg-work { fill: #edf4ff; stroke: #8fa3bc; stroke-dasharray: 7 6; stroke-width: 1.5; }
.panel-calc-svg-piece { fill: #dceaff; stroke: #2f6cff; stroke-width: 1.2; }
.panel-calc-svg-axis { stroke: #344054; stroke-width: 1.5; }
.panel-calc-svg-dimension { fill: #142b47; font-size: 16px; font-weight: 800; }
.panel-calc-svg-note { fill: #64758b; font-size: 14px; font-weight: 750; }
.panel-calc-empty { display: grid; height: 100%; min-height: 360px; place-content: center; text-align: center; }
.panel-calc-empty strong { font-size: 14px; }
.panel-calc-empty span { color: var(--muted); font-size: 10px; margin-top: 5px; }
.panel-calc-preview-foot {
  align-items: center;
  border-top: 1px solid #e8edf3;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 46px;
  padding: 9px 18px;
}
.panel-calc-preview-foot > span { align-items: center; color: var(--muted); display: flex; font-size: 9px; gap: 5px; }
.panel-calc-preview-foot i { border-radius: 2px; display: inline-block; height: 9px; width: 14px; }
.panel-calc-preview-foot i.piece { background: #dceaff; border: 1px solid var(--accent); }
.panel-calc-preview-foot i.work { background: #edf4ff; border: 1px dashed #8fa3bc; }
.panel-calc-preview-foot i.edge { background: #fff; border: 1px solid #142b47; }
.panel-calc-preview-foot em { color: #8b9bb0; font-size: 9px; font-style: normal; margin-left: auto; }

.panel-calc-price-head { background: linear-gradient(180deg, #fff, #f8fbff); }
.panel-calc-open-badge {
  background: #e8f7f2;
  border: 1px solid #c0e7d9;
  border-radius: 999px;
  color: #08785e;
  font-size: 9px;
  font-weight: 800;
  padding: 5px 9px;
}
.panel-calc-price-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; min-width: 0; }
.panel-calc-price-fields {
  align-content: start;
  background: #f8fbff;
  border-right: 1px solid #e4ebf4;
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}
.panel-calc-price-fields label {
  background: #fff;
  border: 1px solid #e3eaf4;
  border-radius: 9px;
  padding: 9px;
}
.panel-calc-price-fields label > small { color: #8b9bb0; display: block; font-size: 8px; margin-top: 4px; }
.panel-calc-price-fields label > small[hidden] { display: none !important; }
.panel-calc-price-fields label > small:not([hidden]) { color: var(--warning); }
.panel-calc-price-summary { padding: 17px 18px; }
.panel-calc-price-summary-head { align-items: flex-start; display: flex; justify-content: space-between; margin-bottom: 10px; }
.panel-calc-price-summary-head strong,
.panel-calc-price-summary-head span { display: block; }
.panel-calc-price-summary-head strong { font-size: 13px; }
.panel-calc-price-summary-head span { color: var(--muted); font-size: 9px; margin-top: 2px; }
.panel-calc-price-summary-head > em { color: var(--accent-strong); font-size: 9px; font-style: normal; font-weight: 800; }
.panel-calc-fee-list { border: 1px solid #e3eaf4; border-radius: 8px; overflow: hidden; }
.panel-calc-fee-list > div { align-items: center; display: flex; justify-content: space-between; min-height: 28px; padding: 5px 9px; }
.panel-calc-fee-list > div:nth-child(even) { background: #f8faff; }
.panel-calc-fee-list span { color: var(--muted); font-size: 9px; }
.panel-calc-fee-list strong { color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.panel-calc-board-editor { align-items: end; display: grid; gap: 8px; grid-template-columns: 1fr auto; margin-top: 9px; }
.panel-calc-board-editor label > span { color: var(--muted); display: block; font-size: 9px; margin-bottom: 4px; }
.panel-calc-board-editor input { border: 1px solid var(--line); border-radius: 6px; height: 34px; outline: 0; padding: 0 9px; width: 100%; }
.panel-calc-board-editor button { background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--accent-strong); cursor: pointer; font-size: 9px; height: 34px; padding: 0 9px; }
.panel-calc-total { align-items: center; background: #edf4ff; border-radius: 8px; display: flex; justify-content: space-between; margin-top: 10px; padding: 10px 11px; }
.panel-calc-total span { color: var(--accent-strong); font-size: 11px; font-weight: 750; }
.panel-calc-total strong { color: var(--accent-strong); font-size: 18px; font-variant-numeric: tabular-nums; }
.panel-calc-discount { align-items: center; border: 1px solid #dce6f3; border-radius: 8px; display: grid; gap: 10px; grid-template-columns: 110px 1fr; margin-top: 9px; padding: 9px 10px; }
.panel-calc-discount label > span,
.panel-calc-discount > div > span { color: var(--muted); display: block; font-size: 9px; }
.panel-calc-discount label { align-items: center; display: grid; gap: 4px; grid-template-columns: 1fr auto; }
.panel-calc-discount label > span { grid-column: 1 / -1; }
.panel-calc-discount input { border: 1px solid var(--line); border-radius: 5px; height: 31px; min-width: 0; outline: 0; padding: 0 7px; width: 100%; }
.panel-calc-discount label em { color: var(--muted); font-size: 10px; font-style: normal; }
.panel-calc-discount > div { text-align: right; }
.panel-calc-discount > div strong { color: var(--accent-strong); display: block; font-size: 16px; margin-top: 2px; }
.panel-calc-print-quote { margin-top: 10px; width: 100%; }
.panel-calc-rule-note {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e0e7f0;
  border-radius: 9px;
  display: flex;
  gap: 12px;
  padding: 11px 14px;
}
.panel-calc-rule-note strong { color: var(--accent-strong); flex: 0 0 auto; font-size: 10px; }
.panel-calc-rule-note span { color: var(--muted); font-size: 9px; line-height: 1.6; }

@media (max-width: 1280px) {
  .panel-calc-hero { grid-template-columns: auto 1fr; }
  .panel-calc-rule-badges { display: flex; flex-wrap: wrap; grid-column: 1 / -1; padding-left: 88px; }
  .panel-calc-workspace { grid-template-columns: minmax(350px, .8fr) minmax(470px, 1.2fr); }
  .panel-calc-price-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
  .panel-calc-workspace { grid-template-columns: minmax(0, 1fr); }
  .panel-calc-preview-card { min-height: 650px; }
  .panel-calc-price-layout { grid-template-columns: minmax(0, 1fr); }
  .panel-calc-price-fields { border-bottom: 1px solid #e4ebf4; border-right: 0; }
  .panel-calc-price-summary { margin: 0 auto; max-width: 620px; width: 100%; }
}

@media (max-width: 720px) {
  .panel-calc-hero { gap: 12px; grid-template-columns: 1fr; padding: 19px; }
  .panel-calc-hero-mark { display: none; }
  .panel-calc-hero-copy h2 { font-size: 23px; }
  .panel-calc-rule-badges { display: grid; grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 0; }
  .panel-calc-param-grid,
  .panel-calc-price-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-calc-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-calc-preview-head { align-items: flex-start; gap: 8px; }
  .panel-calc-preview-card { min-height: 540px; }
  .panel-calc-canvas { min-height: 430px; padding: 8px; }
  .panel-calc-preview-foot em { flex-basis: 100%; margin-left: 0; }
}

@media (max-width: 480px) {
  .panel-calc-param-grid,
  .panel-calc-price-fields { grid-template-columns: minmax(0, 1fr); }
  .panel-calc-option dl { grid-template-columns: minmax(0, 1fr); }
  .panel-calc-discount { grid-template-columns: 100px 1fr; }
  .panel-calc-rule-note { align-items: flex-start; flex-direction: column; gap: 4px; }
}

/* Sales shipment batch printing */
.business-list-result-head > .shipment-batch-print-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shipment-batch-print-actions > span {
  align-items: center;
  background: var(--zg-blue-50);
  border: 1px solid #c8d9fb;
  border-radius: 999px;
  color: var(--zg-blue-700);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  min-height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}

.shipment-batch-print-actions > em {
  color: #6b7f99;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.shipment-batch-print-actions .btn {
  min-height: 32px;
  white-space: nowrap;
}

.sales-shipment-batch-table .shipment-print-select-column,
.business-data-table th.shipment-print-select-column,
.business-data-table td.shipment-print-select-column {
  box-sizing: border-box;
  min-width: 44px !important;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center !important;
  width: 44px !important;
}

.shipment-print-select-column input {
  cursor: pointer;
  height: 16px;
  margin: 0;
  width: 16px;
}

.sales-shipment-batch-table tbody tr.shipment-print-selected,
.sales-shipment-batch-table tbody tr.shipment-print-selected:hover {
  background: #edf4ff;
  box-shadow: inset 3px 0 var(--zg-blue-600);
}

.business-data-table .business-batch-select-column {
  box-sizing: border-box;
  min-width: 44px !important;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center !important;
  width: 44px !important;
}

.business-batch-select-column input {
  accent-color: var(--zg-blue-600);
  cursor: pointer;
  height: 16px;
  margin: 0;
  width: 16px;
}

.business-batch-select-column input:disabled { cursor: not-allowed; opacity: .42; }
.business-data-table tbody tr.business-batch-selected,
.business-data-table tbody tr.business-batch-selected:hover {
  background: #edf4ff;
  box-shadow: inset 3px 0 var(--zg-blue-600);
}

@media (max-width: 900px) {
  .business-list-result-head > .shipment-batch-print-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .shipment-batch-print-actions .btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 148px;
  }

  .shipment-batch-print-actions > span,
  .shipment-batch-print-actions > em {
    flex: 1 1 auto;
  }
}

/* Customer complaint closed-loop workspace */
.complaint-hero,
.complaint-form-hero {
  position: relative;
  min-height: 158px;
  padding: 26px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  overflow: hidden;
  border: 1px solid rgba(86,142,234,.22);
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 10%,rgba(57,154,255,.32),transparent 34%),
    linear-gradient(132deg,var(--zg-navy-950),var(--zg-navy-800) 62%,#176795);
  box-shadow: 0 18px 42px rgba(11,45,73,.16);
}

.complaint-hero::after,
.complaint-form-hero::after {
  position: absolute;
  right: -58px;
  bottom: -84px;
  width: 250px;
  height: 250px;
  content: "";
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  box-shadow: 0 0 0 31px rgba(255,255,255,.025),0 0 0 63px rgba(255,255,255,.018);
}

.complaint-hero > div:first-child,
.complaint-form-hero > div:first-child { position: relative; z-index: 1; min-width: 0; max-width: 760px; }
.complaint-hero > div:first-child > span,
.complaint-form-hero > div:first-child > span { color: #7bd8f4; font-size: 9px; font-weight: 850; letter-spacing: 1.6px; }
.complaint-hero h2,
.complaint-form-hero h2 { margin: 8px 0 7px; font-size: 25px; letter-spacing: -.45px; }
.complaint-hero p,
.complaint-form-hero p { margin: 0; color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.75; }

.complaint-hero-flow {
  position: relative;
  z-index: 1;
  min-width: 330px;
  padding: 17px 18px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(7,27,54,.33);
  backdrop-filter: blur(7px);
}
.complaint-hero-flow > strong { display: block; color: #8adcf7; font-size: 9px; letter-spacing: 1.15px; }
.complaint-hero-flow > div { margin: 12px 0 9px; display: flex; align-items: center; gap: 7px; }
.complaint-hero-flow > div span { padding: 5px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #fff; font-size: 9px; font-weight: 740; }
.complaint-hero-flow > div i { flex: 1; height: 1px; min-width: 9px; background: rgba(122,215,245,.44); }
.complaint-hero-flow > small { color: rgba(255,255,255,.58); font-size: 8px; }

.complaint-filter.compact-filter-bar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 175px 112px 112px minmax(150px,.85fr) minmax(170px,1fr) 96px 86px minmax(155px,.9fr) max-content max-content max-content;
  align-items: end;
  gap: 9px;
  padding: 13px 14px;
}
.complaint-filter.compact-filter-bar > div:first-child { align-self: center; display: grid; gap: 3px; }
.complaint-filter.compact-filter-bar > div:first-child strong { color: var(--zg-navy-800); font-size: 12px; }
.complaint-filter.compact-filter-bar > div:first-child span { color: #7a8da4; font-size: 8px; line-height: 1.45; }
.complaint-filter.compact-filter-bar label { min-width: 0; gap: 5px; }
.complaint-filter.compact-filter-bar label > span { color: #5f7289; font-size: 9px; font-weight: 750; }
.complaint-filter.compact-filter-bar input,
.complaint-filter.compact-filter-bar select,
.complaint-filter.compact-filter-bar .searchable-select-input,
.complaint-filter.compact-filter-bar .btn { height: 36px; min-height: 36px; }

.complaint-kpis {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 11px;
}
.complaint-kpis article {
  position: relative;
  min-width: 0;
  padding: 16px 17px 14px;
  display: grid;
  gap: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(18,59,104,.055);
}
.complaint-kpis article::before { position: absolute; top: 0; right: 0; left: 0; height: 3px; content: ""; background: #7892ad; }
.complaint-kpis article.open::before { background: var(--zg-blue-600); }
.complaint-kpis article.investigating::before { background: #1e99c5; }
.complaint-kpis article.overdue::before { background: #dc5564; }
.complaint-kpis article.closed::before { background: #2e9c78; }
.complaint-kpis span { color: #61758e; font-size: 9px; font-weight: 750; }
.complaint-kpis strong { color: var(--zg-navy-900); font-size: 23px; font-variant-numeric: tabular-nums; }
.complaint-kpis small { overflow: hidden; color: #8b9aad; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.complaint-list { margin-top: 14px; overflow: hidden; }
.complaint-list table { min-width: 1950px; }
.complaint-list th,.complaint-list td { white-space: nowrap; }
.complaint-list td small { display: block; max-width: 190px; margin-top: 3px; overflow: hidden; color: #8a9aab; font-size: 8px; text-overflow: ellipsis; }
.complaint-section-head {
  min-height: 58px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg,var(--zg-blue-50),#fff 45%);
}
.complaint-section-head > div { display: grid; gap: 3px; }
.complaint-section-head strong { color: var(--zg-navy-800); font-size: 12px; }
.complaint-section-head > div span { color: #8394a8; font-size: 8px; }
.complaint-section-head > span { padding: 5px 9px; border-radius: 999px; color: var(--zg-blue-700); background: var(--zg-blue-100); font-size: 9px; font-weight: 780; }
.complaint-overdue-row { background: #fffafb; }
.complaint-date-overdue { color: #c74352; font-weight: 780; }

.complaint-status,
.complaint-severity,
.complaint-8d-linked,
.complaint-8d-needed {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 780;
  white-space: nowrap;
}
.complaint-status.pending { color: #6c7583; background: #eef1f5; }
.complaint-status.accepted { color: var(--zg-blue-700); background: var(--zg-blue-100); }
.complaint-status.active { color: #087e9d; background: #e7f8fc; }
.complaint-status.waiting { color: #996718; background: #fff3dd; }
.complaint-status.closed { color: #237c5d; background: #e8f7f0; }
.complaint-status.rejected { color: #b44855; background: #fdebed; }
.complaint-status.cancelled { color: #7f8994; background: #f0f2f4; }
.complaint-severity.normal { color: #54708b; background: #edf3f8; }
.complaint-severity.major { color: #996718; background: #fff2dc; }
.complaint-severity.severe { color: #b84754; background: #fde9ec; }
.complaint-severity.critical { color: #fff; background: #bd3546; }
.complaint-8d-linked { color: #176ba7; background: #e8f4ff; }
.complaint-8d-needed { color: #a06416; background: #fff1d8; }

.complaint-form-hero { min-height: 136px; }
.complaint-form-hero > div:last-child {
  position: relative;
  z-index: 1;
  min-width: 235px;
  padding: 15px 17px;
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 11px;
  background: rgba(7,28,55,.31);
}
.complaint-form-hero > div:last-child span { color: #84dcf8; font-size: 8px; font-weight: 780; }
.complaint-form-hero > div:last-child strong { color: #fff; font: 780 16px/1.35 ui-monospace,SFMono-Regular,Consolas,monospace; }
.complaint-form-hero > div:last-child small { color: rgba(255,255,255,.58); font-size: 8px; }
.complaint-stage-strip { margin: 12px 0; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.complaint-stage-strip span { min-height: 39px; display: flex; align-items: center; justify-content: center; gap: 7px; border-right: 1px solid var(--line); color: #72859b; font-size: 9px; font-weight: 720; }
.complaint-stage-strip span:last-child { border-right: 0; }
.complaint-stage-strip span b { color: #9baabc; font: 800 9px/1 Arial,sans-serif; }
.complaint-stage-strip span.active { color: var(--zg-blue-700); background: var(--zg-blue-50); }
.complaint-stage-strip span.active b { color: var(--zg-blue-600); }
.complaint-form-page { margin-top: 0; }
.complaint-form-section .field { min-width: 0; }
.complaint-source-selectors { align-items: stretch; }
.complaint-source-selectors .field > small { min-height: 15px; margin-top: 5px; display: block; color: #7a8da1; font-size: 8px; line-height: 1.5; }
.complaint-source-tip {
  min-height: 72px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid #d9e7fa;
  border-radius: 8px;
  color: var(--zg-blue-600);
  background: var(--zg-blue-50);
}
.complaint-source-tip > div { display: grid; gap: 4px; }
.complaint-source-tip strong { color: var(--zg-navy-800); font-size: 10px; }
.complaint-source-tip span { color: #73869d; font-size: 8px; line-height: 1.55; }
.complaint-source-preview {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}
.complaint-source-preview > div { min-width: 0; min-height: 58px; padding: 10px 11px; display: grid; align-content: center; gap: 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.complaint-source-preview > div:nth-child(6n) { border-right: 0; }
.complaint-source-preview > div:nth-last-child(-n+6) { border-bottom: 0; }
.complaint-source-preview span { color: #7a8da4; font-size: 8px; }
.complaint-source-preview strong { overflow: hidden; color: #244868; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.complaint-quantity-grid { margin-top: 12px; }
.complaint-source-loading,
.complaint-source-error { min-height: 38px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; border: 1px solid #dce7f4; border-radius: 7px; color: #657b91; background: #f8fbff; font-size: 9px; }
.complaint-source-loading .boot-spinner { width: 14px; height: 14px; border-width: 2px; }
.complaint-source-error { color: #af4753; border-color: #efd4d8; background: #fff8f9; }
.complaint-resolution-grid .field.full { grid-column: 1 / -1; }
.complaint-resolution-grid .field.span-2 { grid-column: span 2; }
.complaint-8d-switch .switch-line { min-height: 38px; padding: 0 11px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fbfdff; }
.complaint-8d-switch .switch-line input { width: 16px; height: 16px; min-height: 0; accent-color: var(--zg-blue-600); }
.complaint-8d-switch .switch-line span { color: #4d6680; font-size: 10px; }
.complaint-linked-8d { margin-top: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 7px; border: 1px solid #cfe1fa; border-radius: 7px; color: #4b6c8d; background: var(--zg-blue-50); font-size: 9px; }
.complaint-linked-8d strong { color: var(--zg-blue-700); }
.complaint-locked-note { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #cfe1fa; border-radius: 6px; color: #4b6c8d; background: var(--zg-blue-50); font-size: 10px; font-weight: 700; }

.complaint-detail-drawer { width: min(960px,96vw); }
.complaint-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(145deg,var(--zg-blue-50),#fff); }
.complaint-detail-summary > div:first-child > span { color: var(--zg-blue-600); font: 850 8px/1 Arial,sans-serif; letter-spacing: 1.25px; }
.complaint-detail-summary > div:first-child h3 { margin: 7px 0 5px; color: var(--zg-navy-900); font-size: 20px; }
.complaint-detail-summary > div:first-child p { margin: 0; color: #77899d; font-size: 9px; }
.complaint-detail-summary > div:last-child { display: flex; align-items: center; gap: 7px; }
.complaint-timeline { position: relative; padding: 1px 0 1px 9px; }
.complaint-timeline::before { position: absolute; top: 8px; bottom: 9px; left: 14px; width: 1px; content: ""; background: #d3e2f5; }
.complaint-timeline article { position: relative; padding: 0 0 17px 29px; }
.complaint-timeline article:last-child { padding-bottom: 0; }
.complaint-timeline article > i { position: absolute; top: 5px; left: 0; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #91a8c3; box-shadow: 0 0 0 1px #c9d8e9; }
.complaint-timeline article.latest > i { background: var(--zg-blue-600); box-shadow: 0 0 0 3px var(--zg-blue-100); }
.complaint-timeline article > div { display: grid; gap: 4px; }
.complaint-timeline strong { color: #2a4e70; font-size: 10px; }
.complaint-timeline span { color: #8597aa; font-size: 8px; }
.complaint-timeline p { margin: 0; color: #586f86; font-size: 9px; line-height: 1.55; white-space: pre-wrap; }
.complaint-attachment-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.complaint-attachment-card { min-height: 42px; padding: 8px 10px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #d4e3f6; border-radius: 7px; color: var(--zg-blue-700); background: var(--zg-blue-50); text-decoration: none; font-size: 9px; font-weight: 730; }
.complaint-attachment-card:hover { border-color: var(--zg-blue-500); background: var(--zg-blue-100); }
.complaint-audit-grid { margin-top: 12px; }

@media (max-width: 1550px) {
  .complaint-filter.compact-filter-bar { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .complaint-filter.compact-filter-bar > div:first-child { grid-column: 1 / -1; }
  .complaint-filter.compact-filter-bar .compact-keyword-filter { grid-column: span 2; }
}

@media (max-width: 1050px) {
  .complaint-hero,.complaint-form-hero { align-items: flex-start; flex-direction: column; }
  .complaint-hero-flow,.complaint-form-hero > div:last-child { width: 100%; min-width: 0; }
  .complaint-filter.compact-filter-bar { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .complaint-kpis { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .complaint-source-preview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .complaint-source-preview > div:nth-child(6n) { border-right: 1px solid var(--line); }
  .complaint-source-preview > div:nth-child(3n) { border-right: 0; }
  .complaint-source-preview > div:nth-last-child(-n+6) { border-bottom: 1px solid var(--line); }
  .complaint-source-preview > div:nth-last-child(-n+3) { border-bottom: 0; }
}

@media (max-width: 720px) {
  .complaint-hero,.complaint-form-hero { min-height: 0; padding: 21px 19px; }
  .complaint-hero h2,.complaint-form-hero h2 { font-size: 21px; }
  .complaint-hero-flow > div { flex-wrap: wrap; }
  .complaint-hero-flow > div i { display: none; }
  .complaint-filter.compact-filter-bar { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .complaint-filter.compact-filter-bar > div:first-child,.complaint-filter.compact-filter-bar .compact-keyword-filter { grid-column: 1 / -1; }
  .complaint-filter.compact-filter-bar > .btn { width: 100%; }
  .complaint-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .complaint-stage-strip { grid-template-columns: repeat(5,minmax(72px,1fr)); overflow-x: auto; }
  .complaint-source-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .complaint-source-preview > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .complaint-source-preview > div:nth-child(2n) { border-right: 0; }
  .complaint-source-preview > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .complaint-source-preview > div:nth-last-child(-n+2) { border-bottom: 0; }
  .complaint-attachment-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .complaint-detail-summary { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 480px) {
  .complaint-filter.compact-filter-bar,.complaint-kpis { grid-template-columns: minmax(0,1fr); }
  .complaint-filter.compact-filter-bar > div:first-child,.complaint-filter.compact-filter-bar .compact-keyword-filter { grid-column: auto; }
  .complaint-source-preview,.complaint-attachment-grid { grid-template-columns: minmax(0,1fr); }
  .complaint-source-preview > div { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .complaint-source-preview > div:last-child { border-bottom: 0 !important; }
}

/* Print template canvas: ordinary layout grids and QR controls.
   These selectors deliberately avoid .print-free-table so dynamic detail
   tables retain their independent scrolling and pagination behavior. */
.print-center-page .print-free-grid {
  --print-grid-border-color: #91a4ba;
  --print-grid-border-style: solid;
  --print-grid-border-width: 1px;
  align-items: stretch !important;
  background: #fff;
  border-color: #aabbd0;
  border-radius: 4px;
  /* The free canvas owns grid height.  Keep this at zero so a compact
     layout table is not expanded again by the designer stylesheet. */
  min-height: 0;
  min-width: 0;
  overflow: visible !important;
}

.print-center-page .print-paper.is-designer .print-free-grid:hover {
  border-color: #6f93c1;
  box-shadow: 0 5px 15px rgba(22, 64, 116, .08);
}

.print-center-page .print-paper.is-designer .print-free-grid.is-selected,
.print-center-page .print-paper.is-designer .print-free-grid.selected,
.print-center-page .print-paper.is-designer .print-free-grid[aria-selected="true"] {
  border-color: var(--zg-blue-600, #2f6cff);
  box-shadow:
    0 0 0 1px #fff,
    0 0 0 3px rgba(47, 108, 255, .2),
    0 10px 24px rgba(18, 59, 104, .14);
}

.print-center-page .print-layout-grid {
  align-content: stretch;
  background: #fff;
  border-radius: inherit;
  display: grid;
  grid-template-columns:
    var(--print-grid-template-columns,
      repeat(var(--print-grid-columns, 1), minmax(0, 1fr)));
  grid-template-rows:
    var(--print-grid-template-rows,
      repeat(var(--print-grid-rows, 1), minmax(0, 1fr)));
  height: 100%;
  isolation: isolate;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

/* Cell borders overlap by one width to avoid doubled internal rules. The last
   row and column therefore extend into the grid's clipped edge; redraw those
   two perimeter rules inside the container so they remain visible. */
.print-center-page .print-layout-grid::after {
  border-bottom:
    var(--print-grid-border-width, 1px)
    var(--print-grid-border-style, solid)
    var(--print-grid-border-color, #91a4ba);
  border-right:
    var(--print-grid-border-width, 1px)
    var(--print-grid-border-style, solid)
    var(--print-grid-border-color, #91a4ba);
  box-sizing: border-box;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1001;
}

.print-center-page .print-layout-grid-cell {
  align-items: stretch;
  background: var(--print-grid-cell-background, #fff);
  border:
    var(--print-grid-border-width, 1px)
    var(--print-grid-border-style, solid)
    var(--print-grid-border-color, #91a4ba);
  box-sizing: border-box;
  display: flex;
  margin-bottom: calc(var(--print-grid-border-width, 1px) * -1);
  margin-right: calc(var(--print-grid-border-width, 1px) * -1);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  transition: background .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.print-center-page .print-paper.is-designer .print-layout-grid-cell:hover {
  background: #f8fbff;
  z-index: 2;
}

.print-center-page .print-paper.is-designer .print-layout-grid-cell.is-selected,
.print-center-page .print-paper.is-designer .print-layout-grid-cell.selected,
.print-center-page .print-paper.is-designer .print-layout-grid-cell[aria-selected="true"] {
  background: #f3f7ff;
  border-color: #4f7ee8;
  box-shadow: inset 0 0 0 2px rgba(47, 108, 255, .18);
  z-index: 4;
}

.print-center-page .print-paper.is-designer .print-layout-grid-cell.is-drop-target,
.print-center-page .print-paper.is-designer .print-layout-grid-cell.drag-over,
.print-center-page .print-paper.is-designer .print-layout-grid-cell[data-drop-active="true"],
.print-center-page .print-paper.is-designer .print-layout-grid-cell[data-print-drop-target="true"] {
  background:
    linear-gradient(135deg, rgba(47, 108, 255, .1), rgba(18, 169, 196, .08)),
    #f8fbff;
  border-color: var(--zg-blue-600, #2f6cff);
  box-shadow: inset 0 0 0 3px rgba(47, 108, 255, .16);
  z-index: 5;
}

.print-center-page .print-layout-grid-cell.is-drop-target::after,
.print-center-page .print-layout-grid-cell.drag-over::after,
.print-center-page .print-layout-grid-cell[data-drop-active="true"]::after,
.print-center-page .print-layout-grid-cell[data-print-drop-target="true"]::after {
  color: var(--zg-blue-700, #2454d7);
  content: "放置到单元格";
  font-size: 10px;
  font-weight: 750;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 20;
}

.print-center-page .print-grid-cell-content {
  align-items: inherit;
  color: #23384d;
  display: flex;
  flex: 1 1 auto;
  font-size: inherit;
  height: 100%;
  line-height: 1.4;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  padding: var(--print-grid-cell-padding, 4px);
  position: relative;
  text-align: inherit;
  white-space: pre-wrap;
  width: 100%;
}

.print-center-page .print-grid-cell-content > span {
  display: block;
  min-width: 0;
  text-align: inherit;
  width: 100%;
}

.print-center-page .print-grid-cell-editor {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  height: 100%;
  line-height: inherit;
  min-height: 0;
  min-width: 0;
  outline: 0;
  overflow: auto;
  padding: var(--print-grid-cell-padding, 4px);
  resize: none;
  text-align: inherit;
  width: 100%;
}

.print-center-page .print-grid-cell-editor:focus {
  background: rgba(255, 255, 255, .92);
  box-shadow: inset 0 0 0 2px rgba(47, 108, 255, .22);
}

.print-center-page .print-grid-child {
  align-items: stretch;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  box-sizing: border-box;
  display: flex;
  min-height: 8px;
  min-width: 0;
  overflow: visible;
  pointer-events: auto;
  position: absolute;
  touch-action: none;
}

.print-center-page .print-grid-child > textarea {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  height: 100%;
  line-height: 1.35;
  min-height: 0;
  outline: 0;
  overflow: hidden;
  padding: 2px 3px;
  resize: none;
  text-align: inherit;
  width: 100%;
}

.print-center-page .print-grid-child .print-free-text-content,
.print-center-page .print-grid-child > textarea,
.print-center-page .print-grid-child .print-free-field-content,
.print-center-page .print-grid-child .print-free-field-content > strong {
  line-height: 1.35;
}

.print-center-page .print-grid-child .print-free-text-content,
.print-center-page .print-grid-child .print-free-field-content {
  padding: 2px 3px;
}

.print-center-page .print-paper.is-designer .print-grid-child:hover {
  background: rgba(244, 248, 255, .82);
  border-color: #8eade0;
}

.print-center-page .print-paper.is-designer .print-grid-child.is-selected,
.print-center-page .print-paper.is-designer .print-grid-child.selected,
.print-center-page .print-paper.is-designer .print-grid-child[aria-selected="true"] {
  background: rgba(247, 250, 255, .95);
  border-color: transparent;
  box-shadow: none;
  outline: 1px dashed var(--zg-blue-600, #2f6cff);
  outline-offset: 0;
  z-index: 30;
}

.print-center-page .print-grid-child.is-dragging,
.print-center-page .print-grid-child.dragging {
  cursor: grabbing;
  opacity: .7;
}

.print-center-page .print-grid-child-move {
  align-items: center;
  background: var(--zg-blue-600, #2f6cff);
  border: 1px solid #fff;
  border-radius: 5px 5px 0 0;
  color: #fff;
  cursor: grab;
  display: none;
  font-size: 10px;
  height: 19px;
  justify-content: center;
  left: 50%;
  line-height: 1;
  min-width: 26px;
  padding: 0 6px;
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  user-select: none;
  z-index: 34;
}

.print-center-page .print-grid-child-move:active {
  cursor: grabbing;
}

.print-center-page .print-grid-child-remove {
  align-items: center;
  background: #fff;
  border: 1px solid #d9aeb4;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(92, 33, 42, .14);
  color: #bd4451;
  cursor: pointer;
  display: none;
  font: inherit;
  font-size: 13px;
  height: 20px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: -11px;
  top: -11px;
  width: 20px;
  z-index: 35;
}

.print-center-page .print-grid-child-remove:hover {
  background: #bd4451;
  border-color: #bd4451;
  color: #fff;
}

.print-center-page .print-grid-child.is-selected .print-grid-child-move,
.print-center-page .print-grid-child.selected .print-grid-child-move,
.print-center-page .print-grid-child[aria-selected="true"] .print-grid-child-move,
.print-center-page .print-grid-child.is-selected .print-grid-child-remove,
.print-center-page .print-grid-child.selected .print-grid-child-remove,
.print-center-page .print-grid-child[aria-selected="true"] .print-grid-child-remove {
  display: inline-flex;
}

.print-center-page .print-grid-child-resize-handle {
  display: none;
  height: 18px;
  position: absolute;
  touch-action: none;
  user-select: none;
  width: 18px;
  z-index: 36;
}

.print-center-page .print-grid-child.is-selected .print-grid-child-resize-handle,
.print-center-page .print-grid-child.selected .print-grid-child-resize-handle,
.print-center-page .print-grid-child[aria-selected="true"] .print-grid-child-resize-handle {
  display: block;
}

.print-center-page .print-grid-child-resize-handle::after {
  background: #fff;
  border: 2px solid var(--zg-blue-600, #2f6cff);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(13, 48, 103, .18);
  content: "";
  height: 6px;
  left: 5px;
  position: absolute;
  top: 5px;
  width: 6px;
}

.print-center-page .print-grid-child-resize-handle.nw,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="nw"] {
  cursor: nwse-resize;
  left: -9px;
  top: -9px;
}

.print-center-page .print-grid-child-resize-handle.ne,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="ne"] {
  cursor: nesw-resize;
  right: -9px;
  top: -9px;
}

.print-center-page .print-grid-child-resize-handle.sw,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="sw"] {
  bottom: -9px;
  cursor: nesw-resize;
  left: -9px;
}

.print-center-page .print-grid-child-resize-handle.se,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="se"] {
  bottom: -9px;
  cursor: nwse-resize;
  right: -9px;
}

.print-center-page .print-grid-child-resize-handle.n,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="n"] {
  cursor: ns-resize;
  left: calc(50% - 9px);
  top: -9px;
}

.print-center-page .print-grid-child-resize-handle.s,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="s"] {
  bottom: -9px;
  cursor: ns-resize;
  left: calc(50% - 9px);
}

.print-center-page .print-grid-child-resize-handle.e,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="e"] {
  cursor: ew-resize;
  right: -9px;
  top: calc(50% - 9px);
}

.print-center-page .print-grid-child-resize-handle.w,
.print-center-page .print-grid-child-resize-handle[data-resize-direction="w"] {
  cursor: ew-resize;
  left: -9px;
  top: calc(50% - 9px);
}

.print-center-page .print-free-qr {
  align-items: center !important;
  background: #fff;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  overflow: visible !important;
}

.print-center-page .print-qr-frame {
  align-items: center;
  background: var(--print-qr-background, #fff);
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: var(--print-qr-margin, 4px);
  width: 100%;
}

.print-center-page .print-qr-frame canvas,
.print-center-page .print-qr-frame svg,
.print-center-page .print-qr-frame img {
  display: block;
  height: 100%;
  image-rendering: pixelated;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  shape-rendering: crispEdges;
  width: 100%;
}

.print-center-page .print-qr-placeholder {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(36, 70, 100, .08) 1px, transparent 1px),
    linear-gradient(rgba(36, 70, 100, .08) 1px, transparent 1px),
    #f8fbff;
  background-size: 8px 8px;
  border: 1px dashed #9cb0c7;
  color: #657b94;
  display: flex;
  flex-direction: column;
  font-size: 10px;
  gap: 4px;
  height: 100%;
  justify-content: center;
  min-height: 42px;
  min-width: 0;
  padding: 6px;
  text-align: center;
  width: 100%;
}

.print-center-page .print-qr-placeholder::before {
  background:
    conic-gradient(from 90deg, #274664 25%, #fff 0 50%, #274664 0 75%, #fff 0);
  background-size: 8px 8px;
  border: 2px solid #274664;
  content: "";
  height: 22px;
  opacity: .76;
  width: 22px;
}

.print-center-page .print-paper.is-designer .print-free-qr.is-selected .print-qr-frame,
.print-center-page .print-paper.is-designer .print-free-qr[aria-selected="true"] .print-qr-frame {
  box-shadow: inset 0 0 0 1px rgba(47, 108, 255, .12);
}

.print-center-page .print-grid-properties {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.print-center-page .print-grid-properties > section {
  background: #f7faff;
  border: 1px solid #d3dfed;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 9px;
}

.print-center-page .print-grid-properties > section > header {
  align-items: center;
  color: #274664;
  display: flex;
  font-size: 11px;
  font-weight: 750;
  gap: 6px;
  justify-content: space-between;
}

.print-center-page .print-grid-size-list {
  background: #f7faff;
  border: 1px solid #cedbeb;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  max-height: 220px;
  min-width: 0;
  overflow: auto;
  padding: 6px;
  scrollbar-color: #bac9d9 transparent;
  scrollbar-width: thin;
}

.print-center-page .print-grid-size-list > strong {
  color: #28455f;
  font-size: 11px;
  padding: 2px 3px;
}

.print-center-page .print-grid-size-list > label {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  display: grid;
  gap: 7px;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 34px;
  padding: 4px 6px;
}

.print-center-page .print-grid-size-list > label > span {
  color: #60758a;
  font-size: 10px;
}

.print-center-page .print-grid-cell-add {
  border-top: 1px solid #d8e2ee;
  display: grid;
  gap: 7px;
  padding-top: 9px;
}

.print-center-page .print-grid-cell-add > span {
  color: #536b82;
  font-size: 11px;
  font-weight: 700;
}

.print-center-page .print-grid-cell-add > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.print-center-page .print-grid-child-properties {
  background: #fff;
  border: 1px solid #cbd9e8;
  border-radius: 8px;
  display: grid;
  gap: 9px;
  padding: 9px;
}

.print-center-page .print-grid-child-position-align {
  background: #f7faff;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  padding: 7px;
}

.print-center-page .print-grid-child-position-align > span {
  color: #536b82;
  font-size: 11px;
  font-weight: 700;
}

.print-center-page .print-grid-child-position-align > div {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: 34px repeat(3, minmax(0, 1fr));
}

.print-center-page .print-grid-child-position-align small {
  color: #71869a;
  font-size: 10px;
}

.print-center-page .print-grid-child-position-align button {
  background: #fff;
  border: 1px solid #c9d7e7;
  border-radius: 5px;
  color: #3f5873;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  min-height: 27px;
  padding: 0 4px;
}

.print-center-page .print-grid-child-position-align button:hover:not(:disabled) {
  background: #eaf3ff;
  border-color: #8fb4dc;
  color: #225f96;
}

.print-center-page .print-grid-child-position-align button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.print-center-page .print-grid-cell-empty {
  align-items: flex-start;
  background: #f7faff;
  border: 1px dashed #b7c8dc;
  border-radius: 8px;
  color: #61758a;
  display: flex;
  flex-direction: column;
  font-size: 11px;
  gap: 3px;
  padding: 10px;
}

.print-center-page .print-grid-size-list > li,
.print-center-page .print-grid-size-list > div,
.print-center-page .print-grid-size-list .print-grid-size-row {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  display: grid;
  gap: 6px;
  grid-template-columns: 26px minmax(0, 1fr) 76px;
  list-style: none;
  min-height: 36px;
  padding: 4px 6px;
}

.print-center-page .print-grid-size-list > li:hover,
.print-center-page .print-grid-size-list > div:hover,
.print-center-page .print-grid-size-list .print-grid-size-row:hover {
  border-color: #a8bfd9;
}

.print-center-page .print-grid-size-list .drag-handle,
.print-center-page .print-grid-size-list [data-grid-size-drag] {
  color: #8092a7;
  cursor: grab;
  font-size: 14px;
  text-align: center;
  user-select: none;
}

.print-center-page .print-grid-size-list input {
  background: #fff;
  border: 1px solid #c8d6e6;
  border-radius: 5px;
  font: inherit;
  height: 28px;
  min-width: 0;
  padding: 0 6px;
  width: 100%;
}

.print-center-page .print-grid-size-list input:focus {
  border-color: var(--zg-blue-600, #2f6cff);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12);
  outline: 0;
}

@media (hover: none), (pointer: coarse) {
  .print-center-page .print-grid-child-resize-handle {
    height: 24px;
    width: 24px;
  }

  .print-center-page .print-grid-child-resize-handle::after {
    left: 8px;
    top: 8px;
  }
}

@media (max-width: 650px) {
  .print-center-page .print-grid-size-list > li,
  .print-center-page .print-grid-size-list > div,
  .print-center-page .print-grid-size-list .print-grid-size-row {
    grid-template-columns: 24px minmax(0, 1fr) 68px;
  }
}

@media print {
  .print-grid-child-move,
  .print-grid-child-remove,
  .print-grid-child-resize-handle,
  .print-qr-placeholder {
    display: none !important;
  }

  .print-grid-cell-editor {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: inherit !important;
    overflow: hidden !important;
    padding: var(--print-grid-cell-padding, 4px) !important;
    resize: none !important;
  }

  .print-free-grid,
  .print-grid-child,
  .print-free-qr {
    background: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  .print-free-grid,
  .print-grid-child,
  .print-free-qr,
  .print-layout-grid-cell,
  .print-grid-cell-content,
  .print-qr-frame {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .print-layout-grid-cell::after {
    display: none !important;
  }
}

/* Print template v3 — pure canvas, multi-page editing and free table controls.
   This layer is intentionally appended and scoped to the print designer. */
.print-center-page .print-paper-pages {
  align-items: center;
  align-self: flex-start;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 42px;
  margin: 0 auto;
  min-height: 100%;
  min-width: max-content;
  padding: 12px 34px 34px;
  position: relative;
}

.print-center-page .print-paper-page,
.print-center-page [data-print-page] {
  flex: 0 0 auto;
  position: relative;
}

.print-center-page .print-paper-pages .print-paper.is-designer,
.print-center-page .print-paper.is-designer.is-pure-canvas,
.print-center-page .print-paper.is-designer.print-paper-v3,
.print-center-page .print-paper.is-designer[data-layout-version="3"] {
  isolation: isolate;
  overflow: visible;
}

.print-center-page .print-paper-pages .print-paper.is-designer .print-paper-inner,
.print-center-page .print-paper.is-designer.is-pure-canvas .print-paper-inner,
.print-center-page .print-paper.is-designer.print-paper-v3 .print-paper-inner,
.print-center-page .print-paper.is-designer[data-layout-version="3"] .print-paper-inner {
  display: block;
  gap: 0;
  height: 100%;
  min-height: 100%;
  overflow: visible;
  padding: 0;
  position: relative;
}

.print-center-page .print-paper-pages .print-paper.is-designer .print-free-layer,
.print-center-page .print-paper.is-designer.is-pure-canvas .print-free-layer,
.print-center-page .print-paper.is-designer.print-paper-v3 .print-free-layer,
.print-center-page .print-paper.is-designer[data-layout-version="3"] .print-free-layer {
  height: 100%;
  inset: 0;
  overflow: visible;
  width: 100%;
}

.print-center-page .print-page-label,
.print-center-page .print-paper-page-label,
.print-center-page [data-print-page-label] {
  align-items: center;
  background: #0b2d49;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(11, 45, 73, .16);
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  gap: 6px;
  left: 8px;
  line-height: 1;
  min-height: 25px;
  padding: 5px 10px;
  pointer-events: none;
  position: absolute;
  top: -31px;
  white-space: nowrap;
  z-index: 30;
}

.print-center-page .print-page-label small,
.print-center-page .print-paper-page-label small,
.print-center-page [data-print-page-label] small {
  color: rgba(255, 255, 255, .68);
  font-size: 10px;
}

.print-center-page .print-v3-empty-canvas,
.print-center-page .print-pure-canvas-empty,
.print-center-page .print-paper-pages .print-empty-canvas {
  align-items: center;
  background:
    radial-gradient(circle at 50% 0, rgba(47, 108, 255, .08), transparent 50%),
    rgba(247, 250, 255, .9);
  border: 1px dashed #a9bdd6;
  border-radius: 12px;
  color: #60758e;
  display: flex;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
  left: 50%;
  max-width: calc(100% - 80px);
  min-height: 116px;
  padding: 20px 28px;
  pointer-events: none;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  z-index: 1;
}

.print-center-page .print-v3-empty-canvas strong,
.print-center-page .print-pure-canvas-empty strong,
.print-center-page .print-paper-pages .print-empty-canvas strong {
  color: #274664;
  font-size: 13px;
}

.print-center-page .print-v3-empty-canvas span,
.print-center-page .print-pure-canvas-empty span,
.print-center-page .print-paper-pages .print-empty-canvas span {
  color: #71859d;
  font-size: 11px;
  line-height: 1.6;
}

/* Dynamic detail table: outer control exposes editor handles; the viewport clips rows. */
.print-center-page .print-paper.is-designer .print-free-table {
  background: #fff;
  border-color: #b6c6d8;
  border-radius: 5px;
  min-height: 96px;
  min-width: 0;
  overflow: visible !important;
}

.print-center-page .print-paper.is-designer .print-free-table:hover {
  border-color: #7098cf;
}

.print-center-page .print-paper.is-designer .print-free-table.is-selected,
.print-center-page .print-paper.is-designer .print-free-table.selected,
.print-center-page .print-paper.is-designer .print-free-table[aria-selected="true"] {
  border-color: #2f6cff;
  box-shadow:
    0 0 0 1px #fff,
    0 0 0 3px rgba(47, 108, 255, .2),
    0 10px 24px rgba(18, 59, 104, .14);
}

.print-center-page .print-free-table-frame,
.print-center-page .print-free-table-viewport,
.print-center-page .print-free-table-content {
  background: #fff;
  border-radius: inherit;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  scrollbar-color: #b9c9d9 transparent;
  scrollbar-width: thin;
  width: 100%;
}

.print-center-page .print-free-table table,
.print-center-page .print-free-table .print-document-table,
.print-center-page .print-free-table .print-canvas-table {
  border-collapse: separate;
  border-spacing: 0;
  color: #23384d;
  font-size: var(--print-control-font-size, 10px);
  font-variant-numeric: tabular-nums;
  min-width: 100%;
  table-layout: fixed;
  width: 100%;
}

.print-center-page .print-free-table thead {
  display: table-header-group;
}

.print-center-page .print-free-table th,
.print-center-page .print-free-table td {
  border: 0;
  border-bottom: 1px solid #aebed0;
  border-right: 1px solid #aebed0;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 5px 6px;
  position: relative;
  text-align: left;
  vertical-align: middle;
}

/* Draw the dynamic-detail perimeter inside the clipped viewport. Collapsed
   table borders extend half a pixel outside the table and are easily clipped
   after canvas/PDF scaling, which is why the last row used to lose segments. */
.print-center-page .print-free-table thead th {
  border-top: 1px solid #aebed0;
}

.print-center-page .print-free-table tr > :first-child {
  border-left: 1px solid #aebed0;
}

.print-center-page .print-free-table td {
  height: var(--print-table-row-height, 28px);
  max-height: var(--print-table-row-height, 28px);
  padding: 0;
}

.print-center-page .print-free-table th {
  height: var(--print-table-header-height, 30px);
  max-height: var(--print-table-header-height, 30px);
}

.print-center-page .print-table-cell-clip {
  align-items: center;
  display: flex;
  height: var(--print-table-current-row-height, var(--print-table-row-height, 28px));
  max-height: var(--print-table-current-row-height, var(--print-table-row-height, 28px));
  min-width: 0;
  overflow: hidden;
  padding: 4px 5px;
  white-space: nowrap;
}

.print-center-page .print-free-table tr.print-table-auto-row td {
  height: var(--print-table-current-row-height, var(--print-table-row-height, 28px));
  max-height: none;
}

.print-center-page .print-table-cell-clip.is-wrap {
  align-items: center;
  max-height: none;
  overflow: visible;
  white-space: normal;
}

.print-center-page .print-table-cell-clip.is-wrap .print-field-data-value,
.print-center-page .print-field-data-value.is-wrap {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  width: 100%;
  word-break: break-word;
}

.print-center-page .print-table-cell-clip.is-ellipsis .print-field-data-value,
.print-center-page .print-field-data-value.is-ellipsis {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.print-center-page .print-table-cell-clip.is-clip .print-field-data-value,
.print-center-page .print-field-data-value.is-clip {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  width: 100%;
}

.print-center-page .print-table-cell-clip.is-truncate .print-field-data-value,
.print-center-page .print-field-data-value.is-truncate {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  width: 100%;
}

.print-center-page .print-table-blank-row td {
  background: #fff !important;
}

.print-center-page .print-free-table th {
  background: #edf4ff;
  color: #25486f;
  font-weight: 750;
  overflow: visible;
}

.print-center-page .print-free-table tbody tr:nth-child(even) td {
  background: #fafcff;
}

.print-center-page .print-free-table tbody tr:hover td {
  background: #f1f6ff;
}

.print-center-page .print-free-table .print-index-column,
.print-center-page .print-free-table th.numeric,
.print-center-page .print-free-table td.numeric {
  text-align: center;
}

.print-center-page .print-free-table-empty,
.print-center-page .print-table-control-empty {
  align-items: center;
  background: #f8fbff;
  color: #71859a;
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 86px;
  padding: 14px;
  text-align: center;
}

.print-center-page .print-free-table th > .print-column-resize-handle,
.print-center-page .print-free-table [data-print-table-column-resize],
.print-center-page .print-free-table [data-print-column-resize] {
  bottom: 0;
  cursor: col-resize;
  right: -5px;
  top: 0;
  touch-action: none;
  user-select: none;
  width: 12px;
  z-index: 12;
}

.print-center-page .print-free-table th > .print-column-resize-handle::after,
.print-center-page .print-free-table [data-print-table-column-resize]::after,
.print-center-page .print-free-table [data-print-column-resize]::after {
  background: #7290b2;
  bottom: 3px;
  left: 5px;
  opacity: .55;
  top: 3px;
  width: 2px;
}

.print-center-page .print-free-table th:hover > .print-column-resize-handle::after,
.print-center-page .print-free-table [data-print-table-column-resize]:hover::after,
.print-center-page .print-free-table [data-print-column-resize]:hover::after,
.print-center-page .print-free-table .is-resizing::after {
  background: #2f6cff;
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .14);
  opacity: 1;
}

.print-center-page .print-table-editor-toolbar,
.print-center-page .print-free-table-toolbar {
  align-items: center;
  background: #0b2d49;
  border-radius: 7px;
  box-shadow: 0 7px 18px rgba(11, 45, 73, .2);
  color: #fff;
  display: none;
  gap: 5px;
  left: 8px;
  min-height: 29px;
  padding: 4px 6px;
  position: absolute;
  top: -36px;
  z-index: 22;
}

.print-center-page .print-free-table.is-selected .print-table-editor-toolbar,
.print-center-page .print-free-table.selected .print-table-editor-toolbar,
.print-center-page .print-free-table[aria-selected="true"] .print-table-editor-toolbar,
.print-center-page .print-free-table.is-selected .print-free-table-toolbar,
.print-center-page .print-free-table.selected .print-free-table-toolbar {
  display: flex;
}

.print-center-page .print-table-editor-toolbar button,
.print-center-page .print-free-table-toolbar button {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  min-height: 22px;
  padding: 3px 7px;
}

/* Table properties and column list in the right-hand inspector. */
.print-center-page .print-table-properties,
.print-center-page [data-print-table-properties] {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.print-center-page .print-table-property-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-center-page .print-table-property-grid > .wide {
  grid-column: 1 / -1;
}

.print-center-page .print-table-field-list,
.print-center-page .print-table-column-list,
.print-center-page [data-print-table-fields] {
  background: #f7faff;
  border: 1px solid #ccdaeb;
  border-radius: 9px;
  align-content: start;
  display: grid;
  gap: 6px;
  grid-auto-rows: max-content;
  max-height: min(46vh, 420px);
  min-width: 0;
  overflow: auto;
  padding: 7px;
  scrollbar-color: #bac9d9 transparent;
  scrollbar-width: thin;
}

.print-center-page .print-table-field-row,
.print-center-page .print-table-column-row,
.print-center-page [data-print-table-field-row] {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  display: grid;
  gap: 6px;
  grid-template-areas:
    "sequence name actions"
    "options options options";
  grid-template-columns: 22px minmax(0, 1fr) auto;
  height: max-content;
  min-height: 158px;
  padding: 6px;
}

.print-center-page .print-table-field-seq {
  color: #71859a;
  font-size: 10px;
  grid-area: sequence;
  text-align: center;
}

.print-center-page .print-table-field-name {
  grid-area: name;
}

.print-center-page .print-table-field-actions {
  display: flex;
  gap: 2px;
  grid-area: actions;
}

.print-center-page .print-table-field-options {
  display: grid;
  gap: 6px;
  grid-area: options;
  grid-template-columns: minmax(0, 1fr);
}

.print-center-page .print-table-field-options label {
  background: #f8fbff;
  border: 1px solid #e1e9f4;
  border-radius: 6px;
  display: grid;
  gap: 3px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  padding: 5px;
}

.print-center-page .print-table-field-options label > span {
  color: #6f8196;
  font-size: 9px;
  line-height: 1.25;
  white-space: nowrap;
}

.print-center-page .print-table-field-options .print-table-field-truncate-option {
  grid-column: auto;
}

.print-center-page .print-page-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding: 0 10px 12px;
}

.print-center-page .print-page-actions .btn {
  justify-content: center;
  min-width: 0;
}

.print-center-page .print-table-field-empty {
  color: #71859a;
  font-size: 11px;
  padding: 12px;
  text-align: center;
}

.print-center-page .print-free-table .print-table-field-head {
  min-width: 0;
}

.print-center-page .print-free-table .print-table-field-head input {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  min-width: 0;
  outline: 0;
  padding: 0;
  width: calc(100% - 24px);
}

.print-center-page .print-free-table .print-table-field-head em {
  color: #8091a5;
  font-size: 9px;
  font-style: normal;
}

.print-center-page .print-free-table .print-table-field-head button {
  background: transparent;
  border: 0;
  color: #9b5360;
  cursor: pointer;
  font-size: 9px;
  padding: 2px 3px;
}

.print-center-page .print-free-line {
  align-items: center !important;
  background: transparent !important;
}

.print-center-page .print-free-line-content {
  pointer-events: none;
  width: 100%;
}

.print-center-page .print-table-field-row:hover,
.print-center-page .print-table-column-row:hover,
.print-center-page [data-print-table-field-row]:hover {
  border-color: #a9c0db;
}

.print-center-page .print-table-field-drag,
.print-center-page .print-table-column-drag {
  color: #8193a7;
  cursor: grab;
  font-size: 14px;
  text-align: center;
  user-select: none;
}

.print-center-page .print-table-field-row input,
.print-center-page .print-table-field-row select,
.print-center-page .print-table-column-row input,
.print-center-page .print-table-column-row select,
.print-center-page [data-print-table-field-row] input,
.print-center-page [data-print-table-field-row] select {
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 5px;
  font: inherit;
  height: 29px;
  min-width: 0;
  padding: 0 6px;
  width: 100%;
}

.print-center-page .print-table-field-row button,
.print-center-page .print-table-column-row button,
.print-center-page [data-print-table-field-row] button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #bb4a55;
  cursor: pointer;
  display: inline-flex;
  height: 27px;
  justify-content: center;
  padding: 0;
  width: 27px;
}

.print-center-page .print-table-field-row button:hover,
.print-center-page .print-table-column-row button:hover,
.print-center-page [data-print-table-field-row] button:hover {
  background: #fff0f1;
}

/* Standalone preview/print keeps the same clipped table viewport without editor chrome. */
.print-sheet .print-free-table {
  background: #fff;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.print-sheet .print-free-table-frame,
.print-sheet .print-free-table-viewport,
.print-sheet .print-free-table-content {
  height: 100%;
  overflow: hidden;
  width: 100%;
}

.print-sheet .print-free-table table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: inherit;
  min-width: 100%;
  table-layout: fixed;
  width: 100%;
}

.print-sheet .print-free-table thead {
  display: table-header-group;
}

.print-sheet .print-free-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-sheet .print-free-table th,
.print-sheet .print-free-table td {
  border: 0;
  border-bottom: 1px solid #aabbd2;
  border-right: 1px solid #aabbd2;
  overflow-wrap: anywhere;
  padding: 5px 4px;
  vertical-align: middle;
}

.print-sheet .print-free-table thead th {
  border-top: 1px solid #aabbd2;
}

.print-sheet .print-free-table tr > :first-child {
  border-left: 1px solid #aabbd2;
}

@media print {
  .print-page-label,
  .print-paper-page-label,
  [data-print-page-label],
  .print-free-move-handle,
  .print-free-remove,
  .print-free-resize-handle,
  .print-element-move-handle,
  .print-element-resize-handle,
  .print-column-resize-handle,
  [data-print-column-resize],
  [data-print-table-column-resize],
  .print-table-editor-toolbar,
  .print-free-table-toolbar,
  .print-v3-empty-canvas,
  .print-pure-canvas-empty {
    display: none !important;
  }

  .print-free-table,
  .print-free-table-frame,
  .print-free-table-viewport,
  .print-free-table-content {
    overflow: hidden !important;
  }

  .print-free-table table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
  }
}

@media (max-width: 950px) {
  .print-center-page .print-paper-pages {
    align-items: flex-start;
    margin: 0;
    padding-left: 18px;
    padding-right: 18px;
  }

  .print-center-page .print-table-property-grid {
    grid-template-columns: 1fr;
  }

  .print-center-page .print-table-property-grid > .wide {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .print-center-page .print-paper-pages {
    gap: 34px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .print-center-page .print-table-field-row,
  .print-center-page .print-table-column-row,
  .print-center-page [data-print-table-field-row] {
    grid-template-columns: 20px minmax(0, 1fr) auto;
  }
}

/* Print Studio: unified free controls, field sizing and canvas zoom. */
.print-center-page .print-workspace-head.print-designer-toolbar {
  gap: 14px;
  justify-content: space-between;
  overflow: visible;
}

.print-center-page .print-workspace-head.print-designer-toolbar > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.print-center-page .print-zoom-toolbar {
  align-items: center;
  background: #f6f9fd;
  border: 1px solid #d5e0ee;
  border-radius: 9px;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
}

.print-center-page .print-zoom-toolbar button {
  align-items: center;
  background: #fff;
  border: 1px solid #d1deed;
  border-radius: 6px;
  color: var(--zg-navy-800, #123b68);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 7px;
}

.print-center-page .print-zoom-toolbar button:hover:not(:disabled),
.print-center-page .print-zoom-toolbar button.active {
  background: var(--zg-blue-100, #e4edff);
  border-color: #9ebdff;
  color: var(--zg-blue-700, #2454d7);
}

.print-center-page .print-zoom-toolbar button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.print-center-page .print-zoom-toolbar .text-button {
  font-size: 11px;
  min-width: 0;
  white-space: nowrap;
  width: auto;
}

.print-center-page #print-zoom-range {
  accent-color: var(--zg-blue-600, #2f6cff);
  border: 0;
  height: 26px;
  min-width: 86px;
  padding: 0;
  width: 104px;
}

.print-center-page [data-print-zoom-value] {
  color: #405b79;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  text-align: center;
  width: 43px;
}

.print-center-page .print-paper-stage {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
}

.print-center-page .print-paper.is-designer {
  margin-inline: auto;
  transform-origin: top center;
}

.print-center-page .print-paper.is-designer .print-free-element {
  font-size: var(--print-control-font-size, 12px);
}

.print-center-page [data-control-type="title"] > textarea {
  background: transparent;
  border: 0;
  color: #152c49;
  flex: 1 1 auto;
  font: inherit;
  font-weight: 800;
  height: 100%;
  line-height: 1.25;
  min-height: 0;
  min-width: 0;
  outline: 0;
  overflow: hidden;
  padding: 5px 7px;
  resize: none;
  text-align: inherit;
  width: 100%;
}

.print-center-page .print-free-field-content {
  align-items: stretch;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 5px 7px;
  text-align: inherit;
}

.print-center-page .print-free-field-content > span {
  color: #667a92;
  font-size: .78em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-free-field-content > strong {
  color: #162b45;
  font-size: 1em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.print-center-page .print-field-data-value.is-limited {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: nowrap;
}

.print-center-page .print-table-field-truncate-option.is-disabled {
  opacity: .55;
}

.print-center-page .print-free-field-content.value-only {
  justify-content: center;
  padding: 5px 7px;
}

.print-center-page .print-free-field-content.value-only > strong {
  line-height: 1.45;
}

.print-center-page .print-free-field-content > small {
  color: #94a3b5;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: none;
}

.print-center-page .print-field-token {
  position: relative;
}

.print-center-page .print-field-card-resize {
  bottom: -1px;
  cursor: nwse-resize;
  display: block;
  height: 17px;
  position: absolute;
  right: -1px;
  touch-action: none;
  width: 17px;
  z-index: 7;
}

.print-center-page .print-field-card-resize::after {
  border-bottom: 2px solid #6f8fb5;
  border-right: 2px solid #6f8fb5;
  bottom: 3px;
  content: "";
  height: 6px;
  opacity: .48;
  position: absolute;
  right: 3px;
  transition: border-color .14s ease, opacity .14s ease;
  width: 6px;
}

.print-center-page .print-field-token:hover .print-field-card-resize::after,
.print-center-page .print-field-card-resize:hover::after,
.print-center-page .print-field-card-resize.is-resizing::after {
  border-color: var(--zg-blue-600, #2f6cff);
  opacity: 1;
}

body.print-field-resizing {
  cursor: nwse-resize;
  user-select: none;
}

.print-center-page .print-empty-table-columns {
  align-items: center;
  background: #f7faff;
  border: 1px dashed #b9cbe1;
  border-radius: 7px;
  color: #617790;
  display: flex;
  gap: 9px;
  justify-content: center;
  min-height: 66px;
  padding: 10px;
  text-align: left;
}

.print-center-page .print-empty-table-columns > span {
  display: grid;
  gap: 2px;
}

.print-center-page .print-empty-table-columns strong {
  color: #27496f;
  font-size: 11px;
}

.print-center-page .print-empty-table-columns small {
  font-size: 9px;
}

.print-center-page .print-control-binding {
  align-items: center;
  background: #eef4fb;
  border-radius: 7px;
  color: #60758e;
  display: flex;
  font-size: 10px;
  gap: 7px;
  justify-content: space-between;
  padding: 7px 8px;
}

.print-center-page .print-control-binding code {
  color: var(--zg-blue-700, #2454d7);
  font-size: 10px;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-field-title-actions {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
}

.print-center-page .print-field-title-actions .btn {
  justify-content: center;
  min-width: 0;
  padding-inline: 8px;
}

.print-center-page .print-field-title-help {
  background: #f4f8fd;
  border: 1px solid #dce7f3;
  border-radius: 7px;
  color: #62758b;
  font-size: 9px;
  line-height: 1.55;
  margin: 0;
  padding: 7px 8px;
}

.print-center-page .print-field-chip > em {
  background: #e8f0ff;
  border-radius: 4px;
  color: #315d9c;
  flex: 0 0 auto;
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  padding: 2px 4px;
}

.print-center-page .print-field-palette-tip {
  margin: 0 9px 10px;
}

.print-center-page .print-page-pure-canvas-note {
  align-items: flex-start;
  background: #f0f6ff;
  border: 1px solid #d0e0f5;
  border-radius: 8px;
  color: #52708f;
  display: flex;
  font-size: 9px;
  gap: 8px;
  grid-column: 1 / -1;
  line-height: 1.55;
  padding: 9px;
}

.print-center-page .print-page-pure-canvas-note strong {
  color: #244c79;
  display: block;
  font-size: 10px;
  margin-bottom: 2px;
}

.print-center-page .print-field-label-editor.is-label-hidden {
  align-items: center;
  display: grid;
  gap: 2px 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.print-center-page .print-field-label-editor.is-label-hidden > em {
  color: #6e8195;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
}

.print-center-page .print-field-label-editor .print-field-label-toggle {
  background: #f1f6ff;
  border: 1px solid #cbdcf1;
  border-radius: 5px;
  color: #315e92;
  font-size: 8px;
  height: 21px;
  padding: 0 5px;
  white-space: nowrap;
  width: auto;
}

.print-center-page .print-field-label-editor .print-field-binding {
  grid-column: 1 / -1;
}

.print-center-page .print-spacer-height-editor {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
}

.print-center-page .print-spacer-height-editor span,
.print-center-page .print-spacer-height-editor em {
  color: #657b93;
  font-size: 8px;
  font-style: normal;
}

.print-center-page .print-spacer-height-editor input {
  max-width: 62px;
  min-width: 50px;
}

@media (max-width: 1280px) {
  .print-center-page .print-workspace-head.print-designer-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .print-center-page .print-zoom-toolbar {
    max-width: 100%;
  }
}

@media (max-width: 650px) {
  .print-center-page .print-zoom-toolbar {
    overflow-x: auto;
    width: 100%;
  }

  .print-center-page #print-zoom-range {
    min-width: 70px;
    width: 84px;
  }
}

@media print {
  .print-zoom-toolbar,
  .print-field-card-resize {
    display: none !important;
  }
}

/* Order profit analysis: fixed two-row filter layout */
@media (min-width: 901px) {
  .analysis-filter-order_profit_analysis.compact-filter-bar {
    display: grid;
    gap: 10px 9px;
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    padding: 14px 16px;
  }

  .analysis-filter-order_profit_analysis .analysis-profit-filter-date {
    grid-column: span 4 !important;
  }

  .analysis-filter-order_profit_analysis .analysis-profit-filter-customer,
  .analysis-filter-order_profit_analysis .analysis-profit-filter-salesperson {
    grid-column: span 3 !important;
  }

  .analysis-filter-order_profit_analysis .analysis-profit-filter-order-status,
  .analysis-filter-order_profit_analysis .analysis-profit-filter-cost-status,
  .analysis-filter-order_profit_analysis .analysis-profit-filter-margin {
    grid-column: span 2 !important;
  }

  .analysis-filter-order_profit_analysis .analysis-profit-filter-cost-basis {
    grid-column: span 3 !important;
  }

  .analysis-filter-order_profit_analysis .analysis-profit-filter-keyword {
    grid-column: span 2 !important;
  }

  .analysis-filter-order_profit_analysis .analysis-filter-actions {
    display: grid;
    gap: 7px;
    grid-column: span 3 !important;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .analysis-filter-order_profit_analysis .analysis-filter-actions .btn {
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* Personal reimbursement workspace */
.my-reimbursement-page {
  display: grid;
  gap: 14px;
}

.my-reimbursement-hero {
  background:
    radial-gradient(circle at 88% 5%, rgba(69, 157, 255, .3), transparent 33%),
    linear-gradient(128deg, var(--zg-navy-950), var(--zg-navy-800) 66%, #176b8d);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(6, 35, 72, .16);
  color: #fff;
  display: grid;
  gap: 22px 28px;
  grid-template-columns: minmax(0, 1fr) 300px;
  overflow: hidden;
  padding: 27px 30px 22px;
  position: relative;
}

.my-reimbursement-hero::after {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
  height: 260px;
  position: absolute;
  right: -92px;
  top: -144px;
  width: 260px;
}

.my-reimbursement-hero-copy,
.my-reimbursement-hero-account,
.my-reimbursement-workflow {
  position: relative;
  z-index: 1;
}

.my-reimbursement-hero-copy > span {
  color: #83d7f3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.my-reimbursement-hero-copy h2 {
  font-size: 29px;
  margin: 7px 0 8px;
}

.my-reimbursement-hero-copy p {
  color: rgba(255, 255, 255, .73);
  line-height: 1.7;
  margin: 0;
  max-width: 760px;
}

.my-reimbursement-hero-account {
  align-self: start;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  display: grid;
  gap: 5px;
  padding: 15px 16px;
}

.my-reimbursement-hero-account > span,
.my-reimbursement-hero-account > small {
  color: rgba(255, 255, 255, .62);
  font-size: 9px;
}

.my-reimbursement-hero-account > strong {
  font-size: 17px;
}

.my-reimbursement-hero-account .btn {
  justify-self: start;
  margin-top: 8px;
}

.my-reimbursement-workflow {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: grid;
  gap: 9px;
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  padding-top: 17px;
}

.my-reimbursement-workflow > span {
  align-items: center;
  display: flex;
  gap: 8px;
}

.my-reimbursement-workflow b {
  background: rgba(84, 184, 255, .18);
  border: 1px solid rgba(111, 204, 255, .38);
  border-radius: 8px;
  color: #9ce4ff;
  display: grid;
  font-size: 9px;
  height: 27px;
  place-items: center;
  width: 27px;
}

.my-reimbursement-workflow i {
  color: rgba(255, 255, 255, .83);
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.my-reimbursement-workflow > em {
  border-top: 1px dashed rgba(255, 255, 255, .22);
}

.my-reimbursement-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.my-reimbursement-kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 7px 20px rgba(18, 59, 104, .05);
  min-width: 0;
  padding: 15px 16px;
  position: relative;
}

.my-reimbursement-kpis article::before {
  background: #93aac5;
  border-radius: 10px 10px 0 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.my-reimbursement-kpis article.amount::before { background: var(--zg-blue-600); }
.my-reimbursement-kpis article.pending::before { background: #d89a36; }
.my-reimbursement-kpis article.payable::before { background: #8567c5; }
.my-reimbursement-kpis article.paid::before { background: #18a17b; }

.my-reimbursement-kpis span,
.my-reimbursement-kpis strong,
.my-reimbursement-kpis small {
  display: block;
}

.my-reimbursement-kpis span {
  color: var(--muted);
  font-size: 10px;
}

.my-reimbursement-kpis strong {
  color: var(--zg-navy-800);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.my-reimbursement-kpis small {
  color: #8a99aa;
  font-size: 8px;
  margin-top: 5px;
}

.my-reimbursement-return-alert {
  align-items: center;
  background: #fff8ed;
  border: 1px solid #f0d4a7;
  border-radius: 9px;
  color: #8e611b;
  display: flex;
  gap: 10px;
  padding: 10px 13px;
}

.my-reimbursement-return-alert span {
  font-size: 10px;
}

.my-reimbursement-return-alert strong {
  margin-right: 7px;
}

.my-reimbursement-filter {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 1.8fr) minmax(140px, .8fr) minmax(125px, .7fr) minmax(190px, 1fr) auto;
  padding: 14px 16px;
}

.my-reimbursement-filter-copy {
  align-items: baseline;
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
}

.my-reimbursement-filter-copy strong {
  color: var(--zg-navy-800);
  font-size: 13px;
}

.my-reimbursement-filter-copy span {
  color: var(--muted);
  font-size: 9px;
}

.my-reimbursement-filter label,
.my-reimbursement-date {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.my-reimbursement-filter label > span,
.my-reimbursement-date > span {
  color: #506780;
  font-size: 9px;
  font-weight: 700;
}

.my-reimbursement-filter input,
.my-reimbursement-filter select,
.my-reimbursement-filter .search-box {
  box-sizing: border-box;
  height: 38px;
  min-width: 0;
  width: 100%;
}

.my-reimbursement-filter input,
.my-reimbursement-filter select {
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 6px;
  outline: 0;
  padding: 0 9px;
}

.my-reimbursement-filter .search-box input {
  border: 0;
  height: 36px;
}

.my-reimbursement-filter-actions {
  display: flex;
  gap: 7px;
}

.my-reimbursement-filter-actions .btn {
  height: 38px;
  white-space: nowrap;
}

.my-reimbursement-list {
  margin: 0;
  overflow: hidden;
}

.my-reimbursement-list .analysis-section-title {
  align-items: center;
}

.my-reimbursement-list .analysis-section-title > div > strong,
.my-reimbursement-list .analysis-section-title > div > span {
  display: block;
}

.my-reimbursement-list .analysis-section-title > div > span,
.my-reimbursement-list .analysis-section-title > small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}

.reimbursement-personal-table {
  min-width: 980px;
  table-layout: fixed;
}

.reimbursement-personal-table th:nth-child(1) { width: 130px; }
.reimbursement-personal-table th:nth-child(2) { width: 115px; }
.reimbursement-personal-table th:nth-child(3) { width: 270px; }
.reimbursement-personal-table th:nth-child(4) { width: 70px; }
.reimbursement-personal-table th:nth-child(5) { width: 125px; }
.reimbursement-personal-table th:nth-child(6) { width: 190px; }
.reimbursement-personal-table th:nth-child(7) { width: 105px; }

.reimbursement-personal-table tbody tr[data-reimbursement-row] {
  cursor: pointer;
}

.reimbursement-personal-table tbody tr[data-reimbursement-row]:hover {
  background: var(--zg-blue-50);
}

.reimbursement-personal-table .reimbursement-description {
  max-width: 240px;
}

/* Reimbursement application dialog */
.reimbursement-application-dialog {
  width: min(1120px, calc(100vw - 34px));
}

.reimbursement-application-head {
  background:
    linear-gradient(110deg, #f8fbff, #eef5ff 62%, #f1fbfd);
}

.reimbursement-head-status {
  align-items: center;
  display: flex;
  gap: 13px;
}

.reimbursement-application-body {
  padding: 17px 18px 20px;
}

.reimbursement-application-layout {
  align-items: start;
  display: grid;
  gap: 15px;
  grid-template-columns: minmax(0, 1fr) 255px;
}

.reimbursement-form-card,
.reimbursement-invoice-section {
  background: #fff;
  border: 1px solid #dbe5ef;
  border-radius: 9px;
  overflow: hidden;
}

.reimbursement-form-card .reimbursement-base-grid {
  border: 0;
  border-radius: 0;
  padding: 16px 16px 2px;
}

.reimbursement-required-note {
  color: #8a99a8;
  font-size: 8px;
}

.reimbursement-readonly-value {
  align-items: center;
  background: #f4f7fb;
  border: 1px solid #dce5ee;
  border-radius: 6px;
  color: var(--zg-navy-800);
  display: flex;
  gap: 8px;
  height: 40px;
  padding: 0 11px;
}

.reimbursement-readonly-value > span {
  font-size: 11px;
  font-weight: 700;
}

.reimbursement-readonly-value > small {
  color: #8a99a8;
  font-size: 8px;
  margin-left: auto;
}

.reimbursement-form-card .field-help {
  color: #8392a1;
  display: block;
  font-size: 8px;
  margin-top: -8px;
}

.reimbursement-application-layout .reimbursement-invoice-section {
  margin-top: 14px;
}

.reimbursement-application-layout .reimbursement-invoice-head,
.reimbursement-application-layout .reimbursement-invoice-row {
  grid-template-columns: 44px minmax(300px, 1fr) 145px 40px;
}

.reimbursement-application-layout .reimbursement-invoice-row {
  min-height: 72px;
}

.invoice-file-mark {
  align-items: center;
  background: var(--zg-blue-50);
  border: 1px solid #d9e7fb;
  border-radius: 7px;
  color: var(--zg-blue-600);
  display: flex;
  flex: 0 0 31px;
  height: 31px;
  justify-content: center;
}

.reimbursement-application-summary {
  display: grid;
  gap: 11px;
  position: sticky;
  top: 0;
}

.reimbursement-summary-total {
  background:
    linear-gradient(145deg, var(--zg-navy-900), var(--zg-blue-700));
  border-radius: 10px;
  color: #fff;
  padding: 18px 17px;
}

.reimbursement-summary-total span,
.reimbursement-summary-total output,
.reimbursement-summary-total small {
  display: block;
}

.reimbursement-summary-total span {
  color: rgba(255, 255, 255, .68);
  font-size: 9px;
}

.reimbursement-summary-total output {
  font-size: 25px;
  font-weight: 800;
  margin: 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reimbursement-summary-total small {
  color: rgba(255, 255, 255, .61);
  font-size: 8px;
  line-height: 1.5;
}

.reimbursement-summary-facts {
  background: #fff;
  border: 1px solid #dbe5ef;
  border-radius: 9px;
  margin: 0;
  padding: 6px 13px;
}

.reimbursement-summary-facts > div {
  align-items: center;
  border-bottom: 1px dashed #e1e8ef;
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
}

.reimbursement-summary-facts > div:last-child {
  border-bottom: 0;
}

.reimbursement-summary-facts dt {
  color: var(--muted);
  font-size: 9px;
}

.reimbursement-summary-facts dd {
  color: var(--zg-navy-800);
  font-size: 10px;
  font-weight: 750;
  margin: 0;
}

.reimbursement-submit-checklist {
  background: #fff;
  border: 1px solid #dbe5ef;
  border-radius: 9px;
  display: grid;
  gap: 8px;
  padding: 13px;
}

.reimbursement-submit-checklist strong {
  color: var(--zg-navy-800);
  font-size: 10px;
  margin-bottom: 2px;
}

.reimbursement-submit-checklist span {
  align-items: center;
  color: #62758a;
  display: flex;
  font-size: 8px;
  gap: 6px;
}

.reimbursement-submit-checklist svg {
  color: #159474;
  flex: 0 0 auto;
}

.reimbursement-submit-note,
.reimbursement-detail-returned {
  align-items: flex-start;
  background: #eef6ff;
  border: 1px solid #cfe1f6;
  border-radius: 8px;
  color: #426583;
  display: flex;
  font-size: 8px;
  gap: 7px;
  line-height: 1.55;
  padding: 10px;
}

.reimbursement-submit-note svg,
.reimbursement-detail-returned svg {
  flex: 0 0 auto;
}

/* Reimbursement detail progress */
.reimbursement-detail-progress {
  align-items: center;
  background: #fff;
  border: 1px solid #dce5ef;
  border-radius: 9px;
  display: grid;
  gap: 6px;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  margin-bottom: 14px;
  padding: 13px 15px;
}

.reimbursement-detail-progress > span {
  align-items: center;
  display: grid;
  gap: 5px;
  justify-items: center;
}

.reimbursement-detail-progress b {
  background: #edf2f7;
  border-radius: 50%;
  color: #8190a0;
  display: grid;
  font-size: 8px;
  height: 24px;
  place-items: center;
  width: 24px;
}

.reimbursement-detail-progress i {
  color: #748598;
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
}

.reimbursement-detail-progress > em {
  border-top: 2px solid #e2e8ef;
  transform: translateY(-7px);
}

.reimbursement-detail-progress > span.active b {
  background: var(--zg-blue-600);
  color: #fff;
}

.reimbursement-detail-progress > span.active i {
  color: var(--zg-navy-800);
  font-weight: 700;
}

.reimbursement-detail-progress > em.active {
  border-color: #76a5ff;
}

.reimbursement-detail-returned {
  background: #fff5f3;
  border-color: #efcbc4;
  color: #a05245;
  margin: -5px 0 14px;
}

@media (max-width: 1180px) {
  .my-reimbursement-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .my-reimbursement-filter {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .my-reimbursement-date {
    grid-column: span 2;
  }

  .my-reimbursement-filter-actions {
    grid-column: span 2;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .my-reimbursement-hero {
    grid-template-columns: 1fr;
  }

  .my-reimbursement-hero-account {
    max-width: 360px;
  }

  .reimbursement-application-layout {
    grid-template-columns: 1fr;
  }

  .reimbursement-application-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .reimbursement-submit-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .my-reimbursement-kpis,
  .my-reimbursement-filter,
  .reimbursement-application-summary {
    grid-template-columns: 1fr;
  }

  .my-reimbursement-date,
  .my-reimbursement-filter-actions,
  .reimbursement-submit-note {
    grid-column: auto;
  }

  .my-reimbursement-filter-actions,
  .my-reimbursement-filter-actions .btn {
    width: 100%;
  }

  .my-reimbursement-workflow {
    align-items: stretch;
    grid-template-columns: repeat(4, 1fr);
  }

  .my-reimbursement-workflow > em {
    display: none;
  }

  .my-reimbursement-workflow > span {
    align-items: flex-start;
    flex-direction: column;
  }

  .reimbursement-application-dialog {
    width: 100%;
  }

  .reimbursement-application-layout .reimbursement-invoice-section {
    overflow-x: auto;
  }

  .reimbursement-application-layout .reimbursement-invoice-head,
  .reimbursement-application-layout .reimbursement-invoice-row {
    min-width: 720px;
  }

  .reimbursement-detail-progress {
    grid-template-columns: repeat(5, 1fr);
  }

  .reimbursement-detail-progress > em {
    display: none;
  }
}

/* Operating dashboard: compact end-to-end ERP workflow */
.dashboard-workflow {
  position: relative;
  margin-top: 14px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(208, 221, 236, .95);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(5, 110, 225, .045), transparent 24%),
    #fff;
  box-shadow: 0 8px 24px rgba(11, 45, 73, .045);
}

.dashboard-workflow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #15b9d4, #056ee1);
}

.dashboard-workflow-head {
  min-width: 0;
  padding-left: 4px;
}

.dashboard-workflow-head > span {
  display: block;
  color: var(--zg-blue-600, #056ee1);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.dashboard-workflow-head > strong {
  display: block;
  margin-top: 4px;
  color: var(--zg-navy-950, #0b1f33);
  font-size: 14px;
}

.dashboard-workflow-head > small {
  display: block;
  margin-top: 3px;
  color: #7d90a6;
  font-size: 10px;
}

.dashboard-workflow-scroll {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #c7d7e9 transparent;
}

.dashboard-workflow-scroll::-webkit-scrollbar {
  height: 4px;
}

.dashboard-workflow-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c7d7e9;
}

.dashboard-workflow-track {
  min-width: 850px;
  display: flex;
  align-items: center;
}

.dashboard-workflow-step {
  position: relative;
  min-width: 94px;
  height: 62px;
  padding: 9px 5px;
  flex: 1 1 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  border: 1px solid #dce7f3;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, #f6faff);
}

.dashboard-workflow-step::after {
  content: attr(data-step);
  position: absolute;
  right: 6px;
  top: 4px;
  color: #c1cede;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .3px;
}

.dashboard-workflow-step > i {
  width: 24px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #0872df;
  background: #e7f2ff;
  font-style: normal;
}

.dashboard-workflow-step > div {
  min-width: 0;
}

.dashboard-workflow-step strong,
.dashboard-workflow-step small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dashboard-workflow-step strong {
  color: #20364d;
  font-size: 10.5px;
}

.dashboard-workflow-step small {
  margin-top: 3px;
  color: #8495a8;
  font-size: 8px;
}

.dashboard-workflow-arrow {
  width: 16px;
  flex: 0 0 16px;
  color: #83a8cf;
  text-align: center;
  font-size: 20px;
  font-weight: 300;
}

@media (max-width: 900px) {
  .dashboard-workflow {
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 10px;
    padding-right: 10px;
  }

  .dashboard-workflow-track {
    min-width: 820px;
  }
}

@media (max-width: 620px) {
  .dashboard-workflow {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 13px 11px;
  }

  .dashboard-workflow-head {
    padding: 0 4px;
  }

  .dashboard-workflow-head > span,
  .dashboard-workflow-head > strong,
  .dashboard-workflow-head > small {
    display: inline;
  }

  .dashboard-workflow-head > strong {
    margin-left: 7px;
  }

  .dashboard-workflow-head > small {
    margin-left: 7px;
  }
}

/* Product BOM center */
.bom-page,
.bom-form-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.bom-list-hero,
.bom-form-hero {
  align-items: center;
  background: linear-gradient(118deg, #092c50 0%, #0e4c87 68%, #0874cf 100%);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(9,44,80,.16);
  color: #fff;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  min-height: 138px;
  overflow: hidden;
  padding: 25px 28px;
  position: relative;
}

.bom-list-hero::after,
.bom-form-hero::after {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 120px;
  top: -94px;
  width: 180px;
}

.bom-list-hero > *,
.bom-form-hero > * {
  position: relative;
  z-index: 1;
}

.bom-list-hero span,
.bom-form-hero span {
  color: #8ec8ff;
  display: block;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.7px;
}

.bom-list-hero h2,
.bom-form-hero h2 {
  font-size: 27px;
  margin: 4px 0 5px;
}

.bom-list-hero p,
.bom-form-hero p {
  color: #d7eaff;
  font-size: 11px;
  margin: 0;
}

.bom-list-hero > .btn,
.bom-form-hero > .btn {
  background: #fff;
  border-color: #fff;
  color: #0a5da7;
}

.bom-kpis {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(4,minmax(0,1fr));
}

.bom-kpis article {
  background: #fff;
  border: 1px solid #dce7f2;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(9,44,80,.05);
  padding: 15px 17px;
}

.bom-kpis article::before {
  background: #5f84aa;
  border-radius: 4px;
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 11px;
  width: 28px;
}

.bom-kpis article.active::before { background: #17a36b; }
.bom-kpis article.pending::before { background: #dc8d23; }
.bom-kpis span,
.bom-kpis small { color: var(--muted); display: block; font-size: 9px; }
.bom-kpis strong { color: #173d62; display: block; font-size: 23px; margin: 3px 0; }

.bom-filter-bar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px,1.15fr) minmax(200px,1.25fr) 112px 100px minmax(180px,1fr) auto auto;
  padding: 13px 15px;
}

.bom-filter-bar > div:first-child strong,
.bom-filter-bar > div:first-child span,
.bom-filter-bar label > span {
  display: block;
}

.bom-filter-bar > div:first-child strong { color: #183d62; font-size: 12px; }
.bom-filter-bar > div:first-child span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.bom-filter-bar label > span { color: #63798e; font-size: 9px; margin-bottom: 5px; }
.bom-filter-bar input,
.bom-filter-bar select,
.bom-filter-bar .searchable-select-input { height: 36px; min-width: 0; width: 100%; }
.bom-filter-bar .btn { height: 36px; min-width: 70px; }
.bom-list-filter {
  grid-template-columns: minmax(210px,1.45fr) 112px 100px minmax(190px,1fr) auto auto auto;
}
.bom-list-filter #bom-add { white-space: nowrap; }
.bom-list-footer {
  align-items: center;
  background: #fbfcfe;
  border-top: 1px solid #e4ebf1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  padding: 9px 14px;
}
.bom-list-summary,
.bom-list-file-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.bom-list-summary span { color: #65798a; font-size: 11px; white-space: nowrap; }
.bom-list-summary strong { color: #2b516f; font-size: 12px; font-variant-numeric: tabular-nums; }
.bom-list-file-actions { gap: 7px; }
.bom-list-file-actions .btn { white-space: nowrap; }
.bom-change-filter { grid-template-columns: minmax(170px,1fr) minmax(220px,1.25fr) 125px minmax(200px,1fr) auto auto; }

.bom-section-head {
  align-items: center;
  border-bottom: 1px solid #e2eaf2;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.bom-section-head strong,
.bom-section-head span { display: block; }
.bom-section-head strong { color: #193d61; font-size: 13px; }
.bom-section-head div span,
.bom-section-head > span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.bom-list-panel { overflow: hidden; }
.bom-list-table { margin: 0; min-width: 1160px; }
.bom-list-table td > small,
.bom-change-table td > small { color: var(--muted); display: block; font-size: 9px; margin-top: 3px; }

.bom-status {
  align-items: center;
  background: #eef3f8;
  border-radius: 999px;
  color: #536a80;
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  gap: 6px;
  padding: 5px 9px;
  white-space: nowrap;
}

.bom-status i { background: currentColor; border-radius: 50%; height: 5px; width: 5px; }
.bom-status.active { background: #e8f8f0; color: #08794c; }
.bom-status.pending { background: #fff5df; color: #95610b; }
.bom-status.draft { background: #edf4ff; color: #2b67a5; }
.bom-status.disabled { background: #f1f2f4; color: #7c848d; }
.bom-version {
  background: #edf5ff;
  border: 1px solid #d5e5f7;
  border-radius: 5px;
  color: #155e9e;
  display: inline-block;
  font-size: 10px;
  font-weight: 850;
  padding: 4px 8px;
}
.bom-version.muted { background: #f4f6f8; border-color: #e2e6eb; color: #71808f; }
.bom-change-type { color: #165f9c; font-size: 10px; font-weight: 750; }
.bom-change-table { margin: 0; min-width: 1120px; }

.bom-form-card { overflow: hidden; }
.bom-form-card .form-section-head { min-height: 68px; }
.bom-line-editor { padding: 0 !important; }
.bom-line-table {
  margin: 0;
  min-width: 2920px;
  table-layout: fixed;
  width: 100%;
}
.bom-line-table th:first-child,
.bom-line-table td:first-child { text-align: center; width: 58px; }
.bom-line-table th:nth-child(2) { width: 240px; }
.bom-line-table th:nth-child(3) { width: 145px; }
.bom-line-table th:nth-child(4) { width: 140px; }
.bom-line-table th:nth-child(5) { width: 145px; }
.bom-line-table th:nth-child(6) { width: 74px; }
.bom-line-table th:nth-child(7) { width: 112px; }
.bom-line-table th:nth-child(8),
.bom-line-table th:nth-child(9) { width: 100px; }
.bom-line-table th:nth-child(10) { width: 170px; }
.bom-line-table th:nth-child(11) { width: 125px; }
.bom-line-table th:nth-child(12) { width: 135px; }
.bom-line-table th:nth-child(13) { width: 120px; }
.bom-line-table th:nth-child(14),
.bom-line-table th:nth-child(15) { width: 145px; }
.bom-line-table th:nth-child(16),
.bom-line-table th:nth-child(17) { width: 86px; }
.bom-line-table th:nth-child(18) { width: 235px; }
.bom-line-table th:nth-child(19) { width: 170px; }
.bom-line-table th:last-child,
.bom-line-table td:last-child { text-align: center; width: 62px; }
.bom-line-table input,
.bom-line-table select,
.bom-line-table .searchable-select-input { height: 37px; min-width: 0; width: 100%; }
.bom-line-readonly {
  background: #f5f8fb;
  border: 1px solid #e1e8f0;
  border-radius: 6px;
  color: #425d76;
  display: block;
  line-height: 35px;
  min-height: 35px;
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bom-line-check {
  align-items: center;
  color: #4b6176;
  display: flex;
  font-size: 10px;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}
.bom-line-check input {
  accent-color: var(--accent);
  height: 16px;
  width: 16px;
}
.bom-form-note {
  align-items: center;
  background: #f5f9ff;
  border-top: 1px solid #dfe9f4;
  color: #567087;
  display: flex;
  font-size: 9px;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
}
.bom-detail-drawer { width: min(980px,98vw); }
.bom-detail-lines { min-width: 2480px; table-layout: fixed; }
.bom-detail-lines :is(th,td) { padding-right: 10px; padding-left: 10px; }
.bom-detail-lines :is(th,td):nth-child(1) { width: 52px; text-align: center; }
.bom-detail-lines :is(th,td):nth-child(2) { width: 145px; }
.bom-detail-lines :is(th,td):nth-child(3) { width: 160px; }
.bom-detail-lines :is(th,td):nth-child(4) { width: 190px; }
.bom-detail-lines :is(th,td):nth-child(5) { width: 180px; }
.bom-detail-lines :is(th,td):nth-child(1),
.bom-detail-lines :is(th,td):nth-child(2),
.bom-detail-lines :is(th,td):nth-child(3),
.bom-detail-lines :is(th,td):nth-child(4),
.bom-detail-lines :is(th,td):nth-child(5) {
  position: sticky;
  z-index: 3;
}
.bom-detail-lines :is(th,td):nth-child(1) { left: 0; }
.bom-detail-lines :is(th,td):nth-child(2) { left: 52px; }
.bom-detail-lines :is(th,td):nth-child(3) { left: 197px; }
.bom-detail-lines :is(th,td):nth-child(4) { left: 357px; }
.bom-detail-lines :is(th,td):nth-child(5) { left: 547px; }
.bom-detail-lines th:nth-child(-n+5) { background: #f3f7fb; z-index: 4; }
.bom-detail-lines td:nth-child(-n+5) { background: #fff; }
.bom-detail-lines tbody tr:hover td:nth-child(-n+5) { background: #f8faff; }
.bom-detail-lines :is(th,td):nth-child(5) { box-shadow: 5px 0 8px rgba(16,48,76,.06); }
.bom-detail-line-hint { display: block; margin-top: 3px; color: #71869a; font-size: 9px; font-weight: 500; }
.bom-detail-section-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}
.bom-detail-section-head h3 { margin: 0; }
.bom-version-compare {
  align-items: end;
  background: #f7faff;
  border: 1px solid #deE8f3;
  border-radius: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px,1fr) minmax(170px,1fr) auto;
  margin-bottom: 12px;
  padding: 11px;
}
.bom-version-compare label {
  color: #667c91;
  display: grid;
  font-size: 9px;
  gap: 5px;
}
.bom-version-compare select { height: 36px; }
.bom-version-history { min-width: 880px; }
.bom-diff { width: min(820px,96vw); }
.bom-diff-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin-bottom: 14px;
}
.bom-diff-summary article {
  background: #f4f8fd;
  border: 1px solid #dce7f2;
  border-radius: 9px;
  padding: 13px;
}
.bom-diff-summary span,
.bom-diff-summary strong { display: block; }
.bom-diff-summary span { color: var(--muted); font-size: 9px; }
.bom-diff-summary strong { color: #174f80; font-size: 22px; margin-top: 4px; }
.bom-diff-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.bom-diff-chips span {
  background: #eaf8f1;
  border: 1px solid #ccebdc;
  border-radius: 999px;
  color: #14714a;
  font-size: 9px;
  padding: 6px 9px;
}
.bom-diff-chips.removed span {
  background: #fff2f2;
  border-color: #f0d6d6;
  color: #9b4e4e;
}
.bom-diff-chips em { color: var(--muted); font-size: 10px; }
.bom-diff-list { display: grid; gap: 8px; }
.bom-diff-list article {
  border: 1px solid #e1e9f1;
  border-radius: 8px;
  padding: 10px 12px;
}
.bom-diff-list article > b { color: #164f80; font-size: 10px; }
.bom-diff-list article div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.bom-diff-list article span {
  background: #f6f8fb;
  border-radius: 5px;
  color: #526a81;
  font-size: 9px;
  padding: 5px 7px;
}

.product-bom-binding {
  align-items: center;
  background: linear-gradient(135deg,#f5f9ff,#fff);
  border: 1px solid #d7e5f4;
  border-radius: 12px;
  display: grid;
  gap: 13px;
  grid-template-columns: 42px minmax(190px,1fr) auto auto;
  min-width: 0;
  padding: 14px 15px;
}
.product-bom-binding-card { min-width: 0; }

.product-bom-binding-heading {
  align-items: baseline;
  display: flex;
  gap: 9px;
  padding: 2px 2px 0;
}
.product-bom-binding-heading strong { color: #193f64; font-size: 12px; }
.product-bom-binding-heading span { color: var(--muted); font-size: 9px; }

.product-bom-binding.is-active {
  background: linear-gradient(135deg,#eff8ff,#fff);
  border-color: #c8def2;
}

.product-bom-binding.is-empty,
.product-bom-binding.is-pending {
  grid-template-columns: 42px minmax(0,1fr) auto;
}

.product-bom-binding-mark {
  align-items: center;
  background: #e5f1fd;
  border-radius: 9px;
  color: #1768aa;
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.product-bom-binding > div > strong,
.product-bom-binding > div > span {
  display: block;
}

.product-bom-binding > div > strong { color: #173f64; font-size: 12px; }
.product-bom-binding > div > span { color: var(--muted); font-size: 9px; margin-top: 4px; }
.product-bom-binding > em { color: #718399; font-size: 9px; font-style: normal; }
.product-bom-binding-version {
  background: #fff;
  border: 1px solid #d7e5f2;
  border-radius: 8px;
  min-width: 105px;
  padding: 8px 11px;
}
.product-bom-binding-version strong { color: #0d5c9e !important; font-size: 15px !important; margin: 2px 0; }
.product-bom-binding-version em { color: #168057; display: block; font-size: 8px; font-style: normal; }
.product-bom-binding-status { color: #168057; font-weight: 750; }
.product-bom-binding-actions { display: flex; gap: 7px; }

.bom-toolbar,
.bom-editor,
.bom-diff {
  min-width: 0;
}

.workflow-bom-banner {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #cfe2f6;
  border-radius: 8px;
  color: #245f94;
  display: flex;
  gap: 11px;
  margin-bottom: 15px;
  min-height: 52px;
  padding: 11px 13px;
}
.workflow-bom-banner-icon {
  align-items: center;
  background: rgba(255,255,255,.72);
  border-radius: 8px;
  display: flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
}
.workflow-bom-banner strong,
.workflow-bom-banner span { display: block; }
.workflow-bom-banner strong { font-size: 11px; }
.workflow-bom-banner span { color: #5d7892; font-size: 9px; margin-top: 3px; }
.workflow-bom-banner.active { background: #ecf9f3; border-color: #cce9dc; color: #0c754b; }
.workflow-bom-banner.active span { color: #4f7967; }
.workflow-bom-banner.pending { background: #fff9e9; border-color: #ecdfb9; color: #8a651e; }
.workflow-bom-banner.pending span { color: #806f4e; }
.workflow-bom-banner.error { background: #fff1f1; border-color: #efd3d3; color: #a24545; }
.workflow-bom-banner.error span { color: #8e6868; }
.workflow-bom-banner.loading .workflow-bom-banner-icon svg { animation: spin 1.1s linear infinite; }

/* Unified material master and BOM four-phase workspace */
.material-master-page,
.bom-requirement-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.material-master-hero,
.bom-requirement-hero {
  align-items: center;
  background: linear-gradient(118deg,#092c50 0%,#0e4c87 66%,#0874cf 100%);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(9,44,80,.14);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 132px;
  overflow: hidden;
  padding: 24px 27px;
  position: relative;
}

.material-master-hero::after,
.bom-requirement-hero::after {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  content: "";
  height: 190px;
  position: absolute;
  right: 110px;
  top: -110px;
  width: 190px;
}

.material-master-hero > *,
.bom-requirement-hero > * { position: relative; z-index: 1; }
.material-master-hero > div > span,
.bom-requirement-hero > div > span {
  color: #91cbff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 1.7px;
}
.material-master-hero h2,
.bom-requirement-hero h2 { font-size: 27px; margin: 5px 0; }
.material-master-hero p,
.bom-requirement-hero p { color: #d9ebfc; font-size: 11px; margin: 0; }
.material-master-hero > .btn,
.bom-requirement-hero > .btn { background: #fff; border-color: #fff; color: #0a5da7; }

.bom-requirement-hero-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bom-requirement-hero-actions .btn-primary {
  background: #fff;
  border-color: #fff;
  color: #0a5da7;
}

.bom-requirement-hero-actions .btn:not(.btn-primary) {
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.58);
  color: #fff;
}

.bom-requirement-hero-actions .btn:disabled {
  box-shadow: none;
  opacity: .55;
}

.material-master-kpis,
.bom-requirement-kpis {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(4,minmax(0,1fr));
}
.material-master-kpis article,
.bom-requirement-kpis article {
  background: #fff;
  border: 1px solid #dce7f2;
  border-radius: 10px;
  padding: 14px 16px;
}
.material-master-kpis article::before,
.bom-requirement-kpis article::before {
  background: #4f81b2;
  border-radius: 4px;
  content: "";
  display: block;
  height: 3px;
  margin-bottom: 9px;
  width: 28px;
}
.bom-requirement-kpis article.warning::before { background: #d88920; }
.material-master-kpis span,
.material-master-kpis small,
.bom-requirement-kpis span,
.bom-requirement-kpis small { color: var(--muted); display: block; font-size: 9px; }
.material-master-kpis strong,
.bom-requirement-kpis strong { color: #173e62; display: block; font-size: 22px; margin: 3px 0; }

.material-master-filter,
.bom-requirement-filter {
  align-items: end;
  display: grid;
  gap: 9px;
  padding: 13px 15px;
}
.material-master-filter {
  grid-template-columns: minmax(170px,1fr) 118px 118px 82px 82px minmax(190px,1.2fr) auto auto;
}
.bom-requirement-filter {
  grid-template-columns: 116px 116px minmax(170px,1fr) minmax(170px,1fr) 105px minmax(170px,1fr) auto auto auto auto;
}
.material-master-filter > div strong,
.material-master-filter > div span,
.material-master-filter label > span,
.bom-requirement-filter label > span { display: block; }
.material-master-filter > div strong { color: #183d62; font-size: 12px; }
.material-master-filter > div span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.material-master-filter label > span,
.bom-requirement-filter label > span { color: #63798e; font-size: 9px; margin-bottom: 5px; }
.material-master-filter input,
.material-master-filter select,
.material-master-filter .searchable-select-input,
.bom-requirement-filter input,
.bom-requirement-filter select,
.bom-requirement-filter .searchable-select-input { height: 36px; min-width: 0; width: 100%; }
.material-master-filter .btn,
.bom-requirement-filter .btn { height: 36px; min-width: 68px; }

.material-master-panel,
.bom-requirement-panel { overflow: hidden; }
.material-master-head {
  align-items: center;
  border-bottom: 1px solid #e1e9f1;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}
.material-master-head strong,
.material-master-head span { display: block; }
.material-master-head strong { color: #173e62; font-size: 13px; }
.material-master-head div span,
.material-master-head > span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.material-master-table { margin: 0; min-width: 1540px; }
.material-master-table td > small,
.bom-requirement-table td > small,
.bom-supplier-price-table td > small { color: var(--muted); display: block; font-size: 9px; margin-top: 3px; }
.material-type-badge {
  background: #edf5ff;
  border: 1px solid #d8e6f5;
  border-radius: 999px;
  color: #175f9d;
  display: inline-block;
  font-size: 9px;
  font-weight: 750;
  padding: 5px 8px;
  white-space: nowrap;
}
.material-switches { display: flex; flex-wrap: wrap; gap: 4px; max-width: 180px; }
.material-switch {
  align-items: center;
  background: #f0f3f6;
  border-radius: 999px;
  color: #74818d;
  display: inline-flex;
  font-size: 8px;
  gap: 4px;
  padding: 4px 6px;
}
.material-switch i { background: currentColor; border-radius: 50%; height: 4px; width: 4px; }
.material-switch.is-on { background: #e8f7ef; color: #137b50; }

.bom-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.bom-list-hero .bom-hero-actions .btn { background: #fff; border-color: #fff; color: #0a5da7; }
.bom-list-hero .bom-hero-actions .btn-primary { background: #dff1ff; }
.bom-list-table-v2 { min-width: 1540px; }
.bom-parent-material-code {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bom-row-actions { min-width: 160px; }
.bom-cost-cell { display: grid; gap: 2px; min-width: 145px; }
.bom-cost-cell strong { color: #153f63; font-size: 11px; }
.bom-cost-cell span { color: var(--muted); font-size: 8px; white-space: nowrap; }
.bom-cost-cell button {
  background: transparent;
  border: 0;
  color: #1168ad;
  cursor: pointer;
  font-size: 8px;
  justify-self: start;
  padding: 2px 0;
}
.bom-cost-cell.complete strong { color: #0d7b50; }
.bom-cost-cell.warning strong { color: #a26310; }

.bom-import-drawer { width: min(980px,98vw); }
.bom-import-summary,
.bom-cost-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3,minmax(0,1fr));
}
.bom-import-summary article,
.bom-cost-summary article {
  background: #f5f9fd;
  border: 1px solid #dce7f1;
  border-radius: 9px;
  padding: 12px 14px;
}
.bom-import-summary article span,
.bom-import-summary article strong,
.bom-cost-summary article span,
.bom-cost-summary article strong { display: block; }
.bom-import-summary article span,
.bom-cost-summary article span { color: var(--muted); font-size: 9px; }
.bom-import-summary article strong,
.bom-cost-summary article strong { color: #174f80; font-size: 20px; margin-top: 4px; }
.bom-import-summary article.success strong { color: #0e7b50; }
.bom-import-summary article.danger strong { color: #ad4545; }
.bom-import-errors { display: grid; gap: 7px; max-height: 230px; overflow: auto; }
.bom-import-errors article { background: #fff4f3; border: 1px solid #f0d6d3; border-radius: 7px; padding: 8px 10px; }
.bom-import-errors strong,
.bom-import-errors span { display: block; }
.bom-import-errors strong { color: #994541; font-size: 9px; }
.bom-import-errors span { color: #735c5a; font-size: 9px; margin-top: 3px; }
.bom-import-table { min-width: 760px; }

.bom-attachment-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3,minmax(0,1fr));
}
.bom-attachment-slot {
  background: #f8fbff;
  border: 1px solid #dae6f1;
  border-radius: 10px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px;
}
.bom-attachment-slot > div:first-child strong,
.bom-attachment-slot > div:first-child span { display: block; }
.bom-attachment-slot > div:first-child strong { color: #183f64; font-size: 11px; }
.bom-attachment-slot > div:first-child span {
  color: var(--muted);
  font-size: 8px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bom-attachment-slot .file-control { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.bom-alternative-trigger { min-width: 112px; white-space: nowrap; }
.bom-alternative-drawer { width: min(1180px,99vw); }
.bom-alternative-table { margin: 0; min-width: 1280px; table-layout: fixed; }
.bom-alternative-table th:first-child { width: 58px; }
.bom-alternative-table th:nth-child(2) { width: 250px; }
.bom-alternative-table th:nth-child(3) { width: 76px; }
.bom-alternative-table th:nth-child(4) { width: 100px; }
.bom-alternative-table th:nth-child(5),
.bom-alternative-table th:nth-child(6) { width: 125px; }
.bom-alternative-table th:nth-child(7) { width: 220px; }
.bom-alternative-table th:last-child { width: 62px; }
.bom-alternative-table input,
.bom-alternative-table select,
.bom-alternative-table .searchable-select-input { height: 36px; min-width: 0; width: 100%; }
.bom-detail-alternatives { display: grid; gap: 4px; min-width: 160px; }
.bom-detail-alternatives span {
  background: #eef5ff;
  border-radius: 5px;
  color: #245e90;
  display: block;
  font-size: 8px;
  padding: 4px 6px;
  white-space: nowrap;
}

.bom-cost-status,
.bom-risk {
  align-items: center;
  background: #eef3f7;
  border-radius: 999px;
  color: #607184;
  display: inline-flex;
  font-size: 9px;
  font-weight: 750;
  gap: 5px;
  padding: 5px 8px;
}
.bom-cost-status.complete,
.bom-risk.safe { background: #e9f7f0; color: #11794f; }
.bom-cost-status.warning,
.bom-risk.warning { background: #fff4df; color: #966211; }
.bom-risk.danger { background: #fff0ef; color: #aa4844; }
.bom-risk i { background: currentColor; border-radius: 50%; height: 5px; width: 5px; }
.bom-cost-line-table,
.bom-supplier-price-table { min-width: 760px; }
.bom-detail-attachments { display: grid; gap: 8px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.bom-detail-attachments article {
  align-items: center;
  background: #f7faff;
  border: 1px solid #dce7f2;
  border-radius: 9px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px;
}
.bom-detail-attachments article > div { align-items: center; display: flex; gap: 8px; min-width: 0; }
.bom-detail-attachments strong,
.bom-detail-attachments small { display: block; }
.bom-detail-attachments strong { color: #183e62; font-size: 10px; }
.bom-detail-attachments small { color: var(--muted); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bom-requirement-table { margin: 0; min-width: 1800px; }
.bom-requirement-table th:first-child,
.bom-requirement-table td:first-child { text-align: center; width: 44px; }
.bom-requirement-component-identity {
  align-items: baseline;
  display: flex;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}
.bom-requirement-component-identity strong { flex: 0 0 auto; }
.bom-requirement-component-identity em {
  color: #4f6f8b;
  font-size: 9px;
  font-style: normal;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bom-requirement-table tr.is-shortage td { background: #fffdf8; }
.bom-requirement-table input[type=checkbox] { accent-color: var(--accent); }
.bom-explode-drawer { width: min(1120px,99vw); }
.bom-tree-table { min-width: 1120px; }
.bom-tree-level,
.bom-node-badge {
  background: #edf5ff;
  border-radius: 999px;
  color: #175f9d;
  display: inline-block;
  font-size: 8px;
  font-weight: 750;
  padding: 4px 7px;
}
.bom-node-badge.leaf { background: #eaf8f1; color: #14754d; }
.bom-tree-product { padding-left: calc(max(0,var(--bom-depth) - 1) * 14px); }
.bom-tree-product strong,
.bom-tree-product small { display: block; }
.bom-tree-product small { color: var(--muted); font-size: 8px; margin-top: 2px; }

@media (max-width: 1440px) {
  .material-master-filter,
  .bom-requirement-filter { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .material-master-filter > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .material-master-hero,
  .bom-requirement-hero { align-items: flex-start; flex-direction: column; gap: 15px; padding: 20px; }
  .bom-requirement-hero-actions { justify-content: flex-start; }
  .material-master-kpis,
  .bom-requirement-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .material-master-filter,
  .bom-requirement-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bom-attachment-grid,
  .bom-detail-attachments { grid-template-columns: 1fr; }
}

.workflow-component-editor { overflow-x: auto; }
.workflow-component-editor .component-head,
.workflow-component-editor .component-row {
  grid-template-columns: minmax(230px,1.35fr) 72px minmax(170px,1fr) 92px 100px 112px 120px 38px;
  min-width: 1130px;
}
.workflow-component-editor .component-add { position: sticky; left: 10px; }
.workflow-component-editor .bom-recommended { background: #fbfdff; }
.workflow-usage-value,
.workflow-suggested-value {
  font-variant-numeric: tabular-nums;
  justify-content: flex-end;
}
.workflow-suggested-value {
  background: #eef6ff;
  border-color: #d5e6f7;
  color: #155f9e;
  font-weight: 750;
}

@media (max-width: 1120px) {
  .bom-filter-bar,
  .bom-change-filter {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .bom-list-filter { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .bom-filter-bar > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .bom-list-hero,
  .bom-form-hero { align-items: flex-start; flex-direction: column; padding: 21px; }
  .bom-list-hero > .btn,
  .bom-form-hero > .btn { width: 100%; }
  .bom-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .bom-filter-bar,
  .bom-change-filter { grid-template-columns: minmax(0,1fr); }
  .bom-list-filter { grid-template-columns: minmax(0,1fr); }
  .bom-filter-bar > div:first-child { grid-column: auto; }
  .bom-filter-bar .btn { width: 100%; }
  .bom-list-footer,
  .bom-list-file-actions { align-items: stretch; flex-direction: column; }
  .bom-list-file-actions .btn { width: 100%; }
  .product-bom-binding,
  .product-bom-binding.is-empty,
  .product-bom-binding.is-pending {
    align-items: start;
    grid-template-columns: 40px minmax(0,1fr);
  }
  .product-bom-binding-version,
  .product-bom-binding-actions,
  .product-bom-binding > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .product-bom-binding-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .bom-kpis { grid-template-columns: minmax(0,1fr); }
}

/* Substrate library and product engineering parameters */
.substrate-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.substrate-hero {
  align-items: center;
  background:
    radial-gradient(circle at 86% 16%, rgba(67, 133, 255, .25), transparent 31%),
    linear-gradient(135deg, var(--zg-navy-950), var(--zg-navy-800) 62%, #13627e);
  border-radius: 18px;
  box-shadow: 0 16px 34px rgba(11, 45, 73, .14);
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 178px;
  overflow: hidden;
  padding: 28px 32px;
  position: relative;
}

.substrate-hero::after {
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  content: "";
  height: 280px;
  position: absolute;
  right: -76px;
  top: -138px;
  width: 280px;
}

.substrate-hero > div {
  position: relative;
  z-index: 1;
}

.substrate-hero > div:first-child {
  max-width: 780px;
}

.substrate-hero > div:first-child > span {
  color: #8bdcf2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.substrate-hero h2 {
  font-size: 29px;
  margin: 7px 0 9px;
}

.substrate-hero p {
  color: rgba(255, 255, 255, .76);
  line-height: 1.72;
  margin: 0;
}

.substrate-hero-kpis {
  display: grid;
  flex: 0 0 350px;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.substrate-hero-kpis article {
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 13px;
  backdrop-filter: blur(8px);
  padding: 15px 17px;
}

.substrate-hero-kpis span,
.substrate-hero-kpis strong,
.substrate-hero-kpis small {
  display: block;
}

.substrate-hero-kpis span {
  color: #9cc9dc;
  font-size: 10px;
  font-weight: 700;
}

.substrate-hero-kpis strong {
  font-size: 26px;
  margin: 5px 0 3px;
}

.substrate-hero-kpis small {
  color: rgba(255, 255, 255, .68);
  font-size: 10px;
}

.substrate-layout {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.substrate-brand-panel,
.substrate-spec-panel {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.substrate-brand-panel {
  position: static;
}

.substrate-panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 72px;
  padding: 15px 18px;
}

.substrate-panel-head > div {
  min-width: 0;
}

.substrate-panel-head strong,
.substrate-panel-head span {
  display: block;
}

.substrate-panel-head strong {
  color: var(--ink);
  font-size: 15px;
}

.substrate-panel-head span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin-top: 4px;
}

.substrate-panel-head .btn {
  flex: 0 0 auto;
}

.substrate-brand-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: 224px;
  overflow: auto;
  padding: 13px;
}

.substrate-brand-list article {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #dfe8f2;
  border-radius: 11px;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 10px;
}

.substrate-brand-list article:hover {
  background: #f3f8ff;
  border-color: #c8d9ec;
}

.substrate-brand-mark {
  align-items: center;
  background: linear-gradient(135deg, var(--zg-blue-100), #dff7fb);
  border: 1px solid #c8dcf5;
  border-radius: 9px;
  color: var(--zg-blue-700);
  display: flex;
  font-size: 15px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.substrate-brand-list article strong,
.substrate-brand-list article span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.substrate-brand-list article strong {
  font-size: 13px;
}

.substrate-brand-list article span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.substrate-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 200px;
  text-align: center;
}

.substrate-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.substrate-empty span {
  font-size: 11px;
}

.substrate-spec-panel .table-scroll {
  overflow-x: auto;
}

.substrate-spec-table {
  min-width: 950px;
}

.substrate-spec-table th {
  background: #f4f8fd;
  color: #3c5875;
  font-size: 11px;
  white-space: nowrap;
}

.substrate-spec-table td {
  vertical-align: middle;
}

.substrate-spec-table td:first-child strong,
.substrate-spec-table td:first-child small {
  display: block;
}

.substrate-spec-table td:first-child small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.substrate-type-badge {
  background: var(--zg-blue-50);
  border: 1px solid #d3e0f2;
  border-radius: 999px;
  color: var(--zg-blue-700);
  display: inline-flex;
  font-size: 10px;
  font-weight: 750;
  padding: 4px 9px;
  white-space: nowrap;
}

.substrate-composition {
  color: #546b83;
  font-size: 11px;
  line-height: 1.55;
  max-width: 290px;
}

.substrate-total-cell {
  white-space: nowrap;
}

.substrate-total-cell strong {
  color: var(--zg-blue-700);
  font-size: 16px;
}

.substrate-total-cell span {
  color: var(--muted);
  font-size: 10px;
  margin-left: 3px;
}

.substrate-modal-backdrop {
  padding: 18px;
}

.substrate-brand-dialog,
.substrate-spec-dialog {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(6, 20, 43, .24);
  max-height: calc(100vh - 36px);
  overflow: auto;
  width: min(560px, calc(100vw - 30px));
}

.substrate-spec-dialog {
  width: min(940px, calc(100vw - 30px));
}

.substrate-dialog-head {
  align-items: center;
  background: linear-gradient(135deg, #f4f8ff, #eef9fb);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 78px;
  padding: 17px 20px;
}

.substrate-dialog-head strong,
.substrate-dialog-head span {
  display: block;
}

.substrate-dialog-head strong {
  font-size: 18px;
}

.substrate-dialog-head span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}

.substrate-dialog-body {
  padding: 22px;
}

.substrate-dialog-body label > span {
  color: #40566e;
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 7px;
}

.substrate-dialog-body label > span em {
  color: var(--danger);
  font-style: normal;
}

.substrate-dialog-body input,
.substrate-dialog-body select {
  box-sizing: border-box;
  height: 42px;
  min-width: 0;
  width: 100%;
}

.substrate-spec-basic {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.substrate-thickness-card {
  background: #f8fbff;
  border: 1px solid #dce7f2;
  border-radius: 13px;
  margin-top: 18px;
  overflow: hidden;
}

.substrate-thickness-title {
  align-items: center;
  border-bottom: 1px solid #dfe8f1;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 14px 16px;
}

.substrate-thickness-title strong,
.substrate-thickness-title span {
  display: block;
}

.substrate-thickness-title strong {
  font-size: 13px;
}

.substrate-thickness-title span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}

.substrate-total-preview {
  align-items: baseline;
  background: #fff;
  border: 1px solid #d5e2ee;
  border-radius: 10px;
  display: flex;
  gap: 5px;
  padding: 8px 12px;
  white-space: nowrap;
}

.substrate-total-preview span {
  margin: 0;
}

.substrate-total-preview strong {
  color: var(--zg-blue-700);
  font-size: 20px;
}

.substrate-total-preview em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.substrate-thickness-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 104px;
  padding: 16px;
}

.substrate-thickness-grid.is-empty {
  display: block;
}

.substrate-thickness-grid > label {
  animation: substrate-field-in .18s ease-out;
  background: #fff;
  border: 1px solid #e0e9f2;
  border-radius: 10px;
  padding: 11px;
  position: relative;
}

.substrate-thickness-grid > label::before {
  background: #9a6844;
  border-radius: 3px;
  content: "";
  height: 3px;
  left: 11px;
  position: absolute;
  top: 0;
  width: 28px;
}

.substrate-thickness-grid > label[data-material-kind="copper"]::before {
  background: #e8872f;
}

.substrate-thickness-grid > label[data-material-kind="plated_copper"]::before {
  background: #ed9d48;
}

.substrate-thickness-grid > label[data-material-kind="adhesive"]::before {
  background: #ead7ae;
}

.substrate-thickness-grid > label[data-material-kind="ink"]::before {
  background: #266d7a;
}

.substrate-thickness-grid > label[data-material-kind="shielding"]::before {
  background: #111820;
}

.substrate-thickness-grid label > div {
  align-items: center;
  display: flex;
  position: relative;
}

.substrate-thickness-grid label input {
  padding-right: 42px;
}

.substrate-thickness-grid label em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  pointer-events: none;
  position: absolute;
  right: 12px;
}

.substrate-thickness-empty {
  align-items: center;
  color: #7890a6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 72px;
  text-align: center;
}

.substrate-thickness-empty strong {
  color: #3e566e;
  font-size: 12px;
}

.substrate-thickness-empty span {
  font-size: 10px;
}

.substrate-dialog-foot {
  align-items: center;
  background: #fafcfe;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 10px;
  gap: 16px;
  justify-content: flex-end;
  min-height: 70px;
  padding: 13px 20px;
}

.substrate-dialog-foot > span {
  margin-right: auto;
}

.substrate-dialog-foot > div {
  display: flex;
  gap: 8px;
}

.product-parameter-body {
  display: grid;
  gap: 16px;
}

.product-parameter-summary {
  background: #f8fbff;
  border: 1px solid #dde8f3;
  border-radius: 12px;
  padding: 15px;
}

.surface-finish-requirement[hidden] {
  display: none !important;
}

.surface-finish-requirement.is-visible {
  animation: substrate-field-in .18s ease-out;
}

@keyframes substrate-field-in {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-engineering-block {
  background: #fff;
  border: 1px solid #dce6f0;
  border-radius: 13px;
  min-width: 0;
  overflow: hidden;
}

.product-stackup-editor,
.product-reinforcement-editor,
.product-impedance-editor {
  min-width: 0;
}

.product-stackup-editor {
  background: transparent;
  border: 0;
  overflow: visible;
}

.product-stackup-editor > .product-engineering-head {
  border: 1px solid #dce6f0;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
}

.product-engineering-head {
  align-items: center;
  background: linear-gradient(90deg, #f5f9fe, #fbfdff);
  border-bottom: 1px solid #dce6f0;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 15px;
}

.product-engineering-head > div:first-child {
  min-width: 180px;
}

.product-engineering-head > div:first-child strong,
.product-engineering-head > div:first-child span {
  display: block;
}

.product-engineering-head > div:first-child strong {
  color: var(--ink);
  font-size: 13px;
}

.product-engineering-head > div:first-child span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 4px;
}

.product-engineering-head .btn {
  flex: 0 0 auto;
}

.product-stackup-workspace {
  align-items: stretch;
  border: 1px solid #dce6f0;
  border-radius: 0 0 13px 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  min-width: 0;
  overflow: hidden;
}

.product-stackup-table-pane {
  min-width: 0;
  overflow: hidden;
}

.product-stackup-diagram-card {
  background:
    radial-gradient(circle at 100% 0, rgba(64, 136, 224, .08), transparent 42%),
    #f8fbff;
  border-left: 1px solid #dce6f0;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  min-width: 0;
}

.product-stackup-diagram-head {
  align-items: center;
  border-bottom: 1px solid #e1e9f2;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 13px;
}

.product-stackup-diagram-head > div:first-child strong,
.product-stackup-diagram-head > div:first-child span {
  display: block;
}

.product-stackup-diagram-head > div:first-child strong {
  color: #2d4660;
  font-size: 12px;
}

.product-stackup-diagram-head > div:first-child span {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.product-stackup-diagram-head > div:last-child {
  align-items: baseline;
  background: #fff;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  white-space: nowrap;
}

.product-stackup-diagram-head > div:last-child strong {
  color: var(--zg-blue-700);
  font-size: 15px;
}

.product-stackup-diagram-head > div:last-child span {
  color: var(--muted);
  font-size: 8px;
}

.product-stackup-diagram {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  overflow: auto;
  padding: 13px;
}

.product-stackup-diagram.is-empty {
  justify-content: center;
}

.product-stackup-diagram-empty {
  align-items: center;
  color: #7890a6;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 180px;
  padding: 18px;
  text-align: center;
  width: 100%;
}

.product-stackup-unified {
  background: #fff;
  border: 1px solid #dbe6ef;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(24, 63, 99, .04);
  overflow: hidden;
  padding: 5px;
  width: 100%;
}

.product-stackup-diagram-empty strong {
  color: #405972;
  font-size: 11px;
}

.product-stackup-diagram-empty span {
  font-size: 9px;
  line-height: 1.55;
}

.product-stackup-material {
  min-width: 0;
}

.product-stackup-material + .product-stackup-material {
  margin-top: 5px;
}

.product-stackup-material-layers {
  display: grid;
  gap: 1px;
}

.product-stackup-layer {
  align-items: center;
  border: 1px solid rgba(48, 62, 75, .16);
  box-sizing: border-box;
  display: flex;
  gap: 7px;
  height: var(--stackup-layer-height, 18px);
  justify-content: space-between;
  min-height: 15px;
  padding: 1px 6px;
}

.product-stackup-layer span,
.product-stackup-layer strong {
  font-size: 7.5px;
  line-height: 1.2;
}

.product-stackup-layer strong {
  white-space: nowrap;
}

.product-stackup-layer--copper {
  background: linear-gradient(90deg, #da7721, #efa24e);
  border-color: #c96d1e;
  color: #2f1b0c;
}

.product-stackup-layer--plated_copper {
  background: linear-gradient(90deg, #e58a35, #f3ad60);
  border-color: #d47e2d;
  color: #3f260d;
}

.product-stackup-layer--adhesive {
  background: linear-gradient(90deg, #fffaf0, #f7e8c9);
  border-color: #e6d2a8;
  color: #594d3a;
}

.product-stackup-layer--dielectric {
  background: linear-gradient(90deg, #815638, #a77955);
  border-color: #714a31;
  color: #fff;
}

.product-stackup-layer--ink {
  background: linear-gradient(90deg, #215b67, #38808a);
  border-color: #1b505a;
  color: #fff;
}

.product-stackup-layer--shielding {
  background: linear-gradient(90deg, #050607, #20252a);
  border-color: #000;
  color: #fff;
}

.product-stackup-diagram-foot {
  align-items: center;
  border-top: 1px solid #e1e9f2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  padding: 9px 12px;
}

.product-stackup-diagram-foot > span {
  align-items: center;
  color: #667e94;
  display: inline-flex;
  font-size: 8px;
  gap: 4px;
}

.product-stackup-diagram-foot > span::before {
  background: #e8872f;
  border-radius: 2px;
  content: "";
  height: 7px;
  width: 12px;
}

.product-stackup-diagram-foot > span:nth-child(2)::before {
  background: #f7e8c9;
  border: 1px solid #e6d2a8;
}

.product-stackup-diagram-foot > span:nth-child(3)::before {
  background: #9a6844;
}

.product-stackup-diagram-foot > span:nth-child(4)::before {
  background: #266d7a;
}

.product-stackup-diagram-foot > span:nth-child(5)::before {
  background: #111820;
  border: 1px solid #000;
}

.product-engineering-block .table-scroll {
  overflow-x: auto;
}

.product-engineering-table {
  margin: 0;
  min-width: 820px;
  table-layout: fixed;
  width: 100%;
}

.product-engineering-table th {
  background: #f7faff;
  color: #405c78;
  font-size: 10px;
  white-space: nowrap;
}

.product-engineering-table td {
  vertical-align: middle;
}

.product-engineering-table th:first-child,
.product-engineering-table td:first-child {
  text-align: center;
  width: 58px;
}

.product-engineering-table th:last-child,
.product-engineering-table td:last-child {
  text-align: center;
  width: 64px;
}

.product-engineering-table select,
.product-engineering-table input {
  box-sizing: border-box;
  height: 38px;
  min-width: 0;
  width: 100%;
}

.product-stackup-table th:nth-child(2) {
  width: 34%;
}

.product-stackup-table th:first-child,
.product-stackup-table td:first-child {
  width: 88px;
}

.product-stackup-table th:nth-child(3) {
  width: 18%;
}

.product-stackup-table th:nth-child(4) {
  width: 14%;
}

.product-stackup-table th:nth-child(5) {
  width: 145px;
}

.product-stackup-table th:last-child,
.product-stackup-table td:last-child {
  width: 112px;
}

.product-stackup-row {
  transition: opacity .15s ease, background-color .15s ease;
}

.product-stackup-row.is-dragging {
  background: #e9f4ff;
  opacity: .58;
}

.product-stackup-row td:first-child {
  display: table-cell;
  text-align: center;
  white-space: nowrap;
}

.product-stackup-row td:first-child .engineering-sequence {
  display: inline-block;
  vertical-align: middle;
}

.product-reinforcement-table {
  min-width: 650px;
}

.product-reinforcement-table th:nth-child(2) {
  width: 46%;
}

.product-reinforcement-table th:nth-child(3) {
  width: 38%;
}

.product-impedance-table {
  min-width: 1180px;
}

.product-impedance-table th:nth-child(2) {
  width: 130px;
}

.product-impedance-table th:nth-child(3) {
  width: 105px;
}

.product-impedance-table th:nth-child(4) {
  width: 170px;
}

.product-impedance-table th:nth-child(5) {
  width: 230px;
}

.product-impedance-table th:nth-child(6) {
  width: 220px;
}

.engineering-sequence {
  align-items: center;
  background: var(--zg-blue-50);
  border: 1px solid #d5e2f2;
  border-radius: 7px;
  color: var(--zg-blue-700);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  min-width: 26px;
}

.product-engineering-table .engineering-number {
  color: #526a81;
  white-space: nowrap;
}

.product-engineering-table .engineering-number strong {
  color: var(--zg-blue-700);
  font-size: 14px;
}

.product-engineering-table .engineering-number em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  margin-left: 3px;
}

.engineering-input-unit {
  align-items: center;
  display: flex;
  position: relative;
}

.engineering-input-unit input {
  padding-right: 38px;
}

.engineering-input-unit span {
  color: var(--muted);
  font-size: 10px;
  pointer-events: none;
  position: absolute;
  right: 11px;
}

.engineering-locked-note {
  align-items: center;
  background: #fff9ea;
  border-top: 1px solid #f1dfb7;
  color: #8b6926;
  display: flex;
  font-size: 10px;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
}

.product-impedance-editor.is-disabled {
  background: #f5f7fa;
  border-color: #e0e5eb;
}

.product-impedance-editor.is-disabled .product-engineering-head,
.product-impedance-editor.is-disabled .table-scroll {
  opacity: .64;
}

.computed-input {
  background: #f2f5f8 !important;
  color: #40566d !important;
}

.impedance-image-control {
  display: grid;
  gap: 7px;
  grid-template-columns: 72px minmax(0, 1fr);
}

.impedance-image-preview {
  align-items: center;
  background: #f3f6f9;
  border: 1px dashed #cbd7e3;
  border-radius: 7px;
  display: flex;
  height: 54px;
  justify-content: center;
  overflow: hidden;
  width: 72px;
}

.impedance-image-preview a,
.impedance-image-preview img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.impedance-image-preview span {
  color: var(--muted);
  font-size: 9px;
}

.impedance-image-actions {
  align-content: center;
  display: grid;
  gap: 5px;
}

.impedance-image-actions .btn,
.impedance-image-actions button {
  align-items: center;
  background: #fff;
  border: 1px solid #d2dee9;
  border-radius: 6px;
  color: #3f5a73;
  cursor: pointer;
  display: inline-flex;
  font-size: 9px;
  height: 25px;
  justify-content: center;
  margin: 0;
  min-height: 0;
  padding: 0 7px;
  width: 100%;
}

.impedance-image-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.product-note-image-layout {
  display: grid;
  gap: 15px;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
}

.product-note-card,
.product-note-image-layout .product-images-card {
  background: #f8fbff;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  min-width: 0;
  padding: 15px;
}

.product-note-card .field {
  margin: 0;
}

.product-detail-stackup-summary {
  align-items: baseline;
  background: #f3f8ff;
  border: 1px solid #d7e4f3;
  border-radius: 10px;
  display: flex;
  gap: 8px;
  margin-bottom: 11px;
  padding: 11px 13px;
}

.product-detail-stackup-summary span {
  color: var(--muted);
  font-size: 10px;
}

.product-detail-stackup-summary strong {
  color: var(--zg-blue-700);
  font-size: 17px;
}

.product-detail-stackup-summary em {
  color: #5e7289;
  font-size: 10px;
  font-style: normal;
}

.product-detail-stackup-layout {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
  min-width: 0;
}

.product-detail-stackup-layout > .table-scroll {
  min-width: 0;
}

.product-detail-stackup-diagram-card {
  border: 1px solid #dce6f0;
  border-radius: 11px;
  min-height: 260px;
  overflow: hidden;
}

.product-detail-stackup-diagram-card .product-stackup-diagram {
  max-height: 520px;
  min-height: 170px;
}

.product-detail-stackup-diagram-total {
  align-items: baseline;
  border-top: 1px solid #e1e9f2;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 9px 12px;
}

.product-detail-stackup-diagram-total span {
  color: var(--muted);
  font-size: 9px;
}

.product-detail-stackup-diagram-total strong {
  color: var(--zg-blue-700);
  font-size: 11px;
}

.product-detail-engineering-table {
  min-width: 620px;
}

.product-detail-engineering-table th {
  background: #f5f8fc;
  color: #405b75;
  white-space: nowrap;
}

.product-detail-engineering-table td {
  vertical-align: middle;
}

.product-detail-engineering-table td strong,
.product-detail-engineering-table td small {
  display: block;
}

.product-detail-engineering-table td small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.product-detail-impedance-table {
  min-width: 760px;
}

.product-detail-impedance-image {
  align-items: center;
  color: var(--zg-blue-700);
  display: inline-flex;
  font-size: 10px;
  gap: 7px;
}

.product-detail-impedance-image img {
  background: #f4f7fa;
  border: 1px solid #d8e2ec;
  border-radius: 6px;
  height: 42px;
  object-fit: contain;
  width: 58px;
}

@media (max-width: 1180px) {
  .substrate-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .substrate-hero-kpis {
    flex-basis: 300px;
  }

  .substrate-thickness-grid,
  .product-parameter-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-note-image-layout {
    grid-template-columns: 1fr;
  }

  .product-stackup-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-stackup-diagram-card {
    border-left: 0;
    border-top: 1px solid #dce6f0;
    min-height: 260px;
  }

  .product-stackup-diagram {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-stackup-diagram-empty {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .substrate-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .substrate-hero-kpis {
    flex: 0 0 auto;
    width: 100%;
  }

  .substrate-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .substrate-brand-panel {
    position: static;
  }

  .substrate-brand-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }

  .substrate-spec-basic,
  .substrate-thickness-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-engineering-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .product-stackup-diagram {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-detail-stackup-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-engineering-head .btn {
    margin-left: auto;
  }

  .product-engineering-block .table-scroll {
    overflow-x: auto;
  }
}

@media (max-width: 580px) {
  .substrate-hero {
    border-radius: 13px;
    padding: 20px;
  }

  .substrate-hero h2 {
    font-size: 24px;
  }

  .substrate-hero-kpis,
  .substrate-brand-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .substrate-panel-head,
  .substrate-dialog-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .substrate-panel-head .btn,
  .substrate-dialog-foot .btn {
    width: 100%;
  }

  .substrate-dialog-foot > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .substrate-dialog-body {
    padding: 16px;
  }

  .substrate-thickness-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-parameter-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-engineering-head > div:first-child {
    min-width: 0;
    width: calc(100% - 118px);
  }

  .product-engineering-head .btn {
    margin-left: 0;
  }

  .product-stackup-diagram-head {
    align-items: flex-start;
  }

  .product-note-card,
  .product-note-image-layout .product-images-card {
    padding: 12px;
  }
}

/* Temporary stackup calculation utility */
.stackup-calculator-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.stackup-calculator-hero {
  align-items: center;
  background:
    radial-gradient(circle at 92% 10%, rgba(89, 175, 255, .23), transparent 31%),
    linear-gradient(118deg, #0b2d49 0%, #104e7f 58%, #176bb0 100%);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(12, 48, 78, .15);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 112px;
  overflow: hidden;
  padding: 22px 26px;
  position: relative;
}

.stackup-calculator-hero > div:first-child {
  min-width: 0;
}

.stackup-calculator-hero span,
.stackup-calculator-hero h2,
.stackup-calculator-hero p {
  display: block;
  margin: 0;
}

.stackup-calculator-hero > div:first-child > span {
  color: #8ecbff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.stackup-calculator-hero h2 {
  font-size: 24px;
  line-height: 1.2;
  margin-top: 5px;
}

.stackup-calculator-hero p {
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  line-height: 1.6;
  margin-top: 6px;
}

.stackup-calculator-hero-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.stackup-calculator-hero-actions .btn:not(.btn-primary) {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(255, 255, 255, .7);
  color: #164f7e;
}

.stackup-calculator-hero-actions .btn-primary {
  background: #2f8fe3;
  border-color: #6eb8f6;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
}

.stackup-calculator-hero-actions .btn:disabled {
  box-shadow: none;
  opacity: .5;
}

.stackup-calculator-meta,
.stackup-calculator-summary {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(230px, 1.45fr) minmax(180px, .9fr) repeat(3, minmax(125px, .62fr));
  padding: 12px;
}

.stackup-calculator-meta label,
.stackup-calculator-summary label,
.stackup-calculator-meta article,
.stackup-calculator-summary article {
  border: 1px solid #dce6ef;
  border-radius: 9px;
  min-width: 0;
}

.stackup-calculator-meta label,
.stackup-calculator-summary label {
  display: grid;
  gap: 5px;
  padding: 8px 10px;
}

.stackup-calculator-meta label > span,
.stackup-calculator-summary label > span,
.stackup-calculator-meta article > span,
.stackup-calculator-summary article > span {
  color: #667d92;
  font-size: 9px;
  font-weight: 600;
}

.stackup-calculator-meta input,
.stackup-calculator-summary input {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  min-height: 26px;
  padding: 2px 0;
}

.stackup-calculator-meta input:focus,
.stackup-calculator-summary input:focus {
  box-shadow: inset 0 -1px #2784d3;
}

.stackup-calculator-meta article,
.stackup-calculator-summary article {
  align-items: baseline;
  background: linear-gradient(145deg, #f5f9fd, #edf5fc);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 12px;
}

.stackup-calculator-meta article > span,
.stackup-calculator-summary article > span {
  flex-basis: 100%;
}

.stackup-calculator-meta article strong,
.stackup-calculator-summary article strong {
  color: #1766a9;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.stackup-calculator-meta article em,
.stackup-calculator-summary article em {
  color: #6d8091;
  font-size: 9px;
  font-style: normal;
}

.stackup-calculator-editor .product-engineering-head {
  border-bottom: 1px solid #dce6f0;
  border-radius: 13px 13px 0 0;
}

.stackup-calculator-workspace {
  grid-template-columns: minmax(700px, 1fr) minmax(300px, 350px);
}

.stackup-calculator-editor .product-stackup-table-pane,
.stackup-calculator-editor .table-scroll {
  min-width: 0;
  overflow-x: auto;
}

.stackup-calculator-table {
  min-width: 1040px;
}

.stackup-calculator-table th:nth-child(1),
.stackup-calculator-table td:nth-child(1) {
  width: 88px;
}

.stackup-calculator-table th:nth-child(2) {
  width: 270px;
}

.stackup-calculator-table th:nth-child(3) {
  width: 145px;
}

.stackup-calculator-table th:nth-child(4) {
  width: 115px;
}

.stackup-calculator-table th:nth-child(5) {
  width: 105px;
}

.stackup-calculator-table th:nth-child(6),
.stackup-calculator-table th:nth-child(7) {
  width: 106px;
}

.stackup-calculator-table th:last-child,
.stackup-calculator-table td:last-child {
  width: 116px;
}

.stackup-calculator-row {
  transition: opacity .15s ease, background-color .15s ease;
}

.stackup-calculator-row.is-dragging {
  background: #e9f4ff;
  opacity: .58;
}

.stackup-calculator-row td:first-child {
  display: table-cell;
  text-align: center;
  white-space: nowrap;
}

.stackup-sort-handle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #7290aa;
  cursor: grab;
  display: inline-flex;
  margin-right: 5px;
  padding: 3px;
  vertical-align: middle;
}

.stackup-calculator-row td:first-child .engineering-sequence {
  display: inline-block;
  vertical-align: middle;
}

.stackup-sort-handle:active {
  cursor: grabbing;
}

.stackup-row-actions {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.stackup-row-actions .row-action {
  font-size: 14px;
}

.stackup-row-actions .row-action:disabled {
  cursor: default;
  opacity: .3;
}

.stackup-calculator-empty {
  align-items: center;
  color: #71879b;
  display: flex;
  font-size: 10px;
  gap: 8px;
  justify-content: center;
  min-height: 84px;
  padding: 18px;
}

.stackup-calculator-empty[hidden] {
  display: none;
}

.stackup-calculator-preview {
  min-height: 360px;
}

.stackup-calculator-legend > span:nth-child(6)::before {
  background: #f3b966;
  border: 1px solid #dc923b;
}

.stackup-calculator-note {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: 210px minmax(0, 1fr);
  padding: 14px;
}

.stackup-calculator-note > div {
  align-self: center;
}

.stackup-calculator-note strong,
.stackup-calculator-note span {
  display: block;
}

.stackup-calculator-note strong {
  color: #29465f;
  font-size: 12px;
}

.stackup-calculator-note span {
  color: #73899c;
  font-size: 9px;
  line-height: 1.5;
  margin-top: 4px;
}

.stackup-calculator-note textarea {
  min-height: 66px;
  resize: vertical;
}

@media (max-width: 1280px) {
  .stackup-calculator-meta,
  .stackup-calculator-summary {
    grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 1fr) repeat(3, minmax(110px, .62fr));
  }

  .stackup-calculator-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .stackup-calculator-preview {
    border-left: 0;
    border-top: 1px solid #dce6f0;
    min-height: 270px;
  }
}

@media (max-width: 980px) {
  .stackup-calculator-meta,
  .stackup-calculator-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stackup-calculator-meta label,
  .stackup-calculator-summary label {
    grid-column: span 3;
  }

  .stackup-calculator-note {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .stackup-calculator-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 19px;
  }

  .stackup-calculator-hero-actions,
  .stackup-calculator-hero-actions .btn {
    width: 100%;
  }

  .stackup-calculator-hero-actions .btn {
    flex: 1 1 0;
  }

  .stackup-calculator-meta,
  .stackup-calculator-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .stackup-calculator-meta label,
  .stackup-calculator-summary label {
    grid-column: auto;
  }
}

/* Inventory cost control and opening-cost capture */
.opening-stock-cost-note {
  align-items: center;
  background: #f1f7ff;
  border: 1px solid #cfddf1;
  border-radius: 8px;
  color: #295f99;
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  padding: 11px 13px;
}

.opening-stock-cost-note > div {
  display: grid;
  gap: 2px;
}

.opening-stock-cost-note strong {
  color: var(--zg-navy-800);
  font-size: 12px;
}

.opening-stock-cost-note span {
  font-size: 11px;
}

.opening-cost-table {
  overflow-x: auto;
}

.opening-cost-table .opening-stock-row {
  grid-template-columns:
    minmax(210px, 1.25fr)
    72px
    minmax(105px, .62fr)
    minmax(110px, .68fr)
    minmax(118px, .7fr)
    minmax(105px, .62fr)
    minmax(170px, 1fr);
  min-width: 1080px;
}

.opening-cost-table .opening-stock-row.has-opening-stock {
  background: #f9fbff;
}

.opening-cost-table .opening-stock-row.cost-confirmed {
  box-shadow: inset 3px 0 #159371;
}

.opening-cost-table input,
.opening-cost-table select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 38px;
  min-width: 0;
  padding: 0 9px;
  width: 100%;
}

.opening-cost-table output {
  background: #f4f7fb;
  border: 1px solid #dce5f0;
  border-radius: 6px;
  color: var(--zg-navy-800);
  display: flex;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  height: 38px;
  align-items: center;
  padding: 0 10px;
}

.inventory-cost-page {
  display: grid;
  gap: 16px;
}

.inventory-cost-hero {
  align-items: center;
  background:
    radial-gradient(circle at 88% 10%, rgba(25, 189, 216, .22), transparent 28%),
    linear-gradient(124deg, var(--zg-navy-950) 0%, var(--zg-navy-800) 60%, var(--zg-blue-600) 118%);
  border: 1px solid rgba(116, 169, 255, .18);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(11, 45, 73, .16);
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 148px;
  overflow: hidden;
  padding: 25px 28px;
}

.inventory-cost-hero > div:first-child {
  min-width: 0;
}

.inventory-cost-hero > div:first-child > span {
  color: #8dc4ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.inventory-cost-hero h2 {
  font-size: 27px;
  margin: 7px 0 5px;
}

.inventory-cost-hero p {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
  max-width: 720px;
}

.inventory-cost-hero-value {
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  display: grid;
  flex: 0 0 260px;
  gap: 4px;
  padding: 16px 18px;
}

.inventory-cost-hero-value span,
.inventory-cost-hero-value small {
  color: rgba(255,255,255,.68);
  font-size: 10px;
}

.inventory-cost-hero-value strong {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.inventory-cost-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-cost-kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 7px 20px rgba(18,59,104,.05);
  min-height: 100px;
  padding: 16px;
}

.inventory-cost-kpis article.confirmed {
  border-bottom: 3px solid #159371;
}

.inventory-cost-kpis article.partial {
  border-bottom: 3px solid #dc9a31;
}

.inventory-cost-kpis article.pending {
  background: #fffaf1;
  border-color: #ead7af;
}

.inventory-cost-kpis span,
.inventory-cost-kpis small {
  color: var(--muted);
  display: block;
  font-size: 11px;
}

.inventory-cost-kpis strong {
  color: var(--zg-navy-800);
  display: block;
  font-size: 22px;
  margin: 7px 0 4px;
}

.inventory-cost-filter {
  display: grid;
  gap: 10px;
  grid-template-columns:
    minmax(170px, .8fr)
    minmax(150px, .72fr)
    minmax(210px, 1fr)
    110px
    minmax(170px, .85fr)
    max-content;
  padding: 14px 15px;
}

.inventory-cost-filter-copy {
  align-self: center;
  display: grid;
  gap: 3px;
}

.inventory-cost-filter-copy strong {
  color: var(--zg-navy-800);
  font-size: 13px;
}

.inventory-cost-filter-copy span {
  color: var(--muted);
  font-size: 10px;
}

.inventory-cost-filter label {
  display: grid;
  gap: 5px;
}

.inventory-cost-filter label > span {
  color: #526d89;
  font-size: 10px;
  font-weight: 700;
}

.inventory-cost-filter input,
.inventory-cost-filter select,
.inventory-cost-filter .searchable-select-input,
.inventory-cost-filter .btn {
  height: 38px;
}

.inventory-cost-filter-actions {
  align-items: center;
  display: flex;
  gap: 7px;
}

.inventory-cost-result {
  overflow: hidden;
}

.inventory-cost-result-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 61px;
  padding: 12px 16px;
}

.inventory-cost-result-head > div {
  display: grid;
  gap: 3px;
}

.inventory-cost-result-head strong {
  color: var(--zg-navy-800);
  font-size: 14px;
}

.inventory-cost-result-head span {
  color: var(--muted);
  font-size: 11px;
}

.inventory-cost-result-head > span {
  background: var(--zg-blue-50);
  border: 1px solid #c5d7f4;
  border-radius: 999px;
  color: var(--zg-blue-700);
  padding: 4px 9px;
}

.inventory-cost-table {
  min-width: 1260px;
}

.inventory-cost-table th {
  background: #f1f6fc;
  color: #506b89;
  font-size: 11px;
  white-space: nowrap;
}

.inventory-cost-table td {
  vertical-align: middle;
}

.inventory-cost-table tr.is-pending td {
  background: #fffdf8;
}

.inventory-cost-status,
.supply-mode {
  align-items: center;
  border: 1px solid;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  gap: 5px;
  padding: 3px 8px;
  white-space: nowrap;
}

.inventory-cost-status i {
  background: currentColor;
  border-radius: 50%;
  height: 5px;
  width: 5px;
}

.inventory-cost-status.confirmed {
  background: #eaf8f2;
  border-color: #bee5d5;
  color: #08785e;
}

.inventory-cost-status.partial {
  background: #fff8ea;
  border-color: #ead6aa;
  color: #92651b;
}

.inventory-cost-status.pending {
  background: #fff2f2;
  border-color: #efc9c9;
  color: #bd4444;
}

.inventory-cost-basis {
  display: grid;
  gap: 2px;
}

.inventory-cost-basis strong {
  color: #355a7d;
  font-size: 11px;
}

.inventory-cost-basis span {
  color: var(--muted);
  font-size: 9px;
}

.inventory-cost-dialog {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(8,33,58,.25);
  max-height: calc(100vh - 40px);
  overflow: auto;
  width: min(760px, calc(100vw - 28px));
}

.inventory-cost-dialog .dialog-head {
  align-items: center;
  background: #f3f7fc;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 76px;
  padding: 16px 20px;
}

.inventory-cost-dialog .dialog-head > div {
  display: grid;
  gap: 3px;
}

.inventory-cost-dialog .dialog-head strong {
  color: var(--zg-navy-800);
  font-size: 18px;
}

.inventory-cost-dialog .dialog-head span {
  color: var(--muted);
  font-size: 11px;
}

.inventory-cost-dialog .dialog-body {
  padding: 20px;
}

.inventory-cost-dialog-summary {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.inventory-cost-dialog-summary > div {
  background: #f8faff;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 11px;
}

.inventory-cost-dialog-summary span,
.inventory-cost-dialog-summary small {
  color: var(--muted);
  font-size: 9px;
}

.inventory-cost-dialog-summary strong {
  color: var(--zg-navy-800);
  font-size: 12px;
}

.inventory-cost-dialog-note {
  align-items: center;
  background: #eef5ff;
  border: 1px solid #cfdef2;
  border-radius: 7px;
  color: #376b9f;
  display: flex;
  font-size: 11px;
  gap: 9px;
  line-height: 1.55;
  margin-bottom: 15px;
  padding: 10px 12px;
}

.inventory-cost-dialog .dialog-actions {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 15px;
}

.supply-mode.inventory {
  background: #eef7ff;
  border-color: #c6ddf5;
  color: #236da8;
}

.supply-mode.purchase {
  background: #eef4ff;
  border-color: #c7d8f5;
  color: #3b61a5;
}

.supply-mode.mixed {
  background: #fff7e8;
  border-color: #ead4a5;
  color: #8d621a;
}

.supply-mode.pending {
  background: #f4f6f8;
  border-color: #d9e0e5;
  color: #667682;
}

.procurement-chain-hero {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cost-breakdown-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.cost-breakdown-grid article {
  background: #f8faff;
  border: 1px solid #dbe6f2;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.cost-breakdown-grid article > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.cost-breakdown-grid strong {
  color: var(--zg-navy-800);
  font-size: 12px;
}

.cost-breakdown-grid span,
.cost-breakdown-grid p {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
}

.cost-breakdown-grid b {
  color: var(--zg-blue-700);
  font-size: 12px;
}

.analysis-date-range {
  display: grid;
  gap: 5px;
}

.analysis-date-range > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.analysis-profit-table .cell-sub {
  display: block;
  margin-top: 4px;
  max-width: 220px;
}

@media (min-width: 1281px) {
  .analysis-filter-order_profit_analysis.compact-filter-bar {
    grid-template-columns:
      minmax(208px, 1.25fr)
      minmax(138px, .82fr)
      minmax(118px, .68fr)
      96px
      96px
      minmax(112px, .7fr)
      94px
      minmax(126px, .75fr)
      max-content;
  }
}

@media (max-width: 1280px) {
  .inventory-cost-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .inventory-cost-filter-copy {
    grid-column: 1 / -1;
  }

  .analysis-filter-order_profit_analysis .analysis-date-range {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .inventory-cost-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .inventory-cost-hero-value {
    flex-basis: auto;
  }

  .inventory-cost-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-cost-dialog-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .inventory-cost-filter,
  .inventory-cost-kpis,
  .inventory-cost-dialog-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-cost-filter-copy,
  .analysis-filter-order_profit_analysis .analysis-date-range {
    grid-column: auto;
  }

  .inventory-cost-filter-actions,
  .inventory-cost-filter-actions .btn {
    width: 100%;
  }

  .inventory-cost-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .procurement-chain-hero {
    grid-template-columns: 1fr;
  }
}

/* Fixed multi-page workspace tabs */
.workspace-tabs-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 4px 10px 0;
  border-bottom: 1px solid #dbe6f3;
  background: rgba(244, 248, 253, .96);
  box-shadow: 0 5px 16px rgba(20, 58, 105, .035);
  backdrop-filter: blur(14px);
}

.workspace-mobile-menu {
  display: none;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin-bottom: 6px;
  align-self: center;
}

.workspace-tab-list {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #bfd0e4 transparent;
}

.workspace-tab-list::-webkit-scrollbar { height: 3px; }
.workspace-tab-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #bfd0e4;
}

.workspace-tab {
  height: 31px;
  min-width: 116px;
  max-width: 230px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d8e3f0;
  border-bottom-color: #cbd9e9;
  border-radius: 9px 9px 0 0;
  background: #edf3fa;
  color: #647a94;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.workspace-tab:hover {
  border-color: #bacee5;
  background: #f8fbff;
  color: #294c73;
}

.workspace-tab.active {
  border-color: #b8cce5;
  border-bottom-color: #fff;
  background: #fff;
  color: #123f73;
  box-shadow: 0 -2px 0 #1671df inset, 0 5px 12px rgba(27, 77, 139, .06);
}

.workspace-tab.pinned {
  min-width: 126px;
  background: linear-gradient(180deg, #edf5ff, #e9f1fb);
}

.workspace-tab.pinned.active { background: #fff; }

.workspace-tab-main {
  min-width: 0;
  height: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 7px 0 10px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.workspace-tab-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  display: grid;
  place-items: center;
  color: #5b7898;
}

.workspace-tab-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-tab.active .workspace-tab-icon { color: #146bd4; }

.workspace-tab-title {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  font-weight: 650;
}

.workspace-tab-dirty {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #e69a2d;
  box-shadow: 0 0 0 3px rgba(230, 154, 45, .12);
}

.workspace-tab-close {
  width: 27px;
  height: 100%;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: #8ba0b6;
  cursor: pointer;
}

.workspace-tab-close:hover,
.workspace-tab-close[aria-expanded="true"] {
  background: #e5edf7;
  color: #244f7e;
}

.workspace-tab-close:focus-visible {
  outline: 2px solid rgba(22, 113, 223, .42);
  outline-offset: -3px;
}

.workspace-tab-close svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.workspace-tab-close-popover {
  position: fixed;
  z-index: 70;
  width: 112px;
  display: grid;
  gap: 1px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(190, 210, 230, .88);
  border-radius: 8px;
  color: #243e57;
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 12px 30px rgba(4, 22, 40, .22);
  transform-origin: top right;
  animation: workspace-tab-close-menu-in .15s ease-out both;
}

.workspace-tab-close-popover[hidden] { display: none; }

.workspace-tab-close-popover button {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #284960;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.workspace-tab-close-popover button::before {
  content: "";
  width: 2px;
  height: 11px;
  flex: 0 0 2px;
  border-radius: 999px;
  background: #78a9dc;
}

.workspace-tab-close-popover button[data-workspace-close-action="others"]::before {
  background: #d9a54e;
}

.workspace-tab-close-popover button[data-workspace-close-action="all"]::before {
  background: #d97878;
}

.workspace-tab-close-popover button:hover:not(:disabled),
.workspace-tab-close-popover button:focus-visible {
  outline: 0;
  background: #f2f7fb;
  color: #1766ae;
}

.workspace-tab-close-popover button[data-workspace-close-action="all"]:hover:not(:disabled),
.workspace-tab-close-popover button[data-workspace-close-action="all"]:focus-visible {
  background: #fdebed;
  color: #c24450;
}

.workspace-tab-close-popover button:disabled {
  cursor: default;
  opacity: .35;
}

@keyframes workspace-tab-close-menu-in {
  from { opacity: 0; transform: translateY(-3px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.workspace-tab-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 1px;
  padding: 0 1px 4px 7px;
  border-left: 1px solid #d5e1ef;
}

.workspace-tab-tools .icon-button {
  width: 27px;
  height: 27px;
  border-color: #d6e2ef;
  border-radius: 7px;
  color: #58718e;
  background: rgba(255, 255, 255, .76);
}

.workspace-tab-tools .icon-button:hover:not(:disabled) {
  border-color: #bcd0e6;
  color: #1763b5;
  background: #fff;
}

.workspace-tab-tools .icon-button:disabled {
  cursor: default;
  opacity: .42;
}

@media (max-width: 880px) {
  .workspace-tabs-bar { height: 46px; padding: 6px 10px 0; }
  .workspace-mobile-menu { display: grid; }
  .workspace-tab { height: 37px; min-width: 108px; max-width: 190px; }
  .workspace-tab.pinned { min-width: 116px; }
  .workspace-tab-tools { gap: 2px; padding: 0 1px 6px 6px; }
  .workspace-tab-tools .icon-button { width: 30px; height: 30px; }
}

@media (max-width: 650px) {
  .workspace-tabs-bar { height: 42px; padding-left: 7px; padding-right: 7px; }
  .workspace-tab { height: 35px; min-width: 102px; max-width: 165px; }
  .workspace-tab.pinned { min-width: 108px; }
  .workspace-tab-main { padding-left: 8px; }
  .workspace-mobile-menu,
  .workspace-tab-tools .icon-button { width: 27px; height: 27px; }
  .workspace-mobile-menu { flex-basis: 27px; }
  .workspace-tab-tools { padding-bottom: 5px; }
}

@media print {
  .workspace-tabs-bar,
  .workspace-tab-close-popover { display: none !important; }
}

@media (hover: none), (pointer: coarse) {
  .workspace-tab-close { width: 34px; flex-basis: 34px; }
  .workspace-tab-close-popover button { min-height: 42px; font-size: 12px; }
}

/* Administrator daily operations, product catalog, inventory and print field editor */
.today-business-page,
.product-list-page,
.inventory-page {
  --workspace-green-950: #0a302d;
  --workspace-green-900: #103f39;
  --workspace-green-800: #15584d;
  --workspace-green-700: #1d725f;
  --workspace-green-100: #eaf5f1;
  --workspace-green-50: #f6faf8;
  --workspace-gold-700: #9a6927;
  --workspace-gold-500: #c4964c;
  --workspace-gold-100: #f8edd9;
  --workspace-blue-700: #386e7f;
  --workspace-blue-100: #eaf3f6;
  --workspace-red-700: #a4444a;
  --workspace-red-100: #fff0f0;
  --workspace-ink: #1d3530;
  --workspace-muted: #667c76;
  --workspace-line: #d9e5e1;
  --workspace-soft-line: #e9efed;
  color: var(--workspace-ink);
  display: grid;
  gap: 14px;
  min-width: 0;
}

.today-business-page *,
.product-list-page *,
.inventory-page * {
  box-sizing: border-box;
}

/* Today's administrator operations dashboard */
.today-business-hero {
  align-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(222, 177, 97, .22), transparent 29%),
    linear-gradient(122deg, var(--workspace-green-950), var(--workspace-green-800) 72%, #7b592e 138%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 13px 32px rgba(17, 65, 57, .13);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 142px;
  overflow: hidden;
  padding: 17px 21px;
  position: relative;
}

.today-business-hero::after {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
  height: 210px;
  pointer-events: none;
  position: absolute;
  right: -72px;
  top: -132px;
  width: 210px;
}

.today-business-hero > * {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.today-business-hero > div:first-child {
  max-width: 850px;
}

.today-business-hero > div:first-child > span {
  color: #e8c98f;
  display: block;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .16em;
}

.today-business-hero h2 {
  color: #fff;
  font-size: clamp(22px, 1.8vw, 27px);
  margin: 5px 0 6px;
}

.today-business-hero p {
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
}

.today-business-hero .btn {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
}

.today-business-hero .btn:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
}

.today-business-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.today-business-kpis article {
  background: #fff;
  border: 1px solid var(--workspace-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(20, 65, 57, .045);
  min-height: 112px;
  overflow: hidden;
  padding: 13px 15px;
  position: relative;
}

.today-business-kpis article::before {
  background: linear-gradient(90deg, var(--workspace-green-700), #71b29f);
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.today-business-kpis article:nth-child(2)::before,
.today-business-kpis article.income::before {
  background: linear-gradient(90deg, #35748a, #72a8b6);
}

.today-business-kpis article:nth-child(3)::before,
.today-business-kpis article.expense::before {
  background: linear-gradient(90deg, #aa7429, #d0a05b);
}

.today-business-kpis article:nth-child(4)::before,
.today-business-kpis article.warning::before {
  background: linear-gradient(90deg, #94505a, #c47b83);
}

.today-business-kpis span,
.today-business-kpis small {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
}

.today-business-kpi-value > strong {
  color: #1d4e43;
  display: block;
  font-size: clamp(19px, 1.5vw, 23px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin: 5px 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  min-width: 0;
}

.today-business-panel {
  background: #fff;
  border: 1px solid var(--workspace-line);
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(19, 62, 55, .045);
  min-width: 0;
  overflow: hidden;
}

.today-business-panel > header,
.today-business-panel .today-business-panel-head,
.today-business-panel > .panel-head {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--workspace-soft-line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
}

.today-business-panel > header strong,
.today-business-panel .today-business-panel-head strong,
.today-business-panel > .panel-head strong {
  color: #244c43;
  display: block;
  font-size: 14px;
}

.today-business-panel > header span,
.today-business-panel .today-business-panel-head span,
.today-business-panel > .panel-head span {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.today-business-panel .panel-body {
  padding: 15px 16px;
}

.today-business-status {
  background: #fbfdfc;
  border: 1px solid #d9e6e1;
  border-radius: 10px;
  color: #294a42;
  display: block;
  font-size: 12px;
  min-width: 0;
  padding: 11px 12px 12px;
}

.today-business-status.warning,
.today-business-status.pending {
  background: #fff8e9;
  border-color: #ead7ac;
  color: #8d641b;
}

.today-business-status.danger,
.today-business-status.overdue {
  background: var(--workspace-red-100);
  border-color: #ebc7ca;
  color: var(--workspace-red-700);
}

.today-business-status.info,
.today-business-status.progress {
  background: var(--workspace-blue-100);
  border-color: #cadde4;
  color: var(--workspace-blue-700);
}

.today-business-activity-list {
  display: grid;
  min-width: 0;
}

.today-business-activity-item {
  align-items: center;
  border-bottom: 1px solid var(--workspace-soft-line);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 9px 16px;
}

.today-business-activity-item:last-child {
  border-bottom: 0;
}

.today-business-activity-icon,
.today-business-activity-dot {
  align-items: center;
  background: var(--workspace-green-100);
  border-radius: 8px;
  color: var(--workspace-green-700);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.today-business-activity-copy {
  min-width: 0;
}

.today-business-activity-copy strong,
.today-business-activity-copy span,
.today-business-activity-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-activity-copy strong {
  color: #294a42;
  font-size: 12px;
}

.today-business-activity-copy span,
.today-business-activity-copy small,
.today-business-activity-meta {
  color: var(--workspace-muted);
  font-size: 12px;
}

.today-business-activity-amount {
  color: #196b59;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  white-space: nowrap;
}

.today-business-activity-amount.expense,
.today-business-activity-amount.negative {
  color: #a26720;
}

.today-business-panel .table-scroll {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

.today-business-panel table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
}

.today-business-panel th {
  background: #eef5f2;
  color: #3c5d55;
  font-size: 12px;
  height: 42px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.today-business-panel td {
  border-top-color: var(--workspace-soft-line);
  color: #3b504a;
  font-size: 12px;
  height: 49px;
}

.today-business-panel tbody tr:hover td {
  background: #f2f8f5;
}

.today-business-hero-copy {
  flex: 1 1 430px;
  max-width: 690px;
  min-width: 280px;
}

.today-business-basis {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  color: rgba(255, 255, 255, .72);
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  line-height: 1.45;
  margin-top: 10px;
  max-width: 100%;
  padding: 6px 8px;
}

.today-business-basis svg {
  flex: 0 0 auto;
}

.today-business-date {
  align-items: center;
  border-left: 1px solid rgba(255, 255, 255, .13);
  border-right: 1px solid rgba(255, 255, 255, .13);
  display: grid;
  flex: 0 0 126px;
  justify-items: center;
  min-width: 126px;
  padding: 3px 16px;
}

.today-business-date span,
.today-business-date em,
.today-business-date small {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.today-business-date strong {
  color: #efd099;
  font-size: 30px;
  line-height: 1.12;
}

.today-business-date small {
  font-size: 12px;
  margin-top: 3px;
  white-space: nowrap;
}

.today-business-cash-pulse {
  display: grid;
  flex: 0 0 min(330px, 29%);
  gap: 5px;
  min-width: 255px;
}

.today-business-cash-pulse > div {
  align-items: center;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 32px;
  padding: 5px 9px;
}

.today-business-cash-pulse span {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
}

.today-business-cash-pulse strong {
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-cash-pulse .positive strong {
  color: #aee9d3;
}

.today-business-cash-pulse .negative strong {
  color: #f1c598;
}

.today-business-kpi {
  display: grid;
  gap: 8px;
}

.today-business-kpi-head {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.today-business-kpi-head > span {
  align-items: center;
  background: var(--workspace-green-100);
  border-radius: 7px;
  color: var(--workspace-green-700);
  display: inline-flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
}

.today-business-kpi.purchase .today-business-kpi-head > span {
  background: var(--workspace-blue-100);
  color: var(--workspace-blue-700);
}

.today-business-kpi.shipment .today-business-kpi-head > span {
  background: var(--workspace-gold-100);
  color: var(--workspace-gold-700);
}

.today-business-kpi.inbound .today-business-kpi-head > span {
  background: #f0ebf4;
  color: #755c83;
}

.today-business-kpi-head > strong {
  color: #4c655f;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-kpi-value {
  align-items: baseline;
  display: flex;
  gap: 6px;
}

.today-business-kpi-value > span {
  font-size: 12px;
}

.today-business-kpi-foot {
  align-items: center;
  border-top: 1px dashed #dce7e3;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding-top: 7px;
}

.today-business-kpi-foot span,
.today-business-kpi-foot b {
  font-size: 12px;
}

.today-business-kpi-foot b {
  color: #2e5d52;
  font-variant-numeric: tabular-nums;
  max-width: 66%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-panel-head > em {
  background: var(--workspace-green-100);
  border: 1px solid #cde2da;
  border-radius: 99px;
  color: var(--workspace-green-700);
  flex: 0 0 auto;
  font-size: 12px;
  font-style: normal;
  font-weight: 730;
  padding: 4px 8px;
}

.today-business-cash-summary {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 15px 11px;
}

.today-business-cash-summary article {
  background: #f7fbf9;
  border: 1px solid #dce9e4;
  border-radius: 9px;
  min-width: 0;
  padding: 11px 12px;
}

.today-business-cash-summary article.out {
  background: #fffaf2;
  border-color: #ecdfc7;
}

.today-business-cash-summary article.negative {
  background: #fff5f5;
  border-color: #edcfd1;
}

.today-business-cash-summary span,
.today-business-cash-summary small {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
}

.today-business-cash-summary strong {
  color: #1d6755;
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin: 5px 0 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-cash-summary .out strong {
  color: #9a6927;
}

.today-business-cash-summary .negative strong {
  color: var(--workspace-red-700);
}

.today-business-currency-list {
  border-top: 1px solid var(--workspace-soft-line);
  display: grid;
  padding: 0 15px 10px;
}

.today-business-currency-list > div:not(.today-business-compact-empty) {
  align-items: center;
  border-bottom: 1px dashed #dfe8e5;
  display: grid;
  gap: 8px;
  grid-template-columns: 54px repeat(2, minmax(110px, 1fr)) minmax(110px, auto);
  min-height: 42px;
}

.today-business-currency-list > div:last-child {
  border-bottom: 0;
}

.today-business-currency-list strong,
.today-business-currency-list span,
.today-business-currency-list em {
  font-size: 12px;
}

.today-business-currency-list strong {
  color: #2d564c;
}

.today-business-currency-list span {
  color: var(--workspace-muted);
}

.today-business-currency-list em {
  color: #1d6655;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 740;
  text-align: right;
}

.today-business-balance-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 15px 11px;
}

.today-business-balance-cards article {
  background: #f6fbf9;
  border: 1px solid #d7e7e1;
  border-radius: 9px;
  min-width: 0;
  padding: 12px;
}

.today-business-balance-cards article.payable {
  background: #fffaf3;
  border-color: #eddfc4;
}

.today-business-balance-cards span,
.today-business-balance-cards small,
.today-business-balance-net span,
.today-business-balance-net small {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
}

.today-business-balance-cards strong {
  color: #1d6755;
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-balance-cards .payable strong {
  color: #9a6927;
}

.today-business-balance-net {
  border-top: 1px solid var(--workspace-soft-line);
  padding: 11px 15px 14px;
}

.today-business-balance-net strong {
  color: #1d6755;
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  margin: 3px 0;
}

.today-business-balance-net strong.negative {
  color: var(--workspace-red-700);
}

.today-business-status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px 15px;
}

.today-business-status.sales {
  border-top: 3px solid var(--workspace-green-700);
}

.today-business-status.purchase {
  border-top: 3px solid var(--workspace-blue-700);
}

.today-business-status-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 9px;
}

.today-business-status-head strong,
.today-business-status-head span {
  font-size: 12px;
}

.today-business-status-head strong {
  color: #294b43;
}

.today-business-status-head span {
  color: var(--workspace-muted);
}

.today-business-status-list {
  display: grid;
  gap: 7px;
}

.today-business-status-row {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(72px, .8fr) minmax(70px, 1fr) 28px minmax(96px, auto);
  min-width: 0;
}

.today-business-status-row > span,
.today-business-status-row > strong,
.today-business-status-row > em {
  font-size: 12px;
  min-width: 0;
}

.today-business-status-row > span {
  color: #536b65;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-business-status-row > div {
  background: #e5eeeb;
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.today-business-status-row > div i {
  background: linear-gradient(90deg, var(--workspace-green-700), #77b49f);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.today-business-status.purchase .today-business-status-row > div i {
  background: linear-gradient(90deg, var(--workspace-blue-700), #78aab7);
}

.today-business-status-row > strong {
  color: #35594f;
  text-align: right;
}

.today-business-status-row > em {
  color: #47635c;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.today-business-category-list {
  display: grid;
  gap: 8px;
  padding: 14px 15px;
}

.today-business-category {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(90px, .8fr) minmax(90px, 1fr) 48px minmax(115px, auto);
  min-height: 27px;
}

.today-business-category > span,
.today-business-category > strong,
.today-business-category > em {
  font-size: 12px;
}

.today-business-category > span {
  color: #536b65;
}

.today-business-category > div {
  background: #e5eeeb;
  border-radius: 99px;
  height: 7px;
  overflow: hidden;
}

.today-business-category > div i {
  background: linear-gradient(90deg, var(--workspace-green-700), #72b29e);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.today-business-category.out > div i {
  background: linear-gradient(90deg, #aa7429, #d0a05b);
}

.today-business-category > strong {
  color: #49625c;
  text-align: right;
}

.today-business-category > em {
  color: #1c6755;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 730;
  text-align: right;
  white-space: nowrap;
}

.today-business-category.out > em {
  color: #9a6927;
}

.today-business-compact-empty {
  color: var(--workspace-muted);
  font-size: 12px;
  min-height: 70px;
  padding: 23px 12px;
  text-align: center;
}

.today-business-activities .table-scroll {
  max-height: 430px;
}

.today-business-activity-table {
  min-width: 1180px !important;
}

.today-business-activity-time,
.today-business-activity-party {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.today-business-activity-time strong,
.today-business-activity-party strong {
  color: #304e47;
  font-size: 12px;
}

.today-business-activity-time span,
.today-business-activity-party span {
  color: var(--workspace-muted);
  font-size: 12px;
}

.today-business-direction {
  align-items: center;
  background: #f1f4f3;
  border: 1px solid #dde5e2;
  border-radius: 99px;
  color: #647570;
  display: inline-flex;
  font-size: 12px;
  font-weight: 720;
  justify-content: center;
  min-width: 46px;
  padding: 4px 7px;
}

.today-business-direction.in {
  background: var(--workspace-green-100);
  border-color: #c9e0d7;
  color: #176b58;
}

.today-business-direction.out {
  background: #fff8e9;
  border-color: #ead7ac;
  color: #8d641b;
}

.today-business-page .code-cell,
.today-business-page .money-cell,
.today-business-page .money-cell strong {
  color: #235e52;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.today-business-page .status {
  border: 1px solid #c9e0d7;
  font-size: 12px;
}

.today-business-error {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 260px;
  padding: 28px;
  text-align: center;
}

.today-business-error .empty-icon {
  align-items: center;
  background: var(--workspace-green-100);
  border-radius: 10px;
  color: var(--workspace-green-700);
  display: inline-flex;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.today-business-error strong {
  color: #2e5148;
  font-size: 15px;
  margin-top: 10px;
}

.today-business-error p {
  color: var(--workspace-muted);
  font-size: 12px;
  margin: 4px 0 13px;
}

/* Product master list */
.product-list-hero {
  align-items: center;
  background:
    radial-gradient(circle at 91% 8%, rgba(214, 170, 91, .22), transparent 27%),
    linear-gradient(122deg, var(--workspace-green-950), var(--workspace-green-800) 72%, #805e31 138%);
  border-radius: 16px;
  box-shadow: 0 13px 32px rgba(17, 65, 57, .13);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 110px;
  overflow: hidden;
  padding: 18px 24px;
}

.product-list-hero > div {
  min-width: 0;
}

.product-list-hero > div:first-child > span {
  color: #e8c98f;
  display: block;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .16em;
}

.product-list-hero h2 {
  color: #fff;
  font-size: clamp(22px, 1.8vw, 27px);
  margin: 5px 0 6px;
}

.product-list-hero p {
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
}

.product-list-hero .btn {
  background: #fff;
  border-color: #fff;
  color: var(--workspace-green-800);
}

.product-list-hero-side,
.inventory-hero-side {
  align-items: center;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 10px;
  display: grid;
  flex: 0 0 190px;
  justify-items: end;
  min-width: 190px;
  padding: 11px 12px;
}

.product-list-hero-side > span,
.product-list-hero-side > small,
.inventory-hero-side > span,
.inventory-hero-side > small {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
}

.product-list-hero-side > strong,
.inventory-hero-side > strong {
  color: #efd099;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.product-list-hero-side .btn,
.inventory-hero-side .btn {
  justify-self: stretch;
  margin-top: 8px;
  width: 100%;
}

.product-list-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.product-list-kpis article {
  background: #fff;
  border: 1px solid var(--workspace-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(20, 65, 57, .045);
  min-height: 82px;
  padding: 13px 15px;
  position: relative;
}

.product-list-kpis article::before {
  background: linear-gradient(90deg, var(--workspace-green-700), #76b6a4);
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.product-list-kpis article:nth-child(2)::before {
  background: linear-gradient(90deg, var(--workspace-blue-700), #75a8b5);
}

.product-list-kpis article:nth-child(3)::before {
  background: linear-gradient(90deg, var(--workspace-gold-700), #d1a25d);
}

.product-list-kpis article:nth-child(4)::before {
  background: linear-gradient(90deg, #775d83, #a88bad);
}

.product-list-kpis span,
.product-list-kpis small {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
}

.product-list-kpis strong {
  color: #1e4c43;
  display: block;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  margin: 5px 0 2px;
}

.product-list-filter {
  align-items: end;
  background: #fff;
  border: 1px solid var(--workspace-line);
  border-radius: 13px;
  box-shadow: 0 7px 19px rgba(20, 65, 57, .04);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(300px, 1fr) repeat(3, max-content);
  min-width: 0;
  padding: 14px 15px;
  position: relative;
  z-index: 10;
}

.product-list-filter > div:first-child,
.inventory-filter-copy {
  min-width: 0;
}

.product-list-filter > div:first-child > strong,
.inventory-filter-copy > strong {
  color: #294d44;
  display: block;
  font-size: 14px;
}

.product-list-filter > div:first-child > span,
.inventory-filter-copy > span {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}

.product-list-filter label {
  display: grid;
  grid-template-rows: auto 40px;
  min-width: 0;
}

.product-list-filter label > span {
  color: #4e6962;
  display: block;
  font-size: 12px;
  font-weight: 720;
  margin-bottom: 5px;
}

.product-list-filter .search-box {
  min-width: 0;
  width: 100%;
}

.product-list-filter input,
.product-list-filter select,
.product-list-filter .searchable-select-input,
.product-list-filter .search-box input {
  background: #fbfdfc;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  color: var(--workspace-ink);
  font-size: 12px;
  height: 40px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.product-list-filter input:focus,
.product-list-filter select:focus,
.product-list-filter .searchable-select-input:focus {
  background: #fff;
  border-color: var(--workspace-green-700);
  box-shadow: 0 0 0 3px rgba(29, 114, 95, .11);
}

.product-list-filter .searchable-select {
  min-width: 0;
  width: 100%;
}

.product-list-page .table-panel {
  border-color: var(--workspace-line);
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(19, 62, 55, .045);
}

.product-list-result-head {
  align-items: flex-end;
  background: #fff;
  border-bottom: 1px solid var(--workspace-soft-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 60px;
  padding: 12px 16px;
}

.product-list-result-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-list-result-head strong {
  color: #244c43;
  font-size: 14px;
}

.product-list-result-head span {
  color: var(--workspace-muted);
  font-size: 12px;
}

.product-list-result-head > span {
  background: var(--workspace-green-100);
  border: 1px solid #cce2da;
  border-radius: 99px;
  color: var(--workspace-green-700);
  flex: 0 0 auto;
  font-weight: 740;
  padding: 4px 8px;
}

.product-list-page .table-scroll {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

table.product-list-table,
.product-list-table table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1410px;
  table-layout: auto;
  width: 100%;
}

/* Saved column widths must not leave a blank strip on wide product screens. */
table.product-list-table.resizable-list-table {
  width: 100% !important;
}

table.product-list-table th,
table.product-list-table td,
.product-list-table table th,
.product-list-table table td {
  font-size: 12px;
  padding: 8px 11px;
}

table.product-list-table th,
.product-list-table table th {
  background: #eef5f2;
  border-bottom: 1px solid #cfddd8;
  color: #3c5c55;
  height: 43px;
  position: sticky;
  top: 0;
  z-index: 3;
}

table.product-list-table td,
.product-list-table table td {
  background: #fff;
  border-top-color: var(--workspace-soft-line);
  color: #3c504a;
  height: 54px;
  vertical-align: middle;
}

table.product-list-table th:nth-child(1) { width: 138px; }
table.product-list-table th:nth-child(2) { width: 230px; }
table.product-list-table th:nth-child(3) { width: 250px; }
table.product-list-table th:nth-child(4) { width: 86px; }
table.product-list-table th:nth-child(5) { width: 138px; }
table.product-list-table th:nth-child(6) { width: 155px; }
table.product-list-table th:nth-child(7),
table.product-list-table th:nth-child(8) { width: 120px; }
table.product-list-table th:nth-child(9) { width: 116px; }

table.product-list-table tbody tr:hover td,
.product-list-table table tbody tr:hover td {
  background: #f2f8f5;
}

table.product-list-table th:first-child,
table.product-list-table td:first-child,
.product-list-table table th:first-child,
.product-list-table table td:first-child {
  left: 0;
  min-width: 128px;
  position: sticky;
}

table.product-list-table th:first-child,
.product-list-table table th:first-child {
  background: #e8f2ef;
  box-shadow: 1px 0 #d2dfdb;
  z-index: 5;
}

table.product-list-table td:first-child,
.product-list-table table td:first-child {
  box-shadow: 1px 0 #e1eae7;
  z-index: 2;
}

table.product-list-table .sticky-actions,
.product-list-table table .sticky-actions {
  box-shadow: -5px 0 10px rgba(24, 63, 56, .06);
  min-width: 116px;
  position: sticky;
  right: 0;
}

table.product-list-table th.sticky-actions,
.product-list-table table th.sticky-actions {
  background: #e8f2ef;
  text-align: center;
  z-index: 5;
}

table.product-list-table td.sticky-actions,
.product-list-table table td.sticky-actions {
  background: #fff;
  z-index: 2;
}

table.product-list-table tbody tr:hover td.sticky-actions,
.product-list-table table tbody tr:hover td.sticky-actions {
  background: #f2f8f5;
}

.product-list-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.product-list-name strong,
.product-list-name span {
  display: block;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-list-name strong {
  color: #294b43;
  font-size: 12px;
}

.product-list-name span {
  color: var(--workspace-muted);
  font-size: 12px;
}

.product-list-page .code-cell,
.product-list-page .code-cell strong {
  color: #215f52;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.product-material-codes {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 260px;
  min-width: 120px;
}

.product-material-codes > span,
.product-material-codes > a,
.product-material-codes > em {
  background: var(--workspace-green-50);
  border: 1px solid #d3e4de;
  border-radius: 5px;
  color: #3b675d;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  max-width: 150px;
  overflow: hidden;
  padding: 3px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-material-codes.empty,
.inventory-material-codes.empty {
  color: #98a7a2;
  display: inline-block;
  font-size: 12px;
}

.product-list-page .row-actions {
  flex-wrap: nowrap;
  justify-content: center;
}

.product-list-page .row-action {
  background: #fff;
  border: 1px solid #dbe6e2;
  color: #55736b;
}

.product-list-page .row-action:hover {
  background: var(--workspace-green-100);
  border-color: #b9d4ca;
  color: var(--workspace-green-700);
}

.product-list-page .table-attachment,
.product-list-page .table-link {
  color: var(--workspace-green-700);
  font-size: 12px;
}

.product-list-page .table-foot {
  background: #fafcfb;
  border-top-color: var(--workspace-soft-line);
  color: var(--workspace-muted);
  font-size: 12px;
}

.product-list-footer {
  flex-wrap: wrap;
  gap: 8px 14px;
}

.product-list-footer-stats,
.product-list-footer-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.product-list-footer-stats span + span::before {
  color: var(--workspace-line);
  content: "·";
  margin-right: 12px;
}

.product-list-footer-actions {
  margin-left: auto;
}

.product-list-footer-actions .btn {
  min-height: 31px;
  white-space: nowrap;
}

/* Inventory inquiry workspace */
.inventory-hero {
  align-items: center;
  background:
    radial-gradient(circle at 90% 10%, rgba(219, 176, 97, .21), transparent 28%),
    linear-gradient(122deg, var(--workspace-green-950), var(--workspace-green-800) 72%, #7d5c31 138%);
  border-radius: 16px;
  box-shadow: 0 13px 32px rgba(17, 65, 57, .13);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 108px;
  overflow: hidden;
  padding: 18px 24px;
}

.inventory-hero > div {
  min-width: 0;
}

.inventory-hero > div:first-child > span {
  color: #e8c98f;
  display: block;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .16em;
}

.inventory-hero h2 {
  color: #fff;
  font-size: clamp(22px, 1.8vw, 27px);
  margin: 5px 0 6px;
}

.inventory-hero p {
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  line-height: 1.65;
  margin: 0;
}

.inventory-hero .btn {
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .26);
  color: #fff;
}

.inventory-hero .btn:hover {
  background: rgba(255, 255, 255, .17);
}

.inventory-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inventory-kpis article {
  background: #fff;
  border: 1px solid var(--workspace-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(20, 65, 57, .045);
  min-height: 82px;
  padding: 13px 15px;
  position: relative;
}

.inventory-kpis article::before {
  background: linear-gradient(90deg, var(--workspace-green-700), #75b7a4);
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.inventory-kpis article:nth-child(2)::before {
  background: linear-gradient(90deg, var(--workspace-blue-700), #72a8b7);
}

.inventory-kpis article:nth-child(3)::before {
  background: linear-gradient(90deg, var(--workspace-gold-700), #d0a05a);
}

.inventory-kpis article:nth-child(4)::before {
  background: linear-gradient(90deg, #9c4b52, #ca7b82);
}

.inventory-kpis span,
.inventory-kpis small {
  color: var(--workspace-muted);
  display: block;
  font-size: 12px;
}

.inventory-kpis strong {
  color: #1e4c43;
  display: block;
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  margin: 5px 0 2px;
}

.inventory-page .inventory-filter-bar {
  background: #fff;
  border: 1px solid var(--workspace-line);
  border-radius: 13px;
  box-shadow: 0 7px 19px rgba(20, 65, 57, .04);
  gap: 10px;
  grid-template-columns: minmax(160px, .7fr) minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(190px, 1fr) auto;
  margin: 0;
  padding: 14px 15px;
  position: relative;
  z-index: 10;
}

.inventory-filter-copy {
  align-self: center;
}

.inventory-page .inventory-filter-field {
  display: grid;
  grid-template-rows: auto 40px;
  min-width: 0;
}

.inventory-page .inventory-filter-field > span {
  color: #4e6962;
  font-size: 12px;
  font-weight: 720;
  margin-bottom: 5px;
}

.inventory-page .inventory-warehouse-filter summary,
.inventory-page .inventory-product-filter select,
.inventory-page .inventory-product-filter .searchable-select-input,
.inventory-page .inventory-keyword-filter input {
  background-color: #fbfdfc;
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  color: var(--workspace-ink);
  font-size: 12px;
  height: 40px;
}

.inventory-page .inventory-warehouse-filter[open] summary,
.inventory-page .inventory-product-filter .searchable-select-input:focus,
.inventory-page .inventory-keyword-filter input:focus {
  background-color: #fff;
  border-color: var(--workspace-green-700);
  box-shadow: 0 0 0 3px rgba(29, 114, 95, .11);
}

.inventory-page .inventory-warehouse-filter summary strong {
  font-size: 12px;
}

.inventory-page .inventory-warehouse-options {
  border-color: #c8d9d3;
  border-radius: 9px;
  box-shadow: 0 16px 38px rgba(17, 57, 50, .17);
}

.inventory-page .inventory-warehouse-options label {
  min-height: 43px;
}

.inventory-page .inventory-warehouse-options label:hover {
  background: var(--workspace-green-100);
}

.inventory-page .inventory-warehouse-options label > span,
.inventory-page .inventory-warehouse-options label > span strong,
.inventory-page .inventory-filter-empty {
  font-size: 12px;
}

.inventory-page .inventory-warehouse-options input {
  accent-color: var(--workspace-green-700);
}

.inventory-page .inventory-query-button {
  background: linear-gradient(135deg, var(--workspace-green-800), var(--workspace-green-700));
  border-color: var(--workspace-green-800);
  border-radius: 8px;
  height: 40px;
  min-width: 96px;
}

.inventory-page .inventory-result-panel {
  border-color: var(--workspace-line);
  border-radius: 13px;
  box-shadow: 0 8px 22px rgba(19, 62, 55, .045);
  overflow: hidden;
}

.inventory-results-head {
  align-items: flex-end;
  background: #fff;
  border-bottom: 1px solid var(--workspace-soft-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 60px;
  padding: 12px 16px;
}

.inventory-results-head > div {
  display: grid;
  gap: 2px;
}

.inventory-results-head strong {
  color: #244c43;
  font-size: 14px;
}

.inventory-results-head span,
.inventory-results-head small {
  color: var(--workspace-muted);
  font-size: 12px;
}

.inventory-results-head > span {
  background: var(--workspace-green-100);
  border: 1px solid #cce2da;
  border-radius: 99px;
  color: var(--workspace-green-700);
  font-weight: 740;
  padding: 4px 8px;
}

.inventory-page .inventory-result-panel .table-scroll {
  max-width: 100%;
  overflow: auto;
}

.inventory-page .inventory-result-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1260px;
}

.inventory-page .inventory-result-table th {
  background: #eef5f2;
  border-bottom: 1px solid #cfddd8;
  color: #3c5c55;
  font-size: 12px;
  height: 43px;
  position: sticky;
  top: 0;
  z-index: 3;
}

.inventory-page .inventory-result-table td {
  background: #fff;
  border-top-color: var(--workspace-soft-line);
  color: #3c504a;
  font-size: 12px;
  height: 52px;
}

.inventory-page .inventory-result-table th:nth-child(1) { width: 132px; }
.inventory-page .inventory-result-table th:nth-child(2) { width: 165px; }
.inventory-page .inventory-result-table th:nth-child(3) { width: 145px; }
.inventory-page .inventory-result-table th:nth-child(4) { width: 235px; }
.inventory-page .inventory-result-table th:nth-child(5) { width: 220px; }
.inventory-page .inventory-result-table th:nth-child(6) { width: 160px; }
.inventory-page .inventory-result-table th:nth-child(7) { width: 110px; }
.inventory-page .inventory-result-table th:nth-child(8) { width: 110px; }
.inventory-page .inventory-result-table th:nth-child(9) { width: 160px; }

.inventory-page .inventory-result-table tbody tr:hover td {
  background: #f2f8f5;
}

.inventory-page .inventory-result-table th:first-child,
.inventory-page .inventory-result-table td:first-child {
  left: 0;
  min-width: 128px;
  position: sticky;
}

.inventory-page .inventory-result-table th:first-child {
  background: #e8f2ef;
  box-shadow: 1px 0 #d2dfdb;
  z-index: 5;
}

.inventory-page .inventory-result-table td:first-child {
  box-shadow: 1px 0 #e1eae7;
  z-index: 2;
}

.inventory-page .code-cell,
.inventory-page .code-cell strong {
  color: #215f52;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.inventory-material-codes {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 260px;
}

.inventory-material-codes > span,
.inventory-material-codes > em {
  background: var(--workspace-green-50);
  border: 1px solid #d3e4de;
  border-radius: 5px;
  color: #3b675d;
  font-size: 12px;
  font-style: normal;
  max-width: 155px;
  overflow: hidden;
  padding: 3px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-quantity strong {
  color: #1d6755;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.inventory-kpis article.warning {
  background: #fffaf3;
  border-color: #ead9b7;
}

.inventory-kpis article.warning strong {
  color: #9a6927;
}

.inventory-page .status {
  border: 1px solid #c7dfd6;
  color: #176b58;
  font-size: 12px;
}

.inventory-page .status.draft {
  border-color: #e9d5a9;
  color: #8e651c;
}

.inventory-page .table-foot {
  background: #fafcfb;
  border-top-color: var(--workspace-soft-line);
  color: var(--workspace-muted);
  font-size: 12px;
}

/* Editable field captions inside the on-screen print designer only */
.print-center-page .print-field-label-editor {
  display: grid;
  gap: 3px;
  min-width: 0;
  width: 100%;
}

.print-center-page .print-field-token-content {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
}

.print-center-page .print-field-token-content > strong {
  color: #2a413c;
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-field-label-editor input {
  background: #fff;
  border: 1px solid #c9d8d3;
  border-radius: 5px;
  color: #294a42;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  height: 27px;
  line-height: 1;
  min-width: 0;
  outline: 0;
  padding: 0 7px;
  width: 100%;
}

.print-center-page .print-field-label-editor input:hover {
  border-color: #a9c8be;
}

.print-center-page .print-field-label-editor input:focus {
  border-color: #277862;
  box-shadow: 0 0 0 3px rgba(39, 120, 98, .12);
}

.print-center-page .print-field-binding {
  color: #748882;
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-layout-field:has(.print-field-label-editor) {
  align-items: flex-start;
  min-height: 62px;
  padding-block: 6px;
}

.print-center-page .print-layout-field .print-field-label-editor {
  flex: 1 1 auto;
}

.print-center-page .print-table-field-head .print-field-label-editor {
  flex: 1 1 72px;
  min-width: 68px;
}

.print-center-page .print-field-label-editor.compact {
  gap: 2px;
}

.print-center-page .print-field-label-editor.compact .print-field-binding {
  max-width: 94px;
}

.print-center-page .print-table-field-head .print-field-label-editor input {
  font-size: 12px;
  height: 26px;
  padding-inline: 5px;
}

.print-center-page .print-table-field-head {
  align-items: flex-start;
  min-width: 92px;
}

@media (max-width: 1180px) {
  .today-business-kpis,
  .product-list-kpis,
  .inventory-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-business-grid {
    grid-template-columns: 1fr;
  }

  .product-list-filter {
    grid-template-columns: minmax(220px, 1fr) repeat(3, max-content);
  }

  .inventory-page .inventory-filter-bar {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .inventory-filter-copy {
    grid-column: 1 / -1;
  }

  .inventory-page .inventory-query-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .today-business-hero,
  .product-list-hero,
  .inventory-hero {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 18px;
  }

  .today-business-hero > :last-child,
  .product-list-hero > :last-child,
  .inventory-hero > :last-child {
    width: 100%;
  }

  .today-business-hero .btn,
  .product-list-hero .btn,
  .inventory-hero .btn {
    width: 100%;
  }

  .today-business-date {
    border-bottom: 1px solid rgba(255, 255, 255, .13);
    border-left: 0;
    border-right: 0;
    border-top: 1px solid rgba(255, 255, 255, .13);
    flex: none;
    grid-template-columns: auto auto minmax(0, 1fr);
    justify-items: start;
    min-width: 0;
    padding: 10px 0;
    width: 100%;
  }

  .today-business-date strong {
    font-size: 25px;
    margin: 0 10px;
  }

  .today-business-date small {
    justify-self: end;
  }

  .today-business-cash-pulse {
    flex: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    width: 100%;
  }

  .today-business-cash-pulse > div {
    align-items: flex-start;
    display: grid;
    gap: 2px;
  }

  .today-business-status-grid {
    grid-template-columns: 1fr;
  }

  .today-business-cash-summary {
    grid-template-columns: 1fr;
  }

  .product-list-filter,
  .inventory-page .inventory-filter-bar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .product-list-filter > .btn {
    width: 100%;
  }

  .product-list-footer-actions {
    margin-left: 0;
    width: 100%;
  }

  .product-list-filter input,
  .product-list-filter select,
  .product-list-filter .searchable-select-input,
  .inventory-page .inventory-warehouse-filter summary,
  .inventory-page .inventory-product-filter select,
  .inventory-page .inventory-product-filter .searchable-select-input,
  .inventory-page .inventory-keyword-filter input,
  .print-center-page .print-field-label-editor input {
    font-size: 16px;
  }

  .today-business-panel .table-scroll,
  .product-list-page .table-scroll,
  .inventory-page .inventory-result-panel .table-scroll {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
  }

  .inventory-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-list-result-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 540px) {
  .today-business-kpis,
  .product-list-kpis,
  .inventory-kpis {
    grid-template-columns: 1fr;
  }

  .today-business-activity-item {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .today-business-activity-amount,
  .today-business-activity-meta {
    grid-column: 2;
  }

  .today-business-cash-pulse,
  .today-business-balance-cards {
    grid-template-columns: 1fr;
  }

  .today-business-currency-list > div:not(.today-business-compact-empty) {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 7px 0;
  }

  .today-business-currency-list em {
    grid-column: 2;
    text-align: left;
  }

  .today-business-status-row,
  .today-business-category {
    grid-template-columns: minmax(78px, 1fr) minmax(65px, 1fr) 30px;
  }

  .today-business-status-row > em,
  .today-business-category > em {
    grid-column: 1 / -1;
    text-align: left;
  }
}

/* Tax document editor and source-line allocation */
.tax-editor-drawer {
  --tax-green-900: #103f39;
  --tax-green-800: #155b50;
  --tax-green-700: #1d7563;
  --tax-green-100: #e9f5f1;
  --tax-gold-500: #c59447;
  --tax-ink: #19332e;
  --tax-muted: #6d827d;
  --tax-line: #dbe6e2;
  --tax-soft-line: #e9efed;
  max-width: 1180px;
  width: min(1180px, 96vw);
}

.tax-editor-head {
  background:
    radial-gradient(circle at 91% 4%, rgba(214, 169, 91, .22), transparent 28%),
    linear-gradient(120deg, #0b3733, #176155 72%, #76572c 142%);
  border-bottom: 0;
  color: #fff;
  min-height: 82px;
  padding: 16px 21px;
}

.tax-editor-head > div {
  display: grid;
  gap: 3px;
}

.tax-editor-head > div > span {
  color: #e9c98f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .15em;
}

.tax-editor-head > div > strong {
  color: #fff;
  font-size: 18px;
}

.tax-editor-head > div > small {
  color: rgba(255, 255, 255, .66);
  font-size: 10px;
}

.tax-editor-head .icon-button {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

.tax-editor-body {
  background: #f2f7f5;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.tax-editor-section {
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(18, 66, 57, .045);
  min-width: 0;
  overflow: visible;
  padding: 0 16px 17px;
}

.tax-section-title {
  align-items: center;
  border-bottom: 1px solid var(--tax-soft-line);
  display: flex;
  gap: 10px;
  margin: 0 -16px 15px;
  min-height: 61px;
  padding: 11px 16px;
}

.tax-section-title > span {
  align-items: center;
  background: linear-gradient(135deg, var(--tax-green-800), var(--tax-green-700));
  border-radius: 9px;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  height: 33px;
  justify-content: center;
  width: 33px;
}

.tax-section-title > div {
  display: grid;
  gap: 3px;
}

.tax-section-title strong {
  color: #204a41;
  font-size: 13px;
}

.tax-section-title small {
  color: var(--tax-muted);
  font-size: 9px;
}

.tax-form-grid {
  display: grid;
  gap: 13px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tax-form-grid label,
.tax-source-query label {
  color: #49645d;
  display: grid;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.tax-form-grid label.wide {
  grid-column: span 2;
}

.tax-form-grid label.required > span::after {
  color: #bd4a50;
  content: " *";
}

.tax-form-grid input,
.tax-form-grid select,
.tax-form-grid textarea,
.tax-source-query input,
.tax-source-query select {
  background: #fbfdfc;
  border: 1px solid var(--tax-line);
  border-radius: 8px;
  color: var(--tax-ink);
  font: inherit;
  font-size: 11px;
  min-width: 0;
  outline: none;
  width: 100%;
}

.tax-form-grid input,
.tax-form-grid select,
.tax-source-query input,
.tax-source-query select {
  height: 41px;
  padding: 0 10px;
}

.tax-form-grid textarea {
  min-height: 74px;
  padding: 9px 10px;
  resize: vertical;
}

.tax-form-grid .searchable-select {
  min-width: 0;
  width: 100%;
}

.tax-source-picker {
  padding-bottom: 0;
}

.tax-source-query {
  align-items: end;
  background: #f5f9f7;
  border: 1px solid #e0e9e6;
  border-radius: 10px;
  display: grid;
  gap: 11px;
  grid-template-columns: minmax(300px, 1.45fr) minmax(210px, 1fr) auto;
  margin-bottom: 12px;
  padding: 12px 13px;
}

.tax-source-query .btn {
  height: 41px;
  min-width: 132px;
  white-space: nowrap;
}

.tax-allocation-root {
  border: 1px solid var(--tax-line);
  border-radius: 10px;
  min-height: 145px;
  overflow: hidden;
}

.tax-allocation-root .table-scroll {
  max-height: 390px;
  scrollbar-color: #b7cbc5 transparent;
  scrollbar-width: thin;
}

.tax-allocation-table {
  min-width: 1520px;
}

.tax-allocation-table th:first-child,
.tax-allocation-table td:first-child {
  position: sticky;
  left: 0;
  text-align: center;
  width: 61px;
  z-index: 2;
}

.tax-allocation-table th:first-child {
  background: #eaf3f0;
  z-index: 4;
}

.tax-allocation-table td:first-child {
  background: #fff;
}

.tax-allocation-table tr:hover td:first-child,
.tax-allocation-table tr.selected td:first-child {
  background: #eef8f4;
}

.tax-allocation-table tr.selected {
  background: #eef8f4;
  box-shadow: inset 3px 0 var(--tax-green-700);
}

.tax-allocation-table input[type="checkbox"] {
  accent-color: var(--tax-green-700);
  cursor: pointer;
  height: 17px;
  width: 17px;
}

.tax-check-label {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  white-space: nowrap;
}

.tax-amount-input {
  align-items: center;
  background: #fff;
  border: 1px solid #cfdcd8;
  border-radius: 7px;
  display: flex;
  min-width: 124px;
  overflow: hidden;
}

.tax-amount-input:focus-within {
  border-color: var(--tax-green-700);
  box-shadow: 0 0 0 3px rgba(29, 117, 99, .11);
}

.tax-amount-input b {
  align-items: center;
  align-self: stretch;
  background: #f1f6f4;
  color: #6a7e79;
  display: flex;
  font-size: 10px;
  font-weight: 700;
  justify-content: center;
  width: 26px;
}

.tax-amount-input input {
  border: 0;
  color: #145e50;
  font: inherit;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  height: 34px;
  min-width: 0;
  outline: none;
  padding: 0 7px;
  width: 98px;
}

.tax-amount-input input:disabled {
  background: #f5f7f6;
  color: #9ca8a5;
  cursor: not-allowed;
}

.tax-source-empty {
  align-items: center;
  color: var(--tax-muted);
  display: flex;
  justify-content: center;
  min-height: 145px;
  padding: 20px;
}

.tax-totals-strip {
  background: #f8fbfa;
  border-left: 1px solid var(--tax-line);
  border-right: 1px solid var(--tax-line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.tax-totals-strip > div {
  align-items: center;
  border-right: 1px solid var(--tax-line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 13px;
}

.tax-totals-strip > div:last-child {
  border-right: 0;
}

.tax-totals-strip span {
  color: var(--tax-muted);
  font-size: 9px;
}

.tax-totals-strip strong {
  color: #31544c;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tax-totals-strip .primary {
  background: linear-gradient(135deg, var(--tax-green-900), var(--tax-green-700));
}

.tax-totals-strip .primary span {
  color: rgba(255, 255, 255, .68);
}

.tax-totals-strip .primary strong {
  color: #fff;
  font-size: 15px;
}

.tax-editor-foot {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--tax-line);
  display: flex;
  gap: 8px;
  min-height: 64px;
  padding: 11px 18px;
}

.tax-editor-foot > span {
  color: var(--tax-muted);
  font-size: 9px;
  margin-right: auto;
}

.tax-editor-foot .btn-primary {
  background: linear-gradient(135deg, var(--tax-green-800), var(--tax-green-700));
  border-color: var(--tax-green-800);
  min-width: 104px;
}

.tax-editor-drawer button:focus-visible,
.tax-editor-drawer input:focus-visible,
.tax-editor-drawer select:focus-visible,
.tax-editor-drawer textarea:focus-visible {
  border-color: var(--tax-green-700);
  box-shadow: 0 0 0 3px rgba(29, 117, 99, .12);
  outline: none;
}

@media (max-width: 950px) {
  .tax-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-form-grid label.wide {
    grid-column: 1 / -1;
  }

  .tax-source-query {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-source-query > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .tax-totals-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-totals-strip > div:nth-child(2) {
    border-right: 0;
  }

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

@media (max-width: 650px) {
  .tax-editor-drawer {
    max-width: none;
    width: 100vw;
  }

  .tax-editor-head {
    min-height: 74px;
    padding: 14px 16px;
  }

  .tax-editor-body {
    padding: 10px;
  }

  .tax-editor-section {
    padding: 0 12px 13px;
  }

  .tax-section-title {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .tax-form-grid,
  .tax-source-query {
    grid-template-columns: 1fr;
  }

  .tax-form-grid label.wide,
  .tax-source-query > .btn {
    grid-column: auto;
  }

  .tax-source-query .tax-date-range {
    grid-template-columns: 1fr;
  }

  .tax-totals-strip {
    grid-template-columns: 1fr;
  }

  .tax-totals-strip > div,
  .tax-totals-strip > div:nth-child(2) {
    border-bottom: 1px solid var(--tax-line);
    border-right: 0;
  }

  .tax-totals-strip > div:last-child {
    border-bottom: 0;
  }

  .tax-editor-foot {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tax-editor-foot > span {
    grid-column: 1 / -1;
    margin: 0;
  }

  .tax-editor-foot .btn {
    width: 100%;
  }
}

/* Invoice and tax management — scoped fiscal workspace */
.tax-page,
.tax-dashboard-page,
.tax-application-page,
.tax-invoice-page,
.tax-reversal-page {
  --tax-green-950: #082f2c;
  --tax-green-900: #103f39;
  --tax-green-800: #155b50;
  --tax-green-700: #1d7563;
  --tax-green-500: #3f9b82;
  --tax-green-100: #e9f5f1;
  --tax-green-50: #f5faf8;
  --tax-gold-700: #95631f;
  --tax-gold-500: #c59447;
  --tax-gold-100: #f9edd9;
  --tax-blue-700: #2c6679;
  --tax-blue-100: #e8f2f5;
  --tax-ink: #19332e;
  --tax-muted: #6d827d;
  --tax-line: #dbe6e2;
  --tax-soft-line: #e9efed;
  --tax-panel: #fff;
  color: var(--tax-ink);
  display: grid;
  gap: 14px;
  min-width: 0;
}

.tax-page *,
.tax-dashboard-page *,
.tax-application-page *,
.tax-invoice-page *,
.tax-reversal-page * {
  box-sizing: border-box;
}

.tax-hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    radial-gradient(circle at 88% 12%, rgba(211, 168, 90, .25), transparent 27%),
    linear-gradient(124deg, var(--tax-green-950) 0%, var(--tax-green-800) 67%, #85632e 135%);
  background-size: 34px 34px, 34px 34px, auto, auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  box-shadow: 0 15px 36px rgba(12, 60, 53, .15);
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 164px;
  overflow: hidden;
  padding: 27px 30px;
  position: relative;
}

.tax-hero::before,
.tax-hero::after {
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.tax-hero::before {
  height: 260px;
  right: -105px;
  top: -155px;
  width: 260px;
}

.tax-hero::after {
  bottom: -158px;
  height: 215px;
  right: 205px;
  width: 215px;
}

.tax-hero > * {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.tax-hero > div:first-child {
  max-width: 730px;
}

.tax-hero > div:first-child > span,
.tax-editor-hero > div:first-child > span {
  color: #e7c68d;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .19em;
}

.tax-hero h2,
.tax-editor-hero h2 {
  color: #fff;
  font-size: clamp(24px, 2.1vw, 31px);
  letter-spacing: .02em;
  margin: 7px 0 8px;
}

.tax-hero p,
.tax-editor-hero p {
  color: rgba(255, 255, 255, .72);
  line-height: 1.75;
  margin: 0;
}

.tax-period-filter {
  align-items: end;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 13px;
  backdrop-filter: blur(10px);
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  padding: 13px;
}

.tax-period-filter label {
  display: grid;
  gap: 6px;
}

.tax-period-filter label > span {
  color: rgba(255, 255, 255, .72);
  font-size: 10px;
  font-weight: 700;
}

.tax-period-filter label > div {
  align-items: center;
  display: flex;
  gap: 6px;
}

.tax-period-filter input {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 7px;
  color: #21423c;
  font: inherit;
  height: 38px;
  min-width: 0;
  outline: none;
  padding: 0 9px;
  width: 135px;
}

.tax-period-filter em {
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
  font-style: normal;
}

.tax-period-filter .btn {
  background: #fff;
  border-color: #fff;
  color: var(--tax-green-800);
  height: 38px;
  min-width: 96px;
}

.tax-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tax-kpi-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 251, 250, .98));
  border: 1px solid var(--tax-line);
  border-radius: 14px;
  box-shadow: 0 8px 23px rgba(23, 71, 62, .055);
  min-height: 122px;
  overflow: hidden;
  padding: 19px 20px 17px;
  position: relative;
}

.tax-kpi-card::before {
  background: linear-gradient(90deg, var(--tax-green-700), #70b5a2);
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.tax-kpi-card::after {
  border: 13px solid rgba(34, 113, 94, .035);
  border-radius: 50%;
  content: "";
  height: 64px;
  position: absolute;
  right: -19px;
  top: 16px;
  width: 64px;
}

.tax-kpi-card.purchase::before {
  background: linear-gradient(90deg, #2f7182, #77aabb);
}

.tax-kpi-card.payable::before {
  background: linear-gradient(90deg, #a57027, #d2a157);
}

.tax-kpi-card.pending::before {
  background: linear-gradient(90deg, #815b86, #b18ab2);
}

.tax-kpi-card > span {
  color: var(--tax-muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.tax-kpi-card > strong {
  color: #173d36;
  display: block;
  font-size: clamp(18px, 1.6vw, 24px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  margin: 10px 0 7px;
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  white-space: nowrap;
  z-index: 1;
}

.tax-kpi-card.payable > strong {
  color: #895c1e;
}

.tax-kpi-card > small {
  color: #80918d;
  display: block;
  font-size: 9px;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.tax-dashboard-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
}

.tax-trend-panel,
.tax-rate-panel,
.tax-risk-panel,
.tax-table-panel {
  border-color: var(--tax-line);
  border-radius: 14px;
  box-shadow: 0 9px 24px rgba(20, 66, 58, .055);
  min-width: 0;
  overflow: hidden;
}

.tax-section-head {
  align-items: flex-end;
  border-bottom: 1px solid var(--tax-soft-line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 65px;
  padding: 15px 18px 12px;
}

.tax-section-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tax-section-head strong {
  color: #214940;
  font-size: 14px;
}

.tax-section-head span,
.tax-section-head > em {
  color: var(--tax-muted);
  font-size: 9px;
  font-style: normal;
}

.tax-trend-chart {
  align-items: end;
  background:
    linear-gradient(to top, rgba(53, 103, 93, .07) 1px, transparent 1px);
  background-size: 100% 25%;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(48px, 1fr));
  height: 278px;
  margin: 20px 22px 5px;
  min-width: 400px;
  padding: 9px 7px 0;
}

.tax-trend-column {
  align-content: end;
  display: grid;
  gap: 6px;
  grid-template-rows: 205px auto auto;
  height: 100%;
  justify-items: center;
  min-width: 0;
}

.tax-trend-bars {
  align-items: flex-end;
  display: flex;
  gap: 5px;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.tax-trend-bars i {
  border-radius: 5px 5px 2px 2px;
  box-shadow: 0 4px 9px rgba(24, 101, 83, .12);
  display: block;
  max-width: 24px;
  min-height: 3px;
  transition: filter .16s ease, transform .16s ease;
  width: 30%;
}

.tax-trend-bars i:hover {
  filter: brightness(1.07);
  transform: translateY(-2px);
}

.tax-trend-bars i.output,
.tax-chart-legend i.output {
  background: linear-gradient(180deg, #2f977b, #176a58);
}

.tax-trend-bars i.input,
.tax-chart-legend i.input {
  background: linear-gradient(180deg, #d5aa62, #ab752a);
}

.tax-trend-column > strong {
  color: #4d655f;
  font-size: 9px;
  white-space: nowrap;
}

.tax-trend-column > small {
  color: var(--tax-muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-chart-legend {
  align-items: center;
  border-top: 1px solid var(--tax-soft-line);
  color: var(--tax-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 9px;
  gap: 14px;
  margin-top: 12px;
  padding: 11px 20px 14px;
}

.tax-chart-legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.tax-chart-legend i {
  border-radius: 2px;
  display: block;
  height: 8px;
  width: 8px;
}

.tax-chart-legend span:last-child {
  margin-left: auto;
}

.tax-rate-list {
  display: grid;
  gap: 0;
  max-height: 335px;
  overflow: auto;
  padding: 7px 17px 13px;
  scrollbar-color: #c2d4cf transparent;
  scrollbar-width: thin;
}

.tax-rate-list article {
  border-bottom: 1px dashed var(--tax-line);
  display: grid;
  gap: 6px;
  padding: 12px 1px 10px;
}

.tax-rate-list article:last-child {
  border-bottom: 0;
}

.tax-rate-list article > div:first-child {
  align-items: baseline;
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.tax-rate-list strong {
  color: #1e5e52;
  font-size: 14px;
}

.tax-rate-list span,
.tax-rate-list small {
  color: var(--tax-muted);
  font-size: 8px;
}

.tax-rate-list em {
  color: #344e48;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.tax-rate-progress {
  background: #e8efed;
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
}

.tax-rate-progress i {
  background: linear-gradient(90deg, var(--tax-green-700), var(--tax-gold-500));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 2px;
}

.tax-risk-list {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 17px 17px;
}

.tax-risk-list article {
  align-items: flex-start;
  background: #fffaf0;
  border: 1px solid #ead9b6;
  border-radius: 11px;
  display: grid;
  gap: 9px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 78px;
  padding: 12px;
}

.tax-risk-list article > span {
  align-items: center;
  background: #f7e9cb;
  border-radius: 9px;
  color: #97691d;
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.tax-risk-list article > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tax-risk-list strong {
  color: #684f25;
  font-size: 11px;
}

.tax-risk-list p {
  color: #8a795b;
  font-size: 9px;
  line-height: 1.55;
  margin: 0;
}

.tax-risk-list article > em {
  color: #a37024;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
}

.tax-risk-list article.high,
.tax-risk-list article.danger,
.tax-risk-list article.critical {
  background: #fff5f4;
  border-color: #eccac7;
}

.tax-risk-list article.high > span,
.tax-risk-list article.danger > span,
.tax-risk-list article.critical > span {
  background: #f8dddd;
  color: #b34143;
}

.tax-risk-list article.high strong,
.tax-risk-list article.danger strong,
.tax-risk-list article.critical strong,
.tax-risk-list article.high > em,
.tax-risk-list article.danger > em,
.tax-risk-list article.critical > em {
  color: #a44242;
}

.tax-compliance-note {
  align-items: flex-start;
  background: #f5f9f8;
  border: 1px solid var(--tax-line);
  border-radius: 10px;
  color: var(--tax-muted);
  display: flex;
  font-size: 9px;
  gap: 7px;
  line-height: 1.6;
  margin: 0;
  padding: 10px 13px;
}

.tax-compliance-note svg {
  color: var(--tax-green-700);
  flex: 0 0 auto;
  margin-top: 1px;
}

.tax-page-toolbar {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(24, 112, 93, .04), transparent 42%),
    #fff;
  border: 1px solid var(--tax-line);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(21, 69, 61, .05);
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 16px 18px;
}

.tax-page-toolbar .toolbar-copy {
  display: grid;
  gap: 4px;
}

.tax-page-toolbar .toolbar-copy strong {
  color: #173f38;
  font-size: 20px;
}

.tax-page-toolbar .toolbar-copy span {
  color: var(--tax-muted);
  font-size: 10px;
}

.tax-page .btn-primary,
.tax-document-editor .btn-primary {
  background: linear-gradient(135deg, var(--tax-green-800), var(--tax-green-700));
  border-color: var(--tax-green-800);
  border-radius: 8px;
  box-shadow: 0 7px 15px rgba(21, 91, 80, .15);
}

.tax-page .btn-primary:hover,
.tax-document-editor .btn-primary:hover {
  background: var(--tax-green-900);
  border-color: var(--tax-green-900);
}

.tax-filter-bar {
  align-items: end;
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(21, 69, 61, .045);
  display: grid;
  gap: 11px;
  grid-template-columns: minmax(260px, 1.55fr) minmax(165px, 1fr) minmax(145px, .8fr) minmax(180px, 1.15fr) auto;
  padding: 15px 17px;
  position: relative;
  z-index: 8;
}

.tax-filter-bar > label {
  color: #49655e;
  display: grid;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.tax-filter-bar input,
.tax-filter-bar select,
.tax-filter-bar .searchable-select-input {
  background: #fbfdfc;
  border: 1px solid var(--tax-line);
  border-radius: 8px;
  color: var(--tax-ink);
  font: inherit;
  height: 39px;
  min-width: 0;
  outline: none;
  padding: 0 10px;
  width: 100%;
}

.tax-filter-bar .searchable-select {
  min-width: 0;
  width: 100%;
}

.tax-filter-bar .btn {
  height: 39px;
  min-width: 89px;
  white-space: nowrap;
}

.tax-date-range {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  min-width: 0;
}

.tax-date-range em {
  color: var(--tax-muted);
  font-size: 9px;
  font-style: normal;
}

.tax-keyword-field {
  min-width: 0;
}

.tax-table-panel {
  background: #fff;
}

.tax-table-panel .table-scroll {
  scrollbar-color: #b9ccc6 transparent;
  scrollbar-width: thin;
}

.tax-business-table,
.tax-source-table,
.tax-allocation-table {
  border-collapse: collapse;
  min-width: 1260px;
  width: 100%;
}

.tax-business-table th,
.tax-source-table th,
.tax-allocation-table th {
  background: #f0f6f4;
  border-bottom: 1px solid #d3e1dc;
  color: #385b53;
  font-size: 10px;
  font-weight: 750;
  height: 44px;
  padding: 9px 10px;
  white-space: nowrap;
}

.tax-business-table td,
.tax-source-table td,
.tax-allocation-table td {
  border-bottom: 1px solid #edf1f0;
  color: #3c504b;
  font-size: 10px;
  height: 47px;
  padding: 8px 10px;
  vertical-align: middle;
}

.tax-business-table tbody tr,
.tax-source-table tbody tr,
.tax-allocation-table tbody tr {
  transition: background .14s ease;
}

.tax-business-table tbody tr:hover,
.tax-source-table tbody tr:hover,
.tax-allocation-table tbody tr:hover {
  background: #f3f9f6;
}

.tax-business-table .money-cell,
.tax-source-table .money-cell,
.tax-allocation-table .money-cell {
  color: #185e51;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.tax-status {
  align-items: center;
  background: #fff7e8;
  border: 1px solid #ead8b3;
  border-radius: 99px;
  color: #8d651e;
  display: inline-flex;
  font-size: 9px;
  font-weight: 750;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  white-space: nowrap;
}

.tax-status i {
  background: currentColor;
  border-radius: 50%;
  height: 6px;
  opacity: .78;
  width: 6px;
}

.tax-status.done {
  background: #ebf8f2;
  border-color: #c3e4d7;
  color: #187558;
}

.tax-status.partial {
  background: #edf6f8;
  border-color: #c9e0e5;
  color: #2c6f7d;
}

.tax-status.danger {
  background: #fff1f1;
  border-color: #edc8ca;
  color: #b23e45;
}

.tax-status.muted {
  background: #f3f5f4;
  border-color: #dbe1df;
  color: #6e7c78;
}

.tax-detail-drawer {
  --tax-green-900: #103f39;
  --tax-green-800: #155b50;
  --tax-green-700: #1d7563;
  --tax-muted: #6d827d;
  --tax-line: #dbe6e2;
  max-width: 1060px;
  width: min(1060px, 94vw);
}

.tax-detail-drawer .drawer-head {
  background:
    radial-gradient(circle at 92% 10%, rgba(214, 169, 92, .19), transparent 30%),
    linear-gradient(120deg, #0d3935, #176154);
  border-bottom: 0;
  color: #fff;
  min-height: 76px;
  padding: 16px 20px;
}

.tax-detail-drawer .drawer-head strong {
  color: #fff;
  font-size: 16px;
}

.tax-detail-drawer .drawer-head span {
  color: rgba(255, 255, 255, .68);
}

.tax-detail-drawer .drawer-head .icon-button {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
}

.tax-detail-drawer .drawer-body {
  background: #f4f8f7;
  padding: 17px;
}

.tax-detail-drawer .detail-section {
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(24, 67, 59, .035);
  margin-bottom: 12px;
  overflow: hidden;
  padding: 0;
}

.tax-detail-drawer .detail-section > h3 {
  background: #f7faf9;
  border-bottom: 1px solid #e5ecea;
  color: #234f46;
  font-size: 12px;
  margin: 0;
  padding: 12px 14px;
}

.tax-detail-drawer .detail-grid {
  padding: 12px;
}

.tax-detail-drawer .table-scroll {
  margin: 0;
}

.tax-detail-drawer .drawer-foot {
  background: #fff;
  border-top-color: var(--tax-line);
}

.tax-detail-drawer .drawer-foot .btn-primary {
  background: linear-gradient(135deg, var(--tax-green-800), var(--tax-green-700));
  border-color: var(--tax-green-800);
}

.tax-source-table {
  min-width: 1080px;
}

.tax-decision-dialog {
  --tax-green-800: #155b50;
  --tax-green-700: #1d7563;
  --tax-muted: #6d827d;
  --tax-line: #dbe6e2;
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 15px;
  box-shadow: 0 26px 74px rgba(11, 52, 45, .26);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  width: min(560px, calc(100vw - 30px));
}

.tax-dialog-head {
  align-items: flex-start;
  background: linear-gradient(120deg, #f6faf8, #fff);
  border-bottom: 1px solid var(--tax-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 70px;
  padding: 16px 18px;
}

.tax-dialog-head > div {
  display: grid;
  gap: 3px;
}

.tax-dialog-head h3,
.tax-dialog-head strong {
  color: #173f38;
  font-size: 17px;
  margin: 0;
}

.tax-dialog-head span,
.tax-dialog-head p {
  color: var(--tax-muted);
  font-size: 10px;
  line-height: 1.55;
  margin: 0;
}

.tax-dialog-body {
  display: grid;
  gap: 13px;
  overflow: auto;
  padding: 17px 18px;
}

.tax-dialog-body label {
  color: #4c6760;
  display: grid;
  font-size: 10px;
  font-weight: 700;
  gap: 6px;
}

.tax-dialog-body input,
.tax-dialog-body select,
.tax-dialog-body textarea {
  background: #fbfdfc;
  border: 1px solid var(--tax-line);
  border-radius: 8px;
  color: #203b35;
  font: inherit;
  font-size: 11px;
  min-width: 0;
  outline: none;
  width: 100%;
}

.tax-dialog-body input,
.tax-dialog-body select {
  height: 40px;
  padding: 0 10px;
}

.tax-dialog-body textarea {
  min-height: 90px;
  padding: 9px 10px;
  resize: vertical;
}

.tax-dialog-foot {
  align-items: center;
  background: #fbfdfc;
  border-top: 1px solid var(--tax-line);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px;
}

.tax-decision-dialog .btn-primary {
  background: linear-gradient(135deg, var(--tax-green-800), var(--tax-green-700));
  border-color: var(--tax-green-800);
}

.tax-page button:focus-visible,
.tax-page input:focus-visible,
.tax-page select:focus-visible,
.tax-page textarea:focus-visible,
.tax-document-editor button:focus-visible,
.tax-document-editor input:focus-visible,
.tax-document-editor select:focus-visible,
.tax-document-editor textarea:focus-visible,
.tax-detail-drawer button:focus-visible,
.tax-decision-dialog button:focus-visible,
.tax-decision-dialog input:focus-visible,
.tax-decision-dialog select:focus-visible,
.tax-decision-dialog textarea:focus-visible {
  border-color: var(--tax-green-700, #1d7563);
  box-shadow: 0 0 0 3px rgba(29, 117, 99, .13);
  outline: none;
}

@media (max-width: 1280px) {
  .tax-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tax-keyword-field {
    grid-column: span 2;
  }

  .tax-risk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 950px) {
  .tax-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .tax-period-filter {
    width: 100%;
  }

  .tax-period-filter label {
    flex: 1;
  }

  .tax-period-filter input {
    flex: 1;
    width: auto;
  }

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

  .tax-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-keyword-field {
    grid-column: auto;
  }

  .tax-filter-bar > .btn {
    width: 100%;
  }
}

@media (max-width: 650px) {
  .tax-page,
  .tax-dashboard-page,
  .tax-application-page,
  .tax-invoice-page,
  .tax-reversal-page {
    gap: 10px;
  }

  .tax-hero {
    border-radius: 14px;
    min-height: 0;
    padding: 20px;
  }

  .tax-hero h2 {
    font-size: 23px;
  }

  .tax-hero p {
    font-size: 11px;
  }

  .tax-period-filter {
    align-items: stretch;
    display: grid;
  }

  .tax-period-filter label > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .tax-period-filter em {
    display: none;
  }

  .tax-period-filter input,
  .tax-period-filter .btn {
    width: 100%;
  }

  .tax-kpi-grid {
    grid-template-columns: 1fr;
  }

  .tax-kpi-card {
    min-height: 108px;
  }

  .tax-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tax-trend-panel {
    overflow-x: auto;
  }

  .tax-trend-chart {
    margin-left: 14px;
    margin-right: 14px;
  }

  .tax-chart-legend {
    min-width: 400px;
  }

  .tax-chart-legend span:last-child {
    margin-left: 0;
  }

  .tax-risk-list {
    grid-template-columns: 1fr;
    padding: 11px;
  }

  .tax-page-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .tax-page-toolbar .btn {
    width: 100%;
  }

  .tax-filter-bar {
    grid-template-columns: 1fr;
    padding: 13px;
  }

  .tax-date-range {
    grid-template-columns: 1fr;
  }

  .tax-date-range em {
    display: none;
  }

  .tax-detail-drawer {
    max-width: none;
    width: 100vw;
  }

  .tax-detail-drawer .drawer-body {
    padding: 10px;
  }

  .tax-detail-drawer .detail-grid {
    grid-template-columns: 1fr;
  }

  .tax-dialog-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .tax-dialog-foot .btn {
    width: 100%;
  }
}

/* Print template center markup integration */
.print-center-page .print-center-toolbar {
  align-items: center;
  background:
    radial-gradient(circle at 88% 10%, rgba(215, 171, 96, .18), transparent 25%),
    linear-gradient(118deg, #0b3632, #15584d 72%, #765a31 135%);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(17, 65, 58, .14);
  color: #fff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-width: 0;
  padding: 18px 20px;
}

.print-center-page .print-toolbar-identity,
.print-center-page .print-toolbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.print-center-page .print-toolbar-identity {
  flex: 1 1 420px;
}

.print-center-page .print-toolbar-kicker {
  color: #e8c68e;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}

.print-center-page .print-toolbar-identity label {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: min(340px, 100%);
}

.print-center-page .print-toolbar-identity label > span {
  color: rgba(255, 255, 255, .7);
  flex: 0 0 auto;
  font-size: 10px;
}

.print-center-page .print-toolbar-identity input {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  height: 38px;
  min-width: 150px;
  outline: none;
  padding: 0 11px;
  width: min(270px, 100%);
}

.print-center-page .print-toolbar-identity input:focus {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .55);
}

.print-center-page .print-save-status {
  align-items: center;
  color: rgba(255, 255, 255, .68);
  display: inline-flex;
  font-size: 10px;
  gap: 6px;
  white-space: nowrap;
}

.print-center-page .print-save-status::before {
  background: #77d1a8;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.print-center-page .print-save-status.dirty::before {
  background: #efbd65;
  box-shadow: 0 0 0 3px rgba(239, 189, 101, .16);
}

.print-center-page .print-toolbar-actions {
  flex: 1 1 610px;
  justify-content: flex-end;
}

.print-center-page .print-toolbar-actions .btn {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  min-height: 36px;
}

.print-center-page .print-toolbar-actions .btn:hover {
  background: rgba(255, 255, 255, .15);
}

.print-center-page .print-toolbar-actions .btn-primary {
  background: #fff;
  border-color: #fff;
  color: #15584d;
}

.print-center-page .print-toolbar-actions .btn-danger-soft {
  color: #ffd6d8;
}

.print-center-page .print-toolbar-divider {
  background: rgba(255, 255, 255, .2);
  height: 26px;
  margin: 0 2px;
  width: 1px;
}

.print-center-page .print-designer-shell {
  max-height: calc(100vh - 238px);
  min-height: 720px;
}

.print-center-page .print-sidebar-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.print-center-page .print-sidebar-head > span {
  color: #234d46;
  font-size: 12px;
  font-weight: 800;
}

.print-center-page .print-sidebar-head > small {
  color: #82938f;
  font-size: 9px;
}

.print-center-page .print-document-type {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.print-center-page .print-document-type-icon {
  align-items: center;
  background: #eef4f2;
  border-radius: 8px;
  color: #57746e;
  display: flex;
  height: 29px;
  justify-content: center;
  width: 29px;
}

.print-center-page .print-document-type.active .print-document-type-icon {
  background: var(--print-green-800);
  color: #fff;
}

.print-center-page .print-document-type > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.print-center-page .print-document-type > span:nth-child(2) small {
  background: transparent;
  padding: 0;
  text-align: left;
}

.print-center-page .print-document-type > em {
  color: #8aa09b;
  font-style: normal;
}

.print-center-page .print-template-version {
  appearance: none;
  color: inherit;
  font: inherit;
  text-align: left;
  width: 100%;
}

.print-center-page .print-template-version > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.print-center-page .print-template-version > span small {
  color: var(--print-muted);
  font-size: 9px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
}

.print-center-page .print-template-version > em {
  align-items: center;
  background: var(--print-gold-100);
  border-radius: 99px;
  color: #91611d;
  display: inline-flex;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  gap: 3px;
  justify-self: start;
  padding: 4px 7px;
}

.print-center-page .print-template-empty {
  color: var(--print-muted);
  display: grid;
  gap: 4px;
  padding: 14px 8px;
  text-align: center;
}

.print-center-page .print-sidebar-tip {
  align-items: flex-start;
  background: #f4f8f6;
  border-top: 1px solid var(--print-soft-line);
  color: var(--print-muted);
  display: flex;
  font-size: 9px;
  gap: 8px;
  line-height: 1.55;
  margin-top: auto;
  padding: 12px;
}

.print-center-page .print-sidebar-tip strong {
  color: #355d55;
  display: block;
  font-size: 10px;
}

.print-center-page .print-workspace-head {
  justify-content: space-between;
}

.print-center-page .print-workspace-head > div:first-child {
  display: grid;
  gap: 3px;
}

.print-center-page .print-workspace-head strong {
  color: #20473f;
  font-size: 12px;
}

.print-center-page .print-workspace-head span {
  color: var(--print-muted);
  font-size: 9px;
}

.print-center-page .print-workspace-legend {
  align-items: center;
  display: flex;
  gap: 9px;
}

.print-center-page .print-workspace-legend > span {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}

.print-center-page .print-workspace-legend i {
  background: #87b5a7;
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.print-center-page .print-paper {
  height: auto;
}

.print-center-page .print-document-header {
  align-items: center;
  border-bottom: 2px solid #315e57;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1.35fr 1fr;
  padding-bottom: 10px;
}

.print-center-page .print-document-brand {
  display: flex;
  min-width: 0;
}

.print-center-page .logo-left .print-document-brand { justify-content: flex-start; }
.print-center-page .logo-center .print-document-brand { justify-content: center; }
.print-center-page .logo-right .print-document-brand { justify-content: flex-end; }

.print-center-page .print-document-logo {
  display: block;
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
}

.print-center-page .print-document-logo-fallback {
  color: #15584d;
  font-size: 14px;
}

.print-center-page .print-document-title {
  min-width: 0;
  text-align: center;
}

.print-center-page .print-document-title h1 {
  font-size: 20px;
  letter-spacing: .12em;
  margin: 0;
}

.print-center-page .print-document-title span {
  color: #71817d;
  font-size: 9px;
}

.print-center-page .print-document-header-spacer {
  min-width: 0;
}

.print-center-page .print-paper-fold-note {
  color: #9aa7a4;
  font-size: 8px;
  margin-top: 5px;
  text-align: right;
}

.print-center-page .print-layout-canvas {
  display: grid;
  gap: 7px;
  min-height: 250px;
}

.print-center-page .print-block-editor-head {
  gap: 4px;
}

.print-center-page .print-block-editor-head input,
.print-center-page .print-block-editor-head select {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #35534d;
  font: inherit;
  font-size: 10px;
  height: 27px;
  min-width: 0;
  outline: none;
}

.print-center-page .print-block-editor-head input {
  flex: 1;
  font-weight: 750;
  padding: 0 5px;
}

.print-center-page .print-block-editor-head select {
  padding: 0 3px;
  width: 50px;
}

.print-center-page .print-block-editor-head .print-block-collection-select {
  color: var(--zg-blue-700, #2357d7);
  flex: 0 1 138px;
  font-weight: 720;
  max-width: 138px;
  min-width: 94px;
  width: auto;
}

.print-center-page .print-block-editor-head input:focus,
.print-center-page .print-block-editor-head select:focus {
  background: #fff;
  border-color: var(--zg-blue-300, #9abcf8);
}

.print-center-page .print-block-drag {
  color: #81928e;
  cursor: grab;
}

.print-center-page .print-info-grid,
.print-center-page .print-total-grid {
  border-left: 1px solid #c1ceca;
  border-top: 1px solid #c1ceca;
  display: grid;
  grid-template-columns: repeat(var(--print-columns, 2), minmax(0, 1fr));
}

.print-center-page .print-info-grid > div,
.print-center-page .print-total-grid > div {
  border-bottom: 1px solid #c1ceca;
  border-right: 1px solid #c1ceca;
  min-width: 0;
}

.print-center-page .print-layout-field {
  align-items: center;
  border-bottom: 1px solid #c1ceca;
  display: flex;
  gap: 4px;
  justify-content: space-between;
  min-height: 31px;
  padding: 4px 5px;
}

.print-center-page .print-layout-field > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.print-center-page .print-layout-field small {
  color: #647a74;
  font-size: 8px;
}

.print-center-page .print-layout-field strong {
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-layout-field button,
.print-center-page .print-table-field-head button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #9a7778;
  cursor: pointer;
  display: inline-flex;
  height: 20px;
  justify-content: center;
  padding: 0;
  width: 20px;
}

.print-center-page .print-document-table {
  border-collapse: collapse;
  font-size: 8px;
  table-layout: auto;
  width: 100%;
}

.print-center-page .print-document-table th,
.print-center-page .print-document-table td {
  border: 1px solid #9eaeab;
  min-width: 34px;
  padding: 4px 3px;
  text-align: left;
  word-break: break-all;
}

.print-center-page .print-document-table th {
  background: #eaf2f0;
  color: #2d5049;
}

.print-center-page .print-table-field-head {
  align-items: center;
  display: flex;
  gap: 2px;
  justify-content: space-between;
}

.print-center-page .print-note-grid {
  display: grid;
  gap: 4px;
}

.print-center-page .print-note-grid .print-layout-field {
  border: 1px solid #c1ceca;
  min-height: 42px;
}

.print-center-page .print-signature-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(var(--print-columns, 3), minmax(0, 1fr));
}

.print-center-page .print-signature-grid .print-layout-field {
  border: 1px dashed #bdcac7;
}

.print-center-page .print-separator {
  border-top: 1px solid #697d79;
  margin: 8px 0;
}

.print-center-page .print-spacer { height: 22px; }

.print-center-page .print-custom-text-input {
  border: 1px solid #c9d6d2;
  border-radius: 6px;
  color: #334b46;
  font: inherit;
  font-size: 9px;
  min-height: 60px;
  padding: 7px;
  resize: vertical;
  width: 100%;
}

.print-center-page .print-empty-canvas {
  align-items: center;
  border: 1px dashed #b8c9c4;
  color: #6f837e;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  min-height: 180px;
  text-align: center;
}

.print-center-page .print-empty-canvas span {
  font-size: 9px;
}

.print-center-page .print-settings-sidebar {
  overflow-y: auto;
}

.print-center-page .print-settings-section {
  border-bottom: 1px solid var(--print-soft-line);
  flex: 0 0 auto;
  min-width: 0;
}

.print-center-page .print-settings-section > .print-sidebar-head {
  min-height: 46px;
  padding: 11px 12px 7px;
}

.print-center-page .print-field-palette {
  max-height: 300px;
}

.print-center-page .print-field-group > h4 {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.print-center-page .print-field-group > h4 span {
  background: #edf3f1;
  border-radius: 99px;
  color: #6c817b;
  padding: 2px 6px;
}

.print-center-page .print-field-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.print-center-page .print-field-chip > small {
  color: #8b9a96;
  font-size: 7px;
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-block-library {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 10px 12px;
}

.print-center-page .print-block-library button {
  align-items: center;
  background: #f7faf9;
  border: 1px solid #dce6e3;
  border-radius: 7px;
  color: #4c6761;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 9px;
  gap: 5px;
  justify-content: flex-start;
  min-height: 34px;
  padding: 5px 7px;
}

.print-center-page .print-block-library button:hover {
  background: var(--print-green-100);
  border-color: #aecbc2;
}

.print-center-page .print-page-settings {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  padding: 0 11px 14px;
}

.print-center-page .print-page-settings > .print-sidebar-head,
.print-center-page .print-page-settings > .print-switch-row,
.print-center-page .print-page-settings > label:last-child {
  grid-column: 1 / -1;
}

.print-center-page .print-page-settings > .print-sidebar-head {
  margin: 0 -11px;
}

.print-center-page .print-page-settings label {
  color: #536d67;
  display: grid;
  font-size: 9px;
  gap: 5px;
  min-width: 0;
}

.print-center-page .print-page-settings input,
.print-center-page .print-page-settings select {
  background: #fff;
  border: 1px solid var(--print-line);
  border-radius: 7px;
  color: var(--print-ink);
  font: inherit;
  font-size: 10px;
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  width: 100%;
}

.print-center-page .print-page-settings input[type="range"] {
  accent-color: var(--print-green-700);
  padding: 0;
}

.print-center-page .print-page-settings input[type="checkbox"] {
  accent-color: var(--print-green-700);
  height: 18px;
  width: 18px;
}

.print-center-page .print-dimension-grid {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-center-page .print-switch-row {
  align-items: center;
  background: #f5f8f7;
  border: 1px solid var(--print-soft-line);
  border-radius: 8px;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  padding: 8px;
}

.print-center-page .print-switch-row > span {
  display: grid;
  gap: 2px;
}

.print-center-page .print-switch-row small {
  color: #879792;
}

.modal-backdrop .print-save-as-dialog,
.modal-backdrop .print-document-picker {
  background: #fff;
  border: 1px solid #dbe5e2;
  border-radius: 16px;
  box-shadow: 0 26px 74px rgba(12, 49, 43, .28);
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  max-height: calc(100vh - 44px);
  overflow: hidden;
  padding: 0;
  width: min(720px, calc(100vw - 32px));
}

.modal-backdrop .print-save-as-dialog {
  width: min(510px, calc(100vw - 32px));
}

.print-dialog-head {
  align-items: flex-start;
  border-bottom: 1px solid #e5ecea;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 18px 20px;
}

.print-dialog-head > div > span {
  color: #a57631;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .14em;
}

.print-dialog-head h3 {
  color: #183d37;
  font-size: 18px;
  margin: 4px 0 3px;
}

.print-dialog-head p {
  color: #758782;
  font-size: 10px;
  line-height: 1.55;
  margin: 0;
}

.print-dialog-body,
.print-picker-search {
  display: grid;
  gap: 12px;
  padding: 17px 20px;
}

.print-dialog-body label,
.print-picker-search label {
  color: #526a65;
  display: grid;
  font-size: 10px;
  gap: 6px;
}

.print-dialog-body input,
.print-picker-search input {
  border: 1px solid #d7e2df;
  border-radius: 8px;
  font: inherit;
  height: 40px;
  outline: none;
  padding: 0 11px;
  width: 100%;
}

.print-dialog-foot {
  align-items: center;
  border-top: 1px solid #e5ecea;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 13px 20px;
}

.print-picker-search {
  align-items: end;
  background: #f7faf9;
  grid-template-columns: minmax(0, 1fr) auto;
}

.print-picker-search label {
  position: relative;
}

.print-picker-search label > svg {
  bottom: 12px;
  color: #879893;
  left: 11px;
  position: absolute;
}

.print-picker-search input {
  padding-left: 34px;
}

.print-picker-results {
  min-height: 220px;
  overflow: auto;
  padding: 0 20px 20px;
}

.print-picker-list {
  display: grid;
  gap: 7px;
}

.print-picker-list > button {
  align-items: center;
  background: #fff;
  border: 1px solid #e0e8e6;
  border-radius: 9px;
  color: #344f49;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.4fr) auto;
  min-height: 58px;
  padding: 9px 12px;
  text-align: left;
}

.print-picker-list > button:hover {
  background: #f3f9f6;
  border-color: #aecbc2;
}

.print-picker-list > button > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.print-picker-list > button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-picker-list > button small {
  color: #83938f;
  font-size: 9px;
}

.print-picker-list > button em {
  color: #146d60;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .print-center-page .print-center-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .print-center-page .print-toolbar-identity,
  .print-center-page .print-toolbar-actions {
    flex-basis: auto;
    flex-grow: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 950px) {
  .print-center-page .print-designer-shell {
    max-height: none;
  }

  .print-center-page .print-settings-sidebar {
    max-height: none;
    overflow: visible;
  }

  .print-center-page .print-field-palette {
    max-height: 340px;
  }
}

@media (max-width: 650px) {
  .print-center-page .print-center-toolbar {
    border-radius: 13px;
    padding: 16px;
  }

  .print-center-page .print-toolbar-identity,
  .print-center-page .print-toolbar-actions {
    display: grid;
    flex-basis: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .print-center-page .print-toolbar-kicker,
  .print-center-page .print-toolbar-identity label,
  .print-center-page .print-save-status {
    grid-column: 1 / -1;
  }

  .print-center-page .print-toolbar-identity label {
    align-items: stretch;
    display: grid;
  }

  .print-center-page .print-toolbar-identity input,
  .print-center-page .print-toolbar-actions .btn {
    width: 100%;
  }

  .print-center-page .print-toolbar-divider {
    display: none;
  }

  .print-center-page .print-workspace-legend {
    display: none;
  }

  .print-center-page .print-page-settings {
    grid-template-columns: 1fr;
  }

  .print-center-page .print-page-settings > *,
  .print-center-page .print-dimension-grid {
    grid-column: 1;
  }

  .print-picker-search,
  .print-picker-list > button {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .print-designer-shell {
    grid-template-columns: minmax(180px, 205px) minmax(0, 1fr) minmax(230px, 250px);
  }

  .print-document-type {
    gap: 6px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .print-field-group-body,
  .print-field-groups section > div,
  .print-field-groups details > div {
    grid-template-columns: 1fr;
  }

  .print-settings-form {
    grid-template-columns: 1fr;
  }

  .print-settings-form > * {
    grid-column: auto;
  }

  .print-canvas-stage {
    justify-content: flex-start;
    padding-left: 26px;
    padding-right: 26px;
  }
}

@media (max-width: 950px) {
  .print-template-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 23px 25px;
  }

  .print-template-hero > div:last-child,
  .print-template-hero .print-designer-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .print-designer-shell {
    grid-template-areas:
      "templates"
      "canvas"
      "properties";
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    overflow: visible;
  }

  .print-template-sidebar {
    border-bottom: 1px solid var(--print-line);
    border-right: 0;
    max-height: 390px;
  }

  .print-document-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 208px;
  }

  .print-template-list {
    display: flex;
    flex: 0 0 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .print-template-card {
    flex: 0 0 190px;
  }

  .print-template-sidebar > footer,
  .print-template-sidebar > .print-template-sidebar-actions {
    display: flex;
  }

  .print-template-sidebar > footer .btn,
  .print-template-sidebar > .print-template-sidebar-actions .btn {
    flex: 1;
  }

  .print-designer-main {
    min-height: 680px;
  }

  .print-canvas-stage {
    min-height: 610px;
  }

  .print-properties {
    border-left: 0;
    border-top: 1px solid var(--print-line);
    max-height: 560px;
  }

  .print-field-group-body,
  .print-field-groups section > div,
  .print-field-groups details > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .print-settings-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .print-settings-form > h3,
  .print-settings-form > h4,
  .print-settings-form > .full,
  .print-settings-form > .wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 650px) {
  .print-template-page,
  .print-center-page {
    gap: 10px;
  }

  .print-template-hero {
    border-radius: 14px;
    min-height: 0;
    padding: 20px;
  }

  .print-template-hero h1,
  .print-template-hero h2 {
    font-size: 22px;
  }

  .print-template-hero p {
    font-size: 11px;
  }

  .print-template-hero > div:last-child,
  .print-template-hero .print-designer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .print-template-hero .btn {
    min-width: 0;
    width: 100%;
  }

  .print-designer-shell {
    border-radius: 12px;
  }

  .print-document-types {
    grid-template-columns: 1fr;
    max-height: 236px;
  }

  .print-document-type {
    min-height: 46px;
  }

  .print-template-card {
    flex-basis: 170px;
  }

  .print-designer-toolbar {
    min-height: 58px;
    padding: 8px 10px;
  }

  .print-save-state {
    margin-left: 0;
  }

  .print-designer-main {
    min-height: 565px;
  }

  .print-canvas-stage {
    justify-content: flex-start;
    min-height: 505px;
    padding: 37px 14px 22px;
  }

  .print-canvas-stage::before {
    left: 8px;
    max-width: calc(100% - 16px);
    overflow: hidden;
    right: 8px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .print-paper {
    min-width: min(480px, calc(100vw - 66px));
  }

  .print-paper-inner {
    padding: var(--print-paper-padding, 20px);
  }

  .print-field-grid {
    grid-template-columns: 1fr;
  }

  .print-field-group-body,
  .print-field-groups section > div,
  .print-field-groups details > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-settings-form {
    grid-template-columns: 1fr;
  }

  .print-settings-form > * {
    grid-column: auto;
  }

  .print-document-picker {
    grid-template-columns: 1fr;
  }

  .print-document-picker .btn {
    width: 100%;
  }

  .print-preview-modal {
    border-radius: 12px;
    height: calc(100vh - 16px);
    max-height: calc(100vh - 16px);
    max-width: calc(100vw - 16px);
    width: calc(100vw - 16px);
  }

  .print-preview-modal > header,
  .print-preview-modal > footer,
  .print-preview-modal .print-preview-head,
  .print-preview-modal .print-preview-actions {
    align-items: stretch;
    flex-direction: column;
    padding: 11px 13px;
  }

  .print-preview-modal > footer .btn,
  .print-preview-modal .print-preview-actions .btn {
    width: 100%;
  }

  .print-preview-modal .print-preview-body,
  .print-preview-modal > main {
    padding: 14px;
  }

  .print-template-page button,
  .print-template-page [role="button"],
  .print-center-page button,
  .print-center-page [role="button"] {
    min-height: 42px;
  }
}

/* Tax invoice registers, fiscal snapshots, attachments and reversals */
.tax-list-summary {
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tax-list-summary article {
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 12px;
  box-shadow: 0 6px 17px rgba(20, 67, 59, .045);
  min-height: 83px;
  overflow: hidden;
  padding: 14px 16px;
  position: relative;
}

.tax-list-summary article::before {
  background: linear-gradient(180deg, var(--tax-green-700), #77b5a5);
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 3px;
}

.tax-list-summary article:nth-child(2)::before {
  background: linear-gradient(180deg, #367589, #78a7b5);
}

.tax-list-summary article:nth-child(3)::before {
  background: linear-gradient(180deg, #aa752a, #d6a65d);
}

.tax-list-summary article:nth-child(4)::before {
  background: linear-gradient(180deg, #795c80, #ab88ad);
}

.tax-list-summary span {
  color: var(--tax-muted);
  display: block;
  font-size: 9px;
  font-weight: 700;
}

.tax-list-summary strong {
  color: #1c4d43;
  display: block;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-invoice-page.sales .tax-page-toolbar {
  border-left: 4px solid var(--tax-green-700);
}

.tax-invoice-page.purchase .tax-page-toolbar {
  border-left: 4px solid #39798a;
}

.tax-reversal-page .tax-page-toolbar {
  border-left: 4px solid #b15557;
}

.tax-snapshot-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tax-snapshot-grid fieldset {
  background: #f8fbfa;
  border: 1px solid var(--tax-line);
  border-radius: 11px;
  display: grid;
  gap: 11px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  min-width: 0;
  padding: 16px 13px 13px;
}

.tax-snapshot-grid fieldset:first-child {
  border-top: 3px solid var(--tax-green-700);
}

.tax-snapshot-grid fieldset:last-child {
  border-top: 3px solid var(--tax-gold-500);
}

.tax-snapshot-grid legend {
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 99px;
  color: #315b52;
  font-size: 9px;
  font-weight: 800;
  margin-left: 2px;
  padding: 4px 9px;
}

.tax-snapshot-grid label {
  color: #536d66;
  display: grid;
  font-size: 9px;
  font-weight: 700;
  gap: 5px;
  min-width: 0;
}

.tax-snapshot-grid label:nth-of-type(n+3) {
  grid-column: 1 / -1;
}

.tax-snapshot-grid input {
  background: #fff;
  border: 1px solid var(--tax-line);
  border-radius: 7px;
  color: var(--tax-ink);
  font: inherit;
  font-size: 10px;
  height: 39px;
  min-width: 0;
  outline: none;
  padding: 0 9px;
  width: 100%;
}

.tax-attachment-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tax-attachment-slot {
  align-items: center;
  background: #fafcfb;
  border: 1px dashed #bdcec9;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  min-height: 82px;
  padding: 11px 12px;
}

.tax-attachment-slot.uploaded {
  background: #f0f8f4;
  border-style: solid;
  border-color: #badbce;
}

.tax-attachment-slot > span {
  align-items: center;
  background: #edf3f1;
  border-radius: 9px;
  color: #698079;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.tax-attachment-slot.uploaded > span {
  background: #ddefe8;
  color: var(--tax-green-700);
}

.tax-attachment-slot > div:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tax-attachment-slot strong {
  color: #385850;
  font-size: 10px;
}

.tax-attachment-slot small {
  color: #556e67;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-attachment-slot em {
  color: #8a9b96;
  font-size: 8px;
  font-style: normal;
}

.tax-attachment-slot > div:last-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.tax-attachment-slot a {
  color: var(--tax-green-700);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.tax-attachment-slot .btn {
  border-radius: 6px;
  min-height: 29px;
}

.tax-attachment-slot button[data-tax-attachment-remove] {
  background: transparent;
  border: 0;
  color: #ad4c52;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  min-height: 29px;
  padding: 3px 5px;
}

.tax-attachment-slot button[data-tax-attachment-remove]:disabled {
  color: #b6c1be;
  cursor: not-allowed;
}

.tax-attachment-detail {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.tax-attachment-detail > a {
  align-items: center;
  background: #f7faf9;
  border: 1px solid #e0e9e6;
  border-radius: 9px;
  color: #345a52;
  display: grid;
  gap: 9px;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 9px 10px;
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.tax-attachment-detail > a:hover {
  background: #edf7f3;
  border-color: #b7d4ca;
  transform: translateY(-1px);
}

.tax-attachment-detail > a > span {
  align-items: center;
  background: #e6f1ed;
  border-radius: 8px;
  color: var(--tax-green-700);
  display: flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.tax-attachment-detail > a > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tax-attachment-detail strong {
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-attachment-detail small {
  color: var(--tax-muted);
  font-size: 8px;
}

.tax-invoice-amount-cards {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
}

.tax-invoice-amount-cards article {
  background: #f7faf9;
  border: 1px solid #e0e9e6;
  border-radius: 9px;
  min-height: 69px;
  padding: 11px 12px;
}

.tax-invoice-amount-cards article:nth-child(3),
.tax-invoice-amount-cards article:nth-last-child(1) {
  background: #eef8f4;
  border-color: #c8e1d7;
}

.tax-invoice-amount-cards span {
  color: var(--tax-muted);
  display: block;
  font-size: 9px;
}

.tax-invoice-amount-cards strong {
  color: #1b6253;
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin-top: 7px;
}

.tax-direction {
  align-items: center;
  background: #eaf7f2;
  border: 1px solid #c5e3d7;
  border-radius: 99px;
  color: #197258;
  display: inline-flex;
  font-size: 9px;
  font-weight: 750;
  min-height: 23px;
  padding: 3px 8px;
  white-space: nowrap;
}

.tax-direction.purchase {
  background: #edf5f8;
  border-color: #c9dfe5;
  color: #2d6c7b;
}

.tax-reversal-editor .tax-section-title > span {
  background: linear-gradient(135deg, #9d474c, #c16061);
}

.tax-reversal-editor .tax-totals-strip .primary {
  background: linear-gradient(135deg, #843d41, #b05254);
}

.tax-reversal-editor .tax-editor-foot {
  background: #fffafa;
}

.tax-reversal-editor input[readonly],
.tax-document-editor input[readonly],
.tax-document-editor select:disabled {
  background: #f1f4f3;
  color: #6d7e7a;
  cursor: not-allowed;
}

@media (max-width: 950px) {
  .tax-list-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tax-snapshot-grid {
    grid-template-columns: 1fr;
  }

  .tax-attachment-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .tax-list-summary {
    grid-template-columns: 1fr;
  }

  .tax-list-summary article {
    min-height: 74px;
  }

  .tax-snapshot-grid fieldset {
    grid-template-columns: 1fr;
  }

  .tax-snapshot-grid label:nth-of-type(n+3) {
    grid-column: auto;
  }

  .tax-attachment-slot {
    align-items: start;
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .tax-attachment-slot > span {
    height: 34px;
    width: 34px;
  }

  .tax-attachment-slot > div:last-child {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .tax-attachment-detail,
  .tax-invoice-amount-cards {
    grid-template-columns: 1fr;
  }
}

.tax-invoice-detail .tax-invoice-amount-cards article:nth-child(5) {
  background: #fff8ea;
  border-color: #ead6ae;
}

.tax-invoice-detail .tax-invoice-amount-cards article:nth-child(5) strong {
  color: #96651e;
}

.tax-reversal-detail .drawer-head {
  background:
    radial-gradient(circle at 92% 8%, rgba(230, 185, 106, .2), transparent 29%),
    linear-gradient(120deg, #543330, #80443f 72%, #9a7138 145%);
}

.tax-reversal-detail .detail-section > h3 {
  color: #70423e;
}

.tax-readonly-note {
  align-items: flex-start;
  background: #fff8e9;
  border: 1px solid #ead7b2;
  border-radius: 9px;
  color: #806126;
  display: flex;
  font-size: 9px;
  gap: 7px;
  line-height: 1.55;
  margin-bottom: 12px;
  padding: 9px 11px;
}

.tax-readonly-note::before {
  background: #c59243;
  border-radius: 50%;
  content: "";
  flex: 0 0 auto;
  height: 7px;
  margin-top: 4px;
  width: 7px;
}

/* Unified sales, purchase, shipment, inbound and return list workspace */
.business-list-page {
  --business-green-950: #0a302d;
  --business-green-900: #103f39;
  --business-green-800: #15584d;
  --business-green-700: #1d725f;
  --business-green-500: #4a9c85;
  --business-green-100: #eaf5f1;
  --business-green-50: #f5faf8;
  --business-gold-600: #a9762d;
  --business-gold-500: #c5964b;
  --business-gold-100: #f8ecd8;
  --business-blue-700: #326c7e;
  --business-blue-100: #e9f3f6;
  --business-ink: #1b332f;
  --business-muted: #6d817c;
  --business-line: #dbe6e2;
  --business-soft-line: #e9efed;
  color: var(--business-ink);
  display: grid;
  gap: 13px;
  min-width: 0;
}

.business-list-page * {
  box-sizing: border-box;
}

.business-list-hero {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
    radial-gradient(circle at 89% 7%, rgba(217, 173, 96, .23), transparent 28%),
    linear-gradient(122deg, var(--business-green-950), var(--business-green-800) 70%, #84612f 137%);
  background-size: 32px 32px, 32px 32px, auto, auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 17px;
  box-shadow: 0 14px 34px rgba(15, 62, 55, .14);
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 112px;
  overflow: hidden;
  padding: 18px 24px;
  position: relative;
}

.business-list-hero::before,
.business-list-hero::after {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.business-list-hero::before {
  height: 230px;
  right: -85px;
  top: -145px;
  width: 230px;
}

.business-list-hero::after {
  bottom: -128px;
  height: 180px;
  right: 170px;
  width: 180px;
}

.business-list-hero > * {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.business-list-hero-copy {
  max-width: 840px;
}

.business-list-hero-copy > span {
  color: #e7c58c;
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .18em;
}

.business-list-hero-copy h2 {
  color: #fff;
  font-size: clamp(22px, 1.9vw, 28px);
  letter-spacing: .015em;
  margin: 6px 0 7px;
}

.business-list-hero-copy p {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  line-height: 1.7;
  margin: 0;
}

.business-list-hero-side {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
}

.business-list-hero-side > small {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 99px;
  color: rgba(255, 255, 255, .7);
  display: inline-flex;
  font-size: 10px;
  min-height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}

.business-list-hero .btn {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .24);
  border-radius: 8px;
  color: #fff;
  min-height: 39px;
}

.business-list-hero .btn:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .4);
}

.business-list-hero .btn-primary {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 8px 20px rgba(4, 29, 25, .2);
  color: var(--business-green-800);
}

.business-list-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.business-list-metrics article {
  background: #fff;
  border: 1px solid var(--business-line);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(22, 67, 59, .045);
  min-height: 88px;
  overflow: hidden;
  padding: 14px 16px 13px;
  position: relative;
}

.business-list-metrics article::before {
  background: linear-gradient(90deg, var(--business-green-700), #76b7a5);
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.business-list-metrics article:nth-child(2)::before,
.business-list-metrics article.purchase::before,
.business-list-metrics article.info::before {
  background: linear-gradient(90deg, #367486, #7aabb8);
}

.business-list-metrics article:nth-child(3)::before,
.business-list-metrics article.amount::before,
.business-list-metrics article.money::before {
  background: linear-gradient(90deg, #a9752c, #d3a25b);
}

.business-list-metrics article:nth-child(4)::before,
.business-list-metrics article.warning::before,
.business-list-metrics article.risk::before {
  background: linear-gradient(90deg, #7b5d82, #ad8aaf);
}

.business-list-metrics span,
.business-list-metrics small {
  display: block;
}

.business-list-metrics span {
  color: var(--business-muted);
  font-size: 11px;
  font-weight: 700;
}

.business-list-metrics strong {
  color: #1d4b42;
  display: block;
  font-size: clamp(17px, 1.5vw, 22px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin: 7px 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-list-metrics small {
  color: #849590;
  font-size: 11px;
  line-height: 1.4;
}

.business-list-filter {
  background: #fff;
  border: 1px solid var(--business-line);
  border-radius: 13px;
  box-shadow: 0 7px 19px rgba(20, 66, 58, .04);
  overflow: visible;
  padding: 0;
  position: relative;
  z-index: 12;
}

.business-list-filter > .business-filter-bar,
.business-list-page .business-list-filters,
.business-list-page .business-filter-bar {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(33, 111, 94, .035), transparent 38%),
    #fff;
  border: 0;
  border-radius: inherit;
  box-shadow: none;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  margin: 0;
  min-width: 0;
  padding: 14px 15px;
}

.business-list-page .business-filter-bar > label,
.business-list-page .business-list-filters > label {
  align-items: end;
  display: grid;
  grid-template-rows: auto 40px;
  min-width: 0;
}

.business-list-page .business-filter-bar label > span,
.business-list-page .business-list-filters label > span {
  color: #4f6963;
  display: block;
  font-size: 11px;
  font-weight: 750;
  margin: 0 0 6px;
}

.business-list-page .business-filter-bar input,
.business-list-page .business-filter-bar select,
.business-list-page .business-filter-bar .searchable-select-input,
.business-list-page .business-list-filters input,
.business-list-page .business-list-filters select,
.business-list-page .business-list-filters .searchable-select-input {
  background: #fbfdfc;
  border: 1px solid var(--business-line);
  border-radius: 8px;
  color: var(--business-ink);
  font: inherit;
  height: 40px;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  outline: none;
  padding: 0 10px;
  width: 100%;
}

.business-list-page .business-filter-bar .searchable-select,
.business-list-page .business-list-filters .searchable-select {
  min-width: 0;
  width: 100%;
}

.business-list-page .business-date-filter {
  min-width: 155px;
}

.business-list-page .business-keyword {
  grid-column: span 2;
  min-width: 230px;
}

.business-list-page .business-query-button {
  border-radius: 8px;
  height: 40px;
  min-width: 90px;
  white-space: nowrap;
}

.business-list-page .business-filter-bar input:focus,
.business-list-page .business-filter-bar select:focus,
.business-list-page .business-filter-bar .searchable-select-input:focus,
.business-list-page .business-list-filters input:focus,
.business-list-page .business-list-filters select:focus,
.business-list-page .business-list-filters .searchable-select-input:focus {
  background: #fff;
  border-color: var(--business-green-700);
  box-shadow: 0 0 0 3px rgba(29, 114, 95, .11);
}

.business-list-page .btn-primary {
  background: linear-gradient(135deg, var(--business-green-800), var(--business-green-700));
  border-color: var(--business-green-800);
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(21, 88, 77, .14);
}

.business-list-page .btn-primary:hover {
  background: var(--business-green-900);
  border-color: var(--business-green-900);
}

.business-list-data,
.business-list-page .business-list-table {
  background: #fff;
  border: 1px solid var(--business-line);
  border-radius: 13px;
  box-shadow: 0 8px 23px rgba(21, 65, 57, .05);
  min-width: 0;
  overflow: hidden;
}

.business-list-result-head {
  align-items: flex-end;
  background: #fff;
  border-bottom: 1px solid var(--business-soft-line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 61px;
  padding: 13px 16px 11px;
}

.business-list-result-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.business-list-result-head strong {
  color: #214940;
  font-size: 13px;
}

.business-list-result-head span {
  color: var(--business-muted);
  font-size: 11px;
}

.business-list-result-head > span {
  background: var(--business-green-100);
  border: 1px solid #cce1d9;
  border-radius: 99px;
  color: var(--business-green-700);
  flex: 0 0 auto;
  font-weight: 750;
  min-height: 24px;
  padding: 5px 8px;
  white-space: nowrap;
}

.business-list-data .table-scroll,
.business-list-page .business-list-table .table-scroll {
  max-height: max(400px, calc(100vh - 405px));
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #afc4bd transparent;
  scrollbar-width: thin;
}

.business-data-table,
.business-list-page table.business-list-table,
.business-list-page .business-list-table table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1240px;
  width: 100%;
}

.business-data-table thead,
.business-list-page table.business-list-table thead,
.business-list-page .business-list-table table thead {
  position: relative;
  z-index: 5;
}

.business-data-table th,
.business-list-page table.business-list-table th,
.business-list-page .business-list-table table th {
  background: #eef5f2;
  border-bottom: 1px solid #cfded9;
  color: #3c5c55;
  font-size: 11px;
  font-weight: 780;
  height: 43px;
  padding: 8px 10px;
  position: sticky;
  text-align: left;
  top: 0;
  white-space: nowrap;
  z-index: 4;
}

.business-data-table td,
.business-list-page table.business-list-table td,
.business-list-page .business-list-table table td {
  background: #fff;
  border-bottom: 1px solid #edf1f0;
  color: #3d504b;
  font-size: 12px;
  height: 50px;
  max-width: 240px;
  padding: 8px 10px;
  vertical-align: middle;
}

.business-data-table tbody tr,
.business-list-page table.business-list-table tbody tr,
.business-list-page .business-list-table table tbody tr {
  transition: background .13s ease;
}

.business-data-table tbody tr:hover td,
.business-list-page table.business-list-table tbody tr:hover td,
.business-list-page .business-list-table table tbody tr:hover td {
  background: #f2f8f5;
}

.business-data-table th:first-child,
.business-data-table td:first-child,
.business-list-page table.business-list-table th:first-child,
.business-list-page table.business-list-table td:first-child,
.business-list-page .business-list-table table th:first-child,
.business-list-page .business-list-table table td:first-child {
  left: 0;
  min-width: 132px;
  position: sticky;
}

.business-data-table th:first-child,
.business-list-page table.business-list-table th:first-child,
.business-list-page .business-list-table table th:first-child {
  background: #e8f2ef;
  box-shadow: 1px 0 #d0dfda;
  z-index: 7;
}

.business-data-table td:first-child,
.business-list-page table.business-list-table td:first-child,
.business-list-page .business-list-table table td:first-child {
  box-shadow: 1px 0 #e2ebe8;
  z-index: 2;
}

.business-data-table tbody tr:hover td:first-child,
.business-list-page table.business-list-table tbody tr:hover td:first-child,
.business-list-page .business-list-table table tbody tr:hover td:first-child {
  background: #edf7f3;
}

.business-data-table .sticky-actions,
.business-list-page table.business-list-table .sticky-actions,
.business-list-page .business-list-table table .sticky-actions {
  box-shadow: -5px 0 10px rgba(25, 65, 58, .055);
  min-width: 116px;
  position: sticky;
  right: 0;
}

.business-list-page .business-data-table.quote-list-table {
  min-width: 1500px;
}

.business-list-page .business-data-table.sales-order-list-table {
  min-width: 1320px;
}

.business-list-page .business-data-table.purchase-order-list-table {
  min-width: 1220px;
}

.business-list-page .business-data-table.sales-tracking-table,
.business-list-page .business-data-table.purchase-tracking-table {
  min-width: 1780px;
}

.business-list-page .business-data-table.sales-shipment-detail-table {
  min-width: 1740px;
}

.business-list-page .business-data-table.purchase-inbound-detail-table {
  min-width: 1580px;
}

.business-list-page .purchase-return-list-panel .business-data-table {
  min-width: 1320px;
}

.business-data-table th.sticky-actions,
.business-list-page table.business-list-table th.sticky-actions,
.business-list-page .business-list-table table th.sticky-actions {
  background: #e8f2ef;
  text-align: center;
  z-index: 7;
}

.business-data-table td.sticky-actions,
.business-list-page table.business-list-table td.sticky-actions,
.business-list-page .business-list-table table td.sticky-actions {
  background: #fff;
  z-index: 3;
}

.business-data-table tbody tr:hover td.sticky-actions,
.business-list-page table.business-list-table tbody tr:hover td.sticky-actions,
.business-list-page .business-list-table table tbody tr:hover td.sticky-actions {
  background: #edf7f3;
}

.business-list-page .cell-primary,
.business-list-page .amount-stack,
.business-list-page .quantity-stack,
.business-list-page .date-stack,
.business-list-page .progress-stack {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.business-list-page .cell-primary > strong,
.business-list-page .amount-stack > strong,
.business-list-page .quantity-stack > strong,
.business-list-page .date-stack > strong,
.business-list-page .progress-stack > strong {
  color: #294a43;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-list-page .cell-primary > span,
.business-list-page .amount-stack > span,
.business-list-page .quantity-stack > span,
.business-list-page .date-stack > span,
.business-list-page .progress-stack > span,
.business-list-page .cell-sub {
  color: #748782;
  display: block;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
  max-width: 210px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-list-page .cell-primary > small,
.business-list-page .amount-stack > small,
.business-list-page .quantity-stack > small,
.business-list-page .date-stack > small,
.business-list-page .progress-stack > small {
  color: #98a6a2;
  display: block;
  font-size: 9px;
  line-height: 1.35;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-list-page .amount-stack > strong,
.business-list-page .money-cell,
.business-list-page .money-cell > strong {
  color: #176352;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.business-list-page .amount-stack > small {
  color: #9a661e;
}

.business-list-page .quantity-stack > strong {
  font-variant-numeric: tabular-nums;
}

.business-list-page .date-stack > strong {
  color: #354f49;
  font-variant-numeric: tabular-nums;
}

.business-list-page .code-cell,
.business-list-page .code-cell strong,
.business-list-page .cell-primary.code {
  color: #225d53;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  letter-spacing: .015em;
}

.business-list-page .status {
  background: var(--business-green-100);
  border: 1px solid #c5e2d7;
  border-radius: 99px;
  color: #187358;
  display: inline-flex;
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  margin-bottom: 4px;
  min-height: 23px;
  padding: 4px 8px;
  white-space: nowrap;
}

.business-list-page .status.draft {
  background: #fff8e8;
  border-color: #ead8b2;
  color: #8f671e;
}

.business-list-page .status.pending {
  background: #fff3e6;
  border-color: #edc99f;
  color: #9b5b18;
}

.business-list-page .status.progress {
  background: #edf4f8;
  border-color: #cbdde5;
  color: #386b7d;
}

.business-list-page .status.complete {
  background: #eaf8f2;
  border-color: #bde0d2;
  color: #157256;
}

.business-list-page .status.overdue {
  background: #fff0f0;
  border-color: #ebc9cb;
  color: #ad4047;
}

.business-list-page .sales-tax-badge {
  background: #eaf5f1;
  color: #176b59;
}

.business-list-page .purchase-progress-cell {
  gap: 3px;
  grid-template-columns: 1fr;
  grid-template-rows: 10px 7px;
  width: 100%;
  min-width: 0;
}

.business-list-page .purchase-progress-summary {
  background: transparent;
  border-radius: 0;
  height: 10px;
  overflow: visible;
}

.business-list-page .purchase-progress-cell > .purchase-progress-track {
  background: #e7efec;
  height: 7px;
}

.business-list-page .purchase-progress-cell > .purchase-progress-track i {
  background: linear-gradient(90deg, #2f6cff, #19aebd);
}

.business-list-page .purchase-progress-cell strong {
  color: #49635d;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  line-height: 10px;
  text-align: right;
}

.business-list-page .purchase-progress-cell.complete > .purchase-progress-track i {
  background: linear-gradient(90deg, #14835f, #42ae82);
}

.business-list-page .purchase-progress-cell.complete strong { color: #08785e; }
.business-list-page .purchase-progress-cell.pending > .purchase-progress-track i { background: #a8b4c2; }
.business-list-page .purchase-progress-cell.pending strong { color: #73818e; }

.business-list-page .purchase-progress-cell.overdue > .purchase-progress-track i {
  background: linear-gradient(90deg, #d94b55, #e28b45);
}

.business-list-page .purchase-progress-cell.overdue strong { color: #b33c48; }

.business-list-page .purchase-progress-cell.cancelled > .purchase-progress-track i {
  background: #b9c1c8;
}

.business-list-page .purchase-progress-cell.cancelled strong,
.business-list-page .purchase-receipt-state.cancelled { color: #7c878f; }

.document-summary-table .document-summary-cell > span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-summary-table .document-summary-cell {
  vertical-align: middle;
}

.subcontract-order-list-table .subcontract-list-progress {
  min-width: 112px;
}

.business-list-page .row-actions {
  flex-wrap: nowrap;
  justify-content: center;
}

.business-list-page .row-action {
  background: #fff;
  border: 1px solid #dce6e3;
  border-radius: 6px;
  color: #56736c;
  height: 29px;
  min-width: 29px;
  transition: background .13s ease, border-color .13s ease, color .13s ease, transform .13s ease;
}

.business-list-page .row-action:hover {
  background: var(--business-green-100);
  border-color: #b6d2c8;
  color: var(--business-green-700);
  transform: translateY(-1px);
}

.business-list-page .row-action:disabled {
  background: #f4f6f5;
  color: #b2bfbb;
  cursor: not-allowed;
  opacity: .7;
  transform: none;
}

.business-list-page .table-sort-button {
  color: inherit;
  font-size: inherit;
}

.business-list-page .table-sort-button span {
  color: var(--business-green-700);
}

.business-list-data .empty-state,
.business-list-page .business-list-table .empty-state {
  color: var(--business-muted);
  min-height: 164px !important;
}

.business-list-data .empty-state .empty-icon,
.business-list-page .business-list-table .empty-state .empty-icon {
  background: var(--business-green-100);
  color: var(--business-green-700);
}

.business-list-data .empty-state strong,
.business-list-page .business-list-table .empty-state strong {
  color: #49645d;
  font-size: 11px;
}

.business-list-data .table-foot,
.business-list-page .business-list-table .table-foot {
  align-items: center;
  background: #fafcfb;
  border-top: 1px solid var(--business-soft-line);
  color: var(--business-muted);
  display: flex;
  font-size: 10px;
  gap: 15px;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 14px;
}

.business-list-page button:focus-visible,
.business-list-page input:focus-visible,
.business-list-page select:focus-visible,
.business-list-page [tabindex]:focus-visible {
  border-color: var(--business-green-700);
  box-shadow: 0 0 0 3px rgba(29, 114, 95, .12);
  outline: none;
}

@media (max-width: 1280px) {
  .business-list-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-list-filter > .business-filter-bar,
  .business-list-page .business-list-filters,
  .business-list-page .business-filter-bar {
    grid-template-columns: repeat(3, minmax(155px, 1fr));
  }

  .business-list-page .business-keyword {
    grid-column: span 2;
  }
}

@media (max-width: 950px) {
  .business-list-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 21px 23px;
  }

  .business-list-hero-side {
    justify-content: flex-start;
    width: 100%;
  }

  .business-list-filter > .business-filter-bar,
  .business-list-page .business-list-filters,
  .business-list-page .business-filter-bar {
    grid-template-columns: repeat(2, minmax(155px, 1fr));
  }

  .business-list-page .business-keyword {
    grid-column: auto;
    min-width: 0;
  }

  .business-list-page .business-query-button {
    width: 100%;
  }

  .business-list-data .table-scroll,
  .business-list-page .business-list-table .table-scroll {
    max-height: none;
  }
}

@media (max-width: 650px) {
  .business-list-page {
    gap: 10px;
  }

  .business-list-hero {
    border-radius: 14px;
    min-height: 0;
    padding: 19px;
  }

  .business-list-hero-copy h2 {
    font-size: 22px;
  }

  .business-list-hero-copy p {
    font-size: 10px;
  }

  .business-list-hero-side {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }

  .business-list-hero-side .btn,
  .business-list-hero-side > small {
    justify-content: center;
    text-align: center;
    width: 100%;
  }

  .business-list-metrics {
    grid-template-columns: 1fr;
  }

  .business-list-metrics article {
    min-height: 78px;
  }

  .business-list-filter > .business-filter-bar,
  .business-list-page .business-list-filters,
  .business-list-page .business-filter-bar {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .business-list-page .business-keyword {
    grid-column: auto;
  }

  .business-list-result-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .business-list-data .table-scroll,
  .business-list-page .business-list-table .table-scroll {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
  }

  .business-data-table th:first-child,
  .business-data-table td:first-child,
  .business-list-page table.business-list-table th:first-child,
  .business-list-page table.business-list-table td:first-child,
  .business-list-page .business-list-table table th:first-child,
  .business-list-page .business-list-table table td:first-child {
    min-width: 118px;
  }

  .business-list-data .table-foot,
  .business-list-page .business-list-table .table-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* Final scoped refinements after legacy rules */
.today-business-page .status {
  background: var(--workspace-green-100);
}

.today-business-page .status.draft {
  background: #fff8e9;
  border-color: #ead7ac;
  color: #8d641b;
}

.today-business-page .status.progress {
  background: var(--workspace-blue-100);
  border-color: #cadde4;
  color: var(--workspace-blue-700);
}

.inventory-page .status {
  background: var(--workspace-green-100);
}

.inventory-page .status.draft {
  background: #fff8e9;
}

.product-list-filter > .btn {
  border-radius: 8px;
  height: 40px;
}

.today-business-analysis-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
}

.today-business-cash-panel,
.today-business-balance-panel {
  min-height: 244px;
}

.today-business-hero-compact {
  min-height: 100px;
}

.print-center-page .print-field-token-content {
  display: grid;
  flex: 1 1 auto;
  gap: 5px;
  min-width: 0;
}

.print-center-page .print-field-token-content > strong {
  color: #2a413c;
  font-size: 12px;
  line-height: 1.35;
}

.print-center-page .print-field-label-editor {
  display: grid;
  gap: 3px;
  min-width: 0;
  width: 100%;
}

.print-center-page .print-field-label-editor input {
  background: #fff;
  border: 1px solid #c9d8d3;
  border-radius: 5px;
  color: #294a42;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  height: 27px;
  line-height: 1;
  min-width: 0;
  outline: 0;
  padding: 0 7px;
  width: 100%;
}

.print-center-page .print-field-label-editor input::placeholder {
  color: #91a09c;
  font-weight: 500;
}

.print-center-page .print-field-label-editor input:hover {
  border-color: #a9c8be;
}

.print-center-page .print-field-label-editor input:focus {
  border-color: #277862;
  box-shadow: 0 0 0 3px rgba(39, 120, 98, .12);
}

.print-center-page .print-field-label-editor input[readonly] {
  background: #f2f5f4;
  color: #667873;
  cursor: not-allowed;
}

.print-center-page .print-field-label-editor small.print-field-binding {
  color: #748882;
  display: block;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 520;
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-layout-field:has(.print-field-label-editor) {
  align-items: flex-start;
  min-height: 62px;
  padding-block: 6px;
}

.print-center-page .print-table-field-head {
  align-items: flex-start;
  min-width: 92px;
}

.print-center-page .print-table-field-head .print-field-label-editor {
  flex: 1 1 72px;
  min-width: 68px;
}

.print-center-page .print-table-field-head .print-field-label-editor input {
  font-size: 12px;
  height: 26px;
  padding-inline: 5px;
}

.print-center-page .print-field-label-editor.compact .print-field-binding {
  max-width: 94px;
}

@media (max-width: 1180px) {
  .today-business-analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  .today-business-hero {
    flex-wrap: wrap;
  }

  .today-business-cash-pulse {
    flex-basis: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .product-list-filter input,
  .product-list-filter select,
  .product-list-filter .searchable-select-input,
  .inventory-page .inventory-warehouse-filter summary,
  .inventory-page .inventory-product-filter select,
  .inventory-page .inventory-product-filter .searchable-select-input,
  .inventory-page .inventory-keyword-filter input,
  .print-center-page .print-field-label-editor input {
    font-size: 16px;
  }

  .business-list-hero-copy p {
    font-size: 12px;
  }
}

/* ZHAOGOO website-aligned blue technology theme
   Brand reference: website blue #2f6cff, inquiry blue #0874c9 and deep navy #0b2d49.
   This layer changes application chrome only; printable document content is deliberately excluded. */
html,
body {
  background: var(--canvas);
  color: var(--ink);
}

::selection {
  background: rgba(47, 108, 255, .2);
  color: var(--zg-navy-950);
}

.boot-screen {
  background:
    radial-gradient(circle at 48% 26%, rgba(67, 133, 255, .16), transparent 32%),
    linear-gradient(145deg, #f8fbff, #edf4ff);
}

.boot-mark,
.brand-logo-fallback {
  background: linear-gradient(145deg, var(--zg-blue-600), var(--zg-cyan-500));
  box-shadow: 0 16px 34px rgba(35, 87, 215, .22);
}

.login-shell {
  background: #f1f6fc;
}

.login-hero {
  background:
    radial-gradient(circle at 82% 16%, rgba(25, 189, 216, .2), transparent 28%),
    linear-gradient(145deg, var(--zg-navy-950) 0%, var(--zg-navy-900) 56%, #164c8b 100%);
}

.login-hero::before,
.login-hero::after {
  border-color: rgba(83, 151, 255, .22);
}

.login-hero::after {
  background: radial-gradient(circle, rgba(67, 133, 255, .24), transparent 68%);
}

.login-submit {
  background: linear-gradient(135deg, var(--zg-blue-600), var(--zg-blue-700));
  box-shadow: 0 10px 22px rgba(47, 108, 255, .22);
}

.sidebar,
.supplier-portal-sidebar {
  background:
    radial-gradient(circle at 36% -3%, rgba(47, 108, 255, .22), transparent 29%),
    linear-gradient(180deg, var(--zg-navy-950) 0%, var(--zg-navy-900) 56%, #071a35 100%);
  box-shadow: 10px 0 32px rgba(6, 20, 43, .18);
  color: #dbe8f8;
}

.side-head,
.supplier-portal-brand {
  border-bottom-color: rgba(129, 178, 255, .13);
}

.side-title span,
.tenant-pill span,
.supplier-portal-brand span {
  color: #8bbcff;
}

.tenant-pill {
  background: rgba(3, 14, 33, .42);
  border-color: rgba(107, 158, 255, .22);
}

.nav-home,
.module-button {
  color: #b8cce4;
}

.nav-home:hover,
.module-button:hover,
.submenu button:hover,
.submenu a:hover {
  background: rgba(77, 132, 230, .12);
  color: #fff;
}

.nav-home.active,
.module.open .module-button {
  background: linear-gradient(90deg, rgba(47, 108, 255, .36), rgba(25, 189, 216, .08));
  box-shadow: inset 3px 0 var(--zg-cyan-500);
  color: #fff;
}

.submenu button,
.submenu a {
  color: #9bb4d0;
}

.submenu button::before,
.submenu a::before {
  background: #58789e;
}

.submenu button.active,
.submenu a.active {
  background: linear-gradient(90deg, rgba(47, 108, 255, .2), rgba(25, 189, 216, .05));
  color: #a9cdff;
}

.submenu button.active::before,
.submenu a.active::before {
  background: var(--zg-cyan-500);
  box-shadow: 0 0 0 3px rgba(25, 189, 216, .12);
}

.sidebar-collapse {
  background: #16467a;
  border-color: rgba(112, 171, 255, .44);
  color: #e5f2ff;
}

.sidebar-collapse:hover {
  background: var(--zg-blue-700);
}

.avatar {
  background: linear-gradient(145deg, var(--zg-blue-600), #238faf);
}

.topbar {
  background: rgba(249, 252, 255, .94);
  border-bottom-color: rgba(208, 222, 240, .94);
  box-shadow: 0 5px 18px rgba(24, 59, 104, .035);
}

.breadcrumbs {
  color: #7186a0;
}

.panel,
.form-card,
.kpi-card {
  border-color: rgba(213, 226, 241, .96);
  box-shadow: 0 9px 28px rgba(18, 59, 104, .055);
}

.panel-head,
.form-section-head {
  border-bottom-color: #e5edf7;
}

.form-section-head {
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.section-index,
.kpi-icon,
.empty-state .empty-icon {
  background: var(--zg-blue-100);
  color: var(--zg-blue-600);
}

.progress-track {
  background: #e8eef7;
}

.progress-bar {
  background: linear-gradient(90deg, var(--zg-blue-700), var(--zg-cyan-500));
}

.btn-primary,
.print-center-page .print-toolbar-actions .btn-primary {
  background: linear-gradient(135deg, var(--zg-blue-600), var(--zg-blue-700));
  border-color: var(--zg-blue-600);
  box-shadow: 0 7px 17px rgba(47, 108, 255, .2);
  color: #fff;
}

.btn-primary:hover,
.print-center-page .print-toolbar-actions .btn-primary:hover {
  background: linear-gradient(135deg, var(--zg-blue-700), #194abf);
  border-color: var(--zg-blue-700);
}

.btn-primary-soft {
  background: var(--zg-blue-50);
  border-color: #c8d9fb;
  color: var(--zg-blue-700);
}

.btn-primary-soft:hover {
  background: var(--zg-blue-100);
  border-color: #9ebdff;
}

.btn:not(.btn-primary):not(.btn-danger):not(.btn-danger-soft):hover {
  background: var(--zg-blue-50);
  border-color: #b9cef0;
}

.table-link,
.table-attachment,
.file-link,
.code-cell,
.secure-badge {
  color: var(--zg-blue-700);
}

.table-link:hover,
.table-attachment:hover,
.file-link:hover {
  color: #1748b9;
}

table:not(.print-document-table) th {
  background: #f1f6fc;
  color: #576f8c;
  font-size: 12px;
}

table:not(.print-document-table) td {
  border-top-color: #e5edf7;
  color: #263d59;
  font-size: 12px;
}

table:not(.print-document-table) tbody tr:hover {
  background: #f5f8ff;
}

.party-master-table tr[data-party-row]:hover,
.website-inquiry-list tbody tr.selected {
  background: #edf4ff;
  box-shadow: inset 3px 0 var(--zg-blue-600);
}

.searchable-select-menu {
  border-color: #c9d9ec;
  box-shadow: 0 16px 38px rgba(11, 45, 73, .18);
}

.searchable-select-menu button:hover,
.searchable-select-menu button.active {
  background: var(--zg-blue-50);
  color: var(--zg-blue-700);
}

input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--zg-blue-600);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box input:focus,
.customer-contact-main input:focus,
.customer-contact-main select:focus,
.customer-contact-address input:focus,
.customer-contact-address select:focus,
.eq-filter input:focus,
.eq-filter select:focus,
.report8d-filter input:focus,
.report8d-filter select:focus,
.report8d-team-table input:focus,
.report8d-team-table select:focus,
.report8d-action-table input:focus,
.report8d-action-table select:focus,
.report8d-action-table textarea:focus {
  border-color: var(--zg-blue-600);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12);
}

.searchable-select.open .searchable-select-input {
  border-color: var(--zg-blue-600) !important;
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12) !important;
}

.row-action:hover {
  background: var(--zg-blue-100);
  color: var(--zg-blue-700);
}

/* Legacy module theme variables now resolve to the same blue-white system. */
.today-business-page,
.product-list-page,
.inventory-page {
  --workspace-green-950: var(--zg-navy-950);
  --workspace-green-900: var(--zg-navy-900);
  --workspace-green-800: var(--zg-navy-800);
  --workspace-green-700: var(--zg-blue-600);
  --workspace-green-100: var(--zg-blue-100);
  --workspace-green-50: var(--zg-blue-50);
  --workspace-blue-700: #0874c9;
  --workspace-blue-100: #e8f6ff;
  --workspace-ink: var(--ink);
  --workspace-muted: var(--muted);
  --workspace-line: var(--line);
  --workspace-soft-line: #e9eff7;
}

.business-list-page {
  --business-green-950: var(--zg-navy-950);
  --business-green-900: var(--zg-navy-900);
  --business-green-800: var(--zg-navy-800);
  --business-green-700: var(--zg-blue-600);
  --business-green-500: var(--zg-blue-500);
  --business-green-100: var(--zg-blue-100);
  --business-green-50: var(--zg-blue-50);
  --business-blue-700: #0874c9;
  --business-blue-100: #e8f6ff;
  --business-ink: var(--ink);
  --business-muted: var(--muted);
  --business-line: var(--line);
  --business-soft-line: #e9eff7;
}

.tax-editor-drawer,
.tax-detail-drawer,
.tax-decision-dialog,
.tax-page,
.tax-dashboard-page,
.tax-application-page,
.tax-invoice-page,
.tax-reversal-page {
  --tax-green-950: var(--zg-navy-950);
  --tax-green-900: var(--zg-navy-900);
  --tax-green-800: var(--zg-navy-800);
  --tax-green-700: var(--zg-blue-600);
  --tax-green-500: var(--zg-blue-500);
  --tax-green-100: var(--zg-blue-100);
  --tax-green-50: var(--zg-blue-50);
  --tax-blue-700: #0874c9;
  --tax-blue-100: #e8f6ff;
  --tax-ink: var(--ink);
  --tax-muted: var(--muted);
  --tax-line: var(--line);
  --tax-soft-line: #e9eff7;
}

/* Branded page headers. Red/orange financial and risk headers remain semantic. */
.party-list-hero,
.party-list-hero.supplier,
.supplier-account-hero,
.supplier-portal-hero,
.supplier-portal-page-intro,
.supplier-portal-page-intro.reconciliation,
.supplier-portal-page-intro.delivery,
.website-inquiry-hero,
.system-users-hero,
.hr-page-hero,
.form-page-intro,
.product-page-hero,
.customer-page-hero,
.employee-page-hero,
.salary-page-hero,
.sales-order-page-hero,
.purchase-order-page-hero,
.quote-page-hero,
.sales-stock-page-hero,
.today-plan-hero,
.delivery-evaluation-hero,
.code-settings-hero,
.supplier-evaluation-hero,
.realtime-funds-hero,
.customer-receipt-hero,
.supplier-payment-hero,
.reconciliation-hero,
.eq-hero,
.eq-form-hero,
.report8d-hero,
.report8d-form-hero,
.inspection-list-hero,
.inspection-form-hero,
.permission-hero,
.approval-hero,
.operation-hero,
.engineering-hero,
.engineering-form-hero,
.engineering-detail-hero,
.analysis-hero,
.password-change-brand,
.today-business-hero,
.product-list-hero,
.inventory-hero,
.business-list-hero,
.tax-hero,
.tax-editor-head,
.dashboard-welcome {
  background:
    radial-gradient(circle at 88% 10%, rgba(25, 189, 216, .22), transparent 28%),
    linear-gradient(124deg, var(--zg-navy-950) 0%, var(--zg-navy-800) 60%, var(--zg-blue-600) 118%);
  border-color: rgba(116, 169, 255, .18);
  box-shadow: 0 14px 34px rgba(11, 45, 73, .16);
}

.party-list-hero > div > span,
.supplier-account-hero > div > span,
.supplier-portal-hero > div:first-child > span,
.supplier-portal-page-intro > div:first-child > span,
.website-inquiry-hero > div:first-child > span,
.system-users-hero > div:first-child > span,
.hr-page-hero > div > span,
.form-page-intro span,
.product-page-hero > div > span,
.today-plan-hero-copy > span,
.delivery-evaluation-copy > span,
.code-settings-hero > div:first-child > span,
.supplier-evaluation-hero > div > span,
.realtime-funds-hero > div:first-child > span,
.customer-receipt-hero > div:first-child > span,
.reconciliation-hero > div:first-child > span,
.eq-hero > div:first-child > span,
.eq-form-hero > div:first-child > span,
.report8d-hero > div:first-child > span,
.report8d-form-hero > div:first-child > span,
.inspection-list-hero > div:first-child > span,
.inspection-form-hero > div:first-child > span,
.permission-hero .eyebrow,
.approval-hero .eyebrow,
.operation-hero .eyebrow,
.engineering-hero span,
.engineering-form-hero span,
.password-change-brand-copy > span,
.today-business-hero > div:first-child > span,
.product-list-hero > div:first-child > span,
.inventory-hero > div:first-child > span,
.business-list-hero-copy > span,
.tax-hero > div:first-child > span,
.tax-editor-hero > div:first-child > span {
  color: #8fdff0;
}

.today-business-hero,
.product-list-hero,
.inventory-hero,
.business-list-hero,
.tax-hero {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    radial-gradient(circle at 88% 10%, rgba(25, 189, 216, .22), transparent 29%),
    linear-gradient(122deg, var(--zg-navy-950), var(--zg-navy-800) 68%, var(--zg-blue-600) 132%);
  background-size: 32px 32px, 32px 32px, auto, auto;
}

/* Print-template-center chrome only. Rules intentionally avoid .print-paper and document output nodes. */
.print-template-hero {
  background:
    radial-gradient(circle at 86% 12%, rgba(25, 189, 216, .24), transparent 28%),
    linear-gradient(124deg, var(--zg-navy-950) 0%, var(--zg-navy-800) 64%, var(--zg-blue-600) 128%);
  border-color: rgba(116, 169, 255, .18);
  box-shadow: 0 16px 36px rgba(11, 45, 73, .18);
}

.print-template-hero small,
.print-template-hero .eyebrow,
.print-template-hero > div:first-child > span {
  color: #8fdff0;
}

.print-template-hero .btn-primary,
.print-template-page .btn-primary,
.print-center-page .btn-primary {
  background: linear-gradient(135deg, var(--zg-blue-600), var(--zg-blue-700));
  border-color: var(--zg-blue-600);
  box-shadow: 0 7px 17px rgba(47, 108, 255, .2);
  color: #fff;
}

.print-template-page .btn-primary:hover,
.print-center-page .btn-primary:hover {
  background: var(--zg-blue-700);
  border-color: var(--zg-blue-700);
}

.print-center-page .print-center-toolbar {
  background:
    linear-gradient(90deg, rgba(47, 108, 255, .055), transparent 62%),
    #fff;
  border-color: #cfddf0;
  box-shadow: 0 10px 28px rgba(18, 59, 104, .08);
}

.print-document-type.active,
.print-document-type.selected,
.print-document-type.is-selected,
.print-document-type[aria-selected="true"],
.print-template-card.active,
.print-template-card.selected,
.print-template-card.is-selected,
.print-template-card[aria-selected="true"],
.print-field-token.selected,
.print-field-token.is-selected {
  background: var(--zg-blue-50);
  border-color: #a9c3ff;
  box-shadow: inset 3px 0 var(--zg-blue-600);
}

.print-document-type.active > svg,
.print-document-type.active > i,
.print-document-type.active > .icon,
.print-document-type[aria-selected="true"] > svg,
.print-document-type[aria-selected="true"] > i,
.print-document-type[aria-selected="true"] > .icon,
.print-center-page .print-document-type.active .print-document-type-icon {
  background: var(--zg-blue-100);
  color: var(--zg-blue-700);
}

.print-field-chip {
  background: #f7faff;
  border-color: #c9d9ed;
  color: var(--zg-navy-800);
}

.print-field-chip:hover {
  background: var(--zg-blue-100);
  border-color: #9ebdff;
  color: var(--zg-blue-700);
}

.print-template-page button:focus-visible,
.print-template-page input:focus-visible,
.print-template-page select:focus-visible,
.print-template-page textarea:focus-visible,
.print-template-page [tabindex]:focus-visible,
.print-center-page button:focus-visible,
.print-center-page input:focus-visible,
.print-center-page select:focus-visible,
.print-center-page textarea:focus-visible,
.print-center-page [tabindex]:focus-visible,
.print-center-page .print-field-label-editor input:focus {
  border-color: var(--zg-blue-600);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .14);
}

.print-center-page .print-field-token-content > strong,
.print-center-page .print-field-label-editor input {
  color: var(--zg-navy-800);
}

/* Former green interaction accents: blue for navigation/selection, cyan for secondary emphasis. */
.permission-role-card.active,
.approval-tabs button.active {
  background: var(--zg-blue-50);
  border-color: #a9c3ff;
  box-shadow: inset 3px 0 var(--zg-blue-600);
  color: var(--zg-blue-700);
}

.permission-role-mark,
.permission-module-toggle,
.approval-type,
.eq-section-head > span,
.report8d-section-head > span {
  background: var(--zg-blue-100);
  color: var(--zg-blue-700);
}

.permission-check input:checked + i {
  background: var(--zg-blue-600);
  border-color: var(--zg-blue-600);
}

.permission-legend-dot,
.activity-dot {
  background: var(--zg-cyan-500);
  box-shadow: 0 0 0 4px var(--zg-cyan-100);
}

.eq-kpis article.active,
.report8d-kpis article.active {
  border-bottom-color: var(--zg-blue-600);
}

.report8d-progress-cell > span i,
.report8d-progress-preview > div i,
.today-plan-progress > span i,
.purchase-progress-cell > .purchase-progress-track i,
.supplier-portal-progress i {
  background: linear-gradient(90deg, var(--zg-blue-600), var(--zg-cyan-500));
}

.procurement-workbench-hero,
.procurement-chain-hero > div {
  background: linear-gradient(120deg, #f8fbff, #edf5ff 58%, #f8fcff);
  border-color: #d4e2f1;
}

.realtime-account-card {
  background: linear-gradient(135deg, var(--zg-navy-800), #176da8);
}

@media (max-width: 760px) {
  .hr-hero-actions { flex-wrap: wrap; width: 100%; }
  .hr-hero-actions .btn { flex: 1 1 180px; }
  .income-hero-actions { flex-direction: column; width: 100%; }
  .income-security-badge { flex-basis: auto; width: 100%; }
  .income-unlock-card { margin-top: 16px; padding: 22px 18px; }
  .income-unlock-actions { flex-direction: column-reverse; }
  .income-unlock-actions .btn { width: 100%; }
}

/* Business-state colors remain semantic: green success, orange warning, red danger/error. */
.supplier-account-status.active,
.supplier-portal-status.done,
.supplier-delivery-result.ontime,
.inquiry-status.done,
.system-user-status.active,
.reimbursement-status.approved,
.procurement-status.done,
.procurement-risk.done,
.delivery-status.success,
.supplier-evaluation-status.confirmed,
.report8d-status.active,
.report8d-status.closed,
.approval-status.approved,
.tax-status.done,
.today-business-direction.in,
.fund-direction.in {
  background: #e8f7f1;
  border-color: #bfe7d8;
  color: #08785e;
}

.inventory-result-table .status {
  background: #e8f7f1;
  border-color: #bfe7d8;
  color: #08785e;
}

.inventory-result-table .status.draft {
  background: #fff8e9;
  border-color: #ead7ac;
  color: #8d641b;
}

.inspection-kpis article.quality {
  border-bottom-color: #159371;
}

.status.draft,
.approval-status.pending,
.supplier-portal-status.pending,
.supplier-evaluation-status.reviewing {
  border-color: #ecd7a5;
}

.danger-hero,
.purchase-return-page-hero,
.cash-voucher-hero.expense {
  box-shadow: 0 12px 32px rgba(153, 55, 68, .11);
}

.cash-voucher-hero.income {
  background:
    radial-gradient(circle at 88% 10%, rgba(77, 219, 177, .18), transparent 28%),
    linear-gradient(118deg, var(--zg-navy-950), #0b5960 62%, #119264);
}

/* Profit, credit and historical-price analysis use brand blue; result directions stay semantic. */
.analysis-kpis article {
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(18, 59, 104, .06);
}

.analysis-kpis article::before {
  background: linear-gradient(90deg, var(--zg-blue-600), var(--zg-cyan-500));
}

.analysis-table th {
  background: #f1f6fc;
  color: #506b89;
}

.analysis-profit-table tbody tr[data-analysis-chain]:hover,
.analysis-table tbody tr[data-price-product]:hover {
  background: var(--zg-blue-50);
}

.analysis-basis {
  background: var(--zg-blue-50);
  border-color: #c4d6f5;
  color: var(--zg-blue-700);
}

.analysis-rank-row b {
  background: var(--zg-blue-100);
  color: var(--zg-blue-700);
}

.analysis-risk-strip strong {
  color: var(--zg-navy-800);
}

.analysis-progress {
  background: #e7eef8;
}

.analysis-progress i {
  background: linear-gradient(90deg, var(--zg-blue-600), var(--zg-cyan-500));
}

.analysis-progress i.warning {
  background: #d2a044;
}

.analysis-progress i.danger {
  background: #cf4f4f;
}

.analysis-positive {
  color: #188465 !important;
}

.analysis-negative {
  color: #c74343 !important;
}

.sales-credit-placeholder,
.sales-credit-card {
  background: var(--zg-blue-50);
  border-color: #cbdaf0;
}

.sales-credit-card.is-warning {
  background: #fffaf0;
  border-color: #ead6a8;
}

.sales-credit-card.is-blocked {
  background: #fff6f6;
  border-color: #efc6c6;
}

.system-user-avatar,
.system-user-security-note,
.system-user-bind-note {
  background: var(--zg-blue-50);
  border-color: #c9daf2;
  color: var(--zg-blue-700);
}

.hr-page-hero > .btn,
.hr-page-hero > .btn.btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--zg-blue-700);
}

/* Print-center toolbar and palettes are application controls, not the printable sheet. */
.print-center-page .print-center-toolbar {
  background:
    radial-gradient(circle at 88% 10%, rgba(25, 189, 216, .22), transparent 27%),
    linear-gradient(118deg, var(--zg-navy-950), var(--zg-navy-800) 70%, var(--zg-blue-600) 132%);
  border-color: rgba(116, 169, 255, .18);
  color: #fff;
}

.print-center-page .print-toolbar-kicker {
  color: #8fdff0;
}

.print-center-page .print-toolbar-actions .btn-primary {
  background: #fff;
  border-color: #fff;
  box-shadow: 0 7px 18px rgba(6, 20, 43, .2);
  color: var(--zg-blue-700);
}

.print-center-page .print-toolbar-actions .btn-primary:hover {
  background: #eef5ff;
  border-color: #eef5ff;
  color: #1748b9;
}

.print-center-page .print-sidebar-head > span,
.print-center-page .print-workspace-head strong,
.print-center-page .print-sidebar-tip strong,
.print-center-page .print-field-token-content > strong {
  color: var(--zg-navy-800);
}

.print-center-page .print-document-type-icon {
  background: #eef4ff;
  color: #5c7390;
}

.print-center-page .print-field-chip {
  background: #f7faff;
  border-color: #c9d9ed;
  color: var(--zg-navy-800);
}

.print-center-page .print-field-chip:hover {
  background: var(--zg-blue-100);
  border-color: #9ebdff;
  color: var(--zg-blue-700);
}

/* Readable application typography; printable document typography stays untouched. */
.side-title strong,
.side-title span,
.tenant-pill span,
.tenant-pill strong,
.nav-home,
.module-button,
.submenu button,
.submenu a,
.user-copy strong,
.user-copy span,
.breadcrumbs,
.panel-title span,
.toolbar-copy span,
.field small,
.form-section-head span,
.form-page-actions > span,
.table-foot,
.kpi-copy span,
.party-list-kpis small,
.supplier-account-kpis small,
.party-list-filter > div span,
.party-list-filter label > span,
.supplier-account-filter label > span,
.searchable-select-menu button strong,
.searchable-select-menu button span,
.searchable-select-empty,
.searchable-select-more,
.supplier-portal-brand span,
.supplier-portal-company span,
.supplier-portal-company em,
.supplier-portal-side-foot span,
.supplier-portal-side-foot strong,
#supplier-portal-breadcrumb,
.supplier-portal-account span,
.supplier-portal-kpis span,
.supplier-portal-kpis small,
.supplier-portal-section-head span,
.supplier-portal-filter label > span,
.supplier-portal-status,
.supplier-delivery-result,
.print-center-page .print-toolbar-kicker,
.print-center-page .print-toolbar-identity label > span,
.print-center-page .print-save-status,
.print-center-page .print-sidebar-head > small,
.print-center-page .print-template-version > span small,
.print-center-page .print-sidebar-tip,
.print-center-page .print-workspace-head span {
  font-size: 12px;
}

.party-list-hero > div > span,
.supplier-account-hero > div > span,
.supplier-portal-hero > div:first-child > span,
.supplier-portal-page-intro > div:first-child > span,
.website-inquiry-hero > div:first-child > span,
.system-users-hero > div:first-child > span,
.hr-page-hero > div > span,
.form-page-intro span,
.product-page-hero > div > span,
.today-plan-hero-copy > span,
.delivery-evaluation-copy > span,
.code-settings-hero > div:first-child > span,
.supplier-evaluation-hero > div > span,
.realtime-funds-hero > div:first-child > span,
.customer-receipt-hero > div:first-child > span,
.reconciliation-hero > div:first-child > span,
.eq-hero > div:first-child > span,
.eq-form-hero > div:first-child > span,
.report8d-hero > div:first-child > span,
.report8d-form-hero > div:first-child > span,
.inspection-list-hero > div:first-child > span,
.inspection-form-hero > div:first-child > span,
.permission-hero .eyebrow,
.approval-hero .eyebrow,
.operation-hero .eyebrow,
.password-change-brand-copy > span,
.today-business-hero > div:first-child > span,
.product-list-hero > div:first-child > span,
.inventory-hero > div:first-child > span,
.business-list-hero-copy > span,
.tax-hero > div:first-child > span,
.tax-editor-hero > div:first-child > span,
.print-template-hero small,
.print-template-hero .eyebrow,
.print-template-hero > div:first-child > span {
  font-size: 12px;
}

.party-list-hero p,
.supplier-account-hero p,
.supplier-portal-hero p,
.supplier-portal-page-intro p,
.website-inquiry-hero p,
.system-users-hero p,
.hr-page-hero p,
.today-plan-hero-copy > p,
.delivery-evaluation-copy > p,
.code-settings-hero p,
.supplier-evaluation-hero p,
.realtime-funds-hero p,
.customer-receipt-hero p,
.reconciliation-hero p,
.eq-hero p,
.eq-form-hero p,
.report8d-hero p,
.report8d-form-hero p,
.inspection-list-hero p,
.inspection-form-hero p,
.permission-hero p,
.approval-hero p,
.operation-hero p,
.engineering-hero p,
.engineering-form-hero p,
.today-business-hero p,
.product-list-hero p,
.inventory-hero p,
.business-list-hero p,
.tax-hero p,
.tax-editor-hero p,
.print-template-hero p {
  font-size: 12px;
}

@media (max-width: 760px) {
  .app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  .app-shell select,
  .app-shell textarea,
  .app-shell .searchable-select-input {
    font-size: 16px;
  }
}

/* Print-template freeform controls and resizable product columns.
   Everything in this section is scoped to the on-screen designer. */
.print-center-page .print-paper.is-designer .print-table-wrap {
  overflow: visible;
}

.print-center-page .print-paper.is-designer .print-document-table {
  table-layout: fixed;
}

.print-center-page .print-paper.is-designer .print-document-table th {
  min-width: 0;
  overflow: visible;
  position: relative;
}

.print-center-page .print-paper.is-designer .print-document-table th[data-print-column],
.print-center-page .print-paper.is-designer .print-document-table th[data-column-key],
.print-center-page .print-paper.is-designer .print-table-resizable-column {
  isolation: isolate;
}

.print-center-page .print-column-resize-handle,
.print-center-page .print-table-column-resizer,
.print-center-page [data-print-column-resize] {
  bottom: -1px;
  cursor: col-resize;
  position: absolute;
  right: -9px;
  top: -1px;
  touch-action: none;
  user-select: none;
  width: 18px;
  z-index: 8;
}

.print-center-page .print-column-resize-handle::after,
.print-center-page .print-table-column-resizer::after,
.print-center-page [data-print-column-resize]::after {
  background: #8fa6bf;
  border-radius: 2px;
  bottom: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .78);
  content: "";
  left: 8px;
  opacity: .42;
  position: absolute;
  top: 4px;
  transition: background .14s ease, box-shadow .14s ease, opacity .14s ease, width .14s ease;
  width: 2px;
}

.print-center-page .print-document-table th:hover > .print-column-resize-handle::after,
.print-center-page .print-document-table th:hover > .print-table-column-resizer::after,
.print-center-page .print-document-table th:hover > [data-print-column-resize]::after,
.print-center-page .print-column-resize-handle:hover::after,
.print-center-page .print-table-column-resizer:hover::after,
.print-center-page [data-print-column-resize]:hover::after {
  background: var(--zg-blue-600, #2f6cff);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12);
  opacity: 1;
  width: 3px;
}

.print-center-page .print-column-resize-handle:active::after,
.print-center-page .print-column-resize-handle.active::after,
.print-center-page .print-column-resize-handle.is-resizing::after,
.print-center-page .print-table-column-resizer:active::after,
.print-center-page .print-table-column-resizer.active::after,
.print-center-page .print-table-column-resizer.is-resizing::after,
.print-center-page [data-print-column-resize][aria-pressed="true"]::after,
.print-center-page .print-document-table.is-resizing [data-print-column-resize]::after {
  background: var(--zg-cyan-500, #19bdd8);
  box-shadow: 0 0 0 4px rgba(25, 189, 216, .16);
  opacity: 1;
  width: 3px;
}

.print-center-page .print-document-table.is-resizing,
.print-center-page .print-table-wrap.is-resizing,
.print-center-page.is-column-resizing {
  cursor: col-resize;
  user-select: none;
}

.print-center-page .print-column-width-tooltip,
.print-center-page .print-resize-value {
  background: var(--zg-navy-950, #0b2d49);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(11, 45, 73, .22);
  color: #fff;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  left: 50%;
  line-height: 1;
  padding: 6px 7px;
  pointer-events: none;
  position: absolute;
  top: -31px;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 12;
}

.print-center-page .print-column-width-tooltip::after,
.print-center-page .print-resize-value::after {
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--zg-navy-950, #0b2d49);
  content: "";
  left: 50%;
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
}

.print-center-page .print-paper.is-designer .print-free-layer,
.print-center-page .print-paper.is-designer .print-free-elements-layer,
.print-center-page .print-paper.is-designer [data-print-free-layer] {
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  z-index: 6;
}

.print-center-page .print-paper.is-designer .print-free-element,
.print-center-page .print-paper.is-designer .print-free-control,
.print-center-page .print-paper.is-designer [data-print-free-element] {
  align-items: stretch;
  background: rgba(255, 255, 255, .94);
  border: 1px solid transparent;
  border-radius: 4px;
  display: flex;
  min-height: 28px;
  min-width: 0;
  pointer-events: auto;
  position: absolute;
  touch-action: none;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}

.print-center-page .print-paper.is-designer .print-free-element:hover,
.print-center-page .print-paper.is-designer .print-free-control:hover,
.print-center-page .print-paper.is-designer [data-print-free-element]:hover {
  background: rgba(246, 250, 255, .97);
  border-color: #8fb2f7;
}

.print-center-page .print-paper.is-designer .print-free-element.selected,
.print-center-page .print-paper.is-designer .print-free-element.is-selected,
.print-center-page .print-paper.is-designer .print-free-element[aria-selected="true"],
.print-center-page .print-paper.is-designer .print-free-control.selected,
.print-center-page .print-paper.is-designer .print-free-control.is-selected,
.print-center-page .print-paper.is-designer [data-print-free-element].selected,
.print-center-page .print-paper.is-designer [data-print-free-element].is-selected,
.print-center-page .print-paper.is-designer [data-print-free-element][aria-selected="true"] {
  background: rgba(247, 250, 255, .98);
  border-color: var(--zg-blue-600, #2f6cff);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .94),
    0 0 0 3px rgba(47, 108, 255, .18),
    0 8px 20px rgba(28, 73, 153, .12);
  z-index: 10;
}

.print-center-page .print-paper.is-designer .print-free-element.dragging,
.print-center-page .print-paper.is-designer .print-free-element.is-dragging,
.print-center-page .print-paper.is-designer .print-free-control.dragging,
.print-center-page .print-paper.is-designer [data-print-free-element].is-dragging {
  cursor: grabbing;
  opacity: .76;
  transition: none;
}

.print-center-page .print-free-element-content,
.print-center-page .print-free-control-content {
  flex: 1 1 auto;
  min-height: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.print-center-page .print-free-text,
.print-center-page .print-free-text-content,
.print-center-page [data-print-control-type="text"] .print-free-element-content {
  color: #172331;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 4px 6px;
  white-space: pre-wrap;
}

.print-center-page .print-free-text > textarea,
.print-center-page [data-control-type="text"] > textarea {
  background: transparent;
  border: 0;
  color: #172331;
  flex: 1 1 auto;
  font: inherit;
  font-size: inherit;
  line-height: 1.45;
  min-height: 100%;
  min-width: 0;
  outline: 0;
  overflow: hidden;
  padding: 5px 7px;
  resize: none;
  text-align: inherit;
  width: 100%;
}

.print-center-page .print-free-image,
.print-center-page .print-free-image-content,
.print-center-page [data-print-control-type="image"] .print-free-element-content {
  align-items: center;
  background:
    linear-gradient(45deg, #f2f5f9 25%, transparent 25%),
    linear-gradient(-45deg, #f2f5f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f5f9 75%),
    linear-gradient(-45deg, transparent 75%, #f2f5f9 75%),
    #fff;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  display: flex;
  justify-content: center;
  min-height: 100%;
  overflow: hidden;
}

.print-center-page .print-free-image-frame {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  height: 100%;
  justify-content: center;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.print-center-page .print-free-image img,
.print-center-page .print-free-image-content img,
.print-center-page [data-print-control-type="image"] img {
  display: block;
  height: 100%;
  max-height: none;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  width: 100%;
}

.print-center-page .print-free-image-placeholder {
  align-items: center;
  color: #70849c;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  gap: 4px;
  justify-content: center;
  min-height: 100%;
  min-width: 100%;
}

.print-center-page .print-free-image-placeholder strong {
  font-size: 12px;
}

.print-center-page .print-free-image-upload {
  align-items: center;
  background: rgba(11, 45, 73, .86);
  border-radius: 5px;
  bottom: 5px;
  color: #fff;
  cursor: pointer;
  display: none;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  position: absolute;
  right: 5px;
  z-index: 16;
}

.print-center-page .print-free-image.is-selected .print-free-image-upload,
.print-center-page .print-free-image[aria-selected="true"] .print-free-image-upload {
  display: inline-flex;
}

.print-center-page .print-free-remove {
  align-items: center;
  background: #fff;
  border: 1px solid #e1b8bd;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(83, 32, 40, .14);
  color: #bd4451;
  cursor: pointer;
  display: none;
  font: inherit;
  font-size: 15px;
  height: 24px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  z-index: 18;
}

.print-center-page .print-free-remove:hover {
  background: #bd4451;
  border-color: #bd4451;
  color: #fff;
}

.print-center-page .print-free-element.is-selected .print-free-remove,
.print-center-page .print-free-element[aria-selected="true"] .print-free-remove {
  display: inline-flex;
}

.print-center-page [data-object-fit="contain"] img,
.print-center-page .fit-contain img,
.print-center-page img.fit-contain {
  object-fit: contain;
}

.print-center-page [data-object-fit="cover"] img,
.print-center-page .fit-cover img,
.print-center-page img.fit-cover {
  object-fit: cover;
}

.print-center-page [data-object-fit="fill"] img,
.print-center-page .fit-fill img,
.print-center-page img.fit-fill {
  object-fit: fill;
}

.print-center-page [data-object-fit="scale-down"] img,
.print-center-page .fit-scale-down img,
.print-center-page img.fit-scale-down {
  object-fit: scale-down;
}

.print-center-page .print-free-move-handle,
.print-center-page .print-element-move-handle,
.print-center-page [data-print-element-move] {
  align-items: center;
  background: var(--zg-blue-600, #2f6cff);
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 6px 6px 0 0;
  box-shadow: 0 -3px 8px rgba(26, 69, 147, .16);
  color: #fff;
  cursor: grab;
  display: none;
  font-size: 12px;
  height: 24px;
  justify-content: center;
  left: 50%;
  line-height: 1;
  min-width: 34px;
  padding: 0 8px;
  position: absolute;
  top: -25px;
  transform: translateX(-50%);
  user-select: none;
  white-space: nowrap;
  z-index: 14;
}

.print-center-page .print-free-move-handle:active,
.print-center-page .print-element-move-handle:active,
.print-center-page [data-print-element-move]:active {
  cursor: grabbing;
}

.print-center-page .print-free-element.selected .print-free-move-handle,
.print-center-page .print-free-element.is-selected .print-free-move-handle,
.print-center-page .print-free-element[aria-selected="true"] .print-free-move-handle,
.print-center-page .print-free-control.selected .print-element-move-handle,
.print-center-page [data-print-free-element].selected [data-print-element-move],
.print-center-page [data-print-free-element].is-selected [data-print-element-move] {
  display: inline-flex;
}

.print-center-page .print-free-resize-handle,
.print-center-page .print-element-resize-handle,
.print-center-page [data-print-element-resize] {
  display: none;
  height: 24px;
  position: absolute;
  touch-action: none;
  user-select: none;
  width: 24px;
  z-index: 15;
}

.print-center-page .print-free-element.selected .print-free-resize-handle,
.print-center-page .print-free-element.is-selected .print-free-resize-handle,
.print-center-page .print-free-element[aria-selected="true"] .print-free-resize-handle,
.print-center-page .print-free-control.selected .print-element-resize-handle,
.print-center-page .print-free-control.is-selected .print-element-resize-handle,
.print-center-page [data-print-free-element].selected [data-print-element-resize],
.print-center-page [data-print-free-element].is-selected [data-print-element-resize],
.print-center-page [data-print-free-element][aria-selected="true"] [data-print-element-resize] {
  display: block;
}

.print-center-page .print-free-resize-handle::after,
.print-center-page .print-element-resize-handle::after,
.print-center-page [data-print-element-resize]::after {
  background: #fff;
  border: 2px solid var(--zg-blue-600, #2f6cff);
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(13, 48, 103, .2);
  content: "";
  height: 8px;
  left: 7px;
  position: absolute;
  top: 7px;
  width: 8px;
}

.print-center-page .print-free-resize-handle.nw,
.print-center-page .print-element-resize-handle.nw,
.print-center-page .print-free-resize-handle[data-resize-direction="nw"],
.print-center-page .print-element-resize-handle[data-resize-direction="nw"],
.print-center-page [data-print-element-resize="nw"] {
  cursor: nwse-resize;
  left: -12px;
  top: -12px;
}

.print-center-page .print-free-resize-handle.ne,
.print-center-page .print-element-resize-handle.ne,
.print-center-page .print-free-resize-handle[data-resize-direction="ne"],
.print-center-page .print-element-resize-handle[data-resize-direction="ne"],
.print-center-page [data-print-element-resize="ne"] {
  cursor: nesw-resize;
  right: -12px;
  top: -12px;
}

.print-center-page .print-free-resize-handle.sw,
.print-center-page .print-element-resize-handle.sw,
.print-center-page .print-free-resize-handle[data-resize-direction="sw"],
.print-center-page .print-element-resize-handle[data-resize-direction="sw"],
.print-center-page [data-print-element-resize="sw"] {
  bottom: -12px;
  cursor: nesw-resize;
  left: -12px;
}

.print-center-page .print-free-resize-handle.se,
.print-center-page .print-element-resize-handle.se,
.print-center-page .print-free-resize-handle[data-resize-direction="se"],
.print-center-page .print-element-resize-handle[data-resize-direction="se"],
.print-center-page [data-print-element-resize="se"] {
  bottom: -12px;
  cursor: nwse-resize;
  right: -12px;
}

.print-center-page .print-free-resize-handle.n,
.print-center-page .print-element-resize-handle.n,
.print-center-page .print-free-resize-handle[data-resize-direction="n"],
.print-center-page .print-element-resize-handle[data-resize-direction="n"],
.print-center-page [data-print-element-resize="n"] {
  cursor: ns-resize;
  left: calc(50% - 12px);
  top: -12px;
}

.print-center-page .print-free-resize-handle.s,
.print-center-page .print-element-resize-handle.s,
.print-center-page .print-free-resize-handle[data-resize-direction="s"],
.print-center-page .print-element-resize-handle[data-resize-direction="s"],
.print-center-page [data-print-element-resize="s"] {
  bottom: -12px;
  cursor: ns-resize;
  left: calc(50% - 12px);
}

.print-center-page .print-free-resize-handle.e,
.print-center-page .print-element-resize-handle.e,
.print-center-page .print-free-resize-handle[data-resize-direction="e"],
.print-center-page .print-element-resize-handle[data-resize-direction="e"],
.print-center-page [data-print-element-resize="e"] {
  cursor: ew-resize;
  right: -12px;
  top: calc(50% - 12px);
}

.print-center-page .print-free-resize-handle.w,
.print-center-page .print-element-resize-handle.w,
.print-center-page .print-free-resize-handle[data-resize-direction="w"],
.print-center-page .print-element-resize-handle[data-resize-direction="w"],
.print-center-page [data-print-element-resize="w"] {
  cursor: ew-resize;
  left: -12px;
  top: calc(50% - 12px);
}

.print-center-page .print-element-toolbar,
.print-center-page .print-free-element-actions {
  align-items: center;
  background: var(--zg-navy-950, #0b2d49);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  box-shadow: 0 7px 17px rgba(11, 45, 73, .22);
  display: none;
  gap: 3px;
  padding: 3px;
  position: absolute;
  right: 0;
  top: -34px;
  white-space: nowrap;
  z-index: 16;
}

.print-center-page .print-free-element.selected .print-element-toolbar,
.print-center-page .print-free-element.is-selected .print-element-toolbar,
.print-center-page .print-free-control.selected .print-free-element-actions,
.print-center-page [data-print-free-element].selected .print-element-toolbar,
.print-center-page [data-print-free-element].is-selected .print-element-toolbar {
  display: flex;
}

.print-center-page .print-element-toolbar button,
.print-center-page .print-free-element-actions button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: #dfeaff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  height: 24px;
  justify-content: center;
  min-width: 24px;
  padding: 0 6px;
}

.print-center-page .print-element-toolbar button:hover,
.print-center-page .print-free-element-actions button:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.print-center-page .print-element-toolbar button.danger:hover,
.print-center-page .print-free-element-actions button.danger:hover {
  background: #c94653;
}

.print-center-page .print-control-library,
.print-center-page .print-free-control-library {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 10px 12px;
}

.print-center-page .print-control-library button,
.print-center-page .print-free-control-library button {
  align-items: center;
  background: #f7faff;
  border: 1px solid #c9d9ed;
  border-radius: 8px;
  color: var(--zg-navy-800, #123b68);
  cursor: grab;
  display: flex;
  font: inherit;
  font-size: 12px;
  gap: 7px;
  justify-content: flex-start;
  min-height: 40px;
  padding: 7px 9px;
  text-align: left;
}

.print-center-page .print-control-library button:hover,
.print-center-page .print-free-control-library button:hover {
  background: var(--zg-blue-100, #e4edff);
  border-color: #9ebdff;
  color: var(--zg-blue-700, #2454d7);
}

.print-center-page .print-control-library button:active,
.print-center-page .print-free-control-library button:active {
  cursor: grabbing;
}

.print-center-page .print-element-properties,
.print-center-page .print-free-properties,
.print-center-page .print-control-properties {
  background: #f8fbff;
  border: 1px solid #d3dfef;
  border-radius: 10px;
  display: grid;
  gap: 11px;
  margin: 0 10px 12px;
  padding: 11px;
}

.print-center-page .print-element-properties > header,
.print-center-page .print-free-properties > header,
.print-center-page .print-control-properties > header {
  align-items: center;
  border-bottom: 1px solid #dce6f2;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: -2px 0 0;
  padding: 0 0 9px;
}

.print-center-page .print-element-properties > header strong,
.print-center-page .print-free-properties > header strong,
.print-center-page .print-control-properties > header strong {
  color: var(--zg-navy-800, #123b68);
  font-size: 12px;
}

.print-center-page .print-element-properties > header span,
.print-center-page .print-free-properties > header span,
.print-center-page .print-control-properties > header span {
  background: var(--zg-blue-100, #e4edff);
  border-radius: 99px;
  color: var(--zg-blue-700, #2454d7);
  font-size: 12px;
  padding: 3px 7px;
}

.print-center-page .print-free-properties.empty {
  align-content: center;
  color: #71849b;
  justify-items: center;
  min-height: 118px;
  text-align: center;
}

.print-center-page .print-free-properties.empty > span {
  align-items: center;
  background: var(--zg-blue-100, #e4edff);
  border-radius: 50%;
  color: var(--zg-blue-700, #2454d7);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.print-center-page .print-free-properties.empty > strong {
  color: var(--zg-navy-800, #123b68);
  font-size: 12px;
}

.print-center-page .print-free-properties.empty > small {
  font-size: 12px;
  line-height: 1.5;
}

.print-center-page .print-free-property-title {
  align-items: center;
  border-bottom: 1px solid #dce6f2;
  display: flex;
  gap: 8px;
  padding-bottom: 9px;
}

.print-center-page .print-free-property-title > span {
  align-items: center;
  background: var(--zg-blue-100, #e4edff);
  border-radius: 7px;
  color: var(--zg-blue-700, #2454d7);
  display: inline-flex;
  flex: 0 0 auto;
  height: 31px;
  justify-content: center;
  width: 31px;
}

.print-center-page .print-free-property-title > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.print-center-page .print-free-property-title strong {
  color: var(--zg-navy-800, #123b68);
  font-size: 12px;
}

.print-center-page .print-free-property-title small {
  color: #788ca3;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-free-property-image {
  align-items: center;
  background:
    linear-gradient(45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef2f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef2f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef2f7 75%),
    #fff;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
  border: 1px solid #d4e0ee;
  border-radius: 8px;
  color: #71849b;
  display: flex;
  justify-content: center;
  min-height: 82px;
  overflow: hidden;
}

.print-center-page .print-free-property-image img {
  display: block;
  height: 82px;
  object-fit: contain;
  width: 100%;
}

.print-center-page .print-free-property-image > span {
  font-size: 12px;
}

.print-center-page .print-free-property-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-center-page .print-free-property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.print-center-page .print-free-property-actions .btn {
  flex: 1 1 auto;
  justify-content: center;
  min-height: 34px;
  min-width: 78px;
}

.print-center-page .print-element-properties label,
.print-center-page .print-free-properties label,
.print-center-page .print-control-properties label,
.print-center-page .print-property-grid label {
  color: #566d88;
  display: grid;
  font-size: 12px;
  gap: 5px;
  min-width: 0;
}

.print-center-page .print-property-grid,
.print-center-page .print-position-grid,
.print-center-page .print-size-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.print-center-page .print-element-properties input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.print-center-page .print-element-properties select,
.print-center-page .print-element-properties textarea,
.print-center-page .print-free-properties input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.print-center-page .print-free-properties select,
.print-center-page .print-free-properties textarea,
.print-center-page .print-control-properties input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.print-center-page .print-control-properties select,
.print-center-page .print-control-properties textarea {
  background: #fff;
  border: 1px solid #c8d7e9;
  border-radius: 7px;
  color: var(--zg-navy-800, #123b68);
  font: inherit;
  font-size: 12px;
  height: 36px;
  min-width: 0;
  outline: 0;
  padding: 0 9px;
  width: 100%;
}

.print-center-page .print-element-properties textarea,
.print-center-page .print-free-properties textarea,
.print-center-page .print-control-properties textarea {
  height: auto;
  line-height: 1.5;
  min-height: 74px;
  padding-block: 8px;
  resize: vertical;
}

.print-center-page input[type="file"][data-print-control-image-file] {
  background: #fff;
  border: 1px dashed #aebfd3;
  border-radius: 8px;
  color: #60758e;
  cursor: pointer;
  font-size: 12px;
  height: auto;
  min-height: 44px;
  padding: 6px;
  width: 100%;
}

.print-center-page input[type="file"][data-print-control-image-file]::file-selector-button {
  background: var(--zg-blue-50, #f1f6ff);
  border: 1px solid #bdd0ee;
  border-radius: 6px;
  color: var(--zg-blue-700, #2454d7);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  margin-right: 8px;
  min-height: 30px;
  padding: 5px 9px;
}

.print-center-page input[type="file"][data-print-control-image-file]::file-selector-button:hover {
  background: var(--zg-blue-100, #e4edff);
  border-color: #9ebdff;
}

.print-center-page .print-element-properties input:focus,
.print-center-page .print-element-properties select:focus,
.print-center-page .print-element-properties textarea:focus,
.print-center-page .print-free-properties input:focus,
.print-center-page .print-free-properties select:focus,
.print-center-page .print-free-properties textarea:focus,
.print-center-page .print-control-properties input:focus,
.print-center-page .print-control-properties select:focus,
.print-center-page .print-control-properties textarea:focus {
  border-color: var(--zg-blue-600, #2f6cff);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .13);
}

.print-center-page .print-object-fit-options,
.print-center-page .print-fit-options {
  background: #edf3fb;
  border-radius: 8px;
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
}

.print-center-page .print-object-fit-options label,
.print-center-page .print-fit-options label {
  cursor: pointer;
  display: block;
  min-width: 0;
  position: relative;
}

.print-center-page .print-object-fit-options input,
.print-center-page .print-fit-options input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.print-center-page .print-object-fit-options span,
.print-center-page .print-fit-options span,
.print-center-page .print-object-fit-options button,
.print-center-page .print-fit-options button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #60758e;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 12px;
  justify-content: center;
  min-height: 32px;
  padding: 5px;
  text-align: center;
  width: 100%;
}

.print-center-page .print-object-fit-options input:checked + span,
.print-center-page .print-fit-options input:checked + span,
.print-center-page .print-object-fit-options button.active,
.print-center-page .print-fit-options button.active,
.print-center-page .print-object-fit-options button[aria-pressed="true"],
.print-center-page .print-fit-options button[aria-pressed="true"] {
  background: #fff;
  border-color: #b8cef1;
  box-shadow: 0 2px 7px rgba(31, 76, 143, .1);
  color: var(--zg-blue-700, #2454d7);
  font-weight: 750;
}

.print-center-page .print-image-upload-zone,
.print-center-page .print-image-source {
  align-items: center;
  background: #fff;
  border: 1px dashed #aebfd3;
  border-radius: 8px;
  color: #60758e;
  display: flex;
  font-size: 12px;
  gap: 8px;
  justify-content: center;
  min-height: 66px;
  padding: 10px;
  text-align: center;
}

.print-center-page .print-image-upload-zone:hover,
.print-center-page .print-image-source:hover {
  background: var(--zg-blue-50, #f1f6ff);
  border-color: var(--zg-blue-600, #2f6cff);
  color: var(--zg-blue-700, #2454d7);
}

.print-center-page .print-control-help,
.print-center-page .print-property-hint {
  color: #75889f;
  font-size: 12px;
  line-height: 1.55;
  margin: 0;
}

@media (hover: none), (pointer: coarse) {
  .print-center-page .print-column-resize-handle,
  .print-center-page .print-table-column-resizer,
  .print-center-page [data-print-column-resize] {
    right: -12px;
    width: 24px;
  }

  .print-center-page .print-column-resize-handle::after,
  .print-center-page .print-table-column-resizer::after,
  .print-center-page [data-print-column-resize]::after {
    left: 11px;
    opacity: .72;
  }

  .print-center-page .print-free-resize-handle,
  .print-center-page .print-element-resize-handle,
  .print-center-page [data-print-element-resize] {
    height: 28px;
    width: 28px;
  }

  .print-center-page .print-free-resize-handle::after,
  .print-center-page .print-element-resize-handle::after,
  .print-center-page [data-print-element-resize]::after {
    left: 9px;
    top: 9px;
  }
}

@media (max-width: 950px) {
  .print-center-page .print-element-properties,
  .print-center-page .print-free-properties,
  .print-center-page .print-control-properties {
    margin-inline: 12px;
  }

  .print-center-page .print-property-grid,
  .print-center-page .print-position-grid,
  .print-center-page .print-size-grid {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }
}

@media (max-width: 650px) {
  .print-center-page .print-control-library,
  .print-center-page .print-free-control-library {
    grid-template-columns: 1fr;
  }

  .print-center-page .print-property-grid,
  .print-center-page .print-position-grid,
  .print-center-page .print-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-center-page .print-object-fit-options,
  .print-center-page .print-fit-options {
    grid-template-columns: 1fr;
  }
}

@media print {
  .print-column-resize-handle,
  .print-table-column-resizer,
  [data-print-column-resize],
  .print-column-width-tooltip,
  .print-resize-value,
  .print-free-move-handle,
  .print-element-move-handle,
  [data-print-element-move],
  .print-free-resize-handle,
  .print-element-resize-handle,
  [data-print-element-resize],
  .print-element-toolbar,
  .print-free-element-actions,
  .print-free-remove,
  .print-free-image-upload {
    display: none !important;
  }

  .print-sheet,
  .print-paper-inner {
    position: relative;
  }

  .print-sheet .print-free-layer,
  .print-paper-inner > .print-free-layer {
    inset: 0;
    overflow: visible;
    pointer-events: none;
    position: absolute;
  }

  .print-sheet .print-free-element,
  .print-paper-inner > .print-free-layer > .print-free-element {
    display: flex;
    overflow: hidden;
    position: absolute;
  }

  .print-sheet .print-free-image-frame,
  .print-paper-inner > .print-free-layer .print-free-image-frame {
    height: 100%;
    overflow: hidden;
    width: 100%;
  }

  .print-sheet .print-free-image-frame img,
  .print-paper-inner > .print-free-layer .print-free-image-frame img {
    display: block;
    height: 100%;
    max-height: none;
    max-width: none;
    width: 100%;
  }

  .print-sheet .print-document-table,
  .print-paper-inner .print-document-table {
    table-layout: fixed;
  }

  .print-free-element,
  .print-free-control,
  [data-print-free-element] {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    outline: 0 !important;
  }
}

/* Business-loop and data-consistency center */
.consistency-page,
.consistency-loading,
.consistency-history-drawer,
.consistency-detail-drawer,
.consistency-repair-dialog,
.consistency-run-dialog {
  --consistency-navy: #0b2d49;
  --consistency-blue: #2f6cff;
  --consistency-blue-strong: #2357d7;
  --consistency-cyan: #12a9c4;
  --consistency-green: #13866f;
  --consistency-red: #c93e4c;
  --consistency-orange: #c87819;
  --consistency-slate: #64758b;
  --consistency-border: #d8e3f0;
  --consistency-soft: #f4f7fc;
}

.consistency-page {
  color: #142b47;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.consistency-page *,
.consistency-history-drawer *,
.consistency-detail-drawer *,
.consistency-repair-dialog *,
.consistency-run-dialog * {
  box-sizing: border-box;
}

.consistency-hero {
  align-items: center;
  background: #fff;
  border: 1px solid var(--consistency-border);
  border-left: 4px solid var(--consistency-blue);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(18, 59, 104, .065);
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 132px;
  overflow: hidden;
  padding: 22px 24px;
  position: relative;
}

.consistency-hero::after {
  background: #e8faff;
  border-radius: 50%;
  content: "";
  height: 128px;
  opacity: .58;
  pointer-events: none;
  position: absolute;
  right: 88px;
  top: -92px;
  width: 128px;
}

.consistency-hero-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.consistency-eyebrow {
  color: var(--consistency-blue-strong);
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.consistency-hero-copy h1,
.consistency-hero-copy h2 {
  color: var(--consistency-navy);
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 0;
}

.consistency-hero-copy p {
  color: var(--consistency-slate);
  font-size: 13px;
  line-height: 1.7;
  margin: 7px 0 0;
  max-width: 760px;
}

.consistency-hero-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.consistency-hero-meta > span,
.consistency-hero-meta > em {
  align-items: center;
  background: #f4f8fd;
  border: 1px solid #d9e5f2;
  border-radius: 5px;
  color: #526b86;
  display: inline-flex;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
  gap: 5px;
  min-height: 27px;
  padding: 4px 8px;
}

.consistency-score {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: max-content;
  position: relative;
  z-index: 1;
}

.consistency-score-ring {
  align-items: center;
  background: conic-gradient(
    var(--consistency-blue) calc(var(--consistency-score, 0) * 1%),
    #e2eaf4 0
  );
  border-radius: 50%;
  color: var(--consistency-navy);
  align-content: center;
  display: grid;
  font-size: 20px;
  font-weight: 850;
  gap: 0;
  height: 70px;
  isolation: isolate;
  place-items: center;
  position: relative;
  width: 70px;
}

.consistency-score-ring strong {
  font-size: 20px;
  line-height: 1;
}

.consistency-score-ring span {
  color: var(--consistency-slate);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  margin-top: 4px;
}

.consistency-score-ring::before {
  background: #fff;
  border-radius: inherit;
  content: "";
  inset: 6px;
  position: absolute;
  z-index: -1;
}

.consistency-score.is-empty .consistency-score-ring {
  background: #e6edf5;
  color: #728399;
}

.consistency-score > div:not(.consistency-score-ring) {
  display: grid;
  gap: 3px;
}

.consistency-score strong {
  color: var(--consistency-navy);
  font-size: 13px;
}

.consistency-score small {
  color: var(--consistency-slate);
  font-size: 11px;
  line-height: 1.45;
  max-width: 116px;
}

.consistency-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.consistency-page .btn,
.consistency-history-drawer .btn,
.consistency-detail-drawer .btn,
.consistency-repair-dialog .btn,
.consistency-run-dialog .btn {
  min-height: 38px;
}

.consistency-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.consistency-kpi {
  align-items: center;
  background: #fff;
  border: 1px solid var(--consistency-border);
  border-radius: 9px;
  display: grid;
  gap: 11px;
  grid-template-columns: 40px minmax(0, 1fr);
  min-height: 92px;
  padding: 14px;
  position: relative;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.consistency-kpi:hover {
  border-color: #bdd0e8;
  box-shadow: 0 8px 20px rgba(18, 59, 104, .075);
  transform: translateY(-1px);
}

.consistency-kpi-icon {
  align-items: center;
  background: #eaf1ff;
  border: 1px solid #ceddff;
  border-radius: 8px;
  color: var(--consistency-blue-strong);
  display: flex;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.consistency-kpi-icon svg {
  height: 18px;
  width: 18px;
}

.consistency-kpi.healthy .consistency-kpi-icon,
.consistency-kpi.success .consistency-kpi-icon,
.consistency-kpi[data-tone="healthy"] .consistency-kpi-icon {
  background: #e9f8f4;
  border-color: #c4eadd;
  color: var(--consistency-green);
}

.consistency-kpi.critical .consistency-kpi-icon,
.consistency-kpi.severe .consistency-kpi-icon,
.consistency-kpi[data-tone="critical"] .consistency-kpi-icon {
  background: #fff0f2;
  border-color: #f2cbd1;
  color: var(--consistency-red);
}

.consistency-kpi.repair .consistency-kpi-icon {
  background: #edf4ff;
  border-color: #ccdcf6;
  color: var(--consistency-blue-strong);
}

.consistency-kpi.warning .consistency-kpi-icon,
.consistency-kpi[data-tone="warning"] .consistency-kpi-icon {
  background: #fff6e8;
  border-color: #efd7b3;
  color: var(--consistency-orange);
}

.consistency-kpi-copy {
  display: grid;
  min-width: 0;
}

.consistency-kpi-copy span,
.consistency-kpi-copy small {
  color: var(--consistency-slate);
  font-size: 11px;
}

.consistency-kpi-copy strong {
  color: var(--consistency-navy);
  font-size: 22px;
  line-height: 1.2;
  margin: 2px 0;
}

.consistency-stage-list,
.consistency-flow,
.consistency-category-strip,
.consistency-categories {
  display: grid;
  gap: 9px;
}

.consistency-stage-list {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 13px 14px 15px;
}

.consistency-stages {
  min-width: 0;
  overflow: hidden;
}

.consistency-stages > .panel-head {
  background: #fbfcfe;
  min-height: 58px;
}

.consistency-flow,
.consistency-category-strip,
.consistency-categories {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.consistency-stage,
.consistency-flow-card,
.consistency-category-card {
  background: #fff;
  border: 1px solid var(--consistency-border);
  border-radius: 8px;
  min-width: 0;
  padding: 12px 13px;
  position: relative;
}

.consistency-stage:not(:last-child)::after,
.consistency-flow-card:not(:last-child)::after {
  background: #b9c9dc;
  content: "";
  height: 1px;
  position: absolute;
  right: -10px;
  top: 29px;
  width: 10px;
}

.consistency-stage-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.consistency-stage-head > span:first-child {
  align-items: center;
  background: #edf4ff;
  border-radius: 6px;
  color: var(--consistency-blue-strong);
  display: flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.consistency-stage-head > div {
  display: grid;
  flex: 1;
  min-width: 0;
}

.consistency-stage-head > div strong {
  color: #2b4968;
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consistency-stage-head > div small {
  color: var(--consistency-slate);
  font-size: 9px;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consistency-stage-head .consistency-stage-status {
  margin: 0;
}

.consistency-stage-bar {
  background: #e9eff6;
  border-radius: 3px;
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
}

.consistency-stage-bar > i,
.consistency-stage-bar > span {
  background: var(--consistency-blue);
  display: block;
  height: 100%;
  max-width: 100%;
}

.consistency-stage.healthy .consistency-stage-bar > i,
.consistency-stage.healthy .consistency-stage-bar > span,
.consistency-stage[data-tone="healthy"] .consistency-stage-bar > i,
.consistency-stage[data-tone="healthy"] .consistency-stage-bar > span {
  background: var(--consistency-green);
}

.consistency-stage.warning .consistency-stage-bar > i,
.consistency-stage.warning .consistency-stage-bar > span,
.consistency-stage[data-tone="warning"] .consistency-stage-bar > i,
.consistency-stage[data-tone="warning"] .consistency-stage-bar > span {
  background: var(--consistency-orange);
}

.consistency-stage.critical .consistency-stage-bar > i,
.consistency-stage.critical .consistency-stage-bar > span,
.consistency-stage[data-tone="critical"] .consistency-stage-bar > i,
.consistency-stage[data-tone="critical"] .consistency-stage-bar > span {
  background: var(--consistency-red);
}

.consistency-stage-status {
  color: var(--consistency-slate);
  display: block;
  font-size: 10px;
  margin-top: 6px;
}

.consistency-stage-foot {
  align-items: center;
  color: var(--consistency-slate);
  display: flex;
  font-size: 9px;
  gap: 6px;
  justify-content: space-between;
  margin-top: 7px;
}

.consistency-stage-foot b {
  color: var(--consistency-orange);
  font-weight: 750;
}

.consistency-stage.critical .consistency-stage-foot b {
  color: var(--consistency-red);
}

.consistency-stage.healthy .consistency-stage-head > span {
  background: #eaf8f4;
  color: var(--consistency-green);
}

.consistency-stage.warning .consistency-stage-head > span {
  background: #fff6e8;
  color: var(--consistency-orange);
}

.consistency-stage.critical .consistency-stage-head > span {
  background: #fff0f2;
  color: var(--consistency-red);
}

.consistency-stage.healthy .consistency-stage-status {
  background: #eaf8f4;
  border-color: #c4e8de;
  color: var(--consistency-green);
}

.consistency-stage.warning .consistency-stage-status {
  background: #fff6e8;
  border-color: #efd6ac;
  color: var(--consistency-orange);
}

.consistency-stage.critical .consistency-stage-status {
  background: #fff0f2;
  border-color: #efc9cf;
  color: var(--consistency-red);
}

.consistency-stage.pending .consistency-stage-head > span {
  background: #f0f3f7;
  color: #7a8b9e;
}

.consistency-filters {
  background: #fff;
  border: 1px solid var(--consistency-border);
  border-radius: 9px;
  padding: 15px 16px;
}

.consistency-filter-grid {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(230px, 1.5fr);
}

.consistency-filter-grid label,
.consistency-confirm-box label {
  color: #526b86;
  display: grid;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  min-width: 0;
}

.consistency-filter-keyword {
  min-width: 0;
}

.consistency-filter-grid input,
.consistency-filter-grid select,
.consistency-confirm-box input,
.consistency-repair-dialog input,
.consistency-repair-dialog select,
.consistency-repair-dialog textarea,
.consistency-run-dialog input,
.consistency-run-dialog select,
.consistency-run-dialog textarea {
  background: #fff;
  border: 1px solid #cbd8e6;
  border-radius: 7px;
  color: #193552;
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.consistency-repair-dialog textarea,
.consistency-run-dialog textarea {
  line-height: 1.55;
  min-height: 86px;
  resize: vertical;
}

.consistency-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.consistency-table-panel {
  background: #fff;
  border: 1px solid var(--consistency-border);
  border-radius: 9px;
  min-width: 0;
  overflow: hidden;
}

.consistency-table-head {
  align-items: center;
  border-bottom: 1px solid #e3eaf3;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 62px;
  padding: 13px 16px;
}

.consistency-table-head > div:first-child {
  min-width: 0;
}

.consistency-table-head h2,
.consistency-table-head h3,
.consistency-table-head strong {
  color: var(--consistency-navy);
  font-size: 14px;
  margin: 0;
}

.consistency-table-head p,
.consistency-table-head span {
  color: var(--consistency-slate);
  font-size: 11px;
  margin: 3px 0 0;
}

.consistency-table-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.consistency-selection-note {
  align-items: center;
  background: #edf4ff;
  border: 1px solid #cfddf4;
  border-radius: 6px;
  color: #285493;
  display: flex;
  font-size: 11px;
  font-weight: 650;
  gap: 7px;
  justify-content: center;
  min-height: 35px;
  padding: 7px 16px;
}

.consistency-table-scroll {
  max-width: 100%;
  overflow: auto;
  scrollbar-color: #b4c4d8 #eef3f8;
  scrollbar-width: thin;
}

.consistency-table-scroll table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
  min-width: 1160px;
  table-layout: fixed;
  width: 100%;
}

.consistency-table-scroll th,
.consistency-table-scroll td {
  border-bottom: 1px solid #e5ebf2;
  color: #304b67;
  line-height: 1.45;
  min-width: 0;
  padding: 10px 9px;
  text-align: left;
  vertical-align: middle;
}

.consistency-table-scroll th {
  background: #f3f7fc;
  color: #536b84;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .01em;
  position: sticky;
  top: 0;
  white-space: nowrap;
  z-index: 2;
}

.consistency-table-scroll td {
  overflow-wrap: anywhere;
}

.consistency-table-scroll tbody tr {
  background: #fff;
  transition: background-color .14s ease, box-shadow .14s ease;
}

.consistency-table-scroll tbody tr:hover {
  background: #f7faff;
}

.consistency-finding-row {
  cursor: default;
}

.consistency-finding-row:focus-visible {
  background: #f4f8ff;
  box-shadow: inset 0 0 0 2px rgba(47, 108, 255, .42);
  outline: none;
}

.consistency-table-scroll tbody tr.is-selected,
.consistency-table-scroll tbody tr.selected,
.consistency-table-scroll tbody tr[aria-selected="true"] {
  background: #edf4ff;
  box-shadow: inset 3px 0 0 var(--consistency-blue);
}

.consistency-table-scroll tbody tr.is-critical,
.consistency-table-scroll tbody tr[data-severity="critical"] {
  box-shadow: inset 3px 0 0 var(--consistency-red);
}

.consistency-table-scroll tbody tr.is-warning,
.consistency-table-scroll tbody tr[data-severity="warning"] {
  box-shadow: inset 3px 0 0 var(--consistency-orange);
}

.consistency-table-scroll .consistency-check {
  display: table-cell;
  min-width: 44px;
  text-align: center;
  width: 44px;
}

.consistency-check input,
input.consistency-check {
  accent-color: var(--consistency-blue);
  cursor: pointer;
  height: 16px;
  margin: 0;
  width: 16px;
}

.consistency-table-scroll th:nth-child(2) { width: 76px; }
.consistency-table-scroll th:nth-child(3) { width: 116px; }
.consistency-table-scroll th:nth-child(4) { width: 260px; }
.consistency-table-scroll th:nth-child(5) { width: 136px; }
.consistency-table-scroll th:nth-child(6) { width: 220px; }
.consistency-table-scroll th:nth-child(7) { width: 190px; }
.consistency-table-scroll th:nth-child(8) { width: 86px; }

.consistency-severity,
.consistency-category,
.consistency-source,
.consistency-stage-status,
.consistency-status,
.consistency-repairable {
  align-items: center;
  background: #eef3f8;
  border: 1px solid #dae3ed;
  border-radius: 5px;
  color: #526a82;
  display: inline-flex;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
  gap: 4px;
  line-height: 1.2;
  min-height: 24px;
  padding: 4px 7px;
  white-space: nowrap;
}

.consistency-severity::before,
.consistency-status::before,
.consistency-repairable::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 5px;
  opacity: .82;
  width: 5px;
}

.consistency-severity::before {
  display: none;
}

.consistency-severity > i {
  background: currentColor;
  border-radius: 50%;
  display: block;
  height: 5px;
  width: 5px;
}

.consistency-severity.critical,
.consistency-severity-critical,
.consistency-severity[data-severity="critical"] {
  background: #fff0f2;
  border-color: #f0c8cf;
  color: var(--consistency-red);
}

.consistency-severity.warning,
.consistency-severity-warning,
.consistency-severity[data-severity="warning"] {
  background: #fff6e8;
  border-color: #efd6ac;
  color: var(--consistency-orange);
}

.consistency-severity.notice,
.consistency-severity.info,
.consistency-severity-notice,
.consistency-severity-info,
.consistency-severity[data-severity="notice"] {
  background: #eaf3ff;
  border-color: #ccddf6;
  color: var(--consistency-blue-strong);
}

.consistency-status.healthy,
.consistency-status.fixed,
.consistency-status.success,
.consistency-status[data-status="healthy"],
.consistency-status[data-status="fixed"],
.consistency-repairable.yes,
.consistency-repairable[data-repairable="true"] {
  background: #eaf8f4;
  border-color: #c4e8de;
  color: var(--consistency-green);
}

.consistency-status.pending,
.consistency-status.processing,
.consistency-status[data-status="pending"] {
  background: #edf4ff;
  border-color: #cbdcf7;
  color: var(--consistency-blue-strong);
}

.consistency-status.failed,
.consistency-status[data-status="failed"],
.consistency-repairable.no,
.consistency-repairable[data-repairable="false"] {
  background: #fff0f2;
  border-color: #efc9cf;
  color: var(--consistency-red);
}

.consistency-category {
  background: #eff8fb;
  border-color: #d0e9ef;
  color: #14758a;
}

.consistency-source {
  align-items: start;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #344f6b;
  display: grid;
  gap: 2px;
  min-height: 0;
  padding: 0;
  white-space: normal;
}

.consistency-source strong {
  color: #284866;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.consistency-source span {
  color: var(--consistency-slate);
  font-size: 9px;
}

.consistency-comparison {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.consistency-comparison > span,
.consistency-comparison > code {
  background: #f5f7fa;
  border: 1px solid #e1e7ee;
  border-radius: 4px;
  color: #4f6378;
  display: block;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.4;
  max-height: 50px;
  overflow: auto;
  padding: 4px 6px;
  white-space: normal;
}

.consistency-comparison > span:last-child,
.consistency-comparison > code:last-child {
  background: #fff5ed;
  border-color: #efd8c5;
  color: #9a5723;
}

.consistency-comparison > span:first-child,
.consistency-comparison > code:first-child {
  background: #edf8f5;
  border-color: #d1e9e2;
  color: #176d5d;
}

.consistency-comparison small,
.consistency-comparison b {
  font-size: inherit;
}

.consistency-comparison small {
  display: block;
  font-weight: 650;
  margin-bottom: 1px;
  opacity: .72;
}

.consistency-comparison b {
  display: block;
  font-weight: 750;
}

.consistency-problem {
  min-width: 0;
}

.consistency-problem strong,
.consistency-problem span {
  display: block;
}

.consistency-problem strong {
  color: #284866;
  font-size: 11px;
}

.consistency-problem span {
  color: var(--consistency-slate);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 3px;
}

.consistency-action-copy {
  display: grid;
  gap: 2px;
  min-width: 160px;
}

.consistency-action-copy strong {
  color: #284766;
  font-size: 11px;
}

.consistency-action-copy span {
  color: var(--consistency-slate);
  font-size: 10px;
  line-height: 1.45;
}

.consistency-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.consistency-row-actions .btn,
.consistency-row-actions button,
.consistency-row-actions .row-action {
  min-height: 30px;
  padding: 5px 8px;
  white-space: nowrap;
}

.consistency-row-actions .row-action.repair {
  background: #edf8f5;
  border-color: #c8e5dd;
  color: var(--consistency-green);
}

.consistency-pagination {
  align-items: center;
  background: #fbfcfe;
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  min-height: 50px;
  padding: 9px 14px;
}

.consistency-pagination > span {
  color: var(--consistency-slate);
  font-size: 11px;
  margin-right: auto;
}

.consistency-pagination > div {
  align-items: center;
  display: flex;
  gap: 7px;
}

.consistency-pagination em {
  color: #5e7187;
  font-size: 10px;
  font-style: normal;
  white-space: nowrap;
}

.consistency-pagination button {
  align-items: center;
  background: #fff;
  border: 1px solid #d1dce8;
  border-radius: 6px;
  color: #365675;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11px;
  justify-content: center;
  min-height: 32px;
  min-width: 32px;
  padding: 5px 8px;
}

.consistency-pagination button:hover:not(:disabled),
.consistency-pagination button.active,
.consistency-pagination button[aria-current="page"] {
  background: #edf4ff;
  border-color: #a9c2ee;
  color: var(--consistency-blue-strong);
}

.consistency-pagination button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.table-panel > .entity-list-pagination {
  border-top: 1px solid #e2e9f1;
}

.table-panel > .table-foot + .entity-list-pagination {
  margin-top: -1px;
}

.consistency-empty,
.consistency-loading {
  align-items: center;
  color: var(--consistency-slate);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 240px;
  padding: 34px 20px;
  text-align: center;
}

.consistency-empty-icon,
.consistency-loading::before {
  align-items: center;
  background: #edf4ff;
  border: 1px solid #d0def3;
  border-radius: 50%;
  color: var(--consistency-blue-strong);
  display: flex;
  height: 46px;
  justify-content: center;
  margin-bottom: 11px;
  width: 46px;
}

.consistency-loading::before {
  animation: consistency-spin .75s linear infinite;
  border-color: #d0def3;
  border-right-color: var(--consistency-blue);
  content: "";
  height: 28px;
  width: 28px;
}

.consistency-empty strong,
.consistency-loading strong {
  color: #274664;
  font-size: 13px;
}

.consistency-empty p,
.consistency-loading p,
.consistency-loading span {
  font-size: 11px;
  line-height: 1.6;
  margin: 5px 0 0;
  max-width: 460px;
}

.consistency-empty.compact {
  min-height: 170px;
}

.consistency-loading .boot-spinner {
  margin-bottom: 12px;
}

.consistency-empty > .btn {
  margin-top: 14px;
}

.consistency-loading::before {
  display: none;
}

@keyframes consistency-spin {
  to { transform: rotate(360deg); }
}

.consistency-history-drawer {
  width: min(720px, 96vw);
}

.consistency-history-backdrop,
.consistency-detail-backdrop {
  background: rgba(6, 20, 43, .44);
}

.consistency-detail-drawer {
  width: min(880px, 97vw);
}

.consistency-history-drawer .drawer-body,
.consistency-detail-drawer .drawer-body {
  background: #f4f7fb;
  padding: 18px;
}

.consistency-history-list {
  display: grid;
  gap: 9px;
}

.consistency-history-item {
  align-items: center;
  appearance: none;
  background: #fff;
  border: 1px solid #d9e3ef;
  border-left: 3px solid #9eb5d1;
  border-radius: 7px;
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 76px;
  padding: 12px 13px;
  text-align: left;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
  width: 100%;
}

.consistency-history-item:hover {
  background: #f8faff;
  border-color: #bdd0e7;
}

.consistency-history-item.active {
  background: #edf4ff;
  border-color: #a9c4ef;
  border-left-color: var(--consistency-blue);
  box-shadow: 0 5px 14px rgba(35, 87, 215, .08);
}

.consistency-history-score {
  align-items: center;
  background: #edf4ff;
  border: 1px solid #cfddf2;
  border-radius: 8px;
  color: var(--consistency-blue-strong);
  display: flex;
  flex-direction: column;
  height: 52px;
  justify-content: center;
  width: 52px;
}

.consistency-history-score strong {
  font-size: 17px;
  line-height: 1;
}

.consistency-history-score small {
  font-size: 9px;
  margin-top: 3px;
}

.consistency-history-score.healthy {
  background: #eaf8f4;
  border-color: #c3e6dc;
  color: var(--consistency-green);
}

.consistency-history-score.warning {
  background: #fff6e8;
  border-color: #efd6ac;
  color: var(--consistency-orange);
}

.consistency-history-score.critical {
  background: #fff0f2;
  border-color: #efc8cf;
  color: var(--consistency-red);
}

.consistency-history-copy {
  display: grid;
  min-width: 0;
}

.consistency-history-copy strong {
  color: #284765;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.consistency-history-copy small,
.consistency-history-copy em {
  color: var(--consistency-slate);
  font-size: 10px;
  font-style: normal;
  line-height: 1.45;
  margin-top: 2px;
}

.consistency-history-item > span:last-child {
  align-items: center;
  color: var(--consistency-blue-strong);
  display: flex;
  font-size: 10px;
  font-weight: 750;
  gap: 4px;
  white-space: nowrap;
}

.consistency-detail-hero {
  align-items: start;
  background: #fff;
  border: 1px solid #d9e3ef;
  border-left: 4px solid var(--consistency-blue);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 16px 17px;
}

.consistency-detail-hero.critical {
  background: #fffafb;
  border-left-color: var(--consistency-red);
}

.consistency-detail-hero.warning {
  background: #fffdfa;
  border-left-color: var(--consistency-orange);
}

.consistency-detail-hero.info {
  border-left-color: var(--consistency-blue);
}

.consistency-detail-hero > div:first-child {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.consistency-detail-hero h2,
.consistency-detail-hero h3 {
  color: var(--consistency-navy);
  font-size: 18px;
  margin: 3px 0;
}

.consistency-detail-hero p,
.consistency-detail-hero span {
  color: var(--consistency-slate);
  font-size: 11px;
  line-height: 1.55;
  margin: 0;
}

.consistency-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consistency-detail-card {
  background: #fff;
  border: 1px solid #d9e3ef;
  border-radius: 8px;
  min-width: 0;
  padding: 14px 15px;
}

.consistency-detail-card > span,
.consistency-detail-card > strong,
.consistency-detail-card > small {
  display: block;
}

.consistency-detail-card > span {
  color: var(--consistency-slate);
  font-size: 10px;
  font-weight: 700;
}

.consistency-detail-card > strong {
  color: #284765;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.consistency-detail-card > small {
  color: var(--consistency-slate);
  font-size: 10px;
  line-height: 1.5;
  margin-top: 5px;
}

.consistency-detail-card.source {
  border-top: 3px solid #8ba5c2;
}

.consistency-detail-card.expected {
  background: #f7fcfa;
  border-top: 3px solid var(--consistency-green);
}

.consistency-detail-card.actual {
  background: #fffaf6;
  border-top: 3px solid var(--consistency-orange);
}

.consistency-detail-card.action {
  background: #f7faff;
  border-top: 3px solid var(--consistency-blue);
}

.consistency-detail-card.full,
.consistency-detail-card[data-span="full"] {
  grid-column: 1 / -1;
}

.consistency-detail-card h3,
.consistency-detail-card h4 {
  border-bottom: 1px solid #e7edf4;
  color: #2a4a69;
  font-size: 12px;
  margin: 0 0 10px;
  padding-bottom: 8px;
}

.consistency-detail-card dl {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.consistency-detail-card dt {
  color: var(--consistency-slate);
  font-size: 10px;
}

.consistency-detail-card dd {
  color: #294765;
  font-size: 11px;
  font-weight: 650;
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.consistency-detail-explanation {
  margin-top: 10px;
  padding: 14px 15px;
}

.consistency-detail-explanation > strong {
  color: #2a4a69;
  display: block;
  font-size: 12px;
}

.consistency-detail-explanation > p {
  color: #536b84;
  font-size: 11px;
  line-height: 1.65;
  margin: 6px 0;
}

.consistency-detail-explanation > span {
  color: var(--consistency-slate);
  font-size: 10px;
}

.consistency-detail-drawer .drawer-foot > span,
.consistency-history-drawer .drawer-foot > span {
  color: var(--consistency-slate);
  font-size: 10px;
  margin-right: auto;
}

.consistency-detail-drawer .drawer-foot > div {
  align-items: center;
  display: flex;
  gap: 7px;
}

.consistency-run-overlay {
  background: rgba(6, 20, 43, .5);
  backdrop-filter: blur(3px);
}

.consistency-repair-backdrop {
  background: rgba(6, 20, 43, .5);
}

.consistency-repair-dialog,
.consistency-run-dialog {
  background: #fff;
  border: 1px solid #d4dfeb;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(6, 20, 43, .24);
  max-height: min(760px, calc(100vh - 32px));
  max-width: calc(100vw - 32px);
  overflow: hidden;
  width: min(720px, calc(100vw - 32px));
}

.consistency-run-dialog {
  width: min(620px, calc(100vw - 32px));
}

.consistency-repair-head,
.consistency-repair-dialog > header,
.consistency-repair-dialog > .modal-head,
.consistency-run-dialog > header,
.consistency-run-dialog > .modal-head {
  align-items: center;
  border-bottom: 1px solid #e2e9f1;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 66px;
  padding: 14px 17px;
}

.consistency-repair-head h2,
.consistency-repair-head h3,
.consistency-repair-dialog > header h2,
.consistency-repair-dialog > header h3,
.consistency-repair-dialog > .modal-head h2,
.consistency-repair-dialog > .modal-head h3,
.consistency-run-dialog > header h2,
.consistency-run-dialog > header h3,
.consistency-run-dialog > .modal-head h2,
.consistency-run-dialog > .modal-head h3 {
  color: var(--consistency-navy);
  font-size: 16px;
  margin: 0;
}

.consistency-repair-head > div {
  min-width: 0;
}

.consistency-repair-head > div > span {
  color: var(--consistency-blue-strong);
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  margin-bottom: 3px;
}

.consistency-repair-head p {
  color: var(--consistency-slate);
  font-size: 10px;
  line-height: 1.5;
  margin: 4px 0 0;
}

.consistency-repair-body {
  max-height: min(570px, calc(100vh - 170px));
  overflow: auto;
  padding: 15px 17px;
}

.consistency-repair-notice {
  align-items: start;
  background: #edf4ff;
  border: 1px solid #ccdcf4;
  border-radius: 7px;
  color: var(--consistency-blue-strong);
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1fr);
  margin-bottom: 11px;
  padding: 11px 12px;
}

.consistency-repair-notice > svg {
  margin-top: 1px;
}

.consistency-repair-notice strong,
.consistency-repair-notice span {
  display: block;
}

.consistency-repair-notice strong {
  font-size: 11px;
}

.consistency-repair-notice span {
  color: #5c7191;
  font-size: 10px;
  line-height: 1.5;
  margin-top: 2px;
}

.consistency-repair-list {
  display: grid;
  gap: 8px;
  max-height: min(420px, 48vh);
  overflow: auto;
  padding: 0;
}

.consistency-repair-list > article,
.consistency-repair-list > label,
.consistency-repair-list > div {
  align-items: start;
  background: #f7f9fc;
  border: 1px solid #dce5ef;
  border-radius: 7px;
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 10px 11px;
}

.consistency-repair-list input[type="checkbox"] {
  accent-color: var(--consistency-blue);
  height: 16px;
  margin: 2px 0 0;
  width: 16px;
}

.consistency-repair-list > article > span:first-child {
  align-items: center;
  background: #eaf1ff;
  border-radius: 50%;
  color: var(--consistency-blue-strong);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  height: 23px;
  justify-content: center;
  width: 23px;
}

.consistency-repair-list article strong,
.consistency-repair-list article small,
.consistency-repair-list article p {
  display: block;
}

.consistency-repair-list article strong {
  color: #294866;
  font-size: 11px;
}

.consistency-repair-list article small {
  color: var(--consistency-slate);
  font-size: 9px;
  margin-top: 2px;
}

.consistency-repair-list article p {
  color: #526b84;
  font-size: 10px;
  line-height: 1.5;
  margin: 5px 0 0;
}

.consistency-confirm-box {
  background: #fff8ec;
  border: 1px solid #ecd5af;
  border-radius: 7px;
  margin: 11px 0 0;
  padding: 12px;
}

.consistency-confirm-box strong {
  color: #7f521b;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.consistency-confirm-box p {
  color: #8a673d;
  font-size: 11px;
  line-height: 1.55;
  margin: 0 0 9px;
}

.consistency-confirm-box > span,
.consistency-confirm-box > small {
  display: block;
}

.consistency-confirm-box > span {
  color: #7f521b;
  font-size: 11px;
  font-weight: 750;
  margin-bottom: 7px;
}

.consistency-confirm-box > small {
  color: #8a673d;
  font-size: 9px;
  line-height: 1.45;
  margin-top: 6px;
}

.consistency-repair-foot,
.consistency-repair-dialog > footer,
.consistency-repair-dialog > .modal-foot,
.consistency-run-dialog > footer,
.consistency-run-dialog > .modal-foot {
  align-items: center;
  background: #fbfcfe;
  border-top: 1px solid #e2e9f1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-height: 62px;
  padding: 11px 17px;
}

.consistency-repair-foot > span {
  color: var(--consistency-slate);
  font-size: 9px;
  line-height: 1.45;
}

.consistency-repair-foot > div {
  align-items: center;
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.consistency-repair-dialog.is-busy {
  cursor: progress;
}

.consistency-repair-dialog.is-busy .consistency-repair-body,
.consistency-repair-dialog.is-busy .consistency-repair-head {
  opacity: .65;
  pointer-events: none;
}

.consistency-repair-dialog.is-busy .consistency-repair-foot button {
  pointer-events: none;
}

.consistency-run-dialog {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 280px;
  padding: 32px 34px;
  text-align: center;
}

.consistency-run-dialog .boot-spinner {
  height: 34px;
  margin-bottom: 16px;
  width: 34px;
}

.consistency-run-dialog > strong {
  color: var(--consistency-navy);
  font-size: 17px;
}

.consistency-run-dialog > p {
  color: var(--consistency-slate);
  font-size: 11px;
  line-height: 1.65;
  margin: 7px 0 15px;
  max-width: 470px;
}

.consistency-run-dialog > span {
  color: #71849a;
  font-size: 9px;
  margin-top: 11px;
}

.consistency-run-progress {
  background: #e3ebf5;
  border-radius: 4px;
  height: 6px;
  max-width: 390px;
  overflow: hidden;
  width: 100%;
}

.consistency-run-progress > i {
  animation: consistency-progress 1.7s ease-in-out infinite;
  background: var(--consistency-blue);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 42%;
}

@keyframes consistency-progress {
  0% { transform: translateX(-110%); }
  50% { transform: translateX(90%); }
  100% { transform: translateX(240%); }
}

.consistency-page button:focus-visible,
.consistency-page a:focus-visible,
.consistency-page input:focus-visible,
.consistency-page select:focus-visible,
.consistency-page textarea:focus-visible,
.consistency-history-drawer button:focus-visible,
.consistency-detail-drawer button:focus-visible,
.consistency-repair-dialog button:focus-visible,
.consistency-repair-dialog input:focus-visible,
.consistency-repair-dialog select:focus-visible,
.consistency-repair-dialog textarea:focus-visible,
.consistency-run-dialog button:focus-visible,
.consistency-run-dialog input:focus-visible,
.consistency-run-dialog select:focus-visible,
.consistency-run-dialog textarea:focus-visible {
  border-color: var(--consistency-blue, #2f6cff);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .16);
  outline: none;
}

@media (max-width: 1200px) {
  .consistency-stage-list,
  .consistency-flow,
  .consistency-category-strip,
  .consistency-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .consistency-stage::after,
  .consistency-flow-card::after {
    display: none;
  }

  .consistency-filter-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .consistency-filter-keyword {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .consistency-hero {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 19px;
  }

  .consistency-hero-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .consistency-kpis,
  .consistency-stage-list,
  .consistency-flow,
  .consistency-category-strip,
  .consistency-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consistency-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consistency-table-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .consistency-table-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .consistency-detail-grid {
    grid-template-columns: 1fr;
  }

  .consistency-detail-card.full,
  .consistency-detail-card[data-span="full"] {
    grid-column: auto;
  }
}

@media (max-width: 650px) {
  .consistency-page {
    gap: 10px;
  }

  .consistency-hero {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .consistency-score {
    justify-content: flex-start;
  }

  .consistency-hero-actions {
    grid-column: auto;
    width: 100%;
  }

  .consistency-hero-actions .btn {
    flex: 1 1 140px;
  }

  .consistency-kpis,
  .consistency-stage-list,
  .consistency-flow,
  .consistency-category-strip,
  .consistency-categories,
  .consistency-filter-grid {
    grid-template-columns: 1fr;
  }

  .consistency-filter-keyword {
    grid-column: auto;
  }

  .consistency-kpi {
    min-height: 78px;
  }

  .consistency-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .consistency-filter-actions .btn {
    width: 100%;
  }

  .consistency-table-head,
  .consistency-selection-note {
    padding-left: 12px;
    padding-right: 12px;
  }

  .consistency-table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consistency-table-actions .btn {
    width: 100%;
  }

  .consistency-pagination {
    flex-wrap: wrap;
    justify-content: center;
  }

  .consistency-pagination > span {
    flex-basis: 100%;
    margin: 0;
    text-align: center;
  }

  .consistency-history-drawer,
  .consistency-detail-drawer {
    width: 100vw;
  }

  .consistency-history-drawer .drawer-body,
  .consistency-detail-drawer .drawer-body {
    padding: 12px;
  }

  .consistency-history-item {
    gap: 9px;
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 10px;
  }

  .consistency-history-score {
    height: 46px;
    width: 46px;
  }

  .consistency-history-item > span:last-child {
    display: none;
  }

  .consistency-detail-hero {
    padding: 14px;
  }

  .consistency-detail-card dl {
    grid-template-columns: 1fr;
  }

  .consistency-repair-dialog,
  .consistency-run-dialog {
    border-radius: 8px;
    max-height: calc(100vh - 16px);
    max-width: calc(100vw - 16px);
    width: calc(100vw - 16px);
  }

  .consistency-repair-foot,
  .consistency-repair-dialog > footer,
  .consistency-repair-dialog > .modal-foot,
  .consistency-run-dialog > footer,
  .consistency-run-dialog > .modal-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .consistency-repair-foot .btn,
  .consistency-repair-dialog > footer .btn,
  .consistency-repair-dialog > .modal-foot .btn,
  .consistency-run-dialog > footer .btn,
  .consistency-run-dialog > .modal-foot .btn {
    width: 100%;
  }

  .consistency-repair-foot > div {
    display: grid;
    grid-template-columns: 1fr;
    margin-left: 0;
    width: 100%;
  }

  .consistency-run-dialog {
    min-height: 250px;
    padding: 26px 20px;
  }

  .consistency-detail-drawer .drawer-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .consistency-detail-drawer .drawer-foot > div {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .consistency-detail-drawer .drawer-foot .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consistency-page *,
  .consistency-history-drawer *,
  .consistency-detail-drawer *,
  .consistency-repair-dialog *,
  .consistency-run-dialog * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* System settings · data import and backup / restore */
.system-alert-button {
  position: relative;
}

.system-alert-button.has-alerts {
  color: #245bd8;
  border-color: #c9d9ff;
  background: #eef4ff;
}

.system-alert-count {
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  position: absolute;
  right: -5px;
  top: -6px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #e44c59;
  box-shadow: 0 4px 10px rgba(190, 40, 54, .22);
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
}

.settings-blue-page {
  --settings-blue: #2f6cff;
  --settings-blue-dark: #0b2d49;
  --settings-blue-soft: #edf3ff;
  --settings-line: #dbe5f2;
  display: grid;
  gap: 16px;
  color: #162e4b;
}

.settings-blue-page *,
.backup-restore-dialog * {
  box-sizing: border-box;
}

.settings-blue-hero {
  min-height: 164px;
  padding: 28px 31px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(121, 181, 255, .19);
  border-radius: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(57, 184, 255, .28), transparent 31%),
    linear-gradient(126deg, #061a34 0%, #0c3b72 56%, #126ca8 100%);
  box-shadow: 0 16px 38px rgba(13, 52, 100, .16);
}

.settings-blue-hero::after {
  width: 250px;
  height: 250px;
  position: absolute;
  right: -90px;
  bottom: -150px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  content: "";
}

.settings-blue-hero > div {
  position: relative;
  z-index: 1;
}

.settings-blue-hero > div:first-child {
  max-width: 760px;
}

.settings-blue-hero > div:first-child > span {
  color: #91d9ff;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .18em;
}

.settings-blue-hero h2 {
  margin: 7px 0 8px;
  font-size: 27px;
  letter-spacing: -.02em;
}

.settings-blue-hero p {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  line-height: 1.75;
}

.settings-hero-badge {
  min-width: 180px;
  padding: 18px 20px;
  display: grid;
  justify-items: end;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 13px;
  background: rgba(2, 24, 54, .27);
  backdrop-filter: blur(12px);
}

.settings-hero-badge svg {
  margin-bottom: 12px;
  color: #8fdcff;
}

.settings-hero-badge strong,
.settings-hero-badge span {
  display: block;
}

.settings-hero-badge strong {
  font-size: 14px;
}

.settings-hero-badge span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .62);
  font-size: 10px;
}

.settings-section-head {
  min-height: 62px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #e6edf6;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.settings-section-head > div:first-child > strong,
.settings-section-head > div:first-child > span,
.settings-section-head > div:last-child > strong,
.settings-section-head > div:last-child > span {
  display: block;
}

.settings-section-head > div:first-child > strong {
  font-size: 14px;
}

.settings-section-head > div:first-child > span {
  margin-top: 3px;
  color: #718299;
  font-size: 10px;
}

.settings-section-head > div:last-child {
  color: #718299;
  text-align: right;
  font-size: 10px;
}

.settings-section-head > div:last-child > strong {
  color: #245bd8;
  font-size: 17px;
}

.settings-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--settings-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 60, 105, .05);
}

.settings-flow article {
  min-height: 64px;
  padding: 13px 16px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #7a8a9f;
}

.settings-flow article + article {
  border-left: 1px solid #e7edf5;
}

.settings-flow article span {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  color: #6d7f95;
  background: #edf2f8;
  font-size: 10px;
  font-weight: 850;
}

.settings-flow article strong {
  font-size: 12px;
}

.settings-flow article.active,
.settings-flow article.done {
  color: #1c4c96;
  background: #f6f9ff;
}

.settings-flow article.active span,
.settings-flow article.done span {
  color: #fff;
  background: linear-gradient(135deg, #2f6cff, #258cda);
  box-shadow: 0 6px 12px rgba(47, 108, 255, .19);
}

.settings-flow article.done::after {
  width: 7px;
  height: 7px;
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 50%;
  background: #28a67a;
  content: "";
}

.data-import-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.data-import-type-card {
  min-height: 178px;
  padding: 18px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  gap: 12px;
  border: 1px solid var(--settings-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 60, 105, .045);
  cursor: pointer;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.data-import-type-card:hover,
.data-import-type-card:focus-visible {
  border-color: #9ebcff;
  box-shadow: 0 12px 28px rgba(38, 91, 190, .10);
  transform: translateY(-2px);
}

.data-import-type-card.active {
  border-color: #5e8aff;
  background: linear-gradient(180deg, #fff, #f5f8ff);
  box-shadow: 0 0 0 2px rgba(47, 108, 255, .08), 0 12px 30px rgba(38, 91, 190, .10);
}

.data-import-type-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #2c64da;
  background: #eaf1ff;
}

.data-import-type-card > div:nth-child(2) {
  min-width: 0;
}

.data-import-type-card > div:nth-child(2) > strong,
.data-import-type-card p,
.data-import-type-card small {
  display: block;
}

.data-import-type-card > div:nth-child(2) > strong {
  margin: 2px 0 6px;
  font-size: 14px;
}

.data-import-type-card p {
  margin: 0;
  color: #697a91;
  font-size: 10px;
  line-height: 1.65;
}

.data-import-type-card small {
  margin-top: 7px;
  color: #94a3b5;
  font-size: 9px;
  line-height: 1.5;
}

.data-import-type-card .btn {
  grid-column: 1 / -1;
  width: 100%;
  color: #245bd8;
  border-color: #ccdcff;
  background: #f6f9ff;
}

.data-import-upload-card {
  overflow: hidden;
}

.data-import-format {
  padding: 5px 8px;
  border-radius: 999px;
  color: #245bd8;
  background: #edf3ff;
  font-size: 9px;
  font-weight: 800;
}

.data-import-upload-body {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr);
  gap: 16px;
}

.data-import-dropzone {
  min-height: 190px;
  padding: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1.5px dashed #aac1e5;
  border-radius: 11px;
  color: #49647f;
  background:
    linear-gradient(90deg, rgba(47, 108, 255, .025) 1px, transparent 1px),
    linear-gradient(rgba(47, 108, 255, .025) 1px, transparent 1px),
    #f9fbff;
  background-size: 20px 20px;
  cursor: pointer;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.data-import-dropzone:hover,
.data-import-dropzone.dragging {
  border-color: #3b75f4;
  background-color: #f1f6ff;
  transform: translateY(-1px);
}

.data-import-dropzone.has-file {
  border-style: solid;
  border-color: #76b7a4;
  background-color: #f4fbf8;
}

.data-import-upload-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #2f6cff;
  background: #e8f0ff;
  box-shadow: 0 8px 18px rgba(47, 108, 255, .10);
}

.data-import-dropzone.has-file .data-import-upload-icon {
  color: #138166;
  background: #e4f5ef;
}

.data-import-dropzone > strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-import-dropzone > small {
  margin-top: 6px;
  color: #8797aa;
  font-size: 10px;
}

.data-import-dropzone > em {
  margin-top: 14px;
  padding: 6px 13px;
  border: 1px solid #c8d8f2;
  border-radius: 5px;
  color: #245bd8;
  background: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.data-import-upload-guide {
  padding: 19px;
  display: flex;
  flex-direction: column;
  border: 1px solid #e1e8f1;
  border-radius: 11px;
  background: #fbfcfe;
}

.data-import-upload-guide > strong {
  font-size: 13px;
}

.data-import-upload-guide ul {
  margin: 12px 0 18px;
  padding-left: 18px;
  color: #6e7f93;
  font-size: 10px;
  line-height: 2;
}

.data-import-upload-guide .btn {
  width: 100%;
  margin-top: auto;
}

.data-import-awaiting {
  min-height: 86px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-color: #dce7f6;
  background: linear-gradient(90deg, #f7faff, #fff);
}

.data-import-awaiting-icon {
  width: 43px;
  height: 43px;
  display: grid;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 11px;
  color: #2f6cff;
  background: #e9f1ff;
}

.data-import-awaiting strong,
.data-import-awaiting span {
  display: block;
}

.data-import-awaiting strong {
  font-size: 13px;
}

.data-import-awaiting span {
  max-width: 880px;
  margin-top: 4px;
  color: #718299;
  font-size: 10px;
  line-height: 1.6;
}

.data-import-preview {
  display: grid;
  gap: 12px;
  scroll-margin-top: 18px;
}

.data-import-preview-head {
  min-height: 82px;
  padding: 16px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--settings-line);
  border-radius: 11px;
  background: #fff;
}

.data-import-preview-head > div > span {
  color: #2f6cff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}

.data-import-preview-head h3 {
  margin: 4px 0 3px;
  font-size: 17px;
}

.data-import-preview-head p {
  margin: 0;
  color: #7d8da1;
  font-size: 10px;
}

.data-import-preview-kpis,
.backup-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.data-import-preview-kpis article {
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--settings-line);
  border-radius: 10px;
  background: #fff;
}

.data-import-preview-kpis article::before {
  width: 3px;
  position: absolute;
  inset: 0 auto 0 0;
  background: #5f7d9d;
  content: "";
}

.data-import-preview-kpis article.success::before { background: #24a477; }
.data-import-preview-kpis article.warning::before { background: #d59b31; }
.data-import-preview-kpis article.danger::before { background: #df4d5a; }
.data-import-preview-kpis span,
.data-import-preview-kpis small {
  display: block;
  color: #7d8da1;
  font-size: 9px;
}

.data-import-preview-kpis strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 23px;
}

.data-import-error-panel {
  overflow: hidden;
}

.data-import-error-panel table {
  min-width: 960px;
}

.data-import-error-message {
  color: #b43f4c;
  font-size: 11px;
}

.data-import-confirm-bar {
  min-height: 68px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #e5ecf5;
  background: #fbfdff;
}

.data-import-confirm-bar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #51708b;
}

.data-import-confirm-bar > div > span,
.data-import-confirm-bar > div strong {
  display: block;
}

.data-import-confirm-bar > div strong {
  margin-bottom: 2px;
  color: #23425f;
  font-size: 11px;
}

.data-import-confirm-bar > div > span {
  font-size: 9px;
}

.data-import-history table {
  min-width: 1120px;
}

.data-import-history td strong,
.data-import-history td small {
  display: block;
}

.data-import-history td small {
  margin-top: 3px;
  color: #8b9aac;
  font-size: 9px;
}

.data-import-type-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.data-import-type-cell > span {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 7px;
  color: #2f6cff;
  background: #edf3ff;
}

.settings-task-status {
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e1ec;
  border-radius: 999px;
  color: #687c91;
  background: #f1f4f8;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.settings-task-status.success {
  color: #11765b;
  border-color: #bae5d7;
  background: #e7f7f1;
}

.settings-task-status.warning {
  color: #95630e;
  border-color: #efd8aa;
  background: #fff5e3;
}

.settings-task-status.danger {
  color: #af3e4b;
  border-color: #efc8ce;
  background: #fff0f2;
}

.settings-task-status.running {
  color: #245bd8;
  border-color: #c8d8ff;
  background: #edf3ff;
}

.settings-task-status.running::before {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .11);
  content: "";
  animation: settingsTaskPulse 1.25s ease-in-out infinite;
}

@keyframes settingsTaskPulse {
  50% { opacity: .35; transform: scale(.75); }
}

.backup-hero-actions {
  display: flex;
  gap: 9px;
}

.backup-hero-actions .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .10);
}

.backup-hero-actions .btn:hover {
  background: rgba(255, 255, 255, .17);
}

.backup-hero-actions .btn-primary {
  border-color: #78afff;
  background: #2f6cff;
}

.backup-overview-grid article {
  min-height: 102px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--settings-line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 60, 105, .045);
}

.backup-overview-grid article > span {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 11px;
  color: #2f6cff;
  background: #eaf1ff;
}

.backup-overview-grid article.success > span {
  color: #168365;
  background: #e5f5ef;
}

.backup-overview-grid article.warning > span {
  color: #a36d14;
  background: #fff2dc;
}

.backup-overview-grid small,
.backup-overview-grid strong,
.backup-overview-grid em {
  display: block;
}

.backup-overview-grid small {
  color: #718299;
  font-size: 9px;
}

.backup-overview-grid strong {
  max-width: 200px;
  margin: 5px 0 3px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backup-overview-grid em {
  color: #93a0b1;
  font-size: 9px;
  font-style: normal;
}

.backup-policy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  gap: 14px;
}

.backup-policy-card,
.backup-alert-panel {
  overflow: hidden;
}

.backup-policy-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #49647f;
  font-size: 10px;
  font-weight: 750;
}

.backup-policy-switch input,
.backup-offsite-option input,
.backup-restore-aware input {
  accent-color: #2f6cff;
}

.backup-policy-fields {
  padding: 17px 18px 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 11px;
}

.backup-policy-fields label > span,
.backup-restore-dialog-body label > span {
  display: block;
  margin-bottom: 6px;
  color: #65778e;
  font-size: 10px;
  font-weight: 700;
}

.backup-policy-fields input,
.backup-policy-fields select,
.backup-restore-dialog-body input:not([type="checkbox"]) {
  width: 100%;
  height: 39px;
}

.backup-offsite-option {
  margin: 5px 18px 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dce6f4;
  border-radius: 8px;
  background: #f7faff;
}

.backup-policy-options {
  padding: 5px 18px 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.backup-policy-options .backup-offsite-option {
  min-width: 0;
  margin: 0;
}

.backup-offsite-option strong,
.backup-offsite-option small {
  display: block;
}

.backup-offsite-option strong {
  font-size: 11px;
}

.backup-offsite-option small {
  margin-top: 2px;
  color: #8190a3;
  font-size: 9px;
}

.backup-policy-foot {
  min-height: 58px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e7edf5;
  background: #fbfdff;
}

.backup-policy-foot > span {
  color: #8796a8;
  font-size: 9px;
}

.backup-alert-total {
  min-width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #b13f4b;
  background: #fff0f2;
  font-size: 13px;
  font-weight: 850;
}

.backup-alert-list {
  max-height: 310px;
  padding: 11px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
}

.backup-alert-list article {
  padding: 11px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #eadbb9;
  border-radius: 8px;
  background: #fffaf0;
}

.backup-alert-list article.danger {
  border-color: #efcbd0;
  background: #fff5f6;
}

.backup-alert-list article.info {
  border-color: #cedef8;
  background: #f5f8ff;
}

.backup-alert-list article.handled {
  opacity: .65;
  filter: saturate(.5);
}

.backup-alert-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #a46c12;
  background: #ffedcb;
}

.backup-alert-list article.danger .backup-alert-icon {
  color: #b3424f;
  background: #ffe3e7;
}

.backup-alert-list article.info .backup-alert-icon {
  color: #2f6cff;
  background: #e6efff;
}

.backup-alert-list strong,
.backup-alert-list p,
.backup-alert-list small {
  display: block;
}

.backup-alert-list strong {
  font-size: 11px;
}

.backup-alert-list p {
  margin: 3px 0;
  color: #697b90;
  font-size: 9px;
  line-height: 1.5;
}

.backup-alert-list small {
  color: #98a5b5;
  font-size: 8px;
}

.backup-alert-empty {
  min-height: 190px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  color: #178165;
}

.backup-alert-empty > svg {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 12px;
  background: #e6f6f0;
}

.backup-alert-empty strong,
.backup-alert-empty span {
  display: block;
}

.backup-alert-empty strong {
  font-size: 12px;
}

.backup-alert-empty span {
  margin-top: 3px;
  color: #8291a2;
  font-size: 9px;
}

.backup-point-panel,
.backup-job-panel {
  overflow: hidden;
}

.backup-point-table {
  min-width: 1220px;
}

.backup-job-panel table {
  min-width: 1060px;
}

.backup-point-panel td strong,
.backup-point-panel td small,
.backup-job-panel td strong,
.backup-job-panel td small {
  display: block;
}

.backup-point-panel td small,
.backup-job-panel td small {
  margin-top: 3px;
  color: #8d9cae;
  font-size: 8px;
}

.backup-point-panel .sticky-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  border-left: 1px solid #e7edf5;
  background: #fff;
}

.backup-point-panel th.sticky-actions {
  z-index: 3;
  background: #f6f8fb;
}

.backup-point-panel tbody tr:hover td.sticky-actions {
  background: #f8faff;
}

.backup-restore-action {
  color: #b3414e;
}

.backup-restore-action:disabled,
.row-action:disabled {
  color: #aeb8c4;
  background: transparent;
  cursor: not-allowed;
}

.backup-job-progress {
  min-width: 115px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.backup-job-progress > span {
  width: 82px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.backup-job-progress i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6cff, #26a3dc);
}

.backup-job-progress strong {
  color: #58708a;
  font-size: 9px;
}

.backup-restore-dialog {
  width: min(580px, 94vw);
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 25, 54, .28);
}

.backup-restore-dialog-body {
  max-height: calc(100vh - 170px);
  padding: 19px;
  display: grid;
  gap: 14px;
  overflow-y: auto;
}

.backup-restore-warning {
  padding: 14px;
  display: flex;
  gap: 11px;
  border: 1px solid #efcbd0;
  border-radius: 9px;
  color: #b13f4b;
  background: #fff5f6;
}

.backup-restore-warning svg {
  flex: 0 0 auto;
}

.backup-restore-warning strong {
  font-size: 12px;
}

.backup-restore-warning p {
  margin: 4px 0 0;
  color: #805f67;
  font-size: 9px;
  line-height: 1.65;
}

.backup-restore-target {
  padding: 12px 14px;
  border: 1px solid #dce6f4;
  border-radius: 8px;
  background: #f7faff;
}

.backup-restore-target span,
.backup-restore-target strong,
.backup-restore-target small {
  display: block;
}

.backup-restore-target span {
  color: #78899f;
  font-size: 9px;
}

.backup-restore-target strong {
  margin: 4px 0 2px;
  color: #245bd8;
  font-size: 12px;
}

.backup-restore-target small {
  color: #8b99aa;
  font-size: 9px;
}

.backup-restore-dialog-body label > span em {
  color: #d94b55;
  font-style: normal;
}

.backup-restore-aware {
  padding: 10px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #e3e9f1;
  border-radius: 7px;
  color: #64768b;
  background: #fbfcfe;
  font-size: 9px;
  line-height: 1.55;
}

.backup-restore-aware input {
  margin-top: 2px;
}

.backup-restore-dialog .btn-danger {
  color: #fff;
  border-color: #cf3f4d;
  background: #d94b55;
}

.backup-restore-dialog .btn-danger:hover {
  background: #c83e49;
}

.backup-restore-dialog .btn-danger:disabled {
  color: #9aa5b2;
  border-color: #dce2e9;
  background: #edf1f5;
  cursor: not-allowed;
}

.settings-blue-page button:focus-visible,
.settings-blue-page input:focus-visible,
.settings-blue-page select:focus-visible,
.backup-restore-dialog button:focus-visible,
.backup-restore-dialog input:focus-visible {
  border-color: #2f6cff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .14);
}

@media (max-width: 1180px) {
  .data-import-type-grid,
  .data-import-preview-kpis,
  .backup-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backup-policy-grid {
    grid-template-columns: 1fr;
  }

  .backup-policy-fields {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 820px) {
  .backup-policy-options {
    grid-template-columns: 1fr;
  }

  .settings-blue-hero {
    min-height: 0;
    padding: 23px;
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-hero-badge {
    width: 100%;
    justify-items: start;
  }

  .backup-hero-actions {
    width: 100%;
  }

  .backup-hero-actions .btn {
    flex: 1;
  }

  .data-import-upload-body {
    grid-template-columns: 1fr;
  }

  .data-import-upload-guide {
    min-height: 180px;
  }

  .data-import-confirm-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-import-confirm-bar .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .settings-blue-page {
    gap: 11px;
  }

  .settings-blue-hero {
    padding: 20px 18px;
    border-radius: 12px;
  }

  .settings-blue-hero h2 {
    font-size: 23px;
  }

  .settings-flow,
  .data-import-type-grid,
  .data-import-preview-kpis,
  .backup-overview-grid,
  .backup-policy-fields {
    grid-template-columns: 1fr;
  }

  .settings-flow article + article {
    border-top: 1px solid #e7edf5;
    border-left: 0;
  }

  .data-import-type-card {
    min-height: 0;
  }

  .data-import-upload-body {
    padding: 12px;
  }

  .data-import-dropzone {
    min-height: 170px;
    padding: 18px 12px;
  }

  .settings-section-head,
  .data-import-preview-head,
  .backup-policy-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .settings-section-head > div:last-child {
    text-align: left;
  }

  .backup-policy-fields {
    padding: 13px;
  }

  .backup-offsite-option {
    margin-right: 13px;
    margin-left: 13px;
  }

  .backup-policy-foot .btn,
  .backup-alert-list article .btn {
    width: 100%;
  }

  .backup-alert-list article {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .backup-alert-list article .btn {
    grid-column: 1 / -1;
  }

  .backup-restore-dialog {
    width: calc(100vw - 14px);
  }

  .backup-restore-dialog .reimbursement-dialog-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .backup-restore-dialog .reimbursement-dialog-foot .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-blue-page *,
  .backup-restore-dialog * {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Outgoing quality reports */
.shipment-report-page,
.shipment-report-form-page {
  --qr-deep: var(--zg-navy-900);
  --qr-green: var(--zg-blue-700, #2357d7);
  --qr-mint: var(--zg-blue-100);
  --qr-soft: var(--zg-blue-50);
  --qr-gold: var(--zg-cyan-500);
  --qr-line: var(--line);
  color: var(--ink);
  margin: 0 auto;
  width: 100%;
}

.shipment-report-page { max-width: none; }
.shipment-report-form-page { max-width: none; margin-inline: 0; }

.shipment-report-hero,
.shipment-report-form-hero {
  align-items: center;
  background:
    radial-gradient(circle at 88% 18%,rgba(25,189,216,.24),transparent 29%),
    linear-gradient(132deg,var(--zg-navy-950) 0%,var(--zg-navy-900) 56%,var(--zg-navy-800) 100%);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(6,20,43,.17);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  min-height: 164px;
  overflow: hidden;
  padding: 26px 31px;
  position: relative;
}

.shipment-report-hero > div:first-child,
.shipment-report-form-hero > div:first-child { max-width: 850px; position: relative; z-index: 1; }
.shipment-report-hero > div > span,
.shipment-report-form-hero > div:first-child > span {
  color: #86d9ef;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.shipment-report-hero h2,
.shipment-report-form-hero h2 { font-size: 29px; margin: 7px 0 8px; }
.shipment-report-hero p,
.shipment-report-form-hero p { color: rgba(255,255,255,.78); line-height: 1.75; margin: 0; }
.shipment-report-hero .btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--qr-green);
  min-height: 42px;
}

.shipment-report-filter {
  align-items: end;
  display: grid;
  gap: 11px;
  grid-template-columns: 1.35fr repeat(2,minmax(125px,.72fr)) minmax(180px,1.2fr) minmax(190px,1.3fr) minmax(130px,.75fr) minmax(190px,1.25fr) auto auto;
  margin-bottom: 14px;
  padding: 16px 17px;
}
.shipment-report-filter-copy strong,
.shipment-report-filter-copy span { display: block; }
.shipment-report-filter-copy span { color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 4px; }
.shipment-report-filter label > span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.shipment-report-filter input,
.shipment-report-filter select,
.shipment-report-filter .searchable-select-input {
  background-color: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  height: 38px;
  min-height: 38px;
  outline: 0;
  padding: 0 10px;
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.shipment-report-filter .searchable-select-input {
  padding-left: 10px !important;
  padding-right: 30px !important;
}
.shipment-report-filter input:focus,
.shipment-report-filter select:focus,
.shipment-report-filter .searchable-select-input:focus {
  border-color: var(--zg-blue-600);
  box-shadow: 0 0 0 3px rgba(47,108,255,.12);
}

.shipment-report-kpis {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5,minmax(0,1fr));
  margin-bottom: 14px;
}
.shipment-report-kpis article {
  background: #fff;
  border: 1px solid var(--qr-line);
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(18,59,104,.08);
  overflow: hidden;
  padding: 17px 18px;
  position: relative;
}
.shipment-report-kpis article::before {
  background: #7d9c95;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}
.shipment-report-kpis article.pending::before { background: #d7a144; }
.shipment-report-kpis article.signed::before { background: #1b8a70; }
.shipment-report-kpis article.attention::before { background: #d35b61; }
.shipment-report-kpis span,
.shipment-report-kpis small { color: var(--muted); display: block; }
.shipment-report-kpis span { font-size: 11px; font-weight: 700; }
.shipment-report-kpis strong { display: block; font-size: 25px; margin: 7px 0 3px; }
.shipment-report-kpis small { font-size: 11px; }

.shipment-report-register { overflow: hidden; }
.shipment-report-section-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 17px 18px 12px;
}
.shipment-report-section-head strong,
.shipment-report-section-head span { display: block; }
.shipment-report-section-head > div > span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.shipment-report-section-head > span {
  background: var(--qr-mint);
  border-radius: 18px;
  color: var(--qr-green);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 11px;
}
.shipment-report-table { min-width: 1540px; }
.shipment-report-table th { white-space: nowrap; }
.shipment-report-table td { vertical-align: middle; }
.shipment-report-module-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 230px;
}
.shipment-report-module-tags span,
.shipment-report-module-tags em {
  background: var(--qr-mint);
  border: 1px solid #ccdaf0;
  border-radius: 15px;
  color: var(--qr-green);
  font-size: 10px;
  font-style: normal;
  padding: 3px 7px;
  white-space: nowrap;
}
.shipment-report-module-tags em { background: #fff7ea; border-color: #ecd9b8; color: #9a6c2a; }
.shipment-report-status {
  border-radius: 16px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  white-space: nowrap;
}
.shipment-report-status.draft { background: #edf1f4; color: #65727d; }
.shipment-report-status.pending { background: #fff3d9; color: #9b6816; }
.shipment-report-status.returned { background: #fff0f0; color: #b9464e; }
.shipment-report-status.approved { background: #e8f1ff; color: #2962a8; }
.shipment-report-status.signed { background: #ddf3eb; color: #15715d; }

.shipment-report-form { width: 100%; max-width: none; margin-inline: 0; }
.shipment-report-form-hero > div:last-child {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  min-width: 275px;
  padding: 14px 16px;
}
.shipment-report-form-hero > div:last-child span,
.shipment-report-form-hero > div:last-child small { color: rgba(255,255,255,.67); display: block; font-size: 10px; }
.shipment-report-form-hero > div:last-child strong { display: block; font-size: 18px; margin: 5px 0; }
.shipment-report-form-section {
  border-color: var(--qr-line);
  margin-bottom: 14px;
}
.shipment-report-form-section .form-section-head > span {
  background: var(--qr-mint);
  border-radius: 18px;
  color: var(--qr-green);
  font-size: 11px;
  font-weight: 800;
  margin-left: auto;
  padding: 6px 10px;
}
.shipment-report-source-fields input,
.shipment-report-source-fields select,
.shipment-report-source-fields .searchable-select-input { min-height: 40px; }
.shipment-report-source-preview {
  background: var(--qr-soft);
  border: 1px solid var(--qr-line);
  border-radius: 12px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6,minmax(0,1fr));
  margin-top: 15px;
  overflow: hidden;
}
.shipment-report-source-preview > div {
  border-bottom: 1px solid var(--qr-line);
  border-right: 1px solid var(--qr-line);
  min-height: 66px;
  padding: 10px 12px;
}
.shipment-report-source-preview > div.wide { grid-column: span 2; }
.shipment-report-source-preview span { color: #71837f; display: block; font-size: 10px; margin-bottom: 5px; }
.shipment-report-source-preview strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.shipment-report-source-empty {
  align-items: center;
  color: #82938f;
  display: flex !important;
  gap: 12px;
  grid-column: 1/-1;
  min-height: 82px !important;
}
.shipment-report-source-empty strong,
.shipment-report-source-empty span { display: block; }
.shipment-report-source-empty span { margin: 3px 0 0; }

.shipment-report-profile-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4,minmax(0,1fr));
}
.shipment-report-profile-strip article {
  align-items: center;
  background: #f4f7f6;
  border: 1px solid #dfe8e5;
  border-radius: 11px;
  display: flex;
  gap: 10px;
  min-height: 66px;
  padding: 10px 12px;
}
.shipment-report-profile-strip article > span {
  align-items: center;
  background: #dfe7e5;
  border-radius: 50%;
  color: #7c8c89;
  display: flex;
  flex: 0 0 30px;
  height: 30px;
  justify-content: center;
}
.shipment-report-profile-strip article.active { background: var(--qr-mint); border-color: #c5d6f1; }
.shipment-report-profile-strip article.active > span { background: var(--qr-green); color: #fff; }
.shipment-report-profile-strip strong,
.shipment-report-profile-strip small { display: block; }
.shipment-report-profile-strip small { color: var(--muted); font-size: 10px; margin-top: 3px; }

.shipment-report-modules { display: grid; gap: 12px; margin-bottom: 14px; }
.shipment-report-module-card {
  background: #fff;
  border: 1px solid var(--qr-line);
  border-radius: 13px;
  box-shadow: 0 6px 20px rgba(18,59,104,.06);
  overflow: hidden;
}
.shipment-report-module-card > header {
  align-items: center;
  display: grid;
  gap: 13px;
  grid-template-columns: 34px minmax(0,1fr) auto;
  min-height: 83px;
  padding: 14px 17px;
}
.shipment-report-module-card.is-enabled > header { background: linear-gradient(90deg,var(--zg-blue-50),#fff); }
.shipment-report-module-card.is-locked > header { background: #f5f6f6; color: #75817f; }
.shipment-report-module-order {
  align-items: center;
  background: var(--qr-mint);
  border-radius: 9px;
  color: var(--qr-green);
  display: flex;
  font-size: 12px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
}
.shipment-report-module-card.is-locked .shipment-report-module-order { background: #e8ebea; color: #82908d; }
.shipment-report-module-title > span {
  color: var(--qr-gold);
  display: block;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.shipment-report-module-title strong { display: block; font-size: 14px; }
.shipment-report-module-title small { color: var(--muted); display: block; font-size: 10px; line-height: 1.5; margin-top: 3px; }
.shipment-report-module-switch {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 8px;
}
.shipment-report-module-switch input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.shipment-report-module-switch span {
  background: #c8d1cf;
  border-radius: 20px;
  height: 22px;
  position: relative;
  transition: .18s ease;
  width: 40px;
}
.shipment-report-module-switch span::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  content: "";
  height: 16px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: .18s ease;
  width: 16px;
}
.shipment-report-module-switch input:checked + span { background: var(--qr-green); }
.shipment-report-module-switch input:checked + span::after { transform: translateX(18px); }
.shipment-report-module-switch input:disabled + span { opacity: .6; }
.shipment-report-module-switch em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700; min-width: 36px; }
.shipment-report-module-lock-note {
  background: #f0f2f2;
  border-top: 1px solid #e4e9e8;
  color: #788582;
  font-size: 10px;
  padding: 7px 17px;
}
.shipment-report-module-lock-note.available { background: var(--zg-blue-50); color: var(--zg-navy-800); }
.shipment-report-module-body {
  border-top: 1px solid var(--qr-line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0,1.6fr) minmax(290px,.7fr);
  padding: 16px 17px 18px;
}
.shipment-report-module-body[hidden] { display: none; }
.shipment-report-module-workspace {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.shipment-report-template {
  background: #fff;
  border: 1px solid #cbd9ec;
  border-radius: 11px;
  min-width: 0;
  overflow: hidden;
}
.shipment-report-template > header {
  align-items: center;
  background: linear-gradient(100deg,#edf4ff,#f8fbff);
  border-bottom: 1px solid #d5e0ef;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 64px;
  padding: 11px 13px;
}
.shipment-report-template > header > div { min-width: 0; }
.shipment-report-template > header span,
.shipment-report-template > header strong,
.shipment-report-template > header small { display: block; }
.shipment-report-template > header span {
  color: var(--zg-blue-700);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
}
.shipment-report-template > header strong {
  color: var(--zg-navy-900);
  font-size: 14px;
  margin-top: 2px;
}
.shipment-report-template > header small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.shipment-report-template > header em {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd9ec;
  border-radius: 18px;
  color: var(--zg-blue-700);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  gap: 5px;
  padding: 5px 8px;
}
.shipment-report-template-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 13px;
}
.shipment-report-template-fields label.wide { grid-column: 1/-1; }
.shipment-report-template-fields label > span {
  color: #61748b;
  display: block;
  font-size: 10px;
  font-weight: 750;
  margin-bottom: 5px;
}
.shipment-report-template-fields input,
.shipment-report-template-fields select,
.shipment-report-template-fields textarea,
.shipment-report-template-table input,
.shipment-report-template-table select,
.shipment-report-template-table textarea {
  background: #fff;
  border: 1px solid #cfdbea;
  border-radius: 6px;
  color: var(--ink);
  font-size: 11px;
  min-height: 36px;
  outline: 0;
  padding: 7px 8px;
  width: 100%;
}
.shipment-report-template-fields textarea {
  line-height: 1.6;
  min-height: 70px;
  resize: vertical;
}
.shipment-report-template-fields input:focus,
.shipment-report-template-fields select:focus,
.shipment-report-template-fields textarea:focus,
.shipment-report-template-table input:focus,
.shipment-report-template-table select:focus {
  border-color: var(--zg-blue-600);
  box-shadow: 0 0 0 3px rgba(47,108,255,.1);
}
.shipment-report-template-table {
  border-top: 1px solid #dbe4f0;
  min-width: 0;
}
.shipment-report-template-table-head {
  align-items: center;
  background: #f9fbfe;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}
.shipment-report-template-table-head strong,
.shipment-report-template-table-head span { display: block; }
.shipment-report-template-table-head strong {
  color: #294a6d;
  font-size: 12px;
}
.shipment-report-template-table-head span {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}
.shipment-report-template-table table {
  min-width: 760px;
  table-layout: auto;
}
.shipment-report-template-table th {
  background: #edf3fb;
  color: #4f657d;
  font-size: 9px;
  height: 34px;
  padding: 5px 7px;
  white-space: nowrap;
}
.shipment-report-template-table td {
  background: #fff;
  font-size: 10px;
  padding: 5px;
  vertical-align: top;
}
.shipment-report-template-table th.sequence,
.shipment-report-template-table td.sequence {
  min-width: 42px;
  text-align: center;
  width: 42px;
}
.shipment-report-template-table th.action,
.shipment-report-template-table td.action {
  min-width: 48px;
  text-align: center;
  width: 48px;
}
.shipment-report-template-table td.action .row-action {
  height: 30px;
  justify-content: center;
  padding: 0;
  width: 30px;
}
.shipment-template-empty {
  color: #8797aa;
  padding: 16px !important;
  text-align: center;
}
.shipment-template-file-cell {
  min-width: 190px;
}
.shipment-template-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}
.shipment-template-file-list > span {
  align-items: center;
  background: #edf4ff;
  border: 1px solid #cbd9ec;
  border-radius: 5px;
  display: flex;
  max-width: 180px;
}
.shipment-template-file-list > span.pending {
  background: #fff8e9;
  border-color: #ead8ae;
  color: #8a651f;
  font-size: 9px;
  padding-left: 5px;
}
.shipment-template-file-list a {
  align-items: center;
  color: var(--zg-blue-700);
  display: flex;
  font-size: 9px;
  gap: 4px;
  max-width: 145px;
  overflow: hidden;
  padding: 4px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-template-file-list button {
  background: transparent;
  border: 0;
  color: #b84b54;
  cursor: pointer;
  padding: 3px 5px;
}
.shipment-template-file-picker {
  align-items: center;
  background: #f9fbfe;
  border: 1px dashed #a9bdd9;
  border-radius: 5px;
  color: var(--zg-blue-700);
  cursor: pointer;
  display: inline-flex;
  font-size: 9px;
  font-weight: 800;
  min-height: 29px;
  padding: 4px 7px;
}
.shipment-template-file-picker input { display: none; }
.shipment-report-module-fields {
  background: #f8fafc;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3,minmax(0,1fr));
  padding: 12px;
}
.shipment-report-module-fields label.wide { grid-column: 1/-1; }
.shipment-report-module-fields label > span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 6px;
}
.shipment-report-module-fields input,
.shipment-report-module-fields select { min-height: 39px; width: 100%; }
.shipment-report-module-fields textarea { min-height: 74px; resize: vertical; width: 100%; }
.shipment-report-module-evidence {
  background: var(--qr-soft);
  border: 1px solid var(--qr-line);
  border-radius: 10px;
  padding: 13px;
}
.shipment-report-module-evidence > div:first-child strong,
.shipment-report-module-evidence > div:first-child span { display: block; }
.shipment-report-module-evidence > div:first-child span { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 3px; }
.shipment-report-existing-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; min-height: 26px; }
.shipment-report-existing-files > span {
  align-items: center;
  background: #fff;
  border: 1px solid #cfdbec;
  border-radius: 7px;
  display: flex;
  max-width: 100%;
}
.shipment-report-existing-files a {
  align-items: center;
  color: var(--qr-green);
  display: flex;
  font-size: 10px;
  gap: 4px;
  max-width: 230px;
  overflow: hidden;
  padding: 6px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shipment-report-existing-files button { background: none; border: 0; color: #b94e55; cursor: pointer; padding: 5px 7px; }
.shipment-report-existing-files em { color: #879590; font-size: 10px; font-style: normal; }
.shipment-report-file-picker {
  align-items: center;
  background: #fff;
  border: 1px dashed #a8bfdf;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 42px;
  overflow: hidden;
  padding: 7px 9px;
}
.shipment-report-file-picker input { display: none; }
.shipment-report-file-picker span { align-items: center; color: var(--qr-green); display: flex; flex: 0 0 auto; font-size: 11px; font-weight: 800; gap: 4px; }
.shipment-report-file-picker em { color: var(--muted); font-size: 10px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shipment-report-form-actions { border-color: var(--qr-line); }

.shipment-report-detail-drawer { width: min(1060px,94vw); }
.shipment-report-detail-hero {
  align-items: center;
  background: linear-gradient(132deg,var(--zg-navy-950),var(--zg-navy-800));
  border-radius: 13px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 20px 22px;
}
.shipment-report-detail-hero > div:first-child > span { color: #86d9ef; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.shipment-report-detail-hero h3 { font-size: 22px; margin: 5px 0; }
.shipment-report-detail-hero p { color: rgba(255,255,255,.72); margin: 0; }
.shipment-report-detail-hero > div:last-child { align-items: flex-end; display: flex; flex-direction: column; }
.shipment-report-detail-hero > div:last-child strong { font-size: 23px; margin-top: 8px; }
.shipment-report-detail-hero > div:last-child > span:last-child { color: rgba(255,255,255,.68); font-size: 9px; }
.shipment-report-detail-drawer .shipment-report-profile-strip { margin-top: 14px; }
.shipment-report-detail-modules { display: grid; gap: 10px; }
.shipment-report-detail-modules > article { border: 1px solid var(--qr-line); border-radius: 11px; overflow: hidden; }
.shipment-report-detail-modules > article > header {
  align-items: center;
  background: var(--qr-soft);
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
}
.shipment-report-detail-modules header div span { color: var(--qr-gold); display: block; font-size: 9px; font-weight: 800; }
.shipment-report-detail-modules header div strong { display: block; margin-top: 2px; }
.shipment-report-detail-modules header em { background: #edf1f0; border-radius: 15px; font-size: 10px; font-style: normal; padding: 4px 8px; }
.shipment-report-detail-modules header em.pass { background: #ddf3eb; color: #15715d; }
.shipment-report-detail-modules header em.fail { background: #fff0f0; color: #b9464e; }
.shipment-report-module-detail-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.shipment-report-module-detail-grid .detail-item { border-bottom: 1px solid #e7efed; border-right: 1px solid #e7efed; border-radius: 0; }
.shipment-report-detail-modules > article > footer { padding: 9px 12px; }
.shipment-report-detail-template {
  border-bottom: 1px solid #dfe8f1;
  padding: 11px 12px;
}
.shipment-report-detail-template > header {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-bottom: 9px;
}
.shipment-report-detail-template > header span {
  background: var(--zg-blue-100);
  border-radius: 14px;
  color: var(--zg-blue-700);
  font-size: 9px;
  font-weight: 800;
  padding: 4px 7px;
}
.shipment-report-detail-template > header strong {
  color: var(--zg-navy-900);
  font-size: 12px;
}
.shipment-report-detail-template-table { margin-top: 10px; }
.shipment-report-detail-template-table h4 {
  color: #3d5875;
  font-size: 11px;
  margin: 0 0 6px;
}
.shipment-report-detail-template-table table { min-width: 680px; }
.shipment-report-detail-template-table th,
.shipment-report-detail-template-table td {
  font-size: 10px;
  padding: 6px 7px;
}
.shipment-report-detail-template-table a { color: var(--zg-blue-700); }
.shipment-report-attachment-links { display: flex; flex-wrap: wrap; gap: 6px; }
.shipment-report-attachment-links a {
  align-items: center;
  background: var(--qr-mint);
  border-radius: 7px;
  color: var(--qr-green);
  display: flex;
  font-size: 10px;
  gap: 4px;
  padding: 5px 8px;
}

.product-report-profile .product-report-profile-badge {
  align-items: center;
  background: var(--zg-blue-100);
  border-radius: 18px;
  color: var(--zg-blue-700);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  gap: 5px;
  margin-left: auto;
  padding: 6px 10px;
}
.product-report-profile-fields .field.is-disabled { opacity: .55; }
.product-report-rule-preview {
  align-items: center;
  background: var(--zg-blue-50);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  margin-top: 14px;
  padding: 11px 13px;
}
.product-report-rule-preview > span { display: flex; flex-wrap: wrap; gap: 5px; }
.product-report-rule-preview em {
  background: var(--zg-blue-100);
  border-radius: 14px;
  color: var(--zg-blue-700);
  font-size: 10px;
  font-style: normal;
  padding: 4px 8px;
}
.product-report-rule-preview small { color: var(--muted); font-size: 10px; grid-column: 1/-1; }

@media (max-width: 1360px) {
  .shipment-report-filter { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .shipment-report-filter-copy { grid-column: 1/-1; }
  .shipment-report-keyword { grid-column: span 2; }
  .shipment-report-source-preview { grid-template-columns: repeat(4,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .shipment-report-hero,
  .shipment-report-form-hero { align-items: flex-start; flex-direction: column; gap: 18px; padding: 22px; }
  .shipment-report-form-hero > div:last-child { min-width: 0; width: 100%; }
  .shipment-report-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shipment-report-filter { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shipment-report-keyword { grid-column: 1/-1; }
  .shipment-report-source-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shipment-report-profile-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shipment-report-module-body { grid-template-columns: 1fr; }
  .shipment-report-template-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .shipment-report-kpis,
  .shipment-report-filter,
  .shipment-report-profile-strip,
  .shipment-report-module-fields,
  .shipment-report-template-fields { grid-template-columns: 1fr; }
  .shipment-report-source-preview { grid-template-columns: 1fr; }
  .shipment-report-source-preview > div.wide { grid-column: auto; }
  .shipment-report-module-card > header { grid-template-columns: 32px minmax(0,1fr); }
  .shipment-report-module-switch { grid-column: 1/-1; justify-content: flex-end; }
  .shipment-report-module-detail-grid { grid-template-columns: 1fr; }
  .shipment-report-form-actions { align-items: stretch; flex-direction: column; }
  .shipment-report-form-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Unified compact filters: business, quality, tax and analysis workspaces */
.compact-filter-bar,
.compact-filter-bar *,
.compact-entity-filter-toolbar,
.compact-entity-filter-toolbar * {
  box-sizing: border-box;
}

.compact-filter-bar {
  align-items: end;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  width: 100%;
}

.compact-filter-bar > *,
.compact-filter-bar > label,
.compact-filter-bar .searchable-select,
.compact-filter-bar .searchable-select-input,
.compact-filter-bar .compact-date-range-fields,
.compact-filter-bar .tax-date-range {
  max-width: 100%;
  min-width: 0;
}

.compact-filter-bar input,
.compact-filter-bar select,
.compact-filter-bar .searchable-select-input {
  margin: 0;
  min-inline-size: 0;
  width: 100%;
}

.compact-filter-bar input[type="date"] {
  font-variant-numeric: tabular-nums;
  padding-left: 7px;
  padding-right: 5px;
}

.compact-date-range-fields {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: 100%;
}

.compact-date-range-fields > em {
  color: #7b8d88;
  font-size: 9px;
  font-style: normal;
  text-align: center;
}

.compact-filter-bar .compact-status-filter {
  min-width: 0;
}

.compact-filter-bar .compact-query-button,
.compact-filter-bar > .btn {
  align-self: end;
  justify-content: center;
  white-space: nowrap;
}

.compact-entity-filter-toolbar {
  gap: 14px;
  min-width: 0;
}

.compact-entity-filter-toolbar .toolbar-actions {
  flex: 0 1 470px;
  min-width: 0;
}

.compact-entity-filter-toolbar .search-box {
  flex: 1 1 280px;
  max-width: 380px;
  min-width: 180px;
}

@media (min-width: 1281px) {
  .business-list-page .business-filter-bar.compact-filter-bar {
    gap: 8px;
    grid-template-columns:
      minmax(224px, 1.18fr)
      minmax(112px, .58fr)
      minmax(145px, .8fr)
      minmax(165px, .95fr)
      minmax(145px, .82fr)
      max-content;
    padding: 12px 14px;
  }

  .business-list-page .business-filter-bar.compact-filter-bar .business-date-range,
  .business-list-page .business-filter-bar.compact-filter-bar .business-keyword,
  .business-list-page .business-filter-bar.compact-filter-bar .business-date-filter {
    grid-column: auto;
    min-width: 0;
  }

  .business-list-page .business-filter-bar.compact-filter-bar > label {
    grid-template-rows: auto 36px;
  }

  .business-list-page .business-filter-bar.compact-filter-bar input,
  .business-list-page .business-filter-bar.compact-filter-bar select,
  .business-list-page .business-filter-bar.compact-filter-bar .searchable-select-input,
  .business-list-page .business-filter-bar.compact-filter-bar .business-query-button {
    height: 36px;
  }

  .business-list-page .purchase-return-filter-bar.compact-filter-bar {
    grid-template-columns:
      minmax(224px, .95fr)
      minmax(180px, .8fr)
      minmax(220px, 1.15fr)
      max-content;
  }

  .sales-purchase-filter.compact-filter-bar {
    gap: 8px;
    grid-template-columns:
      minmax(165px, .95fr)
      minmax(185px, 1.05fr)
      minmax(112px, .58fr)
      minmax(108px, .56fr)
      minmax(170px, .92fr)
      max-content;
    padding: 12px 14px;
  }

  .sales-purchase-filter.compact-filter-bar .business-keyword {
    grid-column: auto;
    min-width: 0;
  }

  .eq-filter.compact-filter-bar {
    gap: 8px;
    grid-template-columns:
      minmax(108px, .56fr)
      112px 112px
      minmax(150px, .86fr)
      112px
      minmax(150px, .9fr)
      max-content max-content;
    padding: 12px 14px;
  }

  .report8d-filter.compact-filter-bar,
  .shipment-report-filter.compact-filter-bar {
    gap: 8px;
    grid-template-columns:
      minmax(108px, .56fr)
      112px 112px
      minmax(145px, .78fr)
      minmax(160px, .9fr)
      112px
      minmax(145px, .82fr)
      max-content max-content;
    padding: 12px 14px;
  }

  .inspection-filter.compact-filter-bar {
    gap: 8px;
    grid-template-columns:
      112px 112px
      minmax(150px, .82fr)
      minmax(165px, .92fr)
      112px
      minmax(150px, .86fr)
      max-content max-content;
    padding: 12px 14px;
  }

  .eq-filter.compact-filter-bar > div:first-child,
  .report8d-filter.compact-filter-bar > div:first-child,
  .shipment-report-filter.compact-filter-bar > div:first-child {
    min-width: 0;
    overflow: hidden;
  }

  .eq-filter.compact-filter-bar > div:first-child span,
  .report8d-filter.compact-filter-bar > div:first-child span,
  .shipment-report-filter.compact-filter-bar > div:first-child span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .eq-filter.compact-filter-bar input,
  .eq-filter.compact-filter-bar select,
  .eq-filter.compact-filter-bar .searchable-select-input,
  .report8d-filter.compact-filter-bar input,
  .report8d-filter.compact-filter-bar select,
  .report8d-filter.compact-filter-bar .searchable-select-input,
  .shipment-report-filter.compact-filter-bar input,
  .shipment-report-filter.compact-filter-bar select,
  .shipment-report-filter.compact-filter-bar .searchable-select-input,
  .inspection-filter.compact-filter-bar input,
  .inspection-filter.compact-filter-bar select,
  .inspection-filter.compact-filter-bar .searchable-select-input,
  .eq-filter.compact-filter-bar .btn,
  .report8d-filter.compact-filter-bar .btn,
  .shipment-report-filter.compact-filter-bar .btn,
  .inspection-filter.compact-filter-bar .btn {
    height: 36px;
    min-height: 36px;
  }

  .tax-filter-bar.compact-filter-bar {
    gap: 8px;
    grid-template-columns:
      minmax(226px, 1.15fr)
      minmax(145px, .78fr)
      112px
      minmax(160px, .9fr)
      max-content;
    padding: 12px 14px;
  }

  .tax-filter-bar.tax-invoice-filter-purchase.compact-filter-bar {
    grid-template-columns:
      minmax(226px, 1.15fr)
      minmax(145px, .76fr)
      108px 108px
      minmax(150px, .82fr)
      max-content;
  }

  .tax-filter-bar.compact-filter-bar input,
  .tax-filter-bar.compact-filter-bar select,
  .tax-filter-bar.compact-filter-bar .searchable-select-input,
  .tax-filter-bar.compact-filter-bar .btn {
    height: 36px;
  }

  .analysis-filter.compact-filter-bar {
    gap: 8px;
    padding: 12px 14px;
  }

  .analysis-filter-order_profit_analysis.compact-filter-bar {
    grid-template-columns:
      112px 112px
      minmax(145px, .82fr)
      minmax(132px, .74fr)
      108px 112px
      minmax(140px, .8fr)
      max-content;
  }

  .analysis-filter-customer_credit_dashboard.compact-filter-bar {
    grid-template-columns:
      minmax(175px, 1fr)
      minmax(150px, .85fr)
      112px
      minmax(180px, 1.05fr)
      max-content;
  }

  .analysis-filter-supplier_price_analysis.compact-filter-bar {
    grid-template-columns:
      112px 112px
      minmax(155px, .85fr)
      minmax(175px, 1fr)
      112px
      minmax(155px, .9fr)
      max-content;
  }

  .analysis-filter.compact-filter-bar input,
  .analysis-filter.compact-filter-bar select,
  .analysis-filter.compact-filter-bar .searchable-select-input,
  .analysis-filter.compact-filter-bar .analysis-filter-actions .btn {
    height: 36px;
    min-height: 36px;
  }

  .analysis-filter.compact-filter-bar label {
    gap: 5px;
  }
}

@media (min-width: 901px) and (max-width: 1280px) {
  .compact-filter-bar,
  .business-list-page .business-filter-bar.compact-filter-bar,
  .sales-purchase-filter.compact-filter-bar,
  .eq-filter.compact-filter-bar,
  .report8d-filter.compact-filter-bar,
  .shipment-report-filter.compact-filter-bar,
  .inspection-filter.compact-filter-bar,
  .tax-filter-bar.compact-filter-bar,
  .analysis-filter.compact-filter-bar {
    gap: 9px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .eq-filter.compact-filter-bar > div:first-child,
  .report8d-filter.compact-filter-bar > div:first-child,
  .shipment-report-filter.compact-filter-bar > div:first-child {
    grid-column: 1 / -1;
  }

  .compact-filter-bar .compact-keyword-filter {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .compact-filter-bar,
  .business-list-page .business-filter-bar.compact-filter-bar,
  .sales-purchase-filter.compact-filter-bar,
  .eq-filter.compact-filter-bar,
  .report8d-filter.compact-filter-bar,
  .shipment-report-filter.compact-filter-bar,
  .inspection-filter.compact-filter-bar,
  .tax-filter-bar.compact-filter-bar,
  .analysis-filter.compact-filter-bar {
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .eq-filter.compact-filter-bar > div:first-child,
  .report8d-filter.compact-filter-bar > div:first-child,
  .shipment-report-filter.compact-filter-bar > div:first-child,
  .compact-filter-bar .compact-date-range,
  .compact-filter-bar .compact-keyword-filter {
    grid-column: 1 / -1;
  }

  .compact-filter-bar > .btn,
  .compact-filter-bar .compact-query-button,
  .compact-filter-bar .analysis-filter-actions {
    width: 100%;
  }

  .compact-entity-filter-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-entity-filter-toolbar .toolbar-actions,
  .compact-entity-filter-toolbar .search-box {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 620px) {
  .compact-filter-bar,
  .business-list-page .business-filter-bar.compact-filter-bar,
  .sales-purchase-filter.compact-filter-bar,
  .eq-filter.compact-filter-bar,
  .report8d-filter.compact-filter-bar,
  .shipment-report-filter.compact-filter-bar,
  .inspection-filter.compact-filter-bar,
  .tax-filter-bar.compact-filter-bar,
  .analysis-filter.compact-filter-bar {
    grid-template-columns: minmax(0, 1fr);
    padding: 11px;
  }

  .eq-filter.compact-filter-bar > div:first-child,
  .report8d-filter.compact-filter-bar > div:first-child,
  .shipment-report-filter.compact-filter-bar > div:first-child,
  .compact-filter-bar .compact-date-range,
  .compact-filter-bar .compact-keyword-filter {
    grid-column: auto;
  }

  .compact-filter-bar .analysis-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-width: 0;
  }

  .compact-filter-bar .analysis-filter-actions .btn {
    min-width: 0;
    width: 100%;
  }
}

/* Final WYSIWYG geometry overrides. Keep these after the legacy designer skin:
   editing affordances must never change the model box used by print/PDF. */
.print-center-page .print-workspace-head.print-designer-toolbar {
  align-items: center;
  display: grid;
  gap: 8px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
}

.print-center-page .print-workspace-head.print-designer-toolbar > div:first-child {
  grid-column: 1;
  min-width: 0;
}

.print-center-page .print-workspace-head.print-designer-toolbar > .print-zoom-toolbar {
  grid-column: 2;
  grid-row: 1;
  max-width: 100%;
}

.print-center-page .print-workspace-head.print-designer-toolbar > .print-alignment-toolbar {
  grid-column: 1 / -1;
  grid-row: 2;
  max-width: none;
  min-width: 0;
  width: 100%;
}

/* The page badge already explains the canvas position. The old floating hint
   occupied the same top-left line and visually overlapped the badge. */
.print-center-page .print-canvas-stage::before {
  content: none;
  display: none;
}

.print-center-page .print-paper-slot > .print-paper.is-designer {
  height: var(--print-paper-height);
  margin-inline: 0;
  min-height: 0;
  min-width: 0;
  transform: scale(var(--print-canvas-zoom, 1));
  transform-origin: left top;
}

@media (max-width: 650px) {
  .print-center-page .print-workspace-head.print-designer-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .print-center-page .print-workspace-head.print-designer-toolbar > div:first-child,
  .print-center-page .print-workspace-head.print-designer-toolbar > .print-zoom-toolbar,
  .print-center-page .print-workspace-head.print-designer-toolbar > .print-alignment-toolbar {
    grid-column: 1;
  }

  .print-center-page .print-workspace-head.print-designer-toolbar > .print-zoom-toolbar {
    grid-row: 2;
    overflow-x: auto;
    width: 100%;
  }

  .print-center-page .print-workspace-head.print-designer-toolbar > .print-alignment-toolbar {
    grid-row: 3;
  }
}

.print-center-page .print-paper.is-designer .print-free-element,
.print-center-page .print-paper.is-designer .print-free-control,
.print-center-page .print-paper.is-designer [data-print-free-element] {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  box-sizing: border-box;
  font-weight: var(--print-control-font-weight, normal);
  min-height: 0;
  min-width: 0;
  outline: 1px solid transparent;
}

.print-center-page .print-paper.is-designer .print-free-element:hover,
.print-center-page .print-paper.is-designer .print-free-control:hover,
.print-center-page .print-paper.is-designer [data-print-free-element]:hover {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline-color: #8fb2f7;
}

.print-center-page .print-paper.is-designer .print-free-element.selected,
.print-center-page .print-paper.is-designer .print-free-element.is-selected,
.print-center-page .print-paper.is-designer .print-free-element[aria-selected="true"],
.print-center-page .print-paper.is-designer .print-free-control.selected,
.print-center-page .print-paper.is-designer .print-free-control.is-selected,
.print-center-page .print-paper.is-designer [data-print-free-element].selected,
.print-center-page .print-paper.is-designer [data-print-free-element].is-selected,
.print-center-page .print-paper.is-designer [data-print-free-element][aria-selected="true"] {
  background: transparent;
  border: 0;
  box-shadow: none;
  outline: 1px dashed var(--zg-blue-600, #2f6cff);
  outline-offset: 0;
}

.print-center-page .print-paper.is-designer .print-free-element.print-free-image,
.print-center-page .print-paper.is-designer .print-free-image {
  background: transparent;
  min-height: 0;
}

.print-center-page .print-paper.is-designer .print-free-image-frame {
  cursor: move;
  min-height: 0;
}

.print-center-page .print-paper.is-designer .print-free-element.print-free-text,
.print-center-page .print-paper.is-designer .print-free-element.print-free-title {
  padding: 0;
}

.print-center-page .print-paper.is-designer [data-control-type="text"] > textarea {
  box-sizing: border-box;
  font-weight: inherit;
  height: 100%;
  line-height: 1.45;
  min-height: 0;
  padding: 5px 7px;
}

.print-center-page .print-paper.is-designer [data-control-type="title"] > textarea {
  box-sizing: border-box;
  font-weight: inherit;
  height: 100%;
  line-height: 1.25;
  min-height: 0;
  padding: 5px 7px;
}

/* Final dynamic-detail geometry. Keep this after the legacy document-table
   skin so fixed row heights and the inset perimeter cannot be overridden. */
.print-center-page .print-paper.is-designer .print-free-table .print-document-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.print-center-page .print-paper.is-designer .print-free-table .print-document-table th,
.print-center-page .print-paper.is-designer .print-free-table .print-document-table td {
  border: 0;
  border-bottom: 1px solid #aebed0;
  border-right: 1px solid #aebed0;
  min-width: 0;
}

.print-center-page .print-paper.is-designer .print-free-table .print-document-table thead th {
  border-top: 1px solid #aebed0;
  height: calc(var(--print-table-header-height, 30px) - 2px) !important;
  max-height: calc(var(--print-table-header-height, 30px) - 2px);
  padding: 5px 6px;
}

.print-center-page .print-paper.is-designer .print-free-table .print-document-table tr > :first-child {
  border-left: 1px solid #aebed0;
}

.print-center-page .print-paper.is-designer .print-free-table .print-document-table td {
  padding: 0;
}

.print-center-page .print-paper.is-designer .print-free-table .print-table-cell-clip {
  height: calc(var(--print-table-current-row-height, var(--print-table-row-height, 28px)) - 1px);
  max-height: calc(var(--print-table-current-row-height, var(--print-table-row-height, 28px)) - 1px);
}

.print-center-page .print-paper.is-designer .print-free-table .print-table-cell-clip.is-wrap {
  max-height: none;
}

/* ERP compact title hierarchy
 * Keep the working data area close to the workspace tabs. This contract is
 * intentionally limited to ERP page chrome: login, the dashboard welcome
 * banner, print-design canvases, document output and drawer/detail headers are
 * excluded so their visual and print dimensions remain unchanged.
 */
#content {
  --compact-page-hero-min-height: 96px;
  --compact-page-hero-padding-y: 15px;
  --compact-page-hero-padding-x: 20px;
  --compact-section-head-height: 50px;
}

#content :where(
  [class$="-hero"],
  [class*="-hero "],
  .form-page-intro
):not(
  .dashboard-hero,
  .print-template-hero,
  .approval-detail-hero,
  .consistency-detail-hero,
  .engineering-detail-hero,
  .inspection-detail-hero,
  .shipment-report-detail-hero,
  .system-user-detail-hero
) {
  gap: 18px !important;
  min-height: var(--compact-page-hero-min-height) !important;
  padding: var(--compact-page-hero-padding-y) var(--compact-page-hero-padding-x) !important;
}

#content :where(
  [class$="-hero"],
  [class*="-hero "],
  .form-page-intro
):not(
  .dashboard-hero,
  .print-template-hero,
  .approval-detail-hero,
  .consistency-detail-hero,
  .engineering-detail-hero,
  .inspection-detail-hero,
  .shipment-report-detail-hero,
  .system-user-detail-hero
) :where(h1, h2) {
  font-size: clamp(20px, 1.45vw, 24px) !important;
  line-height: 1.2 !important;
  margin-block: 4px !important;
}

#content :where(
  [class$="-hero"],
  [class*="-hero "],
  .form-page-intro
):not(
  .dashboard-hero,
  .print-template-hero,
  .approval-detail-hero,
  .consistency-detail-hero,
  .engineering-detail-hero,
  .inspection-detail-hero,
  .shipment-report-detail-hero,
  .system-user-detail-hero
) p {
  line-height: 1.55 !important;
}

#content :where(
  [class$="-hero"],
  [class*="-hero "],
  .form-page-intro
):not(
  .dashboard-hero,
  .print-template-hero,
  .approval-detail-hero,
  .consistency-detail-hero,
  .engineering-detail-hero,
  .inspection-detail-hero,
  .shipment-report-detail-hero,
  .system-user-detail-hero
) > :where(button, .btn) {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Dense hero-side context. These remain readable but no longer force a
 * 140-180px page title merely to show one count, rule or action. */
#content :where(
  .account-password-identity,
  .analysis-stamp,
  .code-settings-lock,
  .customer-receipt-rule,
  .eq-hero-rule,
  .inventory-cost-hero-value,
  .realtime-funds-total,
  .reconciliation-hero-note,
  .settings-hero-badge,
  .system-users-hero-rule,
  .shipment-report-form-hero > div:last-child
) {
  min-height: 0 !important;
  padding: 9px 12px !important;
}

#content :where(.permission-hero-seal, .operation-hero-lock) {
  min-height: 64px !important;
  padding: 10px 12px !important;
}

#content .approval-hero-rule {
  min-width: 150px;
  padding: 8px 13px;
}

#content .approval-hero-rule strong {
  font-size: 26px;
}

#content .approval-hero-rule :where(span, small) {
  margin-top: 3px;
}

#content .today-plan-date-card {
  flex-basis: 136px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 70px;
  padding: 8px 10px;
  width: 136px;
}

#content .today-plan-date-card small {
  grid-column: 1 / -1;
  justify-self: end;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#content .today-plan-date-card strong {
  font-size: 30px;
}

#content .today-plan-hero-note,
#content .delivery-evaluation-period,
#content .consistency-hero-meta {
  margin-top: 7px;
}

#content .delivery-rate-orbit {
  flex-basis: 92px;
  height: 92px;
  padding: 5px;
  width: 92px;
}

#content .delivery-rate-orbit strong {
  font-size: 18px;
}

#content .delivery-rate-orbit small {
  display: block;
  font-size: 6.5px;
  margin-top: 2px;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#content .consistency-score-ring {
  height: 58px;
  width: 58px;
}

#content :where(.consistency-score-ring, .consistency-score-ring strong) {
  font-size: 17px;
}

#content .substrate-hero-kpis {
  flex-basis: 300px;
  gap: 7px;
}

#content .substrate-hero-kpis article {
  border-radius: 9px;
  padding: 8px 11px;
}

#content .substrate-hero-kpis strong {
  font-size: 20px;
  margin: 2px 0 1px;
}

#content :where(.product-list-hero-side, .inventory-hero-side) {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
  padding: 8px 10px;
}

#content :where(.product-list-hero-side, .inventory-hero-side) > :where(span, small) {
  white-space: nowrap;
}

#content :where(.product-list-hero-side, .inventory-hero-side) > strong {
  font-size: 20px;
}

#content :where(.product-list-hero-side, .inventory-hero-side) .btn {
  margin-top: 0;
  white-space: nowrap;
  width: auto;
}

#content :where(.engineering-hero-flow, .complaint-hero-flow, .report8d-hero-cycle) {
  padding: 8px 11px;
}

#content .complaint-hero-flow > div {
  margin: 6px 0 5px;
}

#content .report8d-hero-cycle {
  gap: 5px;
  width: 315px;
  flex-basis: 315px;
}

#content .report8d-hero-cycle > div span {
  height: 22px;
}

#content .website-inquiry-source-summary > div {
  padding: 9px 13px;
}

#content .website-inquiry-source-summary strong {
  font-size: 21px;
}

#content .website-inquiry-source-summary span {
  margin-top: 2px;
}

#content .today-business-basis {
  margin-top: 6px;
  padding-block: 4px;
}

#content .today-business-date {
  flex-basis: 112px;
  min-width: 112px;
  padding-inline: 11px;
}

#content .today-business-date strong {
  font-size: 25px;
}

#content .today-business-cash-pulse {
  gap: 3px;
}

#content .today-business-cash-pulse > div {
  min-height: 25px;
  padding-block: 3px;
}

#content :where(
  .backup-hero-actions,
  .bom-hero-actions,
  .business-list-hero-side,
  .consistency-hero-actions,
  .income-hero-actions
) {
  flex-wrap: nowrap;
}

#content :where(
  .backup-hero-actions,
  .bom-hero-actions,
  .business-list-hero-side,
  .consistency-hero-actions,
  .income-hero-actions
) :where(button, .btn) {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Page toolbars and section headings use one compact vertical rhythm. */
#content .page-toolbar {
  gap: 10px;
  margin-bottom: 10px;
  min-height: 46px;
}

#content .page-toolbar > :last-child {
  flex: 0 0 auto;
}

#content .page-toolbar :where(button, .btn) {
  white-space: nowrap;
}

#content .toolbar-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

#content :where(
  .panel-head,
  .form-section-head,
  .analysis-section-title,
  .bom-detail-section-head,
  .bom-section-head,
  .business-list-result-head,
  .complaint-section-head,
  .customer-receipt-section-head,
  .engineering-section-head,
  .eq-section-head,
  .inventory-cost-result-head,
  .product-list-result-head,
  .realtime-section-heading,
  .reconciliation-section-head,
  .reimbursement-section-head,
  .report8d-section-head,
  .settings-section-head,
  .shipment-report-section-head,
  .substrate-panel-head,
  .system-users-section-head,
  .tax-section-head,
  .tax-section-title,
  .today-business-panel-head,
  .today-plan-table-heading
) {
  min-height: var(--compact-section-head-height) !important;
  padding: 10px 15px !important;
}

#content .form-section-head {
  gap: 10px;
}

#content .form-section-head .section-index {
  height: 30px;
  min-width: 30px;
  width: 30px;
}

/* Supplier collaboration portal follows the same density without touching the
 * login page or the main ERP workspace tabs. */
.supplier-portal-topbar {
  gap: 14px;
  height: 58px;
  padding-inline: 20px;
}

.supplier-portal-shell {
  display: block;
}

.supplier-portal-main {
  min-height: 100vh;
}

.supplier-portal-topbar-brand {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
  min-width: 190px;
}

.supplier-portal-topbar-logo {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e3f0;
  border-radius: 7px;
  display: flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.supplier-portal-topbar-logo img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.supplier-portal-topbar-logo .brand-logo-fallback {
  color: #fff;
  font-size: 19px;
}

.supplier-portal-top-tabs {
  align-self: stretch;
  align-items: flex-end;
  border: 0;
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 6px;
}

.supplier-portal-top-tab {
  height: 45px;
  min-width: 112px;
}

.supplier-portal-top-tab.active {
  box-shadow: 0 -2px 0 #1671df inset;
}

.supplier-portal-account {
  flex: 0 0 auto;
  min-width: 0;
}

.supplier-portal-account > div {
  max-width: 230px;
  min-width: 0;
}

.supplier-portal-account :where(strong, span) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-portal-topbar h1 {
  font-size: 17px;
  margin-top: 2px;
}

.supplier-portal-content {
  padding: 16px 20px 30px;
}

#supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) {
  gap: 18px;
  min-height: 104px;
  padding: 15px 20px;
}

#supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) h2 {
  font-size: 22px;
  margin: 4px 0 5px;
}

#supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) p {
  line-height: 1.55;
}

#supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) > div:last-child {
  min-width: 205px;
  padding: 9px 13px;
}

#supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) > div:last-child strong {
  font-size: 22px;
  margin: 2px 0;
}

#supplier-portal-content .supplier-portal-section-head {
  min-height: 50px;
  padding: 10px 15px;
}

@media (max-width: 900px) {
  #content {
    --compact-page-hero-min-height: 88px;
    --compact-page-hero-padding-y: 13px;
    --compact-page-hero-padding-x: 15px;
  }

  #content :where(
    [class$="-hero"],
    [class*="-hero "],
    .form-page-intro
  ):not(
    .dashboard-hero,
    .print-template-hero,
    .approval-detail-hero,
    .consistency-detail-hero,
    .engineering-detail-hero,
    .inspection-detail-hero,
    .shipment-report-detail-hero,
    .system-user-detail-hero
  ) {
    align-items: flex-start;
  }

  #content :where(
    .backup-hero-actions,
    .bom-hero-actions,
    .business-list-hero-side,
    .consistency-hero-actions,
    .income-hero-actions,
    .product-list-hero-side,
    .inventory-hero-side
  ) {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .supplier-portal-topbar {
    gap: 8px;
    height: 54px;
    padding-inline: 15px;
  }

  .supplier-portal-topbar-brand {
    min-width: 44px;
  }

  .supplier-portal-topbar-brand > div {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    width: 0;
  }

  .supplier-portal-account > div {
    display: block;
    margin: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    width: 0;
  }

  .supplier-portal-account .btn {
    align-items: center;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding-inline: 8px;
    width: 34px;
  }

  .supplier-portal-refresh-label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .supplier-portal-top-tab {
    height: 41px;
    min-width: 104px;
  }

  .supplier-portal-content {
    padding: 14px 15px 26px;
  }

  #supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) {
    min-height: 92px;
    padding: 13px 15px;
  }
}

@media (max-width: 720px) {
  #content .today-plan-date-card {
    flex-basis: auto;
    min-width: 0;
    width: 100%;
  }

  #content :where(
    [class$="-hero"],
    [class*="-hero "],
    .form-page-intro
  ):not(
    .dashboard-hero,
    .print-template-hero,
    .approval-detail-hero,
    .consistency-detail-hero,
    .engineering-detail-hero,
    .inspection-detail-hero,
    .shipment-report-detail-hero,
    .system-user-detail-hero
  ),
  #supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) {
    flex-direction: column;
  }

  #content :where(
    .account-password-identity,
    .analysis-stamp,
    .code-settings-lock,
    .customer-receipt-rule,
    .eq-hero-rule,
    .inventory-cost-hero-value,
    .realtime-funds-total,
    .reconciliation-hero-note,
    .settings-hero-badge,
    .system-users-hero-rule,
    .shipment-report-form-hero > div:last-child,
    .engineering-hero-flow,
    .complaint-hero-flow,
    .report8d-hero-cycle,
    .substrate-hero-kpis
  ),
  #supplier-portal-content :where(.supplier-portal-hero, .supplier-portal-page-intro) > div:last-child {
    flex-basis: auto;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  #content .page-toolbar {
    align-items: center;
    overflow-x: auto;
  }

  .supplier-portal-topbar {
    padding-inline: 10px;
  }

  .supplier-portal-account {
    gap: 3px;
  }

  .supplier-portal-topbar-logo {
    flex-basis: 31px;
    height: 31px;
    width: 31px;
  }
}

/* BOM-driven subcontract processing */
.subcontract-order-list-table {
  min-width: 2260px;
}

.subcontract-component-materials {
  align-items: center;
  display: inline-flex;
  gap: 4px;
  max-width: 250px;
  min-width: 0;
  vertical-align: middle;
  white-space: nowrap;
}

.subcontract-component-materials-empty {
  color: var(--muted);
}

.subcontract-component-code {
  background: #f4f7fb;
  border: 1px solid #dfe6ee;
  border-radius: 4px;
  color: var(--ink);
  display: inline-block;
  flex: 0 1 auto;
  font-size: 10px;
  line-height: 18px;
  max-width: 96px;
  min-width: 0;
  overflow: hidden;
  padding: 0 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subcontract-component-more {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.subcontract-component-identity {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.subcontract-component-identity > strong {
  color: var(--ink);
  flex: 0 0 auto;
  font-size: 11px;
}

.subcontract-component-identity > em {
  background: #eef6f3;
  border: 1px solid #cfe2dc;
  border-radius: 4px;
  color: #35675c;
  flex: 0 0 auto;
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
  padding: 2px 5px;
}

.business-list-page .status.subcontract-status.cancelled,
.subcontract-detail-hero .status.subcontract-status.cancelled {
  background: #f4f6f9;
  border-color: #d8e0e9;
  color: #7d8998;
}

.subcontract-progress {
  display: grid;
  gap: 4px;
  min-width: 120px;
}

.subcontract-progress > div {
  background: #e7edf5;
  border-radius: 99px;
  height: 7px;
  overflow: hidden;
}

.subcontract-progress > div > span {
  background: linear-gradient(90deg,var(--zg-blue-700),var(--zg-cyan-500));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 0;
}

.subcontract-progress strong,
.subcontract-issue-cell strong {
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.subcontract-progress small,
.subcontract-issue-cell em,
.subcontract-issue-cell small {
  color: var(--muted);
  display: block;
  font-size: 9px;
  line-height: 1.45;
}

.subcontract-issue-cell {
  display: grid;
  gap: 2px;
  min-width: 125px;
}

.subcontract-issue-cell .subcontract-issue-summary {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
  min-width: 0;
}

.subcontract-issue-cell .subcontract-issue-summary em {
  flex: 0 0 auto;
  font-style: normal;
  white-space: nowrap;
}

.subcontract-row-actions .subcontract-flow-action {
  font-size: 11px;
  font-weight: 800;
}

.subcontract-row-actions .subcontract-flow-action.approve {
  color: #2357d7;
}

.subcontract-row-actions .subcontract-flow-action.unapprove {
  background: #fff7e8;
  border-color: #e8c98f;
  color: #9a5a09;
}

.subcontract-row-actions .subcontract-flow-action.unapprove:hover {
  background: #ffefd1;
  border-color: #d9ad5d;
  color: #7b4300;
}

.subcontract-row-actions .subcontract-flow-action.issue {
  color: #96621c;
}

.subcontract-row-actions .subcontract-flow-action.receive {
  color: #087d78;
}

.subcontract-form-page {
  margin-inline: 0;
  max-width: none;
}

.subcontract-page-hero {
  background:
    radial-gradient(circle at 87% 10%,rgba(25,189,216,.24),transparent 31%),
    linear-gradient(128deg,var(--zg-navy-950),var(--zg-navy-800) 62%,#0e6680);
}

.subcontract-bom-lock {
  align-items: center;
  background: var(--zg-blue-50);
  border: 1px solid #cddcff;
  border-radius: 99px;
  color: var(--zg-blue-700) !important;
  display: inline-flex !important;
  font-size: 10px !important;
  font-weight: 750;
  gap: 5px;
  margin-left: auto !important;
  padding: 7px 10px;
  white-space: nowrap;
}

.subcontract-supplier-preview,
.subcontract-product-preview {
  margin-top: 14px;
}

.subcontract-source-demand-field > small {
  color: #6b7f91;
  display: block;
  font-size: 9px;
  line-height: 1.45;
  margin-top: 5px;
}

.subcontract-form-page.has-linked-sales-demand .subcontract-source-demand-field > small {
  color: #08756e;
  font-weight: 650;
}

.subcontract-form-page.has-linked-sales-demand select[name="customer_code"] + .searchable-select-input,
.subcontract-form-page.has-linked-sales-demand select[name="parent_product_code"] + .searchable-select-input,
.subcontract-form-page.has-linked-sales-demand .searchable-select:has(select[name="customer_code"]) .searchable-select-input,
.subcontract-form-page.has-linked-sales-demand .searchable-select:has(select[name="parent_product_code"]) .searchable-select-input {
  background: #edf7f4;
  border-color: #c7ddd7;
  color: #315f56;
  opacity: 1;
}

.subcontract-product-preview {
  background: linear-gradient(135deg,#f7faff,#f2f8fc);
  border: 1px solid #d8e5f2;
  border-radius: 9px;
  min-height: 72px;
  padding: 13px;
}

.subcontract-product-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 9px;
  min-height: 44px;
}

.subcontract-product-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6,minmax(0,1fr));
}

.subcontract-product-grid > div {
  min-width: 0;
}

.subcontract-product-grid span,
.subcontract-product-grid strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subcontract-product-grid span {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 4px;
}

.subcontract-product-grid strong {
  color: var(--ink);
  font-size: 11px;
}

.subcontract-bom-banner {
  margin-top: 10px;
}

.subcontract-bom-state {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #cad7e5;
  border-radius: 9px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  min-height: 62px;
  padding: 11px 14px;
}

.subcontract-bom-state > div:not(.boot-spinner) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.subcontract-bom-state strong {
  color: var(--ink);
  font-size: 12px;
}

.subcontract-bom-state span {
  font-size: 10px;
}

.subcontract-bom-state em {
  background: #fff;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 9px;
  font-style: normal;
  margin-left: auto;
  padding: 5px 9px;
  white-space: nowrap;
}

.subcontract-bom-state.ready {
  background: #eefaf8;
  border-color: #addfd8;
  border-style: solid;
  color: #08766f;
}

.subcontract-bom-state.error {
  background: #fff5f5;
  border-color: #edc6ca;
  border-style: solid;
  color: #b74750;
}

.subcontract-bom-state.loading {
  background: var(--zg-blue-50);
  border-color: #c9d9f4;
  border-style: solid;
}

.subcontract-component-table-wrap {
  border-top: 0;
}

.subcontract-component-table {
  width: max(100%, 1900px);
  min-width: 1900px;
}

.subcontract-component-table th,
.subcontract-component-table td {
  max-width: none;
}

.subcontract-component-table th:nth-child(1),
.subcontract-component-table td:nth-child(1) { width: 48px; text-align: center; }
.subcontract-component-table th:nth-child(2),
.subcontract-component-table td:nth-child(2) { width: 280px; }
.subcontract-component-table th:nth-child(3),
.subcontract-component-table td:nth-child(3) { width: 190px; }
.subcontract-component-table th:nth-child(4),
.subcontract-component-table td:nth-child(4) { width: 64px; text-align: center; }
.subcontract-component-table th:nth-child(5),
.subcontract-component-table td:nth-child(5) { width: 92px; }
.subcontract-component-table th:nth-child(6),
.subcontract-component-table td:nth-child(6) { width: 115px; }
.subcontract-component-table th:nth-child(7),
.subcontract-component-table td:nth-child(7) { width: 105px; }
.subcontract-component-table th:nth-child(8),
.subcontract-component-table td:nth-child(8) { width: 240px; }
.subcontract-component-table th:nth-child(9),
.subcontract-component-table td:nth-child(9) { width: 105px; }
.subcontract-component-table th:nth-child(10),
.subcontract-component-table td:nth-child(10) { width: 125px; }
.subcontract-component-table th:nth-child(11),
.subcontract-component-table td:nth-child(11) { width: 180px; }

.subcontract-detail-component-table {
  min-width: 1560px;
}

.subcontract-component-table td > strong,
.subcontract-component-table td > small {
  display: block;
}

.subcontract-component-table td > small,
.subcontract-component-table [data-subcontract-stock-note] {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.subcontract-component-table [data-subcontract-stock-note].is-short {
  color: var(--danger);
  font-weight: 700;
}

.subcontract-component-table output {
  color: var(--ink);
  display: block;
  font-size: 11px;
  font-weight: 750;
}

.subcontract-component-empty td {
  color: var(--muted);
  height: 110px !important;
  text-align: center;
}

.subcontract-detail-drawer {
  width: min(1120px,97vw);
}

.subcontract-detail-hero {
  align-items: center;
  background: linear-gradient(135deg,#f4f8ff,#eef8fa);
  border: 1px solid #d7e5f2;
  border-radius: 10px;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 15px 17px;
}

.subcontract-detail-hero > div:first-child {
  display: grid;
  gap: 4px;
}

.subcontract-detail-hero > div:first-child > strong {
  color: var(--ink);
  font-size: 16px;
}

.subcontract-detail-hero > div:first-child > span:not(.status) {
  color: var(--muted);
  font-size: 10px;
}

.subcontract-detail-hero .status.subcontract-status {
  border: 1px solid #cddbed;
  border-radius: 99px;
  font-size: 9px;
  justify-self: start;
  padding: 4px 8px;
}

.subcontract-detail-hero .subcontract-progress {
  flex: 0 0 220px;
}

.subcontract-detail-lines table,
.subcontract-detail-receipts table {
  min-width: 1180px;
}

.subcontract-detail-lines td strong,
.subcontract-detail-lines td small {
  display: block;
}

.subcontract-detail-lines td small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 2px;
}

.subcontract-detail-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-danger-ghost {
  background: #fff7f8 !important;
  border-color: #edcbd0 !important;
  color: #b7444e !important;
}

.subcontract-receive-dialog {
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 24px 70px rgba(6,20,43,.2);
  max-height: min(720px,92vh);
  overflow: auto;
  width: min(760px,94vw);
}

.subcontract-receive-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 17px 20px;
}

.subcontract-receive-head > div {
  display: grid;
  gap: 3px;
}

.subcontract-receive-head strong {
  color: var(--ink);
  font-size: 16px;
}

.subcontract-receive-head span {
  color: var(--muted);
  font-size: 10px;
}

.subcontract-receive-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
}

.subcontract-receive-summary {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(4,minmax(0,1fr));
}

.subcontract-receive-summary > div {
  background: #f6f9fd;
  border: 1px solid #e0e8f1;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
}

.subcontract-receive-summary span {
  color: var(--muted);
  font-size: 9px;
}

.subcontract-receive-summary strong {
  color: var(--ink);
  font-size: 12px;
}

.subcontract-receive-note {
  align-items: center;
  background: #eef8fb;
  border: 1px solid #cfe8ee;
  border-radius: 8px;
  color: #356b78;
  display: flex;
  font-size: 10px;
  gap: 8px;
  padding: 10px 12px;
}

.subcontract-receive-actions {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  padding: 13px 20px;
}

@media (max-width: 1050px) {
  .subcontract-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .subcontract-receive-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .subcontract-product-grid,
  .subcontract-receive-summary { grid-template-columns: 1fr; }
  .subcontract-detail-hero { align-items: stretch; flex-direction: column; }
  .subcontract-detail-hero .subcontract-progress { flex-basis: auto; }
  .subcontract-bom-state { align-items: flex-start; }
  .subcontract-bom-state em { margin-left: 0; }
}

.inbound-business-badge,
.performance-business-badge,
.supplier-payable-business {
  align-items: center;
  background: #edf3ff;
  border: 1px solid #cad9f4;
  border-radius: 99px;
  color: #315fae;
  display: inline-flex;
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
  min-height: 23px;
  padding: 5px 8px;
  white-space: nowrap;
}

.inbound-business-badge.subcontract,
.performance-business-badge.subcontract,
.supplier-payable-business.subcontract {
  background: #eaf9f7;
  border-color: #bce1db;
  color: #08756e;
}

.performance-business-badge.all {
  background: #f3efff;
  border-color: #d9cef5;
  color: #654ba0;
}

.inbound-plan-table {
  min-width: 1940px;
}

.inbound-plan-table .status.subcontract-status {
  margin-bottom: 4px;
}

.purchase-performance-filter > label:has(#purchase-performance-business-type) {
  flex: 0 0 142px;
}

.inbound-plan-filter > label:has(#inbound-plan-business-type) {
  flex: 0 0 126px;
}

.supplier-payment-hero + .customer-receipt-filter + .customer-receipt-kpis + .customer-receipt-list table,
.customer-receipt-detail table {
  min-width: 1560px;
}

/* Creation actions must remain immediately recognizable on both light panels and dark heroes. */
button.btn.btn-primary.btn-create-action {
  background: linear-gradient(135deg,#1479ed 0%,#0759c7 100%) !important;
  border-color: #0759c7 !important;
  box-shadow: 0 7px 18px rgba(7,89,199,.25),0 0 0 1px rgba(255,255,255,.22) inset !important;
  color: #fff !important;
  font-weight: 780;
  text-shadow: 0 1px 1px rgba(0,30,80,.18);
}

button.btn.btn-primary.btn-create-action:hover {
  background: linear-gradient(135deg,#086de1 0%,#064cae 100%) !important;
  border-color: #064cae !important;
  color: #fff !important;
}

button.btn.btn-primary.btn-create-action:disabled {
  background: #b9c7d9 !important;
  border-color: #aebdce !important;
  box-shadow: none !important;
  color: #f7f9fc !important;
  text-shadow: none;
}

/* Finance · RMB amount uppercase converter */
.amount-case-page {
  display: grid;
  gap: 16px;
}

.amount-case-hero {
  align-items: center;
  background:
    radial-gradient(circle at 88% 10%,rgba(25,189,216,.22),transparent 28%),
    linear-gradient(124deg,var(--zg-navy-950) 0%,var(--zg-navy-800) 60%,var(--zg-blue-600) 118%);
  border: 1px solid rgba(116,169,255,.18);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(11,45,73,.16);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 126px;
  overflow: hidden;
  padding: 22px 28px;
  position: relative;
}

.amount-case-hero::after {
  background: linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px);
  background-size: 24px 24px;
  content: "";
  inset: 0;
  opacity: .5;
  pointer-events: none;
  position: absolute;
}

.amount-case-hero > * { position: relative; z-index: 1; }
.amount-case-hero > div:first-child { min-width: 0; }
.amount-case-hero > div:first-child > span {
  color: #8fdff0;
  font: 800 9px/1 Arial,sans-serif;
  letter-spacing: 1.7px;
}
.amount-case-hero h2 { font-size: 24px; margin: 7px 0 5px; }
.amount-case-hero p {
  color: rgba(255,255,255,.68);
  font-size: 10px;
  line-height: 1.65;
  margin: 0;
  max-width: 720px;
}

.amount-case-hero-mark {
  align-items: center;
  background: rgba(4,25,44,.3);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  display: grid;
  flex: 0 0 224px;
  gap: 2px 10px;
  grid-template-columns: 38px 1fr;
  padding: 12px 15px;
}
.amount-case-hero-mark > span {
  align-items: center;
  background: rgba(143,223,240,.14);
  border: 1px solid rgba(143,223,240,.25);
  border-radius: 50%;
  color: #a7eaf6;
  display: flex;
  font-size: 20px;
  font-weight: 800;
  grid-row: 1 / 3;
  height: 38px;
  justify-content: center;
  width: 38px;
}
.amount-case-hero-mark strong { color: #fff; font-size: 18px; letter-spacing: 2px; }
.amount-case-hero-mark small { color: rgba(255,255,255,.55); font-size: 8px; }

.amount-case-layout {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0,1fr) 306px;
}

.amount-case-card { padding: 22px; }
.amount-case-card-head {
  align-items: end;
  border-bottom: 1px solid #e8eef5;
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
}
.amount-case-card-head > div { display: grid; gap: 4px; }
.amount-case-card-head > div span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .8px;
}
.amount-case-card-head > div strong { color: var(--ink); font-size: 15px; }
.amount-case-card-head > small { color: var(--muted); font-size: 9px; }

.amount-case-field { display: grid; gap: 8px; }
.amount-case-field > span { color: #526a80; font-size: 10px; font-weight: 750; }
.amount-case-input-shell {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd8e5;
  border-radius: 8px;
  display: flex;
  overflow: hidden;
  transition: border-color .16s ease,box-shadow .16s ease;
}
.amount-case-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5,110,225,.1);
}
.amount-case-input-shell b {
  align-items: center;
  align-self: stretch;
  background: #f4f8fc;
  border-right: 1px solid #dce6ef;
  color: #37627f;
  display: flex;
  font-size: 19px;
  justify-content: center;
  width: 50px;
}
.amount-case-input-shell input {
  border: 0;
  box-shadow: none;
  color: #102f4c;
  flex: 1 1 auto;
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  height: 54px;
  min-width: 0;
  outline: 0;
  padding: 0 16px;
  width: 100%;
}
.amount-case-input-shell input::placeholder { color: #aab7c3; font-size: 16px; font-weight: 500; }

.amount-case-help {
  align-items: center;
  color: #8293a3;
  display: flex;
  font-size: 9px;
  justify-content: space-between;
  margin-top: 8px;
}
.amount-case-help span:first-child { align-items: center; display: inline-flex; gap: 5px; }
.amount-case-error { color: #bc4450; font-size: 10px; min-height: 16px; margin: 7px 0 2px; }
.amount-case-actions { display: flex; gap: 9px; }
.amount-case-actions .btn { min-height: 38px; }

.amount-case-result {
  background: #f6f9fc;
  border: 1px dashed #cbd8e4;
  border-radius: 8px;
  margin-top: 20px;
  min-height: 132px;
  padding: 17px 18px;
  transition: background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.amount-case-result[data-ready="true"] {
  background: linear-gradient(135deg,#f1f8ff,#f7fbff);
  border-color: #9dc3e8;
  border-style: solid;
  box-shadow: 0 7px 20px rgba(17,72,120,.06);
}
.amount-case-result-head { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.amount-case-result-head > div { display: grid; gap: 3px; }
.amount-case-result-head span { color: #34556f; font-size: 10px; font-weight: 800; }
.amount-case-result-head small { color: #8a99a7; font-size: 8px; }
.amount-case-result output {
  color: #8c9aa7;
  display: block;
  font-family: "Noto Serif SC","Songti SC",SimSun,serif;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: .5px;
  line-height: 1.7;
  margin-top: 14px;
  overflow-wrap: anywhere;
}
.amount-case-result[data-ready="true"] output { color: #133f62; }

.amount-case-rules { overflow: hidden; }
.amount-case-rules-head { background: #f4f8fc; border-bottom: 1px solid #e1e9f1; padding: 18px; }
.amount-case-rules-head > span { color: var(--accent); font-size: 8px; font-weight: 800; letter-spacing: 1.2px; }
.amount-case-rules-head strong { color: var(--ink); display: block; font-size: 14px; margin-top: 5px; }
.amount-case-rules-head p { color: #778a9b; font-size: 9px; line-height: 1.65; margin: 6px 0 0; }
.amount-case-rules ol { display: grid; list-style: none; margin: 0; padding: 8px 18px; }
.amount-case-rules li { border-bottom: 1px solid #edf1f5; display: grid; gap: 3px; padding: 11px 0; }
.amount-case-rules li:last-child { border-bottom: 0; }
.amount-case-rules li b { color: #35546c; font-size: 10px; }
.amount-case-rules li span { color: #8696a5; font-size: 8px; line-height: 1.55; }
.amount-case-example { background: #0d3654; color: #fff; display: grid; gap: 5px; margin: 5px 13px 13px; padding: 14px; border-radius: 7px; }
.amount-case-example span { color: #8fdff0; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.amount-case-example strong { font-size: 14px; }
.amount-case-example p { color: rgba(255,255,255,.7); font-size: 9px; line-height: 1.55; margin: 0; }

@media (max-width: 960px) {
  .amount-case-layout { grid-template-columns: 1fr; }
  .amount-case-rules { display: grid; grid-template-columns: 230px 1fr; }
  .amount-case-rules-head { border-bottom: 0; border-right: 1px solid #e1e9f1; }
  .amount-case-example { align-self: center; }
}

@media (max-width: 680px) {
  .amount-case-hero { align-items: flex-start; flex-direction: column; }
  .amount-case-hero-mark { flex-basis: auto; width: 100%; }
  .amount-case-card { padding: 16px; }
  .amount-case-card-head { align-items: flex-start; flex-direction: column; gap: 5px; }
  .amount-case-help { align-items: flex-start; flex-direction: column; gap: 4px; }
  .amount-case-result-head { align-items: flex-start; flex-direction: column; }
  .amount-case-result-head .btn { width: 100%; }
  .amount-case-rules { display: block; }
  .amount-case-rules-head { border-bottom: 1px solid #e1e9f1; border-right: 0; }
}

/* Compact sales and purchase query workspaces */
.content:has(.compact-core-business-page) {
  padding-bottom: 20px;
  padding-top: 10px;
}

.compact-core-business-page {
  gap: 8px;
}

.compact-core-business-filter > .business-filter-bar.compact-filter-bar {
  gap: 7px;
  padding: 9px 10px;
}

.compact-core-business-filter .business-filter-bar > label {
  grid-template-rows: auto 34px;
}

.compact-core-business-filter .business-filter-bar label > span {
  font-size: 10px;
  margin-bottom: 4px;
}

.compact-core-business-filter .business-filter-bar input,
.compact-core-business-filter .business-filter-bar select,
.compact-core-business-filter .business-filter-bar .searchable-select-input,
.compact-core-business-filter .business-filter-bar .btn {
  height: 34px;
  min-height: 34px;
}

.business-multi-filter {
  align-self: end;
  display: grid;
  grid-template-rows: auto 34px;
  min-width: 0;
  position: relative;
}

.business-multi-filter > span {
  color: #4f6963;
  display: block;
  font-size: 10px;
  font-weight: 750;
  margin: 0 0 4px;
}

.business-multi-filter details {
  min-width: 0;
  position: relative;
}

.business-multi-filter summary {
  align-items: center;
  background: #fbfdfc;
  border: 1px solid var(--business-line, #ccd7e2);
  border-radius: 7px;
  color: var(--business-ink, #233c55);
  cursor: pointer;
  display: flex;
  gap: 7px;
  height: 34px;
  justify-content: space-between;
  list-style: none;
  min-width: 0;
  outline: none;
  padding: 0 9px;
  user-select: none;
}

.business-multi-filter summary::-webkit-details-marker {
  display:none;
}

.business-multi-filter summary > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-multi-filter summary > svg {
  color: #71859a;
  flex: 0 0 auto;
  transition: transform .16s ease;
}

.business-multi-filter details[open] summary {
  background: #fff;
  border-color: var(--accent, #056ee1);
  box-shadow: 0 0 0 3px rgba(5,110,225,.08);
}

.business-multi-filter details[open] summary > svg {
  transform: rotate(180deg);
}

.business-multi-filter details.has-selection summary {
  color: #075ebc;
  font-weight: 720;
}

.business-multi-filter-menu {
  background: #fff;
  border: 1px solid #cbd8e5;
  border-radius: 7px;
  box-shadow: 0 15px 34px rgba(7,28,49,.17);
  display: grid;
  gap: 2px;
  left: 0;
  max-height: min(330px, calc(100dvh - 170px));
  min-width: 196px;
  overflow: auto;
  padding: 6px;
  position: absolute;
  top: calc(100% + 5px);
  width: max(100%, 196px);
  z-index: 180;
}

.business-filter-bar .business-multi-filter-menu > label {
  align-items: center;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  grid-template-rows: none;
  min-height: 34px;
  padding: 6px 8px;
}

.business-filter-bar .business-multi-filter-menu > label:hover {
  background: #edf5ff;
}

.business-filter-bar .business-multi-filter-menu input[type="checkbox"] {
  accent-color: var(--accent, #056ee1);
  flex: 0 0 auto;
  height: 15px;
  margin: 0;
  padding: 0;
  width: 15px;
}

.business-filter-bar .business-multi-filter-menu > label > span {
  color: #334d65;
  font-size: 11px;
  font-weight: 620;
  margin: 0;
}

.business-multi-filter-actions {
  border-top: 1px solid #e4ebf2;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 4px;
  padding-top: 6px;
}

.business-multi-filter-actions button {
  background: #f7fafc;
  border: 1px solid #d8e2eb;
  border-radius: 5px;
  color: #52687e;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  height: 29px;
  padding: 0 6px;
}

.business-multi-filter-actions button:hover {
  background: #edf5ff;
  border-color: #b7cde3;
  color: #075ebc;
}

.business-multi-filter-actions [data-business-multi-done] {
  background: #eaf4ff;
  border-color: #b9d4ed;
  color: #075ebc;
  font-weight: 720;
}

@media (max-width: 760px) {
  .business-multi-filter summary {
    font-size: 16px;
  }

  .business-filter-bar .business-multi-filter-menu > label {
    min-height: 44px;
  }

  .business-multi-filter-menu {
    width: min(240px, calc(100vw - 36px));
  }
}

.compact-business-filter-actions {
  align-items: center;
  align-self: end;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  min-width: 0;
  white-space: nowrap;
}

.compact-business-filter-actions .btn {
  border-radius: 7px;
  margin: 0;
  min-width: 78px;
  padding-inline: 11px;
  white-space: nowrap;
}

.compact-business-filter-actions .compact-filter-export {
  background: #fff;
  border-color: #cbdad6;
  color: #355f56;
}

.compact-business-filter-actions .compact-filter-export:hover {
  background: #f4faf8;
  border-color: #9fc5ba;
  color: #1b6655;
}

.compact-business-filter-actions .compact-filter-create {
  background: #eaf4ff;
  border-color: #b9d4ed;
  color: #205f96;
}

.compact-business-filter-actions .compact-filter-create:hover {
  background: #dceeff;
  border-color: #91bce2;
  color: #174f80;
}

.compact-core-business-page .business-list-data .table-scroll {
  max-height: max(430px, calc(100dvh - 190px));
}

.compact-core-business-page .compact-business-table-foot {
  gap: 12px;
  min-height: 38px;
  padding: 7px 12px;
}

.business-table-summary {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 7px 20px;
  min-width: 0;
}

.business-table-summary > span {
  align-items: baseline;
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.business-table-summary em {
  color: #788b86;
  font-size: 10px;
  font-style: normal;
}

.business-table-summary strong {
  color: #214f45;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.business-table-summary .warning strong {
  color: #b65c2c;
}

.business-table-summary-note {
  color: #899993;
  flex: 0 0 auto;
  font-size: 9px;
  white-space: nowrap;
}

.compact-shipment-batch-foot,
.business-batch-foot {
  flex-wrap: wrap;
}

.compact-shipment-batch-foot .business-table-summary,
.business-batch-foot .business-table-summary {
  flex: 1 1 470px;
}

.compact-shipment-batch-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
}

.compact-shipment-batch-actions > span {
  font-size: 10px;
  min-height: 27px;
  padding: 4px 8px;
}

.compact-shipment-batch-actions .btn {
  border-radius: 7px;
  min-height: 29px;
  padding: 5px 9px;
}

.compact-shipment-batch-actions > em {
  font-size: 9px;
}

.business-batch-actions .btn-danger-soft {
  border-color: #efcfd2;
  color: #a83b45;
}

.business-batch-actions .btn-danger-soft:hover:not(:disabled) {
  background: #fff0f1;
  border-color: #e3aeb3;
}

@media (min-width: 1250px) {
  .compact-core-business-page .business-filter-bar.compact-filter-bar {
    grid-template-columns:
      minmax(210px, 1.05fr)
      minmax(86px, .46fr)
      minmax(112px, .62fr)
      minmax(126px, .72fr)
      minmax(105px, .62fr)
      302px;
  }

  .compact-core-business-page .business-filter-bar.purchase-return-filter-bar.compact-filter-bar {
    grid-template-columns:
      minmax(210px, .95fr)
      minmax(150px, .72fr)
      minmax(190px, 1fr)
      302px;
  }

  .compact-core-business-page .business-filter-bar.compact-filter-bar .business-keyword {
    grid-column: auto;
    min-width: 0;
  }

  [data-core-business-page="sales_details"] .business-filter-bar.compact-filter-bar {
    grid-template-columns:
      minmax(190px, 1.05fr)
      minmax(84px, .42fr)
      minmax(94px, .48fr)
      minmax(108px, .58fr)
      minmax(116px, .66fr)
      minmax(140px, .78fr)
      max-content;
  }
}

@media (min-width: 901px) and (max-width: 1249px) {
  [data-core-business-page="sales_details"] .business-filter-bar.compact-filter-bar {
    grid-template-columns:
      minmax(190px, 1.2fr)
      minmax(100px, .7fr)
      minmax(100px, .7fr)
      minmax(174px, auto);
  }

  [data-core-business-page="sales_details"] .compact-business-filter-actions {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
  }

  [data-core-business-page="sales_details"] .business-keyword {
    grid-column: span 2;
  }
}

@media (max-width: 950px) {
  .content:has(.compact-core-business-page) {
    padding-top: 10px;
  }

  .compact-business-filter-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .compact-business-filter-actions:has(.compact-filter-create) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .compact-business-filter-actions .btn {
    min-width: 0;
    padding-inline: 8px;
    width: 100%;
  }

  .compact-core-business-page .business-list-data .table-scroll {
    max-height: none;
  }

  .compact-shipment-batch-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 650px) {
  .compact-core-business-page .compact-business-table-foot {
    gap: 5px;
  }

  .business-table-summary {
    gap: 5px 14px;
  }

  .business-table-summary-note {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

/* Professional quotation template brand layer.
   Keep these stable quote_prof_* selectors in sync with standalonePrintStyles
   so designer, preview, print and PDF render the same quotation skin. */
.print-center-page [data-print-control-id="quote_prof_title_cn"] .print-free-text-content,
.print-center-page [data-print-control-id="quote_prof_title_cn"] > textarea,
.print-center-page [data-print-control-id="quote_prof_info_title"] .print-free-text-content,
.print-center-page [data-print-control-id="quote_prof_info_title"] > textarea,
.print-center-page [data-print-control-id="quote_prof_items_title"] .print-free-text-content,
.print-center-page [data-print-control-id="quote_prof_items_title"] > textarea,
.print-center-page [data-print-control-id="quote_prof_terms_title"] .print-free-text-content,
.print-center-page [data-print-control-id="quote_prof_terms_title"] > textarea,
.print-center-page [data-print-control-id="quote_prof_signature_title"] .print-free-text-content,
.print-center-page [data-print-control-id="quote_prof_signature_title"] > textarea {
  color: #056EE1 !important;
  font-weight: inherit;
}

.print-center-page [data-print-control-id="quote_prof_items_table"] .print-document-table th {
  background: #123A63 !important;
  border-color: #123A63 !important;
  color: #fff !important;
}

.print-center-page [data-print-control-id="quote_prof_items_table"] .print-document-table tbody tr:nth-child(even):not(.print-table-blank-row) td {
  background: #F5F9FE !important;
}

.print-center-page [data-print-control-id="quote_prof_info_grid"] .print-layout-grid-cell:nth-child(4n + 1),
.print-center-page [data-print-control-id="quote_prof_info_grid"] .print-layout-grid-cell:nth-child(4n + 3),
.print-center-page [data-print-control-id="quote_prof_totals_grid"] .print-layout-grid-cell:nth-child(4n + 1),
.print-center-page [data-print-control-id="quote_prof_totals_grid"] .print-layout-grid-cell:nth-child(4n + 3),
.print-center-page [data-print-control-id="quote_prof_signature_grid"] .print-free-field-content > span {
  background: var(--print-grid-cell-background, #EAF3FF) !important;
  color: #123A63;
  font-weight: inherit;
}

.print-center-page [data-print-control-id="quote_prof_terms"] .print-free-text-content,
.print-center-page [data-print-control-id="quote_prof_terms"] > textarea {
  background: #F5F9FE;
  border-left: 3px solid #EAF3FF;
}

/* Professional sales-contract skin.  Keep the stable sales_contract_* IDs in
   sync with standalonePrintStyles so the designer and final print match. */
.print-center-page [data-print-control-id="sales_contract_title_cn"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_title_cn"] > textarea,
.print-center-page [data-print-control-id="sales_contract_buyer_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_buyer_title"] > textarea,
.print-center-page [data-print-control-id="sales_contract_seller_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_seller_title"] > textarea,
.print-center-page [data-print-control-id="sales_contract_items_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_items_title"] > textarea,
.print-center-page [data-print-control-id="sales_contract_receiver_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_receiver_title"] > textarea,
.print-center-page [data-print-control-id="sales_contract_totals_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_totals_title"] > textarea,
.print-center-page [data-print-control-id="sales_contract_terms_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_terms_title"] > textarea,
.print-center-page [data-print-control-id="sales_contract_signature_title"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_signature_title"] > textarea {
  color: #123A63 !important;
  font-weight: inherit;
}

.print-center-page [data-print-control-id="sales_contract_items_table"] .print-document-table th {
  background: #123A63 !important;
  border-color: #123A63 !important;
  color: #fff !important;
}

.print-center-page [data-print-control-id="sales_contract_items_table"] .print-document-table tbody tr:nth-child(even):not(.print-table-blank-row) td {
  background: #F5F9FE !important;
}

.print-center-page [data-print-control-id="sales_contract_meta_grid"] .print-layout-grid-cell:nth-child(odd),
.print-center-page [data-print-control-id="sales_contract_buyer_grid"] .print-layout-grid-cell:nth-child(odd),
.print-center-page [data-print-control-id="sales_contract_seller_grid"] .print-layout-grid-cell:nth-child(odd),
.print-center-page [data-print-control-id="sales_contract_receiver_grid"] .print-layout-grid-cell:nth-child(odd),
.print-center-page [data-print-control-id="sales_contract_totals_grid"] .print-layout-grid-cell:nth-child(odd),
.print-center-page [data-print-control-id="sales_contract_signature_grid"] .print-layout-grid-cell:nth-child(-n + 2) {
  background: var(--print-grid-cell-background, #EAF3FF) !important;
  color: #123A63;
  font-weight: inherit;
}

.print-center-page [data-print-control-id="sales_contract_terms"] .print-free-text-content,
.print-center-page [data-print-control-id="sales_contract_terms"] > textarea {
  background: #F5F9FE;
  border-left: 3px solid #EAF3FF;
}

/* Repeating header/footer controls are configured from the sidebar. */
.print-center-page .print-repeat-tools {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
}

.print-center-page .print-repeat-tools .print-sidebar-head {
  margin-bottom: -1px;
}

.print-center-page .print-repeat-tools-intro,
.print-center-page .print-repeat-token-tip,
.print-center-page .print-repeat-control-help {
  background: #f4f8fd;
  border: 1px solid #dbe7f5;
  border-radius: 7px;
  color: #58708a;
  font-size: 9px;
  line-height: 1.55;
  margin: 0 9px;
  padding: 7px 8px;
}

.print-center-page .print-repeat-token-tip code {
  background: #e9f2ff;
  border-radius: 3px;
  color: #1d5da9;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  padding: 1px 3px;
}

.print-center-page .print-repeat-zone {
  background: linear-gradient(135deg, #fbfdff, #f4f9ff);
  border: 1px solid #d7e4f4;
  border-radius: 8px;
  display: grid;
  gap: 7px;
  margin: 0 9px;
  padding: 8px;
}

.print-center-page .print-repeat-zone-head {
  align-items: baseline;
  display: flex;
  gap: 7px;
  justify-content: space-between;
  min-width: 0;
}

.print-center-page .print-repeat-zone-head strong {
  color: #193c63;
  font-size: 10px;
  font-weight: 750;
}

.print-center-page .print-repeat-zone-head small {
  color: #71849a;
  font-size: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-center-page .print-repeat-zone-actions,
.print-center-page .print-repeat-field-add {
  display: flex;
  gap: 5px;
  min-width: 0;
}

.print-center-page .print-repeat-zone-actions .btn {
  align-items: center;
  display: inline-flex;
  flex: 1 1 0;
  font-size: 9px;
  gap: 3px;
  justify-content: center;
  min-width: 0;
  padding-inline: 5px;
}

.print-center-page .print-repeat-field-add select {
  background: #fff;
  border: 1px solid #bed0e5;
  border-radius: 6px;
  color: #36536f;
  flex: 1 1 auto;
  font-size: 9px;
  min-width: 0;
  padding: 5px 6px;
}

.print-center-page .print-repeat-field-add .btn {
  flex: 0 0 auto;
  font-size: 9px;
  padding-inline: 7px;
}

.print-center-page .print-repeat-region-property {
  align-items: end;
}

.print-center-page .print-repeat-region-property > p {
  color: #6b7e92;
  font-size: 9px;
  grid-column: 1 / -1;
  line-height: 1.45;
  margin: -2px 0 0;
}

@media (max-width: 760px) {
  .print-center-page .print-repeat-zone-actions {
    flex-wrap: wrap;
  }

  .print-center-page .print-repeat-zone-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }
}

/* ERP data workspace: compact chrome, viewport-filling lists and opt-in focus tools. */
.app-shell.workspace-focus-mode {
  grid-template-columns: 0 minmax(0, 1fr);
}

.app-shell.workspace-focus-mode .sidebar {
  width: 0;
  overflow: hidden;
  transform: translateX(-100%);
  visibility: hidden;
}

.app-shell.workspace-focus-mode .app-main {
  grid-column: 2;
}

.workspace-tab-tools .icon-button.is-active {
  border-color: #8eb8e8;
  background: #e8f3ff;
  color: #075fbf;
  box-shadow: 0 0 0 2px rgba(47, 108, 255, .08);
}

.workspace-tab-tools .icon-button[disabled]:not(.is-active) {
  background: rgba(255,255,255,.45);
}

#content .workspace-data-view.filters-collapsed > .workspace-data-filter,
#content .workspace-data-view.filters-collapsed > .business-list-filter,
#content .workspace-data-view.filters-collapsed > .product-list-filter,
#content .workspace-data-view.filters-collapsed > .compact-filter-bar,
#content.workspace-data-view.filters-collapsed > .workspace-data-filter,
#content.workspace-data-view.filters-collapsed > .business-list-filter,
#content.workspace-data-view.filters-collapsed > .product-list-filter,
#content.workspace-data-view.filters-collapsed > .compact-filter-bar {
  display: none !important;
}

/*
 * Data-page width contract.
 *
 * Some legacy list roots still carry readable-page max-width/margin rules.
 * The runtime only adds `workspace-data-view` after it has found a genuine
 * top-level data table, and explicitly excludes forms, drawers and the print
 * designer.  Releasing the width here therefore covers every detected list
 * (including sales-order query) without widening document editors.
 */
#content.workspace-data-view,
#content > .workspace-data-view {
  align-self: stretch;
  box-sizing: border-box;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  min-width: 0;
  width: 100%;
}

/* Named list workspaces keep the same fluid-width contract even before the
   runtime enhancer finishes marking the active table.  This prevents a brief
   legacy-width flash on master data, product, finance, HR and file lists. */
#content > :where(
  .business-list-page,
  .bom-page,
  .material-master-page,
  .product-list-page,
  .substrate-page,
  .supplier-evaluation-page,
  .my-reimbursement-page,
  .reimbursement-management-page,
  .tax-page
) {
  box-sizing: border-box;
  margin-inline: 0 !important;
  max-width: none !important;
  min-width: 0;
  width: 100%;
}

#content.workspace-data-view > :where(.page-toolbar, .panel, .table-panel),
#content > .workspace-data-view > :where(.page-toolbar, .panel, .table-panel) {
  box-sizing: border-box;
  max-width: none;
  min-width: 0;
  width: 100%;
}

#content.workspace-data-view > :where(.workspace-data-filter, .workspace-viewport-table),
#content > .workspace-data-view > :where(.workspace-data-filter, .workspace-viewport-table) {
  align-self: stretch;
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.workspace-viewport-table {
  min-height: 0;
  max-height: calc(100dvh - 66px);
}

.workspace-viewport-table .table-scroll {
  overflow: auto;
}

.workspace-viewport-table .table-scroll,
.workspace-viewport-table .consistency-table-scroll {
  min-height: 0;
  max-height: none !important;
  overflow: auto;
  overscroll-behavior: contain;
}

.workspace-viewport-table .table-scroll thead th,
.workspace-viewport-table .consistency-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 1px 0 #dbe5f0;
}

.workspace-viewport-table .table-scroll thead th:first-child,
.workspace-viewport-table .table-scroll thead th.sticky-actions,
.workspace-viewport-table .consistency-table-scroll thead th:first-child,
.workspace-viewport-table .consistency-table-scroll thead th.sticky-actions {
  z-index: 7;
}

.app-shell.workspace-density-compact #content .workspace-viewport-table th {
  height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 9px;
  padding-right: 9px;
}

.app-shell.workspace-density-compact #content .workspace-viewport-table td {
  height: 40px;
  padding: 5px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell.workspace-density-compact #content .workspace-viewport-table .table-foot {
  min-height: 36px;
  padding: 6px 10px;
}

.app-shell.workspace-density-compact #content .workspace-viewport-table :is(.table-subline,.cell-sub,small) {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media screen and (min-width: 881px) and (min-height: 680px) {
  #workspace-page-host:has(> #content.workspace-data-page) {
    height: calc(100dvh - 38px);
    min-height: 0;
    overflow: hidden;
  }

  #content.workspace-data-page {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #content.workspace-data-page > .workspace-data-view,
  #content.workspace-data-page.workspace-data-view {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  #content.workspace-data-page > .workspace-data-view > *,
  #content.workspace-data-page.workspace-data-view > * {
    flex: 0 0 auto;
  }

  #content.workspace-data-page > .workspace-data-view > .workspace-viewport-table,
  #content.workspace-data-page.workspace-data-view > .workspace-viewport-table {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 220px;
    overflow: hidden;
  }

  .workspace-viewport-table > .table-scroll,
  .workspace-viewport-table > .consistency-table-scroll {
    flex: 1 1 auto;
  }

  .workspace-focus-mode #workspace-page-host {
    padding: 8px 10px 10px;
  }

  .workspace-focus-mode #content.workspace-data-view > :not(.workspace-viewport-table),
  .workspace-focus-mode #content > .workspace-data-view > :not(.workspace-viewport-table) {
    display: none !important;
  }
}

@media (max-width: 880px) {
  #workspace-density-toggle,
  #workspace-focus-toggle {
    display: none !important;
  }

  .app-shell.workspace-focus-mode {
    grid-template-columns: 1fr;
  }

  .app-shell.workspace-focus-mode .sidebar {
    width: min(268px, 86vw);
    visibility: visible;
  }

  .app-shell.workspace-density-compact #content .workspace-viewport-table th {
    height: 43px;
    padding: 0 15px;
  }

  .app-shell.workspace-density-compact #content .workspace-viewport-table td {
    height: 54px;
    padding: 8px 15px;
  }

  .workspace-viewport-table {
    height: auto;
    max-height: none;
  }

  .workspace-viewport-table .table-scroll,
  .workspace-viewport-table .consistency-table-scroll {
    height: auto;
    max-height: none !important;
    overflow-x: auto;
    overflow-y: visible;
  }
}

@media screen and (max-height: 679px) {
  #workspace-page-host:has(> #content.workspace-data-page),
  #content.workspace-data-page,
  #content.workspace-data-page > .workspace-data-view,
  #content.workspace-data-page.workspace-data-view,
  .workspace-viewport-table {
    height: auto;
    max-height: none;
    overflow: visible;
  }
}

@media print {
  #workspace-filter-collapse,
  #workspace-density-toggle,
  #workspace-focus-toggle {
    display: none !important;
  }

  .workspace-data-page,
  .workspace-data-view,
  .workspace-viewport-table,
  .workspace-viewport-table .table-scroll,
  .workspace-viewport-table .consistency-table-scroll {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .workspace-viewport-table .table-scroll thead th,
  .workspace-viewport-table .consistency-table-scroll thead th {
    position: static !important;
  }
}

/* 工程管理中的快速搜索采用与表单一致的平面边框，避免浮层阴影遮挡
   BOM 子件、替代料及工程/EQ 选择内容。 */
:is(
  .bom-filter-bar,
  .bom-requirement-filter,
  .bom-form-page,
  .bom-alternative-drawer,
  .engineering-filter,
  .engineering-form-page,
  .eq-filter,
  .eq-form-page
) .searchable-select-menu {
  box-shadow: none;
}

:is(
  .bom-filter-bar,
  .bom-requirement-filter,
  .bom-form-page,
  .bom-alternative-drawer,
  .engineering-filter,
  .engineering-form-page,
  .eq-filter,
  .eq-form-page
) .searchable-select.open .searchable-select-input {
  box-shadow: none !important;
}

/* BOM 选择器显式使用平面输入框：常态、聚焦、展开和结果菜单均不保留阴影。
   通过组件标记而非祖先层级定位，列表、需求、变更记录和新增 BOM 子件保持一致。 */
.searchable-select.searchable-select-flat .searchable-select-input {
  background-color: #fff !important;
  border: 1px solid #ccd7e2 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

.searchable-select.searchable-select-flat .searchable-select-input:focus,
.searchable-select.searchable-select-flat.open .searchable-select-input {
  border-color: var(--zg-blue-600) !important;
  box-shadow: none !important;
}

.searchable-select.searchable-select-flat .searchable-select-menu {
  background: #fff;
  border: 1px solid #ccd7e2;
  border-radius: 6px;
  box-shadow: none !important;
}

/* Desktop working density: reclaim chrome and spacing without scaling fonts,
   editable print controls, document output or mobile touch targets. */
@media screen and (min-width: 881px) {
  .app-shell:not(.sidebar-collapsed):not(.workspace-focus-mode) {
    grid-template-columns: 148px minmax(0, 1fr);
  }

  .app-shell:not(.workspace-focus-mode) .sidebar:not(.collapsed) {
    width: 148px;
  }

  .sidebar .side-head {
    height: 54px;
    flex-basis: 54px;
  }

  .sidebar .tenant-pill {
    margin: 7px 8px 4px;
    padding: 7px 8px;
  }

  .sidebar .nav-scroll { padding-block: 4px 12px; }
  .sidebar :is(.nav-home, .module-button) {
    min-height: 36px;
    padding-block: 6px;
    border-radius: 6px;
  }

  .sidebar .module { margin-top: 2px; }
  .sidebar .submenu { padding: 0 0 4px 28px; }
  .sidebar .submenu :is(button, a) {
    min-height: 29px;
    padding-block: 4px;
    border-radius: 5px;
  }

  .sidebar .side-footer { padding-block: 7px; }

  .workspace-tabs-bar {
    height: 36px;
    gap: 6px;
    padding: 3px 8px 0;
  }

  .workspace-tab { height: 30px; border-radius: 6px 6px 0 0; }
  .workspace-tab-list { gap: 4px; }
  .workspace-tab-tools { padding-bottom: 3px; }

  #workspace-page-host.content {
    padding: 8px 10px 10px;
  }

  #content:not(:has(.print-center-page)) {
    --compact-page-hero-min-height: 78px;
    --compact-page-hero-padding-y: 10px;
    --compact-page-hero-padding-x: 14px;
    --compact-section-head-height: 44px;
  }

  #content:not(:has(.print-center-page)) :where(
    .panel-head, .form-section-head, .analysis-section-title,
    .bom-section-head, .business-list-result-head,
    .complaint-section-head, .customer-receipt-section-head,
    .engineering-section-head, .eq-section-head,
    .inventory-cost-result-head, .product-list-result-head,
    .realtime-section-heading, .reconciliation-section-head,
    .reimbursement-section-head, .report8d-section-head,
    .settings-section-head, .shipment-report-section-head,
    .substrate-panel-head, .system-users-section-head,
    .tax-section-head, .tax-section-title,
    .today-business-panel-head, .today-plan-table-heading
  ) {
    padding: 7px 12px !important;
  }

  #content:not(:has(.print-center-page)) .page-toolbar {
    min-height: 36px;
    margin-bottom: 8px;
    gap: 8px;
  }

  #content:not(:has(.print-center-page)) :where(
    .form-page, .business-list-page, .product-list-page,
    .inventory-page, .bom-page, .engineering-page
  ) {
    gap: 10px;
  }

  #content .compact-core-business-page { gap: 6px; }

  #content:not(:has(.print-center-page)) .form-section-body {
    padding: 14px 14px 2px;
  }

  #content:not(:has(.print-center-page)) .field {
    gap: 5px;
    margin-bottom: 12px;
  }

  #content:not(:has(.print-center-page)) .field :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]),
    select
  ) {
    height: 38px;
    padding-inline: 10px;
  }

  #content:not(:has(.print-center-page)) .form-page-actions {
    bottom: 8px;
    min-height: 52px;
    gap: 10px;
    padding: 8px 12px;
  }

  #content:not(:has(.print-center-page)) :is(.page-toolbar, .form-page-actions) .btn {
    min-height: 34px;
    padding: 6px 10px;
  }

  #content :is(.compact-filter-bar, .compact-entity-filter-toolbar) {
    column-gap: 7px;
    row-gap: 6px;
    padding: 7px 9px;
  }

  #content .compact-filter-bar > label {
    grid-template-rows: auto 32px;
  }

  #content .compact-filter-bar label > span {
    margin-bottom: 3px;
  }

  #content .compact-filter-bar :is(
    input:not([type="checkbox"]):not([type="radio"]),
    select, .searchable-select-input, .btn
  ) {
    height: 32px;
    min-height: 32px;
  }

  .app-shell:not(.workspace-density-compact) #content .workspace-viewport-table th {
    height: 36px;
    padding: 0 10px;
  }

  .app-shell:not(.workspace-density-compact) #content .workspace-viewport-table td {
    height: 44px;
    padding: 6px 10px;
  }

  .app-shell.workspace-density-compact #content .workspace-viewport-table th {
    height: 30px;
    padding: 0 8px;
  }

  .app-shell.workspace-density-compact #content .workspace-viewport-table td {
    height: 34px;
    padding: 3px 8px;
  }

  .app-shell.workspace-density-compact #content .workspace-viewport-table .row-action {
    width: 26px;
    height: 26px;
  }

  .app-shell.workspace-density-compact #content .workspace-viewport-table .status {
    padding-block: 3px;
  }

  .app-shell #content .workspace-viewport-table .table-foot,
  .app-shell.workspace-density-compact #content .workspace-viewport-table .table-foot {
    min-height: 34px;
    padding: 5px 10px;
  }
}

@media screen and (min-width: 881px) and (min-height: 680px) {
  #workspace-page-host:has(> #content.workspace-data-page) {
    height: calc(100dvh - 36px);
  }
}
/* Shipment label setup stays outside the print canvas and standalone output. */
.shipment-label-dialog { width: min(1000px, calc(100vw - 32px)); max-width: 1000px; background: #fff; border: 1px solid #dce4ee; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 60px #10263d30; }
.shipment-label-dialog .dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #e1e7ef; }
.shipment-label-dialog .dialog-head strong { display: block; font-size: 16px; }
.shipment-label-dialog .dialog-head span { display: block; margin-top: 4px; color: #637189; font-size: 12px; }
.shipment-label-dialog .dialog-body { padding: 16px 18px; overflow: auto; max-height: calc(90vh - 76px); }
.shipment-label-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #e1e7ef; padding-top: 12px; }
.shipment-label-options { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 10px 12px; border: 1px solid #dce4ee; border-radius: 6px; background: #f7f9fc; }
.shipment-label-options label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; }
.shipment-label-options input[type="radio"] { width: 16px; height: 16px; margin: 0; }
.shipment-label-options input[type="number"] { width: 110px; min-height: 32px; padding: 5px 8px; }
.shipment-label-note { margin: 10px 0; color: #637189; font-size: 12px; line-height: 1.6; }
.shipment-label-line-table { width: 100%; min-width: 660px; }
.shipment-label-line-table th, .shipment-label-line-table td { padding: 8px 10px; border: 1px solid #e1e7ef; font-size: 13px; white-space: nowrap; }
.shipment-label-line-table th { background: #f4f7fb; }
.shipment-label-summary { padding: 12px 0; font-size: 13px; font-weight: 600; color: #245697; }
.shipment-label-summary.is-error { color: #bd3441; }

/* Personal favorites: a permission-safe flyout anchored to 经营工作台. */
.nav-home-favorites {
  position: relative;
  width: 100%;
  min-width: 0;
}
.nav-home-favorites .nav-home { padding-right: 30px; }
.favorite-menu-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: rgba(202,220,235,.52);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color .16s ease, background .16s ease, opacity .16s ease;
}
.favorite-menu-toggle:hover,
.favorite-menu-toggle[aria-expanded="true"] {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.favorite-menu-toggle.has-favorites { color: #8fbcff; }
.favorite-menu-toggle.has-favorites svg { fill: rgba(108,165,247,.2); }
.sidebar-favorites-panel {
  position: fixed;
  z-index: 62;
  width: min(292px,calc(100vw - 16px));
  max-height: min(520px,calc(100vh - 16px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(190,210,230,.88);
  border-radius: 10px;
  color: #243e57;
  background: rgba(255,255,255,.985);
  box-shadow: 0 18px 46px rgba(4,22,40,.25);
  animation: sidebarFavoriteIn .15s ease-out;
}
.sidebar-favorites-panel.is-open { display: flex; }
@keyframes sidebarFavoriteIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}
.sidebar-favorites-panel > header {
  min-height: 58px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e5ebf1;
  background: linear-gradient(135deg,#f8fbff,#f2f7fc);
}
.sidebar-favorites-panel > header div { min-width: 0; }
.sidebar-favorites-panel > header span,
.sidebar-favorites-panel > header strong { display: block; }
.sidebar-favorites-panel > header span {
  color: #7190ae;
  font: 750 7px/1 Arial,sans-serif;
  letter-spacing: 1.25px;
}
.sidebar-favorites-panel > header strong {
  margin-top: 5px;
  color: #203d59;
  font-size: 13px;
}
.favorite-panel-manage,
.sidebar-favorites-panel > footer button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border: 1px solid #ccdae7;
  border-radius: 6px;
  color: #24659e;
  background: #fff;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.favorite-panel-manage:hover,
.sidebar-favorites-panel > footer button:hover {
  border-color: #91b8dc;
  background: #eef6fd;
}
.sidebar-favorite-list {
  min-height: 74px;
  padding: 6px;
  overflow: auto;
}
.sidebar-favorite-row {
  position: relative;
  min-height: 41px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 26px;
  align-items: center;
  border-radius: 7px;
}
.sidebar-favorite-row:hover { background: #f2f7fb; }
.sidebar-favorite-row.active { background: #edf5ff; }
.sidebar-favorite-row.active:before {
  content: "";
  width: 3px;
  height: 19px;
  position: absolute;
  left: 0;
  top: 50%;
  border-radius: 0 3px 3px 0;
  background: #2479ce;
  transform: translateY(-50%);
}
.sidebar-favorite-link {
  min-width: 0;
  height: 41px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 8px 5px 11px;
  border: 0;
  color: #284960;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.sidebar-favorite-link span,
.sidebar-favorite-link small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-favorite-link span { font-size: 10px; font-weight: 730; }
.sidebar-favorite-link small { color: #899ba9; font-size: 7px; }
.sidebar-favorite-row.active .sidebar-favorite-link span { color: #1766ae; }
.sidebar-favorite-remove {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: #9aa8b4;
  background: transparent;
  cursor: pointer;
  opacity: .35;
}
.sidebar-favorite-row:hover .sidebar-favorite-remove,
.sidebar-favorite-remove:focus { opacity: 1; }
.sidebar-favorite-remove:hover { color: #c24450; background: #fdebed; }
.sidebar-favorite-remove:disabled { cursor: wait; opacity: .35; }
.sidebar-favorite-empty {
  min-height: 126px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 18px;
  color: #8aa0b2;
  text-align: center;
}
.sidebar-favorite-empty svg { margin-bottom: 3px; color: #80a8cf; }
.sidebar-favorite-empty strong { color: #48677f; font-size: 10px; }
.sidebar-favorite-empty span { max-width: 210px; font-size: 8px; line-height: 1.55; }
.sidebar-favorites-panel > footer {
  min-height: 42px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #e8edf2;
  color: #8a9aa7;
  background: #fbfcfd;
  font-size: 7px;
}

.sidebar-favorite-manager-backdrop { z-index: 132; }
.sidebar-favorite-manager {
  width: min(850px,calc(100vw - 32px));
  max-height: min(690px,calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d9e3ec;
  border-radius: 12px;
  color: #27445d;
  background: #fff;
  box-shadow: 0 24px 70px rgba(5,25,44,.28);
}
.sidebar-favorite-manager > header {
  min-height: 83px;
  padding: 15px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e9ef;
  background: linear-gradient(135deg,#f7faff,#eef5fb);
}
.sidebar-favorite-manager > header span {
  color: #2b77b7;
  font: 800 7px/1 Arial,sans-serif;
  letter-spacing: 1.4px;
}
.sidebar-favorite-manager > header h3 {
  margin: 6px 0 3px;
  color: #203c55;
  font-size: 17px;
}
.sidebar-favorite-manager > header p {
  margin: 0;
  color: #7b8e9e;
  font-size: 9px;
}
.sidebar-favorite-manager-body {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(260px,.8fr) minmax(360px,1.2fr);
  gap: 0;
  overflow: hidden;
}
.favorite-manager-selected,
.favorite-manager-catalog {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.favorite-manager-selected { border-right: 1px solid #e2e9ef; background: #fbfcfd; }
.favorite-manager-section-head {
  min-height: 37px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.favorite-manager-section-head strong,
.favorite-manager-section-head span { display: block; }
.favorite-manager-section-head strong { color: #294860; font-size: 11px; }
.favorite-manager-section-head span,
.favorite-manager-section-head small { margin-top: 3px; color: #8c9ba7; font-size: 7px; }
.favorite-manager-selected > [data-favorite-selected-list],
.favorite-manager-catalog > [data-favorite-catalog-list] {
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.favorite-manager-selected-row {
  min-height: 45px;
  display: grid;
  grid-template-columns: 25px minmax(0,1fr) 25px 25px 27px;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  padding: 5px 6px;
  border: 1px solid #e1e8ee;
  border-radius: 7px;
  background: #fff;
}
.favorite-manager-order {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #39729e;
  background: #eaf3fa;
  font-size: 8px;
  font-weight: 800;
}
.favorite-manager-selected-row div { min-width: 0; }
.favorite-manager-selected-row strong,
.favorite-manager-selected-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.favorite-manager-selected-row strong { color: #31516a; font-size: 9px; }
.favorite-manager-selected-row small { margin-top: 2px; color: #8c9ca8; font-size: 7px; }
.favorite-manager-selected-row button {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d9e2e9;
  border-radius: 5px;
  color: #657f93;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
}
.favorite-manager-selected-row button:hover:not(:disabled) { color: #1768aa; border-color: #98bad5; background: #edf6fd; }
.favorite-manager-selected-row button:last-child:hover { color: #ba3c49; border-color: #efbdc2; background: #fff0f1; }
.favorite-manager-selected-row button:disabled { opacity: .3; cursor: default; }
.favorite-manager-search {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  padding: 0 9px;
  border: 1px solid #d3dfe8;
  border-radius: 6px;
  color: #7890a3;
  background: #fbfcfd;
}
.favorite-manager-search:focus-within { border-color: #6ca1cf; box-shadow: 0 0 0 3px rgba(58,128,188,.1); }
.favorite-manager-search input {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #29465d;
  background: transparent;
  font-size: 9px;
}
.favorite-manager-catalog [data-favorite-catalog-list] > section { margin-bottom: 11px; }
.favorite-manager-catalog [data-favorite-catalog-list] > section > strong {
  display: block;
  margin-bottom: 5px;
  color: #7c8f9e;
  font-size: 8px;
}
.favorite-manager-catalog [data-favorite-catalog-list] > section > div {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 5px;
}
.favorite-manager-catalog [data-favorite-draft-add] {
  min-width: 0;
  min-height: 33px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid #e0e7ed;
  border-radius: 6px;
  color: #3c5b73;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 8px;
}
.favorite-manager-catalog [data-favorite-draft-add] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-manager-catalog [data-favorite-draft-add] svg { flex: 0 0 auto; color: #2a80be; }
.favorite-manager-catalog [data-favorite-draft-add]:hover:not(:disabled) { border-color: #9fc2dc; color: #1767a4; background: #f2f8fd; }
.favorite-manager-catalog [data-favorite-draft-add]:disabled { opacity: .45; cursor: default; }
.favorite-manager-empty {
  min-height: 170px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  color: #8ba0b0;
  text-align: center;
}
.favorite-manager-empty.compact { min-height: 110px; }
.favorite-manager-empty svg { margin-bottom: 3px; color: #78a5c9; }
.favorite-manager-empty strong { color: #49677d; font-size: 10px; }
.favorite-manager-empty span { font-size: 8px; }
.sidebar-favorite-manager > footer {
  min-height: 61px;
  padding: 11px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e2e9ef;
  color: #8192a0;
  background: #fbfcfd;
  font-size: 8px;
}
.sidebar-favorite-manager > footer > div { display: flex; gap: 7px; }

@media (min-width: 881px) {
  .sidebar.collapsed .nav-home-favorites .nav-home { padding: 6px; }
  .sidebar.collapsed .favorite-menu-toggle {
    right: 1px;
    top: auto;
    bottom: 1px;
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: none;
    pointer-events: none;
  }
  .sidebar.collapsed .nav-home-favorites:hover .favorite-menu-toggle,
  .sidebar.collapsed .favorite-menu-toggle:focus {
    opacity: .9;
    pointer-events: auto;
  }
}

@media (max-width: 880px) {
  .sidebar-favorites-panel { z-index: 65; }
  .sidebar-favorite-manager { max-height: calc(100dvh - 20px); }
  .sidebar-favorite-manager-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }
  .favorite-manager-selected,
  .favorite-manager-catalog { min-height: 285px; }
  .favorite-manager-selected { border-right: 0; border-bottom: 1px solid #e2e9ef; }
}

@media (max-width: 560px) {
  .sidebar-favorite-manager { width: calc(100vw - 16px); }
  .sidebar-favorite-manager > header { min-height: 74px; padding: 13px; }
  .sidebar-favorite-manager > header h3 { font-size: 15px; }
  .sidebar-favorite-manager-body { display: block; }
  .favorite-manager-selected,
  .favorite-manager-catalog { min-height: 260px; padding: 11px; }
  .favorite-manager-catalog [data-favorite-catalog-list] > section > div { grid-template-columns: 1fr; }
  .sidebar-favorite-manager > footer { align-items: stretch; flex-direction: column; }
  .sidebar-favorite-manager > footer > div { justify-content: flex-end; }
}

/* Historical data navigation: third-level flyout kept outside the scroll area. */
.nav-history-group { position: relative; min-width: 0; }
.submenu .nav-history-group-trigger {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border: 0;
  border-radius: 7px;
  color: #89a7a7;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}
.nav-history-group-trigger > span { min-width: 0; display: flex; align-items: center; gap: 7px; }
.nav-history-group-trigger svg { flex: 0 0 auto; opacity: .8; }
.nav-history-group-trigger i { color: #6c898b; font-size: 15px; font-style: normal; }
.nav-history-group:hover .nav-history-group-trigger,
.nav-history-group.open .nav-history-group-trigger,
.nav-history-group.active .nav-history-group-trigger {
  color: #fff;
  background: rgba(255,255,255,.055);
}
.nav-history-group.active .nav-history-group-trigger { color: #8cbdff; background: rgba(5,110,225,.16); }
.sidebar-history-panel {
  position: fixed;
  z-index: 64;
  width: min(224px,calc(100vw - 16px));
  overflow: hidden;
  border: 1px solid #d3e0ea;
  border-radius: 9px;
  color: #28465f;
  background: rgba(255,255,255,.99);
  box-shadow: 0 14px 38px rgba(4,22,40,.22);
  animation: sidebarFavoriteIn .14s ease-out;
}
.sidebar-history-panel > header {
  padding: 10px 12px 9px;
  border-bottom: 1px solid #e4ebf1;
  background: linear-gradient(135deg,#f7faff,#eff5fa);
}
.sidebar-history-panel > header span,
.sidebar-history-panel > header strong { display: block; }
.sidebar-history-panel > header span { color: #7290a8; font: 800 7px/1 Arial,sans-serif; letter-spacing: 1.2px; }
.sidebar-history-panel > header strong { margin-top: 5px; color: #23435e; font-size: 12px; }
.sidebar-history-panel > div { padding: 5px; }
.sidebar-history-panel [data-history-view] {
  width: 100%;
  min-height: 43px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  color: #31516a;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.sidebar-history-panel [data-history-view]:hover,
.sidebar-history-panel [data-history-view]:focus-visible { outline: 0; color: #1767a4; background: #edf5fc; }
.sidebar-history-panel [data-history-view].active { color: #165f9a; background: #e9f3fc; }
.sidebar-history-panel [data-history-view] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 750; }
.sidebar-history-panel [data-history-view] small { color: #8a9daa; font-size: 7px; }

/* Product import dialog, intentionally lightweight enough to open from the product list. */
.product-list-hero-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 7px; }
.product-import-backdrop { z-index: 134; }
.product-import-dialog {
  width: min(880px,calc(100vw - 28px));
  max-height: min(760px,calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8e3ec;
  border-radius: 12px;
  color: #29475e;
  background: #fff;
  box-shadow: 0 24px 70px rgba(4,25,45,.28);
}
.product-import-dialog > header,
.history-record-dialog > header,
.history-import-dialog > header {
  min-height: 78px;
  padding: 14px 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e9ef;
  background: linear-gradient(135deg,#f8fbff,#eef5fa);
}
.product-import-dialog > header span,
.history-record-dialog > header span,
.history-import-dialog > header span { color: #2475b5; font: 800 7px/1 Arial,sans-serif; letter-spacing: 1.35px; }
.product-import-dialog > header h3,
.history-record-dialog > header h3,
.history-import-dialog > header h3 { margin: 6px 0 3px; color: #203e57; font-size: 17px; }
.product-import-dialog > header p,
.history-record-dialog > header p,
.history-import-dialog > header p { margin: 0; color: #788c9d; font-size: 9px; line-height: 1.5; }
.product-import-dialog-body { min-height: 0; padding: 15px 17px; overflow: auto; }
.product-import-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.product-import-guide > div {
  min-width: 0;
  min-height: 66px;
  display: grid;
  grid-template-columns: 24px minmax(0,1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #dfe8ef;
  border-radius: 8px;
  color: #3475a4;
  background: #f9fbfd;
}
.product-import-guide > div:first-child { grid-template-columns: 24px minmax(0,1fr) auto; }
.product-import-guide span,
.product-import-guide strong,
.product-import-guide small { min-width: 0; display: block; }
.product-import-guide strong { color: #294a62; font-size: 10px; }
.product-import-guide small { margin-top: 3px; color: #8495a2; font-size: 8px; line-height: 1.45; }
.product-import-file,
.history-import-file {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px dashed #a9bfd1;
  border-radius: 9px;
  color: #39779e;
  background: #f8fbfd;
  cursor: pointer;
  text-align: left;
}
.product-import-file:hover,
.history-import-file:hover { border-color: #5f9cc7; background: #f2f8fc; }
.product-import-file.has-file,
.history-import-file.has-file { border-style: solid; border-color: #74a995; color: #28705b; background: #f2faf7; }
.product-import-file span,
.product-import-file strong,
.product-import-file small,
.history-import-file span,
.history-import-file strong,
.history-import-file small { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-import-file strong,
.history-import-file strong { color: #2e4e64; font-size: 10px; }
.product-import-file small,
.history-import-file small { margin-top: 4px; color: #8496a3; font-size: 8px; }
.product-import-file em,
.history-import-file em { color: #2b70a4; font-size: 9px; font-style: normal; font-weight: 750; }
.product-import-awaiting,
.product-import-result-note {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
  padding: 9px 11px;
  border: 1px solid #e0e8ee;
  border-radius: 8px;
  color: #6e8494;
  background: #fbfcfd;
}
.product-import-awaiting strong,
.product-import-awaiting span { display: block; }
.product-import-awaiting strong { color: #3d5c72; font-size: 9px; }
.product-import-awaiting span { margin-top: 3px; font-size: 8px; }
.product-import-result-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin-top: 11px; }
.product-import-result-summary article { padding: 9px 11px; border: 1px solid #e0e8ef; border-radius: 7px; background: #fbfcfd; }
.product-import-result-summary span,
.product-import-result-summary strong { display: block; }
.product-import-result-summary span { color: #8193a0; font-size: 8px; }
.product-import-result-summary strong { margin-top: 3px; color: #2d536b; font-size: 15px; }
.product-import-result.has-errors .product-import-result-summary article:last-child strong { color: #be4650; }
.product-import-result.ready .product-import-result-note { border-color: #cde4d9; color: #33725f; background: #f3faf7; }
.product-import-error-scroll { max-height: 220px; margin-top: 8px; border: 1px solid #e2e8ed; border-radius: 7px; }
.product-import-error-scroll th,
.product-import-error-scroll td { padding: 7px 8px; font-size: 8px; }
.product-import-dialog > footer,
.history-record-dialog > footer,
.history-import-dialog > footer {
  min-height: 58px;
  padding: 10px 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e1e8ee;
  color: #7e909e;
  background: #fbfcfd;
  font-size: 8px;
}
.product-import-dialog > footer > div,
.history-record-dialog > footer > div { display: flex; gap: 7px; }

/* Four standalone historical ledgers. */
.history-archive-page { display: grid; gap: 8px; min-width: 0; }
.history-archive-filter {
  position: sticky;
  top: 0;
  z-index: 17;
  padding: 9px 10px;
  border-color: #d9e3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.history-archive-filter form {
  display: grid;
  grid-template-columns: 126px 126px minmax(140px,.85fr) minmax(160px,1fr) minmax(200px,1.2fr) auto auto;
  align-items: end;
  gap: 7px;
}
.history-archive-filter label { min-width: 0; display: grid; gap: 4px; }
.history-archive-filter label > span { color: #667c8d; font-size: 8px; font-weight: 750; }
.history-archive-filter input {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d4dee6;
  border-radius: 5px;
  color: #2d4b60;
  background: #fff;
  outline: 0;
  font-size: 9px;
}
.history-archive-filter input:focus { border-color: #72a3c8; box-shadow: 0 0 0 2px rgba(53,127,181,.09); }
.history-archive-filter form > .btn { min-height: 32px; height: 32px; }
.history-archive-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #edf1f4; }
.history-archive-actions .btn { min-height: 30px; height: 30px; padding: 0 9px; }
.history-archive-isolation-note { display: flex; align-items: center; gap: 6px; margin-top: 7px; color: #78909f; font-size: 8px; }
.history-archive-isolation-note svg { flex: 0 0 auto; color: #397ca8; }
.history-archive-table-panel { min-width: 0; overflow: hidden; border-radius: 8px; }
.history-archive-table { min-width: 1560px; }
.history-archive-table th,
.history-archive-table td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-archive-table th { background: #f4f7f9; }
.history-archive-table .history-select-column { width: 44px; min-width: 44px; max-width: 44px; text-align: center; }
.history-archive-table input[type="checkbox"] { width: 14px; height: 14px; margin: 0; vertical-align: middle; }
.history-archive-row.selected td { background: #edf6fd; }
.history-archive-row:hover td { background: #f7fafc; }
.history-archive-row.selected:hover td { background: #e7f2fb; }
.history-archive-foot { align-items: center; }
.history-archive-foot > div { display: flex; gap: 6px; }
.history-record-backdrop,
.history-import-backdrop { z-index: 134; }
.history-record-dialog {
  width: min(940px,calc(100vw - 28px));
  max-height: min(760px,calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8e3ec;
  border-radius: 12px;
  color: #29475e;
  background: #fff;
  box-shadow: 0 24px 70px rgba(4,25,45,.28);
}
.history-record-grid {
  min-height: 0;
  padding: 15px 17px;
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  overflow: auto;
}
.history-record-grid label { min-width: 0; display: grid; gap: 5px; }
.history-record-grid label > span { color: #5d7485; font-size: 9px; font-weight: 750; }
.history-record-grid input,
.history-record-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid #d4dee6;
  border-radius: 6px;
  color: #29465b;
  background: #fff;
  outline: 0;
  font-size: 10px;
}
.history-record-grid input { height: 36px; }
.history-record-grid textarea { min-height: 70px; padding-top: 8px; resize: vertical; }
.history-record-grid input:focus,
.history-record-grid textarea:focus { border-color: #70a1c7; box-shadow: 0 0 0 3px rgba(57,127,181,.09); }
.history-record-grid .history-record-note { grid-column: span 2; }
.history-import-dialog {
  width: min(650px,calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8e3ec;
  border-radius: 12px;
  color: #29475e;
  background: #fff;
  box-shadow: 0 24px 70px rgba(4,25,45,.28);
}
.history-import-body { padding: 15px 17px; overflow: auto; }
.history-import-safety { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; padding: 10px 11px; border: 1px solid #d4e5dd; border-radius: 8px; color: #35715d; background: #f4faf7; }
.history-import-safety strong,
.history-import-safety span { display: block; }
.history-import-safety strong { font-size: 10px; }
.history-import-safety span { margin-top: 3px; color: #668778; font-size: 8px; }
.history-import-body > .btn { margin-bottom: 8px; }
.history-import-feedback { margin-top: 9px; padding: 8px 10px; border-radius: 6px; color: #778b99; background: #f5f7f9; font-size: 8px; line-height: 1.5; }
.history-import-feedback.ready { color: #2f6486; background: #edf6fc; }
.history-import-feedback.success { color: #2e715b; background: #edf8f3; }
.history-import-feedback.error { color: #b43f49; background: #fff0f1; }
.history-import-dialog > footer { justify-content: flex-end; }

@media (max-width: 1180px) {
  .history-archive-filter form { grid-template-columns: repeat(4,minmax(120px,1fr)); }
  .history-archive-filter .history-keyword-filter { grid-column: span 2; }
}
@media (max-width: 760px) {
  .product-import-guide { grid-template-columns: 1fr; }
  .product-import-guide > div:first-child { grid-template-columns: 24px minmax(0,1fr) auto; }
  .history-archive-filter { position: relative; }
  .history-archive-filter form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-archive-filter .history-keyword-filter { grid-column: 1 / -1; }
  .history-archive-filter form > .btn { width: 100%; }
  .history-record-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .product-list-hero-actions { flex-direction: column; }
  .product-import-dialog > footer,
  .history-record-dialog > footer { align-items: stretch; flex-direction: column; }
  .product-import-dialog > footer > div,
  .history-record-dialog > footer > div { justify-content: flex-end; }
  .product-import-file,
  .history-import-file { grid-template-columns: 28px minmax(0,1fr); }
  .product-import-file em,
  .history-import-file em { display: none; }
  .history-archive-filter form,
  .history-record-grid { grid-template-columns: 1fr; }
  .history-archive-filter .history-keyword-filter,
  .history-record-grid .history-record-note { grid-column: auto; }
}

/* Keep checkbox menus immune to the later compact-form label density rules. */
#content .compact-filter-bar .business-multi-filter-menu > label {
  align-items: center;
  display: flex;
  grid-template-rows: none;
}

#content .compact-filter-bar .business-multi-filter-menu > label > span {
  margin: 0;
}

#content .compact-filter-bar .business-multi-filter-menu input[type="checkbox"] {
  height: 15px;
  min-height: 15px;
  width: 15px;
}

/* Reusable one-line ledger layout, aligned with the historical ledgers. */
.business-list-page .business-data-table.flat-ledger-table {
  color: #344f62;
}

.business-list-page .business-data-table.flat-ledger-table th,
.business-list-page .business-data-table.flat-ledger-table td {
  max-width: 320px;
  overflow: hidden;
  padding: 7px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-list-page .business-data-table.flat-ledger-table th,
.business-list-page .business-data-table.flat-ledger-table th:first-child,
.business-list-page .business-data-table.flat-ledger-table th.sticky-actions {
  height: 40px;
  border-bottom-color: #dce4ea;
  color: #4a6273;
  background: #f4f7f9;
  box-shadow: none;
  font-size: 10px;
}

.business-list-page .business-data-table.flat-ledger-table td {
  height: 42px;
  border-bottom-color: #e7edf1;
  color: #3d5261;
  background: #fff;
  font-size: 11px;
}

.business-list-page .business-data-table.flat-ledger-table tbody tr:hover td,
.business-list-page .business-data-table.flat-ledger-table tbody tr:hover td:first-child,
.business-list-page .business-data-table.flat-ledger-table tbody tr:hover td.sticky-actions {
  background: #f7fafc;
}

.business-list-page .business-data-table.flat-ledger-table tbody tr.selected td,
.business-list-page .business-data-table.flat-ledger-table tbody tr.selected td:first-child,
.business-list-page .business-data-table.flat-ledger-table tbody tr.selected td.sticky-actions {
  background: #edf6fd;
}

.business-list-page .business-data-table.flat-ledger-table tbody tr.selected:hover td,
.business-list-page .business-data-table.flat-ledger-table tbody tr.selected:hover td:first-child,
.business-list-page .business-data-table.flat-ledger-table tbody tr.selected:hover td.sticky-actions {
  background: #e7f2fb;
}

.business-list-page .business-data-table.flat-ledger-table td.sticky-actions {
  overflow: visible;
}

.business-list-page .business-data-table.sales-tracking-table {
  min-width: 2524px !important;
}

.sales-tracking-table .sales-tracking-select-column {
  box-sizing: border-box;
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  padding-left: 10px;
  padding-right: 10px;
  text-align: center !important;
}

.sales-tracking-select-column input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #397fae;
  cursor: pointer;
  vertical-align: middle;
}

.sales-tracking-table th:nth-child(2) { min-width: 96px; }
.sales-tracking-table th:nth-child(3) { min-width: 68px; }
.sales-tracking-table th:nth-child(4) { min-width: 130px; }
.sales-tracking-table th:nth-child(5) { min-width: 170px; }
.sales-tracking-table th:nth-child(6) { min-width: 115px; }
.sales-tracking-table th:nth-child(7) { min-width: 135px; }
.sales-tracking-table th:nth-child(8) { min-width: 140px; }
.sales-tracking-table th:nth-child(9) { min-width: 150px; }
.sales-tracking-table th:nth-child(10) { min-width: 60px; }
.sales-tracking-table th:nth-child(11) { min-width: 78px; }
.sales-tracking-table th:nth-child(12) { min-width: 95px; }
.sales-tracking-table th:nth-child(13) { min-width: 68px; }
.sales-tracking-table th:nth-child(14) { min-width: 105px; }
.sales-tracking-table th:nth-child(15) { min-width: 145px; }
.sales-tracking-table th:nth-child(16) { min-width: 205px; }
.sales-tracking-table th:nth-child(17) { min-width: 100px; }
.sales-tracking-table th:nth-child(18) { min-width: 180px; }
.sales-tracking-table th:nth-child(19) { min-width: 150px; }
.sales-tracking-table th:nth-child(20) { min-width: 180px; }

.sales-tracking-status-text {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #496071;
  background: transparent;
  box-shadow: none;
  font-size: inherit;
  font-weight: 720;
  line-height: inherit;
}

.sales-tracking-status-text.unreviewed { color: #c43d4b; }
.sales-tracking-status-text.pending { color: #9b681b; }
.sales-tracking-status-text.progress { color: #2b719e; }
.sales-tracking-status-text.approved,
.sales-tracking-status-text.complete { color: #1c705c; }

.sales-tracking-inventory-text,
.sales-tracking-documents-text,
.sales-tracking-cost-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #50697a;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-tracking-inventory-text.complete { color: #26705d; }
.sales-tracking-inventory-text.pending { color: #657988; }

.sales-tracking-supply-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
  overflow: hidden;
  color: #5d7180;
  background: transparent;
  border: 0;
  white-space: nowrap;
}

.sales-tracking-supply-text strong {
  flex: 0 0 auto;
  color: inherit;
  font-size: inherit;
  font-weight: 720;
}

.sales-tracking-supply-text > span {
  min-width: 0;
  overflow: hidden;
  color: #718492;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-tracking-supply-text > em {
  flex: 0 0 auto;
  color: #b45c2f;
  font-size: inherit;
  font-style: normal;
  font-weight: 720;
}

.sales-tracking-supply-text.active { color: #2b7190; }
.sales-tracking-supply-text.complete { color: #24705c; }

.sales-tracking-selection-note {
  flex: 0 0 auto;
  color: #728695;
  font-size: 9px;
  white-space: nowrap;
}

/* Every result list uses the same restrained, single-line ledger language.
   Column widths are calculated by content; short semantic fields stay compact,
   while names/specifications/notes absorb spare viewport width. */
#content table.resizable-list-table.has-sized-column-widths,
#supplier-portal-content table.resizable-list-table.has-sized-column-widths {
  width: var(--erp-list-table-width) !important;
  min-width: var(--erp-list-table-width) !important;
  max-width: none !important;
  table-layout: fixed !important;
}

table.resizable-list-table.flat-ledger-table {
  border-collapse: separate;
  border-spacing: 0;
  color: #344f62;
}

table.resizable-list-table.flat-ledger-table > :is(thead,tbody,tfoot) > tr > :is(th,td) {
  box-sizing: border-box;
  max-width: none;
  overflow: hidden;
  padding: 7px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

table.resizable-list-table.flat-ledger-table > thead > tr > th,
table.resizable-list-table.flat-ledger-table > thead > tr > th:first-child,
table.resizable-list-table.flat-ledger-table > thead > tr > th.sticky-actions {
  height: 38px;
  border-bottom-color: #dce4ea;
  color: #4a6273;
  background: #f4f7f9;
  box-shadow: none;
  font-size: 10px;
}

table.resizable-list-table.flat-ledger-table > tbody > tr > td,
table.resizable-list-table.flat-ledger-table > tbody > tr > td:first-child,
table.resizable-list-table.flat-ledger-table > tbody > tr > td.sticky-actions {
  height: 40px;
  border-top-color: #e7edf1;
  color: #3d5261;
  background: #fff;
  font-size: 11px;
  vertical-align: middle;
}

table.resizable-list-table.flat-ledger-table > tbody > tr:hover > td,
table.resizable-list-table.flat-ledger-table > tbody > tr:hover > td:first-child,
table.resizable-list-table.flat-ledger-table > tbody > tr:hover > td.sticky-actions {
  background: #f7fafc;
}

table.resizable-list-table.flat-ledger-table > tbody > tr:is(.selected,.business-batch-selected,.shipment-print-selected) > td,
table.resizable-list-table.flat-ledger-table > tbody > tr.history-archive-row.selected > td {
  background: #edf6fd;
}

table.resizable-list-table.flat-ledger-table td > :is(
  .status,
  .approval-status,
  .complaint-status,
  .engineering-status,
  .eq-status,
  .inventory-cost-status,
  .procurement-status,
  .reimbursement-status,
  .report8d-status,
  .salary-status,
  .shipment-report-status,
  .supplier-evaluation-status,
  .supplier-portal-status,
  .system-user-status,
  .tax-status
) {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  line-height: inherit;
}

table.resizable-list-table.flat-ledger-table td.resizable-actions-column {
  overflow: hidden !important;
}

@media screen and (min-width: 881px) {
  .app-shell.workspace-density-compact #content table.resizable-list-table.flat-ledger-table > thead > tr > th {
    height: 30px;
    padding: 0 8px;
  }

  .app-shell.workspace-density-compact #content table.resizable-list-table.flat-ledger-table > tbody > tr > td {
    height: 34px;
    padding: 3px 8px;
  }
}

/* Unified page-filter chrome.
   Sales-detail tracking is the visual baseline; only query/filter surfaces opt
   in through the runtime marker, so forms, dialogs and print design stay
   untouched. Existing page-specific grids and responsive column layouts are
   intentionally preserved. */
:is(#content, #supplier-portal-content) .zg-unified-filter {
  --zg-filter-control-height: 34px;
  --zg-filter-control-background: #fbfdfc;
  --zg-filter-control-border: var(--line, #d7e2ef);
  --zg-filter-control-ink: var(--ink, #142b47);
  --zg-filter-label-ink: #4f6963;
  box-sizing: border-box;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  overflow: visible;
}

:is(#content, #supplier-portal-content) .zg-unified-filter,
:is(#content, #supplier-portal-content) .zg-unified-filter * {
  box-sizing: border-box;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .zg-unified-filter-field {
  min-width: 0;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .zg-unified-filter-field:is(label, .business-multi-filter) {
  grid-template-rows: auto var(--zg-filter-control-height);
}

:is(#content, #supplier-portal-content) .zg-unified-filter .zg-unified-filter-label {
  color: var(--zg-filter-label-ink);
  display: block;
  font-family: inherit;
  font-size: 10px;
  font-weight: 750;
  line-height: 15px;
  margin: 0 0 3px;
}

:is(#content, #supplier-portal-content) .zg-unified-filter :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not(.searchable-native-select),
  select:not(.searchable-native-select),
  .searchable-select-input
) {
  background-color: var(--zg-filter-control-background);
  border: 1px solid var(--zg-filter-control-border);
  border-radius: 8px;
  box-shadow: none;
  color: var(--zg-filter-control-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  height: var(--zg-filter-control-height);
  line-height: normal;
  margin: 0;
  max-width: 100%;
  min-height: var(--zg-filter-control-height);
  min-inline-size: 0;
  outline: 0;
  padding: 0 10px;
  width: 100%;
}

:is(#content, #supplier-portal-content) .zg-unified-filter :where(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not(.searchable-native-select),
  select:not(.searchable-native-select),
  .searchable-select-input
):focus {
  background-color: #fff;
  border-color: var(--accent, #2f6cff);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12);
}

:is(#content, #supplier-portal-content) .zg-unified-filter :where(
  input:not([type="checkbox"]):not([type="radio"]),
  .searchable-select-input
)::placeholder {
  color: #97a6b5;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  opacity: 1;
}

:is(#content, #supplier-portal-content) .zg-unified-filter input:is(
  [type="date"], [type="datetime-local"], [type="month"], [type="time"]
) {
  font-variant-numeric: tabular-nums;
  padding-left: 7px;
  padding-right: 5px;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .searchable-select {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .searchable-select-input {
  padding-left: 10px !important;
  padding-right: 30px !important;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .searchable-select.searchable-select-flat > .searchable-select-input {
  background-color: var(--zg-filter-control-background) !important;
  border-color: var(--zg-filter-control-border) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .searchable-select.searchable-select-flat > .searchable-select-input:focus,
:is(#content, #supplier-portal-content) .zg-unified-filter .searchable-select.searchable-select-flat.open > .searchable-select-input,
:is(#content, #supplier-portal-content) .zg-unified-filter .searchable-select.open > .searchable-select-input {
  background-color: #fff !important;
  border-color: var(--accent, #2f6cff) !important;
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12) !important;
}

:is(#content, #supplier-portal-content) .zg-unified-filter :where(
  .business-multi-filter summary,
  .inventory-warehouse-filter summary
) {
  align-items: center;
  background: var(--zg-filter-control-background);
  border: 1px solid var(--zg-filter-control-border);
  border-radius: 8px;
  box-shadow: none;
  color: var(--zg-filter-control-ink);
  display: flex;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  gap: 7px;
  height: var(--zg-filter-control-height);
  line-height: normal;
  min-height: var(--zg-filter-control-height);
  min-width: 0;
  outline: 0;
  padding: 0 10px;
}

:is(#content, #supplier-portal-content) .zg-unified-filter :where(
  .business-multi-filter summary > strong,
  .business-multi-filter summary > span:first-child,
  .inventory-warehouse-filter summary > strong
) {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  line-height: normal;
}

:is(#content, #supplier-portal-content) .zg-unified-filter :where(
  .business-multi-filter details[open] summary,
  .inventory-warehouse-filter[open] summary
) {
  background: #fff;
  border-color: var(--accent, #2f6cff);
  box-shadow: 0 0 0 3px rgba(47, 108, 255, .12);
}

:is(#content, #supplier-portal-content) .zg-unified-filter .search-box {
  max-width: 100%;
  min-width: 0;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .search-box input {
  padding-left: 36px;
}

:is(#content, #supplier-portal-content) .zg-unified-filter .search-box svg {
  top: 50%;
  transform: translateY(-50%);
}

:is(#content, #supplier-portal-content) .zg-unified-filter .btn {
  border-radius: 8px;
  font-family: inherit;
  height: var(--zg-filter-control-height);
  min-height: var(--zg-filter-control-height);
  white-space: nowrap;
}

@media screen and (min-width: 881px) {
  :is(#content, #supplier-portal-content) .zg-unified-filter {
    --zg-filter-control-height: 32px;
  }
}

@media screen and (max-width: 760px) {
  :is(#content, #supplier-portal-content) .zg-unified-filter {
    --zg-filter-control-height: 40px;
  }

  :is(#content, #supplier-portal-content) .zg-unified-filter :where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="color"]):not([type="range"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not(.searchable-native-select),
    select:not(.searchable-native-select),
    .searchable-select-input,
    .business-multi-filter summary,
    .inventory-warehouse-filter summary
  ) {
    font-size: 16px;
  }
}

/* Operating dashboard: compact KPIs with external quick-access workspace. */
.dashboard-summary-grid {
  min-width: 0;
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(460px,.9fr) minmax(560px,1.1fr);
  align-items: stretch;
  gap: 14px;
}

.dashboard-summary-grid .dashboard-kpi-compact {
  min-width: 0;
  margin: 0;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}

.dashboard-kpi-compact .kpi-card {
  min-height: 78px;
  padding: 12px 14px;
  gap: 11px;
}

.dashboard-kpi-compact .kpi-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.dashboard-kpi-compact .kpi-copy strong {
  font-size: 20px;
}

.dashboard-access-panel {
  min-width: 0;
  min-height: 166px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 1px minmax(0,1fr);
  gap: 12px;
  overflow: hidden;
}

.dashboard-access-section {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-access-divider {
  width: 1px;
  height: 100%;
  background: #e7edf4;
}

.dashboard-access-head {
  min-height: 34px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-access-head strong,
.dashboard-access-head span {
  display: block;
}

.dashboard-access-head strong {
  color: #203b56;
  font-size: 12px;
}

.dashboard-access-head span {
  margin-top: 2px;
  color: #8a9bae;
  font-size: 8px;
}

.dashboard-access-head button {
  padding: 3px 6px;
  border: 0;
  border-radius: 5px;
  color: #3574ad;
  background: #eef6fd;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.dashboard-access-head button:hover {
  color: #075fad;
  background: #e1f0fc;
}

.dashboard-access-list {
  min-height: 0;
  max-height: 112px;
  display: grid;
  gap: 4px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ccd9e6 transparent;
}

.dashboard-access-link {
  min-width: 0;
  min-height: 34px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 25px minmax(0,1fr) 14px;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #29455f;
  background: #f7fafe;
  text-decoration: none;
}

.dashboard-access-link:hover {
  border-color: #d9e7f5;
  color: #1766ad;
  background: #eef6fd;
}

.dashboard-access-link > i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #2878c2;
  background: #e4f0fc;
  font-style: normal;
}

.dashboard-access-link.is-platform > i {
  color: #167f75;
  background: #e4f4f1;
}

.dashboard-access-link > span {
  min-width: 0;
}

.dashboard-access-link strong,
.dashboard-access-link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-access-link strong {
  font-size: 9px;
}

.dashboard-access-link small {
  margin-top: 2px;
  color: #8999a8;
  font-size: 7px;
}

.dashboard-access-link > em {
  display: grid;
  place-items: center;
  color: #9babb9;
  font-style: normal;
}

.dashboard-access-empty {
  min-height: 70px;
  display: grid;
  place-items: center;
  border: 1px dashed #dce5ed;
  border-radius: 7px;
  color: #97a6b4;
  background: #fbfcfd;
  font-size: 8px;
}

@media (max-width: 1100px) {
  .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-access-panel {
    min-height: 154px;
  }
}

@media (max-width: 680px) {
  .dashboard-summary-grid .dashboard-kpi-compact,
  .dashboard-access-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-access-divider {
    width: 100%;
    height: 1px;
  }

  .dashboard-access-list {
    max-height: none;
  }
}

/* CRM customer platform & shared external link editor */
.customer-platform-page {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.customer-platform-filter {
  display: grid;
  grid-template-columns: minmax(220px,.7fr) minmax(320px,1.35fr) auto auto;
  gap: 9px;
  align-items: end;
  margin: 0;
  padding: 10px 12px;
}

.customer-platform-filter > label {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.customer-platform-filter > label > span {
  color: #5f7289;
  font-size: 9px;
  font-weight: 750;
}

.customer-platform-filter :is(input,select,.searchable-select-input) {
  height: 34px;
  min-height: 34px;
}

.customer-platform-filter-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.customer-platform-filter-actions .btn,
.customer-platform-add {
  height: 34px;
  min-height: 34px;
  white-space: nowrap;
}

.customer-platform-add { justify-self: end; }
.customer-platform-list { margin: 0; min-width: 0; }
.customer-platform-table { min-width: 1220px; }
.customer-platform-table th:nth-child(1) { width: 58px; }
.customer-platform-table th:nth-child(2) { min-width: 190px; }
.customer-platform-table th:nth-child(3) { min-width: 270px; }
.customer-platform-table th:nth-child(4) { min-width: 150px; }
.customer-platform-table th:nth-child(5) { min-width: 150px; }
.customer-platform-table th:nth-child(6) { min-width: 210px; }
.customer-platform-table th:nth-child(7) { min-width: 156px; }
.customer-platform-table th:nth-child(8) { min-width: 112px; }

.customer-platform-url {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  overflow: hidden;
  color: #246ca6;
  text-decoration: none;
  vertical-align: middle;
}

.customer-platform-url span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-platform-url svg { flex: 0 0 auto; }
.customer-platform-url:hover span { text-decoration: underline; }

.customer-platform-secret {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
}

.customer-platform-secret code {
  max-width: 105px;
  overflow: hidden;
  color: #415b6e;
  font: 650 11px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-platform-secret button,
.link-record-password-input button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  color: #3174aa;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
}

.customer-platform-secret button:hover,
.link-record-password-input button:hover { color: #135d98; text-decoration: underline; }

.customer-platform-secret button[hidden] { display: none; }

/* 委外加工 / 钢网管理：紧凑列表与居中统一弹窗 */
.stencil-management-page {
  width: 100%;
  min-width: 0;
}

.stencil-filter {
  display: grid;
  grid-template-columns: minmax(220px,.85fr) minmax(360px,1.55fr) auto auto;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  position: relative;
  z-index: 12;
}

.stencil-filter > label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #536b7d;
  font-size: 10px;
  font-weight: 700;
}

.stencil-filter :is(input,select,.searchable-select-input) {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid #d5e0e8;
  border-radius: 7px;
  color: #29455c;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
}

.stencil-filter-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stencil-filter-actions .btn,
.stencil-add {
  min-width: 76px;
  height: 36px;
  white-space: nowrap;
}

.stencil-add { justify-self: end; }

.stencil-list-panel {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.stencil-table {
  min-width: 1360px;
  table-layout: fixed;
  width: 100%;
}

.stencil-table th,
.stencil-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stencil-table th:nth-child(1) { width: 126px; }
.stencil-table th:nth-child(2) { width: 150px; }
.stencil-table th:nth-child(3) { width: 160px; }
.stencil-table th:nth-child(4) { width: 180px; }
.stencil-table th:nth-child(5) { width: 150px; }
.stencil-table th:nth-child(6) { width: 180px; }
.stencil-table th:nth-child(7) { width: 195px; }
.stencil-table th:nth-child(8) { width: 180px; }
.stencil-table th:nth-child(9) { width: 118px; }

.stencil-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: #2d73a8;
  text-decoration: none;
}

.stencil-file-link svg { flex: 0 0 auto; }
.stencil-file-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stencil-file-link:hover span { text-decoration: underline; }

.stencil-dialog { width: min(900px,calc(100vw - 32px)); }
.stencil-dialog-body { background: #fbfcfd; }
.stencil-form-grid > .full { grid-column: 1 / -1; }

.stencil-product-preview {
  min-width: 0;
  border: 1px solid #dce5ed;
  border-radius: 9px;
  background: #f6f9fb;
  overflow: hidden;
}

.stencil-product-empty {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px;
  color: #8495a2;
  font-size: 10px;
}

.stencil-product-preview-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
}

.stencil-product-preview-grid > div {
  min-width: 0;
  min-height: 68px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 11px 13px;
  border-right: 1px solid #e2e9ef;
  border-bottom: 1px solid #e2e9ef;
}

.stencil-product-preview-grid > div:nth-child(3n) { border-right: 0; }
.stencil-product-preview-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.stencil-product-preview-grid span { color: #7b8f9e; font-size: 9px; }
.stencil-product-preview-grid strong {
  overflow: hidden;
  color: #29485f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stencil-upload-field { position: relative; }
.stencil-upload-zone {
  width: 100%;
  min-height: 94px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px dashed #aebfcd;
  border-radius: 9px;
  color: #526d81;
  background: #f8fbfd;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .15s ease,background .15s ease,box-shadow .15s ease;
}

.stencil-upload-zone:hover,
.stencil-upload-zone.is-dragover {
  border-color: #438bc0;
  background: #edf6fc;
  box-shadow: 0 0 0 3px rgba(60,137,190,.1);
}

.stencil-upload-zone > i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #337bab;
  background: #e7f1f8;
  font-style: normal;
}

.stencil-upload-zone > span { min-width: 0; display: grid; gap: 4px; }
.stencil-upload-zone > span strong,
.stencil-upload-zone > span small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stencil-upload-zone > span strong { color: #31536b; font-size: 11px; }
.stencil-upload-zone > span small { color: #8395a2; font-size: 9px; }
.stencil-upload-zone > em {
  color: #2f78ad;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}
.stencil-upload-zone.has-file { border-style: solid; border-color: #bfd5c9; background: #f4faf7; }
.stencil-upload-zone.has-file > i { color: #24765d; background: #e3f2eb; }

.stencil-existing-file {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #3479aa;
  font-size: 9px;
  text-decoration: none;
}
.stencil-existing-file:hover { text-decoration: underline; }

.stencil-detail-body { display: grid; gap: 15px; background: #fbfcfd; }
.stencil-detail-section {
  display: grid;
  grid-template-columns: minmax(220px,.75fr) minmax(320px,1.25fr);
  gap: 12px;
}
.stencil-detail-section > div {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid #dde6ed;
  border-radius: 9px;
  background: #fff;
}
.stencil-detail-section > div > span { color: #7a8d9c; font-size: 9px; }
.stencil-detail-section > div > strong { color: #2b4b62; font-size: 11px; }
.stencil-detail-file a {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr);
  align-items: center;
  gap: 1px 9px;
  color: #2d73a8;
  text-decoration: none;
}
.stencil-detail-file a svg { grid-row: 1 / 3; }
.stencil-detail-file a strong,
.stencil-detail-file a small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stencil-detail-file a small { color: #8797a3; font-size: 9px; }
.stencil-detail-file a:hover strong { text-decoration: underline; }

@media (max-width: 980px) {
  .stencil-filter { grid-template-columns: minmax(190px,.8fr) minmax(280px,1.2fr) auto; }
  .stencil-add { grid-column: 3; grid-row: 1; }
  .stencil-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 680px) {
  .stencil-filter { grid-template-columns: minmax(0,1fr); }
  .stencil-filter > *,
  .stencil-filter-actions,
  .stencil-add { grid-column: auto; grid-row: auto; }
  .stencil-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .stencil-add { width: 100%; }
  .stencil-product-preview-grid { grid-template-columns: minmax(0,1fr); }
  .stencil-product-preview-grid > div,
  .stencil-product-preview-grid > div:nth-child(3n),
  .stencil-product-preview-grid > div:nth-last-child(-n+3) { border-right: 0; border-bottom: 1px solid #e2e9ef; }
  .stencil-product-preview-grid > div:last-child { border-bottom: 0; }
  .stencil-detail-section { grid-template-columns: minmax(0,1fr); }
  .stencil-upload-zone { grid-template-columns: 38px minmax(0,1fr); }
  .stencil-upload-zone > em { grid-column: 2; }
}

.link-record-modal-backdrop {
  z-index: 135;
  padding: 16px;
}

.link-record-dialog {
  width: min(820px,calc(100vw - 32px));
  max-height: min(760px,calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d7e1ea;
  border-radius: 12px;
  color: #29455c;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8,30,49,.27);
}

.link-record-dialog-head {
  min-height: 94px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px 15px;
  border-bottom: 1px solid #dfe7ee;
  background: linear-gradient(135deg,#f8fbfe,#eef5fb);
}

.link-record-dialog-head > div { min-width: 0; }
.link-record-dialog-head span {
  display: block;
  color: #347caf;
  font: 800 8px/1 Arial,sans-serif;
  letter-spacing: 1.25px;
}

.link-record-dialog-head h3 {
  margin: 6px 0 4px;
  color: #1f3e57;
  font-size: 18px;
}

.link-record-dialog-head p {
  margin: 0;
  color: #748a9b;
  font-size: 10px;
  line-height: 1.55;
}

.link-record-dialog-body {
  min-height: 0;
  padding: 18px 20px 20px;
  overflow: auto;
}

.link-record-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 15px 16px;
}

.link-record-field {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  margin: 0;
}

.link-record-field.full { grid-column: 1 / -1; }
.link-record-field > span {
  color: #445f73;
  font-size: 11px;
  font-weight: 750;
}
.link-record-field > span em { color: #c74a53; font-style: normal; }
.link-record-field > small { color: #8596a3; font-size: 9px; line-height: 1.45; }

.link-record-field :is(input,select,textarea,.searchable-select-input) {
  width: 100%;
  min-width: 0;
  border: 1px solid #ccd8e2;
  border-radius: 7px;
  color: #263f52;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.link-record-field :is(input,select,.searchable-select-input) {
  height: 38px;
  min-height: 38px;
  padding: 0 10px;
}

.link-record-field textarea { min-height: 84px; padding: 9px 10px; resize: vertical; }
.link-record-field :is(input,select,textarea,.searchable-select-input):focus {
  border-color: #4c91c5;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(58,134,190,.12);
}

.link-record-field.link-record-toggle {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 18px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #dce5ed;
  border-radius: 8px;
  background: #f8fbfd;
  cursor: pointer;
}

.link-record-field.link-record-toggle > input {
  width: 17px;
  height: 17px;
  min-height: 0;
  padding: 0;
  accent-color: #347caf;
}

.link-record-field.link-record-toggle > span strong,
.link-record-field.link-record-toggle > span small {
  display: block;
}

.link-record-field.link-record-toggle > span strong {
  color: #35566f;
  font-size: 10px;
}

.link-record-field.link-record-toggle > span small {
  margin-top: 3px;
  color: #8596a3;
  font-size: 8px;
  line-height: 1.45;
}

.link-record-url-input,
.link-record-password-input {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}

.link-record-url-input > svg {
  position: absolute;
  left: 10px;
  z-index: 1;
  color: #6d8ba2;
  pointer-events: none;
}

.link-record-url-input > input { padding-left: 34px; }
.link-record-password-input > input { padding-right: 54px; }
.link-record-password-input > button {
  position: absolute;
  right: 11px;
}

.link-record-dialog-foot {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 20px;
  border-top: 1px solid #dfe7ee;
  color: #7d8e9b;
  background: #fafbfd;
  font-size: 9px;
}

.link-record-dialog-foot > div { display: flex; gap: 8px; }

@media (max-width: 960px) {
  .customer-platform-filter {
    grid-template-columns: minmax(190px,.8fr) minmax(250px,1.2fr) auto;
  }
  .customer-platform-add { grid-column: 3; grid-row: 1; }
  .customer-platform-filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

@media (max-width: 680px) {
  .customer-platform-filter { grid-template-columns: minmax(0,1fr); }
  .customer-platform-filter > *,
  .customer-platform-add,
  .customer-platform-filter-actions { grid-column: auto; grid-row: auto; }
  .customer-platform-add { width: 100%; }
  .customer-platform-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .link-record-form-grid { grid-template-columns: minmax(0,1fr); }
  .link-record-field.full { grid-column: auto; }
  .link-record-dialog-head { min-height: 82px; padding: 14px 15px; }
  .link-record-dialog-body { padding: 15px; }
  .link-record-dialog-foot { align-items: stretch; flex-direction: column; padding: 10px 15px; }
  .link-record-dialog-foot > div { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Unified right-side drawers: share the calm link-record dialog language without
   changing centered modal dialogs, print previews, or designer surfaces. */
.drawer-backdrop:not(.modal-layer) {
  padding: 12px;
  background: rgba(8,30,49,.43);
  backdrop-filter: blur(3px);
}

.drawer-backdrop:not(.modal-layer) > .drawer {
  inset: 12px 12px 12px auto;
  height: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: hidden;
  border: 1px solid #d7e1ea;
  border-radius: 12px;
  color: #29455c;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8,30,49,.27);
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head {
  min-height: 82px;
  flex: 0 0 auto;
  gap: 18px;
  padding: 15px 20px;
  border-bottom: 1px solid #dfe7ee;
  background: linear-gradient(135deg,#f8fbfe,#eef5fb);
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head > div {
  min-width: 0;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head strong {
  overflow: hidden;
  color: #1f3e57;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head span,
.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head small {
  display: block;
  margin-top: 0;
  overflow: hidden;
  color: #748a9b;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head strong + span,
.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head strong + small {
  margin-top: 4px;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head .icon-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #d9e3eb;
  border-radius: 8px;
  color: #647d90;
  background: rgba(255,255,255,.78);
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head .icon-button:hover {
  border-color: #bfd1df;
  color: #1f5f8e;
  background: #fff;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-body {
  min-height: 0;
  scrollbar-color: #b7c7d4 transparent;
  scrollbar-width: thin;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-foot {
  min-height: 60px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  padding: 11px 20px;
  border-top: 1px solid #dfe7ee;
  color: #7d8e9b;
  background: #fafbfd;
  font-size: 9px;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-foot > span {
  min-width: 0;
  margin-right: auto;
  line-height: 1.5;
}

.drawer-backdrop:not(.modal-layer) > .drawer > .drawer-foot > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.drawer-backdrop:not(.modal-layer) > .drawer .field :is(input,select,textarea):focus {
  border-color: #4c91c5;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(58,134,190,.12);
}

@media (max-width: 680px) {
  .drawer-backdrop:not(.modal-layer) { padding: 0; }
  .drawer-backdrop:not(.modal-layer) > .drawer {
    inset: 0;
    width: 100vw;
    max-width: none;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }
  .drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head {
    min-height: 72px;
    padding: 12px 15px;
  }
  .drawer-backdrop:not(.modal-layer) > .drawer > .drawer-head strong { font-size: 16px; }
  .drawer-backdrop:not(.modal-layer) > .drawer > .drawer-foot {
    padding: 10px 15px;
  }
}

/* Fluid list audit — every safe result ledger consumes the right workspace.
   Runtime classes are only applied to top-level list tables outside forms,
   drawers and the print designer, so editors retain their deliberate width. */
#content.workspace-fluid-list,
#content > .workspace-fluid-list {
  align-self: stretch;
  box-sizing: border-box;
  margin-inline: 0 !important;
  max-width: none !important;
  min-width: 0;
  width: 100%;
}

#content.workspace-fluid-list > :where(.page-toolbar,.panel,.table-panel,.consistency-table-panel),
#content > .workspace-fluid-list > :where(.page-toolbar,.panel,.table-panel,.consistency-table-panel),
#content .workspace-fluid-panel {
  box-sizing: border-box;
  margin-left: 0;
  margin-right: 0;
  max-width: none !important;
  min-width: 0;
  width: 100%;
}

#content .workspace-fluid-panel > :is(.table-scroll,.consistency-table-scroll),
#content .workspace-fluid-panel :is(.table-scroll,.consistency-table-scroll) {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

#content .workspace-fluid-panel table.resizable-list-table.has-sized-column-widths {
  max-width: none !important;
}

/* Global cross-module quick search. Keep the same quiet blue language as the
   shared link editor while making the five destinations equally scannable. */
.global-quick-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #cbdbe8;
  border-radius: 7px;
  color: #245679;
  background: #f5faff;
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.top-actions .global-quick-search-trigger { display: inline-flex; }

.global-quick-search-trigger:hover,
.global-quick-search-trigger:focus-visible {
  border-color: #9dc5e3;
  color: #095c99;
  background: #eaf5ff;
  outline: 0;
}

.global-quick-search-trigger svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.global-quick-search-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
  background: rgba(8,30,49,.45);
  backdrop-filter: blur(4px);
}

.global-quick-search-modal[hidden] { display: none !important; }

.global-quick-search-panel {
  box-sizing: border-box;
  width: min(900px,100%);
  max-height: min(720px,calc(100vh - 36px));
  overflow: visible;
  border: 1px solid #d7e1ea;
  border-radius: 12px;
  color: #29455c;
  background: #fff;
  box-shadow: 0 26px 76px rgba(8,30,49,.28);
}

.global-quick-search-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 21px;
  border-bottom: 1px solid #dfe7ee;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg,#f8fbfe,#eef5fb);
}

.global-quick-search-header > div { min-width: 0; }
.global-quick-search-header > div > span {
  display: block;
  margin-bottom: 5px;
  color: #347caf;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}
.global-quick-search-header h2,
.global-quick-search-header h3 {
  margin: 0;
  color: #1f3e57;
  font-size: 18px;
  line-height: 1.3;
}

.global-quick-search-header p {
  margin: 5px 0 0;
  color: #748a9b;
  font-size: 10px;
  line-height: 1.5;
}

.global-quick-search-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #d9e3eb;
  border-radius: 8px;
  color: #647d90;
  background: rgba(255,255,255,.8);
  cursor: pointer;
}

.global-quick-search-close:hover,
.global-quick-search-close:focus-visible {
  border-color: #bfd1df;
  color: #1f5f8e;
  background: #fff;
  outline: 0;
}

.global-quick-search-filters {
  display: grid;
  grid-template-columns: minmax(235px,1.15fr) minmax(185px,1fr) minmax(185px,1fr);
  gap: 13px;
  align-items: end;
  padding: 20px 21px 17px;
}

.global-quick-search-filters > label,
.global-quick-search-filters > div {
  min-width: 0;
}

.global-quick-search-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #5f7289;
  font-size: 10px;
  font-weight: 750;
}

.global-quick-search-filters :is(input,select,.searchable-select-input) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #ccd7e2;
  border-radius: 6px;
  color: #29455c;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  outline: 0;
}

.global-quick-search-filters :is(input,select,.searchable-select-input):focus {
  border-color: #4c91c5;
  box-shadow: 0 0 0 3px rgba(58,134,190,.12);
}

.global-quick-search-modal .searchable-select { width: 100%; min-width: 0; }
.global-quick-search-modal .searchable-select-menu { z-index: 260; }

.global-quick-search-date-range > div {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 6px;
}

.global-quick-search-date-range > div > em {
  color: #8a9bad;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.global-quick-search-filters > label:nth-child(2) { position: relative; }
.global-quick-search-suggestions {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  right: 0;
  z-index: 2;
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #ccd9e5;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(8,30,49,.18);
}

.global-quick-search-suggestions[hidden] { display: none !important; }
.global-quick-search-suggestions button {
  box-sizing: border-box;
  width: 100%;
  display: block;
  min-height: 37px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  color: #29455c;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
}

.global-quick-search-suggestions button:hover,
.global-quick-search-suggestions button:focus-visible {
  color: #075ebc;
  background: #edf5ff;
  outline: 0;
}

.global-quick-search-actions {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 8px;
  padding: 15px 21px 20px;
  border-top: 1px solid #edf1f5;
  border-radius: 0 0 12px 12px;
  background: #fafbfd;
}

.global-quick-search-actions > button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 7px;
  white-space: nowrap;
  font-size: 11px;
}

.global-quick-search-note {
  margin: 0;
  padding: 0 21px 15px;
  border-radius: 0 0 12px 12px;
  color: #8493a2;
  background: #fafbfd;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

@media (max-width: 760px) {
  .global-quick-search-panel { max-height: calc(100vh - 24px); }
  .global-quick-search-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .global-quick-search-filters > :last-child { grid-column: 1 / -1; }
  .global-quick-search-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .global-quick-search-actions > button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .global-quick-search-trigger { width: 34px; padding: 0; }
  .global-quick-search-trigger > span { display: none; }
  .global-quick-search-modal { padding: 10px; }
  .global-quick-search-panel { max-height: calc(100vh - 20px); overflow-y: auto; }
  .global-quick-search-header { min-height: 74px; padding: 13px 14px; }
  .global-quick-search-header h2,
  .global-quick-search-header h3 { font-size: 16px; }
  .global-quick-search-filters { grid-template-columns: minmax(0,1fr); gap: 11px; padding: 15px 14px; }
  .global-quick-search-filters > :last-child { grid-column: auto; }
  .global-quick-search-actions { gap: 7px; padding: 12px 14px 15px; }
  .global-quick-search-note { padding: 0 14px 12px; text-align: left; }
}
