:root {
  --bg: #f4f3ef;
  --panel: #ffffff;
  --ink: #242424;
  --muted: #6e6a60;
  --line: #ded9cd;
  --primary: #d6a51d;
  --primary-strong: #b98700;
  --warn: #9a6a00;
  --danger: #aa2d2d;
  --ok: #1d7a4d;
  --shadow: 0 16px 40px rgba(23, 34, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 204px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  background: #2c2c2c;
  color: #f7f3e8;
  padding: 20px 14px;
}

.brand {
  display: flex;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  margin-bottom: 28px;
  padding: 0;
}

.brand span {
  display: block;
  color: #c7c0b1;
  font-size: 13px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ece6d8;
  text-align: left;
  padding: 10px 11px;
}

.nav-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(214, 165, 29, 0.35);
  border-radius: 6px;
  background: rgba(214, 165, 29, 0.12);
  color: #f2ce68;
  font-size: 11px;
  font-weight: 800;
}

.nav-item.active,
.nav-item:hover {
  background: #44413b;
  color: #ffffff;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  background: var(--primary);
  color: #242424;
}

.sub-nav {
  display: none;
  padding-left: 34px;
}

.nav-group.open .sub-nav {
  display: grid;
  gap: 6px;
}

.sales-nav-group .nav-item:not(.active) + .sub-nav {
  display: none !important;
}

.sales-nav-group .nav-item.active + .sub-nav {
  display: grid;
  gap: 6px;
}

.sub-nav-item {
  width: 100%;
  border: 0;
  border-left: 2px solid rgba(214, 165, 29, 0.45);
  background: transparent;
  color: #d7d0c2;
  text-align: left;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.sub-nav-item.active,
.sub-nav-item:hover {
  color: #f7f3e8;
  border-left-color: var(--primary);
  background: rgba(214, 165, 29, 0.1);
}

.main {
  padding: 20px;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 300px;
}

.topbar-actions:empty {
  display: none;
}

.topbar-actions .secondary {
  min-height: 34px;
  padding: 8px 14px;
  white-space: nowrap;
}

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

h1 {
  font-size: 23px;
  margin-bottom: 6px;
}

h2 {
  font-size: 17px;
  margin-bottom: 6px;
}

h3 {
  font-size: 14px;
}

p {
  color: var(--muted);
}

.user-switch {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.sidebar-user-switch {
  min-width: 0;
  margin-top: auto;
  padding-top: 20px;
}

.sidebar-user-switch label {
  color: #f7f3e8;
  font-weight: 800;
}

.sidebar-user-switch select {
  border-color: rgba(214, 165, 29, 0.65);
  background: #f7f3e8;
  color: #242424;
  font-weight: 700;
}

.sidebar-user-switch select option {
  background: #f7f3e8;
  color: #242424;
}

label {
  display: grid;
  gap: 5px;
  color: #334151;
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 7px 9px;
}

textarea {
  resize: vertical;
}

.is-hidden {
  display: none !important;
}

.view {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.view.active {
  display: block;
}

.home-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.home-kpis article,
.sales-overview article,
.module-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.home-kpis span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.home-kpis strong {
  font-size: 22px;
}

.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.module-card {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.module-card h3,
.module-card p,
.sales-overview h3,
.sales-overview p {
  margin-bottom: 0;
}

.module-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.module-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #d8c27a;
  border-radius: 7px;
  background: #fff6d7;
  color: #7a5a00;
  font-size: 13px;
  font-weight: 800;
}

.active-module {
  background: #fffdf6;
  border-color: #d8c27a;
}

.module-status {
  align-self: flex-start;
  border-radius: 999px;
  background: #eeeae1;
  color: var(--muted);
  padding: 5px 9px;
  font-weight: 700;
}

.ceo-dashboard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  color: var(--ink);
  padding: 14px;
}

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

.ceo-head h3,
.dashboard-block h4,
.focus-stack p {
  margin-bottom: 0;
}

.eyebrow {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.dashboard-chip {
  border-radius: 999px;
  background: var(--primary);
  color: #242424;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-block {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 12px;
}

.dashboard-block h4 {
  font-size: 13px;
}

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

.purchase-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.purchase-kpis article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.purchase-kpis span,
.purchase-bar-row span,
.muted-cell,
.source-note,
.table-note {
  color: var(--muted);
}

.purchase-kpis strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.purchase-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.purchase-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.supply-view {
  max-width: 100%;
}

.supply-kpis {
  margin-bottom: 14px;
}

.supply-panel {
  margin-top: 14px;
}

.supply-device-table,
.supply-partner-table {
  min-width: 1180px;
}

.supply-device-table th,
.supply-device-table td,
.supply-partner-table th,
.supply-partner-table td {
  vertical-align: top;
}

.purchase-bars,
.purchase-rank-list,
.purchase-split {
  display: grid;
  gap: 10px;
}

.purchase-bar-row {
  display: grid;
  gap: 7px;
}

.purchase-bar-row div,
.purchase-rank-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.purchase-bar-row i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.purchase-rank-item {
  align-items: baseline;
  border-top: 1px solid #eef1f2;
  padding-top: 8px;
}

.purchase-rank-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.requester-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.requester-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f5ee;
  padding: 5px 9px;
  color: #4d493f;
}

.source-note,
.table-note {
  margin-top: 10px;
}

.purchase-toolbar {
  display: grid;
  grid-template-columns: 160px 160px minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.purchase-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
}

.purchase-toolbar select,
.purchase-toolbar input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
}

.table-filter-row th {
  background: #fffdf6;
}

.table-filter-row input,
.table-filter-row select,
.table-edit-input {
  width: 100%;
  min-width: 120px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 8px;
  color: var(--ink);
}

.table-filter-row .mini-action {
  margin-right: 6px;
  white-space: nowrap;
}

.table-toolbar-cell {
  text-align: left;
}

.th-filter-label {
  position: relative;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.th-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid #d8deea;
  border-radius: 5px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}

.th-filter-button::before {
  content: "";
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(8% 12%, 92% 12%, 60% 50%, 60% 86%, 40% 86%, 40% 50%);
}

.th-filter-label.is-active .th-filter-button {
  border-color: #d6a51d;
  background: #fff3c7;
  color: #7a5a00;
}

.filter-popover {
  position: fixed;
  z-index: 80;
  width: 280px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 10px;
}

.parameter-popover {
  position: fixed;
  z-index: 90;
  width: 320px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 10px;
}

.marketing-image-popover,
.marketing-copy-popover {
  position: fixed;
  z-index: 92;
  width: 320px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  padding: 10px;
}

.marketing-copy-popover {
  width: 460px;
}

.marketing-image-popover p {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}

.marketing-copy-popover pre {
  max-height: 320px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  color: #26313c;
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
}

.popover-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.parameter-popover pre {
  max-height: 180px;
  overflow: auto;
  margin: 0 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.45;
  color: var(--ink);
}

.filter-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

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

.filter-popover input {
  min-height: 32px;
  margin-bottom: 8px;
}

.filter-date-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.filter-date-shortcuts {
  display: flex;
  gap: 8px;
}

.filter-date-shortcuts button {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 8px;
  cursor: pointer;
}

.filter-date-shortcuts button:hover {
  border-color: #d6a51d;
  background: #fff3c7;
  color: #7a5a00;
}

.filter-date-panel label {
  gap: 4px;
}

.filter-option-list {
  display: grid;
  gap: 4px;
  max-height: 260px;
  overflow: auto;
}

.filter-option-list button {
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.filter-option-list button:hover,
.filter-option-list button.is-selected {
  background: #fff3c7;
  color: #7a5a00;
}

.filter-clear-button {
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7fafc;
  color: #334151;
  cursor: pointer;
}

.filter-clear-button:hover {
  border-color: #d6a51d;
  background: #fff3c7;
  color: #7a5a00;
}

.purchase-table .select-col {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
  user-select: none;
}

.purchase-row-controls {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 18px;
  white-space: nowrap;
  cursor: default;
}

.row-edit-button,
.row-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-height: 16px;
  border: 1px solid #d8deea;
  border-radius: 999px;
  background: #f8fafc;
  color: #334151;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 16px;
}

.row-edit-button:hover,
.row-icon-button:hover {
  border-color: #d6a51d;
  background: #fff3c7;
  color: #7a5a00;
}

.row-icon-button.save {
  border-color: #add6bb;
  color: #166534;
  background: #f0fdf4;
}

.row-icon-button.cancel {
  border-color: #d8deea;
  color: #64748b;
}

.table-edit-input.compact {
  min-width: 92px;
}

.purchase-table .table-edit-input,
.purchase-table .table-edit-input.compact {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding-left: 4px;
  padding-right: 4px;
}

.narrow-scroll-cell {
  width: 180px;
  max-width: 180px;
}

.cell-scroll {
  display: block;
  width: 170px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
}

.table-actions-cell {
  display: flex;
  gap: 10px;
}

.purchase-table {
  min-width: 2750px;
}

.purchase-library-table,
.supplier-table,
.supplier-detail-table,
.supplier-visit-table {
  min-width: 1600px;
}

.supplier-visit-table {
  min-width: 980px;
}

.supplier-table {
  min-width: 1760px;
  table-layout: fixed;
}

.supplier-table th,
.supplier-table td {
  padding-top: 7px;
  padding-bottom: 7px;
  vertical-align: middle;
}

.supplier-table th:nth-child(1),
.supplier-table td:nth-child(1) {
  width: 76px;
}

.supplier-table th:nth-child(2),
.supplier-table td:nth-child(2) {
  width: 240px;
}

.supplier-table th:nth-child(3),
.supplier-table td:nth-child(3) {
  width: 110px;
}

.supplier-table th:nth-child(4),
.supplier-table td:nth-child(4) {
  width: 190px;
}

.supplier-table th:nth-child(5),
.supplier-table td:nth-child(5) {
  width: 120px;
}

.supplier-table th:nth-child(6),
.supplier-table td:nth-child(6) {
  width: 310px;
}

.supplier-table th:nth-child(7),
.supplier-table td:nth-child(7) {
  width: 120px;
}

.supplier-table th:nth-child(8),
.supplier-table td:nth-child(8) {
  width: 190px;
}

.supplier-table th:nth-child(9),
.supplier-table td:nth-child(9),
.supplier-table th:nth-child(10),
.supplier-table td:nth-child(10),
.supplier-table th:nth-child(11),
.supplier-table td:nth-child(11) {
  width: 140px;
}

.supplier-table .text-action {
  display: inline-block;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.inline-input-row td {
  background: #fffdf6;
}

.purchase-table th,
.purchase-table td {
  vertical-align: top;
  white-space: nowrap;
}

.supplier-table th,
.supplier-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.supplier-table .truncate-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-history-wrap {
  max-width: 100%;
}

.library-history-table {
  min-width: 1320px;
  table-layout: fixed;
}

.library-history-table th,
.library-history-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.library-history-table .truncate-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-history-table th:nth-child(1),
.library-history-table td:nth-child(1) {
  width: 88px;
}

.library-history-table th:nth-child(2),
.library-history-table td:nth-child(2) {
  width: 220px;
}

.library-history-table th:nth-child(3),
.library-history-table td:nth-child(3) {
  width: 180px;
}

.library-history-table th:nth-child(4),
.library-history-table td:nth-child(4) {
  width: 150px;
}

.library-history-table th:nth-child(5),
.library-history-table td:nth-child(5) {
  width: 220px;
}

.library-history-table th:nth-child(6),
.library-history-table td:nth-child(6),
.library-history-table th:nth-child(7),
.library-history-table td:nth-child(7) {
  width: 120px;
}

.library-history-table th:nth-child(8),
.library-history-table td:nth-child(8),
.library-history-table th:nth-child(9),
.library-history-table td:nth-child(9),
.library-history-table th:nth-child(10),
.library-history-table td:nth-child(10) {
  width: 100px;
}

.library-history-table th:nth-child(11),
.library-history-table td:nth-child(11) {
  width: 90px;
}

.library-spec-wrap {
  max-width: 100%;
}

.library-spec-table {
  min-width: 980px;
  table-layout: fixed;
}

.library-spec-table th,
.library-spec-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.library-spec-table .truncate-cell {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-spec-table th:nth-child(1),
.library-spec-table td:nth-child(1) {
  width: 240px;
}

.library-spec-table th:nth-child(2),
.library-spec-table td:nth-child(2),
.library-spec-table th:nth-child(3),
.library-spec-table td:nth-child(3) {
  width: 120px;
}

.library-spec-table th:nth-child(4),
.library-spec-table td:nth-child(4),
.library-spec-table th:nth-child(6),
.library-spec-table td:nth-child(6),
.library-spec-table th:nth-child(8),
.library-spec-table td:nth-child(8) {
  width: 90px;
}

.library-spec-table th:nth-child(5),
.library-spec-table td:nth-child(5) {
  width: 190px;
}

.library-spec-table th:nth-child(7),
.library-spec-table td:nth-child(7) {
  width: 130px;
}

.purchase-table th:nth-child(23),
.purchase-table td:nth-child(23),
.purchase-table th:nth-child(24),
.purchase-table td:nth-child(24) {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

.payment-ratio {
  color: #166534;
  font-weight: 700;
}

.buyer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #d8deea;
  background: #f8fafc;
  color: #334151;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.buyer-badge.buyer-kunshan {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.buyer-badge.buyer-shanghai {
  border-color: #fde68a;
  background: #fef3c7;
  color: #854d0e;
}

.payment-history-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.payment-history-panel h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.payment-history-list {
  display: grid;
  gap: 6px;
}

.payment-history-item {
  display: grid;
  grid-template-columns: 110px 120px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.payment-history-item em {
  color: var(--muted);
  font-style: normal;
}

.purchase-table th:nth-child(24),
.purchase-table td:nth-child(24),
.purchase-table th:nth-child(25),
.purchase-table td:nth-child(25) {
  width: 4.5em;
  min-width: 4.5em;
  max-width: 4.5em;
  text-align: center;
}

.attachment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0;
  min-height: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.attachment-status.is-missing {
  color: #b91c1c;
}

.attachment-status.is-uploaded {
  color: #15803d;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(-n + 7),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(-n + 7) {
  position: sticky;
  background: #fff;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(-n + 7) {
  z-index: 5;
}

.purchase-table tbody tr.is-selected td {
  background: #fff7d6;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody tr.is-selected td:nth-child(-n + 7) {
  background: #fff2bd;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(-n + 7) {
  z-index: 12;
  background: #f3f6f7;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(1),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(1) {
  left: 0;
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(2),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(2) {
  left: 76px;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(3),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(3) {
  left: 172px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(4),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(4) {
  left: 322px;
  width: 170px;
  min-width: 170px;
  max-width: 170px;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(5),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(5) {
  left: 492px;
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(6),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(6) {
  left: 612px;
  width: 56px;
  min-width: 56px;
  max-width: 56px;
}

.purchase-table:not(.purchase-library-table):not(.supplier-table) thead tr:not(.table-filter-row) th:nth-child(7),
.purchase-table:not(.purchase-library-table):not(.supplier-table) tbody td:nth-child(7) {
  left: 668px;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.45);
}

.truncate-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-library-table {
  min-width: 1700px;
  table-layout: fixed;
}

.purchase-library-table th:nth-child(1),
.purchase-library-table td:nth-child(1) {
  width: 76px;
}

.purchase-library-table th:nth-child(2),
.purchase-library-table td:nth-child(2) {
  width: 80px;
}

.purchase-library-table th:nth-child(3),
.purchase-library-table td:nth-child(3) {
  width: 180px;
}

.purchase-library-table th:nth-child(4),
.purchase-library-table td:nth-child(4) {
  width: 240px;
}

.purchase-library-table th:nth-child(5),
.purchase-library-table td:nth-child(5) {
  width: 140px;
}

.purchase-library-table th:nth-child(6),
.purchase-library-table td:nth-child(6) {
  width: 120px;
}

.purchase-library-table th:nth-child(7),
.purchase-library-table td:nth-child(7) {
  width: 70px;
}

.purchase-library-table th:nth-child(8),
.purchase-library-table td:nth-child(8) {
  width: 190px;
}

.purchase-library-table th:nth-child(9),
.purchase-library-table td:nth-child(9),
.purchase-library-table th:nth-child(10),
.purchase-library-table td:nth-child(10) {
  width: 120px;
}

.purchase-library-table th:nth-child(11),
.purchase-library-table td:nth-child(11) {
  width: 230px;
}

.purchase-library-table th:nth-child(12),
.purchase-library-table td:nth-child(12) {
  width: 120px;
}

.category-card-row {
  display: flex;
  gap: 10px;
  margin: 10px 0 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-card {
  display: grid;
  gap: 4px;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.category-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.category-card strong {
  font-size: 20px;
  line-height: 1;
}

.category-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.category-card.active {
  border-color: #d6a51d;
  background: #fff8e1;
  box-shadow: inset 0 0 0 1px #f6d36b;
}

.table-subtext {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
}

.supplier-history {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.supplier-history span {
  display: block;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf6;
  padding: 4px 8px;
  color: var(--ink);
  font-size: 12px;
}

.muted-cell {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.dashboard-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 10px 0 0;
  list-style: none;
}

.dashboard-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
}

.dashboard-list strong {
  display: grid;
  place-items: center;
  min-height: 28px;
  border-radius: 7px;
  background: rgba(214, 165, 29, 0.18);
  color: #f2ce68;
}

.focus-stack p {
  color: var(--muted);
}

.focus-stack {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.focus-stack article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.focus-stack span {
  display: block;
  color: #f2ce68;
  font-weight: 800;
  margin-bottom: 4px;
}

.dept-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dept-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
}

.dept-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dept-overview article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.dept-overview .module-icon {
  grid-row: span 2;
}

.dept-overview strong {
  color: var(--ink);
}

.dept-overview p {
  margin-bottom: 0;
  color: var(--muted);
}

.sales-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quote-action-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.quote-action-strip span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf6;
  color: #4d493f;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
}

.quote-filter-bar {
  display: grid;
  grid-template-columns: minmax(150px, 0.5fr) minmax(310px, 1fr) minmax(520px, 1.5fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9f7;
}

.quote-filter-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 7px;
}

.quote-status-filters {
  grid-template-columns: repeat(5, minmax(82px, 1fr));
}

.quote-filter-bar button {
  min-height: 38px;
}

.quote-filter-bar .filter-card {
  padding: 7px 8px;
}

.quote-filter-bar .filter-card strong {
  min-width: 22px;
  height: 22px;
  font-size: 12px;
}

.filter-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.system-filter-cards {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.filter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.filter-card span {
  font-weight: 800;
}

.filter-card strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #eeeae1;
  color: #4d493f;
}

.filter-card.active,
.filter-card:hover {
  border-color: #d8c27a;
  background: #fffdf6;
}

.filter-card.active strong,
.filter-card:hover strong {
  background: var(--primary);
  color: #242424;
}

.category-maintain-card {
  position: relative;
}

.category-card-delete {
  position: absolute;
  top: 3px;
  right: 4px;
  display: none;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #f3efe6;
  color: #8a2f25;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.category-maintain-card:hover .category-card-delete {
  display: grid;
}

.today-todos {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 12px;
  margin-bottom: 12px;
}

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

.today-todos h3 {
  margin-bottom: 0;
}

.todo-list {
  counter-reset: todo;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-left: 0;
  margin: 0;
}

.todo-list li {
  display: grid;
  grid-template-columns: 24px max-content 1fr auto;
  align-items: center;
  column-gap: 12px;
  border-top: 1px solid var(--line);
  list-style: none;
  padding: 8px 0;
  counter-increment: todo;
}

.todo-list li > strong {
  min-width: 0;
  max-width: 310px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-list li::before {
  content: counter(todo) ".";
  font-weight: 800;
  color: #7a5a00;
}

.todo-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.todo-list strong {
  display: inline;
  margin-right: 8px;
}

.todo-list span {
  color: var(--muted);
}

.todo-list li.done {
  color: #a8a197;
}

.todo-list li.done strong,
.todo-list li.done span {
  color: #a8a197;
  text-decoration: line-through;
}

.todo-list li.done .todo-done-btn {
  background: #eeeae1;
  color: #8c8578;
}

.todo-done-btn {
  justify-self: end;
  white-space: nowrap;
}

.todo-list li.todo-add-row {
  grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1fr) auto auto;
  column-gap: 8px;
  counter-increment: none;
}

.todo-list li.todo-add-row::before {
  content: none;
}

.knowledge-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}

.knowledge-entry-grid article {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.knowledge-entry-card {
  cursor: pointer;
}

.knowledge-entry-card:hover {
  border-color: rgba(214, 165, 29, 0.55);
  box-shadow: 0 10px 24px rgba(50, 45, 35, 0.08);
}

.knowledge-entry-grid h3,
.knowledge-entry-grid p {
  margin-bottom: 0;
}

.knowledge-entry-grid h3 {
  margin-bottom: 5px;
}

.knowledge-home {
  display: grid;
  gap: 12px;
}

.knowledge-chain {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #eadfca;
  border-radius: 8px;
  background: #fffdf7;
  padding: 10px 12px;
  overflow-x: auto;
}

.knowledge-chain strong {
  flex: 0 0 auto;
  margin-right: 4px;
}

.knowledge-chain span {
  position: relative;
  flex: 0 0 auto;
  border: 1px solid #e4d6bb;
  border-radius: 7px;
  background: #fff;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-chain span:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -15px;
  top: 50%;
  color: #9b8758;
  transform: translateY(-50%);
}

.knowledge-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 12px;
}

.knowledge-home-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.knowledge-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #efe8dc;
  padding-bottom: 8px;
}

.knowledge-panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.knowledge-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-maintenance-list,
.knowledge-recent-list,
.knowledge-shortcut-list {
  display: grid;
  gap: 7px;
}

.knowledge-maintenance-list button,
.knowledge-recent-list button,
.knowledge-shortcut-list button {
  border: 1px solid #eee5d6;
  border-radius: 7px;
  background: #fffdf8;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.knowledge-maintenance-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.knowledge-maintenance-list strong {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 26px;
  border-radius: 7px;
  background: #fff1b8;
  color: #2b2410;
}

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

.knowledge-stat-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid #eee5d6;
  border-radius: 7px;
  background: #fffdf8;
  padding: 10px;
}

.knowledge-stat-grid span,
.knowledge-recent-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-stat-grid strong {
  font-size: 22px;
}

.knowledge-recent-list button {
  display: grid;
  gap: 3px;
}

.knowledge-recent-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-shortcut-list {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.knowledge-shortcut-list button:hover,
.knowledge-maintenance-list button:hover,
.knowledge-recent-list button:hover {
  border-color: rgba(214, 165, 29, 0.55);
  background: #fff8df;
}

.template-library-grid {
  display: grid;
  gap: 14px;
}

.template-library-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.template-library-actions > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.equipment-template-stage-filter,
.equipment-template-capacity-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  margin-bottom: 10px;
}

.equipment-template-stage-filter .filter-card,
.equipment-template-capacity-filter .filter-card {
  flex: 0 0 150px;
  min-width: 150px;
  min-height: 40px;
  border-radius: 7px;
}

.equipment-template-stage-filter .filter-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-template-workbench {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.equipment-template-english-panel {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.equipment-template-english-row {
  display: grid;
  grid-template-columns: minmax(150px, 230px) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
}

.equipment-template-english-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.equipment-template-english-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
  font: inherit;
}

.equipment-template-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.equipment-template-capacity-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.equipment-template-capacity-card {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
}

.equipment-template-capacity-tabs button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.equipment-template-capacity-card.active > button:first-child,
.equipment-template-capacity-card:hover > button:first-child,
.equipment-template-capacity-tabs > button:hover {
  border-color: rgba(214, 165, 29, 0.55);
  background: #fff7d8;
  color: var(--text);
}

.equipment-template-capacity-delete {
  position: absolute;
  top: -6px;
  right: -6px;
  display: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #e8d8b2;
  border-radius: 999px;
  background: #fff;
  color: #9b6b00;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.equipment-template-capacity-card:hover .equipment-template-capacity-delete {
  display: grid;
}

.equipment-template-capacity-delete:hover {
  border-color: #d5a51d;
  background: #fff4c8;
}

.equipment-template-list {
  display: grid;
  gap: 8px;
  position: sticky;
  top: 8px;
}

.equipment-template-list-item {
  position: relative;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
  cursor: grab;
}

.equipment-template-list-item > button:first-child {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  padding-right: 34px;
  text-align: left;
  cursor: pointer;
}

.equipment-template-list-item.active,
.equipment-template-list-item:hover {
  border-color: rgba(214, 165, 29, 0.7);
  background: #fffdf6;
}

.equipment-template-list-item.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.equipment-template-list-item.drag-over {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.equipment-template-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.equipment-template-delete:hover {
  background: #f6e8e8;
  color: #a73535;
}

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

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

.template-library-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.template-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.template-card-head h3,
.template-card-head p {
  margin: 0;
}

.template-card-head p,
.template-card-head span,
.template-note {
  color: var(--muted);
}

.template-card-head span {
  white-space: nowrap;
  font-size: 13px;
}

.template-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.template-edit-grid {
  display: grid;
  grid-template-columns: 128px minmax(180px, 1fr) 112px minmax(180px, 1.2fr);
  gap: 8px;
}

.equipment-template-detail-grid {
  grid-template-columns: 128px 120px minmax(180px, 1fr);
}

.template-edit-grid label,
.template-note-input {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.template-edit-grid input,
.template-edit-grid select,
.template-note-input textarea,
.template-block-head input,
.template-block-head select,
.template-equipment-table input,
.template-equipment-table select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.template-material-pick {
  min-width: 0;
}

.template-multiselect {
  position: relative;
  min-width: 0;
}

.template-multiselect-trigger {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 5px 24px 5px 8px;
  text-align: left;
  font: inherit;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  position: relative;
}

.template-multiselect-trigger::after {
  content: "⌄";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-54%);
  color: var(--muted);
}

.template-multiselect-menu {
  display: none;
  position: absolute;
  z-index: 50;
  top: calc(100% + 5px);
  left: 0;
  width: min(340px, 80vw);
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 49, 61, 0.14);
  padding: 8px;
  gap: 6px;
  flex-wrap: wrap;
}

.template-multiselect.is-open .template-multiselect-menu {
  display: flex;
}

.template-note-input {
  margin-top: 12px;
}

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

.process-template-list {
  display: grid;
  gap: 12px;
}

.process-template-material-group {
  display: grid;
  gap: 10px;
}

.process-template-material-group h3 {
  margin: 0;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.process-template-capacity-group {
  display: grid;
  gap: 6px;
}

.process-template-capacity-group h4 {
  margin: 0;
  padding: 0 2px;
  color: #7a6a45;
  font-size: 12px;
  font-weight: 900;
}

.process-template-list-item {
  position: relative;
  display: grid;
}

.process-template-list-item > button:first-child {
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
}

.process-template-list-item.active > button:first-child,
.process-template-list-item:hover > button:first-child {
  border-color: rgba(214, 165, 29, 0.65);
  background: #fffdf6;
}

.process-template-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #f0c8c8;
  border-radius: 6px;
  background: #fff5f5;
  color: #b42318;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.process-template-list-item:hover .process-template-delete {
  opacity: 1;
  pointer-events: auto;
}

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

.process-template-material-group span {
  color: var(--muted);
  font-size: 12px;
}

.process-template-basics {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

.process-template-block-list {
  display: grid;
  gap: 12px;
}

.process-template-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 12px;
}

.process-template-block.dragging {
  opacity: 0.55;
}

.process-template-block.drag-over {
  border-color: rgba(214, 165, 29, 0.8);
  box-shadow: inset 0 0 0 2px rgba(214, 165, 29, 0.18);
}

.process-template-block h4 {
  margin: 0 0 8px;
}

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

.process-block-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.process-block-drag {
  display: grid;
  place-items: center;
  width: 26px;
  height: 30px;
  border: 1px solid rgba(153, 116, 22, 0.25);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  cursor: grab;
  user-select: none;
}

.process-block-drag:active {
  cursor: grabbing;
}

.process-stage-select {
  display: grid;
  grid-template-columns: 54px minmax(0, 190px);
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(214, 165, 29, 0.7);
  border-left: 4px solid var(--primary);
  border-radius: 7px;
  background: #fff6d8;
  padding: 5px 7px;
}

.process-stage-select span {
  color: #7a5a00;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.process-stage-select select {
  height: 28px;
  border-color: rgba(153, 116, 22, 0.35);
  background: #fff;
  font-weight: 900;
}

.process-stage-select select:disabled {
  opacity: 1;
  color: var(--text);
  background: #fffaf0;
}

.selected-template-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selected-template-module {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(214, 165, 29, 0.55);
  border-radius: 6px;
  background: #fff;
  padding: 5px 8px;
  font-size: 12px;
}

.selected-template-module em {
  color: var(--muted);
  font-style: normal;
}

.process-template-block ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--text);
}

.template-module-select {
  display: grid;
  gap: 6px;
}

.template-module-group {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 6px 7px;
}

.template-module-group.is-selected {
  border-color: rgba(214, 165, 29, 0.7);
  background: #fffdf6;
}

.template-module-group-name {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
  font-weight: 900;
}

.template-module-group-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-module-capacity-options {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.template-module-select .template-checkbox-chip.is-selected {
  border-color: rgba(214, 165, 29, 0.7);
  background: #fffdf6;
  cursor: grab;
}

.template-module-select .template-checkbox-chip.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.template-module-select .template-checkbox-chip.drag-over {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.template-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
}

.template-chip:hover {
  border-color: rgba(214, 165, 29, 0.55);
}

.template-checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  font-size: 13px;
}

.template-module-select .template-checkbox-chip {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  flex: 0 0 auto;
  min-width: 92px;
  min-height: 30px;
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
}

.template-module-select .template-checkbox-chip:not(.is-selected) {
  grid-template-columns: 16px minmax(0, 1fr);
}

.template-checkbox-chip input {
  margin: 0;
}


.template-module-select .template-checkbox-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-module-empty {
  margin: 2px 0;
  font-size: 12px;
}

.template-equipment-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.template-equipment-table {
  min-width: 980px;
}

.template-equipment-table th,
.template-equipment-table td {
  white-space: nowrap;
  vertical-align: top;
}

.solution-rule-panel {
  display: grid;
  gap: 12px;
}

.solution-rule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 12px;
}

.solution-rule-head h3,
.solution-rule-head p {
  margin: 0;
}

.solution-rule-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.solution-natural-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.25fr) minmax(0, 0.75fr);
  gap: 10px;
  align-items: start;
}

.solution-template-list,
.solution-template-detail,
.solution-section-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.solution-template-buttons {
  display: grid;
  gap: 7px;
}

.solution-template-button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf6;
  color: var(--ink);
  padding: 8px;
  text-align: left;
}

.solution-template-button strong,
.solution-template-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.solution-template-button span {
  color: var(--muted);
  font-size: 11px;
}

.solution-template-button.active,
.solution-template-button:hover {
  border-color: #d8c27a;
  background: #fff8da;
}

.rule-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.rule-table-head h3 {
  margin: 0;
  font-size: 14px;
}

.solution-detail-head,
.solution-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.solution-detail-head h3 {
  margin: 0;
  font-size: 14px;
}

.solution-template-basics,
.solution-section-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
}

