:root {
  --bg: #dce3ea;
  --panel: #ffffff;
  --ink: #1a2430;
  --muted: #5a6a7a;
  --line: #b8c4d0;
  --primary: #1e4d7b;
  --primary-strong: #163a5c;
  --accent: #b45f3c;
  --green: #1f7a4d;
  --red: #b42318;
  --warn: #b45309;
  --nav-heading: #9fb6c8;
  --nav-subheading: #7f98aa;
  --radius: 2px;
  --head: #d7e3ef;
  --chrome: #1c2b3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--chrome);
  color: #d7e0e8;
  padding: 10px 0 20px;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  border-right: 1px solid #121b24;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 14px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid #2a3c4d;
}

.brand-mark {
  width: 56px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: transparent;
  padding: 0;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  color: #f3f6f9;
}

.brand span {
  display: block;
  color: #8ea0b0;
  font-size: 11px;
  margin-top: 1px;
}

.nav-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #c5d0db;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  margin: 0;
  font-size: 13px;
  border-left: 3px solid transparent;
}

.nav-button:hover {
  background: #243646;
  color: #fff;
}

.nav-button.active {
  background: #0e4a7a;
  color: #fff;
  font-weight: 700;
  border-left-color: #7eb6e8;
}

.nav-icon {
  width: 18px;
  text-align: center;
  color: #8ea0b0;
  font-size: 11px;
}

.nav-button.active .nav-icon {
  color: #fff;
}

.nav-group {
  margin-top: 8px;
  padding-top: 4px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 4px;
  color: var(--nav-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group-title .nav-icon {
  display: none;
}

.nav-child {
  padding-left: 18px;
}

.nav-subhead {
  padding: 8px 14px 2px 18px;
  color: var(--nav-subheading);
  font-size: 11px;
  font-weight: 700;
}

.main {
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}

.topbar {
  min-height: 42px;
  background: #f2f5f8;
  border-bottom: 2px solid var(--primary);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 8;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 0 0 auto;
}

.top-module-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-module-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.top-module-button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #445468;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 0;
}

.top-module-button:hover {
  background: #e6edf4;
  color: var(--primary);
}

.top-module-button.active {
  background: #e1ebf4;
  color: var(--primary);
  border-bottom-color: var(--primary);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

#pageSubtitle,
.lang-label,
#userLabel {
  display: none;
}

#currentUserName {
  font-weight: 500;
  color: var(--ink);
}

#logoutButton.secondary {
  background: transparent;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.demo-badge.hidden {
  display: none;
}

body.demo-mode .topbar {
  border-bottom-color: #c2410c;
}

.lang-switch {
  min-width: 108px;
}

.user-box select,
.field input,
.field select,
.field textarea,
.toolbar input,
.toolbar select,
.meta-table input,
.meta-table select,
.meta-table textarea,
.entry-grid input,
.entry-grid select,
.entry-grid textarea {
  border: 1px solid #9aafc0;
  border-radius: 0;
  padding: 4px 6px;
  background: #fff;
  color: var(--ink);
  min-height: 26px;
}

.user-box select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus,
.meta-table input:focus,
.meta-table select:focus,
.meta-table textarea:focus,
.entry-grid input:focus,
.entry-grid select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.content {
  padding: 12px 14px 28px;
}

.content-enter {
  animation: none;
}

@keyframes contentFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
}

.kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.panel-head {
  min-height: 36px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--head);
}

.panel-head h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-strong);
}

.folder-tab-group {
  display: inline-flex;
  align-items: flex-end;
  gap: 0;
  padding: 0;
  margin-bottom: 8px;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.folder-tab-button {
  min-width: 0;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 0;
  padding: 6px 12px 7px;
  background: transparent;
  color: #4b5c6b;
  font-weight: 600;
  box-shadow: none;
  cursor: pointer;
}

.folder-tab-button span {
  margin-left: 6px;
  color: var(--muted);
  font-weight: 600;
}

.folder-tab-button.active {
  background: #fff;
  border-color: var(--line);
  color: var(--primary);
  box-shadow: none;
  margin-bottom: -1px;
  padding-bottom: 8px;
}

.folder-tab-button.active span {
  color: var(--primary);
}

.folder-tab-button:hover,
.folder-tab-button.active:hover {
  background: #fff;
  transform: none;
}

.subpanel {
  border: 1px solid var(--line);
  margin-top: 12px;
  background: #fff;
}

.subpanel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fafc;
}

.subpanel-head span {
  color: var(--muted);
  font-size: 12px;
}

.payment-month-panel .top-scrollbar {
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.payment-month-panel .subpanel-head {
  position: relative;
  padding-left: 48px;
}

.payment-month-panel .fold-toggle {
  position: absolute;
  left: 12px;
}

.payment-month-panel .wide-table-wrap {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
}

.approval-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.approval-shortcut {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  cursor: pointer;
}

.approval-shortcut strong,
.approval-shortcut span {
  display: block;
}

.approval-shortcut span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.approval-shortcut:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.document-toolbar {
  margin: 12px 0 4px;
}

.document-toolbar .filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(140px, 180px);
  gap: 8px;
  width: 100%;
}

.document-toolbar input,
.document-toolbar select {
  min-width: 0;
}

@media (max-width: 760px) {
  .document-toolbar .filters {
    grid-template-columns: 1fr;
  }
}

.document-trace-panel .panel-body {
  display: grid;
  gap: 14px;
}

.document-trace-search input {
  width: 100%;
  max-width: 720px;
  height: 34px;
  border: 1px solid var(--line);
  padding: 0 10px;
  background: #fff;
}

.document-trace-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.trace-step {
  border: 1px solid var(--line);
  background: #f8fbff;
  padding: 10px 12px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trace-step.has-data {
  border-color: #1d4f7a;
  background: #eaf3fb;
}

.trace-step span {
  color: var(--muted);
  font-size: 12px;
}

.trace-step strong {
  font-size: 22px;
  color: var(--ink);
}

.trace-list {
  display: grid;
  gap: 16px;
}

.trace-stage h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink);
}

.trace-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.trace-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.trace-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trace-card-head > span {
  color: var(--muted);
  font-size: 12px;
}

.trace-card > strong {
  color: var(--ink);
  font-size: 16px;
  word-break: break-word;
}

.trace-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.trace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.trace-meta b {
  color: var(--ink);
}

.trace-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .document-trace-summary {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}

.panel-subtitle {
  display: none;
}

.panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-search {
  width: min(320px, 42vw);
  height: 28px;
  border: 1px solid var(--line-strong);
  padding: 4px 8px;
  background: #fff;
  color: var(--ink);
}