.solution-template-basics label,
.solution-section-fields label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.solution-section-stack {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.solution-equipment-table {
  display: grid;
  gap: 5px;
}

.solution-equipment-head,
.solution-equipment-row {
  display: grid;
  grid-template-columns: 52px minmax(120px, 0.9fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(180px, 1.4fr) 48px;
  gap: 6px;
  align-items: center;
}

.solution-equipment-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.solution-equipment-row strong {
  text-align: center;
}

.solution-template-detail input,
.solution-section-card input {
  width: 100%;
  height: 32px;
  text-align: center;
}

.solution-template-detail input:disabled,
.solution-section-card input:disabled {
  background: #f7f4ec;
  color: #5f5a50;
  opacity: 1;
}

.rule-input-wide {
  min-width: 160px;
}

.process-flow-panel {
  display: grid;
  gap: 12px;
}

.process-flow-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(200px, 0.9fr) minmax(320px, 1.4fr);
  gap: 10px;
  align-items: start;
}

.process-column {
  display: grid;
  gap: 10px;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.process-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #ece6d8;
  padding-bottom: 8px;
}

.process-column-head h3 {
  margin: 0;
  font-size: 15px;
}

.process-column-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.process-option-list,
.process-equipment-stack {
  display: grid;
  gap: 8px;
}

.process-option {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf6;
  color: var(--ink);
  padding: 9px;
  text-align: left;
}

.process-option strong,
.process-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-option small {
  color: var(--muted);
  font-size: 11px;
}

.process-option.active,
.process-option:hover {
  border-color: #d8c27a;
  background: #fff8da;
}

.process-equipment-section {
  display: grid;
  gap: 7px;
  border: 1px solid #ece6d8;
  border-radius: 8px;
  background: #fffdf6;
  padding: 10px;
}

.process-equipment-title,
.process-equipment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.process-equipment-title span,
.process-equipment-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.process-equipment-item {
  border-top: 1px solid #eee7d8;
  padding-top: 7px;
}

.process-equipment-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.process-equipment-item strong,
.process-equipment-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-price-panel {
  display: grid;
  gap: 12px;
}

.process-section-picker {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.process-section-picker button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.process-section-picker button.active,
.process-section-picker button:hover {
  border-color: #d8c27a;
  background: #fff8da;
}

.process-section-picker strong,
.process-section-picker span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-section-picker strong {
  font-size: 13px;
  line-height: 18px;
}

.process-section-picker span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

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

.process-price-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
}

.process-filter-field {
  position: relative;
  display: block;
}

.process-filter-field span {
  position: absolute;
  left: 11px;
  top: 50%;
  z-index: 1;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.process-filter-field input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 30px 0 10px;
  font-weight: 800;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.process-filter-field input:focus {
  border-color: #d8c27a;
  background: #fffdf5;
  box-shadow: 0 0 0 3px rgba(216, 194, 122, 0.18);
  outline: 0;
}

.process-filter-field:not(.has-value) input {
  color: transparent;
}

.process-filter-field.has-value span,
.process-filter-field:focus-within span {
  opacity: 0;
  transform: translateY(-50%) translateX(6px);
}

.process-filter-field:focus-within input,
.process-filter-field.has-value input {
  color: var(--ink);
}

.process-filter-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 30;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.16);
  padding: 5px;
}

.process-filter-suggestions button,
.process-filter-empty {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: #fff;
  padding: 7px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.process-filter-suggestions button:hover {
  background: #fff8da;
}

.process-filter-empty {
  color: var(--muted);
}

.equipment-price-maintenance {
  --equipment-price-filter-column: 180px;
  display: grid;
  gap: 12px;
}

.equipment-price-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
}

.equipment-toolbar-left,
.equipment-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.equipment-toolbar-left {
  flex: 1 1 auto;
}

.equipment-toolbar-right {
  flex: 0 0 auto;
}

.equipment-search-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

.equipment-search-field {
  display: grid;
  grid-template-columns: auto minmax(220px, 360px);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.equipment-search-field input {
  width: 100%;
  height: 34px;
  border: 1px solid #d9cfbd;
  border-radius: 7px;
  background: #fff;
  padding: 0 10px;
  font: inherit;
  color: var(--text);
}

.equipment-search-field input:focus {
  outline: 2px solid rgba(124, 93, 0, 0.18);
  border-color: #c7b073;
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-action {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d9cfbd;
  border-radius: 7px;
  background: #fffdf7;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.icon-action.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.price-edit-action.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.equipment-price-primary-filters {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 2px;
}

.equipment-price-primary-filters .filter-card {
  min-width: 0;
  min-height: 46px;
  height: 46px;
  align-items: flex-start;
  border-color: #d7cfbd;
  background: linear-gradient(180deg, #fffdf8 0%, #fbf8ef 100%);
  box-shadow: 0 1px 0 rgba(90, 77, 45, 0.06);
  padding: 7px 8px;
}

.equipment-price-primary-filters .filter-card span {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-price-primary-filters .filter-card strong {
  min-width: 24px;
  height: 24px;
  font-size: 12px;
}

.equipment-price-layout {
  display: grid;
  grid-template-columns: minmax(0, calc((100% - 56px) / 8)) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.equipment-price-secondary-filters {
  position: sticky;
  top: 8px;
  display: grid;
  gap: 7px;
}

.equipment-price-secondary-filters .filter-card {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 4px;
  border-color: #e4ded1;
  border-left: 3px solid transparent;
  background: #fff;
  text-align: left;
}

.equipment-price-secondary-filters .filter-card.active,
.equipment-price-secondary-filters .filter-card:hover {
  border-left-color: var(--primary);
  background: #fffaf0;
}

.equipment-price-secondary-filters .filter-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.equipment-price-secondary-filters .filter-card strong {
  min-width: 20px;
  height: 20px;
  font-size: 11px;
}

.equipment-price-results {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.equipment-price-primary {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.equipment-price-primary-head {
  display: grid;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid #eee8dc;
  padding: 0 2px 7px;
}

.equipment-price-primary-head h3,
.equipment-price-secondary-head h4 {
  margin: 0;
  line-height: 18px;
}

.equipment-price-primary-head h3 {
  font-size: 14px;
}

.equipment-price-secondary {
  display: grid;
  gap: 6px;
  border: 1px solid #f0eadb;
  border-radius: 7px;
  background: #fffdf8;
  padding: 7px;
}

.equipment-price-secondary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.equipment-price-secondary-head h4 {
  font-size: 13px;
}

.equipment-price-secondary-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.equipment-price-table-wrap {
  border: 1px solid #f0eadb;
  border-radius: 7px;
  overflow-x: auto;
}

.equipment-price-table {
  min-width: 980px;
  border: 0;
}

.equipment-price-table th,
.equipment-price-table td {
  height: 34px;
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.equipment-price-table thead th {
  background: #f3f6f7;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.15;
}

.equipment-price-table tbody td,
.equipment-data-table tbody td {
  background: #fff;
}

.equipment-price-table th:nth-child(1),
.equipment-price-name-cell {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
}

.equipment-price-table .equipment-price-name-cell {
  background: #fff;
  border-right: 1px solid #efe7d2;
  font-weight: 900;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.equipment-price-table th:nth-child(2),
.equipment-price-model-cell {
  width: 160px;
  min-width: 160px;
  max-width: 160px;
}

.equipment-price-table th:nth-child(3),
.equipment-price-capacity-cell {
  width: 110px;
  min-width: 110px;
  max-width: 110px;
}

.equipment-price-table th:nth-child(4),
.equipment-price-param-cell {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
}

.equipment-price-table th:nth-child(5),
.equipment-price-unit-cell {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  text-align: right;
}

.equipment-price-table th:nth-child(6),
.equipment-price-history-cell {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
}

.equipment-price-table th:nth-child(7),
.equipment-price-rule-cell {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
}

.equipment-price-table th span {
  display: block;
  color: #697586;
  font-size: 11px;
  line-height: 1.1;
}

.equipment-quote-history-dialog {
  width: min(680px, calc(100vw - 32px));
}

.equipment-quote-history-table {
  table-layout: fixed;
}

.equipment-quote-history-table th,
.equipment-quote-history-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-price-tag {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.history-price-tag.high {
  background: #fff0c4;
  color: #8a6100;
}

.history-price-tag.low {
  background: #eef2f5;
  color: #52606b;
}

.equipment-price-input,
.equipment-price-rule-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

.equipment-price-input {
  height: 28px;
  padding: 3px 6px;
  text-align: right;
}

.equipment-price-rule-input {
  height: 28px;
  min-height: 28px;
  padding: 5px 7px;
  resize: vertical;
}

.equipment-price-input:disabled,
.equipment-price-rule-input:disabled {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  opacity: 1;
}

.process-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: max-content;
}

.process-view-tabs button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 7px 10px;
  font-weight: 800;
}

.process-view-tabs button.active,
.process-view-tabs button:hover {
  border-color: #d8c27a;
  background: #fff8da;
}

.process-price-table {
  min-width: 1180px;
}

.process-price-table-wrap {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.process-price-table-wrap .process-price-table {
  border: 0;
}

.process-price-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.process-price-table th,
.process-price-table td {
  white-space: nowrap;
  padding-top: 7px;
  padding-bottom: 7px;
}

.process-price-row {
  cursor: pointer;
}

.process-price-row.is-expanded {
  background: #fffdf5;
}

.process-price-table .price-head {
  min-width: 58px;
  width: 58px;
  text-align: right;
}

.process-price-table .price-head span {
  display: block;
  margin-top: 2px;
  color: #697586;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
}

.process-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #faf9f5;
  padding: 8px 10px;
}

.process-list-head strong {
  font-size: 14px;
}

.process-list-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.process-list-head + .process-price-table-wrap {
  border-radius: 0 0 8px 8px;
}

.process-price-table th.process-col-device,
.process-price-table td.process-col-device {
  min-width: 150px;
  width: 170px;
  max-width: 190px;
}

.process-price-table td.process-device-merged {
  border-right: 1px solid #eee6d4;
  background: #fffdf8;
  font-weight: 900;
  vertical-align: top;
}

.process-price-table th.process-col-capacity,
.process-price-table td.process-col-capacity {
  min-width: 92px;
  width: 102px;
  max-width: 112px;
}

.process-price-table th.process-col-model,
.process-price-table td.process-col-model {
  min-width: 128px;
  width: 148px;
  max-width: 168px;
}

.process-price-table th.process-col-param,
.process-price-table td.process-col-param {
  min-width: 250px;
  width: 310px;
  max-width: 340px;
}

.process-price-table th.process-col-price,
.process-price-table td.process-col-price {
  min-width: 62px;
  width: 70px;
  max-width: 78px;
  padding-left: 8px;
  padding-right: 8px;
  text-align: right;
}

.process-price-table th.process-col-qty,
.process-price-table td.process-col-qty {
  min-width: 54px;
  width: 58px;
  max-width: 64px;
  text-align: right;
}

.process-price-table th.process-col-material,
.process-price-table td.process-col-material {
  min-width: 120px;
  width: 140px;
  max-width: 160px;
  text-align: left;
}

.process-price-table th.process-col-basis,
.process-price-table td.process-col-basis {
  min-width: 105px;
  width: 125px;
  max-width: 145px;
  text-align: left;
}

.process-price-table th.process-col-remark,
.process-price-table td.process-col-remark {
  min-width: 120px;
  width: 140px;
  max-width: 160px;
}

.process-param-cell {
  max-width: 300px;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.process-param-summary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-param-full {
  display: none;
  white-space: normal;
}

.process-price-row.is-expanded .process-param-cell {
  overflow: visible;
  white-space: normal !important;
  vertical-align: top;
}

.process-price-row.is-expanded .process-param-summary {
  display: none;
}

.process-price-row.is-expanded .process-param-full {
  display: block;
  line-height: 1.55;
}

.process-section-catalog {
  display: grid;
  gap: 10px;
}

.process-catalog-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.process-catalog-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  background: #faf9f5;
  padding: 8px 10px;
}

.process-catalog-section-head h3 {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
}

.process-catalog-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.process-catalog-devices {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.process-catalog-process-block {
  display: grid;
  gap: 6px;
  border: 1px solid #f0eadb;
  border-radius: 7px;
  background: #fffdf8;
  padding: 7px;
}

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

.process-catalog-process-head strong,
.process-catalog-process-head span {
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.process-catalog-process-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.process-catalog-device {
  border: 1px solid #ece7da;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.process-catalog-device-head {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(190px, 1.4fr) 100px;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border-bottom: 1px solid #f0eadb;
  padding: 7px 9px;
}

.process-catalog-device-head strong,
.process-catalog-device-head span {
  min-width: 0;
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-catalog-device-head strong {
  font-size: 13px;
}

.process-catalog-device-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.process-catalog-table-wrap {
  border: 0;
  border-radius: 0;
  overflow-x: auto;
}

.process-catalog-table {
  min-width: 1030px;
  border: 0;
}

.process-catalog-table th,
.process-catalog-table td {
  height: 32px;
  padding: 6px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.process-catalog-table thead th {
  background: #fdfbf4;
}

.process-catalog-table th:nth-child(1),
.process-catalog-table td:nth-child(1) {
  width: 130px;
  min-width: 130px;
}

.process-catalog-table th:nth-child(2),
.process-catalog-table td:nth-child(2) {
  width: 260px;
  max-width: 260px;
}

.process-catalog-table th:nth-child(3),
.process-catalog-table td:nth-child(3) {
  width: 62px;
  min-width: 62px;
  text-align: right;
}

.process-catalog-table th:nth-child(4),
.process-catalog-table td:nth-child(4),
.process-catalog-table th:nth-child(5),
.process-catalog-table td:nth-child(5) {
  width: 62px;
  min-width: 62px;
  text-align: right;
}

.process-catalog-table th:nth-child(6),
.process-catalog-table td:nth-child(6) {
  width: 150px;
  max-width: 150px;
}

.process-catalog-table th:nth-child(7),
.process-catalog-table td:nth-child(7) {
  width: 190px;
  max-width: 190px;
}

.process-catalog-table th:nth-child(8),
.process-catalog-table td:nth-child(8) {
  width: 130px;
  max-width: 130px;
}

.process-equipment-link {
  display: inline;
  font-size: inherit;
}

.process-section-lines .process-equipment-link,
.process-compare-table .process-equipment-link,
.process-trend-card .process-equipment-link {
  white-space: normal;
}

.process-material-view,
.process-trend-grid,
.tomato-price-rules {
  display: grid;
  gap: 10px;
}

.process-capacity-block,
.process-trend-card,
.tomato-price-rules {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.process-capacity-block h4,
.process-trend-card h4,
.tomato-price-rules h3 {
  margin: 0 0 8px;
}

.process-material-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.process-material-meta span {
  border: 1px solid #e7dcc3;
  border-radius: 999px;
  background: #fffaf0;
  padding: 4px 9px;
  color: #5f533c;
  font-size: 12px;
  font-weight: 800;
}

.process-section-lines {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px;
  border-top: 1px solid #eee7d8;
  padding: 8px 0;
}

.process-section-lines > strong {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #eadfbd;
  border-radius: 7px;
  background: #fffaf0;
  padding: 6px 10px;
}

.process-section-lines > strong small {
  margin-top: 3px;
  color: #7a6d52;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.process-section-lines span {
  display: block;
  color: #4c463c;
  font-size: 12px;
  line-height: 1.5;
}

.process-compare-table {
  min-width: 900px;
}

.process-compare-table td {
  vertical-align: top;
}

.process-compare-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.process-auxiliary-table {
  min-width: 820px;
}

.process-auxiliary-group {
  display: grid;
  gap: 8px;
}

.process-auxiliary-group h4 {
  margin: 4px 0 0;
  color: #5f533c;
  font-size: 13px;
}

.process-trend-grid {
  grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.process-trend-card p {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px;
  margin: 0;
  border-top: 1px solid #eee7d8;
  padding: 7px 0;
}

.process-trend-card span,
.tomato-price-rules li {
  color: #4c463c;
  line-height: 1.5;
}

.translation-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 12px;
}

.translation-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.translation-toolbar div {
  display: grid;
  gap: 3px;
}

.translation-toolbar strong {
  font-size: 15px;
}

.translation-toolbar span,
.translation-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.translation-table-wrap {
  max-height: 560px;
  overflow: auto;
}

.translation-table {
  min-width: 920px;
}

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

.translation-table th:first-child,
.translation-table td:first-child {
  width: 170px;
}

.translation-table th:last-child,
.translation-table td:last-child {
  width: 72px;
  text-align: center;
}

.translation-table input,
.translation-table select {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 8px;
  font: inherit;
}

.translation-group-row td {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f4ec;
  color: #3f3a32;
  font-weight: 800;
}

.translation-group-row span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.translation-fixed {
  color: var(--muted);
  font-size: 12px;
}

.compact-rule-table table {
  min-width: 920px;
}

.compact-rule-table th,
.compact-rule-table td {
  text-align: center;
  vertical-align: middle;
}

.compact-rule-table input {
  width: 100%;
  min-width: 120px;
  height: 32px;
  text-align: center;
}

.compact-rule-table input:disabled {
  background: #f7f4ec;
  color: #5f5a50;
  opacity: 1;
}

.compact-rule-table .rule-action-col {
  width: 56px;
  min-width: 56px;
}

.compact-section-head {
  margin-top: 4px;
  margin-bottom: 12px;
}

.equipment-browser {
  display: grid;
  grid-template-columns: minmax(220px, 0.25fr) minmax(0, 0.47fr) minmax(220px, 0.28fr);
  gap: 10px;
  align-items: start;
}

#equipmentView.active {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px 8px;
  align-items: start;
}

#equipmentView .section-head {
  grid-column: 1 / -1;
}

#equipmentView .system-filter-cards {
  display: contents;
}

.equipment-primary-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 2px;
}

.equipment-primary-filters .filter-card {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: 46px;
  align-items: flex-start;
  border-color: #d7cfbd;
  background: linear-gradient(180deg, #fffdf8 0%, #fbf8ef 100%);
  box-shadow: 0 1px 0 rgba(90, 77, 45, 0.06);
  padding: 7px 8px;
}

.equipment-primary-filters .filter-card span {
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-primary-filters .filter-card strong {
  min-width: 24px;
  height: 24px;
  font-size: 12px;
}

.equipment-secondary-filters {
  position: sticky;
  top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.equipment-secondary-filters .filter-card {
  width: 100%;
  min-height: 34px;
  padding: 5px 8px;
  gap: 6px;
  border-radius: 4px;
  border-color: #e4ded1;
  border-left: 3px solid transparent;
  background: #fff;
}

.equipment-secondary-filters .filter-card.active,
.equipment-secondary-filters .filter-card:hover {
  border-left-color: var(--primary);
  background: #fffaf0;
}

.equipment-secondary-filters .filter-card span {
  font-size: 12px;
}

.equipment-secondary-filters .filter-card strong {
  min-width: 20px;
  height: 20px;
  font-size: 11px;
}

#equipmentView .equipment-browser {
  grid-column: 2 / -1;
  display: block;
  min-width: 0;
}

#equipmentView .equipment-detail,
#equipmentView .equipment-design-panel {
  display: none;
}

#equipmentView .equipment-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.equipment-data-section {
  display: grid;
  gap: 6px;
  border: 1px solid #f0eadb;
  border-radius: 8px;
  background: #fff;
  padding: 7px;
}

.equipment-data-table thead th {
  background: #f3f6f7;
}

.equipment-data-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.equipment-data-section-head h4 {
  margin: 0;
  font-size: 14px;
  line-height: 18px;
}

.equipment-data-section-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.equipment-table-wrap {
  max-height: calc(100vh - 190px);
  overflow: auto;
  border: 1px solid #f0eadb;
  border-radius: 7px;
}

.equipment-data-table {
  table-layout: fixed;
  width: 100%;
  min-width: 760px;
}

.equipment-data-table th,
.equipment-data-table td {
  white-space: nowrap;
  padding: 6px 7px;
  vertical-align: middle;
}

.equipment-data-table .equipment-col-name {
  width: 128px;
  max-width: 128px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.equipment-data-table .equipment-col-name .equipment-name-link {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  text-align: left;
}

.equipment-data-table .equipment-col-model {
  width: 96px;
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-data-table .equipment-col-capacity {
  width: 88px;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-data-table .equipment-col-power {
  width: 68px;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equipment-data-table .equipment-col-params {
  width: 72px;
  text-align: center;
}

.equipment-data-table .equipment-col-design {
  width: 72px;
  max-width: 72px;
  text-align: center;
}

.equipment-data-table .equipment-col-bom {
  width: 92px;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.equipment-data-table .equipment-col-image {
  width: 58px;
  max-width: 58px;
  text-align: center;
}

.equipment-data-table .link-like {
  font-size: 12px;
  line-height: 1.15;
}

.equipment-name-link {
  display: inline-block;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

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

.equipment-list-toolbar {
  display: flex;
  justify-content: flex-start;
  padding-left: 0;
}

.equipment-row-actions {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.equipment-detail-page {
  display: grid;
  gap: 12px;
}

.equipment-detail-band {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 12px;
}

.equipment-detail-band h3,
.equipment-detail-band p {
  margin: 0;
}

.equipment-detail-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.equipment-detail-basic-main,
.equipment-detail-category-picker,
.equipment-model-editor,
.equipment-model-editor-list {
  display: grid;
  gap: 10px;
}

.equipment-detail-compact-fields {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px);
  gap: 10px;
}

.field-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.equipment-detail-primary-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.equipment-detail-secondary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
}

.equipment-detail-primary-cards .filter-card,
.equipment-detail-secondary-cards .filter-card {
  min-height: 32px;
  padding: 6px 8px;
}

.equipment-detail-primary-cards .filter-card.active,
.equipment-detail-secondary-cards .filter-card.active {
  border-color: #d19a00;
  background: #fff1b8;
  box-shadow: inset 0 0 0 1px #e4bd45;
}

.equipment-detail-primary-cards .filter-card.active strong,
.equipment-detail-secondary-cards .filter-card.active strong {
  background: #dca400;
  color: #201a0a;
}

.equipment-detail-image-row {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.equipment-image-preview.detail-preview {
  width: 170px;
  min-height: 110px;
}

.equipment-detail-band textarea {
  width: 100%;
}

.equipment-model-editor {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
}

.equipment-model-editor:not(.active) {
  display: none;
}

.equipment-model-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.equipment-model-card {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  padding: 7px 9px;
  padding-right: 24px;
}

.equipment-model-card.active {
  border-color: #a8872a;
  background: #fff7d6;
}

.equipment-model-card strong,
.equipment-model-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.equipment-model-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.add-model-card {
  align-content: center;
  justify-items: center;
  text-align: center;
  border-style: dashed;
}

.add-model-card strong {
  font-size: 22px;
  line-height: 1;
}

.model-card-delete {
  position: absolute;
  top: 4px;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  color: #8a4b4b !important;
  font-size: 14px !important;
  line-height: 1;
}

.model-card-delete:hover {
  background: #fee2e2;
}

.equipment-model-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.equipment-model-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.equipment-model-grid {
  display: grid;
  grid-template-columns: minmax(130px, 170px) 110px 86px;
  gap: 10px;
  align-items: end;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
}

.unit-input span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.power-input-wrap input {
  min-width: 0;
}

.equipment-model-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.42fr) minmax(0, 0.58fr);
  gap: 10px;
  align-items: start;
}

.detail-model-subcard {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf7;
  padding: 10px;
}

.detail-model-subcard h4 {
  margin: 0;
  font-size: 13px;
}

.detail-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-bom-wrap,
.detail-param-wrap {
  overflow-x: auto;
}

.detail-param-wrap {
  overflow-x: hidden;
}

.detail-bom-table {
  width: 100%;
  min-width: 620px;
  table-layout: fixed;
  border-collapse: collapse;
}

.detail-param-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.detail-bom-table th,
.detail-bom-table td,
.detail-param-table th,
.detail-param-table td {
  border: 1px solid var(--line);
  background: #fffdf7;
  padding: 5px;
}

.detail-bom-table th,
.detail-param-table th {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.detail-bom-table input,
.detail-param-table input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 4px 6px;
}

.detail-param-table input {
  min-height: 28px;
  padding: 3px 5px;
}

.detail-param-table th:nth-child(1),
.detail-param-table td:nth-child(1) {
  width: 70px;
}

.detail-param-table th:nth-child(3),
.detail-param-table td:nth-child(3) {
  width: 38px;
  text-align: center;
}

.detail-param-table .mini-action {
  min-height: 24px;
  padding: 0 4px;
  border-radius: 5px;
}

.detail-param-table .unit-input {
  grid-template-columns: minmax(0, 1fr) 20px;
  gap: 3px;
}

.detail-size-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(28px, 1fr)) 20px;
  gap: 3px;
  align-items: center;
}

.detail-size-inputs span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-bom-table th:nth-child(1),
.detail-bom-table td:nth-child(1) {
  width: 132px;
}

.detail-bom-table th:nth-child(2),
.detail-bom-table td:nth-child(2) {
  width: 150px;
}

.detail-bom-table th:nth-child(3),
.detail-bom-table td:nth-child(3) {
  width: 70px;
}

.detail-bom-table th:nth-child(4),
.detail-bom-table td:nth-child(4) {
  width: 110px;
}

.detail-bom-table th:nth-child(6),
.detail-bom-table td:nth-child(6) {
  width: 58px;
  text-align: center;
}

.equipment-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf7;
  color: var(--ink);
  text-align: left;
  padding: 9px 10px;
}

.equipment-card:hover,
.equipment-card.active {
  border-color: var(--primary);
  background: #fff8df;
}

.equipment-card strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.25;
}

.equipment-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.equipment-detail,
.equipment-design-panel {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf7;
  padding: 12px;
}

.equipment-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.equipment-detail-head h3 {
  margin: 6px 0 3px;
  font-size: 16px;
}

.equipment-detail-head p {
  margin-bottom: 0;
}

.equipment-detail-block {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.equipment-detail-block.standalone {
  border-top: 0;
  padding-top: 0;
}

.equipment-detail-block h4,
.equipment-detail-block p {
  margin-bottom: 0;
}

.equipment-detail-block p {
  line-height: 1.35;
}

.design-summary-group {
  display: grid;
  gap: 6px;
}

.design-summary-group + .design-summary-group {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.design-summary-group h5 {
  margin: 0;
  font-size: 12px;
}

.design-summary-group ul,
.design-detail-body ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.38;
}

.equipment-model-table th,
.equipment-model-table td {
  background: #fff;
  padding: 7px 8px;
  font-size: 12px;
}

.empty-equipment {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffdf7;
  padding: 16px;
}

.system-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 6px;
  background: #f1ede2;
  color: #4d493f;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.link-like {
  border: 0;
  background: transparent;
  color: #7a5a00;
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
}

.mini-action {
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
}

.mini-action.danger {
  border-color: #f2c0c0;
  color: #9f1d1d;
  background: #fff7f7;
}

.mini-action.danger:hover {
  border-color: #dc8f8f;
  background: #fee2e2;
}

.title-action {
  border: 0;
  background: transparent;
  color: #7a5a00;
  margin-left: 8px;
  padding: 0;
  min-height: 0;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  vertical-align: middle;
}

.equipment-thumb {
  display: block;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #f7f3e8;
}

.image-cell-button {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--brand);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  min-height: 0;
}

.image-upload-cell span {
  line-height: 1;
  white-space: nowrap;
}

.image-upload-empty {
  min-width: 0;
  min-height: 26px;
  padding: 3px 7px;
  font-size: 12px;
}

.bom-dialog {
  padding: 20px;
}

.dialog-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dialog-title h3 {
  margin-bottom: 0;
}

.bom-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bom-summary span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fffdf6;
  padding: 6px 9px;
  font-weight: 700;
}

.bom-table {
  min-width: 0;
}

.design-detail-body {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.design-detail-body h4,
.design-detail-body p {
  margin-bottom: 0;
}

.priority-table {
  min-width: 1480px;
}

#leadsView .priority-table {
  table-layout: fixed;
  min-width: 1420px;
}

#leadsView .priority-table th,
#leadsView .priority-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#leadsView .priority-table th:nth-child(1),
#leadsView .priority-table td:nth-child(1) {
  width: 76px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

#leadsView .priority-table th:nth-child(2),
#leadsView .priority-table td:nth-child(2) {
  width: 54px;
}

#leadsView .priority-table th:nth-child(3),
#leadsView .priority-table td:nth-child(3) {
  width: 92px;
}

#leadsView .priority-table th:nth-child(6),
#leadsView .priority-table td:nth-child(6) {
  width: 90px;
}

#leadsView .priority-table th:nth-child(11),
#leadsView .priority-table td:nth-child(11) {
  width: 180px;
}

#leadsView .priority-table th:nth-child(12),
#leadsView .priority-table td:nth-child(12) {
  width: 82px;
  text-align: center;
}

#leadsView .priority-table tr.is-selected td {
  background: #fff8e4;
}

#leadsView .text-action {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-instruction-cell {
  min-width: 260px;
  font-weight: 650;
  color: #25313d;
}