.segmented {
  display: inline-flex;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.segmented button {
  min-width: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 5px 10px;
  background: transparent;
  color: #4b5c6b;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.manual-return-tabs { display:flex; gap:16px; border-bottom:1px solid #cad9e4; margin-bottom:10px; }
.manual-return-tabs button { border:0; border-bottom:2px solid transparent; background:transparent; color:#245575; padding:10px 12px; }
.manual-return-tabs button.active { border-bottom-color:#245575; font-weight:600; }
.manual-return-page button:not(.primary) { border:1px solid #aec4d5; background:white; color:#245575; padding:6px 10px; border-radius:3px; }
.manual-return-page button:disabled { opacity:.5; }
.manual-return-page .toolbar { justify-content:flex-start; gap:12px; flex-wrap:wrap; }
.manual-return-page .table-wrap { overflow:auto; }
.manual-return-page table { min-width:920px; }
.manual-return-page td { vertical-align:top; }
.folder-tabs {
  display: inline-flex;
  gap: 0;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.folder-tabs button {
  min-width: 76px;
  border: 0;
  border-right: 1px solid var(--line);
  padding: 5px 10px;
  background: transparent;
  color: #4b5c6b;
  font-weight: 600;
  cursor: pointer;
}

.folder-tabs button:last-child {
  border-right: 0;
}

.folder-tabs button.active {
  background: var(--primary);
  color: #fff;
}

.process-book-tabs {
  margin: 0 0 10px;
}

.process-book-tabs button {
  min-width: 76px;
  font-weight: 600;
}

.panel-body {
  padding: 8px 10px 10px;
}

.month-folders {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

:is(.table-search, input[type="search"], input[data-search], input[data-pl-search], input[data-supplier-search], input[data-supplier-quote-search], input[data-document-filter="search"], input[data-document-trace-search]) {
  box-sizing: border-box;
  width: 320px;
  max-width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #a9bac8;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.action-row:has(> input[data-pl-search]) {
  justify-content: flex-start;
  margin: 10px 0;
}

:is(.toolbar, .panel-actions, .filters):has(> .table-search) {
  flex-wrap: wrap;
  justify-content: flex-start;
}

:is(.toolbar, .panel-actions, .filters) > .table-search {
  order: -1;
  margin-right: auto;
}

.panel,
.panel-body,
.month-folders > *,
.business-section,
.wide-table-wrap {
  min-width: 0;
  max-width: 100%;
}

.schedule-cal {
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 10px;
}

.schedule-cal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--chrome);
  color: #fff;
}

.schedule-cal-toolbar strong {
  min-width: 160px;
  text-align: center;
  font-size: 13px;
}

.schedule-cal-toolbar .mini,
.schedule-cal-toolbar .secondary {
  background: #2a3d50;
  color: #fff;
  border: 1px solid #3d5368;
}

.schedule-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #1e4d7b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.schedule-cal-weekdays span {
  padding: 6px 0;
  border-right: 1px solid #2b5e8f;
}

.schedule-cal-weekdays span:last-child {
  border-right: 0;
}

.schedule-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
}

.schedule-cal-day {
  min-height: 74px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 4px;
  background: #fff;
  cursor: pointer;
  vertical-align: top;
}

.schedule-cal.is-week .schedule-cal-day {
  min-height: 86px;
}

.schedule-cal-day.is-other {
  background: #f4f7fa;
  color: var(--muted);
}

.schedule-cal-day.is-today {
  background: #eef6ff;
}

.schedule-cal-day.is-selected {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.schedule-cal-day-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
}

.schedule-cal-add {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  line-height: 16px;
  font-size: 12px;
}

.schedule-cal-chips {
  display: grid;
  gap: 4px;
}

.schedule-chip {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  border: 0;
  background: #1e4d7b;
  color: #fff;
  padding: 4px 6px;
  cursor: pointer;
  text-align: left;
  font-size: 11px;
  line-height: 1.25;
}

.schedule-chip strong {
  font-size: 11px;
}

.schedule-chip.is-done {
  background: #1f7a4d;
}

.schedule-chip.is-active {
  box-shadow: inset 0 0 0 2px #d4b106;
}

.schedule-cal-detail,
.schedule-undated {
  display: grid;
  gap: 10px;
}

.schedule-undated {
  margin: 0 0 10px;
}

.month-folder {
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.month-folder-head {
  min-height: 34px;
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #eef3f7;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.month-folder-head:has(.fold-toggle) {
  position: relative;
  padding-left: 48px;
}

.month-folder-head .fold-toggle {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.month-folder-head strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.month-folder-head span,
.hint,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.month-folder table {
  border-radius: 0;
}

.business-customer-folder {
  background: #dfeaf3;
  border-color: #9fb7cc;
  margin-bottom: 10px;
}

.business-customer-folder > .month-folder-head {
  background: #d6e5f1;
  border-bottom-color: #9fb7cc;
}

.business-customer-folder > .business-order-folder {
  margin: 8px 10px 10px 32px;
}

.business-order-folder {
  background: #fff;
  border-color: #c9d6e2;
  border-left: 4px solid var(--accent);
}

.business-order-folder > .month-folder-head {
  background: #f7fafc;
  border-bottom-color: #d5e0ea;
}

.process-book-card .month-folder-head {
  justify-content: flex-start;
  background: #f1f6fa;
  border-bottom-color: #b8c8d5;
}

.process-book-card {
  background: #fff;
  border-color: #b8c8d5;
}

.process-book-card .process-book-title strong {
  color: #173f5f;
}

.sample-tracking-record {
  margin: 10px;
  border: 1px solid #aebfcd;
  border-left: 4px solid #68859c;
  background: #fff;
}

.sample-tracking-head,
.sample-supplier-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sample-tracking-head {
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid #c5d2dc;
  background: #edf3f7;
}

.sample-supplier-title {
  margin: 0 12px 8px;
}

.sample-tracking-head span {
  margin-left: 10px;
  color: var(--muted);
}

.sample-record-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.sample-record-identity > span {
  margin-left: 0;
}

.sample-record-identity .sample-record-status {
  color: #8a5400;
}

.sample-record-identity .sample-record-status.green {
  color: #17613b;
}

.sample-tracking-record.is-collapsed .sample-tracking-head {
  border-bottom: 0;
}

.sample-document-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 12px;
  border: 1px solid var(--line);
  background: var(--line);
}

.sample-document-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sample-tracking-record > .table-scroll {
  margin: 0 12px 12px;
  width: auto;
}

.sample-document-grid > div {
  min-width: 0;
  padding: 10px;
  background: #fff;
}

.sample-document-grid label,
.sample-document-cell small {
  display: block;
}

.sample-document-grid label {
  margin-bottom: 7px;
  color: #173f5f;
  font-weight: 700;
}

.sample-document-cell small {
  margin-top: 7px;
  color: var(--muted);
}

.sample-file-name {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: #314b60;
  font-size: 12px;
}

.sample-document-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  flex-wrap: wrap;
}

.sample-date-button {
  min-width: 86px;
}

.sample-locked-date {
  display: inline-block;
  min-width: 86px;
  padding: 4px 7px;
  color: #173f5f;
  font-weight: 600;
  text-align: center;
}

.floating-date-picker {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .sample-document-grid,
  .sample-document-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

.process-book-title {
  min-width: 240px;
  flex: 1;
}

.process-book-title span {
  display: block;
  margin-top: 3px;
}

.process-book-body {
  padding: 0;
}

.business-section {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
}

.business-section-head {
  min-height: 30px;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #f4f7fa;
  border-bottom: 1px solid var(--line);
}

.business-section-head strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-strong);
}

.purchase-ledger-section .business-section-head {
  justify-content: flex-start;
  align-items: center;
}

.purchase-ledger-section .business-section-head > div:first-of-type {
  flex: 1;
  text-align: left;
}

.purchase-ledger-month-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
}
.purchase-ledger-month-head:has(.fold-toggle) { padding-left: 12px; }
.purchase-ledger-month-head .fold-toggle { position: static; transform: none; }

.purchase-ledger-month-summary {
  display: grid;
  grid-template-columns: 72px 78px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-width: 0;
}

.purchase-ledger-month-summary span {
  color: var(--muted);
  white-space: nowrap;
}

.purchase-ledger-month-summary b {
  color: var(--ink);
}

.purchase-ledger-month-metric {
  display: grid;
  gap: 1px;
  padding-left: 12px;
  border-left: 1px solid #c9d6e0;
}

.purchase-ledger-currency-totals {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.purchase-ledger-currency-line {
  display: grid;
  grid-template-columns: 38px repeat(3, minmax(128px, 1fr));
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.purchase-ledger-currency-line > strong {
  color: var(--primary-strong);
  font-size: 11px;
}

.purchase-ledger-month-metric small {
  color: var(--muted);
  font-size: 11px;
}

.purchase-ledger-month-metric b {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.purchase-ledger-order-summary {
  display: grid;
  grid-template-columns: 145px minmax(180px, 1fr) 100px 72px 145px 110px;
  gap: 6px 16px;
  align-items: center;
  min-width: 0;
}

.purchase-ledger-register { overflow-x: auto; }
.purchase-ledger-columns,
.purchase-ledger-register .business-section-head {
  display: grid;
  grid-template-columns: 28px minmax(832px, 1fr) 152px;
  gap: 12px;
  min-width: 1060px;
  padding: 10px 12px;
  align-items: center;
}
.purchase-ledger-columns { background: #e5edf3; color: var(--muted); }
.purchase-ledger-register .purchase-ledger-summary-field > small:first-child { display: none; }
.purchase-ledger-register .purchase-ledger-summary-field > small[role="status"] { display: block; }
.purchase-ledger-register .purchase-ledger-summary-field.supplier > span { white-space: normal; overflow-wrap: anywhere; }
.purchase-ledger-register .purchase-ledger-summary-field.po > strong { overflow: visible; text-overflow: clip; }
.purchase-ledger-register .purchase-ledger-summary-field.amount,
.purchase-ledger-register .purchase-ledger-summary-field.status { border: 0; padding-left: 0; }
.purchase-ledger-columns .purchase-ledger-order-summary > span:nth-child(5) { text-align: right; }
.purchase-ledger-register .business-section-head > .action-row { flex-wrap: nowrap; justify-content: flex-end; }
.purchase-ledger-register .business-section-head {
  min-height: 38px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.purchase-ledger-columns > span:last-child,
.purchase-ledger-columns .purchase-ledger-order-summary > span:last-child { text-align: center; }
.purchase-ledger-register .purchase-ledger-summary-field.status { justify-items: center; }
.purchase-ledger-register .purchase-ledger-summary-field.status [data-ledger-invoices] { justify-self: center; }
.purchase-ledger-register .business-section-head > .action-row { justify-content: center; }
.purchase-ledger-register button.mini {
  min-height: 26px;
  height: 26px;
  padding: 2px 7px;
  font-size: 12px;
  line-height: 20px;
}
.purchase-ledger-register .fold-toggle { width: 24px; min-width: 24px; padding: 0; }
.purchase-ledger-register .purchase-ledger-section table th,
.purchase-ledger-register .purchase-ledger-section table td {
  padding: 4px 8px;
  text-align: center;
  vertical-align: middle;
}
.purchase-ledger-register .purchase-ledger-section table th:nth-child(2),
.purchase-ledger-register .purchase-ledger-section table td:nth-child(2),
.purchase-ledger-register .purchase-ledger-section table th:nth-child(3),
.purchase-ledger-register .purchase-ledger-section table td:nth-child(3) { text-align: left; }
@media (max-width: 700px) {
  .purchase-ledger-month-head { grid-template-columns: 28px minmax(0, 1fr); }
  .purchase-ledger-month-head > .action-row { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .purchase-ledger-month-summary { grid-template-columns: 72px minmax(0, 1fr); }
  .purchase-ledger-currency-totals { grid-column: 1 / -1; overflow-x: auto; }
  .purchase-ledger-currency-line { grid-template-columns: 32px repeat(3, 128px); }
}

.purchase-ledger-summary-field {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.purchase-ledger-summary-field small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.purchase-ledger-summary-field span,
.purchase-ledger-summary-field strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-ledger-summary-field.amount span {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.purchase-ledger-summary-field.rate span {
  font-variant-numeric: tabular-nums;
}

.purchase-ledger-summary-field.amount,
.purchase-ledger-summary-field.status {
  padding-left: 10px;
  border-left: 1px solid #d5e0e8;
}

.purchase-ledger-summary-field.status .tag {
  justify-self: start;
}

.purchase-ledger-summary-field.status [data-ledger-invoices] {
  white-space: nowrap;
  justify-self: start;
}

.purchase-ledger-report {
  grid-column: 1 / -1;
  overflow-x: auto;
}

.purchase-ledger-report table {
  min-width: 760px;
}

.purchase-ledger-report th.num,
.purchase-ledger-report td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.purchase-ledger-report tfoot th {
  background: #e8eff5;
  border-top: 2px solid #aebfcd;
}

.business-section table {
  border-radius: 0;
}

.flow-hint,
.flow-hint-steps,
.flow-hint-step,
.kk-receive-hint {
  display: none;
}

.flow-hint p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.flow-hint-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.flow-hint-step {
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.flow-hint-step.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(23, 107, 135, 0.18);
}

.flow-hint-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.flow-hint-step span {
  display: block;
  font-size: 12px;
  color: #5b6c7a;
  line-height: 1.45;
}

.field-note {
  grid-column: 1 / -1;
  margin: 0;
}

.kk-receive-hint {
  color: var(--primary-strong);
}

.kk-material-section table {
  table-layout: auto;
}

.kk-table-top-scrollbar {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.kk-material-section .production-process-lines {
  min-width: 420px;
  max-width: 760px;
}

.kk-material-section th,
.kk-material-section td {
  padding: 9px 10px;
}

.kk-material-section th:nth-child(1),
.kk-material-section td:nth-child(1) {
  width: 15%;
}

.kk-material-section th:nth-child(2),
.kk-material-section td:nth-child(2) {
  width: 38%;
}

.kk-material-section th:nth-child(3),
.kk-material-section td:nth-child(3) {
  width: 8%;
  white-space: nowrap;
}

.kk-material-section th:nth-child(4),
.kk-material-section td:nth-child(4) {
  width: 8%;
  white-space: nowrap;
}

.kk-material-section th:nth-child(5),
.kk-material-section td:nth-child(5) {
  width: 19%;
}

.kk-material-section th:nth-child(6),
.kk-material-section td:nth-child(6) {
  width: 12%;
}

.section-restore-row {
  margin: 12px 12px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.month-folder.kk-closed {
  border-color: var(--line);
  background: #fff;
}

.month-folder.kk-closed > .month-folder-head {
  background: #fff;
}

.month-folder.kk-closed > .month-folder-head strong::after {
  content: "";
}

.empty-state {
  padding: 28px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.finance-lpb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.finance-lpb-stats .kpi {
  padding: 13px 14px;
  background: #fbfdff;
}

.finance-lpb-stats .kpi strong {
  font-size: 20px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.finance-lpb-stats .kpi.warn {
  border-color: #f0d3a2;
  background: #fffaf0;
}

.finance-lpb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.finance-lpb-toolbar > div:first-child {
  display: grid;
  gap: 4px;
}

.finance-lpb-toolbar span,
.finance-lpb-toolbar small {
  color: var(--muted);
  font-size: 13px;
}

.finance-lpb-toolbar .action-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wide-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.wide-table-wrap table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-radius: 0;
}

.wide-table-wrap > .table-scroll {
  border: 0;
}

.top-scrollbar {
  width: 100%;
  overflow: hidden;
  height: 20px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 0;
  background: #eef2f5;
  padding: 0;
}

.top-scrollbar.hidden-scroll-range {
  display: none;
}

.horizontal-scroll-range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  cursor: ew-resize;
  background: transparent;
  touch-action: none;
  user-select: none;
}

.horizontal-scroll-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 5px;
  background: #dce5ec;
}

.horizontal-scroll-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--scroll-thumb-width, 48px);
  height: 10px;
  border: 0;
  border-radius: 5px;
  background: #9eb3c4;
  cursor: grab;
}

.horizontal-scroll-range:active::-webkit-slider-thumb,
.top-scrollbar.is-dragging .horizontal-scroll-range::-webkit-slider-thumb {
  cursor: grabbing;
  background: #7995ab;
}

.horizontal-scroll-range::-moz-range-track {
  height: 10px;
  border-radius: 5px;
  background: #dce5ec;
}

.horizontal-scroll-range::-moz-range-thumb {
  width: var(--scroll-thumb-width, 48px);
  height: 10px;
  border: 0;
  border-radius: 5px;
  background: #9eb3c4;
  cursor: grab;
}

.top-scrollbar.is-dragging .horizontal-scroll-range::-moz-range-thumb {
  cursor: grabbing;
  background: #7995ab;
}

.table-pan-ready .table-scroll, .table-pan-ready .wide-table-wrap {
  cursor: grab;
}

.is-dragging-table, .is-dragging-table * {
  cursor: grabbing;
  user-select: none;
}

[data-scroll-sync-table] .table-scroll button,
[data-scroll-sync-table] .table-scroll a,
[data-scroll-sync-table] .table-scroll input,
[data-scroll-sync-table] .table-scroll select,
[data-scroll-sync-table] .table-scroll textarea {
  cursor: auto;
}

.shoe-batch-button { display: block; margin-top: 6px; }
.pdf-import-preview { padding: 14px; min-width: 0; grid-column: 1 / -1; }
.pdf-source-values { max-width: 100%; overflow: auto; }
.pdf-difference-entry .pdf-source-values table { table-layout: auto; min-width: 560px; width: 100%; }
.pdf-difference-entry .pdf-source-values th, .pdf-difference-entry .pdf-source-values td { white-space: normal; overflow-wrap: anywhere; min-width: 65px; }
.pdf-difference-entry .pdf-source-values th:nth-child(2), .pdf-difference-entry .pdf-source-values td:nth-child(2) { min-width: 130px; }
.pdf-import-preview > details { margin-top: 12px; }
.pdf-import-preview > details > .table-scroll { max-height: 42vh; overflow: auto; }
.pdf-import-preview summary { cursor: pointer; padding: 8px 0; }
.pdf-import-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.pdf-review-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pdf-review-fields label, .pdf-review-sizes label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pdf-review-fields input, .pdf-review-fields textarea, .pdf-review-sizes input { width: 100%; min-width: 0; box-sizing: border-box; }
.pdf-review input, .pdf-review textarea, .pdf-review select { border: 1px solid #a9bfd2; border-radius: 3px; padding: 6px 8px; min-height: 32px; font: inherit; color: inherit; background: #fff; box-sizing: border-box; }
.pdf-review fieldset > label { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.pdf-review button:disabled { opacity: .5; cursor: not-allowed; }
[data-review-done]:disabled { opacity: .5; cursor: not-allowed; }
.pdf-review-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(65px, 1fr)); gap: 8px; margin: 10px 0; }
.pdf-review-table { max-height: 35vh; overflow: auto; }
.pdf-review-table table { min-width: 850px; }
.pdf-review-table td:last-child { white-space: nowrap; }
.pdf-review .pdf-review-problem td { background: #fff0ed; }
.pdf-review .pdf-review-ignored td { color: #68747b; background: #f0f1f2; }
.pdf-review-issue { padding: 8px 0; color: #9b341e; overflow-wrap: anywhere; }
.pdf-review pre { max-height: 30vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.pdf-review fieldset { margin: 10px 0; min-width: 0; border: 1px solid #b9cddd; padding: 12px; }
.pdf-review [data-review-edit-error] { color: #9b341e; }
@media (max-width: 640px) { .pdf-review-fields { grid-template-columns: minmax(0, 1fr); } }
.pdf-batch-list { max-height: 45vh; overflow: auto; }
.pdf-batch-list table { min-width: 900px; table-layout: fixed; }
.pdf-batch-list th:first-child { width: 52px; }
.pdf-batch-list th:nth-child(2) { width: 23%; }
.pdf-batch-list th:nth-child(3) { width: 13%; }
.pdf-batch-list th:nth-child(4) { width: 27%; }
.pdf-batch-list th:last-child { width: 140px; }
.pdf-batch-list td.pdf-batch-actions { white-space: normal; padding: 8px; }
.pdf-batch-actions > div { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; }
.pdf-batch-list td.pdf-batch-actions button { position: static; white-space: normal; overflow-wrap: anywhere; width: 100%; min-width: 0; max-width: 100%; margin: 0; box-sizing: border-box; }
.pdf-batch-list .pdf-batch-file, .pdf-batch-list .pdf-batch-message { white-space: normal; overflow-wrap: anywhere; text-align: left; }
.pdf-batch-list select { width: 100%; min-width: 0; }
.pdf-batch-preview [data-batch-details] > details > .table-scroll { max-height: 38vh; overflow: auto; }
[data-batch-progress] { overflow-wrap: anywhere; }
[data-batch-meter] { width: 100%; height: 18px; }
[data-batch-progress-list] { max-height: 45vh; overflow: auto; overflow-wrap: anywhere; }
.pdf-import-preview .pdf-process-cell { white-space: normal; min-width: 240px; max-width: 420px; overflow-wrap: anywhere; }
.pdf-import-warning { color: #a33d18; }
.shoe-size-list { display: flex; flex-wrap: wrap; gap: 8px 16px; max-width: 320px; padding: 8px 0; }
.shoe-batch-table { max-height: 55vh; overflow: auto; }
.shoe-batch-table th { position: sticky; top: 0; }

.supplier-table-wrap table {
  min-width: 2080px;
  table-layout: auto;
}

.purchase-invoice-table-wrap table {
  min-width: 2200px;
  table-layout: auto;
}

.payment-table-wrap table {
  min-width: 1700px;
  table-layout: auto;
}

.supplier-table-wrap th,
.supplier-table-wrap td,
.purchase-invoice-table-wrap th,
.purchase-invoice-table-wrap td,
.payment-table-wrap th,
.payment-table-wrap td {
  white-space: nowrap;
}

.supplier-table-wrap td,
.purchase-invoice-table-wrap td,
.payment-table-wrap td {
  overflow: visible;
  text-overflow: clip;
}

.supplier-table-wrap .data-value,
.purchase-invoice-table-wrap .data-value,
.payment-table-wrap .data-value {
  display: inline-block;
  min-width: max-content;
}

table th,
.head-center {
  text-align: center;
}

.center-cell {
  text-align: center;
}

.finance-lpb-wrap {
  max-width: 100%;
}

.finance-lpb-table {
  min-width: 1940px;
  table-layout: auto;
}

.finance-lpb-table th,
.finance-lpb-table td {
  padding: 10px 12px;
  vertical-align: top;
}

.finance-lpb-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.finance-lpb-table .cell-code {
  min-width: 108px;
}

.finance-lpb-table .cell-check {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.finance-lpb-table .cell-check input {
  width: 16px;
  height: 16px;
}

.finance-lpb-table .cell-customer {
  min-width: 150px;
}

.finance-lpb-table .cell-product {
  min-width: 260px;
}

.finance-lpb-table .cell-product strong,
.finance-lpb-table .cell-product span,
.finance-lpb-table .cell-product small,
.finance-lpb-table td small {
  display: block;
}

.finance-lpb-table .cell-product span,
.finance-lpb-table .cell-note span {
  display: block;
  overflow: visible;
  white-space: normal;
}

.finance-lpb-table .cell-product small,
.finance-lpb-table td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.finance-lpb-table .cell-number {
  width: 112px;
}

.finance-lpb-table .cell-money {
  width: 128px;
  text-align: right;
  white-space: nowrap;
}

.finance-lpb-table .cell-money.strong {
  font-weight: 700;
  color: #193542;
}

.finance-lpb-table .cell-note {
  min-width: 260px;
}

.vertical-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.payment-allocation-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.allocation-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  margin: 4px 0 16px;
}

.allocation-flow-step {
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 10px 12px;
}

.allocation-flow-step.active {
  border-color: var(--primary);
  background: #eef6fb;
}

.allocation-flow-step strong,
.allocation-flow-step span {
  display: block;
}

.allocation-flow-step strong {
  color: #152d3d;
  font-size: 14px;
}

.allocation-flow-step span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.allocation-flow-arrow {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-weight: 700;
}

.payment-allocation-summary .kpi {
  padding: 13px 14px;
  background: #fbfdff;
  border: 1px solid var(--line);
}

.payment-allocation-summary .kpi strong {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.payment-allocation-summary .kpi.warn {
  border-color: #f0d3a2;
  background: #fffaf0;
}

.allocation-section {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.allocation-section-title {
  font-weight: 700;
  color: #1b3447;
}

.allocation-table-wrap table {
  min-width: 1180px;
}

.allocation-table-wrap th,
.allocation-table-wrap td {
  white-space: nowrap;
}

.allocation-form {
  display: grid;
  grid-template-columns: minmax(420px, 1.5fr) minmax(180px, 0.65fr) minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.allocation-modal-card {
  width: min(1280px, calc(100vw - 32px));
}

.allocation-modal-form {
  display: block;
  padding: 14px;
}

.allocation-add-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.allocation-ref-field select {
  min-width: 100%;
}

.allocation-add-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.allocation-add-actions .primary {
  min-width: 140px;
}

@media (max-width: 760px) {
  .allocation-flow,
  .allocation-form {
    grid-template-columns: 1fr;
  }

  .allocation-flow-arrow {
    display: none;
  }
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.toolbar .filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.log-filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr)) minmax(220px, 1.4fr);
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fbfd;
}

.log-filter-panel label {
  display: grid;
  gap: 4px;
  color: #455a6b;
  font-size: 12px;
  font-weight: 700;
}

.log-filter-panel select,
.log-filter-panel input {
  width: 100%;
  min-width: 0;
}

.log-summary {
  margin: 0 0 8px;
  color: #536879;
  font-size: 12px;
}

.log-groups {
  display: grid;
  gap: 12px;
}

.log-date-group {
  border: 1px solid var(--line);
  background: #fff;
}

.log-date-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: #dbe8f2;
  border-bottom: 1px solid var(--line);
}

.log-date-head span {
  color: #536879;
  font-size: 12px;
}

.log-chip,
.log-action-tag {
  display: inline-flex;
  justify-content: center;
  min-width: 54px;
  padding: 2px 6px;
  border: 1px solid #c7d7e4;
  background: #f6fafc;
  color: #16415d;
  font-size: 12px;
  font-weight: 700;
}

.log-chip-login { background: #eef6ff; color: #075985; }
.log-chip-business { background: #f0fdf4; color: #166534; }
.log-chip-production { background: #fff7ed; color: #9a3412; }
.log-chip-purchase { background: #fefce8; color: #854d0e; }
.log-chip-warehouse { background: #ecfeff; color: #155e75; }
.log-chip-finance { background: #f5f3ff; color: #5b21b6; }
.log-chip-system { background: #f1f5f9; color: #334155; }

@media (max-width: 980px) {
  .log-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-search {
    grid-column: 1 / -1;
  }
}

.primary,
.secondary,
.danger {
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}

.primary {
  background: var(--primary);
  color: #fff;
  border-color: #163a5c;
}

.primary:hover {
  background: var(--primary-strong);
}

.secondary {
  background: #fff;
  color: #1f3344;
  border-color: #9aafc0;
}

.secondary:hover {
  background: #eef3f7;
}

.danger {
  background: #fef2f2;
  color: var(--red);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  border: 1px solid #c5d0da;
  background: #fff;
}

.table-scroll table {
  width: max-content;
  min-width: 100%;
  border: 0;
}

th,
td {
  border: 1px solid #c5d0da;
  padding: 4px 6px;
  text-align: left;
  vertical-align: middle;
  min-width: max-content;
  overflow-wrap: normal;
}

th {
  white-space: nowrap;
}

td.truncate-cell {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

td.truncate-cell .tag,
td.truncate-cell .inline-input,
td.truncate-cell .inline-select {
  max-width: 100%;
}

td .inline-input,
td .inline-select {
  text-align: left;
}

.table-scroll td {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.lamination-sorting-table > table {
  width: 100%;
  min-width: 1050px;
  table-layout: fixed;
}
.lamination-sorting-table > table > :is(thead, tbody) > tr > :is(th, td) {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.lamination-sorting-table > table > tbody > tr > td:is(:nth-child(3), :nth-child(5), :nth-child(7), :nth-child(8), :nth-child(9)) {
  text-align: center;
}
.lamination-sorting-table td .muted { font-size: 12px; }
.lamination-sorting-table td details { min-width: 0; max-width: 100%; }
.table-scroll .data-value {
  display: inline-block;
  min-width: max-content;
}

th {
  background: #d7e3ef;
  color: #1a3348;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

th.status-cell,
td.status-cell,
th.center-cell,
td.center-cell,
th.col-actions,
td.col-actions {
  text-align: center;
}

td.status-cell .tag {
  justify-content: center;
}

td.col-actions .action-row {
  justify-content: center;
}

tr.schedule-order-start td {
  border-top: 2px solid #c9dce3;
}

tr.schedule-order-continuation td {
  background: #fbfdfe;
}

tr.schedule-order-continuation td:first-child,
tr.schedule-order-continuation td:nth-child(2) {
  color: var(--muted);
}

tr.schedule-item-group-start td {
  border-top: 8px solid #eef5f8;
  border-bottom-color: transparent;
  background: #fbfdfe;
}

tr.schedule-item-group-start td[rowspan] {
  box-shadow: inset 0 -1px 0 var(--line);
}

tr.schedule-item-group-start.schedule-item-group-end td {
  box-shadow: inset 0 -1px 0 var(--line);
}

tr.schedule-item-group-start td:first-child {
  border-left: 4px solid var(--primary);
}

tr.schedule-item-group-continuation td {
  background: #fbfdfe;
  border-top: 0;
  border-bottom-color: transparent;
  box-shadow: none;
}

tr.schedule-item-group-continuation td:first-child {
  border-left: 0;
}

tr.schedule-item-group-start + tr.schedule-item-group-continuation td {
  padding-top: 6px;
}

tr.schedule-item-group-end td {
  box-shadow: inset 0 -1px 0 var(--line);
}

.merged-status-cell,
.merged-schedule-cell {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merged-schedule-cell {
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  padding: 0 6px;
  font-size: 11px;
  background: #e8eef3;
  color: #2a3f50;
  font-weight: 700;
  border: 1px solid #c5d0da;
  min-height: 18px;
}

.tag.green {
  background: #e4f5ee;
  color: var(--green);
}

.tag.red {
  background: #f9e7e5;
  color: var(--red);
}

.tag.warn {
  background: #fbf0d6;
  color: var(--warn);
}

.tag.blue {
  background: #e7f0ff;
  color: #1d4ed8;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chip-remove {
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.action-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.col-actions {
  width: 220px;
  min-width: 200px;
  white-space: nowrap;
  text-align: right;
  overflow: visible;
}

.toolbar-left {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.notice {
  display: flex;
  gap: 10px;
  align-items: center;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #eef3f6;
  color: #31505d;
}

.notice.warn {
  background: #fbf0d6;
  color: #8a5d00;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
}

.detail-row span {
  color: var(--muted);
  font-size: 13px;
}

.detail-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fbfcfd;
}

.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.mini {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 2px 6px;
  cursor: pointer;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.mini:hover {
  background: #e7eef5;
  color: var(--primary-strong);
  border-color: #9aafc0;
}

.fold-toggle {
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: #6b7280;
}

.inline-select {
  width: 100%;
  min-width: 92px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
  background: #fff;
  color: var(--ink);
}

.inline-input {
  width: 100%;
  min-width: 96px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 7px;
  background: #fff;
  color: var(--ink);
}

.inline-input.compact-number {
  min-width: 70px;
  max-width: 86px;
}

.inline-input.compact-input {
  min-width: 78px;
  max-width: 110px;
}

.order-info {
  max-width: 100%;
}

.order-info summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(max-content, 1fr));
  gap: 8px;
  align-items: center;
  cursor: pointer;
  list-style-position: inside;
}

.order-info summary span,
.order-info summary strong {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.order-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
}

.order-info-grid b {
  color: var(--ink);
  font-weight: 500;
}

.status-with-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.schedule-split-cell {
  display: grid;
  gap: 6px;
  min-width: 260px;
  align-items: start;
}

.schedule-split-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid #dbe5ec;
  border-radius: 7px;
  background: #f8fafc;
}

.schedule-split-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-qty-input {
  width: 100%;
  min-width: 110px;
}

.schedule-no-select {
  min-width: 150px;
}

.schedule-field {
  display: grid;
  gap: 2px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.schedule-field span {
  font-weight: 600;
}

.info-button {
  min-width: 58px;
}

.process-round {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.info-modal {
  padding: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.info-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfcfd;
}

.info-row span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.info-row strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.info-table {
  margin-top: 6px;
}

.report-subhead {
  margin: 18px 0 8px;
  font-size: 15px;
}

.report-total-row td {
  background: #eef3f6;
  font-weight: 700;
}

.daily-report {
  display: grid;
  gap: 18px;
  padding: 4px 2px 0;
}

.daily-report-kpis,
.monthly-report-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.report-kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  min-height: 88px;
}

.report-kpi span,
.report-kpi em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.report-kpi strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.report-kpi.metric-text strong {
  font-size: 15px;
  line-height: 1.45;
  word-break: break-word;
}

.report-metric-table {
  min-width: 680px;
}

.report-metric-table th,
.report-metric-table td {
  vertical-align: middle;
}

.unit-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef3f6;
  color: #1f3440;
  font-weight: 700;
  font-size: 12px;
}

.daily-report-section,
.monthly-report-folder {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.report-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-section-head h3 {
  margin: 0;
  font-size: 16px;
}

.report-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.daily-line-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.daily-line-report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.daily-line-report-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
}

.daily-line-report-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid #edf1f3;
}

.daily-line-report-card span {
  color: var(--muted);
  font-size: 12px;
}

.daily-line-report-card b {
  color: var(--ink);
  font-weight: 700;
}

.report-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.monthly-report-folder {
  display: grid;
  gap: 14px;
}

.monthly-report-table {
  min-width: 720px;
}

.report-panel-head {
  align-items: flex-start;
}

.production-report-toolbar {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border: 1px solid #aebdca;
  border-radius: 5px;
  background: #edf3f7;
  overflow: hidden;
}

.segmented-control button {
  min-width: 34px;
  min-height: 28px;
  padding: 4px 9px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #526779;
  font-weight: 600;
  box-shadow: none;
}

.segmented-control button:hover {
  background: #e1ebf2;
  color: #173f5f;
}

.segmented-control button.active {
  background: #fff;
  color: #124e7b;
  box-shadow: 0 1px 3px rgba(20, 55, 80, 0.16);
}

.segmented-control button:focus-visible {
  outline: 2px solid #79a9ca;
  outline-offset: -2px;
}

.production-header-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.machine-management-head,
.machine-management-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 90px 70px;
  gap: 8px;
  align-items: center;
}

.machine-management-head {
  padding: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.machine-management-row {
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.machine-management-row input:not([type="checkbox"]) {
  width: 100%;
}

.machine-active-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.machine-management-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.production-report-period {
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-report-period input {
  height: 32px;
  border: 1px solid var(--line);
  padding: 4px 8px;
  background: #fff;
}

.department-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.department-week-card {
  min-height: 170px;
  border: 1px solid var(--line);
  background: #f8fbfd;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.department-week-card.has-data {
  background: #fff;
  border-color: #9fb8c9;
}

.department-week-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d8e3eb;
}

.department-week-card-head strong {
  font-size: 16px;
}

.department-week-card-head span,
.department-week-card div span {
  color: var(--muted);
  font-size: 12px;
}

.department-week-card div:not(.department-week-card-head) {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.department-dispatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.department-dispatch-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.department-dispatch-card:hover {
  border-color: #c5d5d8;
  box-shadow: none;
  transform: none;
}

.department-dispatch-card strong,
.department-dispatch-card span {
  display: block;
}

.department-dispatch-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.department-work-order {
  display: grid;
  gap: 12px;
}

.paint-materials {
  display: grid;
  gap: 10px;
}

.paint-material-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 82px 78px auto;
  gap: 8px;
  align-items: center;
}

.paint-line-cards {
  display: grid;
  gap: 12px;
  padding: 12px;
  grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
}

.paint-line-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

.paint-line-head {
  display: grid;
  grid-template-columns: minmax(88px, 0.45fr) minmax(150px, 0.75fr) minmax(110px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.paint-line-head strong {
  align-self: center;
  font-size: 15px;
}

.paint-line-summary {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.paint-line-body {
  display: grid;
  gap: 12px;
}

.compact-field label,
.paint-card-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

.compact-field input,
.compact-field select {
  width: 100%;
}

.paint-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  margin-bottom: 12px;
}

.production-shifts {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  margin-bottom: 12px;
}

.production-shift-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.production-shift-row .mini {
  margin-bottom: 1px;
}

.production-shift-actions {
  justify-content: flex-start;
  margin-top: 1px;
}

.lamination-combination, .lamination-unassigned {
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.lamination-combination-columns { display: grid; grid-template-columns: minmax(0, 1fr) 160px; gap: 10px; align-items: start; }
.lamination-combination-columns > div { min-width: 0; }
.lamination-combination .paint-material-row { grid-template-columns: minmax(0, 1fr) 62px 72px auto; gap: 4px; }
.lamination-combination select, .lamination-unassigned select, .lamination-combination input { min-width: 0; max-width: 100%; }
.lamination-combination .lamination-output-row { grid-template-columns: minmax(0, 1fr) 72px; gap: 8px; }
.lamination-combination .lamination-output-row input:last-child { grid-column: 1 / -1; }
.lamination-combination .paint-materials, .lamination-combination .lamination-outputs { gap: 8px; }
.lamination-unassigned { color: #9a5017; }
.lamination-daily-report { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); width: 100%; min-width: 0; }
.lamination-daily-report .daily-report-section { min-width: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0; }
.lamination-report-shift .table-scroll { max-width: 100%; overflow-x: auto; }
.lamination-daily-report .daily-line-report-grid { display: block; }
.lamination-daily-report .daily-line-report-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; }
.lamination-report-shift { margin-top: 14px; min-width: 0; }
.lamination-report-shift h4 { margin: 0 0 6px; }
.lamination-report-shift .table-scroll, .lamination-report-shift td div { display: block; }
.lamination-report-shift table { min-width: 0; width: 100%; }
.lamination-report-shift td { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .lamination-combination-columns { grid-template-columns: minmax(0, 1fr); }
  .lamination-daily-report .daily-report-kpis { grid-template-columns: minmax(0, 1fr); }
  .lamination-combination .paint-material-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lamination-combination .paint-material-row > select:first-child { grid-column: 1 / -1; }
  .lamination-combination .lamination-output-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lamination-combination .lamination-output-row input:last-child { grid-column: 1 / -1; }
}

.paint-line-head.insole-machine-head {
  grid-template-columns: minmax(180px, 1fr) auto auto;
}

.insole-shift-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.insole-shift-card + .insole-shift-card {
  margin-top: 10px;
}

.insole-shift-head,
.insole-shift-fields {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.insole-shift-fields .field {
  flex: 1 1 0;
}

.insole-shift-card .paint-card-section {
  margin-bottom: 0;
}

.paint-card-section {
  margin-bottom: 12px;
}

.paint-output-row {
  display: grid;
  grid-template-columns: minmax(140px, 190px) auto minmax(160px, 1fr);
  gap: 10px;
  align-items: end;
}

.paint-unit-pill {
  display: inline-flex;
  align-items: center;
  min-height: 37px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #eef3f6;
  color: #31505d;
  font-size: 13px;
}

.lamination-outputs {
  display: grid;
  gap: 10px;
}

.lamination-output-row {
  display: grid;
  grid-template-columns: 92px 110px minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.schedule-complete {
  border-color: rgba(32, 132, 96, 0.4);
  background: #f0faf5;
}

.schedule-complete .month-folder-head {
  background: #e4f5ee;
}

tr.replenish-complete-row td {
  background: #eef9f3;
}

tr.replenish-complete-row td:first-child {
  border-left: 3px solid var(--green);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

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

.flow-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 12px;
  background: #fbfcfd;
  min-height: 88px;
}

.flow-step strong {
  display: block;
  margin-bottom: 6px;
}

.flow-step span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.warehouse-overview .flow {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.warehouse-overview .flow-step {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wb-filters { display:grid; grid-template-columns:repeat(6,minmax(110px,1fr)) auto; gap:10px; align-items:end; margin:12px 0; }
.wb-filters label { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:12px; }
.wb-filters input,.wb-filters select { width:100%; min-width:0; box-sizing:border-box; height:34px; border:1px solid #aec4d5; border-radius:3px; background:#fff; padding:5px 7px; }
.wb-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin:12px 0 16px; }
.wb-metrics>div { border:1px solid #cfdae4; border-radius:4px; padding:12px; min-width:0; background:#fff; overflow-wrap:anywhere; }
.wb-metrics span { display:block; color:#526b80; font-size:12px; }
.wb-metrics strong { display:block; font-size:19px; margin-top:8px; }
.wb-metrics .wb-pending { border-color:#d4ae57; }
.wb-metrics .wb-confirmed { border-color:#5caa8c; }
.wb-metrics .wb-review { border-color:#ce776c; }
.wb-pager { display:flex; justify-content:flex-end; align-items:center; gap:8px; margin:10px 0; font-size:12px; }
.wb-filters.wb-compact { grid-template-columns:220px minmax(150px,1fr) 120px minmax(180px,1.4fr) 34px; gap:8px; margin:10px 0; }
.wb-date-field { display:flex; flex-direction:column; gap:5px; min-width:0; font-size:12px; }
.wb-date-controls { display:grid; grid-template-columns:72px minmax(0,1fr); height:34px; box-sizing:border-box; border:1px solid #aec4d5; border-radius:3px; background:#fff; overflow:hidden; }
.wb-date-controls:focus-within { border-color:#2674a6; box-shadow:0 0 0 1px #2674a6; }
.wb-filters .wb-date-controls select,.wb-filters .wb-date-controls input { height:100%; min-height:0; min-width:0; margin:0; border:0; border-radius:0; outline:none; box-shadow:none; background:transparent; }
.wb-filters .wb-date-controls select { border-right:1px solid #d3dfe7; }
@media(max-width:600px){.wb-date-controls{height:40px;}}
@media(max-width:1100px){.wb-date-field{grid-column:span 2;}}
.wb-compact .wb-reset { width:34px; height:34px; padding:0; font-size:20px; }
.wb-tabs-pager { display:flex; align-items:center; flex-wrap:wrap; }
.wb-tabs-pager > .wb-pager { margin:0 0 0 auto; gap:6px; }
.wb-tabs-pager > .wb-pager button { padding:2px 7px; min-width:26px; height:26px; border:1px solid #aec4d5; background:white; }
.wb-compact-pager { margin:0 0 6px; }
.wb-filters.wb-register-compact { grid-template-columns:145px 145px minmax(130px,1fr) minmax(160px,1.4fr) 120px auto; gap:8px; margin:10px 0 6px; }
.panel-head > .wb-compact-pager { margin:0 0 0 auto; }
.wb-inbound-heading { gap:12px; flex-wrap:wrap; align-items:center; }
.wb-inbound-heading > .wb-tabs-pager { flex:1; min-width:0; margin:0; border-bottom:0; }
.wb-inbound-heading > :has([data-warehouse-inbound-view]) { flex:1; min-width:0; margin:0; border-bottom:none !important; box-shadow:none; }
.wb-document-pager { margin:4px 0 6px; }
[data-material-plan] td:nth-child(4),[data-material-plan] td:nth-child(5) { text-align:center; }
.segmented.wb-outbound-tabs { display:flex; align-items:center; gap:10px; width:100%; box-sizing:border-box; padding:8px 10px; margin:0; border:1px solid #d3dfe7; border-bottom:0; border-radius:4px 4px 0 0; background:#f3f7fa; }
.segmented.wb-outbound-tabs > [data-outbound-view] { height:34px; padding:0 12px; margin:0; border:0; border-bottom:2px solid transparent; border-radius:0; color:#204c6c; background:transparent; }
.segmented.wb-outbound-tabs > [data-outbound-view].active { border-bottom-color:#21638f; font-weight:600; background:transparent; color:#174c73; }
.segmented.wb-outbound-tabs > [data-warehouse-move] { margin-left:auto; height:34px; border-radius:3px; }
.segmented:has(> [data-outbound-view]) { display:flex; align-items:center; gap:10px; width:100%; min-height:52px; box-sizing:border-box; padding:8px 10px; margin:0; border:1px solid #d3dfe7; border-bottom:0; border-radius:4px 4px 0 0; background:#f3f7fa; }
.segmented:has(> [data-outbound-view]) > [data-outbound-view] { height:34px; padding:0 12px; margin:0; border:0; border-bottom:2px solid transparent; border-radius:0; color:#204c6c; background:transparent; }
.segmented:has(> [data-outbound-view]) > [data-outbound-view].active { border-bottom-color:#21638f; font-weight:600; background:transparent; color:#174c73; }
.content[data-rendered-module] > .warehouse-outbound-register > .panel-body,
[data-warehouse-transfer="issue"] > .panel > .panel-body { padding:6px; }
.wb-inbound-heading > :has([data-warehouse-inbound-view]) { display:flex; align-items:center; padding:0; }
.wb-inbound-heading [data-warehouse-inbound-view] { height:34px; margin:0; padding:0 12px; display:inline-flex; align-items:center; }
.wb-inbound-heading > .primary { height:34px; margin:0; display:inline-flex; align-items:center; }
.wb-inbound-heading > :has([data-material-register-kind]) { display:flex; align-items:center; flex:1; margin:0; padding:0; border-bottom:none !important; }
.wb-inbound-heading [data-material-register-kind] { height:34px; margin:0; padding:0 12px; display:inline-flex; align-items:center; }
.segmented:has(> [data-finished-warehouse-type]) { display:flex; align-items:center; gap:8px; margin:0; padding:8px 10px; border-bottom:0; }
.segmented > [data-finished-warehouse-type] { height:34px; padding:0 12px; margin:0; border:0; border-radius:0; border-bottom:2px solid transparent; background:transparent; color:#204c6c; }
.segmented > [data-finished-warehouse-type].active { background:transparent; color:#174c73; border-bottom-color:#21638f; font-weight:600; }
.wb-inbound-heading > :has([data-finished-warehouse-type]) { flex:1; padding:0; }
.wb-finished-inbound-panel > .panel-head { display:flex; align-items:center; gap:12px; padding:6px 10px; min-height:0; }
.wb-finished-inbound-panel > .panel-head > .segmented { flex:1; padding:0; margin:0; }
.wb-finished-inbound-panel > .panel-head > button { height:34px; margin:0; display:inline-flex; align-items:center; justify-content:center; }
.wb-finished-inbound-panel > .panel-body { padding:6px; }
.wb-finished-transfer-content > .panel-body { padding:6px; }
.wb-finished-transfer-content [data-status]:empty { display:none; }
.wb-finished-inbound-panel .wb-filters { margin:10px 0; }
.wb-finished-inbound-panel [data-wb-detail] > .table-scroll { margin:0; }
.wb-filters.wb-inbound-register { grid-template-columns:220px minmax(150px,1fr) 120px auto auto; }
@media(max-width:800px){.wb-filters.wb-inbound-register{grid-template-columns:repeat(2,minmax(0,1fr));}}
.wb-filters.wb-compact.wb-with-pagination { grid-template-columns:220px minmax(130px,1fr) 100px minmax(160px,1.3fr) 34px auto; }
.wb-with-pagination > .wb-document-pager { margin:0; height:34px; gap:5px; white-space:nowrap; align-items:center; }
.wb-filters.wb-compact.wb-with-pagination.wb-finished-filters { grid-template-columns:220px 120px minmax(180px,1fr) 34px auto; }
@media(max-width:800px){.wb-filters.wb-compact.wb-with-pagination.wb-finished-filters{grid-template-columns:repeat(2,minmax(0,1fr));}.wb-finished-filters .wb-search{grid-column:1 / -1;}.wb-finished-filters .wb-reset{grid-column:1;justify-self:start;}}
@media(max-width:1100px){.wb-filters.wb-compact.wb-with-pagination{grid-template-columns:125px 125px minmax(120px,1fr) 100px;}.wb-with-pagination .wb-search{grid-column:1 / 3;}.wb-with-pagination .wb-reset{grid-column:3;justify-self:end;}}
@media(max-width:600px){.wb-filters.wb-compact.wb-with-pagination{grid-template-columns:repeat(2,minmax(0,1fr));}.wb-with-pagination .wb-search{grid-column:1 / -1;}.wb-with-pagination .wb-reset{grid-column:1;justify-self:start;}.wb-with-pagination > .wb-document-pager{justify-self:end;}}
@media(max-width:1100px){.wb-filters.wb-register-compact{grid-template-columns:130px 130px minmax(110px,1fr) minmax(140px,1.2fr) 100px auto;}}
@media(max-width:800px){.wb-filters.wb-register-compact{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:600px){.wb-filters.wb-register-compact{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:1100px){.wb-filters.wb-compact{grid-template-columns:130px 130px minmax(130px,1fr) 100px;}.wb-compact .wb-search{grid-column:1 / 4;}.wb-compact .wb-reset{justify-self:end;}}
@media(max-width:600px){.wb-filters.wb-compact{grid-template-columns:repeat(2,minmax(0,1fr));}.wb-compact .wb-search{grid-column:1;}.wb-compact .wb-reset{height:40px;}.wb-tabs-pager > .wb-pager{margin-left:auto;}}
.wb-export { display:flex; justify-content:flex-end; margin:4px 0; }
.wb-table>table { min-width:850px; width:100%; border-collapse:collapse; }
.wb-table th,.wb-table td { padding:9px 10px; border:1px solid #c8d7e3; text-align:left; }
.wb-table th { background:#d2e1eb; white-space:nowrap; }
.wb-table [data-wb-detail]>td { background:#f8fafc; padding:14px; }
.wb-table [hidden] { display:none!important; }
.wb-badge { display:inline-block; padding:3px 6px; border-radius:3px; white-space:nowrap; background:#edf2f6; }
[data-wb-document] > .month-folder-head > .action-row { align-items:center; }
[data-wb-document] > .month-folder-head > .action-row > .wb-badge { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; height:32px; margin:0; padding:0 6px; line-height:1; }
[data-wb-document] > .month-folder-head > .action-row > button { display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; height:32px; margin-top:0; margin-bottom:0; }
.wb-badge.wb-pending { background:#fff4d9; color:#775900; }
.wb-badge.wb-confirmed { background:#e3f3eb; color:#226344; }
.wb-badge.wb-review { background:#fce8e4; color:#9f3025; }
@media(max-width:1100px){.wb-filters{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:600px){.wb-filters{grid-template-columns:repeat(2,minmax(0,1fr));}.wb-filters input,.wb-filters select,.wb-filters button{min-height:40px;}.wb-table button{min-width:32px;min-height:32px;}}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(18, 32, 46, 0.45);
  padding: 12px;
  animation: none;
  z-index: 60;
}

.hidden {
  display: none;
}

.modal-card {
  width: min(820px, calc(100vw - 24px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 0;
  box-shadow: 0 8px 28px rgba(16, 28, 40, 0.28);
  animation: none;
  border: 1px solid #7d93a6;
}

.modal-card.sheet {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 56px);
}

#modal .modal-card:has(.order-exceptions) {
  width: min(1200px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 48px);
}
#modal .order-exceptions-scroll {
  max-height: min(56vh, calc(100dvh - 220px));
  overflow: auto;
}
#modal .order-exceptions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
}
#modal .order-exceptions > .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid #cbd9e5;
}
#modal .order-exceptions [data-exception-view] {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #526b80;
  padding: 8px 10px;
  min-height: 34px;
  font: inherit;
  cursor: pointer;
}
#modal .order-exceptions [data-exception-view]:hover {
  background: #eef4f8;
}
#modal .order-exceptions [data-exception-view].active {
  color: #1e557f;
  border-bottom-color: #1e557f;
  font-weight: 600;
}
#modal .order-exceptions [data-exception-view]:focus-visible {
  outline: 2px solid #1e557f;
  outline-offset: -2px;
}
#modal .order-exceptions > .filters {
  align-self: center;
  margin: 0;
  color: #526b80;
  font-size: 12px;
}
#modal .order-exceptions > .order-exceptions-scroll,
#modal .order-exceptions > .form-actions {
  grid-column: 1 / -1;
  min-width: 0;
}
@media (max-width: 640px) {
  #modal .order-exceptions { grid-template-columns: minmax(0, 1fr); }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #163a5c;
  padding: 7px 10px;
  background: var(--primary);
  color: #fff;
}

.modal-head h2 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.icon-button {
  width: 26px;
  height: 26px;
  border: 1px solid #7ea4c8;
  border-radius: 0;
  background: #163a5c;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  color: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.form-grid.compact,
.form-grid.form-meta {
  display: block;
  padding: 0;
}

.purchase-request-lines {
  margin: -7px -9px;
}

.purchase-request-line {
  min-height: 28px;
  padding: 5px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #b9cadb;
  box-sizing: border-box;
}

.purchase-request-line:last-child {
  border-bottom: 0;
}

.modal-card.sheet:has(.manual-customer-receipt) {
  width: min(960px, calc(100vw - 24px));
  max-width: min(960px, calc(100vw - 24px)) !important;
}
.manual-customer-receipt [data-manual-line] {
  padding: 12px 0;
  border-bottom: 1px solid #ccd9e2;
  align-items: end;
}
.manual-customer-receipt [data-remove] {
  justify-self: end;
  width: auto;
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.password-row input {
  width: 100%;
}

.account-page {
  width: 100%;
  display: grid;
  gap: 12px;
}

.account-card {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.account-status-grid {
  margin-bottom: 14px;
}

.account-section-title {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 700;
}

.account-form {
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  gap: 10px;
  max-width: 640px;
  padding: 0;
}

.account-form-split {
  max-width: 640px;
  height: 1px;
  background: var(--line);
  margin: 16px 0 12px;
}

.account-form .form-actions {
  justify-content: flex-start;
  background: transparent;
  padding: 0;
  border-top: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 500;
}

.field .check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--ink);
}

.field .check-row input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: #f4f7fa;
}

.process-raw-editor {
  margin: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fbfd;
}

.process-raw-head,
.process-raw-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.process-raw-head {
  margin-bottom: 8px;
}

.process-raw-list {
  display: grid;
  gap: 6px;
}

.process-raw-row input {
  width: 100%;
  min-width: 0;
}

.raw-material-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 180px;
}

.raw-material-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border: 1px solid #c7d7e4;
  background: #f8fbfd;
  color: #12364d;
  white-space: nowrap;
}

.production-order-search {
  margin: 8px 0 10px;
}

.production-process-lines {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.production-process-lines span {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.scan-code-form {
  grid-template-columns: 1fr;
  gap: 10px;
}

.scan-code-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: #f8fbfd;
}

.scan-code-label {
  display: grid;
  gap: 8px;
}

.scan-code-label span {
  color: #536879;
  font-size: 13px;
}

.scan-code-label strong {
  font-size: 30px;
  line-height: 1.1;
  color: #0f2f3a;
}

.scan-code-label em {
  font-style: normal;
  color: #334155;
  font-size: 14px;
}

.scan-code-preview img {
  width: 220px;
  height: 220px;
  justify-self: center;
  background: #fff;
  border: 1px solid #d4e0e7;
  padding: 8px;
}

.scan-code-form label.full {
  display: grid;
  gap: 6px;
}

.scan-code-form label.full span {
  color: #536879;
  font-size: 12px;
}

@media (max-width: 640px) {
  .account-page {
    max-width: none;
  }

  .account-form,
  .account-form-split {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .scan-code-preview {
    grid-template-columns: 1fr;
  }

  .scan-code-label strong {
    font-size: 24px;
  }
}

.movement-note {
  margin: 14px 16px 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #eef3f6;
  color: #31505d;
  font-size: 13px;
}

.movement-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 14px 16px 0;
  padding: 14px;
  min-width: 0;
}

.movement-section legend {
  padding: 0 8px;
  color: #1f3440;
  font-weight: 700;
}

.movement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.login-panel {
  max-width: 460px;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.auth-grid.single {
  grid-template-columns: minmax(320px, 520px);
  justify-content: center;
}

.stack-form {
  display: grid;
  gap: 12px;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
}

.bar {
  display: grid;
  grid-template-columns: 92px 1fr 88px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.bar-track {
  height: 12px;
  background: #edf2f5;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
}

.stacked-panels {
  display: grid;
  gap: 16px;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  #nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .current-nav-group {
    display: contents;
  }

  .current-nav-group .nav-group-title,
  .current-nav-group .nav-subhead {
    grid-column: 1 / -1;
  }

  .kpi-grid,
  .dashboard-grid,
  .auth-grid,
  .flow,
  .detail-grid,
  .movement-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .panel-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .top-module-nav {
    align-self: auto;
    flex-wrap: wrap;
    overflow: visible;
  }

  .top-module-button {
    min-height: 32px;
    padding: 6px 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .flow-hint-steps {
    grid-template-columns: 1fr;
  }

  #nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paint-line-head,
  .paint-work-grid,
  .production-shift-row,
  .paint-output-row,
  .paint-material-row,
  .lamination-output-row,
  .paint-line-cards {
    grid-template-columns: 1fr;
  }

  .paint-line-summary {
    white-space: normal;
  }
}

.sheet-form {
  display: block;
  padding: 0;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.meta-table th {
  width: 110px;
  background: #e8eef4;
  color: #1a3348;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  padding: 4px 8px;
  white-space: nowrap;
}

.meta-table td {
  background: #fff;
  padding: 2px 4px;
}

.meta-table input,
.meta-table select,
.meta-table textarea,
.entry-grid input,
.entry-grid select,
.entry-grid textarea {
  width: 100%;
  min-height: 26px;
  border: 1px solid #9aafc0;
  border-radius: 0;
}

.sheet-block {
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.sheet-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 8px;
  background: #e8eef4;
  border-bottom: 1px solid var(--line);
}

.sheet-block-head strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-strong);
}

.entry-grid {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
}

.entry-grid th {
  font-size: 11px;
  padding: 4px 6px;
}

.entry-grid .entry-grid-groups th,
.process-book-grouped-table .group-head th {
  text-align: center;
  font-weight: 700;
  color: var(--primary-strong);
  background: #eef4f8;
  border-bottom: 1px solid var(--primary);
}

.entry-grid td {
  padding: 1px;
  background: #fff;
}

.entry-grid .col-actions {
  width: 36px;
  text-align: center;
}

.entry-grid .col-seq {
  width: 54px;
}

.process-book-grouped-table th,
.process-book-grouped-table td {
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.process-book-grouped-table {
  table-layout: fixed;
  min-width: 820px;
}

.sales-pdf-order-table {
  min-width: 1900px;
}

.process-book-grouped-table .col-seq {
  width: 52px;
}

.process-book-grouped-table .col-code {
  width: 110px;
}

.process-book-grouped-table .col-name {
  width: 320px;
}

.process-book-grouped-table .col-process {
  width: 360px;
}

.process-book-grouped-table .col-qty {
  width: 76px;
  white-space: nowrap;
}

.process-book-grouped-table td.col-name,
.process-book-grouped-table td.col-process {
  text-align: left;
}

.process-book-grouped-table .col-actions {
  width: 92px;
  white-space: nowrap;
}

.entry-grid th.col-kk,
.entry-grid td.col-kk {
  width: 220px;
}

.import-only-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  background: #f8fbfd;
}

.import-only-box label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

.import-only-box input[type="file"] {
  width: 100%;
}

.import-only-box .hint {
  grid-column: 1 / -1;
}

.search-select {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #9aafc0;
}

.search-select-input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 26px;
  padding: 2px 6px;
}

.search-select-toggle {
  border: 0;
  background: #eef3f7;
  color: #4a5d6c;
  width: 22px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.search-select-menu {
  overflow: auto;
  background: #fff;
  border: 1px solid #9aafc0;
  box-shadow: 0 8px 20px rgba(30, 50, 70, 0.18);
}

.search-select-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
}

.search-select-option:hover,
.search-select-option.is-active {
  background: #e7f0f8;
}

.search-select-label {
  min-width: 0;
}

.search-select-hint {
  color: #6a7b8a;
  font-size: 11px;
  flex-shrink: 0;
}

.search-select-empty {
  padding: 8px;
  color: #6a7b8a;
  font-size: 12px;
}

.import-optional {
  margin: 0;
  border-top: 1px dashed #b8c4d0;
  background: #f7f9fb;
}

.import-optional summary {
  cursor: pointer;
  padding: 6px 10px;
  color: #6a7b8a;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
}

.import-optional summary::-webkit-details-marker {
  display: none;
}

.import-optional summary::before {
  content: "+ ";
  font-weight: 700;
}

.import-optional[open] summary::before {
  content: "– ";
}

.import-optional-body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 8px;
  flex-wrap: wrap;
}

.modal-card.sheet .form-actions {
  position: sticky;
  bottom: 0;
}

.template-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(260px, 360px);
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}

.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  z-index: 32;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(16, 28, 40, 0.32);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.ai-fab.hidden {
  display: none;
}

.ai-fab:hover {
  transform: scale(1.06);
  background: var(--primary-strong);
}

.ai-fab.is-open {
  transform: scale(0.94);
  box-shadow: 0 4px 12px rgba(16, 28, 40, 0.28);
}

.ai-fab-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ai-panel {
  position: fixed;
  right: 18px;
  bottom: 80px;
  width: min(380px, calc(100vw - 24px));
  height: min(540px, calc(100vh - 110px));
  background: #fff;
  border: 1px solid #7d93a6;
  z-index: 31;
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr) auto;
  opacity: 0;
  transform: translate3d(0, 16px, 0) scale(0.96);
  transform-origin: 100% 100%;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  box-shadow: 0 16px 40px rgba(16, 28, 40, 0.28);
}

.ai-panel.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 12px;
  background: var(--primary);
  color: #fff;
}

.ai-head strong {
  font-size: 13px;
}

.ai-messages {
  overflow: auto;
  padding: 10px;
  background: #eef3f7;
  display: grid;
  align-content: start;
  gap: 8px;
}

.ai-bubble {
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--line);
  background: #fff;
  white-space: pre-wrap;
}

.ai-bubble.user {
  background: #d7e3ef;
  justify-self: end;
  max-width: 92%;
}

.ai-bubble.assistant {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.ai-bubble.assistant p,
.ai-bubble.assistant .ai-heading {
  margin: 0 0 0.5em;
}

.ai-bubble.assistant p:last-child,
.ai-bubble.assistant ul:last-child,
.ai-bubble.assistant ol:last-child,
.ai-bubble.assistant .ai-table-wrap:last-child {
  margin-bottom: 0;
}

.ai-bubble.assistant .ai-heading {
  font-weight: 700;
}

.ai-bubble.assistant ul,
.ai-bubble.assistant ol {
  margin: 0.2em 0 0.55em;
  padding-left: 1.25em;
}

.ai-bubble.assistant li {
  margin: 0.2em 0;
}

.ai-bubble.assistant code {
  font-family: inherit;
  background: #eef3f7;
  padding: 0 4px;
}

.ai-bubble.assistant .ai-table-wrap {
  overflow-x: auto;
  margin: 0.4em 0 0.6em;
}

.ai-bubble.assistant table.ai-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
  font-size: 12px;
}

.ai-bubble.assistant table.ai-table th,
.ai-bubble.assistant table.ai-table td {
  border: 1px solid #c5d0da;
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.ai-bubble.assistant table.ai-table th {
  background: #eef3f7;
  font-weight: 700;
}

.ai-bubble.assistant table.ai-table tbody tr:nth-child(even) td {
  background: #f7fafc;
}

.ai-bubble.meta {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  padding: 0 2px;
}

.ai-bubble.pending {
  color: var(--muted);
  font-style: italic;
}

.doc-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.doc-link:hover {
  color: #0b4f63;
}

.month-folder.doc-flash,
tr.doc-flash {
  outline: 2px solid #c2410c;
  outline-offset: 2px;
}

.ai-form {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid var(--line);
  background: #f4f7fa;
}

.ai-form textarea {
  width: 100%;
  border: 1px solid #9aafc0;
  border-radius: 0;
  padding: 6px;
  resize: vertical;
  min-height: 64px;
}

.app-shell.login-only {
  grid-template-columns: 1fr;
  height: 100vh;
  overflow: hidden;
}

.app-shell.login-only .sidebar,
.app-shell.login-only .topbar,
.app-shell.login-only .ai-panel {
  display: none;
}

.app-shell.scan-only {
  display: block;
  height: auto;
  min-height: 100vh;
  overflow: auto;
  background: #eef6fb;
}

.app-shell.scan-only .sidebar,
.app-shell.scan-only .topbar,
.app-shell.scan-only .ai-panel,
.app-shell.scan-only ~ .ai-fab {
  display: none;
}

.app-shell.scan-only .main {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

.app-shell.scan-only .content {
  min-height: 100vh;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(230, 244, 252, 0.9)),
    radial-gradient(circle at 80% 0%, rgba(17, 126, 190, 0.16), transparent 42%);
}

.scan-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 16px 28px;
}

.scan-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.scan-brand img {
  width: 64px;
  height: auto;
  flex: 0 0 auto;
}

.scan-brand strong,
.scan-brand span {
  display: block;
}

.scan-brand strong {
  color: #092349;
  font-size: 18px;
  font-weight: 800;
}

.scan-brand span {
  margin-top: 3px;
  color: #667990;
  font-size: 13px;
}

.scan-card {
  border: 1px solid rgba(143, 169, 190, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(23, 72, 112, 0.12);
  padding: 22px 18px;
}

.scan-label {
  margin: 0 0 8px;
  color: #0b79a5;
  font-size: 13px;
  font-weight: 800;
}

.scan-card h1 {
  margin: 0 0 16px;
  color: #071f45;
  font-size: 28px;
  line-height: 1.15;
  word-break: break-word;
}

.scan-muted {
  margin: 14px 0 0;
  color: #60758d;
  font-size: 14px;
  line-height: 1.6;
}

.scan-card .field {
  margin-top: 14px;
}

.scan-card .field label {
  color: #41556d;
  font-size: 13px;
  font-weight: 700;
}

.scan-card .field input {
  min-height: 46px;
  border-radius: 8px;
  font-size: 16px;
}

.scan-primary {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
}

.scan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.scan-info {
  border: 1px solid #d2dee8;
  border-radius: 10px;
  background: #f8fbfd;
  padding: 12px;
}

.scan-info span,
.scan-info strong {
  display: block;
}

.scan-info span {
  color: #60758d;
  font-size: 12px;
  font-weight: 700;
}

.scan-info strong {
  margin-top: 5px;
  color: #10233a;
  font-size: 17px;
  line-height: 1.35;
  word-break: break-word;
}

.scan-section-title {
  margin: 18px 0 10px;
  color: #092349;
  font-size: 15px;
  font-weight: 800;
}

.scan-work-list {
  display: grid;
  gap: 10px;
}

.scan-work-item {
  border: 1px solid #d2dee8;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.scan-work-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #eef6fb;
  border-bottom: 1px solid #d2dee8;
}

.scan-work-item-head strong {
  color: #0f2f4a;
  font-size: 15px;
}

.scan-work-item dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}

.scan-work-item dl > div {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f6;
}

.scan-work-item dl > div:last-child {
  border-bottom: 0;
}

.scan-work-item dt {
  margin: 0 0 4px;
  color: #60758d;
  font-size: 12px;
  font-weight: 700;
}

.scan-work-item dd {
  margin: 0;
  color: #10233a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.scan-work-item .raw-material-list {
  min-width: 0;
}

.scan-qc-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c7d7e4;
  border-radius: 8px;
  padding: 8px 10px;
  color: #10233a;
  background: #f8fbfd;
  font-size: 16px;
  font-weight: 800;
  box-sizing: border-box;
}

.scan-qc-input:disabled {
  color: #617389;
  background: #eef3f7;
}

.scan-confirm-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #c7d7e4;
  border-radius: 12px;
  background: #f8fbfd;
}

.scan-confirm-box > div:first-child span {
  display: block;
  color: #60758d;
  font-size: 12px;
  font-weight: 800;
}

.scan-confirm-box > div:first-child strong {
  display: block;
  margin-top: 3px;
  color: #10233a;
  font-size: 18px;
}

.scan-confirm-grid {
  display: grid;
  gap: 10px;
}

.scan-confirm-grid label {
  display: grid;
  gap: 6px;
  color: #60758d;
  font-size: 12px;
  font-weight: 800;
}

.scan-confirm-grid input {
  min-height: 42px;
  border: 1px solid #c7d7e4;
  border-radius: 8px;
  padding: 8px 10px;
  color: #10233a;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  box-sizing: border-box;
}

.scan-confirm-button {
  width: 100%;
  min-height: 44px;
}

.scan-confirm-box.locked {
  border-color: #9fd5be;
  background: #f2fbf6;
}

.scan-confirm-box.locked dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.scan-confirm-box.locked dl > div {
  display: grid;
  gap: 3px;
}

.scan-confirm-box.locked dt,
.scan-confirm-box.locked dd {
  margin: 0;
}

.scan-confirm-box.locked dt {
  color: #60758d;
  font-size: 12px;
  font-weight: 800;
}

.scan-confirm-box.locked dd {
  color: #10233a;
  font-size: 15px;
  font-weight: 800;
}

.department-work-date > .month-folder-head {
  background: #dceaf5;
}

.app-shell.login-only .main {
  height: 100vh;
  overflow: auto;
}

.app-shell.login-only .content {
  min-height: 100%;
  padding: 0;
  font-family: "DengXian", "等线", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(237, 248, 255, 0.9)),
    radial-gradient(circle at 76% 18%, rgba(38, 150, 221, 0.14), transparent 34%),
    linear-gradient(135deg, #f8fcff 0%, #edf8ff 52%, #dceef9 100%);
  position: relative;
  overflow: hidden;
}

.app-shell.login-only .content *,
.app-shell.login-only .content input,
.app-shell.login-only .content button,
.app-shell.login-only .content select {
  font-family: "DengXian", "等线", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

.app-shell.login-only .content::before {
  content: "";
  position: absolute;
  inset: auto -2% -10% -2%;
  height: 72%;
  background:
    linear-gradient(rgba(246, 252, 255, 0.2), rgba(246, 252, 255, 0.44)),
    repeating-linear-gradient(90deg, rgba(52, 139, 197, 0.12) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(52, 139, 197, 0.08) 0 1px, transparent 1px 54px),
    linear-gradient(28deg, transparent 0 18%, rgba(101, 177, 222, 0.13) 18.2% 18.8%, transparent 19% 43%, rgba(101, 177, 222, 0.12) 43.2% 43.8%, transparent 44%),
    linear-gradient(152deg, transparent 0 29%, rgba(101, 177, 222, 0.12) 29.2% 29.8%, transparent 30% 58%, rgba(101, 177, 222, 0.1) 58.2% 58.8%, transparent 59%);
  transform: skewY(-5deg);
  transform-origin: right bottom;
}

.app-shell.login-only .content::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: 10%;
  width: 280px;
  height: 170px;
  border: 1px solid rgba(46, 132, 190, 0.16);
  border-width: 1px 0 0 1px;
  opacity: 0.55;
}

.login-stage {
  width: 1676px;
  height: 943px;
  min-height: 943px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.login-hero {
  display: block;
  padding: 0;
}

.login-language {
  position: absolute;
  top: 38px;
  right: 70px;
}

.login-language select {
  width: 132px;
  min-height: 44px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(135, 163, 188, 0.42);
  color: #092349;
  font-weight: 700;
}

.login-brand-block {
  position: absolute;
  top: 80px;
  left: 108px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.login-brand-block img {
  width: 112px;
  height: auto;
  object-fit: contain;
}

.login-brand-block h1 {
  margin: 0;
  color: #071f45;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 900;
}

.login-brand-block p {
  margin: 8px 0 0;
  color: #314b69;
  font-size: 20px;
}

.login-quote-card {
  min-height: 278px;
  width: 846px;
  position: absolute;
  top: 263px;
  left: 108px;
  border: 1px solid rgba(93, 172, 222, 0.48);
  border-radius: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.72), rgba(237, 249, 255, 0.4)),
    rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  padding: 48px 50px 44px;
  backdrop-filter: blur(6px);
  margin-top: 0;
}

.login-quote-card .quote-accent {
  width: 74px;
  height: 5px;
  background: #12b7c9;
  border-radius: 999px;
  margin-bottom: 26px;
}

.login-quote-card h2 {
  margin: 0 0 29px;
  color: #081f46;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
}

.login-quote-card .quote-main {
  margin: 0;
  color: #081f46;
  font-size: 35px;
  line-height: 1.45;
  font-weight: 900;
}

.login-quote-card .quote-note {
  margin: 13px 0 0;
  color: #3e5b79;
  font-size: 22px;
  line-height: 1.65;
}

.login-quote-card::after {
  content: "—— 荀子";
  position: absolute;
  right: 78px;
  bottom: 34px;
  color: #45617f;
  font-size: 20px;
}

.login-card {
  width: 558px;
  min-height: 550px;
  position: absolute;
  top: 224px;
  left: 1005px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 70px rgba(18, 64, 106, 0.14);
  padding: 66px 68px 42px;
  margin-top: 0;
}

.login-card .panel-head,
.login-card .panel-body {
  padding: 0;
  border: 0;
  background: transparent;
}

.login-card .panel-head h2 {
  color: #071f45;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 900;
  margin-bottom: 34px;
}

.login-card .panel-head h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: #00a7c7;
  margin-top: 18px;
}

.login-field {
  margin-top: 22px;
  position: relative;
}

.login-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.login-field input {
  min-height: 64px;
  border-radius: 6px;
  border-color: rgba(145, 165, 190, 0.46);
  background: rgba(255, 255, 255, 0.92);
  font-size: 21px;
  padding-left: 66px;
  color: #071f45;
}

.login-field input::placeholder {
  color: #7f8da0;
  opacity: 1;
}

.login-card .password-row {
  display: block;
  position: relative;
}

.login-card .password-row .secondary {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  color: transparent;
  background: transparent;
  font-size: 0;
  overflow: hidden;
  white-space: nowrap;
}

.login-card .password-row .secondary::before {
  content: "";
  display: block;
  width: 20px;
  height: 14px;
  margin: 8px auto;
  border: 2px solid #8093ad;
  border-radius: 50%;
}

.login-card .password-row .secondary::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8093ad;
  transform: translate(-50%, -50%);
}

.login-user-field::before,
.login-password-field::before,
.login-password-field::after {
  content: none;
}

.login-user-field input,
.login-password-field input {
  padding-left: 20px;
}

.login-password-field input {
  padding-right: 60px;
}

.login-card .login-actions {
  margin-top: 40px;
}

.login-card .login-actions .primary {
  min-height: 60px;
  border-radius: 6px;
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #106fb2, #075a9a);
  box-shadow: 0 10px 24px rgba(8, 95, 166, 0.18);
}

.login-cloud-note {
  margin: 32px 0 0;
  color: #73849a;
  font-size: 18px;
  text-align: center;
}

.login-cloud-note::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 13px;
  margin-right: 10px;
  vertical-align: -2px;
  border: 3px solid #7c8fa8;
  border-top-color: transparent;
  border-radius: 12px;
  box-shadow: 6px -6px 0 -3px #7c8fa8, -5px -4px 0 -4px #7c8fa8;
  opacity: 0.9;
}

@media (max-width: 1675px) and (min-width: 1101px) {
  .app-shell.login-only .main {
    overflow: hidden;
  }

  .login-stage {
    transform: scale(calc(100vw / 1676));
    transform-origin: top left;
    margin: 0;
  }

  .login-language {
    top: 38px;
    right: 70px;
  }

  .login-brand-block {
    top: 80px;
    left: 108px;
  }

  .login-brand-block img {
    width: 112px;
  }

  .login-brand-block h1 {
    font-size: 38px;
  }

  .login-brand-block p {
    font-size: 20px;
  }

  .login-quote-card {
    top: 263px;
    left: 108px;
    width: 846px;
    min-height: 278px;
    padding: 48px 50px 44px;
  }

  .login-quote-card h2 {
    font-size: 36px;
  }

  .login-quote-card .quote-main {
    font-size: 35px;
  }

  .login-quote-card .quote-note {
    font-size: 22px;
  }

  .login-card {
    top: 224px;
    left: 1005px;
    right: auto;
    width: 558px;
    min-height: 550px;
    padding: 66px 68px 42px;
  }

  .login-card .panel-head h2 {
    font-size: 42px;
  }

  .login-field input {
    min-height: 64px;
  }

  .login-card .login-actions .primary {
    min-height: 60px;
  }
}

@media (max-width: 1100px) {
  .login-stage {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    margin: 0;
  }

  .login-hero {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    padding: 32px 18px;
    row-gap: 20px;
  }

  .login-language {
    position: static;
    justify-self: end;
    grid-column: 1;
    grid-row: 1;
  }

  .login-brand-block {
    position: static;
    grid-column: 1;
    grid-row: 2;
    gap: 14px;
  }

  .login-brand-block img {
    width: 78px;
  }

  .login-brand-block h1 {
    font-size: 24px;
    white-space: normal;
  }

  .login-brand-block p {
    font-size: 15px;
  }

  .login-quote-card {
    position: static;
    width: auto;
    padding: 32px 26px;
    min-height: auto;
    margin-top: 0;
  }

  .login-quote-card h2 {
    font-size: 30px;
  }

  .login-quote-card .quote-main {
    font-size: 23px;
  }

  .login-quote-card .quote-note {
    font-size: 15px;
  }

  .login-card {
    position: static;
    width: auto;
    min-width: 0;
    min-height: auto;
    padding: 34px 26px;
    margin-top: 0;
  }

  .login-card .panel-head h2 {
    font-size: 30px;
  }
}

.login-error {
  color: var(--red);
  margin: 12px 0 0;
  font-size: 13px;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  grid-column: 1 / -1;
}

.perm-group {
  border: 1px solid var(--line);
  background: #f7fafc;
  padding: 10px;
}

.perm-group strong {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
}

.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  font-size: 12px;
}

.perm-row span {
  min-width: 0;
  line-height: 1.3;
}

.perm-row select {
  width: 96px;
  flex: 0 0 auto;
}

.report-dashboard .panel-body {
  padding-top: 12px;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.report-kpis.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.report-kpis .kpi.ok {
  border-color: #10b981;
}

.report-kpis .kpi.warn {
  border-color: #f59e0b;
}

.report-kpis .kpi.danger {
  border-color: #ef4444;
}

.invoice-filter-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.invoice-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.invoice-filter-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.invoice-filter-grid input,
.invoice-filter-grid select {
  min-width: 0;
  width: 100%;
}

.aging-chart {
  display: grid;
  gap: 14px;
}

.aging-pie-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.aging-pie {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.aging-pie-center {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.aging-pie-center span {
  font-size: 11px;
  color: var(--muted);
}

.aging-pie-center strong {
  font-size: 13px;
  line-height: 1.2;
}

.aging-pie-legend {
  display: grid;
  gap: 8px;
  font-size: 12px;
}

.aging-pie-legend div {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
}

.aging-pie-legend i {
  width: 10px;
  height: 10px;
  display: block;
}

.aging-chart-row {
  display: grid;
  grid-template-columns: 120px minmax(120px, 1fr) 130px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.aging-chart-row strong {
  text-align: right;
}

.aging-chart-track {
  height: 18px;
  background: #e6edf3;
  border: 1px solid var(--line);
  overflow: hidden;
}

.aging-chart-fill {
  height: 100%;
  background: #2563eb;
}

.aging-chart-fill.ok {
  background: #10b981;
}

.aging-chart-fill.warn {
  background: #f59e0b;
}

.aging-chart-fill.danger {
  background: #ef4444;
}

.mini-column-chart {
  min-height: 160px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: end;
  padding: 10px 4px 0;
  border-bottom: 1px solid var(--line);
}

.mini-column {
  display: grid;
  gap: 8px;
  justify-items: center;
  font-size: 12px;
  color: var(--muted);
}

.mini-column-bars {
  height: 130px;
  display: flex;
  align-items: end;
  gap: 4px;
}

.mini-column-bars i {
  display: block;
  width: 14px;
  min-height: 4px;
}

.mini-column-bars .receive,
.chart-legend .receive {
  background: #2563eb;
}

.mini-column-bars .pay,
.chart-legend .pay {
  background: #ef4444;
}

.chart-legend {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  display: inline-block;
}

@media (max-width: 760px) {
  .aging-pie-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .aging-pie-legend {
    width: 100%;
  }

  .aging-chart-row {
    grid-template-columns: 80px 1fr;
  }

  .aging-chart-row strong {
    grid-column: 2;
    text-align: left;
  }
}

/* Final visual refinement overrides. */

.cost-accounting-page .tabs {
  gap: 18px;
  min-height: 32px;
  margin-bottom: 10px;
  padding: 0 2px;
  border-bottom: 1px solid #c3d0db;
  background: transparent;
}

.cost-accounting-page .tabs .tab {
  min-height: 32px;
  padding: 5px 1px 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #53697a;
  font-weight: 500;
}

.cost-accounting-page .tabs .tab:hover {
  background: transparent;
  color: #164f7c;
}

.cost-accounting-page .tabs .tab.active {
  border-bottom-color: #165785;
  background: transparent;
  color: #164f7c;
  font-weight: 700;
}

.cost-summary-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 24px;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-top: 1px solid #c3d0db;
  border-bottom: 1px solid #c3d0db;
  background: #edf3f8;
  color: #43596b;
  font-size: 12px;
}

.cost-summary-strip span {
  white-space: nowrap;
}

.cost-summary-strip strong {
  margin-left: 5px;
  color: #173d5d;
  font-size: 13px;
}

.cost-setting-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.cost-setting-panel {
  min-width: 0;
  border: 0;
  background: transparent;
}

.cost-setting-panel .subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 35px;
  padding: 5px 8px;
  border-top: 1px solid #bdccda;
  border-bottom: 1px solid #bdccda;
  background: #e8f0f6;
}

.cost-setting-panel .detail-list {
  padding: 4px 8px 8px;
}

.cost-main-table {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .cost-setting-grid {
    grid-template-columns: 1fr;
  }

  .cost-summary-strip {
    gap: 5px 14px;
  }
}
:root {
  --bg: #e8edf2;
  --ink: #162331;
  --muted: #607182;
  --line: #c7d2dc;
  --line-strong: #9eb0bf;
  --head: #e4edf5;
  --chrome: #192b3b;
  --radius: 6px;
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.45;
}

.app-shell { grid-template-columns: 224px minmax(0, 1fr); }
.sidebar { padding-top: 0; background: var(--chrome); border-right-color: #10202e; }
.brand { min-height: 62px; padding: 10px 16px; margin-bottom: 8px; border-bottom-color: #304454; }
.brand-mark { width: 52px; height: 38px; }
.brand span { color: #9babb9; }
.nav-group { margin-top: 10px; }
.nav-group-title { padding: 10px 16px 5px; color: var(--nav-heading); font-size: 10px; }
.nav-subhead { padding: 9px 16px 3px 20px; color: var(--nav-subheading); }
.nav-button + .nav-subhead { margin-top: 10px; }
.nav-button { min-height: 34px; padding: 7px 16px; gap: 9px; color: #cbd5de; transition: background-color 120ms ease, color 120ms ease; }
.nav-button:hover { background: #233a4d; }
.nav-button.active { background: #145181; border-left-color: #a5c8e5; }

.topbar {
  min-height: 52px;
  padding: 0 18px;
  background: #f8fafc;
  border-bottom: 1px solid #9fb2c2;
  box-shadow: 0 1px 4px rgba(28, 51, 70, 0.08);
}
h1 { font-size: 16px; color: #16364f; }
.top-module-button { padding: 0 13px; border-bottom-width: 2px; color: #43576a; }
.top-module-button:hover { background: #edf3f7; }
.top-module-button.active { background: #e9f0f6; }
#currentUserName { color: #34495a; white-space: nowrap; }
.content { padding: 16px 18px 32px; }
.app-shell:not(.login-only):not(.scan-only) .content[data-rendered-module] { padding:6px; }
.content[data-rendered-module] > .panel { margin-bottom:8px; }
.content[data-rendered-module] > .panel:last-child { margin-bottom:0; }
.content[data-rendered-module] > .panel > .panel-head { min-height:0; padding:6px 10px; }
.content[data-rendered-module] > .panel > .panel-body { padding:6px; }

.panel {
  margin-bottom: 14px;
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(24, 43, 59, 0.05);
}
.panel-head { min-height: 42px; padding: 8px 12px; background: var(--head); border-bottom-color: #bdcad5; }
.panel-head h2 { font-size: 14px; color: #173d5d; }
.panel-body { padding: 12px; }
.subpanel, .month-folder, .schedule-cal, .trace-card, .approval-shortcut, .log-date-group { border-radius: 5px; overflow: hidden; }
.subpanel-head, .month-folder-head { min-height: 40px; background: #f3f7fa; }
.inbound-month-group { border: 0; border-radius: 0; }
.inbound-month-group > .month-folder-head { background: #dce7f0; border-left: 3px solid var(--primary); padding: 10px 12px 10px 48px; }
.inbound-month-group > .month-folder-head strong { font-size: 16px; }
.inbound-month-group > .month-folder-head > div { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.inbound-month-documents { margin: 0 0 12px 18px; border-left: 1px solid #b9c7d3; padding-left: 8px; }
.inbound-month-documents > .month-folder { border-radius: 0; margin: 0; }
.inbound-month-documents .month-folder-head { min-height: 36px; padding-top: 6px; padding-bottom: 6px; background: #fff; }
.insole-receipt-editor { grid-column: 1/-1; min-width: 0; padding: 12px; }
.insole-receipt-editor td { min-width: 125px; }
.insole-receipt-editor input { width: 100%; min-width: 100px; }
.insole-receipt-editor th { min-width: 100px; }
.insole-receipt-editor [data-receipt-error] { color: #a82920; margin: 8px 0 0; }
.insole-receipt-details { max-width: 380px; }
.insole-receipt-details > .table-scroll { max-width: 380px; }
.insole-receipt-details [role="rowheader"], .insole-receipt-details [role="cell"] { padding: 7px; border: 1px solid #ccd6df; text-align: center; }
.kpi-grid, .report-kpis { gap: 10px; }
.kpi { min-height: 72px; padding: 11px 13px; border-radius: 6px; border-color: var(--line); }
.kpi strong { margin-top: 6px; font-size: 19px; }

.primary, .secondary, .danger, .mini {
  min-height: 29px;
  border-radius: 4px;
  padding: 5px 10px;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.primary { border-color: var(--primary); box-shadow: 0 1px 1px rgba(17, 49, 76, 0.12); }
.secondary { border-color: #a8b8c6; color: #294256; }
.mini { background: #f8fafc; border-color: #b7c5d1; color: #214966; }
.mini:hover, .secondary:hover { background: #eaf1f6; border-color: #8299ab; }
.danger, .secondary.danger { border-color: #e3aaa6; background: #fff7f6; color: #a82920; }

.user-box select, .field input, .field select, .field textarea,
.toolbar input, .toolbar select, .meta-table input, .meta-table select,
.meta-table textarea, .entry-grid input, .entry-grid select, .entry-grid textarea,
.table-search, .document-trace-search input {
  min-height: 32px;
  padding: 5px 8px;
  border-color: #a9bac8;
  border-radius: 4px;
}
.field { gap: 5px; }
.field > label, .toolbar label, .meta-table th { color: #42586b; font-weight: 600; }
.table-scroll, .wide-table-wrap { border-color: #b9c7d3; border-radius: 5px; }
th, td { padding: 7px 8px; border-color: #ccd6df; }
th { background: #dce7f0; color: #183b57; }
tbody tr:nth-child(even) td { background-color: #fbfcfd; }
tbody tr:hover td { background-color: #f0f6fa; }
td.col-actions .action-row { gap: 5px; flex-wrap: nowrap; }
.tag { border-radius: 4px; padding: 3px 7px; font-weight: 600; }
.folder-tab-group { margin-bottom: 12px; border-bottom-color: #afbfcc; }
.folder-tab-button { min-height: 34px; padding: 7px 13px 8px; }
.folder-tab-button.active { border-color: #afbfcc; padding-bottom: 9px; }
.segmented, .folder-tabs { border-radius: 5px; overflow: hidden; }

.modal { background: rgba(14, 28, 40, 0.52); backdrop-filter: blur(1px); }
.modal-card { border-color: #8298a9; border-radius: 7px; box-shadow: 0 18px 48px rgba(15, 30, 43, 0.28); }
.modal-head { min-height: 44px; padding: 8px 12px; background: #1b4c73; }
.modal-head h2 { font-size: 14px; }
.icon-button { width: 28px; height: 28px; border-radius: 4px; }
.form-grid { gap: 10px; padding: 14px; }
.empty-state { padding: 24px 16px; color: var(--muted); background: #fbfcfd; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
.top-scrollbar { display: none; }
*::-webkit-scrollbar-track { background: #eef2f5; }
*::-webkit-scrollbar-thumb {
  min-width: 36px;
  min-height: 36px;
  border: 2px solid #eef2f5;
  border-radius: 6px;
  background: #aebcc8;
}
*::-webkit-scrollbar-thumb:hover { background: #93a5b4; }
.sidebar, .top-module-nav { scrollbar-width: none; }
.sidebar::-webkit-scrollbar, .top-module-nav::-webkit-scrollbar { width: 0; height: 0; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .content { padding: 12px; }
  .topbar { padding: 0 12px; }
}
.pdf-difference-toolbar { position: static; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 0; background: #fff; }
.pdf-difference-toolbar label { display: flex; align-items: center; gap: 6px; margin-right: auto; }
.pdf-difference-toolbar input[type="checkbox"] { width: auto; }
.pdf-difference-entry { margin: 12px 0; padding: 8px; scroll-margin-top: 64px; border: 2px solid transparent; }
.pdf-difference-entry.pdf-difference-current { border-color: #b7791f; outline: none; }
.pdf-difference-entry table { width: 100%; table-layout: fixed; }
.pdf-difference-entry th:first-child { width: 20%; }
.pdf-difference-entry pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.pdf-difference-entry .pdf-field-changed td { background: #fff3d6; }
.customer-workspace-head { margin-bottom: 12px; }
.customer-workspace-head h2 { font-size: 18px; margin: 0 0 12px; overflow-wrap: anywhere; }
.customer-workspace-head .folder-tab-group { display: flex; flex-wrap: wrap; }
[data-business-customer] { min-width: 0; }
[data-business-customer] span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.pl-sheet-list { max-height: 360px; overflow: auto; }
.pl-modal > div { grid-column: 1 / -1; min-width: 0; max-width: 100%; }
.pl-modal .table-scroll { max-width: 100%; }
.pl-inline-record { min-width: 0; max-width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pl-inline-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pl-inline-head > div { min-width: 0; overflow-wrap: anywhere; }
.pl-inline-head button { flex-shrink: 0; }
.sorting-primary-row > td { background: #e8f0f7 !important; padding-top: 10px; padding-bottom: 10px; border-top: 2px solid #92abc1; }
.sorting-primary-row > td:nth-child(2),
.sorting-primary-row > td:nth-child(3),
.sorting-primary-row > td:nth-child(5) { font-weight: 700; }
.sorting-primary-row > td:first-child { border-left: 3px solid #24577e; }
.sorting-batch-row > td { padding: 6px 12px 18px 24px; border-bottom: 0; background: #fff !important; }
.sorting-batch-content { contain: inline-size; min-width: 0; }
.sorting-insole-notice { padding: 8px 0; color: #934418; }
.sorting-insole-notice pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow: auto; }
.flat-insole-table .sorting-needs-review td { background: #fff4e8; }
.table-scroll td.sorting-process-cell { width: 480px; min-width: 280px; max-width: 480px; white-space: normal; }
.sorting-process-cell .production-process-lines { width: 480px; max-width: 100%; min-width: 0; white-space: normal; }
.sorting-process-cell .production-process-lines span { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
@media (max-width: 700px) {
  .table-scroll td.sorting-process-cell,
  .sorting-process-cell .production-process-lines { width: 280px; max-width: 280px; }
}
.sorting-batch-content > strong { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 400; color: #596b79; }
.sorting-batch-content .table-scroll { border: 0; border-left: 2px solid #dbe3e9; border-radius: 0; }
.sorting-batch-content .shoe-batch-table th { background: #f5f7f9; color: #596b79; font-weight: 400; border-color: #e4e9ed; font-size: 12px; }
.sorting-batch-content .shoe-batch-table td { background: #fff; border-color: #e4e9ed; padding: 5px 7px; font-size: 12px; }
.pl-modal .pl-warnings { white-space: normal; overflow-wrap: anywhere; }
.pl-modal input[type="file"] { max-width: 100%; }
.pl-modal td { overflow-wrap: anywhere; }
.pl-sheet-list th { position: sticky; top: 0; }
.pl-warnings { color: #8b3d12; padding-left: 22px; }
[data-pl-detail] { min-width: 0; }
[data-pl-detail] td { max-width: 320px; overflow-wrap: anywhere; }
[data-pl-detail] h3 { font-size: 16px; }
[data-pl-list] { margin-top: 12px; }
#save-conflict-notices {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 10000;
  max-height: 40vh;
  overflow: auto;
}
.save-conflict-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #b77b18;
  background: #fff8e5;
  color: #292929;
}
.save-conflict-notice button { flex-shrink: 0; }
.save-conflict-backup { margin-left: auto; max-width: 320px; }
.save-conflict-backup summary { cursor: pointer; color: #526575; font-size: 12px; }
.save-conflict-backup[open] button { margin-top: 8px; }
.save-conflict-backup small { display: block; margin-top: 6px; color: #526575; }
.insole-daily-report { grid-column: 1 / -1; min-width: 0; width: 100%; }
.cloud-save-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; max-width: 260px; font-size: 12px; line-height: 1.4; color: #57616b; }
.cloud-save-status[hidden] { display: none; }
.cloud-save-status[data-status="saved"] { color: #247044; }
.cloud-save-status[data-status="pending"], .cloud-save-status[data-status="auth"], .cloud-save-status[data-status="conflict"] { color: #a23c20; }
.cloud-save-status button { padding: 3px 7px; min-height: 26px; }
.empty-production-machines { margin: 0 12px 12px; border-top: 1px solid #dde3e8; color: #667585; font-size: 12px; }
.empty-production-machines > summary { padding: 10px 2px; cursor: pointer; overflow-wrap: anywhere; }
.empty-production-machines > summary span { margin-left: 12px; font-weight: normal; }
.empty-production-machines > .paint-line-cards { padding: 0; color: var(--text); }
.production-missing-fields { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; font-size: 12px; font-weight: normal; }
.production-missing-fields:empty { display: none; }
.production-missing-field { color: #a34c09; font-size: 12px; font-weight: normal; overflow-wrap: anywhere; }
.insole-week-stage { margin-top: 8px; padding-top: 8px; border-top: 1px solid #dde3e8; }
.insole-week-stage > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 8px; margin-top: 4px; }
.insole-week-stage b { overflow-wrap: anywhere; }
.completed-shift-details { flex: 1; min-width: 0; }
.completed-shift-details > summary, .completed-shift-summary { color: #526478; font-size: 12px; font-weight: normal; line-height: 1.6; overflow-wrap: anywhere; }
.completed-shift-details > summary { cursor: pointer; }
.completed-shift-details[open] > .insole-shift-fields { margin-top: 8px; }
.compact-production-value { display: block; min-width: 0; align-self: center; }
.compact-production-value > [hidden] { display: none !important; }
.compact-production-value .compact-production-text { display: block; width: 100%; min-width: 0; padding: 5px 2px; border: 0; background: transparent; box-shadow: none; color: inherit; text-align: left; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; border-radius: 2px; }
.compact-production-value button.compact-production-text:hover, .compact-production-value button.compact-production-text:focus-visible { background: #edf2f6; outline: 1px solid #a8bccd; }
.compact-production-output .compact-production-text { font-weight: 700; }
.compact-production-note { grid-column: 1 / -1; color: #617080; }
@media (max-width: 640px) { .lamination-combination .paint-material-row > .compact-production-material { grid-column: 1 / -1; } }
.production-shift-card { margin-top: 16px; padding-top: 12px; border-top: 1px solid #dde3e8; }
.production-shift-card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.production-shift-card .production-shift-row { margin-bottom: 16px; }
.production-shift-card .paint-card-label { margin: 12px 0 6px; }
.paint-material-row > input, .paint-material-row > select { min-width: 0; width: 100%; box-sizing: border-box; }
.paint-material-row { grid-template-columns: minmax(0, 1fr) 64px 76px auto; gap: 8px; }
.paint-line-card [data-add-insole-material], .paint-line-card [data-add-paint-material], .paint-line-card [data-add-lamination-material] { justify-self: start; width: auto; min-height: 26px; padding: 3px 6px; border-color: transparent; background: transparent; color: #617080; font-weight: normal; }
.paint-line-card [data-add-insole-material]:hover, .paint-line-card [data-add-paint-material]:hover, .paint-line-card [data-add-lamination-material]:hover { background: #edf2f6; border-color: #c9d4df; }
.completed-shift-details > summary { padding: 6px 0; min-height: 28px; box-sizing: border-box; }
.machine-management-layout { grid-column: 1 / -1; min-width: 0; overflow-x: auto; }
.machine-management-head, .machine-management-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr) 145px 76px 64px; gap: 10px; align-items: center; min-width: 675px; padding: 10px 0; }
.machine-management-head { border-bottom: 1px solid #bdcbd8; font-weight: 600; }
.machine-management-row { border-bottom: 1px solid #e0e6ec; }
.machine-management-row > input { width: 100%; min-width: 0; height: 32px; box-sizing: border-box; }
.machine-active-toggle { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.machine-active-toggle input { width: auto; }
.machine-management-tools { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.machine-management-tools button { flex-shrink: 0; }
.packing-detail { min-width: 0; max-width: 100%; }
.save-recovery-dialog { width: min(900px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; padding: 20px; border: 1px solid #acbccb; border-radius: 6px; }
.save-recovery-dialog::backdrop { background: #0006; }
.save-recovery-dialog fieldset { margin: 14px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.save-recovery-dialog label { min-width: 0; }
.save-recovery-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 220px; overflow: auto; font: inherit; background: #f3f6f8; padding: 8px; }
@media(max-width:600px) { .save-recovery-dialog fieldset { grid-template-columns: 1fr; } }
.version-update-notice { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; background: #fff8e5; color: #59420d; border: 1px solid #b77b18; border-radius: 4px; z-index: 10000; overflow-wrap: anywhere; }
.packing-detail-materials > .table-scroll > table { table-layout: fixed; width: 1240px; min-width: 100%; }
.packing-detail-materials > .table-scroll > table th:nth-child(1) { width: 90px; }
.packing-detail-materials > .table-scroll > table th:nth-child(2) { width: 85px; }
.packing-detail-materials > .table-scroll > table th:nth-child(3) { width: 330px; }
.packing-detail-materials > .table-scroll > table th:nth-child(4) { width: 85px; }
.packing-detail-materials > .table-scroll > table th:nth-child(5) { width: 70px; }
.packing-detail-materials > .table-scroll > table th:nth-child(6) { width: 190px; }
.packing-detail-materials > .table-scroll > table th:nth-child(7) { width: 190px; }
.packing-detail-materials > .table-scroll > table th:nth-child(8) { width: 150px; }
.packing-detail td, .packing-detail th, .packing-detail .notranslate { white-space: normal !important; overflow-wrap: anywhere; word-break: normal; }
.packing-detail td { vertical-align: top; line-height: 1.6; }
.packing-detail-leather > .table-scroll > table { table-layout: fixed; width: 1100px; min-width: 100%; }
.packing-detail-leather > .table-scroll > table th:nth-child(1) { width: 420px; }
.packing-detail-leather > .table-scroll > table th:nth-child(2) { width: 110px; }
.packing-detail-leather > .table-scroll > table th:nth-child(3) { width: 100px; }
.packing-detail-leather > .table-scroll > table th:nth-child(4) { width: 65px; }
.packing-detail-leather > .table-scroll > table th:nth-child(5) { width: 100px; }
.packing-detail-leather > .table-scroll > table th:nth-child(6) { width: 65px; }
.packing-detail-leather > .table-scroll > table th:nth-child(7) { width: 100px; }
.packing-detail-mpi table { min-width: 1320px; table-layout: fixed; width: 100%; }
.packing-detail-mpi th:nth-child(6) { width: 24%; }
.packing-detail-mpi th:last-child { width: 16%; }
.packing-detail-mpi td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
td.sorting-pl-status { min-width: 220px; max-width: 280px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.receivable-aging .aging-pie-legend { min-width: 0; width: 100%; }
.lamination-month-summary h3 { font-size: 14px; margin: 20px 0 10px; }
.monthly-material-total { margin: 12px 0 20px; font-weight: 600; }
.monthly-daily-details { border-top: 1px solid #cbd5df; padding-top: 12px; }
.monthly-daily-details > summary { cursor: pointer; padding: 6px 0; color: #51677b; }
.monthly-daily-details[open] > summary { margin-bottom: 10px; }
.finance-purchase-orders > details { padding: 12px 0; }
.finance-purchase-orders h3 { font-size: 14px; margin: 20px 0 10px; }
.finance-purchase-orders p { margin: 10px 0; }
.finance-purchase-orders summary { overflow-wrap: anywhere; line-height: 1.7; }
.finance-purchase-filters { display: grid; grid-template-columns: 150px minmax(180px, 1fr) 140px minmax(180px, 1fr); gap: 12px; margin-bottom: 18px; }
.finance-purchase-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.finance-purchase-filters select, .finance-purchase-filters input { width: 100%; min-width: 0; height: 34px; }
.finance-purchase-link { border: 0; background: transparent; color: #185780; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.finance-purchase-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.finance-purchase-detail { grid-column: 1 / -1; min-width: 0; }
.finance-purchase-detail-body { min-height: 240px; padding-top: 16px; }
.finance-purchase-detail-body p { margin: 0 0 12px; }
.finance-purchase-detail .folder-tab-group { flex-wrap: wrap; }
@media (max-width: 1000px) { .finance-purchase-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) {
  .finance-purchase-filters { grid-template-columns: minmax(0,1fr); }
  .finance-purchase-pagination { flex-wrap: wrap; }
  .finance-purchase-panel > .panel-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .finance-purchase-panel > .panel-head h2 { width: 100%; }
  .finance-purchase-panel > .panel-head .action-row { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .receivable-aging .aging-pie { width: 120px; height: 120px; flex: 0 0 120px; }
  .receivable-aging .aging-pie-center { width: 88px; height: 88px; }
  .receivable-aging .aging-pie-center strong { font-size: 11px; overflow-wrap: anywhere; }
  .receivable-aging .aging-pie-wrap { flex-direction: column; align-items: center; }
  .receivable-aging .aging-pie-legend > div { display: flex; flex-wrap: wrap; gap: 4px; }
  .receivable-aging .aging-chart-row { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; }
  .receivable-aging .aging-chart-track { width: 100%; }
}
:root .sales-receivable-toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
:root .sales-receipt-detail { min-width:300px; white-space:normal; }
:root .sales-receipt-detail summary { cursor:pointer; }
:root .sales-receipt-detail table { width:100%; min-width:0; table-layout:auto; margin-top:8px; }
:root .sales-receipt-detail table th, :root .sales-receipt-detail table td { position:static; width:auto; min-width:0; max-width:none; white-space:nowrap; padding:6px; }
:root .sales-receipt-detail p { margin:6px 0; }
:root .finance-workbook-actions { padding:12px 16px 0; }
:root .finance-workbook-preview pre { white-space:pre-wrap; overflow-wrap:anywhere; max-width:600px; max-height:250px; overflow:auto; }
:root .finance-workbook-preview .wide-table-wrap { max-height:55vh; overflow:auto; }
:root .finance-workbook-pagination { display:flex; align-items:center; gap:12px; margin:12px 0; }
:root .shipment-month { border-bottom:1px solid var(--line); }
:root .shipment-month > summary { cursor:pointer; padding:12px; background:#f1f5f8; }
:root .shipment-month > summary span { margin-right:16px; }
:root .shipment-month > summary > button { float:right; margin-top:-5px; }
:root .shipment-filter { padding:0 5px; margin-left:5px; border:0; background:transparent; cursor:pointer; }
:root .shipment-filter.active,
:root .shipment-filter[aria-pressed="true"] { color:#fff; background:#1e527d; border-radius:3px; }
:root .shipment-filter-options { max-height:360px; overflow:auto; margin:12px 0; }
:root .shipment-filter-options label { display:flex; align-items:center; gap:8px; padding:6px; overflow-wrap:anywhere; }
:root .shipment-filter-options label[hidden] { display:none; }
:root .shipment-month-body { padding:12px; overflow:auto; }
:root .shipment-month-body .action-row { justify-content:flex-end; margin-bottom:10px; }
:root .finance-shipment-summary .panel-head { flex-wrap:wrap; gap:10px; }
:root .finance-shipment-summary .action-row { flex-wrap:wrap; }
:root .shipment-data-grid > table { min-width:3100px; table-layout:fixed; }
:root .shipment-data-grid > table > thead > tr > th, :root .shipment-data-grid > table > tbody > tr > td { width:120px; white-space:normal; overflow-wrap:anywhere; position:static; }
:root .shipment-data-grid > table > thead > tr > th:nth-child(4), :root .shipment-data-grid > table > tbody > tr > td:nth-child(4) { width:220px; }
:root .shipment-data-grid > table > thead > tr > th:nth-child(5), :root .shipment-data-grid > table > tbody > tr > td:nth-child(5) { width:260px; }
:root .shipment-data-grid > table > thead > tr > th:nth-child(10), :root .shipment-data-grid > table > tbody > tr > td:nth-child(10) { width:360px; }
:root .shipment-data-grid > table > thead > tr > th:last-child, :root .shipment-data-grid > table > tbody > tr > td:last-child { width:180px; }
:root .shipment-sizes > div { display:grid; grid-template-columns:1fr 1fr; gap:4px 12px; margin-top:8px; }
:root .shipment-sizes > summary { cursor:pointer; }
:root .shipment-data-grid > .table-scroll > table { width:2960px; min-width:2960px; table-layout:fixed; }
:root .shipment-data-grid > .table-scroll > table > :is(thead,tbody) > tr > :is(th,td) { width:120px; white-space:normal; overflow-wrap:anywhere; }
:root .shipment-data-grid > .table-scroll > table > :is(thead,tbody) > tr > :is(th,td):is(:nth-child(2),:nth-child(12),:nth-child(14),:nth-child(21)) { width:75px; }
:root .shipment-data-grid > .table-scroll > table > :is(thead,tbody) > tr > :is(th,td):is(:nth-child(3),:nth-child(11),:nth-child(13),:nth-child(15),:nth-child(16)) { width:100px; }
:root .shipment-data-grid > .table-scroll > table > :is(thead,tbody) > tr > :is(th,td):is(:nth-child(5),:nth-child(18)) { width:230px; }
:root .shipment-data-grid > .table-scroll > table > :is(thead,tbody) > tr > :is(th,td):nth-child(10) { width:340px; }
:root .shipment-data-grid > .table-scroll > table > :is(thead,tbody) > tr > :is(th,td):last-child { width:160px; }
:root .shipment-long-text { max-width:100%; min-width:0; text-align:left; }
:root .shipment-text-toggle { border:0; background:transparent; color:#1e527d; padding:2px 0; cursor:pointer; font:inherit; }
:root .shipment-text-toggle[hidden] { display:none; }
:root .shipment-filter-popover { position:fixed; inset:auto; margin:0; box-sizing:border-box; width:280px; max-width:calc(100vw - 16px); max-height:calc(100vh - 16px); padding:12px; border:1px solid #b8c4ce; border-radius:4px; background:#fff; color:#243746; box-shadow:0 4px 16px #0003; font-size:13px; overflow:auto; }
:root .shipment-filter-popover::backdrop { background:transparent; }
:root .shipment-filter-popover > input[type=search] { box-sizing:border-box; width:100%; min-width:0; margin-bottom:10px; }
:root .shipment-filter-popover label { display:flex; align-items:flex-start; gap:8px; line-height:20px; padding:4px; white-space:normal; overflow-wrap:anywhere; }
:root .shipment-filter-popover input[type=checkbox] { flex:0 0 14px; width:14px; height:14px; margin:3px 0 0; }
:root .shipment-filter-popover .shipment-filter-options { max-height:240px; overflow-y:auto; margin:8px 0; border-top:1px solid #dde3e8; border-bottom:1px solid #dde3e8; padding:5px 0; }
:root .shipment-filter-popover label[hidden] { display:none; }
:root .shipment-filter-popover .form-actions { display:flex; justify-content:flex-end; gap:6px; margin:0; padding:8px 0 0; }
:root .shipment-filter-popover .form-actions button { padding:5px 8px; font-size:12px; }
:root .arrival-month > summary { display:list-item; cursor:pointer; min-height:44px; padding:12px 16px; box-sizing:border-box; }
:root .arrival-month > summary > strong, :root .arrival-month > summary > span { display:inline; }
:root .arrival-month > summary > span { margin-left:16px; }
:root .arrival-flat-scroll { max-width:100%; max-height:65vh; overflow:auto; }
:root .arrival-flat-table { width:100%; min-width:1290px; table-layout:fixed; border-collapse:separate; border-spacing:0; }
:root .arrival-flat-table th { position:sticky; top:0; z-index:2; background:#edf4f7; }
:root .arrival-flat-table :is(th,td) { box-sizing:border-box; padding:8px 10px; white-space:normal; overflow-wrap:anywhere; text-align:left; vertical-align:top; }
:root .arrival-flat-table td { height:48px; }
:root .arrival-date-list { display:flex; flex-direction:column; gap:4px; margin-bottom:6px; }
:root .arrival-date-row { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
:root .arrival-date-row input { min-width:0; flex:1; }
:root .arrival-date-row button { width:44px; height:44px; flex:0 0 44px; font-size:20px; }
:root .arrival-flat-table td.arrival-order-cell { text-align:center;vertical-align:middle;background:#f5f9fc; }
:root .arrival-flat-table { min-width:1730px; }
:root .arrival-date-row { display:grid;grid-template-columns:minmax(130px,1.4fr) minmax(80px,1fr) minmax(60px,.7fr) 44px; }
@media(max-width:600px) { :root .arrival-date-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
:root .arrival-flat-table { min-width:1385px; }
:root .arrival-flat-table :is(th,td) { text-align:center;vertical-align:middle;padding:6px 8px;line-height:1.5; }
:root .arrival-flat-table td { height:44px; }
:root .arrival-flat-table th input { display:block;width:100%;min-width:0;height:28px;margin-top:6px;padding:3px 6px;font-size:12px;text-align:center; }
:root .arrival-flat-table th input:focus { outline:2px solid var(--primary);outline-offset:1px; }
:root .arrival-flat-table tbody tr:hover td { background:#edf5fa; }
:root .arrival-filter-toolbar { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;border-bottom:1px solid var(--line); }
:root .arrival-flat-table .arrival-date-list { gap:4px; }
:root .arrival-flat-table button { min-height:32px; }
:root .arrival-flat-table { min-width:1215px; }
:root .arrival-flat-table .shipment-filter { min-height:0; }

:root .insole-expandable { width:100%; min-width:0; }
:root .insole-expandable summary { display:flex; align-items:baseline; gap:6px; cursor:pointer; list-style:none; }
:root .insole-expandable summary::-webkit-details-marker { display:none; }
:root .insole-text-preview { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:root .insole-expand-label, :root .insole-collapse-label { flex-shrink:0; color:var(--primary); }
:root .insole-collapse-label, :root .insole-expandable[open] .insole-expand-label { display:none; }
:root .insole-expandable[open] .insole-collapse-label { display:inline; }
:root .insole-full-text { white-space:pre-wrap; overflow-wrap:anywhere; margin-top:4px; }
:root .insole-monitoring-table:not(.lot-order-line-table):not(:has([data-insole-fabric-header])) > table > :is(thead,tbody) > tr > :is(th,td):nth-child(10) { display:none; }
:root .lot-order-line-table > table { table-layout:auto; width:max-content; min-width:100%; }
:root .lot-order-line-table > table > :is(thead,tbody,tfoot) > tr > :is(th,td) { width:auto; white-space:nowrap; }
:root .lot-order-line-table > table > :is(thead,tbody,tfoot) > tr > :is(th,td):is(:nth-child(4),:nth-child(7)) { width:240px; min-width:240px; max-width:240px; white-space:normal; }
:root .lot-order-line-table td:is(:nth-child(4),:nth-child(7)) > :is(details,span) { display:block; width:100%; max-width:100%; min-width:0; overflow-wrap:anywhere; }
:root .insole-lot-summary table { min-width:1000px; table-layout:fixed; }
:root .insole-lot-summary th:nth-child(1) { width:110px; }
:root .insole-lot-summary th:nth-child(2) { width:160px; }
:root .insole-lot-summary th:nth-child(3) { width:130px; }
:root .insole-lot-summary th:nth-child(4) { width:180px; }
:root .insole-lot-summary th:nth-child(5) { width:105px; }
:root .insole-lot-summary td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
:root .insole-lot-summary td:nth-child(5) { text-align:right; font-variant-numeric:tabular-nums; }
:root .insole-monitoring-table > table > tbody > tr { height:auto; }
:root .insole-monitoring-table > table > tbody > tr > td { height:auto; padding:4px 8px; line-height:20px; vertical-align:top; }
:root .insole-monitoring-table .insole-expandable { margin:0; padding:0; }
:root .insole-monitoring-table .insole-expandable summary { margin:0; padding:0; min-height:20px; line-height:20px; }
:root .insole-pagination { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:12px; padding:12px 10px; margin:8px 0; min-height:56px; }
:root .insole-pagination > span:first-child { margin-right:auto; }
:root .insole-pagination select { width:auto; min-width:96px; height:32px; }
:root .insole-pagination button { min-width:32px; height:32px; }
:root .insole-monitoring-table th .shipment-filter { margin-left:6px; min-height:0; }
:root .insole-table-controls { display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; gap:16px; padding:10px 0; font-size:12px; overflow-x:auto; }
:root .insole-table-controls .insole-pagination { flex-shrink:0; justify-content:flex-start; padding:0; margin:0; min-height:32px; }
:root .insole-table-controls .insole-bulk-toolbar { display:flex; align-items:center; flex-wrap:nowrap; flex-shrink:0; gap:8px; margin:0 0 0 auto; padding:0; width:auto; white-space:nowrap; }
:root .insole-table-controls .insole-bulk-toolbar select { width:110px; }
:root .insole-table-controls .insole-bulk-toolbar > input { width:170px; max-width:100%; }
:root .insole-table-controls :is(input,select,button,label,span) { font-size:12px; }
:root .insole-table-controls .insole-pagination { flex-wrap:nowrap; gap:6px; white-space:nowrap; }
:root .insole-table-controls .insole-pagination button { min-width:28px; height:28px; padding:2px 6px; }
:root .insole-table-controls .insole-bulk-toolbar :is(select,button,input:not([type=checkbox])) { height:30px; min-height:30px; padding:4px 8px; }
:root .insole-table-controls [data-insole-bulk-status]:empty { display:none; }
:root .insole-review-alert { flex:0 0 auto; font-size:12px; }
:root .insole-review-alert > summary { cursor:pointer; color:#a34b09; white-space:nowrap; }
:root .insole-review-alert[open] { min-width:280px; max-width:420px; white-space:normal; }
:root .insole-review-content { max-height:320px; overflow:auto; margin-top:8px; }
:root .insole-monitoring-table:has(th:nth-child(18)) > table > :is(thead,tbody) > tr > :is(th,td):nth-child(10) { display:table-cell; }
:root .insole-monitoring-table:has(th:nth-child(18)) > table > :is(thead,tbody) > tr > :is(th,td):nth-child(11) { display:none; }
:root .insole-monitoring-table:has(th:nth-child(18)) > table > thead > tr > th:nth-child(n) { width:130px; }
:root .insole-monitoring-table:has(th:nth-child(18)) > table > thead > tr > th:nth-child(2) { width:180px; }
:root .insole-monitoring-table:has(th:nth-child(18)) > table > thead > tr > th:is(:nth-child(8),:nth-child(10)) { width:340px; }
:root .warehouse-packing-receipt table { width: 1120px; min-width: 100%; table-layout: fixed; }
.warehouse-packing-receipt td { vertical-align: top; overflow-wrap: anywhere; white-space: pre-wrap; }
.warehouse-packing-receipt th:nth-child(2) { width: 23%; }
.warehouse-packing-receipt th:last-child { width: 17%; }
:root #modalForm .warehouse-packing-receipt input, :root #modalForm .warehouse-packing-receipt textarea { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.warehouse-packing-receipt textarea { min-height: 68px; resize: vertical; }
.material-register-month { margin-top: 12px; }
.material-register-month > summary { padding: 12px; background: #e7eef4; cursor: pointer; font-weight: 600; }
:root .material-register-month table { width: 1100px; min-width: 100%; table-layout: fixed; }
.material-register-month th:nth-child(5) { width: 24%; }
.material-register-month td { overflow-wrap: anywhere; white-space: normal; vertical-align: top; }
.production-order-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 24px; padding:14px 0; }
.production-order-toolbar .production-order-status-tabs { margin:0; flex:0 0 auto; }
.production-order-tools { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-left:auto; min-width:0; }
.production-order-tools input { width:340px; max-width:100%; height:34px; box-sizing:border-box; }
.production-order-tools button { min-height:34px; white-space:nowrap; }
@media(max-width:700px) { .production-order-tools { width:100%; margin-left:0; justify-content:flex-start; } .production-order-tools input { flex:1 1 220px; width:100%; } }
.sales-order-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}
.sales-order-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}
.sales-order-filters label { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sales-order-filters select {
  width: auto;
  max-width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid #adc2d6;
  border-radius: 4px;
  background: #fff;
  color: #123e65;
  font: inherit;
}
.sales-order-filters [data-unified-customer] { width: 248px; max-width: 70vw; }
.sales-order-toolbar > .action-row { margin-left: auto; flex-wrap: wrap; }
.source-change-details { max-height: 360px; overflow: auto; color: #17384f; }
.source-change-details section { margin: 8px 0; }
.source-change-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.source-change-comparison > div { min-width: 0; padding: 8px; background: #f5f8fa; overflow-wrap: anywhere; }
.source-change-comparison > div > b { display: block; margin-bottom: 6px; }
.source-change-details ol { margin: 4px 0; padding-left: 24px; }
.source-change-details li { margin-bottom: 8px; }
@media (max-width: 640px) { .source-change-comparison { grid-template-columns: 1fr; } }
.lot-demand-review > h2 { padding: 14px 18px; margin: 0; font-size: 18px; }
.lot-demand-review .allocation-review-body > label { display: block; margin-bottom: 10px; }
.lot-demand-review table { min-width: 1060px; }
.lot-demand-review td { vertical-align: top; overflow-wrap: anywhere; }
.lot-demand-review [data-action] { min-width: 145px; }
.lot-demand-review [data-reason], .lot-demand-review [data-transfer] { display: block; min-width: 145px; margin-bottom: 6px; }
.lot-demand-review { width: 1160px; max-width: calc(100vw - 32px); max-height: 90vh; padding: 0; border: 1px solid #b8cbd9; border-radius: 6px; }
.lot-demand-review .allocation-review-body { padding: 12px 16px; max-height: calc(90vh - 125px); overflow: auto; }
.lot-demand-review .toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.lot-demand-review .toolbar label { display: flex; align-items: center; gap: 8px; }
:root .allocation-review.lot-demand-review .table-scroll table { min-width: 1100px; table-layout: fixed; }
.lot-demand-review th:nth-child(1) { width: 44px; }
.lot-demand-review th:nth-child(2) { width: 180px; }
.lot-demand-review th:nth-child(3) { width: 140px; }
.lot-demand-review th:is(:nth-child(4),:nth-child(5),:nth-child(6)) { width: 80px; }
.lot-demand-review th:nth-child(7) { width: 120px; }
.lot-demand-review th:nth-child(8) { width: 240px; }
.lot-demand-review td button { display: block; margin-top: 6px; }
.insole-receipt-document { margin: 8px 0; border-bottom: 1px solid #ccd9e2; }
.insole-receipt-document > summary { padding: 12px; background: #f3f7fa; cursor: pointer; overflow-wrap: anywhere; }
.insole-receipt-document > p { margin: 10px 0; }
:root .kk-monitoring-compact .table-scroll > table { width:100%; min-width:800px; table-layout:fixed; }
:root .kk-monitoring-compact th:nth-child(1) { width:18%; }
:root .kk-monitoring-compact th:nth-child(2) { width:6%; }
:root .kk-monitoring-compact th:nth-child(3) { width:10%; }
:root .kk-monitoring-compact th:nth-child(4) { width:30%; }
:root .kk-monitoring-compact th:nth-child(5) { width:8%; }
:root .kk-monitoring-compact th:nth-child(6) { width:6%; }
:root .kk-monitoring-compact th:nth-child(7) { width:14%; }
:root .kk-monitoring-compact th:nth-child(8) { width:8%; }
:root .kk-monitoring-compact td { white-space:normal; overflow-wrap:anywhere; }
:root .kk-monitoring-compact td:nth-child(4), :root .kk-monitoring-compact td:nth-child(7) { text-align:left; }