.followup-fields {
  display: grid;
  grid-template-columns: minmax(128px, 0.8fr) minmax(90px, 0.7fr);
  gap: 7px;
  min-width: 260px;
}

.followup-note {
  grid-column: 1 / -1;
  min-height: 64px;
  padding: 7px 8px;
  line-height: 1.5;
}

.followup-readonly {
  display: grid;
  gap: 8px;
  min-width: 240px;
}

.followup-readonly p {
  margin-bottom: 0;
  color: var(--ink);
  line-height: 1.5;
}

#leadsView .followup-readonly {
  display: flex;
  align-items: center;
  min-width: 0;
}

#leadsView .followup-readonly p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#leadsView .followup-action {
  flex: 0 0 auto;
}

.lead-delete-cell .danger-action {
  color: #9d2b1f;
  border-color: #f0c0b9;
}

.followup-action {
  justify-self: start;
}

.sales-hub {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.sales-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 13px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title h3 {
  margin-bottom: 0;
}

.sales-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-links a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4d493f;
  padding: 8px 10px;
  text-decoration: none;
  font-weight: 700;
}

.sales-links a:hover {
  border-color: #d8c27a;
  color: #7a5a00;
}

.sales-focus-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.sales-focus-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.sales-focus-list strong,
.sales-focus-list span {
  display: block;
}

.sales-focus-list strong {
  margin-bottom: 5px;
}

.sales-focus-list span {
  color: #7a5a00;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 7px;
}

.sales-focus-list p {
  margin-bottom: 0;
}

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

.placeholder-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 13px;
}

.placeholder-grid h3,
.placeholder-grid p {
  margin-bottom: 0;
}

.manufacturing-view {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

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

.view > .section-head > div:first-child > h2,
.view > .section-head > div:first-child > p {
  display: none;
}

.view > .section-head:has(> div:first-child:last-child) {
  display: none;
}

.view > .section-head.action-toolbar-head:has(> div:first-child:last-child) {
  display: flex;
}

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

.quote-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.equipment-edit-dialog {
  display: grid;
  gap: 12px;
  width: min(920px, calc(100vw - 32px));
  padding: 20px;
}

.equipment-edit-dialog label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.equipment-edit-dialog input,
.equipment-edit-dialog select,
.equipment-edit-dialog textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
}

.equipment-edit-dialog input:disabled,
.equipment-edit-dialog select:disabled,
.equipment-edit-dialog textarea:disabled {
  background: #f2eee4;
  color: #777064;
}

.equipment-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.equipment-image-editor {
  display: grid;
  grid-template-columns: 120px minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
}

.equipment-image-preview {
  display: grid;
  place-items: center;
  width: 120px;
  height: 90px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffdf7;
  color: var(--muted);
  overflow: hidden;
}

.equipment-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.equipment-bom-editor {
  display: grid;
  gap: 8px;
}

.equipment-quote-param-editor {
  display: grid;
  gap: 8px;
}

.edit-quote-param-table {
  width: 100%;
}

.edit-quote-param-table th,
.edit-quote-param-table td {
  padding: 7px;
}

.equipment-bom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-bom-table {
  width: 100%;
}

.edit-bom-table th,
.edit-bom-table td {
  padding: 7px;
  vertical-align: middle;
}

.edit-bom-table th:nth-child(2),
.edit-bom-table td:nth-child(2) {
  width: 90px;
}

.edit-bom-table th:nth-child(3),
.edit-bom-table td:nth-child(3) {
  width: 120px;
}

.edit-bom-table th:nth-child(4),
.edit-bom-table td:nth-child(4) {
  width: 150px;
}

.edit-bom-table th:last-child,
.edit-bom-table td:last-child {
  width: 76px;
}

.output-mode {
  min-width: 190px;
}

.primary,
.secondary,
.danger {
  border: 0;
  border-radius: 8px;
  min-height: 32px;
  padding: 0 11px;
  font-weight: 650;
}

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

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

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.compact-action {
  align-self: flex-start;
  margin-top: 10px;
}

.secondary {
  background: #e8eef0;
  color: #25313d;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marketing-section {
  margin-bottom: 14px;
}

.marketing-channel-table,
.marketing-task-table,
.marketing-topic-table,
.marketing-article-table,
.marketing-video-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
  background: #fff;
}

.marketing-channel-table th,
.marketing-channel-table td,
.marketing-task-table th,
.marketing-task-table td,
.marketing-topic-table th,
.marketing-topic-table td,
.marketing-article-table th,
.marketing-article-table td,
.marketing-video-table th,
.marketing-video-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.35;
}

.marketing-channel-table th,
.marketing-task-table th,
.marketing-topic-table th,
.marketing-article-table th,
.marketing-video-table th {
  background: #f7f3e8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.marketing-channel-table td:nth-child(1),
.marketing-task-table td:nth-child(1),
.marketing-task-table td:nth-child(3),
.marketing-task-table td:nth-child(5),
.marketing-task-table td:nth-child(7),
.marketing-task-table td:nth-child(8),
.marketing-topic-table td:nth-child(1),
.marketing-topic-table td:nth-child(2),
.marketing-topic-table td:nth-child(5),
.marketing-topic-table td:nth-child(6),
.marketing-topic-table td:nth-child(7),
.marketing-article-table td:nth-child(1),
.marketing-article-table td:nth-child(2),
.marketing-article-table td:nth-child(3),
.marketing-article-table td:nth-child(9),
.marketing-article-table td:nth-child(10),
.marketing-article-table td:nth-child(11),
.marketing-video-table td:nth-child(1),
.marketing-video-table td:nth-child(2),
.marketing-video-table td:nth-child(3),
.marketing-video-table td:nth-child(6),
.marketing-video-table td:nth-child(7),
.marketing-video-table td:nth-child(8),
.marketing-video-table td:nth-child(10) {
  white-space: nowrap;
}

.marketing-video-table {
  min-width: 1180px;
  table-layout: fixed;
}

.marketing-video-table th:nth-child(1),
.marketing-video-table td:nth-child(1) {
  width: 100px;
}

.marketing-video-table th:nth-child(2),
.marketing-video-table td:nth-child(2) {
  width: 72px;
}

.marketing-video-table th:nth-child(3),
.marketing-video-table td:nth-child(3) {
  width: 190px;
}

.marketing-video-table th:nth-child(4),
.marketing-video-table td:nth-child(4),
.marketing-video-table th:nth-child(5),
.marketing-video-table td:nth-child(5) {
  width: 300px;
}

.marketing-video-table th:nth-child(6),
.marketing-video-table td:nth-child(6) {
  width: 150px;
}

.marketing-video-table th:nth-child(7),
.marketing-video-table td:nth-child(7) {
  width: 52px;
}

.marketing-video-platforms {
  display: grid;
  gap: 6px;
}

.marketing-video-platform-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.marketing-video-platform-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.marketing-period-select {
  width: 86px;
  min-width: 86px;
}

.marketing-video-topic-input {
  min-height: 64px;
}

.marketing-video-publish-cell {
  display: grid;
  gap: 8px;
}

.marketing-video-publish-meta {
  display: grid;
  grid-template-columns: 68px 76px auto 74px;
  align-items: center;
  gap: 6px;
}

.marketing-article-table {
  min-width: 0;
  table-layout: fixed;
}

.marketing-article-table th,
.marketing-article-table td {
  padding-left: 10px;
  padding-right: 10px;
  text-align: left;
  vertical-align: middle;
}

.marketing-article-table th:nth-child(1),
.marketing-article-table td:nth-child(1) {
  width: 54px;
}

.marketing-article-table th:nth-child(2),
.marketing-article-table td:nth-child(2) {
  width: 64px;
}

.marketing-article-table th:nth-child(3),
.marketing-article-table td:nth-child(3) {
  width: 58px;
}

.marketing-article-table th:nth-child(4),
.marketing-article-table td:nth-child(4) {
  width: 13%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.marketing-article-table th:nth-child(5),
.marketing-article-table td:nth-child(5) {
  width: 17%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.marketing-article-table th:nth-child(6),
.marketing-article-table td:nth-child(6) {
  width: 56px;
  text-align: left;
}

.marketing-article-table th:nth-child(7),
.marketing-article-table td:nth-child(7) {
  width: 70px;
}

.marketing-article-table th:nth-child(8),
.marketing-article-table td:nth-child(8) {
  width: 82px;
}

.marketing-article-table th:nth-child(9),
.marketing-article-table td:nth-child(9) {
  width: 68px;
}

.marketing-article-table th:nth-child(10),
.marketing-article-table td:nth-child(10) {
  width: 15%;
}

.marketing-article-table th:nth-child(11),
.marketing-article-table td:nth-child(11) {
  width: 44px;
}

.marketing-topic-table {
  min-width: 1120px;
  table-layout: fixed;
}

.marketing-topic-table th:nth-child(1),
.marketing-topic-table td:nth-child(1) {
  width: 88px;
}

.marketing-topic-table th:nth-child(2),
.marketing-topic-table td:nth-child(2) {
  width: 92px;
}

.marketing-topic-table th:nth-child(3),
.marketing-topic-table td:nth-child(3) {
  width: 190px;
}

.marketing-topic-table th:nth-child(4),
.marketing-topic-table td:nth-child(4),
.marketing-topic-table th:nth-child(5),
.marketing-topic-table td:nth-child(5) {
  width: 245px;
}

.marketing-topic-table th:nth-child(6),
.marketing-topic-table td:nth-child(6) {
  width: 74px;
}

.marketing-topic-table th:nth-child(7),
.marketing-topic-table td:nth-child(7) {
  width: 128px;
}

.marketing-topic-table input[readonly],
.marketing-topic-table textarea[readonly] {
  background: #f7f3e8;
  color: var(--muted);
  cursor: default;
}

.marketing-task-table .table-edit-input {
  width: 100%;
}

.marketing-platform-picker,
.marketing-platform-groups {
  display: grid;
  gap: 8px;
}

.marketing-platform-group {
  display: grid;
  gap: 5px;
}

.marketing-platform-group > span,
.marketing-platform-group > strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.marketing-platform-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.marketing-platform-option,
.marketing-platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  padding: 3px 6px;
  font-size: 12px;
  font-weight: 700;
  color: #3b3a35;
  cursor: pointer;
}

.marketing-platform-option.is-selected,
.marketing-platform-chip.is-selected {
  border-color: #9ec3ad;
  background: #edf8f2;
  color: #235b3a;
}

.marketing-platform-option input,
.marketing-platform-chip input {
  margin: 0;
}

.marketing-requirement-input {
  min-width: 260px;
}

.marketing-guideline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 10px;
}

.marketing-guideline-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 12px;
}

.marketing-guideline-grid strong {
  display: block;
  margin-bottom: 6px;
}

.marketing-guideline-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.marketing-article-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.marketing-article-kpis article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.marketing-article-kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.marketing-article-kpis strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.table-muted {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
}

.article-image-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid #b8d8ca;
  border-radius: 999px;
  background: #edf8f2;
  color: #235b3a;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.article-image-status.needs-image {
  border-color: #e4c977;
  background: #fff8dd;
  color: #7a5600;
}

.image-advice-badge {
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 38px;
  min-height: 38px;
  padding: 4px 6px;
  border-radius: 8px;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.image-advice-badge span {
  display: block;
}

.marketing-period-cell,
.marketing-window-cell {
  display: inline-block;
  gap: 2px;
  line-height: 1.15;
  white-space: nowrap;
}

.marketing-period-cell span,
.marketing-window-cell span {
  display: block;
}

.marketing-article-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.marketing-article-status.pending {
  border: 1px solid #d9c27a;
  background: #fff8dd;
  color: #735600;
}

.marketing-article-status.published {
  border: 1px solid #9ec3ad;
  background: #edf8f2;
  color: #235b3a;
}

.marketing-article-status.overdue {
  border: 1px solid #e0a7a7;
  background: #fff0f0;
  color: #9a2424;
}

.marketing-publish-link-cell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
}

.marketing-publish-link-cell .marketing-link-input {
  width: 118px;
  min-width: 0;
}

.marketing-operator-input {
  width: 100%;
  min-width: 0;
}

.marketing-published-link {
  color: #1d5f91;
  font-weight: 800;
  text-decoration: underline;
  word-break: break-all;
  white-space: normal;
}

.marketing-copy-cell {
  white-space: nowrap;
}

.article-copy-actions {
  display: inline-grid;
  justify-items: start;
  white-space: nowrap;
}

.marketing-link-input {
  min-width: 0;
}

.smart-date-input,
.table-edit-input.smart-date-input,
.table-edit-input.compact.smart-date-input,
.device-date-input.smart-date-input {
  width: 74px;
  min-width: 74px;
  max-width: 74px;
  padding-left: 5px;
  padding-right: 5px;
  font-variant-numeric: tabular-nums;
}

td:has(> .smart-date-input) {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  white-space: nowrap;
}

.production-device-table th:nth-child(8),
.production-device-table th:nth-child(9),
.production-device-table th:nth-child(10),
.production-device-table td:nth-child(8),
.production-device-table td:nth-child(9),
.production-device-table td:nth-child(10) {
  width: 88px;
  min-width: 88px;
  max-width: 88px;
  white-space: nowrap;
}

.production-device-table th:nth-child(8) .th-filter-label,
.production-device-table th:nth-child(9) .th-filter-label,
.production-device-table th:nth-child(10) .th-filter-label {
  gap: 3px;
}

.production-device-table th:nth-child(8) .th-filter-button,
.production-device-table th:nth-child(9) .th-filter-button,
.production-device-table th:nth-child(10) .th-filter-button {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.smart-date-input::-webkit-calendar-picker-indicator {
  display: none;
  appearance: none;
}

.smart-date-proxy {
  position: fixed;
  z-index: 9999;
  height: 1px;
  opacity: 0.01;
  pointer-events: none;
}

.purchase-table-wrap {
  max-height: calc(100vh - 230px);
  overflow: auto;
}

.purchase-table thead tr:not(.table-filter-row) th {
  position: sticky;
  top: 0;
  z-index: 7;
  background: #f3f6f7;
}

.selected-row td {
  background: #fff8e4;
}

.text-action {
  border: 0;
  background: transparent;
  color: #25313d;
  font: inherit;
  font-weight: 750;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.danger-text {
  color: var(--danger);
}

.pending-purchase-table {
  min-width: 1120px;
}

.text-action:hover {
  color: var(--primary-strong);
}

.text-action:disabled {
  color: var(--muted);
  cursor: default;
}

.order-contract-table {
  min-width: 2380px;
  table-layout: fixed;
}

.order-contract-table th,
.order-contract-table td {
  box-sizing: border-box;
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  height: 38px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-contract-table th {
  background: #f3f6f7;
  color: #334151;
  font-weight: 800;
  white-space: nowrap;
}

.order-contract-table th:nth-child(1),
.order-contract-table td:nth-child(1) {
  width: 92px;
  white-space: nowrap;
}

.order-contract-table th:nth-child(2),
.order-contract-table td:nth-child(2) {
  width: 92px;
}

.order-contract-table th:nth-child(15),
.order-contract-table td:nth-child(15),
.order-contract-table th:nth-child(16),
.order-contract-table td:nth-child(16),
.order-contract-table th:nth-child(17),
.order-contract-table td:nth-child(17),
.order-contract-table th:nth-child(18),
.order-contract-table td:nth-child(18) {
  width: 92px;
}

.order-contract-table th:nth-child(5),
.order-contract-table td:nth-child(5),
.order-contract-table th:nth-child(6),
.order-contract-table td:nth-child(6),
.order-contract-table th:nth-child(7),
.order-contract-table td:nth-child(7),
.order-contract-table th:nth-child(8),
.order-contract-table td:nth-child(8),
.order-contract-table th:nth-child(14),
.order-contract-table td:nth-child(14) {
  width: 92px;
}

.order-contract-table th:nth-child(3),
.order-contract-table td:nth-child(3) {
  width: 150px;
  white-space: nowrap;
}

.order-contract-table th:nth-child(4),
.order-contract-table td:nth-child(4) {
  width: 170px;
}

.order-contract-table th:nth-child(-n + 3),
.order-contract-table td:nth-child(-n + 3) {
  position: sticky;
  background: #fff;
  z-index: 4;
}

.order-contract-table th:nth-child(-n + 3) {
  background: #f3f6f7;
  z-index: 8;
}

.order-contract-table th:nth-child(1),
.order-contract-table td:nth-child(1) {
  left: 0;
}

.order-contract-table th:nth-child(2),
.order-contract-table td:nth-child(2) {
  left: 92px;
}

.order-contract-table th:nth-child(3),
.order-contract-table td:nth-child(3) {
  left: 184px;
  box-shadow: 8px 0 10px -10px rgba(24, 32, 42, 0.45);
}

.order-contract-table .selected-row td:nth-child(-n + 3) {
  background: #fff8e4;
}

.order-contract-table th:nth-child(9),
.order-contract-table td:nth-child(9) {
  width: 220px;
}

.order-contract-table th:nth-child(10),
.order-contract-table td:nth-child(10) {
  width: 260px;
}

.order-contract-table th:nth-child(11),
.order-contract-table td:nth-child(11),
.order-contract-table th:nth-child(12),
.order-contract-table td:nth-child(12),
.order-contract-table th:nth-child(13),
.order-contract-table td:nth-child(13) {
  width: 110px;
}

.order-contract-table th:nth-child(19),
.order-contract-table td:nth-child(19) {
  width: 150px;
}

.order-contract-table .long-text-cell {
  white-space: nowrap;
  line-height: 1.2;
}

.order-contract-table .text-action {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receivables-table {
  min-width: 1420px;
  table-layout: fixed;
}

.receivables-table th,
.receivables-table td {
  box-sizing: border-box;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.receivables-table th {
  background: #f3f6f7;
  color: #334151;
  font-weight: 800;
  white-space: nowrap;
}

.receivables-table th:nth-child(1),
.receivables-table td:nth-child(1) {
  width: 92px;
}

.receivables-table th:nth-child(2),
.receivables-table td:nth-child(2) {
  width: 220px;
}

.receivables-table th:nth-child(3),
.receivables-table td:nth-child(3) {
  width: 150px;
  white-space: nowrap;
}

.receivables-table th:nth-child(4),
.receivables-table td:nth-child(4) {
  width: 180px;
}

.receivables-table th:nth-child(6),
.receivables-table td:nth-child(6),
.receivables-table th:nth-child(7),
.receivables-table td:nth-child(7),
.receivables-table th:nth-child(8),
.receivables-table td:nth-child(8) {
  width: 110px;
  text-align: right;
}

.receivables-table th:nth-child(10),
.receivables-table td:nth-child(10),
.receivables-table th:nth-child(11),
.receivables-table td:nth-child(11),
.receivables-table th:nth-child(13),
.receivables-table td:nth-child(13) {
  width: 110px;
}

.receivables-table th:nth-child(12),
.receivables-table td:nth-child(12) {
  width: 240px;
}

.receivable-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf5ee;
  color: #356044;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.receivable-status.soon {
  background: #fff3cd;
  color: #7a5700;
}

.receivable-status.overdue {
  background: #ffe3df;
  color: #9d2b1f;
}

.finance-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.finance-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

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

.finance-action-grid button {
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.finance-action-grid button:hover {
  border-color: var(--green);
  background: #f2f7f2;
}

.finance-action-grid strong,
.finance-action-grid span {
  display: block;
}

.finance-action-grid strong {
  margin-bottom: 6px;
  font-size: 14px;
}

.finance-action-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.finance-table {
  min-width: 1180px;
  table-layout: fixed;
}

.finance-table th,
.finance-table td {
  box-sizing: border-box;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.finance-table th {
  background: #f3f6f7;
  color: #334151;
  font-weight: 800;
  white-space: nowrap;
}

.finance-table td:nth-child(5),
.finance-table td:nth-child(6),
.finance-table td:nth-child(7),
.finance-profit-table td:nth-child(8),
.finance-profit-table td:nth-child(9) {
  text-align: right;
}

.finance-receipts-table th:nth-child(2),
.finance-receipts-table td:nth-child(2),
.finance-profit-table th:nth-child(2),
.finance-profit-table td:nth-child(2) {
  width: 230px;
}

.finance-invoices-table th:nth-child(6),
.finance-invoices-table td:nth-child(6),
.finance-profit-table th:nth-child(10),
.finance-profit-table td:nth-child(10) {
  width: 260px;
}

.order-latest-input {
  min-width: 230px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  resize: none;
  overflow: hidden;
  line-height: 1.35;
}

.order-latest-input:focus {
  height: 88px;
  max-height: 88px;
  overflow: auto;
  white-space: pre-wrap;
}

.order-table-toolbar {
  justify-content: space-between;
  margin-bottom: 8px;
}

.order-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.order-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.order-dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.order-status-filter-cards {
  display: grid;
  grid-template-columns: repeat(8, minmax(96px, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.order-status-filter-cards .filter-card {
  min-height: 44px;
}

.project-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.project-detail-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.project-detail-tabs button span {
  color: var(--muted);
  margin-left: 4px;
}

.project-detail-tabs button.active,
.project-detail-tabs button:hover {
  border-color: #d6a51d;
  background: #fff6d7;
  color: #7a5a00;
}

.project-detail-summary {
  margin-bottom: 12px;
}

.project-detail-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.project-blocker-action {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.project-blocker-action-item {
  display: grid;
  gap: 4px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line-soft);
}

.project-blocker-action-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-blocker-action-item strong {
  color: var(--ink);
  line-height: 1.35;
}

.project-blocker-action-item span {
  color: var(--muted);
  line-height: 1.45;
}

.project-todo-table {
  min-width: 1120px;
}

.project-todo-table th:nth-child(1),
.project-todo-table td:nth-child(1) {
  width: 110px;
}

.project-todo-table th:nth-child(2),
.project-todo-table td:nth-child(2) {
  min-width: 260px;
}

.project-todo-table th:nth-child(3),
.project-todo-table td:nth-child(3),
.project-todo-table th:nth-child(4),
.project-todo-table td:nth-child(4) {
  width: 120px;
}

.project-todo-table th:nth-child(5),
.project-todo-table td:nth-child(5),
.project-todo-table th:nth-child(6),
.project-todo-table td:nth-child(6) {
  width: 120px;
}

.project-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  border: 1px solid transparent;
}

.project-stage-badge.before {
  background: #eef6ff;
  color: #175cd3;
  border-color: #c7ddff;
}

.project-stage-badge.contract {
  background: #f5f0ff;
  color: #6941c6;
  border-color: #ddd6fe;
}

.project-stage-badge.launch {
  background: #ecfdf3;
  color: #067647;
  border-color: #abefc6;
}

.project-stage-badge.design {
  background: #fff7ed;
  color: #b54708;
  border-color: #fed7aa;
}

.project-stage-badge.purchase {
  background: #eff8ff;
  color: #026aa2;
  border-color: #b9e6fe;
}

.project-stage-badge.production {
  background: #fef3f2;
  color: #b42318;
  border-color: #fecdca;
}

.project-stage-badge.pre-shipment {
  background: #fdf2fa;
  color: #c11574;
  border-color: #fcceee;
}

.project-stage-badge.shipment {
  background: #f0f9ff;
  color: #0b4a6f;
  border-color: #bae6fd;
}

.project-stage-badge.commissioning {
  background: #f4f3ff;
  color: #5925dc;
  border-color: #d9d6fe;
}

.project-stage-badge.other {
  background: #f4f4f5;
  color: #3f3f46;
  border-color: #e4e4e7;
}

.assigned-project-task {
  gap: 7px;
}

.assigned-project-title {
  align-self: flex-start;
  font-size: 15px;
  font-weight: 900;
}

.assigned-task-list {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.assigned-task-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.assigned-task-list strong,
.assigned-task-list small {
  display: block;
}

.assigned-task-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.project-template-editor {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.project-template-editor summary {
  cursor: pointer;
  font-weight: 800;
}

.order-lead-import-select {
  width: 260px;
  min-height: 30px;
}

.order-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.order-payment-grid input:disabled {
  background: #f6f7f7;
  color: #4d5965;
}

.order-payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.order-payment-summary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 8px;
  color: #334151;
  font-size: 12px;
  font-weight: 800;
}

.order-payment-table {
  min-width: 760px;
  table-layout: fixed;
}

.order-payment-table th,
.order-payment-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px;
  vertical-align: middle;
}

.order-payment-table th {
  background: #f3f6f7;
}

.order-payment-table th:nth-child(1),
.order-payment-table td:nth-child(1) {
  width: 120px;
}

.order-payment-table th:nth-child(2),
.order-payment-table td:nth-child(2),
.order-payment-table th:nth-child(5),
.order-payment-table td:nth-child(5) {
  width: 92px;
}

.order-payment-table th:nth-child(7),
.order-payment-table td:nth-child(7) {
  width: 58px;
}

.order-contract-pdf-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 10px;
  margin-bottom: 10px;
}

.order-contract-pdf-row span {
  color: var(--muted);
  font-size: 12px;
}

.order-contract-pairs {
  display: grid;
  gap: 8px;
}

.order-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.order-quote-history-list {
  display: grid;
  gap: 8px;
}

.order-quote-history-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(140px, 1.4fr) 70px 90px 92px 110px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
}

.order-quote-history-row span {
  color: var(--muted);
  font-size: 12px;
}

.order-progress-list {
  display: grid;
  gap: 10px;
}

.order-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.order-progress-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.order-progress-row p {
  margin: 5px 0 0;
  color: #334151;
  line-height: 1.45;
}

.order-progress-row label {
  display: inline-flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 12px;
}

.order-progress-row input[type="checkbox"] {
  width: auto;
}

.archive-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}

.contract-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  background: #eef1f4;
  color: #334151;
}

.contract-status-badge.signing {
  background: #fff6d7;
  color: #7a5a00;
}

.contract-status-badge.signed,
.contract-status-badge.deposit {
  background: #e8f1ff;
  color: #1d4ed8;
}

.contract-status-badge.shipping-paid {
  background: #f0eaff;
  color: #6d28d9;
}

.contract-status-badge.paid,
.contract-status-badge.done {
  background: #e9f7ec;
  color: #166534;
}

.contract-status-badge.blocked {
  background: #fdecec;
  color: #b42318;
}

.archive-status-badge.archived {
  background: #e9f7ec;
  color: #166534;
}

.archive-status-badge.missing {
  background: #fdecec;
  color: #b42318;
}

.order-select-row {
  margin-top: 8px;
}

.department-settings-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.department-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.department-settings-head h3,
.department-settings-head p {
  margin: 0;
}

.department-settings-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.department-settings-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(360px, 1fr));
  gap: 14px;
}

.department-setting-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 12px;
}

.department-setting-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.department-setting-title strong {
  font-size: 15px;
}

.department-setting-title span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.department-setting-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 210px) auto;
  align-items: end;
  gap: 8px;
}

.department-setting-row select,
.department-setting-row input,
.department-account-table input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

.department-account-table-wrap {
  overflow-x: auto;
}

.department-account-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.department-account-table th,
.department-account-table td {
  border-bottom: 1px solid var(--line);
  padding: 6px;
  text-align: left;
  vertical-align: middle;
}

.department-account-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.people-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.people-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf6;
  padding: 5px 8px 5px 10px;
  font-weight: 700;
}

.people-chip button {
  width: 18px;
  height: 18px;
  min-height: 18px;
  border: 0;
  border-radius: 999px;
  background: #eeeae1;
  color: #6b5f48;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.order-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.order-section-title-row h4 {
  margin: 0;
}

.order-section-title-row.compact {
  margin-top: 10px;
}

.order-section-title-row.compact h4 {
  font-size: 13px;
}

.order-file-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-file-list li {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
}

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

.order-detail {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.customer-detail {
  display: grid;
  gap: 14px;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.customer-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.customer-profile-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.customer-profile-head h1 {
  margin: 0;
  color: #232323;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 780;
}

.customer-background-cell {
  min-width: 260px;
  max-width: 380px;
  color: #4d493f;
  line-height: 1.45;
}

.customer-table {
  table-layout: fixed;
  min-width: 1060px;
}

.customer-table th,
.customer-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.customer-table th:nth-child(6),
.customer-table td:nth-child(6),
.customer-table th:nth-child(7),
.customer-table td:nth-child(7),
.customer-table th:nth-child(8),
.customer-table td:nth-child(8) {
  width: 64px;
}

.customer-table .customer-background-cell {
  min-width: 0;
  max-width: none;
  line-height: inherit;
}

.customer-table .text-action {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.order-detail-head h3 {
  margin: 4px 0 6px;
}

.order-status-inline {
  margin-left: auto;
  text-align: right;
}

.order-status-inline .project-status-buttons {
  max-width: 520px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.order-detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.order-detail-section h4 {
  margin-bottom: 10px;
}

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

.detail-section-title h4 {
  margin: 0;
}

.customer-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 10px;
}

.customer-edit-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.customer-edit-form .wide {
  grid-column: 1 / -1;
}

.customer-edit-form textarea {
  resize: vertical;
  min-height: 92px;
}

.detail-pair {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid #eef1f2;
}

.detail-pair:first-of-type {
  border-top: 0;
}

.detail-pair span,
.detail-list span {
  color: var(--muted);
}

.detail-list {
  display: grid;
  gap: 8px;
  list-style: none;
}

.detail-list li {
  display: grid;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #eef1f2;
}

.detail-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f3f6f7;
  color: #4d493f;
  font-size: 12px;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.status.draft {
  background: #edf1f4;
  color: #51606e;
}

.status.pending {
  position: relative;
  background: #fff1d8;
  color: var(--warn);
}

.status.pending[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 320px;
  transform: translateX(-50%);
  border: 1px solid #d8c27a;
  border-radius: 6px;
  background: #fffdf6;
  color: #4d493f;
  box-shadow: 0 10px 24px rgb(55 49 39 / 14%);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  white-space: normal;
  visibility: hidden;
}

.status.pending[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

.status.approved {
  background: #dff2e8;
  color: var(--ok);
}

.status.rejected {
  background: #f8dfdf;
  color: var(--danger);
}

.quote-form {
  display: grid;
  gap: 18px;
}

.form-grid,
.rules-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
}

.quote-basic-grid {
  grid-template-columns: minmax(250px, 1.6fr) minmax(92px, 0.55fr) minmax(150px, 1fr) minmax(180px, 1.05fr) minmax(120px, 0.7fr);
  gap: 10px;
  align-items: end;
}

.rules-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.rules-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.check-row {
  display: flex;
  align-items: end;
  gap: 8px;
  padding-bottom: 10px;
}

.check-row input {
  width: auto;
}

.full {
  width: 100%;
}

.demand-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #faf8f1;
}

.demand-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.demand-head p {
  margin-bottom: 0;
}

.demand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
}

.extra-fees-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.extra-fees-panel h3 {
  margin-bottom: 0;
}

.extra-fees-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1.6fr) repeat(3, minmax(180px, 0.55fr));
  gap: 14px;
}

.extra-fees-rows {
  display: grid;
  gap: 10px;
}

.extra-fee-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.extra-fee-row-title {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.install-fee-row label {
  max-width: 320px;
  margin-bottom: 0;
}

.extra-fees-grid small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.freight-fields {
  display: grid;
  grid-template-columns: 0.72fr 1fr 1fr 0.95fr 0.55fr 0.8fr 0.8fr;
  gap: 10px;
  align-items: end;
}

.freight-fields label {
  margin-bottom: 0;
}

.freight-fields label[hidden] {
  display: none;
}

.line-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-process-builder {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fffdfa;
}

.quote-process-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-process-head h3,
.quote-process-head p {
  margin-bottom: 0;
}

.quote-process-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.quote-process-sections {
  min-width: 0;
}

.quote-process-layout {
  display: grid;
  gap: 8px;
}

.quote-process-row {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.quote-process-stage {
  display: grid;
  align-content: start;
  gap: 7px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff6d7;
  color: #242424;
  padding: 8px 10px;
  text-align: left;
}

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

.quote-process-stage-top strong,
.quote-process-stage-count {
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-process-stage-count {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 22px;
  border-radius: 6px;
  background: var(--primary);
  color: #242424;
  font-size: 12px;
  font-weight: 800;
}

.quote-process-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.quote-process-flow {
  display: flex;
  gap: 22px;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quote-process-field {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}

.quote-process-field span {
  font-size: 11px;
  text-align: right;
}

.quote-process-field input,
.quote-process-field select {
  width: 100%;
  box-sizing: border-box;
  height: 26px;
  min-height: 26px;
  padding: 3px 6px;
  font-size: 11px;
}

.quote-process-equipment {
  position: relative;
  flex: 0 0 142px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 14px;
  gap: 7px;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 6px 8px;
  cursor: grab;
}

.quote-process-equipment:not(:last-child)::after {
  content: "→";
  position: absolute;
  left: calc(100% + 7px);
  top: 50%;
  transform: translateY(-50%);
  color: #9b6b00;
  font-weight: 900;
  pointer-events: none;
}

.quote-process-equipment.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.quote-process-equipment.drag-over {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.quote-process-equipment.is-disabled {
  background: #f7f5ef;
  color: var(--muted);
}

.quote-process-equipment-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.quote-process-equipment-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.quote-process-remove {
  border: 0;
  background: transparent;
  color: #9b6b00;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
}

.quote-process-empty {
  margin: 0;
}

.rate-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rate-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rate-control input {
  width: 92px;
  text-align: center;
}

.rate-step {
  min-width: 32px;
  padding: 0 8px;
}

.quote-sections {
  display: grid;
  gap: 16px;
}

.section-tabs-wrap {
  margin-bottom: 12px;
}

.section-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.section-tab {
  position: relative;
  flex: 0 0 150px;
  min-width: 150px;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #4d493f;
  padding: 7px 10px;
  font-weight: 700;
  cursor: grab;
  text-align: left;
}

.section-tab-title {
  padding-right: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-tab-close {
  display: none;
  position: absolute;
  top: 3px;
  right: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f5dddd;
  color: var(--danger);
  line-height: 18px;
  text-align: center;
  font-size: 13px;
  cursor: pointer;
}

.section-tab:hover .section-tab-close {
  display: block;
}

.section-tab.dragging {
  opacity: 0.6;
  border-color: var(--primary);
}

.section-tab span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
}

.section-tab.active {
  background: #fff6d7;
  border-color: var(--primary);
  color: #242424;
}

.quote-section {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #faf8f1;
}

.quote-section.active {
  display: block;
}

.quote-section-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 10px;
}

.section-subtotal {
  color: #4d493f;
}

.section-lines {
  display: grid;
  gap: 7px;
}

.quote-line-head {
  display: grid;
  grid-template-columns: 42px 72px minmax(130px, 1.08fr) minmax(180px, 1.45fr) minmax(92px, 0.62fr) minmax(96px, 0.68fr) minmax(96px, 0.68fr) minmax(110px, 0.78fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  padding: 0 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quote-line {
  display: grid;
  grid-template-columns: 42px 72px minmax(130px, 1.08fr) minmax(180px, 1.45fr) minmax(92px, 0.62fr) minmax(96px, 0.68fr) minmax(96px, 0.68fr) minmax(110px, 0.78fr) auto;
  gap: 7px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
}

.quote-line.child-line {
  margin-left: 18px;
  border-style: dashed;
  background: #fffdfa;
  padding-top: 6px;
  padding-bottom: 6px;
}

.quote-line-head span {
  display: grid;
  align-items: center;
  min-height: 34px;
}

.quote-line-head span:nth-child(1),
.quote-line-head span:nth-child(2),
.quote-line-head span:nth-child(5),
.quote-line-head span:nth-child(6),
.quote-line-head span:nth-child(7),
.quote-line-head span:nth-child(8),
.quote-line-head span:nth-child(9) {
  justify-items: center;
  text-align: center;
}

.quote-line > * {
  align-self: center;
}

.quote-line > *:nth-child(1),
.quote-line > *:nth-child(2),
.quote-line > *:nth-child(5),
.quote-line > *:nth-child(6),
.quote-line > *:nth-child(7),
.quote-line > *:nth-child(8),
.quote-line > *:nth-child(9) {
  justify-self: stretch;
  text-align: center;
}

.quote-line input,
.quote-line textarea {
  height: 38px;
  display: block;
}

.quantity-stepper {
  display: grid;
  grid-template-columns: 28px minmax(34px, 1fr) 28px;
  gap: 4px;
  align-items: center;
}

.quantity-stepper .quantity-step {
  height: 38px;
  min-width: 0;
  padding: 0;
}

.quote-line .line-quantity,
.quote-line .line-standard,
.quote-line .line-total,
.quote-line .line-remark {
  text-align: center;
}

.line-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.line-actions button {
  min-width: 44px;
  padding: 0 8px;
}

.line-code {
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  border-radius: 6px;
  background: #fff6d7;
  color: #7a5a00;
  font-size: 12px;
}

.line-code-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
}

.line-add-child {
  position: absolute;
  left: 0;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  opacity: 0;
  padding: 0;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.line-code-cell:hover .line-add-child,
.line-add-child:focus {
  opacity: 1;
}

.line-add-child:hover {
  border-color: var(--line);
  background: #fff;
  color: #4d493f;
}

.line-product-field {
  position: relative;
  align-self: center;
}

.template-product-field {
  min-width: 220px;
}

.template-product-field .line-product-suggestions {
  position: static;
  margin-top: 4px;
  max-height: 180px;
}

.line-product-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: grid;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgb(55 49 39 / 14%);
}

.line-product-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #eef1f2;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.line-product-suggestion:last-child {
  border-bottom: 0;
}

.line-product-suggestion:hover {
  background: #fff8df;
}

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

.line-image-wrap {
  align-self: center;
}

.line-thumb {
  display: grid;
  place-items: center;
  width: 50px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: #eeeae1;
  color: var(--muted);
  font-size: 12px;
}

.line-params {
  height: 38px;
  min-height: 38px;
  overflow: hidden;
  line-height: 1.35;
  white-space: nowrap;
  resize: none;
}

.line-params.editing,
.line-params:focus {
  height: 110px;
  min-height: 110px;
  overflow: auto;
  white-space: pre-wrap;
}

.param-cell {
  white-space: pre-line;
  line-height: 1.35;
}

.summary-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 18px;
  background: var(--line);
}

.summary-panel div {
  background: #fff;
  padding: 10px;
}

.summary-panel span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.summary-panel strong {
  font-size: 15px;
}

.summary-panel .total {
  background: #fff6d7;
}

.summary-panel .price-adjust {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-panel .price-adjust span {
  margin-bottom: 0;
}

.approval-hint {
  margin-top: 14px;
  border-radius: 8px;
  padding: 12px;
  background: #eef4f7;
  color: #31404d;
}

.approval-hint.need {
  background: #fff4df;
  color: #764500;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
}

.customer-add-form {
  grid-template-columns: 1.1fr .8fr 1fr .65fr 1.4fr auto auto;
}

.customer-dialog {
  display: grid;
  gap: 14px;
  width: min(680px, calc(100vw - 32px));
  padding: 20px;
}

.customer-dialog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.customer-dialog-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-background-input {
  display: grid;
  gap: 6px;
}

.field-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-dialog-grid .wide {
  grid-column: 1 / -1;
}

.customer-dialog-grid textarea {
  resize: vertical;
}

.purchase-dialog {
  max-width: 920px;
}

.purchase-dialog-grid {
  max-height: 62vh;
  overflow: auto;
}

.thumb {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #edf1f4;
}

.muted {
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 14px;
}

.template-maintenance-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.template-nav-card {
  display: grid;
  flex: 0 0 178px;
  gap: 2px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
}

.template-nav-card span {
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.template-nav-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.template-nav-card.active,
.template-nav-card:hover {
  border-color: #d8c27a;
  background: #fff8da;
}

.template-editor-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

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

.template-editor-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.template-editor-grid textarea {
  resize: vertical;
}

.template-editor-grid .wide {
  grid-column: 1 / -1;
}

.template-excel-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
}

.excel-template-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafaf8;
  padding: 12px;
  overflow-x: auto;
}

.excel-template-preview table {
  min-width: 720px;
}

.template-checkbox-list {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 10px;
}

.template-field-group {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  min-width: 0;
}

.template-field-group > strong {
  color: var(--muted);
  font-size: 12px;
}

.template-field-group .template-checkbox-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
}

.template-checkbox-list label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.template-field-group .template-checkbox-list label {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid #e6deca;
  border-radius: 7px;
  background: #fff;
  padding: 4px 8px;
  line-height: 1;
  white-space: nowrap;
}

.template-field-group .template-checkbox-list input {
  margin: 0;
}

.excel-style-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.excel-style-summary span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 5px 8px;
  color: #4d493f;
  font-size: 12px;
  font-weight: 800;
}

.approval-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.approval-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.approval-card textarea {
  min-height: 80px;
}

.approval-inline-row td {
  background: #fffdf6;
}

.export-inline-row td {
  background: #fbfcfb;
}

.approval-inline-panel,
.export-inline-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(260px, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dfcf8d;
  border-radius: 8px;
  background: #fffaf0;
}

.export-inline-panel {
  grid-template-columns: minmax(180px, 1fr) auto;
  background: #fff;
}

.approval-inline-panel > div:first-child {
  display: grid;
  gap: 4px;
}

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

.approval-inline-panel textarea {
  min-height: 42px;
  resize: vertical;
}

.alerts {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.alert {
  border-radius: 8px;
  padding: 10px 12px;
  background: #e9f5ef;
  color: #145c3c;
}

.alert.warn {
  background: #fff0d7;
  color: #7a4700;
}

dialog {
  width: min(980px, 94vw);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.26);
}

dialog::backdrop {
  background: rgba(9, 15, 20, 0.45);
}

#quotePreview {
  padding: 26px;
}

.quote-doc {
  display: grid;
  gap: 18px;
}

.quote-doc-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 2px solid #202a33;
  padding-bottom: 14px;
}

.quote-doc table {
  min-width: 0;
}

.quote-doc-section-title {
  margin: 10px 0 8px;
  padding: 8px 10px;
  background: #fff6d7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.manufacturing-summary {
  display: grid;
  gap: 14px;
}

.loading-panel,
.manufacturing-hero,
.production-section,
.production-kpis article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
}

.loading-panel {
  padding: 18px;
  color: var(--muted);
}

.manufacturing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.manufacturing-hero h2 {
  margin-bottom: 6px;
}

.manufacturing-hero p {
  margin-bottom: 0;
}

.production-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.production-kpis article {
  padding: 13px;
}

.production-kpis span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.production-kpis strong {
  font-size: 22px;
}

.production-section {
  padding: 14px;
}

.production-project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#manufacturingProjectDetail {
  margin-top: -12px;
}

.production-project-header h3 {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.production-project-header p {
  color: var(--muted);
  font-size: 15px;
}

.production-project-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.production-project-kpis article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 12px;
}

.production-project-kpis span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.production-project-kpis strong {
  font-size: 22px;
}

.production-sheet-cards {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: -4px;
}

.production-sheet-cards button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-height: 82px;
  display: grid;
  align-content: start;
  text-align: left;
  gap: 10px;
  cursor: pointer;
}

.production-sheet-cards span,
.production-sheet-cards small {
  color: var(--muted);
}

.production-sheet-cards span {
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
}

.production-sheet-cards small.card-issue-summary {
  color: #9b2222;
  font-weight: 800;
}

.card-summary-lines {
  display: grid;
  gap: 3px;
}

.production-sheet-cards small.card-done-summary {
  color: #146b43;
  font-weight: 800;
}

.production-sheet-cards strong {
  color: var(--ink);
  font-size: 24px;
}

.production-sheet-cards button.active,
.production-sheet-cards button:hover {
  border-color: #d6a51d;
  background: #fff6d7;
}

.production-sheet-cards button.issue-card span,
.production-sheet-cards button.issue-card small {
  color: #9b2222;
}

.production-sheet-card {
  background: #fff;
}

.production-sheet-card.is-hidden {
  display: none;
}

.drawing-upload-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.device-type-select {
  width: 54px;
  min-width: 54px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 4px;
  color: var(--ink);
}

.device-status-select {
  width: 68px;
  min-width: 68px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 4px;
  color: var(--ink);
  font-weight: 800;
}

.device-status-select.status-design {
  border-color: #c8d3dc;
  background: #f3f6f7;
  color: #34495a;
}

.device-status-select.status-production {
  border-color: #d6a51d;
  background: #fff6d7;
  color: #7a5a00;
}

.device-status-select.status-done {
  border-color: #9bd1b1;
  background: #e8f6ee;
  color: #146b43;
}

.device-status-select.status-shipped {
  border-color: #b7c7ee;
  background: #eef3ff;
  color: #234a91;
}

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

.drawing-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.drawing-status-plain {
  color: var(--muted);
  white-space: nowrap;
}

.drawing-status.neutral {
  color: var(--muted);
  background: #f3f6f7;
}

.drawing-status.pending {
  color: #9b2222;
  background: #fdeaea;
}

.drawing-status.done {
  color: #146b43;
  background: #e8f6ee;
}

.bom-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.bom-status.pending {
  color: #9b2222;
  background: #fdeaea;
}

.bom-status.complete {
  color: #7a5a00;
  background: #fff6d7;
}

.bom-status.purchased {
  color: #146b43;
  background: #e8f6ee;
}

.purchase-added-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  color: #146b43;
  background: #e8f6ee;
  white-space: nowrap;
}

.production-device-table th:nth-child(1),
.production-device-table td:nth-child(1) {
  width: 78px;
  min-width: 78px;
}

.production-device-table th {
  text-align: center;
}

.production-device-table .th-filter-label {
  display: block;
  width: 100%;
  padding-right: 22px;
  text-align: center;
}

.production-device-table .th-filter-button {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.production-device-table td:nth-child(1),
.production-device-table td:nth-child(4),
.production-device-table td:nth-child(5),
.production-device-table td:nth-child(6),
.production-device-table td:nth-child(7),
.production-device-table td:nth-child(8),
.production-device-table td:nth-child(9),
.production-device-table td:nth-child(10),
.production-device-table td:nth-child(11) {
  text-align: center;
}

.production-device-table td:nth-child(1) select,
.production-device-table td:nth-child(4) select,
.production-device-table td:nth-child(8) input,
.production-device-table td:nth-child(9) input,
.production-device-table td:nth-child(10) input {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.production-device-table th:nth-child(2),
.production-device-table td:nth-child(2) {
  width: 48px;
  min-width: 48px;
  text-align: center;
}

.production-device-table th:nth-child(4),
.production-device-table td:nth-child(4) {
  width: 62px;
  min-width: 62px;
}

.production-device-table th:nth-child(5),
.production-device-table td:nth-child(5) {
  white-space: nowrap;
}

.production-device-table th:nth-child(3),
.production-device-table td:nth-child(3) {
  width: 180px;
  min-width: 180px;
}

.production-device-table th:nth-child(8),
.production-device-table td:nth-child(8),
.production-device-table th:nth-child(9),
.production-device-table td:nth-child(9),
.production-device-table th:nth-child(10),
.production-device-table td:nth-child(10) {
  width: 112px;
  min-width: 112px;
  white-space: nowrap;
}

.production-device-table th:nth-child(11),
.production-device-table td:nth-child(11) {
  width: 94px;
  min-width: 94px;
  white-space: nowrap;
}

.production-device-table th:nth-child(12),
.production-device-table td:nth-child(12) {
  width: 160px;
  min-width: 160px;
}

.device-note-input {
  min-width: 140px;
}

.device-name-with-tip {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #c9bd9a;
  text-underline-offset: 3px;
}

.device-name-with-tip:hover {
  color: #7a5a00;
}

.highlight-parameter-row td {
  background: #fff6d7;
}

.device-date-input {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 6px;
}

.schedule-eval {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.schedule-eval.neutral {
  color: var(--muted);
  background: #f3f6f7;
}

.schedule-eval.near {
  color: #7a5a00;
  background: #fff6d7;
}

.schedule-eval.overdue {
  color: #9b2222;
  background: #fdeaea;
}

.schedule-eval.normal {
  color: #146b43;
  background: #e8f6ee;
}

.schedule-eval.late-done {
  color: #9b315d;
  background: #fde8f1;
}

.accessory-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.accessory-status.not-ordered {
  color: #9b2222;
  background: #fdeaea;
}

.accessory-status.ordered {
  color: #7a5a00;
  background: #fff6d7;
}

.accessory-status.arrived {
  color: #146b43;
  background: #e8f6ee;
}

.power-confirmation-cell {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
}

.power-confirmation-cell button {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.power-confirmation-cell:hover button {
  opacity: 1;
}

.production-parameter-issue-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.15fr);
  gap: 12px;
}

.production-parameter-panel,
.production-issue-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.section-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.left-toolbar-head {
  justify-content: flex-start;
}

.left-toolbar-head > div:first-child {
  display: none;
}

.left-toolbar-head .section-actions {
  justify-content: flex-start;
}

.production-parameter-issue-table th:nth-child(1),
.production-parameter-issue-table td:nth-child(1) {
  min-width: 150px;
  max-width: 190px;
}

.production-parameter-issue-table th:nth-child(2),
.production-parameter-issue-table td:nth-child(2) {
  min-width: 220px;
  max-width: 280px;
  white-space: normal;
}

.production-parameter-issue-table th:nth-child(4),
.production-parameter-issue-table td:nth-child(4) {
  min-width: 170px;
  max-width: 230px;
}

.production-parameter-issue-table th:nth-child(n + 5),
.production-parameter-issue-table td:nth-child(n + 5) {
  min-width: 120px;
}

.inline-nc-list {
  display: grid;
  gap: 4px;
}

.inline-nc-list span {
  display: block;
  color: #9b2222;
  line-height: 1.35;
}

.abnormal-form {
  grid-template-columns: minmax(170px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
}

.abnormal-status-select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 6px;
  font-weight: 800;
  width: 76px;
}

.abnormal-status-select.pending {
  color: #9b2222;
  background: #fdeaea;
}

.abnormal-status-select.confirmed {
  color: #146b43;
  background: #e8f6ee;
}

.production-abnormal-board-table input {
  min-width: 150px;
}

.readonly-table-text {
  display: inline-block;
  max-width: 260px;
  color: var(--ink);
  white-space: normal;
}

.production-abnormal-table th:nth-child(1),
.production-abnormal-table td:nth-child(1) {
  width: 96px;
  min-width: 96px;
  white-space: nowrap;
}

.production-abnormal-table td:nth-child(2) {
  min-width: 170px;
}

.production-abnormal-table td:nth-child(2) input {
  width: 100%;
  margin-bottom: 4px;
}

.production-abnormal-table th:nth-child(4),
.production-abnormal-table td:nth-child(4) {
  min-width: 260px;
  width: 30%;
}

.production-abnormal-table th:nth-child(5),
.production-abnormal-table td:nth-child(5) {
  width: 86px;
  min-width: 86px;
}

.production-abnormal-table .abnormal-reason-input {
  min-width: 240px;
}

.inline-row-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  white-space: nowrap;
}

.production-bom-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
}

.production-bom-device-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.production-bom-device-list button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 10px;
  min-height: 66px;
  text-align: left;
  cursor: pointer;
}

.production-bom-device-list button.active,
.production-bom-device-list button:hover {
  border-color: #d6a51d;
  background: #fff6d7;
}

.production-bom-device-list strong,
.production-bom-device-list span {
  display: block;
}

.production-bom-device-list strong {
  line-height: 1.35;
}

.production-bom-device-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.production-bom-device-list span.is-missing {
  color: #9b2222;
  font-weight: 800;
}

.production-bom-table-panel {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.production-bom-table-panel .production-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}

.production-bom-table-panel .production-section-head h3 {
  min-width: 0;
  width: 100%;
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-bom-table-panel .section-actions {
  align-items: center;
  width: 154px;
  height: 28px;
  flex-wrap: nowrap;
}

.production-bom-table-panel .section-actions .mini-action {
  width: 73px;
  height: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.production-bom-table-panel .table-wrap {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.production-bom-table-panel thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.production-bom-table-panel th,
.production-bom-table-panel td {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-bom-table-panel th:nth-child(-n + 6),
.production-bom-table-panel td:nth-child(-n + 6) {
  position: sticky;
  background: #fff;
}

.production-bom-table-panel thead th:nth-child(-n + 6) {
  background: #f3f6f7;
  z-index: 7;
}

.production-bom-table-panel tbody td:nth-child(-n + 6) {
  z-index: 5;
}

.production-bom-table-panel th:nth-child(1),
.production-bom-table-panel td:nth-child(1) {
  left: 0;
  width: 42px;
  min-width: 42px;
}

.production-bom-table-panel th:nth-child(2),
.production-bom-table-panel td:nth-child(2) {
  left: 42px;
  width: 86px;
  min-width: 86px;
}

.production-bom-table-panel th:nth-child(3),
.production-bom-table-panel td:nth-child(3) {
  left: 128px;
  width: 58px;
  min-width: 58px;
}

.production-bom-table-panel th:nth-child(4),
.production-bom-table-panel td:nth-child(4) {
  left: 186px;
  width: 180px;
  min-width: 180px;
}

.production-bom-table-panel th:nth-child(5),
.production-bom-table-panel td:nth-child(5) {
  left: 366px;
  width: 150px;
  min-width: 150px;
}

.production-bom-table-panel th:nth-child(6),
.production-bom-table-panel td:nth-child(6) {
  left: 516px;
  width: 150px;
  min-width: 150px;
  box-shadow: 1px 0 0 var(--line);
}

.production-bom-table-panel input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.production-electrical-table th,
.production-electrical-table td {
  white-space: nowrap;
}

.production-electrical-table input,
.production-electrical-table select {
  min-width: 92px;
}

.production-electrical-table input[type="checkbox"] {
  min-width: 0;
  width: 16px;
  height: 16px;
}

.production-nc-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 0.8fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.production-nc-form input,
.production-nc-form select {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
}

.production-sheet-card .production-section-head {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.compact-list strong,
.compact-list span {
  display: block;
}

.compact-list span {
  color: var(--muted);
  margin-top: 4px;
}

.project-status-inline {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  padding-top: 0;
}

.project-status-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 430px;
}

.project-status-buttons button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-weight: 700;
  cursor: pointer;
}

.project-status-buttons button.active,
.project-status-buttons button:hover {
  border-color: #d6a51d;
  background: #fff6d7;
  color: #7a5a00;
}

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

.production-section-head h3 {
  margin-bottom: 0;
}

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

.production-section-head .section-alert {
  color: var(--danger);
  font-weight: 800;
  font-size: 13px;
}

.five-s-management {
  display: grid;
  gap: 14px;
}

.five-s-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.five-s-hero h3 {
  font-size: 26px;
  margin-bottom: 6px;
}

.five-s-hero p {
  color: var(--muted);
  margin-bottom: 0;
}

.five-s-week {
  display: grid;
  gap: 5px;
  min-width: 230px;
  text-align: right;
}

.five-s-week span,
.five-s-week em {
  color: var(--muted);
  font-style: normal;
}

.five-s-week strong {
  font-size: 18px;
}

.five-s-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.five-s-kpis article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  padding: 13px;
}

.five-s-kpis article.late {
  border-color: #e8a7a7;
  background: #fff7f7;
}

.five-s-kpis span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.five-s-kpis strong {
  font-size: 24px;
}

.five-s-table {
  min-width: 1380px;
}

.five-s-table th,
.five-s-table td {
  white-space: nowrap;
}

.five-s-upload {
  display: inline-flex;
  align-items: center;
  max-width: 150px;
  cursor: pointer;
}

.five-s-upload input {
  display: none;
}

.five-s-upload span {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff6d7;
  color: #7a5a00;
  padding: 5px 9px;
  font-weight: 800;
}

.five-s-page-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 10px;
}

.five-s-page-tabs button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 7px 12px;
  font-weight: 800;
  cursor: pointer;
}

.five-s-page-tabs button.active,
.five-s-page-tabs button:hover {
  border-color: #d6a51d;
  background: #fff6d7;
  color: #7a5a00;
}

.five-s-day-cell {
  min-width: 145px;
}

.five-s-day-cell small {
  display: block;
  max-width: 140px;
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.five-s-day-cell.required small {
  color: var(--danger);
  font-weight: 800;
}

.five-s-table .work-status.late {
  background: #f8dfdf;
  color: var(--danger);
}

.five-s-table .work-status.idle {
  background: #eef1f2;
  color: var(--muted);
}

.five-s-review-select {
  min-width: 112px;
}

.production-lanes {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
}

.production-lane {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.production-lane header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.production-lane header span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff6d7;
  color: #7a5a00;
  font-weight: 800;
}

.production-project-card {
  border: 1px solid #d8c27a;
  border-radius: 8px;
  background: #fffdf6;
  padding: 10px;
}

.production-feature-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 180px minmax(260px, 0.8fr);
  gap: 18px;
  border: 1px solid #d8c27a;
  border-left: 6px solid #e0b51a;
  border-radius: 8px;
  background: #fffdf6;
  padding: 18px 18px 34px;
}

.production-feature-card.normal {
  border-left-color: #20a464;
}

.production-feature-card.risk {
  border-left-color: #e0b51a;
}

.production-feature-card.late {
  border-left-color: #c73b3b;
}

.feature-main,
.feature-date,
.feature-blocker {
  display: grid;
  align-content: start;
  gap: 7px;
}

.feature-signal {
  width: fit-content;
  border-radius: 999px;
  background: #fff6d7;
  color: #7a5a00;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 12px;
}

.production-feature-card.normal .feature-signal {
  background: #e8f6ee;
  color: #146b43;
}

.production-feature-card.late .feature-signal {
  background: #fdeaea;
  color: #9b2222;
}

.feature-title {
  font-size: 20px;
  line-height: 1.3;
}

.feature-main p,
.feature-blocker p,
.feature-date span {
  color: var(--muted);
  margin: 0;
}

.feature-date {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 18px;
}

.feature-date strong {
  color: #8a1538;
  font-size: 21px;
}

.feature-date em {
  color: #8a1538;
  font-style: normal;
  font-weight: 900;
}

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

.feature-blocker strong {
  line-height: 1.45;
}

.feature-dots {
  position: absolute;
  left: 18px;
  bottom: 12px;
  display: flex;
  gap: 7px;
}

.feature-dots button {
  width: 26px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #e6dfcf;
  cursor: pointer;
}

.feature-dots button.active {
  background: #c99700;
}

.production-project-link {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.production-project-link:hover {
  color: #7a5a00;
  text-decoration: underline;
}

.project-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 12px;
}

.project-mini-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.project-mini-grid .project-delivery-date {
  color: #8a1538;
  font-size: 13px;
  font-weight: 900;
}

.production-change-log {
  border-top: 1px solid var(--line);
  margin-top: 9px;
  padding-top: 8px;
}

.production-change-log span,
.feature-change-log {
  color: var(--muted);
  font-size: 12px;
}

.production-change-log p {
  margin: 4px 0 0;
  color: var(--ink);
  line-height: 1.4;
}

.feature-change-log {
  margin-top: 4px;
}

.production-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

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

.production-sheet-card .production-table th,
.production-sheet-card .production-table td {
  box-sizing: border-box;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 8px !important;
  line-height: 18px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.production-sheet-card .production-table thead tr {
  height: 38px !important;
}

.production-sheet-card .production-table thead th {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 18px !important;
}

.production-sheet-card .production-table th {
  text-align: center;
}

.production-sheet-card .production-table td {
  text-align: center;
}

.production-sheet-card .production-table input,
.production-sheet-card .production-table select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 30px;
  height: 30px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.production-sheet-card .production-table td:has(> .smart-date-input) {
  width: auto;
  min-width: 0;
  max-width: none;
}

.production-sheet-card .production-table .smart-date-input,
.production-sheet-card .production-table .device-date-input {
  width: 82px;
  min-width: 0;
  max-width: 100%;
}

.production-sheet-card .production-table tbody tr {
  height: 38px !important;
}

.production-sheet-card .production-device-table .th-filter-label {
  display: block;
  position: relative;
  width: 100%;
  height: 38px;
  line-height: 18px;
  padding-right: 22px;
  text-align: center;
}

.production-sheet-card .production-device-table .th-filter-button {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.production-sheet-card .production-device-table .th-filter-button::before {
  width: 11px;
  height: 11px;
}

.production-device-table td:nth-child(3),
.production-device-table td:nth-child(12),
.production-selfmade-table td:nth-child(3),
.production-selfmade-table td:nth-child(9),
.production-selfmade-table td:nth-child(10),
.production-design-table td:nth-child(3),
.production-accessory-table td:nth-child(3),
.production-accessory-table td:nth-child(10),
.production-abnormal-table td:nth-child(2),
.production-abnormal-table td:nth-child(3),
.production-abnormal-table td:nth-child(4),
.production-abnormal-table td:nth-child(5),
.production-abnormal-board-table td:nth-child(2),
.production-abnormal-board-table td:nth-child(3),
.production-abnormal-board-table td:nth-child(4),
.production-abnormal-board-table td:nth-child(5) {
  text-align: left;
}

.production-device-table td:nth-child(12) input,
.production-selfmade-table td:nth-child(10) input,
.production-accessory-table td:nth-child(10) input,
.production-abnormal-table td:nth-child(2) input,
.production-abnormal-table td:nth-child(3) input,
.production-abnormal-table td:nth-child(4) input,
.production-abnormal-table td:nth-child(5) input,
.production-abnormal-board-table td:nth-child(4) input,
.production-abnormal-board-table td:nth-child(5) input {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.production-sheet-card .production-device-table {
  width: 100% !important;
  min-width: 1174px !important;
  max-width: none !important;
}

.production-sheet-card .production-selfmade-table {
  width: 100% !important;
  min-width: 1140px !important;
  max-width: none !important;
}

.production-sheet-card .production-design-table {
  width: 100% !important;
  min-width: 782px !important;
  max-width: none !important;
}

.production-sheet-card .production-accessory-table {
  width: 100% !important;
  min-width: 1022px !important;
  max-width: none !important;
}

.production-sheet-card .production-bom-table {
  width: 100% !important;
  min-width: 1142px !important;
  max-width: none !important;
}

.production-sheet-card .production-electrical-table {
  width: 100% !important;
  min-width: 1022px !important;
  max-width: none !important;
}

.production-sheet-card .production-abnormal-table {
  width: 100% !important;
  min-width: 1062px !important;
  max-width: none !important;
}

.production-sheet-card .production-device-table th:nth-child(1),
.production-sheet-card .production-device-table td:nth-child(1),
.production-sheet-card .production-selfmade-table th:nth-child(1),
.production-sheet-card .production-selfmade-table td:nth-child(1),
.production-sheet-card .production-design-table th:nth-child(1),
.production-sheet-card .production-design-table td:nth-child(1),
.production-sheet-card .production-accessory-table th:nth-child(1),
.production-sheet-card .production-accessory-table td:nth-child(1),
.production-sheet-card .production-bom-table th:nth-child(2),
.production-sheet-card .production-bom-table td:nth-child(2),
.production-sheet-card .production-electrical-table th:nth-child(2),
.production-sheet-card .production-electrical-table td:nth-child(2),
.production-sheet-card .production-abnormal-table th:nth-child(6),
.production-sheet-card .production-abnormal-table td:nth-child(6) {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
}

.production-sheet-card .production-bom-table th:nth-child(1),
.production-sheet-card .production-bom-table td:nth-child(1),
.production-sheet-card .production-electrical-table th:nth-child(1),
.production-sheet-card .production-electrical-table td:nth-child(1) {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
}

.production-sheet-card .production-device-table th:nth-child(2),
.production-sheet-card .production-device-table td:nth-child(2),
.production-sheet-card .production-selfmade-table th:nth-child(2),
.production-sheet-card .production-selfmade-table td:nth-child(2),
.production-sheet-card .production-design-table th:nth-child(2),
.production-sheet-card .production-design-table td:nth-child(2),
.production-sheet-card .production-accessory-table th:nth-child(2),
.production-sheet-card .production-accessory-table td:nth-child(2),
.production-sheet-card .production-bom-table th:nth-child(3),
.production-sheet-card .production-bom-table td:nth-child(3) {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
}

.production-sheet-card .production-device-table th:nth-child(3),
.production-sheet-card .production-device-table td:nth-child(3),
.production-sheet-card .production-selfmade-table th:nth-child(3),
.production-sheet-card .production-selfmade-table td:nth-child(3),
.production-sheet-card .production-design-table th:nth-child(3),
.production-sheet-card .production-design-table td:nth-child(3),
.production-sheet-card .production-accessory-table th:nth-child(3),
.production-sheet-card .production-accessory-table td:nth-child(3),
.production-sheet-card .production-bom-table th:nth-child(4),
.production-sheet-card .production-bom-table td:nth-child(4),
.production-sheet-card .production-electrical-table th:nth-child(3),
.production-sheet-card .production-electrical-table td:nth-child(3),
.production-sheet-card .production-abnormal-table th:nth-child(2),
.production-sheet-card .production-abnormal-table td:nth-child(2) {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
}

.production-sheet-card .production-device-table th:nth-child(4),
.production-sheet-card .production-device-table td:nth-child(4),
.production-sheet-card .production-bom-table th:nth-child(8),
.production-sheet-card .production-bom-table td:nth-child(8),
.production-sheet-card .production-electrical-table th:nth-child(9),
.production-sheet-card .production-electrical-table td:nth-child(9) {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
}

.production-sheet-card .production-device-table th:nth-child(5),
.production-sheet-card .production-device-table td:nth-child(5),
.production-sheet-card .production-accessory-table th:nth-child(5),
.production-sheet-card .production-accessory-table td:nth-child(5),
.production-sheet-card .production-bom-table th:nth-child(7),
.production-sheet-card .production-bom-table td:nth-child(7),
.production-sheet-card .production-electrical-table th:nth-child(7),
.production-sheet-card .production-electrical-table td:nth-child(7) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

.production-sheet-card .production-device-table th:nth-child(6),
.production-sheet-card .production-device-table td:nth-child(6),
.production-sheet-card .production-device-table th:nth-child(7),
.production-sheet-card .production-device-table td:nth-child(7),
.production-sheet-card .production-design-table th:nth-child(4),
.production-sheet-card .production-design-table td:nth-child(4),
.production-sheet-card .production-accessory-table th:nth-child(9),
.production-sheet-card .production-accessory-table td:nth-child(9) {
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
}

.production-sheet-card .production-device-table th:nth-child(8),
.production-sheet-card .production-device-table td:nth-child(8),
.production-sheet-card .production-device-table th:nth-child(9),
.production-sheet-card .production-device-table td:nth-child(9),
.production-sheet-card .production-device-table th:nth-child(10),
.production-sheet-card .production-device-table td:nth-child(10),
.production-sheet-card .production-selfmade-table th:nth-child(5),
.production-sheet-card .production-selfmade-table td:nth-child(5),
.production-sheet-card .production-selfmade-table th:nth-child(6),
.production-sheet-card .production-selfmade-table td:nth-child(6),
.production-sheet-card .production-selfmade-table th:nth-child(7),
.production-sheet-card .production-selfmade-table td:nth-child(7),
.production-sheet-card .production-design-table th:nth-child(6),
.production-sheet-card .production-design-table td:nth-child(6),
.production-sheet-card .production-design-table th:nth-child(7),
.production-sheet-card .production-design-table td:nth-child(7),
.production-sheet-card .production-accessory-table th:nth-child(6),
.production-sheet-card .production-accessory-table td:nth-child(6),
.production-sheet-card .production-accessory-table th:nth-child(7),
.production-sheet-card .production-accessory-table td:nth-child(7),
.production-sheet-card .production-accessory-table th:nth-child(8),
.production-sheet-card .production-accessory-table td:nth-child(8),
.production-sheet-card .production-bom-table th:nth-child(10),
.production-sheet-card .production-bom-table td:nth-child(10),
.production-sheet-card .production-bom-table th:nth-child(11),
.production-sheet-card .production-bom-table td:nth-child(11),
.production-sheet-card .production-bom-table th:nth-child(12),
.production-sheet-card .production-bom-table td:nth-child(12),
.production-sheet-card .production-electrical-table th:nth-child(10),
.production-sheet-card .production-electrical-table td:nth-child(10),
.production-sheet-card .production-electrical-table th:nth-child(11),
.production-sheet-card .production-electrical-table td:nth-child(11),
.production-sheet-card .production-abnormal-table th:nth-child(1),
.production-sheet-card .production-abnormal-table td:nth-child(1) {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
}

.production-sheet-card .production-device-table th:nth-child(11),
.production-sheet-card .production-device-table td:nth-child(11),
.production-sheet-card .production-selfmade-table th:nth-child(8),
.production-sheet-card .production-selfmade-table td:nth-child(8) {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
}

.production-sheet-card .production-device-table th:nth-child(12),
.production-sheet-card .production-device-table td:nth-child(12),
.production-sheet-card .production-selfmade-table th:nth-child(10),
.production-sheet-card .production-selfmade-table td:nth-child(10),
.production-sheet-card .production-accessory-table th:nth-child(10),
.production-sheet-card .production-accessory-table td:nth-child(10) {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
}

.production-sheet-card .production-selfmade-table th:nth-child(4),
.production-sheet-card .production-selfmade-table td:nth-child(4),
.production-sheet-card .production-design-table th:nth-child(5),
.production-sheet-card .production-design-table td:nth-child(5),
.production-sheet-card .production-accessory-table th:nth-child(4),
.production-sheet-card .production-accessory-table td:nth-child(4),
.production-sheet-card .production-bom-table th:nth-child(9),
.production-sheet-card .production-bom-table td:nth-child(9),
.production-sheet-card .production-electrical-table th:nth-child(6),
.production-sheet-card .production-electrical-table td:nth-child(6) {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
}

.production-sheet-card .production-selfmade-table th:nth-child(9),
.production-sheet-card .production-selfmade-table td:nth-child(9) {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
}

.production-sheet-card .production-design-table th:nth-child(8),
.production-sheet-card .production-design-table td:nth-child(8) {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
}

.production-sheet-card .production-bom-table th:nth-child(5),
.production-sheet-card .production-bom-table td:nth-child(5),
.production-sheet-card .production-bom-table th:nth-child(6),
.production-sheet-card .production-bom-table td:nth-child(6),
.production-sheet-card .production-electrical-table th:nth-child(4),
.production-sheet-card .production-electrical-table td:nth-child(4) {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}

.production-sheet-card .production-electrical-table th:nth-child(5),
.production-sheet-card .production-electrical-table td:nth-child(5) {
  width: 76px !important;
  min-width: 76px !important;
  max-width: 76px !important;
}

.production-sheet-card .production-electrical-table th:nth-child(8),
.production-sheet-card .production-electrical-table td:nth-child(8) {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
}

.production-sheet-card .production-abnormal-table th:nth-child(3),
.production-sheet-card .production-abnormal-table td:nth-child(3),
.production-sheet-card .production-abnormal-table th:nth-child(4),
.production-sheet-card .production-abnormal-table td:nth-child(4) {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
}

.production-sheet-card .production-abnormal-table th:nth-child(5),
.production-sheet-card .production-abnormal-table td:nth-child(5) {
  width: 260px !important;
  min-width: 260px !important;
  max-width: 260px !important;
}

.production-sheet-card .production-device-table th:nth-child(3),
.production-sheet-card .production-device-table td:nth-child(3),
.production-sheet-card .production-device-table th:nth-child(12),
.production-sheet-card .production-device-table td:nth-child(12),
.production-sheet-card .production-selfmade-table th:nth-child(3),
.production-sheet-card .production-selfmade-table td:nth-child(3),
.production-sheet-card .production-selfmade-table th:nth-child(9),
.production-sheet-card .production-selfmade-table td:nth-child(9),
.production-sheet-card .production-selfmade-table th:nth-child(10),
.production-sheet-card .production-selfmade-table td:nth-child(10),
.production-sheet-card .production-design-table th:nth-child(3),
.production-sheet-card .production-design-table td:nth-child(3),
.production-sheet-card .production-accessory-table th:nth-child(3),
.production-sheet-card .production-accessory-table td:nth-child(3),
.production-sheet-card .production-accessory-table th:nth-child(10),
.production-sheet-card .production-accessory-table td:nth-child(10),
.production-sheet-card .production-bom-table th:nth-child(4),
.production-sheet-card .production-bom-table td:nth-child(4),
.production-sheet-card .production-bom-table th:nth-child(5),
.production-sheet-card .production-bom-table td:nth-child(5),
.production-sheet-card .production-bom-table th:nth-child(6),
.production-sheet-card .production-bom-table td:nth-child(6),
.production-sheet-card .production-electrical-table th:nth-child(3),
.production-sheet-card .production-electrical-table td:nth-child(3),
.production-sheet-card .production-electrical-table th:nth-child(4),
.production-sheet-card .production-electrical-table td:nth-child(4),
.production-sheet-card .production-abnormal-table th:nth-child(2),
.production-sheet-card .production-abnormal-table td:nth-child(2),
.production-sheet-card .production-abnormal-table th:nth-child(3),
.production-sheet-card .production-abnormal-table td:nth-child(3),
.production-sheet-card .production-abnormal-table th:nth-child(4),
.production-sheet-card .production-abnormal-table td:nth-child(4),
.production-sheet-card .production-abnormal-table th:nth-child(5),
.production-sheet-card .production-abnormal-table td:nth-child(5) {
  width: auto !important;
  max-width: none !important;
}

.production-sheet-card .production-device-table th:nth-child(3),
.production-sheet-card .production-device-table td:nth-child(3),
.production-sheet-card .production-selfmade-table th:nth-child(3),
.production-sheet-card .production-selfmade-table td:nth-child(3),
.production-sheet-card .production-design-table th:nth-child(3),
.production-sheet-card .production-design-table td:nth-child(3),
.production-sheet-card .production-accessory-table th:nth-child(3),
.production-sheet-card .production-accessory-table td:nth-child(3),
.production-sheet-card .production-bom-table th:nth-child(4),
.production-sheet-card .production-bom-table td:nth-child(4),
.production-sheet-card .production-electrical-table th:nth-child(3),
.production-sheet-card .production-electrical-table td:nth-child(3),
.production-sheet-card .production-abnormal-table th:nth-child(2),
.production-sheet-card .production-abnormal-table td:nth-child(2) {
  min-width: 180px !important;
}

.production-sheet-card .production-bom-table th:nth-child(5),
.production-sheet-card .production-bom-table td:nth-child(5),
.production-sheet-card .production-bom-table th:nth-child(6),
.production-sheet-card .production-bom-table td:nth-child(6),
.production-sheet-card .production-electrical-table th:nth-child(4),
.production-sheet-card .production-electrical-table td:nth-child(4) {
  min-width: 150px !important;
}

.production-sheet-card .production-device-table th:nth-child(12),
.production-sheet-card .production-device-table td:nth-child(12),
.production-sheet-card .production-selfmade-table th:nth-child(9),
.production-sheet-card .production-selfmade-table td:nth-child(9),
.production-sheet-card .production-selfmade-table th:nth-child(10),
.production-sheet-card .production-selfmade-table td:nth-child(10),
.production-sheet-card .production-accessory-table th:nth-child(10),
.production-sheet-card .production-accessory-table td:nth-child(10) {
  min-width: 160px !important;
}

.production-sheet-card .production-abnormal-table th:nth-child(3),
.production-sheet-card .production-abnormal-table td:nth-child(3),
.production-sheet-card .production-abnormal-table th:nth-child(4),
.production-sheet-card .production-abnormal-table td:nth-child(4) {
  min-width: 220px !important;
}

.production-sheet-card .production-abnormal-table th:nth-child(5),
.production-sheet-card .production-abnormal-table td:nth-child(5) {
  min-width: 260px !important;
}

.production-sheet-card .production-bom-table th:nth-child(4),
.production-sheet-card .production-bom-table td:nth-child(4) {
  width: 180px !important;
  min-width: 180px !important;
  max-width: 180px !important;
}

.production-sheet-card .production-bom-table th:nth-child(5),
.production-sheet-card .production-bom-table td:nth-child(5),
.production-sheet-card .production-bom-table th:nth-child(6),
.production-sheet-card .production-bom-table td:nth-child(6) {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
}

.production-grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.production-mini-table,
.todo-stack {
  display: grid;
  gap: 10px;
}

.production-mini-table,
.todo-stack article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.production-mini-table div,
.production-mini-table footer,
.todo-stack article {
  display: grid;
  gap: 6px;
}

.production-mini-table span,
.todo-stack span {
  color: var(--muted);
}

.work-status {
  display: inline-flex;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 800;
}

.work-status.done {
  background: #dff2e8;
  color: var(--ok);
}

.work-status.todo {
  background: #f8dfdf;
  color: var(--danger);
}

.work-status.late {
  background: #fff1d8;
  color: var(--warn);
}

.production-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.production-links span,
.production-reference {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 10px;
}

.production-reference {
  width: fit-content;
  margin-top: 12px;
  color: var(--muted);
}

.workshop-board-view {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.workshop-board {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  height: calc(100vh - 170px);
  overflow: hidden;
  font-size: 15px;
}

.workshop-topline {
  color: var(--muted);
  font-weight: 700;
}

.workshop-carousel {
  grid-template-columns: minmax(0, 1.2fr) 170px minmax(260px, 0.85fr);
  padding: 14px 16px 30px;
}

.workshop-carousel .feature-title {
  font-size: 20px;
}

.workshop-carousel .feature-date strong {
  font-size: 19px;
}

.workshop-carousel .feature-blocker strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.workshop-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 240px minmax(240px, 0.8fr);
  gap: 18px;
  align-items: center;
  border: 2px solid #d8c27a;
  border-radius: 8px;
  background: #fffdf6;
  padding: 20px;
}

.workshop-project-card h2 {
  font-size: 28px;
  margin: 8px 0;
}

.workshop-status-light {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #fff1d8;
  color: var(--warn);
  padding: 6px 12px;
  font-weight: 900;
}

.workshop-countdown {
  display: grid;
  gap: 6px;
  color: #8a1538;
  text-align: center;
}

.workshop-countdown strong {
  font-size: 28px;
}

.workshop-countdown span {
  font-size: 24px;
  font-weight: 900;
}

.workshop-blocker {
  display: grid;
  gap: 6px;
}

.workshop-blocker span {
  color: var(--muted);
}

.workshop-blocker strong {
  line-height: 1.35;
}

.workshop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.workshop-table table {
  min-width: 1120px;
}

.workshop-screen-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 10px;
}

.workshop-detail-panel,
.workshop-side-grid .production-section {
  min-height: 0;
  overflow: hidden;
}

.workshop-detail-list {
  display: grid;
  gap: 8px;
}

.workshop-detail-list article {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 135px;
  gap: 6px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.workshop-detail-list article div {
  display: grid;
  gap: 4px;
}

.workshop-detail-list article div:nth-child(2) {
  justify-items: end;
}

.workshop-detail-list span,
.workshop-detail-list small {
  color: var(--muted);
}

.workshop-detail-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.workshop-plan-date {
  color: #8a1538;
  font-weight: 900;
}

.workshop-side-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.production-sheet-card .production-device-table .th-filter-label {
  display: inline-flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  padding-right: 0 !important;
  gap: 5px !important;
  line-height: 18px !important;
}

.production-sheet-card .production-device-table .th-filter-button {
  position: static !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
}

.production-sheet-card .production-design-table {
  min-width: 100% !important;
}

.production-sheet-card .production-design-table {
  width: 100% !important;
  table-layout: fixed !important;
}

.production-sheet-card .production-design-table th:nth-child(3),
.production-sheet-card .production-design-table td:nth-child(3) {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
}

.production-sheet-card .production-design-table tbody tr,
.production-sheet-card .production-design-table tbody td {
  height: auto !important;
  max-height: none !important;
}

.production-sheet-card .production-design-table th:nth-child(4),
.production-sheet-card .production-design-table td:nth-child(4) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.production-sheet-card .production-design-table td:nth-child(4) {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.45 !important;
  text-align: left !important;
  vertical-align: top !important;
}

.production-sheet-card .production-design-table th:nth-child(5),
.production-sheet-card .production-design-table td:nth-child(5) {
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
}

.production-sheet-card .production-design-table th:nth-child(6),
.production-sheet-card .production-design-table td:nth-child(6) {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
}

.production-sheet-card .production-design-table th:nth-child(7),
.production-sheet-card .production-design-table td:nth-child(7),
.production-sheet-card .production-design-table th:nth-child(8),
.production-sheet-card .production-design-table td:nth-child(8) {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
}

.production-sheet-card .production-design-table th:nth-child(9),
.production-sheet-card .production-design-table td:nth-child(9) {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
}

.todo-stack.compact {
  gap: 7px;
}

.todo-stack.compact article {
  padding: 9px;
}

.todo-stack.compact p {
  margin: 0;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.main .ceo-dashboard,
.main .dashboard-block,
.main .focus-stack article,
.main .dept-overview article,
.main .module-card,
.main .home-kpis article,
.main .sales-overview article,
.main .placeholder-grid article,
.main .rules-grid article,
.main .approval-card,
.main .table-panel {
  background: #fffdf6;
  color: var(--ink);
}

.main .dashboard-list strong {
  background: #fff6d7;
  color: #7a5a00;
}

.main .focus-stack span,
.main .dept-overview strong {
  color: #7a5a00;
}

.main .focus-stack p,
.main .dept-overview p {
  color: var(--muted);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .sidebar-user-switch {
    margin-top: 14px;
  }

  .topbar,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid,
  .demand-grid,
  .extra-fees-grid,
  .freight-fields,
  .home-kpis,
  .home-layout,
  .marketing-guideline-grid,
  .marketing-article-kpis,
  .production-kpis,
  .production-project-kpis,
  .production-sheet-cards,
  .production-lanes,
  .production-grid-two,
  .production-bom-layout,
  .production-parameter-issue-layout,
  .production-nc-form,
  .workshop-project-card,
  .workshop-grid,
  .dashboard-columns,
  .purchase-kpis,
  .purchase-dashboard-grid,
  .purchase-toolbar,
  .dept-overview,
  .filter-cards,
  .todo-list,
  .knowledge-entry-grid,
  .knowledge-home-grid,
  .equipment-browser,
  .module-grid,
  .sales-overview,
  .sales-focus-list,
  .order-detail-grid,
  .customer-detail-grid,
  .placeholder-grid,
  .rules-grid,
  .summary-panel,
  .inline-form,
	  .quote-filter-bar,
	  .quote-process-controls,
	  .quote-process-equipment-grid,
	  .equipment-template-workbench,
	  .approval-inline-panel,
  .export-inline-panel,
  .template-editor-grid,
  .template-excel-layout,
  .process-toolbar,
  .process-price-filters,
  .process-section-picker,
  .process-trend-grid,
	  .process-flow-grid,
	  .solution-natural-layout,
  .department-settings-list,
  .solution-template-basics,
  .solution-section-fields,
  .todo-list li.todo-add-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .department-settings-list,
  .department-setting-row {
    grid-template-columns: 1fr;
  }

  .template-editor-grid,
  .template-excel-layout,
  .process-toolbar,
  .process-price-filters,
  .process-section-picker,
  .process-trend-grid,
		  .process-flow-grid,
		  .quote-process-row,
		  .quote-process-controls,
		  .quote-process-field-row,
	  .equipment-template-workbench,
	  .equipment-template-detail-grid,
	  .solution-natural-layout,
  .solution-template-basics,
  .solution-section-fields {
    grid-template-columns: 1fr;
  }

  .solution-equipment-head,
  .solution-equipment-row {
    grid-template-columns: 48px repeat(4, minmax(130px, 1fr)) 48px;
    overflow-x: auto;
  }
}

@media print {
  body > *:not(dialog) {
    display: none !important;
  }

  dialog {
    width: 100%;
    box-shadow: none;
  }

  .dialog-actions {
    display: none;
  }
}
